Skip to content

Commit

Permalink
Show optons just for new project (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
oddsve authored May 13, 2024
1 parent 8a3f1ba commit e320966
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/Staffing/AddEngagementForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export function AddEngagementForm({
}

function handleSelectedEngagementChange(newValue: SelectOption) {
console.log(projectOptions);
console.log(newValue);
if (!projectOptions.map((o) => o.label).includes(newValue.label)) {
setIsNewProject(false);
let isNew = !projectOptions.map((o) => o.label).includes(newValue.label);
if (isNew) {
setIsNewProject(true);
}
setSelectedEngagement(newValue);
Expand Down Expand Up @@ -173,7 +173,7 @@ export function AddEngagementForm({
isMultipleOptions={false}
placeHolderText="Velg engasjement"
isDisabled={selectedCustomer == null}
isCreatable={true}
isCreatable={!isAbsence}
/>
</div>
</div>
Expand Down

0 comments on commit e320966

Please sign in to comment.