From b0ab17021f54a6f17b7b27a6c56df95007d4cfc4 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Thu, 11 Apr 2024 20:26:23 +0530 Subject: [PATCH] [WEB-943] chore: inbox cancelled issue header action improvement (#4172) * chore: inbox cancelled issue header action improvement * chore: code refactor --- web/components/inbox/content/inbox-issue-header.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/components/inbox/content/inbox-issue-header.tsx b/web/components/inbox/content/inbox-issue-header.tsx index 931041400..f494c2b76 100644 --- a/web/components/inbox/content/inbox-issue-header.tsx +++ b/web/components/inbox/content/inbox-issue-header.tsx @@ -54,7 +54,7 @@ export const InboxIssueActionsHeader: FC = observer((p const canMarkAsAccepted = isAllowed && (inboxIssue?.status === 0 || inboxIssue?.status === -2); const canMarkAsDeclined = isAllowed && inboxIssue?.status === -2; const canDelete = isAllowed || inboxIssue?.created_by === currentUser?.id; - const isCompleted = inboxIssue?.status === 1; + const isAcceptedOrDeclined = inboxIssue?.status ? [-1, 1].includes(inboxIssue.status) : undefined; const currentInboxIssueId = inboxIssue?.issue?.id; @@ -220,7 +220,7 @@ export const InboxIssueActionsHeader: FC = observer((p )} - {isCompleted ? ( + {isAcceptedOrDeclined ? (