Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
removed condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolezhanchik committed Aug 29, 2023
1 parent 8ef1af0 commit 42ac297
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions src/resolvers/mutations/privateCloud/editRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,23 @@ const privateCloudProjectEditRequest: MutationResolvers['privateCloudProjectEdit
},
secondaryTechnicalLead: args.secondaryTechnicalLead
? {
connectOrCreate: {
where: {
email: args.secondaryTechnicalLead.email,
},
create: args.secondaryTechnicalLead,
connectOrCreate: {
where: {
email: args.secondaryTechnicalLead.email,
},
}
create: args.secondaryTechnicalLead,
},
}
: undefined,
};


const isQuotaChanged = !(
JSON.stringify(args.productionQuota) ===
JSON.stringify(project.productionQuota) &&
JSON.stringify(project.productionQuota) &&
JSON.stringify(args.testQuota) === JSON.stringify(project.testQuota) &&
JSON.stringify(args.developmentQuota) ===
JSON.stringify(project.developmentQuota) &&
JSON.stringify(project.developmentQuota) &&
JSON.stringify(args.toolsQuota) === JSON.stringify(project.toolsQuota)
);

Expand Down Expand Up @@ -155,20 +155,11 @@ const privateCloudProjectEditRequest: MutationResolvers['privateCloudProjectEdit
},
});

const contactChanged = !(
editRequest.project.projectOwner.email === editRequest.requestedProject.projectOwner.email &&
editRequest.project.primaryTechnicalLead.email ===
editRequest.requestedProject.primaryTechnicalLead.email &&
editRequest.project.secondaryTechnicalLead?.email ===
editRequest.requestedProject.secondaryTechnicalLead?.email
);

if (isQuotaChanged||contactChanged) {
await sendEditRequestEmails(
editRequest.project,
editRequest.requestedProject
);
}
await sendEditRequestEmails(
editRequest.project,
editRequest.requestedProject
);


if (decisionStatus === DecisionStatus.Approved) {
const users = [
Expand Down

0 comments on commit 42ac297

Please sign in to comment.