From 5d894b6d43551ad40572c604ba5b55ffdc328797 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Wed, 4 Sep 2024 19:57:32 +0400 Subject: [PATCH] fix(ui): info notification when secret change is pending review --- .../components/CreateSecretForm/CreateSecretForm.tsx | 3 ++- .../components/SecretListView/SecretListView.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/SecretMainPage/components/CreateSecretForm/CreateSecretForm.tsx b/frontend/src/views/SecretMainPage/components/CreateSecretForm/CreateSecretForm.tsx index c095ce47b..1354034a8 100644 --- a/frontend/src/views/SecretMainPage/components/CreateSecretForm/CreateSecretForm.tsx +++ b/frontend/src/views/SecretMainPage/components/CreateSecretForm/CreateSecretForm.tsx @@ -61,8 +61,9 @@ export const CreateSecretForm = ({ }); closePopUp(PopUpNames.CreateSecretForm); reset(); + createNotification({ - type: "success", + type: isProtectedBranch ? "info" : "success", text: isProtectedBranch ? "Requested changes have been sent for review" : "Successfully created secret" diff --git a/frontend/src/views/SecretMainPage/components/SecretListView/SecretListView.tsx b/frontend/src/views/SecretMainPage/components/SecretListView/SecretListView.tsx index 0e58be0c3..8bf699b0d 100644 --- a/frontend/src/views/SecretMainPage/components/SecretListView/SecretListView.tsx +++ b/frontend/src/views/SecretMainPage/components/SecretListView/SecretListView.tsx @@ -270,7 +270,7 @@ export const SecretListView = ({ queryClient.invalidateQueries(secretApprovalRequestKeys.count({ workspaceId })); handlePopUpClose("secretDetail"); createNotification({ - type: "success", + type: isProtectedBranch ? "info" : "success", text: isProtectedBranch ? "Requested changes have been sent for review" : "Successfully saved secrets" @@ -304,7 +304,7 @@ export const SecretListView = ({ handlePopUpClose("deleteSecret"); handlePopUpClose("secretDetail"); createNotification({ - type: "success", + type: isProtectedBranch ? "info" : "success", text: isProtectedBranch ? "Requested changes have been sent for review" : "Successfully deleted secret"