1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-31 13:47:02 +02:00

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)
<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 <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2023-11-30 12:52:29 +02:00 committed by GitHub
parent feae69643c
commit 02451baaf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;