Skip to content

Commit

Permalink
Disable lost or closed projects (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigridge committed Aug 26, 2024
1 parent 82ab89d commit 16562c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/components/Staffing/AddEngagementForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,18 @@ export function AddEngagementForm({
return sum;
}

const isLostOrClosed =
project.bookingType === EngagementState.Closed ||
project.bookingType === EngagementState.Lost;

return [
...sum,
{
value: `${project.engagementId}`,
label: `${project.engagementName}`,
disabled: disabledProjectIds.includes(project.engagementId),
disabled:
disabledProjectIds.includes(project.engagementId) ||
isLostOrClosed,
},
];
},
Expand Down

0 comments on commit 16562c1

Please sign in to comment.