diff --git a/apps/app/components/inbox/delete-issue-modal.tsx b/apps/app/components/inbox/delete-issue-modal.tsx index 46ba1ebdd..c6f5320a2 100644 --- a/apps/app/components/inbox/delete-issue-modal.tsx +++ b/apps/app/components/inbox/delete-issue-modal.tsx @@ -130,7 +130,8 @@ export const DeleteIssueModal: React.FC = ({ isOpen, handleClose, data }) {data?.project_detail?.identifier}-{data?.sequence_id} - {""}? This action cannot be undone. + {""}? The issue will only be deleted from the inbox and this action cannot be + undone.

diff --git a/apps/app/components/inbox/inbox-action-headers.tsx b/apps/app/components/inbox/inbox-action-headers.tsx index 8be550d98..5ceaa8f2c 100644 --- a/apps/app/components/inbox/inbox-action-headers.tsx +++ b/apps/app/components/inbox/inbox-action-headers.tsx @@ -76,6 +76,11 @@ export const InboxActionHeader: React.FC = (props) => { const issueStatus = issue?.issue_inbox[0].status; const isAllowed = memberRole.isMember || memberRole.isOwner; + const today = new Date(); + const tomorrow = new Date(today); + + tomorrow.setDate(today.getDate() + 1); + return (
@@ -142,12 +147,20 @@ export const InboxActionHeader: React.FC = (props) => {
{isAllowed && ( -
+
- + @@ -165,6 +178,7 @@ export const InboxActionHeader: React.FC = (props) => { setDate(val); }} dateFormat="dd-MM-yyyy" + minDate={tomorrow} inline /> = (props) => { )} +
+ )} + {isAllowed && ( +
= (props) => {
{issue.issue_inbox[0].snoozed_till && ( -
+
Snoozed till {renderShortNumericDateFormat(issue.issue_inbox[0].snoozed_till)} diff --git a/apps/app/components/inbox/inbox-main-content.tsx b/apps/app/components/inbox/inbox-main-content.tsx index 1bf330e5e..83948495c 100644 --- a/apps/app/components/inbox/inbox-main-content.tsx +++ b/apps/app/components/inbox/inbox-main-content.tsx @@ -36,7 +36,7 @@ import { renderShortNumericDateFormat } from "helpers/date-time.helper"; // types import type { IInboxIssue, IIssue } from "types"; // fetch-keys -import { INBOX_ISSUES, INBOX_ISSUE_DETAILS } from "constants/fetch-keys"; +import { INBOX_ISSUES, INBOX_ISSUE_DETAILS, PROJECT_ISSUES_ACTIVITY } from "constants/fetch-keys"; const defaultValues = { name: "", @@ -129,6 +129,7 @@ export const InboxMainContent: React.FC = () => { .then(() => { mutateIssueDetails(); mutate(INBOX_ISSUES(inboxId.toString(), params)); + mutate(PROJECT_ISSUES_ACTIVITY(issueDetails.id)); }); }, [ @@ -157,7 +158,9 @@ export const InboxMainContent: React.FC = () => { : issueStatus === -1 ? "text-red-500 border-red-500 bg-red-500/10" : issueStatus === 0 - ? "text-blue-500 border-blue-500 bg-blue-500/10" + ? new Date(issueDetails.issue_inbox[0].snoozed_till ?? "") < new Date() + ? "text-red-500 border-red-500 bg-red-500/10" + : "text-blue-500 border-blue-500 bg-blue-500/10" : issueStatus === 1 ? "text-green-500 border-green-500 bg-green-500/10" : issueStatus === 2 @@ -178,10 +181,19 @@ export const InboxMainContent: React.FC = () => { ) : issueStatus === 0 ? ( <> -

- This issue has been snoozed till{" "} - {renderShortNumericDateFormat(issueDetails.issue_inbox[0].snoozed_till ?? "")}. -

+ {new Date(issueDetails.issue_inbox[0].snoozed_till ?? "") < new Date() ? ( +

+ This issue was snoozed till{" "} + {renderShortNumericDateFormat(issueDetails.issue_inbox[0].snoozed_till ?? "")} + . +

+ ) : ( +

+ This issue has been snoozed till{" "} + {renderShortNumericDateFormat(issueDetails.issue_inbox[0].snoozed_till ?? "")} + . +

+ )} ) : issueStatus === 1 ? ( <> diff --git a/apps/app/components/inbox/select-duplicate.tsx b/apps/app/components/inbox/select-duplicate.tsx index fdf7034df..74409a57f 100644 --- a/apps/app/components/inbox/select-duplicate.tsx +++ b/apps/app/components/inbox/select-duplicate.tsx @@ -76,7 +76,7 @@ export const SelectDuplicateInboxIssueModal: React.FC = (props) => { return ( setQuery("")} appear> -
+
= ({ {issueDetail?.project_detail?.identifier}-{issueDetail?.sequence_id}
- + {(fieldsToShow.includes("all") || fieldsToShow.includes("link")) && ( + + )} {!isNotAllowed && (fieldsToShow.includes("all") || fieldsToShow.includes("delete")) && (