Skip to content

Commit

Permalink
feat: hide change actions when change request is scheduled (#5514)
Browse files Browse the repository at this point in the history
Added 'Scheduled' state to the check for non-pending change requests

Closes #
[1-1680](https://linear.app/unleash/issue/1-1680/remove-edit-change-ui-when-cr-is-scheduled)
<img width="868" alt="Screenshot 2023-11-30 at 11 54 44"
src="https://github.com/Unleash/unleash/assets/104830839/8e6afec5-1353-4030-b49b-4a8f3eaee5f6">

---------

Signed-off-by: andreas-unleash <[email protected]>
  • Loading branch information
andreas-unleash authored Nov 30, 2023
1 parent feae696 commit 02451ba
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const useShowActions = (changeRequest: IChangeRequest, change: IChange) => {
const allowChangeRequestActions = isChangeRequestConfigured(
changeRequest.environment,
);
const isPending = !['Cancelled', 'Applied'].includes(changeRequest.state);

const isPending = !['Cancelled', 'Applied', 'Scheduled'].includes(
changeRequest.state,
);

const { user } = useAuthUser();
const isAuthor = user?.id === changeRequest.createdBy.id;
Expand Down

0 comments on commit 02451ba

Please sign in to comment.