[WEB-2133] fix : Remove inbox delete option for members (#5395)

* remove inbox delete option for members

* change inbox issue delete condition slightly
This commit is contained in:
rahulramesha
2024-08-21 16:50:03 +05:30
committed by GitHub
parent 881d0525cc
commit 696b1340c5

View File

@@ -83,7 +83,10 @@ export const InboxIssueActionsHeader: FC<TInboxIssueActionsHeader> = observer((p
const canMarkAsDuplicate = isAllowed && (inboxIssue?.status === 0 || inboxIssue?.status === -2);
const canMarkAsAccepted = isAllowed && (inboxIssue?.status === 0 || inboxIssue?.status === -2);
const canMarkAsDeclined = isAllowed && (inboxIssue?.status === 0 || inboxIssue?.status === -2);
const canDelete = isAllowed || inboxIssue?.created_by === currentUser?.id;
// can delete only if admin or is creator of the issue
const canDelete =
(!!currentProjectRole && currentProjectRole >= EUserProjectRoles.ADMIN) ||
inboxIssue?.created_by === currentUser?.id;
const isAcceptedOrDeclined = inboxIssue?.status ? [-1, 1, 2].includes(inboxIssue.status) : undefined;
// days left for snooze
const numberOfDaysLeft = findHowManyDaysLeft(inboxIssue?.snoozed_till);