From bed5f7608244d4d72371aa68bbcd2d830169b617 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:40:40 +0530 Subject: [PATCH] fix: no 'Create by me' label coming up (#1573) * feat: added new issue subscriber table * dev: notification model * feat: added CRUD operation for issue subscriber * Revert "feat: added CRUD operation for issue subscriber" This reverts commit b22e0625768f0b096b5898936ace76d6882b0736. * feat: added CRUD operation for issue subscriber * dev: notification models and operations * dev: remove delete endpoint response data * dev: notification endpoints and fix bg worker for saving notifications * feat: added list and unsubscribe function in issue subscriber * dev: filter by snoozed and response update for list and permissions * dev: update issue notifications * dev: notification segregation * dev: update notifications * dev: notification filtering * dev: add issue name in notifications * dev: notification new endpoints * fix: pushing local settings * feat: notification workflow setup and made basic UI * style: improved UX with toast alerts and other interactions refactor: changed classnames according to new theme structure, changed all icons to material icons * feat: showing un-read notification count * feat: not showing 'subscribe' button on issue created by user & assigned to user not showing 'Create by you' for view & guest of the workspace * fix: 'read' -> 'unread' heading, my issue wrong filter * feat: made snooze dropdown & modal feat: switched to calendar * fix: minor ui fixes * feat: snooze modal date/time select * fix: params for read/un-read notification * style: snooze notification modal * fix: no label for 'Create by me' * fix: no label for 'Create by me' * fix: removed console log * fix: tooltip going behind popover --------- Co-authored-by: NarayanBavisetti Co-authored-by: pablohashescobar Co-authored-by: Aaryan Khandelwal --- .../notifications/notification-card.tsx | 72 ++++++++++--------- .../notifications/notification-popover.tsx | 1 + apps/app/styles/globals.css | 4 ++ 3 files changed, 42 insertions(+), 35 deletions(-) diff --git a/apps/app/components/notifications/notification-card.tsx b/apps/app/components/notifications/notification-card.tsx index b28d1cce4..174c52a60 100644 --- a/apps/app/components/notifications/notification-card.tsx +++ b/apps/app/components/notifications/notification-card.tsx @@ -221,44 +221,46 @@ export const NotificationCard: React.FC = (props) => { ))} - { - e.stopPropagation(); - }} - customButton={ - - } - optionsClassName="!z-20" - > - {snoozeOptions.map((item) => ( - { - e.stopPropagation(); +
+ { + e.stopPropagation(); + }} + customButton={ + + } + optionsClassName="!z-20" + > + {snoozeOptions.map((item) => ( + { + e.stopPropagation(); - if (!item.value) { - setSelectedNotificationForSnooze(notification.id); - return; - } + if (!item.value) { + setSelectedNotificationForSnooze(notification.id); + return; + } - markSnoozeNotification(notification.id, item.value).then(() => { - setToastAlert({ - title: `Notification snoozed till ${renderLongDateFormat(item.value)}`, - type: "success", + markSnoozeNotification(notification.id, item.value).then(() => { + setToastAlert({ + title: `Notification snoozed till ${renderLongDateFormat(item.value)}`, + type: "success", + }); }); - }); - }} - > - {item.label} - - ))} - + }} + > + {item.label} + + ))} + +
diff --git a/apps/app/components/notifications/notification-popover.tsx b/apps/app/components/notifications/notification-popover.tsx index 5ab2220f5..cb7117707 100644 --- a/apps/app/components/notifications/notification-popover.tsx +++ b/apps/app/components/notifications/notification-popover.tsx @@ -205,6 +205,7 @@ export const NotificationPopover = () => { : "border-transparent text-custom-text-200" }`} > + {tab.label} {tab.unreadCount && tab.unreadCount > 0 ? (