From 00e07443b030cabad740437971b88ca6ccf8f1db Mon Sep 17 00:00:00 2001 From: rahulramesha <71900764+rahulramesha@users.noreply.github.com> Date: Mon, 29 Jan 2024 17:26:48 +0530 Subject: [PATCH] fix: Add missing project and subscriber filters to the list of filter params (#3497) * add missing project and subscriber filters to the list of filter params * add toast message on successfully marking all notifications as read --- web/components/notifications/notification-header.tsx | 1 + web/constants/issue.ts | 12 +++++++++++- web/hooks/use-user-notifications.tsx | 7 +++++++ web/store/issue/helpers/issue-filter-helper.store.ts | 2 ++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/web/components/notifications/notification-header.tsx b/web/components/notifications/notification-header.tsx index dc92dc9d5..39bf0e8fb 100644 --- a/web/components/notifications/notification-header.tsx +++ b/web/components/notifications/notification-header.tsx @@ -95,6 +95,7 @@ export const NotificationHeader: React.FC = (props) => } + closeOnSelect >
diff --git a/web/constants/issue.ts b/web/constants/issue.ts index f351b25f1..378123f3a 100644 --- a/web/constants/issue.ts +++ b/web/constants/issue.ts @@ -304,7 +304,17 @@ export const ISSUE_DISPLAY_FILTERS_BY_LAYOUT: { }, my_issues: { spreadsheet: { - filters: ["priority", "state_group", "labels", "assignees", "created_by", "project", "start_date", "target_date"], + filters: [ + "priority", + "state_group", + "labels", + "assignees", + "created_by", + "subscriber", + "project", + "start_date", + "target_date", + ], display_properties: true, display_filters: { type: [null, "active", "backlog"], diff --git a/web/hooks/use-user-notifications.tsx b/web/hooks/use-user-notifications.tsx index e8a0c1d34..17a2c63dc 100644 --- a/web/hooks/use-user-notifications.tsx +++ b/web/hooks/use-user-notifications.tsx @@ -264,6 +264,13 @@ const useUserNotification = () => { await userNotificationServices .markAllNotificationsAsRead(workspaceSlug.toString(), markAsReadParams) + .then(() => { + setToastAlert({ + type: "success", + title: "Success!", + message: "All Notifications marked as read.", + }); + }) .catch(() => { setToastAlert({ type: "error", diff --git a/web/store/issue/helpers/issue-filter-helper.store.ts b/web/store/issue/helpers/issue-filter-helper.store.ts index f3a4456fb..ac89c5018 100644 --- a/web/store/issue/helpers/issue-filter-helper.store.ts +++ b/web/store/issue/helpers/issue-filter-helper.store.ts @@ -76,6 +76,8 @@ export class IssueFilterHelperStore implements IIssueFilterHelperStore { labels: filters?.labels || undefined, start_date: filters?.start_date || undefined, target_date: filters?.target_date || undefined, + project: filters.project || undefined, + subscriber: filters.subscriber || undefined, // display filters type: displayFilters?.type || undefined, sub_issue: displayFilters?.sub_issue ?? true,