Skip to content

Commit

Permalink
update Action Item inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Jan 26, 2024
1 parent 7455a81 commit e3619b3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/resolvers/Mutation/createActionItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ export const createActionItem: MutationResolvers["createActionItem"] = async (
assignerId: context.userId,
actionItemCategoryId: args.actionItemCategoryId,
preCompletionNotes: args.data.preCompletionNotes,
postCompletionNotes: args.data.postCompletionNotes,
dueDate: args.data.dueDate,
completionDate: args.data.completionDate,
eventId: args.data.eventId,
creatorId: context.userId,
});
Expand Down
5 changes: 3 additions & 2 deletions src/resolvers/Mutation/updateActionItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type UpdateActionItemInputType = {
preCompletionNotes: string;
postCompletionNotes: string;
dueDate: Date;
completionDate: Date;
isCompleted: boolean;
};

Expand Down Expand Up @@ -167,7 +168,7 @@ export const updateActionItem: MutationResolvers["updateActionItem"] = async (
? actionItem.assignmentDate
: new Date();

const updatedAssignedBy = sameAssignedUser
const updatedAssigner = sameAssignedUser
? actionItem.assignerId
: context.userId;

Expand All @@ -178,7 +179,7 @@ export const updateActionItem: MutationResolvers["updateActionItem"] = async (
{
...(args.data as UpdateActionItemInputType),
assignmentDate: updatedAssignmentDate,
assignerId: updatedAssignedBy,
assignerId: updatedAssigner,
},
{
new: true,
Expand Down
5 changes: 1 addition & 4 deletions src/typeDefs/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ export const inputs = gql`
input CreateActionItemInput {
assigneeId: ID!
preCompletionNotes: String
postCompletionNotes: String
assignmentDate: Date
dueDate: Date
completionDate: Date
isCompleted: Boolean
eventId: ID
}
Expand Down Expand Up @@ -253,6 +249,7 @@ export const inputs = gql`
preCompletionNotes: String
postCompletionNotes: String
dueDate: Date
completionDate: Date
isCompleted: Boolean
}
Expand Down
5 changes: 1 addition & 4 deletions src/types/generatedGraphQLTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,8 @@ export type ConnectionPageInfo = {

export type CreateActionItemInput = {
assigneeId: Scalars['ID']['input'];
assignmentDate?: InputMaybe<Scalars['Date']['input']>;
completionDate?: InputMaybe<Scalars['Date']['input']>;
dueDate?: InputMaybe<Scalars['Date']['input']>;
eventId?: InputMaybe<Scalars['ID']['input']>;
isCompleted?: InputMaybe<Scalars['Boolean']['input']>;
postCompletionNotes?: InputMaybe<Scalars['String']['input']>;
preCompletionNotes?: InputMaybe<Scalars['String']['input']>;
};

Expand Down Expand Up @@ -1684,6 +1680,7 @@ export type UpdateActionItemCategoryInput = {

export type UpdateActionItemInput = {
assigneeId?: InputMaybe<Scalars['ID']['input']>;
completionDate?: InputMaybe<Scalars['Date']['input']>;
dueDate?: InputMaybe<Scalars['Date']['input']>;
isCompleted?: InputMaybe<Scalars['Boolean']['input']>;
postCompletionNotes?: InputMaybe<Scalars['String']['input']>;
Expand Down

0 comments on commit e3619b3

Please sign in to comment.