From 02451baaf263dd08d615b4685e1ccfaf4936784f Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Thu, 30 Nov 2023 12:52:29 +0200 Subject: [PATCH] feat: hide change actions when change request is scheduled (#5514) 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) Screenshot 2023-11-30 at 11 54 44 --------- Signed-off-by: andreas-unleash --- .../ChangeRequest/Changes/Change/ChangeActions.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ChangeActions.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ChangeActions.tsx index 1ac50a399c59..1a2dfba87122 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ChangeActions.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ChangeActions.tsx @@ -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;