diff --git a/packages/types/src/workspace-notifications.d.ts b/packages/types/src/workspace-notifications.d.ts index 2b32a45cbfd..7d960015b9b 100644 --- a/packages/types/src/workspace-notifications.d.ts +++ b/packages/types/src/workspace-notifications.d.ts @@ -28,7 +28,7 @@ export type TNotificationData = { actor: string | undefined; field: string | undefined; issue_comment: string | undefined; - verb: "created" | "updated"; + verb: "created" | "updated" | "deleted"; new_value: string | undefined; old_value: string | undefined; }; diff --git a/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx b/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx index cd0a0d888b6..72af9c4e4fb 100644 --- a/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx +++ b/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx @@ -104,29 +104,35 @@ export const NotificationItem: FC = observer((props) => { : notificationField === "None" ? null : replaceUnderscoreIfSnakeCase(notificationField)}{" "} - {!["comment", "archived_at", "None"].includes(notificationField) ? "to" : ""} - - {" "} - {notificationField !== "None" ? ( - notificationField !== "comment" ? ( - notificationField === "target_date" ? ( - renderFormattedDate(notification?.data?.issue_activity.new_value) - ) : notificationField === "attachment" ? ( - "the issue" - ) : notificationField === "description" ? ( - stripAndTruncateHTML(notification?.data?.issue_activity.new_value || "", 55) - ) : notificationField === "archived_at" ? null : ( - notification?.data?.issue_activity.new_value - ) - ) : ( - - {sanitizeCommentForNotification(notification?.data?.issue_activity.new_value ?? undefined)} - - ) - ) : ( - "the issue and assigned it to you." - )} - + {notification?.data?.issue_activity.verb !== "deleted" && ( + <> + {!["comment", "archived_at", "None"].includes(notificationField) ? "to" : ""} + + {" "} + {notificationField !== "None" ? ( + notificationField !== "comment" ? ( + notificationField === "target_date" ? ( + renderFormattedDate(notification?.data?.issue_activity.new_value) + ) : notificationField === "attachment" ? ( + "the issue" + ) : notificationField === "description" ? ( + stripAndTruncateHTML(notification?.data?.issue_activity.new_value || "", 55) + ) : notificationField === "archived_at" ? null : ( + notification?.data?.issue_activity.new_value + ) + ) : ( + + {sanitizeCommentForNotification( + notification?.data?.issue_activity.new_value ?? undefined + )} + + ) + ) : ( + "the issue and assigned it to you." + )} + + + )} ) : ( {notification.message}