Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/schema/opportunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2354,6 +2354,15 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<

break;
}
case OpportunityState.LIVE: {
if (!ctx.isTeamMember) {
throw new ConflictError('Invalid state transition');
}

await ctx.con.getRepository(OpportunityJob).update({ id }, { state });

break;
}
case OpportunityState.CLOSED:
if (opportunity.state !== OpportunityState.LIVE) {
throw new ConflictError(`This opportunity is not live`);
Expand Down
Loading