@burdenoff/microfe-notification 2026.625.1 → 2026.626.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/components/NotificationBell.js +1 -1
- package/dist/components/NotificationBell.js.map +1 -1
- package/dist/components/NotificationCard.js +1 -1
- package/dist/components/NotificationCard.js.map +1 -1
- package/dist/pages/CreateNotificationPage.js +475 -453
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.js +102 -94
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +140 -100
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +48 -53
- package/dist/pages/NotificationHistoryPage.js.map +1 -1
- package/dist/pages/NotificationPreferencesPage.js +77 -72
- package/dist/pages/NotificationPreferencesPage.js.map +1 -1
- package/dist/pages/NotificationTemplatesPage.js +129 -102
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +258 -209
- package/dist/pages/NotificationTopicsPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.js +350 -319
- package/dist/pages/TemplateEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -9,37 +9,71 @@ import { useState as o } from "react";
|
|
|
9
9
|
import { usePermissions as s } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
10
10
|
import { CalendarClock as c, Download as l, RefreshCw as u, Search as d } from "lucide-react";
|
|
11
11
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
|
-
import { Button as h,
|
|
12
|
+
import { Button as h, EmphasisPanel as g, GlassCard as _, IllustratedEmptyState as v, NextSteps as y, PagePurpose as b, ShowMore as x } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
//#region src/pages/NotificationHistoryAdminPage.tsx
|
|
14
|
-
function
|
|
14
|
+
function S(e) {
|
|
15
15
|
return e ? new Date(e).toLocaleString() : "—";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
return
|
|
17
|
+
function C() {
|
|
18
|
+
let C = n(), { hasPermission: w, isLoading: T } = s(), { topics: E } = t(), { filters: D, setFilters: O, notifications: k, scheduledNotifications: A, selectedNotification: j, events: M, isLoading: N, loadNotification: P, archiveNotification: F, unarchiveNotification: I, cancelScheduledNotification: L, rescheduleNotification: R, clearSelection: z } = e(), [B, V] = o("");
|
|
19
|
+
return T ? /* @__PURE__ */ p("div", {
|
|
20
20
|
className: "flex h-64 items-center justify-center",
|
|
21
21
|
children: /* @__PURE__ */ p("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
|
|
22
|
-
}) :
|
|
22
|
+
}) : w(i.NOTIFICATION_LIST) ? /* @__PURE__ */ m("div", {
|
|
23
23
|
className: "space-y-4 sm:space-y-6",
|
|
24
24
|
children: [
|
|
25
|
+
/* @__PURE__ */ p(b, {
|
|
26
|
+
icon: /* @__PURE__ */ p(c, { size: 16 }),
|
|
27
|
+
children: C("notifications.adminHistoryPurpose", "The operations console for everything your team has sent. Audit delivery outcomes (delivered, opened, clicked, failed, unsubscribed), inspect a single notification’s full event timeline, and manage the schedule — reschedule or cancel anything still pending. Use it to debug a campaign or prove a notification went out.")
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ p(y, {
|
|
30
|
+
storageKey: "notification-admin-history",
|
|
31
|
+
steps: [
|
|
32
|
+
{
|
|
33
|
+
id: "inspect",
|
|
34
|
+
label: C("notifications.nextInspectLabel", "Inspect a delivery"),
|
|
35
|
+
description: C("notifications.nextInspectDesc", "Click any notification to see its receipts, opens, clicks and full event timeline."),
|
|
36
|
+
onClick: () => {
|
|
37
|
+
k[0] && P(k[0].id);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "failed",
|
|
42
|
+
label: C("notifications.nextFailedLabel", "Find failed deliveries"),
|
|
43
|
+
description: C("notifications.nextFailedDesc", "Filter by a FAILED delivery state to triage what did not reach recipients."),
|
|
44
|
+
onClick: () => O((e) => ({
|
|
45
|
+
...e,
|
|
46
|
+
deliveryStatus: "FAILED"
|
|
47
|
+
}))
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "export",
|
|
51
|
+
label: C("notifications.nextExportLabel", "Export the current view"),
|
|
52
|
+
description: C("notifications.nextExportDesc", "Download the filtered results as CSV for reporting or an external audit."),
|
|
53
|
+
onClick: () => {
|
|
54
|
+
k.length > 0 && a(C, k);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}),
|
|
25
59
|
/* @__PURE__ */ m("div", {
|
|
26
60
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
27
61
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
28
62
|
className: "text-xl sm:text-2xl font-bold text-primary",
|
|
29
|
-
children:
|
|
63
|
+
children: C("notifications.adminHistoryTitle", "Notification Operations")
|
|
30
64
|
}), /* @__PURE__ */ p("p", {
|
|
31
65
|
className: "text-sm text-secondary mt-1",
|
|
32
|
-
children:
|
|
66
|
+
children: C("notifications.adminHistorySubtitle", "Review sent and scheduled notifications, delivery outcomes, opens, clicks, and user activity.")
|
|
33
67
|
})] }), /* @__PURE__ */ m(h, {
|
|
34
68
|
type: "button",
|
|
35
69
|
variant: "outline",
|
|
36
|
-
onClick: () => a(
|
|
37
|
-
disabled:
|
|
70
|
+
onClick: () => a(C, k),
|
|
71
|
+
disabled: k.length === 0,
|
|
38
72
|
className: "gap-2",
|
|
39
|
-
children: [/* @__PURE__ */ p(l, { size: 16 }),
|
|
73
|
+
children: [/* @__PURE__ */ p(l, { size: 16 }), C("notifications.export", "Export")]
|
|
40
74
|
})]
|
|
41
75
|
}),
|
|
42
|
-
/* @__PURE__ */ m(
|
|
76
|
+
/* @__PURE__ */ m(_, {
|
|
43
77
|
treatment: "plain",
|
|
44
78
|
className: "grid gap-3 border-border-seam p-4 lg:grid-cols-6",
|
|
45
79
|
children: [
|
|
@@ -50,18 +84,18 @@ function y() {
|
|
|
50
84
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-tertiary"
|
|
51
85
|
}), /* @__PURE__ */ p("input", {
|
|
52
86
|
type: "text",
|
|
53
|
-
value:
|
|
54
|
-
onChange: (e) =>
|
|
87
|
+
value: D.search,
|
|
88
|
+
onChange: (e) => O((t) => ({
|
|
55
89
|
...t,
|
|
56
90
|
search: e.target.value
|
|
57
91
|
})),
|
|
58
|
-
placeholder:
|
|
92
|
+
placeholder: C("notifications.searchByTitleOrContent", "Search by title or content..."),
|
|
59
93
|
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"
|
|
60
94
|
})]
|
|
61
95
|
}),
|
|
62
96
|
/* @__PURE__ */ m("select", {
|
|
63
|
-
value:
|
|
64
|
-
onChange: (e) =>
|
|
97
|
+
value: D.status,
|
|
98
|
+
onChange: (e) => O((t) => ({
|
|
65
99
|
...t,
|
|
66
100
|
status: e.target.value
|
|
67
101
|
})),
|
|
@@ -69,7 +103,7 @@ function y() {
|
|
|
69
103
|
children: [
|
|
70
104
|
/* @__PURE__ */ p("option", {
|
|
71
105
|
value: "all",
|
|
72
|
-
children:
|
|
106
|
+
children: C("notifications.allStatuses", "All Statuses")
|
|
73
107
|
}),
|
|
74
108
|
/* @__PURE__ */ p("option", {
|
|
75
109
|
value: "PENDING",
|
|
@@ -94,8 +128,8 @@ function y() {
|
|
|
94
128
|
]
|
|
95
129
|
}),
|
|
96
130
|
/* @__PURE__ */ m("select", {
|
|
97
|
-
value:
|
|
98
|
-
onChange: (e) =>
|
|
131
|
+
value: D.channel,
|
|
132
|
+
onChange: (e) => O((t) => ({
|
|
99
133
|
...t,
|
|
100
134
|
channel: e.target.value
|
|
101
135
|
})),
|
|
@@ -103,7 +137,7 @@ function y() {
|
|
|
103
137
|
children: [
|
|
104
138
|
/* @__PURE__ */ p("option", {
|
|
105
139
|
value: "all",
|
|
106
|
-
children:
|
|
140
|
+
children: C("notifications.allChannels", "All Channels")
|
|
107
141
|
}),
|
|
108
142
|
/* @__PURE__ */ p("option", {
|
|
109
143
|
value: "EMAIL",
|
|
@@ -128,8 +162,8 @@ function y() {
|
|
|
128
162
|
]
|
|
129
163
|
}),
|
|
130
164
|
/* @__PURE__ */ m("select", {
|
|
131
|
-
value:
|
|
132
|
-
onChange: (e) =>
|
|
165
|
+
value: D.deliveryStatus,
|
|
166
|
+
onChange: (e) => O((t) => ({
|
|
133
167
|
...t,
|
|
134
168
|
deliveryStatus: e.target.value
|
|
135
169
|
})),
|
|
@@ -137,7 +171,7 @@ function y() {
|
|
|
137
171
|
children: [
|
|
138
172
|
/* @__PURE__ */ p("option", {
|
|
139
173
|
value: "all",
|
|
140
|
-
children:
|
|
174
|
+
children: C("notifications.allDeliveryStates", "All Delivery")
|
|
141
175
|
}),
|
|
142
176
|
/* @__PURE__ */ p("option", {
|
|
143
177
|
value: "DELIVERED",
|
|
@@ -162,23 +196,23 @@ function y() {
|
|
|
162
196
|
]
|
|
163
197
|
}),
|
|
164
198
|
/* @__PURE__ */ m("select", {
|
|
165
|
-
value:
|
|
166
|
-
onChange: (e) =>
|
|
199
|
+
value: D.topicId,
|
|
200
|
+
onChange: (e) => O((t) => ({
|
|
167
201
|
...t,
|
|
168
202
|
topicId: e.target.value
|
|
169
203
|
})),
|
|
170
204
|
className: "rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary",
|
|
171
205
|
children: [/* @__PURE__ */ p("option", {
|
|
172
206
|
value: "",
|
|
173
|
-
children:
|
|
174
|
-
}),
|
|
207
|
+
children: C("notifications.allTopics", "All Topics")
|
|
208
|
+
}), E.map((e) => /* @__PURE__ */ p("option", {
|
|
175
209
|
value: e.id,
|
|
176
210
|
children: e.name
|
|
177
211
|
}, e.id))]
|
|
178
212
|
}),
|
|
179
213
|
/* @__PURE__ */ m("select", {
|
|
180
|
-
value:
|
|
181
|
-
onChange: (e) =>
|
|
214
|
+
value: D.archived,
|
|
215
|
+
onChange: (e) => O((t) => ({
|
|
182
216
|
...t,
|
|
183
217
|
archived: e.target.value
|
|
184
218
|
})),
|
|
@@ -186,15 +220,15 @@ function y() {
|
|
|
186
220
|
children: [
|
|
187
221
|
/* @__PURE__ */ p("option", {
|
|
188
222
|
value: "all",
|
|
189
|
-
children:
|
|
223
|
+
children: C("notifications.activeAndArchived", "Active + Archived")
|
|
190
224
|
}),
|
|
191
225
|
/* @__PURE__ */ p("option", {
|
|
192
226
|
value: "active",
|
|
193
|
-
children:
|
|
227
|
+
children: C("notifications.activeOnly", "Active Only")
|
|
194
228
|
}),
|
|
195
229
|
/* @__PURE__ */ p("option", {
|
|
196
230
|
value: "archived",
|
|
197
|
-
children:
|
|
231
|
+
children: C("notifications.archivedOnly", "Archived Only")
|
|
198
232
|
})
|
|
199
233
|
]
|
|
200
234
|
})
|
|
@@ -204,32 +238,33 @@ function y() {
|
|
|
204
238
|
className: "grid gap-6 xl:grid-cols-[minmax(0,1fr),420px]",
|
|
205
239
|
children: [/* @__PURE__ */ m("div", {
|
|
206
240
|
className: "space-y-6",
|
|
207
|
-
children: [/* @__PURE__ */ m(
|
|
208
|
-
className: "
|
|
241
|
+
children: [/* @__PURE__ */ m(g, {
|
|
242
|
+
className: "p-4",
|
|
209
243
|
children: [/* @__PURE__ */ m("div", {
|
|
210
244
|
className: "mb-4 flex items-center justify-between",
|
|
211
245
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
|
|
212
246
|
className: "text-base font-semibold text-primary",
|
|
213
|
-
children:
|
|
247
|
+
children: C("notifications.sentNotifications", "Notifications")
|
|
214
248
|
}), /* @__PURE__ */ m("p", {
|
|
215
249
|
className: "text-sm text-secondary",
|
|
216
250
|
children: [
|
|
217
|
-
|
|
251
|
+
k.length,
|
|
218
252
|
" ",
|
|
219
|
-
|
|
253
|
+
C("notifications.resultsFoundShort", "results")
|
|
220
254
|
]
|
|
221
|
-
})] }),
|
|
255
|
+
})] }), N && /* @__PURE__ */ p(u, {
|
|
222
256
|
size: 16,
|
|
223
257
|
className: "animate-spin text-tertiary"
|
|
224
258
|
})]
|
|
225
259
|
}), /* @__PURE__ */ p("div", {
|
|
226
260
|
className: "space-y-3",
|
|
227
|
-
children:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
261
|
+
children: k.length === 0 ? /* @__PURE__ */ p(v, {
|
|
262
|
+
illustration: "empty-search",
|
|
263
|
+
title: C("notifications.noNotificationsFound", "No notifications found"),
|
|
264
|
+
description: C("notifications.adjustSearchOrDateRange", "Try adjusting your filters")
|
|
265
|
+
}) : k.map((e) => /* @__PURE__ */ p("button", {
|
|
231
266
|
type: "button",
|
|
232
|
-
onClick: () =>
|
|
267
|
+
onClick: () => P(e.id),
|
|
233
268
|
className: "block w-full text-left",
|
|
234
269
|
children: /* @__PURE__ */ p(r, {
|
|
235
270
|
notification: e,
|
|
@@ -248,14 +283,15 @@ function y() {
|
|
|
248
283
|
className: "text-accent-primary"
|
|
249
284
|
}), /* @__PURE__ */ p("h2", {
|
|
250
285
|
className: "text-base font-semibold text-primary",
|
|
251
|
-
children:
|
|
286
|
+
children: C("notifications.scheduledNotifications", "Scheduled Notifications")
|
|
252
287
|
})]
|
|
253
288
|
}), /* @__PURE__ */ p("div", {
|
|
254
289
|
className: "space-y-3",
|
|
255
|
-
children:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
290
|
+
children: A.length === 0 ? /* @__PURE__ */ p(v, {
|
|
291
|
+
illustration: "empty-data",
|
|
292
|
+
title: C("notifications.noScheduledNotifications", "No scheduled notifications"),
|
|
293
|
+
description: C("notifications.noScheduledDescription", "Notifications queued for a future send time will appear here, ready to reschedule or cancel.")
|
|
294
|
+
}) : A.map((e) => /* @__PURE__ */ p("div", {
|
|
259
295
|
className: "rounded-md border border-default bg-bg-canvas p-4",
|
|
260
296
|
children: /* @__PURE__ */ m("div", {
|
|
261
297
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
@@ -270,20 +306,20 @@ function y() {
|
|
|
270
306
|
e.notification.type,
|
|
271
307
|
" •",
|
|
272
308
|
" ",
|
|
273
|
-
|
|
309
|
+
S(e.scheduledFor)
|
|
274
310
|
]
|
|
275
311
|
})] }), /* @__PURE__ */ m("div", {
|
|
276
312
|
className: "flex items-center gap-2",
|
|
277
313
|
children: [/* @__PURE__ */ p("button", {
|
|
278
314
|
type: "button",
|
|
279
|
-
onClick: () =>
|
|
315
|
+
onClick: () => P(e.notification.id),
|
|
280
316
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
281
|
-
children:
|
|
317
|
+
children: C("notifications.view", "View")
|
|
282
318
|
}), e.status === "PENDING" && /* @__PURE__ */ p("button", {
|
|
283
319
|
type: "button",
|
|
284
|
-
onClick: () =>
|
|
320
|
+
onClick: () => L(e.id),
|
|
285
321
|
className: "rounded-md border border-status-error-border px-3 py-2 text-xs text-status-error-text hover:bg-status-error-bg-subtle",
|
|
286
|
-
children:
|
|
322
|
+
children: C("notifications.cancel", "Cancel")
|
|
287
323
|
})]
|
|
288
324
|
})]
|
|
289
325
|
})
|
|
@@ -292,22 +328,22 @@ function y() {
|
|
|
292
328
|
})]
|
|
293
329
|
}), /* @__PURE__ */ p("aside", {
|
|
294
330
|
className: "rounded-lg border border-border-seam bg-gloss-card p-4 xl:sticky xl:top-4 xl:max-h-[calc(100vh-2rem)] xl:self-start xl:overflow-y-auto",
|
|
295
|
-
children:
|
|
331
|
+
children: j ? /* @__PURE__ */ m("div", {
|
|
296
332
|
className: "space-y-4",
|
|
297
333
|
children: [
|
|
298
334
|
/* @__PURE__ */ m("div", {
|
|
299
335
|
className: "flex items-start justify-between gap-3",
|
|
300
336
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
|
|
301
337
|
className: "text-lg font-semibold text-primary",
|
|
302
|
-
children:
|
|
338
|
+
children: j.title
|
|
303
339
|
}), /* @__PURE__ */ p("p", {
|
|
304
340
|
className: "text-sm text-secondary",
|
|
305
|
-
children:
|
|
341
|
+
children: j.body
|
|
306
342
|
})] }), /* @__PURE__ */ p("button", {
|
|
307
343
|
type: "button",
|
|
308
|
-
onClick:
|
|
344
|
+
onClick: z,
|
|
309
345
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
310
|
-
children:
|
|
346
|
+
children: C("notifications.close", "Close")
|
|
311
347
|
})]
|
|
312
348
|
}),
|
|
313
349
|
/* @__PURE__ */ m("div", {
|
|
@@ -316,63 +352,63 @@ function y() {
|
|
|
316
352
|
/* @__PURE__ */ m("div", { children: [
|
|
317
353
|
/* @__PURE__ */ p("strong", { children: "Status:" }),
|
|
318
354
|
" ",
|
|
319
|
-
|
|
355
|
+
j.status
|
|
320
356
|
] }),
|
|
321
357
|
/* @__PURE__ */ m("div", { children: [
|
|
322
358
|
/* @__PURE__ */ p("strong", { children: "Delivery:" }),
|
|
323
359
|
" ",
|
|
324
|
-
|
|
360
|
+
j.deliveryStatus || "—"
|
|
325
361
|
] }),
|
|
326
362
|
/* @__PURE__ */ m("div", { children: [
|
|
327
363
|
/* @__PURE__ */ p("strong", { children: "Topic:" }),
|
|
328
364
|
" ",
|
|
329
|
-
|
|
365
|
+
j.topic?.name || "—"
|
|
330
366
|
] }),
|
|
331
367
|
/* @__PURE__ */ m("div", { children: [
|
|
332
368
|
/* @__PURE__ */ p("strong", { children: "Created:" }),
|
|
333
369
|
" ",
|
|
334
|
-
|
|
370
|
+
S(j.createdAt)
|
|
335
371
|
] }),
|
|
336
372
|
/* @__PURE__ */ m("div", { children: [
|
|
337
373
|
/* @__PURE__ */ p("strong", { children: "Sent:" }),
|
|
338
374
|
" ",
|
|
339
|
-
|
|
375
|
+
S(j.sentAt)
|
|
340
376
|
] }),
|
|
341
377
|
/* @__PURE__ */ m("div", { children: [
|
|
342
378
|
/* @__PURE__ */ p("strong", { children: "Delivered:" }),
|
|
343
379
|
" ",
|
|
344
|
-
|
|
380
|
+
S(j.deliveredAt)
|
|
345
381
|
] }),
|
|
346
382
|
/* @__PURE__ */ m("div", { children: [
|
|
347
383
|
/* @__PURE__ */ p("strong", { children: "Opened:" }),
|
|
348
384
|
" ",
|
|
349
|
-
|
|
385
|
+
S(j.openedAt)
|
|
350
386
|
] }),
|
|
351
387
|
/* @__PURE__ */ m("div", { children: [
|
|
352
388
|
/* @__PURE__ */ p("strong", { children: "Clicked:" }),
|
|
353
389
|
" ",
|
|
354
|
-
|
|
390
|
+
S(j.clickedAt)
|
|
355
391
|
] }),
|
|
356
392
|
/* @__PURE__ */ m("div", { children: [
|
|
357
393
|
/* @__PURE__ */ p("strong", { children: "Read:" }),
|
|
358
394
|
" ",
|
|
359
|
-
|
|
395
|
+
S(j.readAt)
|
|
360
396
|
] }),
|
|
361
397
|
/* @__PURE__ */ m("div", { children: [
|
|
362
398
|
/* @__PURE__ */ p("strong", { children: "Recipient:" }),
|
|
363
399
|
" ",
|
|
364
|
-
|
|
400
|
+
j.recipientEmail || j.recipientPhone || j.id
|
|
365
401
|
] })
|
|
366
402
|
]
|
|
367
403
|
}),
|
|
368
|
-
|
|
404
|
+
j.media.length > 0 && /* @__PURE__ */ m("div", {
|
|
369
405
|
className: "space-y-2",
|
|
370
406
|
children: [/* @__PURE__ */ p("h3", {
|
|
371
407
|
className: "text-sm font-semibold text-primary",
|
|
372
|
-
children:
|
|
408
|
+
children: C("notifications.media", "Media")
|
|
373
409
|
}), /* @__PURE__ */ p("div", {
|
|
374
410
|
className: "grid gap-3",
|
|
375
|
-
children:
|
|
411
|
+
children: j.media.map((e) => /* @__PURE__ */ p("a", {
|
|
376
412
|
href: e.url,
|
|
377
413
|
target: "_blank",
|
|
378
414
|
rel: "noreferrer",
|
|
@@ -381,14 +417,14 @@ function y() {
|
|
|
381
417
|
}, e.url))
|
|
382
418
|
})]
|
|
383
419
|
}),
|
|
384
|
-
|
|
420
|
+
j.actions.length > 0 && /* @__PURE__ */ m("div", {
|
|
385
421
|
className: "space-y-2",
|
|
386
422
|
children: [/* @__PURE__ */ p("h3", {
|
|
387
423
|
className: "text-sm font-semibold text-primary",
|
|
388
|
-
children:
|
|
424
|
+
children: C("notifications.actions", "Actions")
|
|
389
425
|
}), /* @__PURE__ */ p("div", {
|
|
390
426
|
className: "grid gap-2",
|
|
391
|
-
children:
|
|
427
|
+
children: j.actions.map((e) => /* @__PURE__ */ m("div", {
|
|
392
428
|
className: "rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary",
|
|
393
429
|
children: [/* @__PURE__ */ p("div", {
|
|
394
430
|
className: "font-medium text-primary",
|
|
@@ -400,72 +436,72 @@ function y() {
|
|
|
400
436
|
}, e.id))
|
|
401
437
|
})]
|
|
402
438
|
}),
|
|
403
|
-
|
|
439
|
+
j.scheduledNotification && /* @__PURE__ */ m("div", {
|
|
404
440
|
className: "space-y-3 rounded-md border border-default bg-bg-canvas p-3",
|
|
405
441
|
children: [
|
|
406
442
|
/* @__PURE__ */ p("div", {
|
|
407
443
|
className: "text-sm font-semibold text-primary",
|
|
408
|
-
children:
|
|
444
|
+
children: C("notifications.scheduling", "Scheduling")
|
|
409
445
|
}),
|
|
410
446
|
/* @__PURE__ */ p("div", {
|
|
411
447
|
className: "text-sm text-secondary",
|
|
412
|
-
children:
|
|
448
|
+
children: S(j.scheduledNotification.scheduledFor)
|
|
413
449
|
}),
|
|
414
|
-
|
|
450
|
+
j.scheduledNotification.status === "PENDING" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("input", {
|
|
415
451
|
type: "datetime-local",
|
|
416
|
-
value:
|
|
417
|
-
onChange: (e) =>
|
|
452
|
+
value: B,
|
|
453
|
+
onChange: (e) => V(e.target.value),
|
|
418
454
|
className: "w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary"
|
|
419
455
|
}), /* @__PURE__ */ m("div", {
|
|
420
456
|
className: "flex items-center gap-2",
|
|
421
457
|
children: [/* @__PURE__ */ p("button", {
|
|
422
458
|
type: "button",
|
|
423
|
-
onClick: () =>
|
|
459
|
+
onClick: () => B && R(j.scheduledNotification.id, new Date(B).toISOString()),
|
|
424
460
|
className: "rounded-md bg-accent-primary px-3 py-2 text-xs font-medium text-text-inverse hover:opacity-90",
|
|
425
|
-
children:
|
|
461
|
+
children: C("notifications.reschedule", "Reschedule")
|
|
426
462
|
}), /* @__PURE__ */ p("button", {
|
|
427
463
|
type: "button",
|
|
428
|
-
onClick: () =>
|
|
464
|
+
onClick: () => L(j.scheduledNotification.id),
|
|
429
465
|
className: "rounded-md border border-status-error-border px-3 py-2 text-xs text-status-error-text hover:bg-status-error-bg-subtle",
|
|
430
|
-
children:
|
|
466
|
+
children: C("notifications.cancel", "Cancel")
|
|
431
467
|
})]
|
|
432
468
|
})] })
|
|
433
469
|
]
|
|
434
470
|
}),
|
|
435
471
|
/* @__PURE__ */ p("div", {
|
|
436
472
|
className: "flex items-center gap-2",
|
|
437
|
-
children:
|
|
473
|
+
children: j.archivedAt ? /* @__PURE__ */ p("button", {
|
|
438
474
|
type: "button",
|
|
439
|
-
onClick: () =>
|
|
475
|
+
onClick: () => I(j.id),
|
|
440
476
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
441
|
-
children:
|
|
477
|
+
children: C("notifications.restore", "Restore")
|
|
442
478
|
}) : /* @__PURE__ */ p("button", {
|
|
443
479
|
type: "button",
|
|
444
|
-
onClick: () => j
|
|
480
|
+
onClick: () => F(j.id),
|
|
445
481
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
446
|
-
children:
|
|
482
|
+
children: C("notifications.archive", "Archive")
|
|
447
483
|
})
|
|
448
484
|
}),
|
|
449
485
|
/* @__PURE__ */ m("div", {
|
|
450
486
|
className: "space-y-2",
|
|
451
487
|
children: [/* @__PURE__ */ p("h3", {
|
|
452
488
|
className: "text-sm font-semibold text-primary",
|
|
453
|
-
children:
|
|
454
|
-
}),
|
|
489
|
+
children: C("notifications.eventTimeline", "Event Timeline")
|
|
490
|
+
}), M.length === 0 ? /* @__PURE__ */ p("div", {
|
|
455
491
|
className: "rounded-md border border-dashed border-border-seam p-4 text-sm text-secondary",
|
|
456
|
-
children:
|
|
457
|
-
}) : /* @__PURE__ */ p(
|
|
492
|
+
children: C("notifications.noEvents", "No events recorded yet.")
|
|
493
|
+
}) : /* @__PURE__ */ p(x, {
|
|
458
494
|
collapsedHeight: 180,
|
|
459
495
|
children: /* @__PURE__ */ p("div", {
|
|
460
496
|
className: "space-y-2",
|
|
461
|
-
children:
|
|
497
|
+
children: M.map((e) => /* @__PURE__ */ m("div", {
|
|
462
498
|
className: "rounded-md border border-border-seam bg-surface p-3 text-sm text-secondary",
|
|
463
499
|
children: [
|
|
464
500
|
/* @__PURE__ */ p("div", {
|
|
465
501
|
className: "font-medium text-primary",
|
|
466
502
|
children: e.eventType
|
|
467
503
|
}),
|
|
468
|
-
/* @__PURE__ */ p("div", { children:
|
|
504
|
+
/* @__PURE__ */ p("div", { children: S(e.timestamp) }),
|
|
469
505
|
e.deliveryStatus && /* @__PURE__ */ m("div", { children: ["Delivery: ", e.deliveryStatus] })
|
|
470
506
|
]
|
|
471
507
|
}, e.id))
|
|
@@ -474,18 +510,22 @@ function y() {
|
|
|
474
510
|
})
|
|
475
511
|
]
|
|
476
512
|
}) : /* @__PURE__ */ p("div", {
|
|
477
|
-
className: "flex h-full min-h-[360px] items-center justify-center
|
|
478
|
-
children:
|
|
513
|
+
className: "flex h-full min-h-[360px] items-center justify-center",
|
|
514
|
+
children: /* @__PURE__ */ p(v, {
|
|
515
|
+
illustration: "empty-search",
|
|
516
|
+
title: C("notifications.selectNotificationTitle", "Nothing selected"),
|
|
517
|
+
description: C("notifications.selectNotificationForDetails", "Select a notification to inspect details, delivery receipts, and activity.")
|
|
518
|
+
})
|
|
479
519
|
})
|
|
480
520
|
})]
|
|
481
521
|
})
|
|
482
522
|
]
|
|
483
523
|
}) : /* @__PURE__ */ p("div", {
|
|
484
524
|
className: "p-8 text-center text-text-secondary",
|
|
485
|
-
children:
|
|
525
|
+
children: C("notifications.noPermissionHistory", "You don't have permission to view notification history.")
|
|
486
526
|
});
|
|
487
527
|
}
|
|
488
528
|
//#endregion
|
|
489
|
-
export {
|
|
529
|
+
export { C as NotificationHistoryAdminPage };
|
|
490
530
|
|
|
491
531
|
//# sourceMappingURL=NotificationHistoryAdminPage.js.map
|