Skip to content

Commit

Permalink
Only show Ready status option to admins, when disabling status field …
Browse files Browse the repository at this point in the history
…consider only initialThesis state
  • Loading branch information
AleksTeresh committed Dec 12, 2024
1 parent 8ef168e commit 64cc882
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/client/components/ThesisPage/ThesisEditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ const ThesisEditForm: FC<{
data-testid="status-select-input"
required
disabled={
editedThesis.status === 'PLANNING' &&
initialThesis.status === 'PLANNING' &&
!user.isAdmin &&
!user.approvableProgramIds?.includes(editedThesis.programId)
}
Expand All @@ -429,9 +429,11 @@ const ThesisEditForm: FC<{
<MenuItem value="IN_PROGRESS">
{t(StatusLocale.IN_PROGRESS)}
</MenuItem>
<MenuItem value="COMPLETED">
{t(StatusLocale.COMPLETED)}
</MenuItem>
{user.isAdmin && (
<MenuItem value="COMPLETED">
{t(StatusLocale.COMPLETED)}
</MenuItem>
)}
<MenuItem value="CANCELLED">
{t(StatusLocale.CANCELLED)}
</MenuItem>
Expand Down

0 comments on commit 64cc882

Please sign in to comment.