From ded7a4f3ddb9fa1d46d1267ab7b11c8034435e7f Mon Sep 17 00:00:00 2001 From: vamsi krishna Date: Thu, 5 Dec 2024 21:54:39 +0530 Subject: [PATCH 1/5] modified notification store --- .../sidebar/notification-card/options/snooze/modal.tsx | 2 +- web/core/store/notifications/workspace-notifications.store.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/modal.tsx b/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/modal.tsx index 1ca19a5ef59..36302aa5f0c 100644 --- a/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/modal.tsx +++ b/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/modal.tsx @@ -17,7 +17,7 @@ import { getDate } from "@/helpers/date-time.helper"; type TNotificationSnoozeModal = { isOpen: boolean; onClose: () => void; - onSubmit: (dateTime?: Date | undefined) => Promise; + onSubmit: (dateTime?: Date | undefined) => Promise; }; type FormValues = { diff --git a/web/core/store/notifications/workspace-notifications.store.ts b/web/core/store/notifications/workspace-notifications.store.ts index 59f0dbc0332..bcc4228d6a5 100644 --- a/web/core/store/notifications/workspace-notifications.store.ts +++ b/web/core/store/notifications/workspace-notifications.store.ts @@ -84,7 +84,7 @@ export class WorkspaceNotificationStore implements IWorkspaceNotificationStore { read: false, }; - constructor(private store: CoreRootStore) { + constructor(protected store: CoreRootStore) { makeObservable(this, { // observables loader: observable.ref, From c3c5d654f59a0e9d286f2422eb0eed4fb758ab86 Mon Sep 17 00:00:00 2001 From: vamsi krishna Date: Thu, 5 Dec 2024 23:21:24 +0530 Subject: [PATCH 2/5] notification snooze types fix --- .../sidebar/notification-card/options/snooze/root.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx b/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx index 003175500c8..7911ac99bff 100644 --- a/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx +++ b/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx @@ -34,25 +34,23 @@ export const NotificationItemSnoozeOption: FC = o const handleNotificationSnoozeDate = async (snoozeTill: Date | undefined) => { if (snoozeTill) { try { - const response = await snoozeNotification(workspaceSlug, snoozeTill); + snoozeNotification(workspaceSlug, snoozeTill); setToast({ title: "Success!", message: "Notification snoozed successfully", type: TOAST_TYPE.SUCCESS, }); - return response; } catch (e) { console.error(e); } } else { try { - const response = await unSnoozeNotification(workspaceSlug); + await unSnoozeNotification(workspaceSlug); setToast({ title: "Success!", message: "Notification un snoozed successfully", type: TOAST_TYPE.SUCCESS, }); - return response; } catch (e) { console.error(e); } From bc1361ea8eeca77275a14d28bf476cc5f904ad88 Mon Sep 17 00:00:00 2001 From: vamsi krishna Date: Thu, 5 Dec 2024 23:42:54 +0530 Subject: [PATCH 3/5] handled promise --- .../sidebar/notification-card/options/snooze/root.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx b/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx index 7911ac99bff..86e22049cc1 100644 --- a/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx +++ b/web/core/components/workspace-notifications/sidebar/notification-card/options/snooze/root.tsx @@ -34,7 +34,7 @@ export const NotificationItemSnoozeOption: FC = o const handleNotificationSnoozeDate = async (snoozeTill: Date | undefined) => { if (snoozeTill) { try { - snoozeNotification(workspaceSlug, snoozeTill); + await snoozeNotification(workspaceSlug, snoozeTill); setToast({ title: "Success!", message: "Notification snoozed successfully", From 11c59379217cff56d07572d3b00faebc4daefb99 Mon Sep 17 00:00:00 2001 From: vamsi krishna Date: Fri, 6 Dec 2024 13:26:42 +0530 Subject: [PATCH 4/5] modified notifications layout --- web/app/[workspaceSlug]/(projects)/notifications/layout.tsx | 4 ++-- web/ce/components/workspace-notifications/root.tsx | 4 ++-- web/ee/components/workspace-notifications/index.ts | 1 + web/ee/components/workspace-notifications/root.tsx | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 web/ee/components/workspace-notifications/index.ts delete mode 100644 web/ee/components/workspace-notifications/root.tsx diff --git a/web/app/[workspaceSlug]/(projects)/notifications/layout.tsx b/web/app/[workspaceSlug]/(projects)/notifications/layout.tsx index b69da040a07..7d71948d838 100644 --- a/web/app/[workspaceSlug]/(projects)/notifications/layout.tsx +++ b/web/app/[workspaceSlug]/(projects)/notifications/layout.tsx @@ -1,12 +1,12 @@ "use client"; // components -import { NotificationsSidebar } from "@/plane-web/components/workspace-notifications"; +import { NotificationsSidebarRoot } from "@/plane-web/components/workspace-notifications"; export default function ProjectInboxIssuesLayout({ children }: { children: React.ReactNode }) { return (
- +
{children}
); diff --git a/web/ce/components/workspace-notifications/root.tsx b/web/ce/components/workspace-notifications/root.tsx index 97083d8cb15..35c61263df0 100644 --- a/web/ce/components/workspace-notifications/root.tsx +++ b/web/ce/components/workspace-notifications/root.tsx @@ -21,7 +21,7 @@ import { getNumberCount } from "@/helpers/string.helper"; // hooks import { useWorkspace, useWorkspaceNotifications } from "@/hooks/store"; -export const NotificationsSidebar: FC = observer(() => { +export const NotificationsSidebarRoot: FC = observer(() => { const { workspaceSlug } = useParams(); // hooks const { getWorkspaceBySlug } = useWorkspace(); @@ -65,7 +65,7 @@ export const NotificationsSidebar: FC = observer(() => {
handleTabClick(tab.value)} + onClick={() => handleTabClick(tab.value)} >
Date: Fri, 6 Dec 2024 16:11:55 +0530 Subject: [PATCH 5/5] incresed pagination count for notifications --- web/core/store/notifications/workspace-notifications.store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/store/notifications/workspace-notifications.store.ts b/web/core/store/notifications/workspace-notifications.store.ts index bcc4228d6a5..b3ba8820353 100644 --- a/web/core/store/notifications/workspace-notifications.store.ts +++ b/web/core/store/notifications/workspace-notifications.store.ts @@ -62,7 +62,7 @@ export interface IWorkspaceNotificationStore { export class WorkspaceNotificationStore implements IWorkspaceNotificationStore { // constants - paginatedCount = 30; + paginatedCount = 300; // observables loader: TNotificationLoader = undefined; unreadNotificationsCount: TUnreadNotificationsCount = {