@burdenoff/microfe-notification 2026.518.2 → 2026.521.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdminNotificationRoutes.d.ts.map +1 -1
- package/dist/AdminNotificationRoutes.js +50 -46
- package/dist/AdminNotificationRoutes.js.map +1 -1
- package/dist/UserNotificationRoutes.d.ts.map +1 -1
- package/dist/UserNotificationRoutes.js +28 -24
- package/dist/UserNotificationRoutes.js.map +1 -1
- package/dist/components/FeatureDisabledPage.d.ts +7 -0
- package/dist/components/FeatureDisabledPage.d.ts.map +1 -0
- package/dist/components/FeatureDisabledPage.js +32 -0
- package/dist/components/FeatureDisabledPage.js.map +1 -0
- package/dist/components/NotificationBell.d.ts.map +1 -1
- package/dist/components/NotificationBell.js +43 -22
- package/dist/components/NotificationBell.js.map +1 -1
- package/dist/components/NotificationCard.d.ts +2 -1
- package/dist/components/NotificationCard.d.ts.map +1 -1
- package/dist/components/NotificationCard.js +64 -63
- package/dist/components/NotificationCard.js.map +1 -1
- package/dist/components/NotificationPanel.d.ts.map +1 -1
- package/dist/components/NotificationPanel.js +2 -1
- package/dist/components/NotificationPanel.js.map +1 -1
- package/dist/graphql/global-client.js +1 -1
- package/dist/graphql/global-client.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useNotificationAdmin.d.ts.map +1 -1
- package/dist/hooks/useNotificationAdmin.js +67 -64
- package/dist/hooks/useNotificationAdmin.js.map +1 -1
- package/dist/hooks/useNotificationAnalytics.d.ts +67 -0
- package/dist/hooks/useNotificationAnalytics.d.ts.map +1 -0
- package/dist/hooks/useNotificationAnalytics.js +64 -0
- package/dist/hooks/useNotificationAnalytics.js.map +1 -0
- package/dist/hooks/useNotificationPreferences.js +1 -1
- package/dist/hooks/useNotificationPreferences.js.map +1 -1
- package/dist/hooks/useNotificationTemplates.js +3 -3
- package/dist/hooks/useNotificationTemplates.js.map +1 -1
- package/dist/hooks/useNotificationTopics.js +1 -1
- package/dist/hooks/useNotificationTopics.js.map +1 -1
- package/dist/hooks/useNotifications.d.ts.map +1 -1
- package/dist/hooks/useNotifications.js +47 -40
- package/dist/hooks/useNotifications.js.map +1 -1
- package/dist/pages/CreateNotificationPage.d.ts.map +1 -1
- package/dist/pages/CreateNotificationPage.js +407 -391
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.d.ts.map +1 -1
- package/dist/pages/NotificationCenterPage.js +80 -81
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.d.ts.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +2 -1
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.d.ts.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +2 -1
- package/dist/pages/NotificationHistoryPage.js.map +1 -1
- package/dist/pages/NotificationPreferencesPage.d.ts.map +1 -1
- package/dist/pages/NotificationPreferencesPage.js +140 -95
- package/dist/pages/NotificationPreferencesPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.d.ts.map +1 -1
- package/dist/pages/TemplateEditorPage.js +326 -313
- package/dist/pages/TemplateEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,14 +6,15 @@ import { useTr as r } from "../shared/hooks/useTr.js";
|
|
|
6
6
|
import { filterNotifications as i, groupNotificationsByDate as a } from "../utils/index.js";
|
|
7
7
|
import { NotificationCard as o } from "../components/NotificationCard.js";
|
|
8
8
|
import { NOTIFICATION_PERMISSIONS as s } from "../constants/permissions.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { useMemo as c } from "react";
|
|
10
|
+
import { Bell as l, Search as u } from "lucide-react";
|
|
11
|
+
import { usePermissions as d } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
13
|
//#region src/pages/NotificationCenterPage.tsx
|
|
13
|
-
var
|
|
14
|
+
var m = {
|
|
14
15
|
archived: !1,
|
|
15
16
|
channel: "IN_APP"
|
|
16
|
-
},
|
|
17
|
+
}, h = { channel: "IN_APP" }, g = [
|
|
17
18
|
{
|
|
18
19
|
value: "SYSTEM",
|
|
19
20
|
labelKey: "notifications.typeSystem",
|
|
@@ -34,7 +35,7 @@ var p = {
|
|
|
34
35
|
labelKey: "notifications.typeMarketing",
|
|
35
36
|
label: "Marketing"
|
|
36
37
|
}
|
|
37
|
-
],
|
|
38
|
+
], _ = [
|
|
38
39
|
{
|
|
39
40
|
value: "URGENT",
|
|
40
41
|
labelKey: "notifications.priorityUrgent",
|
|
@@ -56,145 +57,143 @@ var p = {
|
|
|
56
57
|
label: "Low"
|
|
57
58
|
}
|
|
58
59
|
];
|
|
59
|
-
function
|
|
60
|
-
let
|
|
61
|
-
baseFilter:
|
|
62
|
-
unreadFilter:
|
|
63
|
-
}), { topics:
|
|
64
|
-
|
|
60
|
+
function v() {
|
|
61
|
+
let v = r(), { hasPermission: y, isLoading: b } = d(), { currentUser: x } = e(), { notifications: S, unreadCount: C, notificationFilter: w, markAsRead: T, markAllAsRead: E, archiveNotification: D, recordAction: O, updateFilter: k, resetFilter: A } = t({
|
|
62
|
+
baseFilter: m,
|
|
63
|
+
unreadFilter: h
|
|
64
|
+
}), { topics: j } = n({ isActive: !0 }), M = c(() => i(S, w), [S, w]), N = c(() => a(M), [M]);
|
|
65
|
+
return b ? /* @__PURE__ */ f("div", {
|
|
65
66
|
className: "flex h-64 items-center justify-center",
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
})
|
|
68
|
-
if (!v(s.NOTIFICATION_LIST) && !b?.id) return /* @__PURE__ */ d("div", {
|
|
67
|
+
children: /* @__PURE__ */ f("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
|
|
68
|
+
}) : !y(s.NOTIFICATION_LIST) && !x?.id ? /* @__PURE__ */ f("div", {
|
|
69
69
|
className: "p-8 text-center text-text-secondary",
|
|
70
|
-
children:
|
|
71
|
-
})
|
|
72
|
-
let j = i(x, C), M = a(j);
|
|
73
|
-
return /* @__PURE__ */ f("div", {
|
|
70
|
+
children: v("notifications.noPermissionView", "You don't have permission to view notifications.")
|
|
71
|
+
}) : /* @__PURE__ */ p("div", {
|
|
74
72
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-300",
|
|
75
73
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ p("div", {
|
|
77
75
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
|
|
79
77
|
className: "text-xl sm:text-2xl font-bold text-primary",
|
|
80
|
-
children:
|
|
81
|
-
}), /* @__PURE__ */
|
|
78
|
+
children: v("notifications.centerTitle", "Notification Center")
|
|
79
|
+
}), /* @__PURE__ */ f("p", {
|
|
82
80
|
className: "text-sm text-secondary mt-1",
|
|
83
|
-
children:
|
|
84
|
-
})] }),
|
|
85
|
-
onClick:
|
|
81
|
+
children: C > 0 ? `${v("notifications.youHave", "You have")} ${C} ${v("notifications.unreadNotifications", "unread notification")}${C > 1 ? "s" : ""}` : v("notifications.allCaughtUp", "All caught up!")
|
|
82
|
+
})] }), C > 0 && /* @__PURE__ */ f("button", {
|
|
83
|
+
onClick: E,
|
|
86
84
|
className: "px-4 py-2 text-sm font-medium text-accent-primary hover:text-accent-primary/80 border border-accent-primary hover:border-accent-primary/80 rounded-lg transition-all duration-150 hover:shadow-sm",
|
|
87
|
-
children:
|
|
85
|
+
children: v("notifications.markAllAsRead", "Mark All as Read")
|
|
88
86
|
})]
|
|
89
87
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ p("div", {
|
|
91
89
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",
|
|
92
90
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ p("div", {
|
|
94
92
|
className: "relative flex-1",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ f(u, {
|
|
96
94
|
size: 16,
|
|
97
95
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-tertiary"
|
|
98
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ f("input", {
|
|
99
97
|
type: "text",
|
|
100
|
-
placeholder:
|
|
101
|
-
value:
|
|
102
|
-
onChange: (e) =>
|
|
98
|
+
placeholder: v("notifications.searchPlaceholder", "Search notifications..."),
|
|
99
|
+
value: w.search,
|
|
100
|
+
onChange: (e) => k({ search: e.target.value }),
|
|
103
101
|
className: "w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150"
|
|
104
102
|
})]
|
|
105
103
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
value:
|
|
108
|
-
onChange: (e) =>
|
|
104
|
+
/* @__PURE__ */ p("select", {
|
|
105
|
+
value: w.type,
|
|
106
|
+
onChange: (e) => k({ type: e.target.value }),
|
|
109
107
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ f("option", {
|
|
111
109
|
value: "ALL",
|
|
112
|
-
children:
|
|
113
|
-
}),
|
|
110
|
+
children: v("notifications.allTypes", "All Types")
|
|
111
|
+
}), g.map((e) => /* @__PURE__ */ f("option", {
|
|
114
112
|
value: e.value,
|
|
115
|
-
children:
|
|
113
|
+
children: v(e.labelKey, e.label)
|
|
116
114
|
}, e.value))]
|
|
117
115
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
value:
|
|
120
|
-
onChange: (e) =>
|
|
116
|
+
/* @__PURE__ */ p("select", {
|
|
117
|
+
value: w.priority,
|
|
118
|
+
onChange: (e) => k({ priority: e.target.value }),
|
|
121
119
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ f("option", {
|
|
123
121
|
value: "ALL",
|
|
124
|
-
children:
|
|
125
|
-
}),
|
|
122
|
+
children: v("notifications.allPriorities", "All Priorities")
|
|
123
|
+
}), _.map((e) => /* @__PURE__ */ f("option", {
|
|
126
124
|
value: e.value,
|
|
127
|
-
children:
|
|
125
|
+
children: v(e.labelKey, e.label)
|
|
128
126
|
}, e.value))]
|
|
129
127
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
value:
|
|
132
|
-
onChange: (e) =>
|
|
128
|
+
/* @__PURE__ */ p("select", {
|
|
129
|
+
value: w.topicId || "",
|
|
130
|
+
onChange: (e) => k({ topicId: e.target.value || void 0 }),
|
|
133
131
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ f("option", {
|
|
135
133
|
value: "",
|
|
136
|
-
children:
|
|
137
|
-
}),
|
|
134
|
+
children: v("notifications.allTopics", "All Topics")
|
|
135
|
+
}), j.map((e) => /* @__PURE__ */ f("option", {
|
|
138
136
|
value: e.id,
|
|
139
137
|
children: e.name
|
|
140
138
|
}, e.id))]
|
|
141
139
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
value:
|
|
144
|
-
onChange: (e) =>
|
|
140
|
+
/* @__PURE__ */ p("select", {
|
|
141
|
+
value: w.isRead === null ? "ALL" : w.isRead ? "READ" : "UNREAD",
|
|
142
|
+
onChange: (e) => k({ isRead: e.target.value === "ALL" ? null : e.target.value === "READ" }),
|
|
145
143
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150",
|
|
146
144
|
children: [
|
|
147
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ f("option", {
|
|
148
146
|
value: "ALL",
|
|
149
|
-
children:
|
|
147
|
+
children: v("notifications.filterAll", "All")
|
|
150
148
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ f("option", {
|
|
152
150
|
value: "UNREAD",
|
|
153
|
-
children:
|
|
151
|
+
children: v("notifications.filterUnread", "Unread")
|
|
154
152
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ f("option", {
|
|
156
154
|
value: "READ",
|
|
157
|
-
children:
|
|
155
|
+
children: v("notifications.filterRead", "Read")
|
|
158
156
|
})
|
|
159
157
|
]
|
|
160
158
|
}),
|
|
161
|
-
(
|
|
162
|
-
onClick:
|
|
159
|
+
(w.search || w.type !== "ALL" || w.priority !== "ALL" || w.isRead !== null || !!w.topicId) && /* @__PURE__ */ f("button", {
|
|
160
|
+
onClick: A,
|
|
163
161
|
className: "px-3 py-2 text-sm text-tertiary hover:text-primary transition-colors duration-150",
|
|
164
|
-
children:
|
|
162
|
+
children: v("notifications.resetFilters", "Reset")
|
|
165
163
|
})
|
|
166
164
|
]
|
|
167
165
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ f("div", {
|
|
169
167
|
className: "space-y-6",
|
|
170
|
-
children:
|
|
168
|
+
children: M.length > 0 ? Object.entries(N).map(([e, t]) => /* @__PURE__ */ p("div", {
|
|
171
169
|
className: "animate-in fade-in slide-in-from-bottom-2 duration-300",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
173
171
|
className: "text-sm font-semibold text-tertiary mb-3",
|
|
174
172
|
children: e
|
|
175
|
-
}), /* @__PURE__ */
|
|
173
|
+
}), /* @__PURE__ */ f("div", {
|
|
176
174
|
className: "space-y-2",
|
|
177
|
-
children: t.map((e) => /* @__PURE__ */
|
|
175
|
+
children: t.map((e) => /* @__PURE__ */ f(o, {
|
|
178
176
|
notification: e,
|
|
179
|
-
onMarkAsRead:
|
|
180
|
-
onArchive:
|
|
181
|
-
onAction:
|
|
177
|
+
onMarkAsRead: T,
|
|
178
|
+
onArchive: D,
|
|
179
|
+
onAction: O,
|
|
180
|
+
analyticsSource: "center"
|
|
182
181
|
}, e.id))
|
|
183
182
|
})]
|
|
184
|
-
}, e)) : /* @__PURE__ */
|
|
183
|
+
}, e)) : /* @__PURE__ */ p("div", {
|
|
185
184
|
className: "flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-300",
|
|
186
185
|
children: [
|
|
187
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ f(l, {
|
|
188
187
|
size: 48,
|
|
189
188
|
className: "text-tertiary mb-4"
|
|
190
189
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ f("h3", {
|
|
192
191
|
className: "text-lg font-semibold text-primary mb-2",
|
|
193
|
-
children:
|
|
192
|
+
children: v("notifications.noNotificationsFound", "No notifications found")
|
|
194
193
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ f("p", {
|
|
196
195
|
className: "text-sm text-secondary max-w-md",
|
|
197
|
-
children:
|
|
196
|
+
children: S.length === 0 ? v("notifications.noNotificationsYet", "You don't have any notifications yet. We'll notify you when something important happens.") : v("notifications.adjustFilters", "Try adjusting your filters to see more notifications.")
|
|
198
197
|
})
|
|
199
198
|
]
|
|
200
199
|
})
|
|
@@ -203,6 +202,6 @@ function _() {
|
|
|
203
202
|
});
|
|
204
203
|
}
|
|
205
204
|
//#endregion
|
|
206
|
-
export {
|
|
205
|
+
export { v as NotificationCenterPage };
|
|
207
206
|
|
|
208
207
|
//# sourceMappingURL=NotificationCenterPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCenterPage.js","names":[],"sources":["../../src/pages/NotificationCenterPage.tsx"],"sourcesContent":["import { Search, Bell } from 'lucide-react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useNotifications, useNotificationTopics } from '../hooks';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { filterNotifications, groupNotificationsByDate } from '../utils';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { useTr } from '../shared/hooks/useTr';\nimport type { NotificationPriority, NotificationType } from '../types';\n\nconst CENTER_FILTER = { archived: false, channel: 'IN_APP' as const };\nconst CENTER_UNREAD_FILTER = { channel: 'IN_APP' };\nconst TYPE_OPTIONS: Array<{ value: NotificationType; labelKey: string; label: string }> = [\n { value: 'SYSTEM', labelKey: 'notifications.typeSystem', label: 'System' },\n { value: 'ALERT', labelKey: 'notifications.typeAlert', label: 'Alert' },\n { value: 'TRANSACTIONAL', labelKey: 'notifications.typeTransactional', label: 'Transactional' },\n { value: 'MARKETING', labelKey: 'notifications.typeMarketing', label: 'Marketing' },\n];\nconst PRIORITY_OPTIONS: Array<{ value: NotificationPriority; labelKey: string; label: string }> = [\n { value: 'URGENT', labelKey: 'notifications.priorityUrgent', label: 'Urgent' },\n { value: 'HIGH', labelKey: 'notifications.priorityHigh', label: 'High' },\n { value: 'NORMAL', labelKey: 'notifications.priorityNormal', label: 'Normal' },\n { value: 'LOW', labelKey: 'notifications.priorityLow', label: 'Low' },\n];\n\n/**\n * Notification Center Page\n *\n * Main page for viewing and managing in-app notifications\n */\nexport function NotificationCenterPage() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { currentUser } = useNotification();\n const {\n notifications,\n unreadCount,\n notificationFilter,\n markAsRead,\n markAllAsRead,\n archiveNotification,\n recordAction,\n updateFilter,\n resetFilter,\n } = useNotifications({ baseFilter: CENTER_FILTER, unreadFilter: CENTER_UNREAD_FILTER });\n const { topics } = useNotificationTopics({ isActive: true });\n\n if (permissionsLoading) {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n }\n\n if (!hasPermission(NOTIFICATION_PERMISSIONS.NOTIFICATION_LIST) && !currentUser?.id) {\n return (\n <div className=\"p-8 text-center text-text-secondary\">\n {tr('notifications.noPermissionView', \"You don't have permission to view notifications.\")}\n </div>\n );\n }\n\n // Filter and group notifications\n const filteredNotifications = filterNotifications(notifications, notificationFilter);\n const groupedNotifications = groupNotificationsByDate(filteredNotifications);\n\n return (\n <div className=\"space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-300\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-primary\">\n {tr('notifications.centerTitle', 'Notification Center')}\n </h1>\n <p className=\"text-sm text-secondary mt-1\">\n {unreadCount > 0\n ? `${tr('notifications.youHave', 'You have')} ${unreadCount} ${tr('notifications.unreadNotifications', 'unread notification')}${unreadCount > 1 ? 's' : ''}`\n : tr('notifications.allCaughtUp', 'All caught up!')}\n </p>\n </div>\n\n {unreadCount > 0 && (\n <button\n onClick={markAllAsRead}\n className=\"px-4 py-2 text-sm font-medium text-accent-primary hover:text-accent-primary/80 border border-accent-primary hover:border-accent-primary/80 rounded-lg transition-all duration-150 hover:shadow-sm\"\n >\n {tr('notifications.markAllAsRead', 'Mark All as Read')}\n </button>\n )}\n </div>\n\n {/* Filters */}\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search size={16} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-tertiary\" />\n <input\n type=\"text\"\n placeholder={tr('notifications.searchPlaceholder', 'Search notifications...')}\n value={notificationFilter.search}\n onChange={(e) => updateFilter({ search: e.target.value })}\n className=\"w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n />\n </div>\n\n {/* Type filter */}\n <select\n value={notificationFilter.type}\n onChange={(e) => updateFilter({ type: e.target.value as NotificationType | 'ALL' })}\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n >\n <option value=\"ALL\">{tr('notifications.allTypes', 'All Types')}</option>\n {TYPE_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {tr(option.labelKey, option.label)}\n </option>\n ))}\n </select>\n\n {/* Priority filter */}\n <select\n value={notificationFilter.priority}\n onChange={(e) =>\n updateFilter({ priority: e.target.value as NotificationPriority | 'ALL' })\n }\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n >\n <option value=\"ALL\">{tr('notifications.allPriorities', 'All Priorities')}</option>\n {PRIORITY_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {tr(option.labelKey, option.label)}\n </option>\n ))}\n </select>\n\n <select\n value={notificationFilter.topicId || ''}\n onChange={(e) => updateFilter({ topicId: e.target.value || undefined })}\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n >\n <option value=\"\">{tr('notifications.allTopics', 'All Topics')}</option>\n {topics.map((topic) => (\n <option key={topic.id} value={topic.id}>\n {topic.name}\n </option>\n ))}\n </select>\n\n {/* Read/Unread filter */}\n <select\n value={\n notificationFilter.isRead === null\n ? 'ALL'\n : notificationFilter.isRead\n ? 'READ'\n : 'UNREAD'\n }\n onChange={(e) =>\n updateFilter({\n isRead: e.target.value === 'ALL' ? null : e.target.value === 'READ',\n })\n }\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n >\n <option value=\"ALL\">{tr('notifications.filterAll', 'All')}</option>\n <option value=\"UNREAD\">{tr('notifications.filterUnread', 'Unread')}</option>\n <option value=\"READ\">{tr('notifications.filterRead', 'Read')}</option>\n </select>\n\n {/* Reset filters */}\n {(notificationFilter.search ||\n notificationFilter.type !== 'ALL' ||\n notificationFilter.priority !== 'ALL' ||\n notificationFilter.isRead !== null ||\n Boolean(notificationFilter.topicId)) && (\n <button\n onClick={resetFilter}\n className=\"px-3 py-2 text-sm text-tertiary hover:text-primary transition-colors duration-150\"\n >\n {tr('notifications.resetFilters', 'Reset')}\n </button>\n )}\n </div>\n\n {/* Notifications list */}\n <div className=\"space-y-6\">\n {filteredNotifications.length > 0 ? (\n Object.entries(groupedNotifications).map(([group, groupNotifications]) => (\n <div key={group} className=\"animate-in fade-in slide-in-from-bottom-2 duration-300\">\n <h2 className=\"text-sm font-semibold text-tertiary mb-3\">{group}</h2>\n <div className=\"space-y-2\">\n {groupNotifications.map((notification) => (\n <NotificationCard\n key={notification.id}\n notification={notification}\n onMarkAsRead={markAsRead}\n onArchive={archiveNotification}\n onAction={recordAction}\n />\n ))}\n </div>\n </div>\n ))\n ) : (\n <div className=\"flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-300\">\n <Bell size={48} className=\"text-tertiary mb-4\" />\n <h3 className=\"text-lg font-semibold text-primary mb-2\">\n {tr('notifications.noNotificationsFound', 'No notifications found')}\n </h3>\n <p className=\"text-sm text-secondary max-w-md\">\n {notifications.length === 0\n ? tr(\n 'notifications.noNotificationsYet',\n \"You don't have any notifications yet. We'll notify you when something important happens.\"\n )\n : tr(\n 'notifications.adjustFilters',\n 'Try adjusting your filters to see more notifications.'\n )}\n </p>\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";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,EAAmB,KAAK,MACvB,kBAAC,GAAD;OAEgB;OACd,cAAc;OACd,WAAW;OACX,UAAU;OACV,EALK,EAAa,GAKlB,CACF;MACE,CAAA,CACF;OAbI,EAaJ,CACN,GAEF,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD;OAAM,MAAM;OAAI,WAAU;OAAuB,CAAA;MACjD,kBAAC,MAAD;OAAI,WAAU;iBACX,EAAG,sCAAsC,yBAAyB;OAChE,CAAA;MACL,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAc,WAAW,IACtB,EACE,oCACA,2FACD,GACD,EACE,+BACA,wDACD;OACH,CAAA;MACA;;IAEJ,CAAA;GACF"}
|
|
1
|
+
{"version":3,"file":"NotificationCenterPage.js","names":[],"sources":["../../src/pages/NotificationCenterPage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Search, Bell } from 'lucide-react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useNotifications, useNotificationTopics } from '../hooks';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { filterNotifications, groupNotificationsByDate } from '../utils';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { useTr } from '../shared/hooks/useTr';\nimport type { NotificationPriority, NotificationType } from '../types';\n\nconst CENTER_FILTER = { archived: false, channel: 'IN_APP' as const };\nconst CENTER_UNREAD_FILTER = { channel: 'IN_APP' };\nconst TYPE_OPTIONS: Array<{ value: NotificationType; labelKey: string; label: string }> = [\n { value: 'SYSTEM', labelKey: 'notifications.typeSystem', label: 'System' },\n { value: 'ALERT', labelKey: 'notifications.typeAlert', label: 'Alert' },\n { value: 'TRANSACTIONAL', labelKey: 'notifications.typeTransactional', label: 'Transactional' },\n { value: 'MARKETING', labelKey: 'notifications.typeMarketing', label: 'Marketing' },\n];\nconst PRIORITY_OPTIONS: Array<{ value: NotificationPriority; labelKey: string; label: string }> = [\n { value: 'URGENT', labelKey: 'notifications.priorityUrgent', label: 'Urgent' },\n { value: 'HIGH', labelKey: 'notifications.priorityHigh', label: 'High' },\n { value: 'NORMAL', labelKey: 'notifications.priorityNormal', label: 'Normal' },\n { value: 'LOW', labelKey: 'notifications.priorityLow', label: 'Low' },\n];\n\n/**\n * Notification Center Page\n *\n * Main page for viewing and managing in-app notifications\n */\nexport function NotificationCenterPage() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { currentUser } = useNotification();\n const {\n notifications,\n unreadCount,\n notificationFilter,\n markAsRead,\n markAllAsRead,\n archiveNotification,\n recordAction,\n updateFilter,\n resetFilter,\n } = useNotifications({ baseFilter: CENTER_FILTER, unreadFilter: CENTER_UNREAD_FILTER });\n const { topics } = useNotificationTopics({ isActive: true });\n\n // Filter and group notifications\n const filteredNotifications = useMemo(\n () => filterNotifications(notifications, notificationFilter),\n [notifications, notificationFilter]\n );\n const groupedNotifications = useMemo(\n () => groupNotificationsByDate(filteredNotifications),\n [filteredNotifications]\n );\n\n if (permissionsLoading) {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n }\n\n if (!hasPermission(NOTIFICATION_PERMISSIONS.NOTIFICATION_LIST) && !currentUser?.id) {\n return (\n <div className=\"p-8 text-center text-text-secondary\">\n {tr('notifications.noPermissionView', \"You don't have permission to view notifications.\")}\n </div>\n );\n }\n\n return (\n <div className=\"space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-300\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-primary\">\n {tr('notifications.centerTitle', 'Notification Center')}\n </h1>\n <p className=\"text-sm text-secondary mt-1\">\n {unreadCount > 0\n ? `${tr('notifications.youHave', 'You have')} ${unreadCount} ${tr('notifications.unreadNotifications', 'unread notification')}${unreadCount > 1 ? 's' : ''}`\n : tr('notifications.allCaughtUp', 'All caught up!')}\n </p>\n </div>\n\n {unreadCount > 0 && (\n <button\n onClick={markAllAsRead}\n className=\"px-4 py-2 text-sm font-medium text-accent-primary hover:text-accent-primary/80 border border-accent-primary hover:border-accent-primary/80 rounded-lg transition-all duration-150 hover:shadow-sm\"\n >\n {tr('notifications.markAllAsRead', 'Mark All as Read')}\n </button>\n )}\n </div>\n\n {/* Filters */}\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search size={16} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-tertiary\" />\n <input\n type=\"text\"\n placeholder={tr('notifications.searchPlaceholder', 'Search notifications...')}\n value={notificationFilter.search}\n onChange={(e) => updateFilter({ search: e.target.value })}\n className=\"w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n />\n </div>\n\n {/* Type filter */}\n <select\n value={notificationFilter.type}\n onChange={(e) => updateFilter({ type: e.target.value as NotificationType | 'ALL' })}\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n >\n <option value=\"ALL\">{tr('notifications.allTypes', 'All Types')}</option>\n {TYPE_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {tr(option.labelKey, option.label)}\n </option>\n ))}\n </select>\n\n {/* Priority filter */}\n <select\n value={notificationFilter.priority}\n onChange={(e) =>\n updateFilter({ priority: e.target.value as NotificationPriority | 'ALL' })\n }\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n >\n <option value=\"ALL\">{tr('notifications.allPriorities', 'All Priorities')}</option>\n {PRIORITY_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {tr(option.labelKey, option.label)}\n </option>\n ))}\n </select>\n\n <select\n value={notificationFilter.topicId || ''}\n onChange={(e) => updateFilter({ topicId: e.target.value || undefined })}\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n >\n <option value=\"\">{tr('notifications.allTopics', 'All Topics')}</option>\n {topics.map((topic) => (\n <option key={topic.id} value={topic.id}>\n {topic.name}\n </option>\n ))}\n </select>\n\n {/* Read/Unread filter */}\n <select\n value={\n notificationFilter.isRead === null\n ? 'ALL'\n : notificationFilter.isRead\n ? 'READ'\n : 'UNREAD'\n }\n onChange={(e) =>\n updateFilter({\n isRead: e.target.value === 'ALL' ? null : e.target.value === 'READ',\n })\n }\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n >\n <option value=\"ALL\">{tr('notifications.filterAll', 'All')}</option>\n <option value=\"UNREAD\">{tr('notifications.filterUnread', 'Unread')}</option>\n <option value=\"READ\">{tr('notifications.filterRead', 'Read')}</option>\n </select>\n\n {/* Reset filters */}\n {(notificationFilter.search ||\n notificationFilter.type !== 'ALL' ||\n notificationFilter.priority !== 'ALL' ||\n notificationFilter.isRead !== null ||\n Boolean(notificationFilter.topicId)) && (\n <button\n onClick={resetFilter}\n className=\"px-3 py-2 text-sm text-tertiary hover:text-primary transition-colors duration-150\"\n >\n {tr('notifications.resetFilters', 'Reset')}\n </button>\n )}\n </div>\n\n {/* Notifications list */}\n <div className=\"space-y-6\">\n {filteredNotifications.length > 0 ? (\n Object.entries(groupedNotifications).map(([group, groupNotifications]) => (\n <div key={group} className=\"animate-in fade-in slide-in-from-bottom-2 duration-300\">\n <h2 className=\"text-sm font-semibold text-tertiary mb-3\">{group}</h2>\n <div className=\"space-y-2\">\n {groupNotifications.map((notification) => (\n <NotificationCard\n key={notification.id}\n notification={notification}\n onMarkAsRead={markAsRead}\n onArchive={archiveNotification}\n onAction={recordAction}\n analyticsSource=\"center\"\n />\n ))}\n </div>\n </div>\n ))\n ) : (\n <div className=\"flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-300\">\n <Bell size={48} className=\"text-tertiary mb-4\" />\n <h3 className=\"text-lg font-semibold text-primary mb-2\">\n {tr('notifications.noNotificationsFound', 'No notifications found')}\n </h3>\n <p className=\"text-sm text-secondary max-w-md\">\n {notifications.length === 0\n ? tr(\n 'notifications.noNotificationsYet',\n \"You don't have any notifications yet. We'll notify you when something important happens.\"\n )\n : tr(\n 'notifications.adjustFilters',\n 'Try adjusting your filters to see more notifications.'\n )}\n </p>\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAWA,IAAM,IAAgB;CAAE,UAAU;CAAO,SAAS;CAAmB,EAC/D,IAAuB,EAAE,SAAS,UAAU,EAC5C,IAAoF;CACxF;EAAE,OAAO;EAAU,UAAU;EAA4B,OAAO;EAAU;CAC1E;EAAE,OAAO;EAAS,UAAU;EAA2B,OAAO;EAAS;CACvE;EAAE,OAAO;EAAiB,UAAU;EAAmC,OAAO;EAAiB;CAC/F;EAAE,OAAO;EAAa,UAAU;EAA+B,OAAO;EAAa;CACpF,EACK,IAA4F;CAChG;EAAE,OAAO;EAAU,UAAU;EAAgC,OAAO;EAAU;CAC9E;EAAE,OAAO;EAAQ,UAAU;EAA8B,OAAO;EAAQ;CACxE;EAAE,OAAO;EAAU,UAAU;EAAgC,OAAO;EAAU;CAC9E;EAAE,OAAO;EAAO,UAAU;EAA6B,OAAO;EAAO;CACtE;AAOD,SAAgB,IAAyB;CACvC,IAAM,IAAK,GAAO,EACZ,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,EAAE,mBAAgB,GAAiB,EACnC,EACJ,kBACA,gBACA,uBACA,eACA,kBACA,wBACA,iBACA,iBACA,mBACE,EAAiB;EAAE,YAAY;EAAe,cAAc;EAAsB,CAAC,EACjF,EAAE,cAAW,EAAsB,EAAE,UAAU,IAAM,CAAC,EAGtD,IA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Q,EAAG,4BAA4B,OAAO;QAAU,CAAA;OAC/D;;MAGP,EAAmB,UACnB,EAAmB,SAAS,SAC5B,EAAmB,aAAa,SAChC,EAAmB,WAAW,QAC9B,EAAQ,EAAmB,YAC3B,kBAAC,UAAD;MACE,SAAS;MACT,WAAU;gBAET,EAAG,8BAA8B,QAAQ;MACnC,CAAA;KAEP;;GAGN,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAsB,SAAS,IAC9B,OAAO,QAAQ,EAAqB,CAAC,KAAK,CAAC,GAAO,OAChD,kBAAC,OAAD;KAAiB,WAAU;eAA3B,CACE,kBAAC,MAAD;MAAI,WAAU;gBAA4C;MAAW,CAAA,EACrE,kBAAC,OAAD;MAAK,WAAU;gBACZ,EAAmB,KAAK,MACvB,kBAAC,GAAD;OAEgB;OACd,cAAc;OACd,WAAW;OACX,UAAU;OACV,iBAAgB;OAChB,EANK,EAAa,GAMlB,CACF;MACE,CAAA,CACF;OAdI,EAcJ,CACN,GAEF,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD;OAAM,MAAM;OAAI,WAAU;OAAuB,CAAA;MACjD,kBAAC,MAAD;OAAI,WAAU;iBACX,EAAG,sCAAsC,yBAAyB;OAChE,CAAA;MACL,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAc,WAAW,IACtB,EACE,oCACA,2FACD,GACD,EACE,+BACA,wDACD;OACH,CAAA;MACA;;IAEJ,CAAA;GACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationHistoryAdminPage.d.ts","sourceRoot":"","sources":["../../src/pages/NotificationHistoryAdminPage.tsx"],"names":[],"mappings":"AAcA,sFAAsF;AACtF,wBAAgB,4BAA4B,
|
|
1
|
+
{"version":3,"file":"NotificationHistoryAdminPage.d.ts","sourceRoot":"","sources":["../../src/pages/NotificationHistoryAdminPage.tsx"],"names":[],"mappings":"AAcA,sFAAsF;AACtF,wBAAgB,4BAA4B,4CA2b3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationHistoryAdminPage.js","names":[],"sources":["../../src/pages/NotificationHistoryAdminPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { CalendarClock, Download, RefreshCw, Search } from 'lucide-react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { useNotificationAdmin, useNotificationTopics } from '../hooks';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useTr } from '../shared/hooks/useTr';\nimport { exportNotificationsAsCsv } from '../utils/notificationHistoryExport';\n\nfunction formatDateTime(value?: string | null) {\n if (!value) return '—';\n return new Date(value).toLocaleString();\n}\n\n/** Admin Notification History — scheduled ops, delivery inspector, event timeline. */\nexport function NotificationHistoryAdminPage() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { topics } = useNotificationTopics();\n const {\n filters,\n setFilters,\n notifications,\n scheduledNotifications,\n selectedNotification,\n events,\n isLoading,\n loadNotification,\n archiveNotification,\n unarchiveNotification,\n cancelScheduledNotification,\n rescheduleNotification,\n clearSelection,\n } = useNotificationAdmin();\n const [rescheduleAt, setRescheduleAt] = useState('');\n\n if (permissionsLoading) {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n }\n\n if (!hasPermission(NOTIFICATION_PERMISSIONS.NOTIFICATION_LIST)) {\n return (\n <div className=\"p-8 text-center text-text-secondary\">\n {tr(\n 'notifications.noPermissionHistory',\n \"You don't have permission to view notification history.\"\n )}\n </div>\n );\n }\n\n return (\n <div className=\"space-y-4 sm:space-y-6\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-primary\">\n {tr('notifications.adminHistoryTitle', 'Notification Operations')}\n </h1>\n <p className=\"text-sm text-secondary mt-1\">\n {tr(\n 'notifications.adminHistorySubtitle',\n 'Review sent and scheduled notifications, delivery outcomes, opens, clicks, and user activity.'\n )}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() => exportNotificationsAsCsv(tr, notifications)}\n disabled={notifications.length === 0}\n className=\"inline-flex items-center gap-2 rounded-md border border-default px-4 py-2 text-sm text-secondary hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <Download size={16} />\n {tr('notifications.export', 'Export')}\n </button>\n </div>\n\n <div className=\"grid gap-3 rounded-lg border border-default bg-surface p-4 lg:grid-cols-6\">\n <label className=\"relative lg:col-span-2\">\n <Search size={16} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-tertiary\" />\n <input\n type=\"text\"\n value={filters.search}\n onChange={(event) => setFilters((prev) => ({ ...prev, search: event.target.value }))}\n placeholder={tr(\n 'notifications.searchByTitleOrContent',\n 'Search by title or content...'\n )}\n className=\"w-full rounded-md border border-default bg-bg-canvas py-2 pl-9 pr-3 text-sm text-primary focus:outline-none focus:ring-2 focus:ring-accent\"\n />\n </label>\n\n <select\n value={filters.status}\n onChange={(event) => setFilters((prev) => ({ ...prev, status: event.target.value }))}\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"all\">{tr('notifications.allStatuses', 'All Statuses')}</option>\n <option value=\"PENDING\">PENDING</option>\n <option value=\"TRIGGERED\">TRIGGERED</option>\n <option value=\"SENT\">SENT</option>\n <option value=\"FAILED\">FAILED</option>\n <option value=\"CANCELLED\">CANCELLED</option>\n </select>\n\n <select\n value={filters.channel}\n onChange={(event) => setFilters((prev) => ({ ...prev, channel: event.target.value }))}\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"all\">{tr('notifications.allChannels', 'All Channels')}</option>\n <option value=\"EMAIL\">EMAIL</option>\n <option value=\"SMS\">SMS</option>\n <option value=\"PUSH\">PUSH</option>\n <option value=\"WHATSAPP\">WHATSAPP</option>\n <option value=\"IN_APP\">IN_APP</option>\n </select>\n\n <select\n value={filters.deliveryStatus}\n onChange={(event) =>\n setFilters((prev) => ({ ...prev, deliveryStatus: event.target.value }))\n }\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"all\">{tr('notifications.allDeliveryStates', 'All Delivery')}</option>\n <option value=\"DELIVERED\">DELIVERED</option>\n <option value=\"OPENED\">OPENED</option>\n <option value=\"CLICKED\">CLICKED</option>\n <option value=\"FAILED\">FAILED</option>\n <option value=\"UNSUBSCRIBED\">UNSUBSCRIBED</option>\n </select>\n\n <select\n value={filters.topicId}\n onChange={(event) => setFilters((prev) => ({ ...prev, topicId: event.target.value }))}\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"\">{tr('notifications.allTopics', 'All Topics')}</option>\n {topics.map((topic) => (\n <option key={topic.id} value={topic.id}>\n {topic.name}\n </option>\n ))}\n </select>\n\n <select\n value={filters.archived}\n onChange={(event) =>\n setFilters((prev) => ({\n ...prev,\n archived: event.target.value as typeof prev.archived,\n }))\n }\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"all\">{tr('notifications.activeAndArchived', 'Active + Archived')}</option>\n <option value=\"active\">{tr('notifications.activeOnly', 'Active Only')}</option>\n <option value=\"archived\">{tr('notifications.archivedOnly', 'Archived Only')}</option>\n </select>\n </div>\n\n <div className=\"grid gap-6 xl:grid-cols-[minmax(0,1fr),420px]\">\n <div className=\"space-y-6\">\n <section className=\"rounded-lg border border-default bg-surface p-4 shadow-sm\">\n <div className=\"mb-4 flex items-center justify-between\">\n <div>\n <h2 className=\"text-base font-semibold text-primary\">\n {tr('notifications.sentNotifications', 'Notifications')}\n </h2>\n <p className=\"text-sm text-secondary\">\n {notifications.length} {tr('notifications.resultsFoundShort', 'results')}\n </p>\n </div>\n {isLoading && <RefreshCw size={16} className=\"animate-spin text-tertiary\" />}\n </div>\n\n <div className=\"space-y-3\">\n {notifications.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-default p-6 text-sm text-secondary\">\n {tr('notifications.noNotificationsFound', 'No notifications found')}\n </div>\n ) : (\n notifications.map((notification) => (\n <button\n key={notification.id}\n type=\"button\"\n onClick={() => loadNotification(notification.id)}\n className=\"block w-full text-left\"\n >\n <NotificationCard notification={notification} compact showArchivedState />\n </button>\n ))\n )}\n </div>\n </section>\n\n <section className=\"rounded-lg border border-default bg-surface p-4 shadow-sm\">\n <div className=\"mb-4 flex items-center gap-2\">\n <CalendarClock size={18} className=\"text-accent-primary\" />\n <h2 className=\"text-base font-semibold text-primary\">\n {tr('notifications.scheduledNotifications', 'Scheduled Notifications')}\n </h2>\n </div>\n\n <div className=\"space-y-3\">\n {scheduledNotifications.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-default p-6 text-sm text-secondary\">\n {tr('notifications.noScheduledNotifications', 'No scheduled notifications')}\n </div>\n ) : (\n scheduledNotifications.map((scheduled) => (\n <div\n key={scheduled.id}\n className=\"rounded-md border border-default bg-bg-canvas p-4\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h3 className=\"text-sm font-semibold text-primary\">\n {scheduled.notification.title}\n </h3>\n <p className=\"text-xs text-secondary\">\n {scheduled.notification.channel} • {scheduled.notification.type} •{' '}\n {formatDateTime(scheduled.scheduledFor)}\n </p>\n </div>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => loadNotification(scheduled.notification.id)}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.view', 'View')}\n </button>\n {scheduled.status === 'PENDING' && (\n <button\n type=\"button\"\n onClick={() => cancelScheduledNotification(scheduled.id)}\n className=\"rounded-md border border-status-error-border px-3 py-2 text-xs text-status-error-text hover:bg-status-error-bg-subtle\"\n >\n {tr('notifications.cancel', 'Cancel')}\n </button>\n )}\n </div>\n </div>\n </div>\n ))\n )}\n </div>\n </section>\n </div>\n\n <aside className=\"rounded-lg border border-default bg-surface p-4 shadow-sm\">\n {selectedNotification ? (\n <div className=\"space-y-4\">\n <div className=\"flex items-start justify-between gap-3\">\n <div>\n <h2 className=\"text-lg font-semibold text-primary\">\n {selectedNotification.title}\n </h2>\n <p className=\"text-sm text-secondary\">{selectedNotification.body}</p>\n </div>\n <button\n type=\"button\"\n onClick={clearSelection}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.close', 'Close')}\n </button>\n </div>\n\n <div className=\"grid gap-2 rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary\">\n <div>\n <strong>Status:</strong> {selectedNotification.status}\n </div>\n <div>\n <strong>Delivery:</strong> {selectedNotification.deliveryStatus || '—'}\n </div>\n <div>\n <strong>Topic:</strong> {selectedNotification.topic?.name || '—'}\n </div>\n <div>\n <strong>Created:</strong> {formatDateTime(selectedNotification.createdAt)}\n </div>\n <div>\n <strong>Sent:</strong> {formatDateTime(selectedNotification.sentAt)}\n </div>\n <div>\n <strong>Delivered:</strong> {formatDateTime(selectedNotification.deliveredAt)}\n </div>\n <div>\n <strong>Opened:</strong> {formatDateTime(selectedNotification.openedAt)}\n </div>\n <div>\n <strong>Clicked:</strong> {formatDateTime(selectedNotification.clickedAt)}\n </div>\n <div>\n <strong>Read:</strong> {formatDateTime(selectedNotification.readAt)}\n </div>\n <div>\n <strong>Recipient:</strong>{' '}\n {selectedNotification.recipientEmail ||\n selectedNotification.recipientPhone ||\n selectedNotification.id}\n </div>\n </div>\n\n {selectedNotification.media.length > 0 && (\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-primary\">\n {tr('notifications.media', 'Media')}\n </h3>\n <div className=\"grid gap-3\">\n {selectedNotification.media.map((item) => (\n <a\n key={item.url}\n href={item.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"rounded-md border border-default bg-bg-canvas p-3 text-sm text-accent-primary hover:underline\"\n >\n {item.label || item.url}\n </a>\n ))}\n </div>\n </div>\n )}\n\n {selectedNotification.actions.length > 0 && (\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-primary\">\n {tr('notifications.actions', 'Actions')}\n </h3>\n <div className=\"grid gap-2\">\n {selectedNotification.actions.map((action) => (\n <div\n key={action.id}\n className=\"rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary\"\n >\n <div className=\"font-medium text-primary\">{action.label}</div>\n <div className=\"truncate text-xs\">{action.url}</div>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {selectedNotification.scheduledNotification && (\n <div className=\"space-y-3 rounded-md border border-default bg-bg-canvas p-3\">\n <div className=\"text-sm font-semibold text-primary\">\n {tr('notifications.scheduling', 'Scheduling')}\n </div>\n <div className=\"text-sm text-secondary\">\n {formatDateTime(selectedNotification.scheduledNotification.scheduledFor)}\n </div>\n {selectedNotification.scheduledNotification.status === 'PENDING' && (\n <>\n <input\n type=\"datetime-local\"\n value={rescheduleAt}\n onChange={(event) => setRescheduleAt(event.target.value)}\n className=\"w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary\"\n />\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() =>\n rescheduleAt &&\n rescheduleNotification(\n selectedNotification.scheduledNotification!.id,\n new Date(rescheduleAt).toISOString()\n )\n }\n className=\"rounded-md bg-accent-primary px-3 py-2 text-xs font-medium text-text-inverse hover:opacity-90\"\n >\n {tr('notifications.reschedule', 'Reschedule')}\n </button>\n <button\n type=\"button\"\n onClick={() =>\n cancelScheduledNotification(\n selectedNotification.scheduledNotification!.id\n )\n }\n className=\"rounded-md border border-status-error-border px-3 py-2 text-xs text-status-error-text hover:bg-status-error-bg-subtle\"\n >\n {tr('notifications.cancel', 'Cancel')}\n </button>\n </div>\n </>\n )}\n </div>\n )}\n\n <div className=\"flex items-center gap-2\">\n {selectedNotification.archivedAt ? (\n <button\n type=\"button\"\n onClick={() => unarchiveNotification(selectedNotification.id)}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.restore', 'Restore')}\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={() => archiveNotification(selectedNotification.id)}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.archive', 'Archive')}\n </button>\n )}\n </div>\n\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-primary\">\n {tr('notifications.eventTimeline', 'Event Timeline')}\n </h3>\n <div className=\"space-y-2\">\n {events.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-default p-4 text-sm text-secondary\">\n {tr('notifications.noEvents', 'No events recorded yet.')}\n </div>\n ) : (\n events.map((event) => (\n <div\n key={event.id}\n className=\"rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary\"\n >\n <div className=\"font-medium text-primary\">{event.eventType}</div>\n <div>{formatDateTime(event.timestamp)}</div>\n {event.deliveryStatus && <div>Delivery: {event.deliveryStatus}</div>}\n </div>\n ))\n )}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"flex h-full min-h-[360px] items-center justify-center rounded-md border border-dashed border-default p-6 text-center text-sm text-secondary\">\n {tr(\n 'notifications.selectNotificationForDetails',\n 'Select a notification to inspect details, delivery receipts, and activity.'\n )}\n </div>\n )}\n </aside>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AASA,SAAS,EAAe,GAAuB;AAE7C,QADK,IACE,IAAI,KAAK,EAAM,CAAC,gBAAgB,GADpB;;AAKrB,SAAgB,IAA+B;CAC7C,IAAM,IAAK,GAAO,EACZ,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,EAAE,cAAW,GAAuB,EACpC,EACJ,YACA,eACA,kBACA,2BACA,yBACA,WACA,cACA,qBACA,wBACA,0BACA,gCACA,2BACA,sBACE,GAAsB,EACpB,CAAC,GAAc,KAAmB,EAAS,GAAG;AAqBpD,QAnBI,I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AAK,WAAU;gBACZ,EACC,8CACA,6EACD;MACG,CAAA;KAEF,CAAA,CACJ;;GACF;MArZJ,kBAAC,OAAD;EAAK,WAAU;YACZ,EACC,qCACA,0DACD;EACG,CAAA"}
|
|
1
|
+
{"version":3,"file":"NotificationHistoryAdminPage.js","names":[],"sources":["../../src/pages/NotificationHistoryAdminPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { CalendarClock, Download, RefreshCw, Search } from 'lucide-react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { useNotificationAdmin, useNotificationTopics } from '../hooks';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useTr } from '../shared/hooks/useTr';\nimport { exportNotificationsAsCsv } from '../utils/notificationHistoryExport';\n\nfunction formatDateTime(value?: string | null) {\n if (!value) return '—';\n return new Date(value).toLocaleString();\n}\n\n/** Admin Notification History — scheduled ops, delivery inspector, event timeline. */\nexport function NotificationHistoryAdminPage() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { topics } = useNotificationTopics();\n const {\n filters,\n setFilters,\n notifications,\n scheduledNotifications,\n selectedNotification,\n events,\n isLoading,\n loadNotification,\n archiveNotification,\n unarchiveNotification,\n cancelScheduledNotification,\n rescheduleNotification,\n clearSelection,\n } = useNotificationAdmin();\n const [rescheduleAt, setRescheduleAt] = useState('');\n\n if (permissionsLoading) {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n }\n\n if (!hasPermission(NOTIFICATION_PERMISSIONS.NOTIFICATION_LIST)) {\n return (\n <div className=\"p-8 text-center text-text-secondary\">\n {tr(\n 'notifications.noPermissionHistory',\n \"You don't have permission to view notification history.\"\n )}\n </div>\n );\n }\n\n return (\n <div className=\"space-y-4 sm:space-y-6\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-primary\">\n {tr('notifications.adminHistoryTitle', 'Notification Operations')}\n </h1>\n <p className=\"text-sm text-secondary mt-1\">\n {tr(\n 'notifications.adminHistorySubtitle',\n 'Review sent and scheduled notifications, delivery outcomes, opens, clicks, and user activity.'\n )}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() => exportNotificationsAsCsv(tr, notifications)}\n disabled={notifications.length === 0}\n className=\"inline-flex items-center gap-2 rounded-md border border-default px-4 py-2 text-sm text-secondary hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <Download size={16} />\n {tr('notifications.export', 'Export')}\n </button>\n </div>\n\n <div className=\"grid gap-3 rounded-lg border border-default bg-surface p-4 lg:grid-cols-6\">\n <label className=\"relative lg:col-span-2\">\n <Search size={16} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-tertiary\" />\n <input\n type=\"text\"\n value={filters.search}\n onChange={(event) => setFilters((prev) => ({ ...prev, search: event.target.value }))}\n placeholder={tr(\n 'notifications.searchByTitleOrContent',\n 'Search by title or content...'\n )}\n className=\"w-full rounded-md border border-default bg-bg-canvas py-2 pl-9 pr-3 text-sm text-primary focus:outline-none focus:ring-2 focus:ring-accent\"\n />\n </label>\n\n <select\n value={filters.status}\n onChange={(event) => setFilters((prev) => ({ ...prev, status: event.target.value }))}\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"all\">{tr('notifications.allStatuses', 'All Statuses')}</option>\n <option value=\"PENDING\">PENDING</option>\n <option value=\"TRIGGERED\">TRIGGERED</option>\n <option value=\"SENT\">SENT</option>\n <option value=\"FAILED\">FAILED</option>\n <option value=\"CANCELLED\">CANCELLED</option>\n </select>\n\n <select\n value={filters.channel}\n onChange={(event) => setFilters((prev) => ({ ...prev, channel: event.target.value }))}\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"all\">{tr('notifications.allChannels', 'All Channels')}</option>\n <option value=\"EMAIL\">EMAIL</option>\n <option value=\"SMS\">SMS</option>\n <option value=\"PUSH\">PUSH</option>\n <option value=\"WHATSAPP\">WHATSAPP</option>\n <option value=\"IN_APP\">IN_APP</option>\n </select>\n\n <select\n value={filters.deliveryStatus}\n onChange={(event) =>\n setFilters((prev) => ({ ...prev, deliveryStatus: event.target.value }))\n }\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"all\">{tr('notifications.allDeliveryStates', 'All Delivery')}</option>\n <option value=\"DELIVERED\">DELIVERED</option>\n <option value=\"OPENED\">OPENED</option>\n <option value=\"CLICKED\">CLICKED</option>\n <option value=\"FAILED\">FAILED</option>\n <option value=\"UNSUBSCRIBED\">UNSUBSCRIBED</option>\n </select>\n\n <select\n value={filters.topicId}\n onChange={(event) => setFilters((prev) => ({ ...prev, topicId: event.target.value }))}\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"\">{tr('notifications.allTopics', 'All Topics')}</option>\n {topics.map((topic) => (\n <option key={topic.id} value={topic.id}>\n {topic.name}\n </option>\n ))}\n </select>\n\n <select\n value={filters.archived}\n onChange={(event) =>\n setFilters((prev) => ({\n ...prev,\n archived: event.target.value as typeof prev.archived,\n }))\n }\n className=\"rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary\"\n >\n <option value=\"all\">{tr('notifications.activeAndArchived', 'Active + Archived')}</option>\n <option value=\"active\">{tr('notifications.activeOnly', 'Active Only')}</option>\n <option value=\"archived\">{tr('notifications.archivedOnly', 'Archived Only')}</option>\n </select>\n </div>\n\n <div className=\"grid gap-6 xl:grid-cols-[minmax(0,1fr),420px]\">\n <div className=\"space-y-6\">\n <section className=\"rounded-lg border border-default bg-surface p-4 shadow-sm\">\n <div className=\"mb-4 flex items-center justify-between\">\n <div>\n <h2 className=\"text-base font-semibold text-primary\">\n {tr('notifications.sentNotifications', 'Notifications')}\n </h2>\n <p className=\"text-sm text-secondary\">\n {notifications.length} {tr('notifications.resultsFoundShort', 'results')}\n </p>\n </div>\n {isLoading && <RefreshCw size={16} className=\"animate-spin text-tertiary\" />}\n </div>\n\n <div className=\"space-y-3\">\n {notifications.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-default p-6 text-sm text-secondary\">\n {tr('notifications.noNotificationsFound', 'No notifications found')}\n </div>\n ) : (\n notifications.map((notification) => (\n <button\n key={notification.id}\n type=\"button\"\n onClick={() => loadNotification(notification.id)}\n className=\"block w-full text-left\"\n >\n <NotificationCard\n notification={notification}\n compact\n showArchivedState\n analyticsSource=\"admin_history\"\n />\n </button>\n ))\n )}\n </div>\n </section>\n\n <section className=\"rounded-lg border border-default bg-surface p-4 shadow-sm\">\n <div className=\"mb-4 flex items-center gap-2\">\n <CalendarClock size={18} className=\"text-accent-primary\" />\n <h2 className=\"text-base font-semibold text-primary\">\n {tr('notifications.scheduledNotifications', 'Scheduled Notifications')}\n </h2>\n </div>\n\n <div className=\"space-y-3\">\n {scheduledNotifications.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-default p-6 text-sm text-secondary\">\n {tr('notifications.noScheduledNotifications', 'No scheduled notifications')}\n </div>\n ) : (\n scheduledNotifications.map((scheduled) => (\n <div\n key={scheduled.id}\n className=\"rounded-md border border-default bg-bg-canvas p-4\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h3 className=\"text-sm font-semibold text-primary\">\n {scheduled.notification.title}\n </h3>\n <p className=\"text-xs text-secondary\">\n {scheduled.notification.channel} • {scheduled.notification.type} •{' '}\n {formatDateTime(scheduled.scheduledFor)}\n </p>\n </div>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => loadNotification(scheduled.notification.id)}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.view', 'View')}\n </button>\n {scheduled.status === 'PENDING' && (\n <button\n type=\"button\"\n onClick={() => cancelScheduledNotification(scheduled.id)}\n className=\"rounded-md border border-status-error-border px-3 py-2 text-xs text-status-error-text hover:bg-status-error-bg-subtle\"\n >\n {tr('notifications.cancel', 'Cancel')}\n </button>\n )}\n </div>\n </div>\n </div>\n ))\n )}\n </div>\n </section>\n </div>\n\n <aside className=\"rounded-lg border border-default bg-surface p-4 shadow-sm\">\n {selectedNotification ? (\n <div className=\"space-y-4\">\n <div className=\"flex items-start justify-between gap-3\">\n <div>\n <h2 className=\"text-lg font-semibold text-primary\">\n {selectedNotification.title}\n </h2>\n <p className=\"text-sm text-secondary\">{selectedNotification.body}</p>\n </div>\n <button\n type=\"button\"\n onClick={clearSelection}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.close', 'Close')}\n </button>\n </div>\n\n <div className=\"grid gap-2 rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary\">\n <div>\n <strong>Status:</strong> {selectedNotification.status}\n </div>\n <div>\n <strong>Delivery:</strong> {selectedNotification.deliveryStatus || '—'}\n </div>\n <div>\n <strong>Topic:</strong> {selectedNotification.topic?.name || '—'}\n </div>\n <div>\n <strong>Created:</strong> {formatDateTime(selectedNotification.createdAt)}\n </div>\n <div>\n <strong>Sent:</strong> {formatDateTime(selectedNotification.sentAt)}\n </div>\n <div>\n <strong>Delivered:</strong> {formatDateTime(selectedNotification.deliveredAt)}\n </div>\n <div>\n <strong>Opened:</strong> {formatDateTime(selectedNotification.openedAt)}\n </div>\n <div>\n <strong>Clicked:</strong> {formatDateTime(selectedNotification.clickedAt)}\n </div>\n <div>\n <strong>Read:</strong> {formatDateTime(selectedNotification.readAt)}\n </div>\n <div>\n <strong>Recipient:</strong>{' '}\n {selectedNotification.recipientEmail ||\n selectedNotification.recipientPhone ||\n selectedNotification.id}\n </div>\n </div>\n\n {selectedNotification.media.length > 0 && (\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-primary\">\n {tr('notifications.media', 'Media')}\n </h3>\n <div className=\"grid gap-3\">\n {selectedNotification.media.map((item) => (\n <a\n key={item.url}\n href={item.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"rounded-md border border-default bg-bg-canvas p-3 text-sm text-accent-primary hover:underline\"\n >\n {item.label || item.url}\n </a>\n ))}\n </div>\n </div>\n )}\n\n {selectedNotification.actions.length > 0 && (\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-primary\">\n {tr('notifications.actions', 'Actions')}\n </h3>\n <div className=\"grid gap-2\">\n {selectedNotification.actions.map((action) => (\n <div\n key={action.id}\n className=\"rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary\"\n >\n <div className=\"font-medium text-primary\">{action.label}</div>\n <div className=\"truncate text-xs\">{action.url}</div>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {selectedNotification.scheduledNotification && (\n <div className=\"space-y-3 rounded-md border border-default bg-bg-canvas p-3\">\n <div className=\"text-sm font-semibold text-primary\">\n {tr('notifications.scheduling', 'Scheduling')}\n </div>\n <div className=\"text-sm text-secondary\">\n {formatDateTime(selectedNotification.scheduledNotification.scheduledFor)}\n </div>\n {selectedNotification.scheduledNotification.status === 'PENDING' && (\n <>\n <input\n type=\"datetime-local\"\n value={rescheduleAt}\n onChange={(event) => setRescheduleAt(event.target.value)}\n className=\"w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary\"\n />\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() =>\n rescheduleAt &&\n rescheduleNotification(\n selectedNotification.scheduledNotification!.id,\n new Date(rescheduleAt).toISOString()\n )\n }\n className=\"rounded-md bg-accent-primary px-3 py-2 text-xs font-medium text-text-inverse hover:opacity-90\"\n >\n {tr('notifications.reschedule', 'Reschedule')}\n </button>\n <button\n type=\"button\"\n onClick={() =>\n cancelScheduledNotification(\n selectedNotification.scheduledNotification!.id\n )\n }\n className=\"rounded-md border border-status-error-border px-3 py-2 text-xs text-status-error-text hover:bg-status-error-bg-subtle\"\n >\n {tr('notifications.cancel', 'Cancel')}\n </button>\n </div>\n </>\n )}\n </div>\n )}\n\n <div className=\"flex items-center gap-2\">\n {selectedNotification.archivedAt ? (\n <button\n type=\"button\"\n onClick={() => unarchiveNotification(selectedNotification.id)}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.restore', 'Restore')}\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={() => archiveNotification(selectedNotification.id)}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.archive', 'Archive')}\n </button>\n )}\n </div>\n\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-primary\">\n {tr('notifications.eventTimeline', 'Event Timeline')}\n </h3>\n <div className=\"space-y-2\">\n {events.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-default p-4 text-sm text-secondary\">\n {tr('notifications.noEvents', 'No events recorded yet.')}\n </div>\n ) : (\n events.map((event) => (\n <div\n key={event.id}\n className=\"rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary\"\n >\n <div className=\"font-medium text-primary\">{event.eventType}</div>\n <div>{formatDateTime(event.timestamp)}</div>\n {event.deliveryStatus && <div>Delivery: {event.deliveryStatus}</div>}\n </div>\n ))\n )}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"flex h-full min-h-[360px] items-center justify-center rounded-md border border-dashed border-default p-6 text-center text-sm text-secondary\">\n {tr(\n 'notifications.selectNotificationForDetails',\n 'Select a notification to inspect details, delivery receipts, and activity.'\n )}\n </div>\n )}\n </aside>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AASA,SAAS,EAAe,GAAuB;AAE7C,QADK,IACE,IAAI,KAAK,EAAM,CAAC,gBAAgB,GADpB;;AAKrB,SAAgB,IAA+B;CAC7C,IAAM,IAAK,GAAO,EACZ,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,EAAE,cAAW,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CAAA;WAC3C,EAAM,kBAAkB,kBAAC,OAAD,EAAA,UAAA,CAAK,cAAW,EAAM,eAAqB,EAAA,CAAA;WAChE;YANC,EAAM,GAMP,CACN;SAEA,CAAA,CACF;;OACF;UAEN,kBAAC,OAAD;MAAK,WAAU;gBACZ,EACC,8CACA,6EACD;MACG,CAAA;KAEF,CAAA,CACJ;;GACF;MA1ZJ,kBAAC,OAAD;EAAK,WAAU;YACZ,EACC,qCACA,0DACD;EACG,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationHistoryPage.d.ts","sourceRoot":"","sources":["../../src/pages/NotificationHistoryPage.tsx"],"names":[],"mappings":"AAWA,2FAA2F;AAC3F,wBAAgB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"NotificationHistoryPage.d.ts","sourceRoot":"","sources":["../../src/pages/NotificationHistoryPage.tsx"],"names":[],"mappings":"AAWA,2FAA2F;AAC3F,wBAAgB,uBAAuB,4CA+JtC"}
|
|
@@ -98,7 +98,8 @@ function m() {
|
|
|
98
98
|
notification: e,
|
|
99
99
|
onArchive: S,
|
|
100
100
|
onAction: w,
|
|
101
|
-
showArchivedState: !0
|
|
101
|
+
showArchivedState: !0,
|
|
102
|
+
analyticsSource: "history"
|
|
102
103
|
}), e.archivedAt && /* @__PURE__ */ d("div", {
|
|
103
104
|
className: "flex justify-end",
|
|
104
105
|
children: /* @__PURE__ */ d("button", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationHistoryPage.js","names":[],"sources":["../../src/pages/NotificationHistoryPage.tsx"],"sourcesContent":["import { Archive, Download, Search } from 'lucide-react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { useNotifications, useNotificationTopics } from '../hooks';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { useTr } from '../shared/hooks/useTr';\nimport { exportNotificationsAsCsv } from '../utils/notificationHistoryExport';\n\nconst HISTORY_FILTER = { archived: null, channel: 'ALL' as const };\n\n/** User Notification History — personal history, filter, CSV export, archive/unarchive. */\nexport function NotificationHistoryPage() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { currentUser } = useNotification();\n const { topics } = useNotificationTopics({ isActive: true });\n const {\n notifications,\n notificationFilter,\n updateFilter,\n archiveNotification,\n unarchiveNotification,\n recordAction,\n } = useNotifications({ baseFilter: HISTORY_FILTER });\n\n if (permissionsLoading) {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n }\n\n if (!hasPermission(NOTIFICATION_PERMISSIONS.NOTIFICATION_LIST) && !currentUser?.id) {\n return (\n <div className=\"p-8 text-center text-text-secondary\">\n {tr(\n 'notifications.noPermissionHistory',\n \"You don't have permission to view notification history.\"\n )}\n </div>\n );\n }\n\n return (\n <div className=\"space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-300\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-primary\">\n {tr('notifications.historyTitle', 'Notification History')}\n </h1>\n <p className=\"text-sm text-secondary mt-1\">\n {tr('notifications.historySubtitle', 'View and search all your notifications')}\n </p>\n </div>\n\n <button\n onClick={() => exportNotificationsAsCsv(tr, notifications)}\n disabled={notifications.length === 0}\n className=\"flex items-center gap-2 px-4 py-2 text-sm font-medium text-accent-primary hover:text-accent-primary/80 border border-accent-primary hover:border-accent-primary/80 rounded-lg transition-all duration-150 hover:shadow-sm disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <Download size={16} />\n {tr('notifications.export', 'Export')}\n </button>\n </div>\n\n <div className=\"grid gap-3 sm:grid-cols-2 xl:grid-cols-5\">\n <div className=\"relative sm:col-span-2 xl:col-span-2\">\n <Search size={16} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-tertiary\" />\n <input\n type=\"text\"\n placeholder={tr(\n 'notifications.searchByTitleOrContent',\n 'Search by title or content...'\n )}\n value={notificationFilter.search}\n onChange={(e) => updateFilter({ search: e.target.value })}\n className=\"w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n />\n </div>\n\n <select\n value={notificationFilter.topicId || ''}\n onChange={(event) => updateFilter({ topicId: event.target.value || undefined })}\n className=\"rounded-lg border border-default bg-surface px-3 py-2 text-sm text-primary\"\n >\n <option value=\"\">{tr('notifications.allTopics', 'All Topics')}</option>\n {topics.map((topic) => (\n <option key={topic.id} value={topic.id}>\n {topic.name}\n </option>\n ))}\n </select>\n\n <input\n type=\"date\"\n aria-label={tr('notifications.startDate', 'Start date')}\n value={\n notificationFilter.dateRange.start\n ? notificationFilter.dateRange.start.toISOString().split('T')[0]\n : ''\n }\n onChange={(e) =>\n updateFilter({\n dateRange: {\n ...notificationFilter.dateRange,\n start: e.target.value ? new Date(e.target.value) : null,\n },\n })\n }\n className=\"rounded-lg border border-default bg-surface px-3 py-2 text-sm text-primary\"\n />\n\n <input\n type=\"date\"\n aria-label={tr('notifications.endDate', 'End date')}\n value={\n notificationFilter.dateRange.end\n ? notificationFilter.dateRange.end.toISOString().split('T')[0]\n : ''\n }\n onChange={(e) =>\n updateFilter({\n dateRange: {\n ...notificationFilter.dateRange,\n end: e.target.value ? new Date(e.target.value) : null,\n },\n })\n }\n className=\"rounded-lg border border-default bg-surface px-3 py-2 text-sm text-primary\"\n />\n </div>\n\n <div className=\"space-y-2\">\n {notifications.length > 0 ? (\n notifications.map((notification) => (\n <div key={notification.id} className=\"space-y-2\">\n <NotificationCard\n notification={notification}\n onArchive={archiveNotification}\n onAction={recordAction}\n showArchivedState\n />\n {notification.archivedAt && (\n <div className=\"flex justify-end\">\n <button\n onClick={() => unarchiveNotification(notification.id)}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.restore', 'Restore')}\n </button>\n </div>\n )}\n </div>\n ))\n ) : (\n <div className=\"flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-300\">\n <Archive size={48} className=\"text-tertiary mb-4\" />\n <h3 className=\"text-lg font-semibold text-primary mb-2\">\n {tr('notifications.noNotificationsFound', 'No notifications found')}\n </h3>\n <p className=\"text-sm text-secondary\">\n {tr('notifications.adjustSearchOrDateRange', 'Try adjusting your filters')}\n </p>\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAM,IAAiB;CAAE,UAAU;CAAM,SAAS;CAAgB;AAGlE,SAAgB,IAA0B;CACxC,IAAM,IAAK,GAAO,EACZ,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,EAAE,mBAAgB,GAAiB,EACnC,EAAE,cAAW,EAAsB,EAAE,UAAU,IAAM,CAAC,EACtD,EACJ,kBACA,uBACA,iBACA,wBACA,0BACA,oBACE,EAAiB,EAAE,YAAY,GAAgB,CAAC;AAqBpD,QAnBI,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,kFAAmF,CAAA;EAC9F,CAAA,GAIN,CAAC,EAAc,EAAyB,kBAAkB,IAAI,CAAC,GAAa,KAE5E,kBAAC,OAAD;EAAK,WAAU;YACZ,EACC,qCACA,0DACD;EACG,CAAA,GAKR,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eACX,EAAG,8BAA8B,uBAAuB;KACtD,CAAA,EACL,kBAAC,KAAD;KAAG,WAAU;eACV,EAAG,iCAAiC,yCAAyC;KAC5E,CAAA,CACA,EAAA,CAAA,EAEN,kBAAC,UAAD;KACE,eAAe,EAAyB,GAAI,EAAc;KAC1D,UAAU,E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tB,KAAK,EAAE,OAAO,QAAQ,IAAI,KAAK,EAAE,OAAO,MAAM,GAAG;OAClD,EACF,CAAC;MAEJ,WAAU;MACV,CAAA;KACE;;GAEN,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAc,SAAS,IACtB,EAAc,KAAK,MACjB,kBAAC,OAAD;KAA2B,WAAU;eAArC,CACE,kBAAC,GAAD;MACgB;MACd,WAAW;MACX,UAAU;MACV,mBAAA;MACA,CAAA,EACD,EAAa,cACZ,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,UAAD;OACE,eAAe,EAAsB,EAAa,GAAG;OACrD,WAAU;iBAET,EAAG,yBAAyB,UAAU;OAChC,CAAA;MACL,CAAA,CAEJ;
|
|
1
|
+
{"version":3,"file":"NotificationHistoryPage.js","names":[],"sources":["../../src/pages/NotificationHistoryPage.tsx"],"sourcesContent":["import { Archive, Download, Search } from 'lucide-react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { useNotifications, useNotificationTopics } from '../hooks';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { useTr } from '../shared/hooks/useTr';\nimport { exportNotificationsAsCsv } from '../utils/notificationHistoryExport';\n\nconst HISTORY_FILTER = { archived: null, channel: 'ALL' as const };\n\n/** User Notification History — personal history, filter, CSV export, archive/unarchive. */\nexport function NotificationHistoryPage() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { currentUser } = useNotification();\n const { topics } = useNotificationTopics({ isActive: true });\n const {\n notifications,\n notificationFilter,\n updateFilter,\n archiveNotification,\n unarchiveNotification,\n recordAction,\n } = useNotifications({ baseFilter: HISTORY_FILTER });\n\n if (permissionsLoading) {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n }\n\n if (!hasPermission(NOTIFICATION_PERMISSIONS.NOTIFICATION_LIST) && !currentUser?.id) {\n return (\n <div className=\"p-8 text-center text-text-secondary\">\n {tr(\n 'notifications.noPermissionHistory',\n \"You don't have permission to view notification history.\"\n )}\n </div>\n );\n }\n\n return (\n <div className=\"space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-300\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-primary\">\n {tr('notifications.historyTitle', 'Notification History')}\n </h1>\n <p className=\"text-sm text-secondary mt-1\">\n {tr('notifications.historySubtitle', 'View and search all your notifications')}\n </p>\n </div>\n\n <button\n onClick={() => exportNotificationsAsCsv(tr, notifications)}\n disabled={notifications.length === 0}\n className=\"flex items-center gap-2 px-4 py-2 text-sm font-medium text-accent-primary hover:text-accent-primary/80 border border-accent-primary hover:border-accent-primary/80 rounded-lg transition-all duration-150 hover:shadow-sm disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <Download size={16} />\n {tr('notifications.export', 'Export')}\n </button>\n </div>\n\n <div className=\"grid gap-3 sm:grid-cols-2 xl:grid-cols-5\">\n <div className=\"relative sm:col-span-2 xl:col-span-2\">\n <Search size={16} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-tertiary\" />\n <input\n type=\"text\"\n placeholder={tr(\n 'notifications.searchByTitleOrContent',\n 'Search by title or content...'\n )}\n value={notificationFilter.search}\n onChange={(e) => updateFilter({ search: e.target.value })}\n className=\"w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n />\n </div>\n\n <select\n value={notificationFilter.topicId || ''}\n onChange={(event) => updateFilter({ topicId: event.target.value || undefined })}\n className=\"rounded-lg border border-default bg-surface px-3 py-2 text-sm text-primary\"\n >\n <option value=\"\">{tr('notifications.allTopics', 'All Topics')}</option>\n {topics.map((topic) => (\n <option key={topic.id} value={topic.id}>\n {topic.name}\n </option>\n ))}\n </select>\n\n <input\n type=\"date\"\n aria-label={tr('notifications.startDate', 'Start date')}\n value={\n notificationFilter.dateRange.start\n ? notificationFilter.dateRange.start.toISOString().split('T')[0]\n : ''\n }\n onChange={(e) =>\n updateFilter({\n dateRange: {\n ...notificationFilter.dateRange,\n start: e.target.value ? new Date(e.target.value) : null,\n },\n })\n }\n className=\"rounded-lg border border-default bg-surface px-3 py-2 text-sm text-primary\"\n />\n\n <input\n type=\"date\"\n aria-label={tr('notifications.endDate', 'End date')}\n value={\n notificationFilter.dateRange.end\n ? notificationFilter.dateRange.end.toISOString().split('T')[0]\n : ''\n }\n onChange={(e) =>\n updateFilter({\n dateRange: {\n ...notificationFilter.dateRange,\n end: e.target.value ? new Date(e.target.value) : null,\n },\n })\n }\n className=\"rounded-lg border border-default bg-surface px-3 py-2 text-sm text-primary\"\n />\n </div>\n\n <div className=\"space-y-2\">\n {notifications.length > 0 ? (\n notifications.map((notification) => (\n <div key={notification.id} className=\"space-y-2\">\n <NotificationCard\n notification={notification}\n onArchive={archiveNotification}\n onAction={recordAction}\n showArchivedState\n analyticsSource=\"history\"\n />\n {notification.archivedAt && (\n <div className=\"flex justify-end\">\n <button\n onClick={() => unarchiveNotification(notification.id)}\n className=\"rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-muted\"\n >\n {tr('notifications.restore', 'Restore')}\n </button>\n </div>\n )}\n </div>\n ))\n ) : (\n <div className=\"flex flex-col items-center justify-center py-12 text-center animate-in fade-in duration-300\">\n <Archive size={48} className=\"text-tertiary mb-4\" />\n <h3 className=\"text-lg font-semibold text-primary mb-2\">\n {tr('notifications.noNotificationsFound', 'No notifications found')}\n </h3>\n <p className=\"text-sm text-secondary\">\n {tr('notifications.adjustSearchOrDateRange', 'Try adjusting your filters')}\n </p>\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AASA,IAAM,IAAiB;CAAE,UAAU;CAAM,SAAS;CAAgB;AA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ACL,CAAA,CAEJ;OAlBI,EAAa,GAkBjB,CACN,GAEF,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD;OAAS,MAAM;OAAI,WAAU;OAAuB,CAAA;MACpD,kBAAC,MAAD;OAAI,WAAU;iBACX,EAAG,sCAAsC,yBAAyB;OAChE,CAAA;MACL,kBAAC,KAAD;OAAG,WAAU;iBACV,EAAG,yCAAyC,6BAA6B;OACxE,CAAA;MACA;;IAEJ,CAAA;GACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPreferencesPage.d.ts","sourceRoot":"","sources":["../../src/pages/NotificationPreferencesPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NotificationPreferencesPage.d.ts","sourceRoot":"","sources":["../../src/pages/NotificationPreferencesPage.tsx"],"names":[],"mappings":"AAuCA,wBAAgB,2BAA2B,4CAmV1C"}
|