282 on opportunities page data pipeline + companies + people is fetched from be (#285)
* feature: get pipelines columns from backend * feature: display item not found instead of crashing * feature: add BoardCard component * feature: display items from the backend * refactor: extract useBoard in a hook * refactor: export only loading and error from useBoard * refactor: create var pipelineStage * feature: implement support for Company boards
This commit is contained in:
@ -1159,6 +1159,11 @@ export type DeleteCompaniesMutationVariables = Exact<{
|
||||
|
||||
export type DeleteCompaniesMutation = { __typename?: 'Mutation', deleteManyCompany: { __typename?: 'AffectedRows', count: number } };
|
||||
|
||||
export type GetPipelinesQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type GetPipelinesQuery = { __typename?: 'Query', findManyPipeline: Array<{ __typename?: 'Pipeline', id: string, name: string, pipelineStages?: Array<{ __typename?: 'PipelineStage', name: string, color: string, pipelineProgresses?: Array<{ __typename?: 'PipelineProgress', id: string, associableType: PipelineProgressableType, associableId: string }> | null }> | null }> };
|
||||
|
||||
export type GetPeopleQueryVariables = Exact<{
|
||||
orderBy?: InputMaybe<Array<PersonOrderByWithRelationInput> | PersonOrderByWithRelationInput>;
|
||||
where?: InputMaybe<PersonWhereInput>;
|
||||
@ -1623,6 +1628,50 @@ export function useDeleteCompaniesMutation(baseOptions?: Apollo.MutationHookOpti
|
||||
export type DeleteCompaniesMutationHookResult = ReturnType<typeof useDeleteCompaniesMutation>;
|
||||
export type DeleteCompaniesMutationResult = Apollo.MutationResult<DeleteCompaniesMutation>;
|
||||
export type DeleteCompaniesMutationOptions = Apollo.BaseMutationOptions<DeleteCompaniesMutation, DeleteCompaniesMutationVariables>;
|
||||
export const GetPipelinesDocument = gql`
|
||||
query GetPipelines {
|
||||
findManyPipeline(skip: 1) {
|
||||
id
|
||||
name
|
||||
pipelineStages {
|
||||
name
|
||||
color
|
||||
pipelineProgresses {
|
||||
id
|
||||
associableType
|
||||
associableId
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetPipelinesQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetPipelinesQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetPipelinesQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
||||
*
|
||||
* @example
|
||||
* const { data, loading, error } = useGetPipelinesQuery({
|
||||
* variables: {
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetPipelinesQuery(baseOptions?: Apollo.QueryHookOptions<GetPipelinesQuery, GetPipelinesQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetPipelinesQuery, GetPipelinesQueryVariables>(GetPipelinesDocument, options);
|
||||
}
|
||||
export function useGetPipelinesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPipelinesQuery, GetPipelinesQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetPipelinesQuery, GetPipelinesQueryVariables>(GetPipelinesDocument, options);
|
||||
}
|
||||
export type GetPipelinesQueryHookResult = ReturnType<typeof useGetPipelinesQuery>;
|
||||
export type GetPipelinesLazyQueryHookResult = ReturnType<typeof useGetPipelinesLazyQuery>;
|
||||
export type GetPipelinesQueryResult = Apollo.QueryResult<GetPipelinesQuery, GetPipelinesQueryVariables>;
|
||||
export const GetPeopleDocument = gql`
|
||||
query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) {
|
||||
people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
|
||||
|
||||
Reference in New Issue
Block a user