feat(crm): add deal create/update controls with status and payment
This commit is contained in:
@@ -140,6 +140,16 @@ export type CreateCommunicationInput = {
|
||||
transcript?: InputMaybe<Array<Scalars['String']['input']>>;
|
||||
};
|
||||
|
||||
export type CreateDealInput = {
|
||||
amount?: InputMaybe<Scalars['Int']['input']>;
|
||||
contactId: Scalars['ID']['input'];
|
||||
nextStep?: InputMaybe<Scalars['String']['input']>;
|
||||
paidAmount?: InputMaybe<Scalars['Int']['input']>;
|
||||
stage?: InputMaybe<Scalars['String']['input']>;
|
||||
summary?: InputMaybe<Scalars['String']['input']>;
|
||||
title: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
export type CreateWorkspaceDocumentInput = {
|
||||
body?: InputMaybe<Scalars['String']['input']>;
|
||||
owner?: InputMaybe<Scalars['String']['input']>;
|
||||
@@ -155,6 +165,7 @@ export type Deal = {
|
||||
currentStepId: Scalars['String']['output'];
|
||||
id: Scalars['ID']['output'];
|
||||
nextStep: Scalars['String']['output'];
|
||||
paidAmount: Scalars['String']['output'];
|
||||
stage: Scalars['String']['output'];
|
||||
steps: Array<DealStep>;
|
||||
summary: Scalars['String']['output'];
|
||||
@@ -218,6 +229,7 @@ export type Mutation = {
|
||||
createCalendarEvent: CalendarEvent;
|
||||
createChatConversation: Conversation;
|
||||
createCommunication: MutationWithIdResult;
|
||||
createDeal: Deal;
|
||||
createWorkspaceDocument: WorkspaceDocument;
|
||||
deleteWorkspaceDocument: MutationWithIdResult;
|
||||
logPilotNote: MutationResult;
|
||||
@@ -231,6 +243,7 @@ export type Mutation = {
|
||||
setContactInboxHidden: MutationResult;
|
||||
toggleContactPin: PinToggleResult;
|
||||
updateCommunicationTranscript: MutationWithIdResult;
|
||||
updateDeal: Deal;
|
||||
updateFeedDecision: MutationWithIdResult;
|
||||
};
|
||||
|
||||
@@ -260,6 +273,11 @@ export type MutationcreateCommunicationArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationcreateDealArgs = {
|
||||
input: CreateDealInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationcreateWorkspaceDocumentArgs = {
|
||||
input: CreateWorkspaceDocumentInput;
|
||||
};
|
||||
@@ -320,6 +338,11 @@ export type MutationupdateCommunicationTranscriptArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationupdateDealArgs = {
|
||||
input: UpdateDealInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationupdateFeedDecisionArgs = {
|
||||
decision: Scalars['String']['input'];
|
||||
decisionNote?: InputMaybe<Scalars['String']['input']>;
|
||||
@@ -411,6 +434,13 @@ export type QuerygetClientTimelineArgs = {
|
||||
limit?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
export type UpdateDealInput = {
|
||||
amount?: InputMaybe<Scalars['Int']['input']>;
|
||||
id: Scalars['ID']['input'];
|
||||
paidAmount?: InputMaybe<Scalars['Int']['input']>;
|
||||
stage?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
export type WorkspaceDocument = {
|
||||
__typename?: 'WorkspaceDocument';
|
||||
body: Scalars['String']['output'];
|
||||
@@ -496,6 +526,13 @@ export type CreateCommunicationMutationMutationVariables = Exact<{
|
||||
|
||||
export type CreateCommunicationMutationMutation = { __typename?: 'Mutation', createCommunication: { __typename?: 'MutationWithIdResult', ok: boolean, id: string } };
|
||||
|
||||
export type CreateDealMutationMutationVariables = Exact<{
|
||||
input: CreateDealInput;
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateDealMutationMutation = { __typename?: 'Mutation', createDeal: { __typename?: 'Deal', id: string, contact: string, title: string, stage: string, amount: string, paidAmount: string, nextStep: string, summary: string, currentStepId: string, steps: Array<{ __typename?: 'DealStep', id: string, title: string, description: string, status: string, dueAt: string, order: number, completedAt: string }> } };
|
||||
|
||||
export type CreateWorkspaceDocumentMutationVariables = Exact<{
|
||||
input: CreateWorkspaceDocumentInput;
|
||||
}>;
|
||||
@@ -506,7 +543,7 @@ export type CreateWorkspaceDocumentMutation = { __typename?: 'Mutation', createW
|
||||
export type DealsQueryQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type DealsQueryQuery = { __typename?: 'Query', deals: Array<{ __typename?: 'Deal', id: string, contact: string, title: string, stage: string, amount: string, nextStep: string, summary: string, currentStepId: string, steps: Array<{ __typename?: 'DealStep', id: string, title: string, description: string, status: string, dueAt: string, order: number, completedAt: string }> }> };
|
||||
export type DealsQueryQuery = { __typename?: 'Query', deals: Array<{ __typename?: 'Deal', id: string, contact: string, title: string, stage: string, amount: string, paidAmount: string, nextStep: string, summary: string, currentStepId: string, steps: Array<{ __typename?: 'DealStep', id: string, title: string, description: string, status: string, dueAt: string, order: number, completedAt: string }> }> };
|
||||
|
||||
export type DeleteWorkspaceDocumentMutationVariables = Exact<{
|
||||
id: Scalars['ID']['input'];
|
||||
@@ -621,6 +658,13 @@ export type UpdateCommunicationTranscriptMutationMutationVariables = Exact<{
|
||||
|
||||
export type UpdateCommunicationTranscriptMutationMutation = { __typename?: 'Mutation', updateCommunicationTranscript: { __typename?: 'MutationWithIdResult', ok: boolean, id: string } };
|
||||
|
||||
export type UpdateDealMutationMutationVariables = Exact<{
|
||||
input: UpdateDealInput;
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateDealMutationMutation = { __typename?: 'Mutation', updateDeal: { __typename?: 'Deal', id: string, contact: string, title: string, stage: string, amount: string, paidAmount: string, nextStep: string, summary: string, currentStepId: string, steps: Array<{ __typename?: 'DealStep', id: string, title: string, description: string, status: string, dueAt: string, order: number, completedAt: string }> } };
|
||||
|
||||
export type UpdateFeedDecisionMutationMutationVariables = Exact<{
|
||||
id: Scalars['ID']['input'];
|
||||
decision: Scalars['String']['input'];
|
||||
@@ -1066,6 +1110,52 @@ export function useCreateCommunicationMutationMutation(options: VueApolloComposa
|
||||
return VueApolloComposable.useMutation<CreateCommunicationMutationMutation, CreateCommunicationMutationMutationVariables>(CreateCommunicationMutationDocument, options);
|
||||
}
|
||||
export type CreateCommunicationMutationMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<CreateCommunicationMutationMutation, CreateCommunicationMutationMutationVariables>;
|
||||
export const CreateDealMutationDocument = gql`
|
||||
mutation CreateDealMutation($input: CreateDealInput!) {
|
||||
createDeal(input: $input) {
|
||||
id
|
||||
contact
|
||||
title
|
||||
stage
|
||||
amount
|
||||
paidAmount
|
||||
nextStep
|
||||
summary
|
||||
currentStepId
|
||||
steps {
|
||||
id
|
||||
title
|
||||
description
|
||||
status
|
||||
dueAt
|
||||
order
|
||||
completedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useCreateDealMutationMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useCreateDealMutationMutation` within a Vue component and pass it any options that fit your needs.
|
||||
* When your component renders, `useCreateDealMutationMutation` returns an object that includes:
|
||||
* - A mutate function that you can call at any time to execute the mutation
|
||||
* - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return
|
||||
*
|
||||
* @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options;
|
||||
*
|
||||
* @example
|
||||
* const { mutate, loading, error, onDone } = useCreateDealMutationMutation({
|
||||
* variables: {
|
||||
* input: // value for 'input'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useCreateDealMutationMutation(options: VueApolloComposable.UseMutationOptions<CreateDealMutationMutation, CreateDealMutationMutationVariables> | ReactiveFunction<VueApolloComposable.UseMutationOptions<CreateDealMutationMutation, CreateDealMutationMutationVariables>> = {}) {
|
||||
return VueApolloComposable.useMutation<CreateDealMutationMutation, CreateDealMutationMutationVariables>(CreateDealMutationDocument, options);
|
||||
}
|
||||
export type CreateDealMutationMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<CreateDealMutationMutation, CreateDealMutationMutationVariables>;
|
||||
export const CreateWorkspaceDocumentDocument = gql`
|
||||
mutation CreateWorkspaceDocument($input: CreateWorkspaceDocumentInput!) {
|
||||
createWorkspaceDocument(input: $input) {
|
||||
@@ -1110,6 +1200,7 @@ export const DealsQueryDocument = gql`
|
||||
title
|
||||
stage
|
||||
amount
|
||||
paidAmount
|
||||
nextStep
|
||||
summary
|
||||
currentStepId
|
||||
@@ -1720,6 +1811,52 @@ export function useUpdateCommunicationTranscriptMutationMutation(options: VueApo
|
||||
return VueApolloComposable.useMutation<UpdateCommunicationTranscriptMutationMutation, UpdateCommunicationTranscriptMutationMutationVariables>(UpdateCommunicationTranscriptMutationDocument, options);
|
||||
}
|
||||
export type UpdateCommunicationTranscriptMutationMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<UpdateCommunicationTranscriptMutationMutation, UpdateCommunicationTranscriptMutationMutationVariables>;
|
||||
export const UpdateDealMutationDocument = gql`
|
||||
mutation UpdateDealMutation($input: UpdateDealInput!) {
|
||||
updateDeal(input: $input) {
|
||||
id
|
||||
contact
|
||||
title
|
||||
stage
|
||||
amount
|
||||
paidAmount
|
||||
nextStep
|
||||
summary
|
||||
currentStepId
|
||||
steps {
|
||||
id
|
||||
title
|
||||
description
|
||||
status
|
||||
dueAt
|
||||
order
|
||||
completedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useUpdateDealMutationMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useUpdateDealMutationMutation` within a Vue component and pass it any options that fit your needs.
|
||||
* When your component renders, `useUpdateDealMutationMutation` returns an object that includes:
|
||||
* - A mutate function that you can call at any time to execute the mutation
|
||||
* - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return
|
||||
*
|
||||
* @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options;
|
||||
*
|
||||
* @example
|
||||
* const { mutate, loading, error, onDone } = useUpdateDealMutationMutation({
|
||||
* variables: {
|
||||
* input: // value for 'input'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useUpdateDealMutationMutation(options: VueApolloComposable.UseMutationOptions<UpdateDealMutationMutation, UpdateDealMutationMutationVariables> | ReactiveFunction<VueApolloComposable.UseMutationOptions<UpdateDealMutationMutation, UpdateDealMutationMutationVariables>> = {}) {
|
||||
return VueApolloComposable.useMutation<UpdateDealMutationMutation, UpdateDealMutationMutationVariables>(UpdateDealMutationDocument, options);
|
||||
}
|
||||
export type UpdateDealMutationMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<UpdateDealMutationMutation, UpdateDealMutationMutationVariables>;
|
||||
export const UpdateFeedDecisionMutationDocument = gql`
|
||||
mutation UpdateFeedDecisionMutation($id: ID!, $decision: String!, $decisionNote: String) {
|
||||
updateFeedDecision(id: $id, decision: $decision, decisionNote: $decisionNote) {
|
||||
|
||||
22
frontend/graphql/operations/create-deal.graphql
Normal file
22
frontend/graphql/operations/create-deal.graphql
Normal file
@@ -0,0 +1,22 @@
|
||||
mutation CreateDealMutation($input: CreateDealInput!) {
|
||||
createDeal(input: $input) {
|
||||
id
|
||||
contact
|
||||
title
|
||||
stage
|
||||
amount
|
||||
paidAmount
|
||||
nextStep
|
||||
summary
|
||||
currentStepId
|
||||
steps {
|
||||
id
|
||||
title
|
||||
description
|
||||
status
|
||||
dueAt
|
||||
order
|
||||
completedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ query DealsQuery {
|
||||
title
|
||||
stage
|
||||
amount
|
||||
paidAmount
|
||||
nextStep
|
||||
summary
|
||||
currentStepId
|
||||
|
||||
22
frontend/graphql/operations/update-deal.graphql
Normal file
22
frontend/graphql/operations/update-deal.graphql
Normal file
@@ -0,0 +1,22 @@
|
||||
mutation UpdateDealMutation($input: UpdateDealInput!) {
|
||||
updateDeal(input: $input) {
|
||||
id
|
||||
contact
|
||||
title
|
||||
stage
|
||||
amount
|
||||
paidAmount
|
||||
nextStep
|
||||
summary
|
||||
currentStepId
|
||||
steps {
|
||||
id
|
||||
title
|
||||
description
|
||||
status
|
||||
dueAt
|
||||
order
|
||||
completedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,8 @@ type Mutation {
|
||||
createCalendarEvent(input: CreateCalendarEventInput!): CalendarEvent!
|
||||
archiveCalendarEvent(input: ArchiveCalendarEventInput!): CalendarEvent!
|
||||
createCommunication(input: CreateCommunicationInput!): MutationWithIdResult!
|
||||
createDeal(input: CreateDealInput!): Deal!
|
||||
updateDeal(input: UpdateDealInput!): Deal!
|
||||
createWorkspaceDocument(input: CreateWorkspaceDocumentInput!): WorkspaceDocument!
|
||||
deleteWorkspaceDocument(id: ID!): MutationWithIdResult!
|
||||
updateCommunicationTranscript(id: ID!, transcript: [String!]!): MutationWithIdResult!
|
||||
@@ -90,6 +92,23 @@ input CreateWorkspaceDocumentInput {
|
||||
body: String
|
||||
}
|
||||
|
||||
input CreateDealInput {
|
||||
contactId: ID!
|
||||
title: String!
|
||||
stage: String
|
||||
amount: Int
|
||||
paidAmount: Int
|
||||
nextStep: String
|
||||
summary: String
|
||||
}
|
||||
|
||||
input UpdateDealInput {
|
||||
id: ID!
|
||||
stage: String
|
||||
amount: Int
|
||||
paidAmount: Int
|
||||
}
|
||||
|
||||
type MePayload {
|
||||
user: MeUser!
|
||||
team: MeTeam!
|
||||
@@ -228,6 +247,7 @@ type Deal {
|
||||
title: String!
|
||||
stage: String!
|
||||
amount: String!
|
||||
paidAmount: String!
|
||||
nextStep: String!
|
||||
summary: String!
|
||||
currentStepId: String!
|
||||
|
||||
Reference in New Issue
Block a user