fix: issue delete notification message updated (#5373)
This commit is contained in:
parent
a36adae995
commit
d60e988ca1
2 changed files with 30 additions and 24 deletions
|
|
@ -28,7 +28,7 @@ export type TNotificationData = {
|
||||||
actor: string | undefined;
|
actor: string | undefined;
|
||||||
field: string | undefined;
|
field: string | undefined;
|
||||||
issue_comment: string | undefined;
|
issue_comment: string | undefined;
|
||||||
verb: "created" | "updated";
|
verb: "created" | "updated" | "deleted";
|
||||||
new_value: string | undefined;
|
new_value: string | undefined;
|
||||||
old_value: string | undefined;
|
old_value: string | undefined;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -104,29 +104,35 @@ export const NotificationItem: FC<TNotificationItem> = observer((props) => {
|
||||||
: notificationField === "None"
|
: notificationField === "None"
|
||||||
? null
|
? null
|
||||||
: replaceUnderscoreIfSnakeCase(notificationField)}{" "}
|
: replaceUnderscoreIfSnakeCase(notificationField)}{" "}
|
||||||
{!["comment", "archived_at", "None"].includes(notificationField) ? "to" : ""}
|
{notification?.data?.issue_activity.verb !== "deleted" && (
|
||||||
<span className="font-semibold">
|
<>
|
||||||
{" "}
|
{!["comment", "archived_at", "None"].includes(notificationField) ? "to" : ""}
|
||||||
{notificationField !== "None" ? (
|
<span className="font-semibold">
|
||||||
notificationField !== "comment" ? (
|
{" "}
|
||||||
notificationField === "target_date" ? (
|
{notificationField !== "None" ? (
|
||||||
renderFormattedDate(notification?.data?.issue_activity.new_value)
|
notificationField !== "comment" ? (
|
||||||
) : notificationField === "attachment" ? (
|
notificationField === "target_date" ? (
|
||||||
"the issue"
|
renderFormattedDate(notification?.data?.issue_activity.new_value)
|
||||||
) : notificationField === "description" ? (
|
) : notificationField === "attachment" ? (
|
||||||
stripAndTruncateHTML(notification?.data?.issue_activity.new_value || "", 55)
|
"the issue"
|
||||||
) : notificationField === "archived_at" ? null : (
|
) : notificationField === "description" ? (
|
||||||
notification?.data?.issue_activity.new_value
|
stripAndTruncateHTML(notification?.data?.issue_activity.new_value || "", 55)
|
||||||
)
|
) : notificationField === "archived_at" ? null : (
|
||||||
) : (
|
notification?.data?.issue_activity.new_value
|
||||||
<span>
|
)
|
||||||
{sanitizeCommentForNotification(notification?.data?.issue_activity.new_value ?? undefined)}
|
) : (
|
||||||
</span>
|
<span>
|
||||||
)
|
{sanitizeCommentForNotification(
|
||||||
) : (
|
notification?.data?.issue_activity.new_value ?? undefined
|
||||||
"the issue and assigned it to you."
|
)}
|
||||||
)}
|
</span>
|
||||||
</span>
|
)
|
||||||
|
) : (
|
||||||
|
"the issue and assigned it to you."
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<span className="semi-bold">{notification.message}</span>
|
<span className="semi-bold">{notification.message}</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue