@burdenoff/microfe-notification 2026.625.2 → 2026.626.2
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/node_modules/@apollo/client/version.js +1 -1
- package/dist/node_modules/@apollo/client/version.js.map +1 -1
- package/dist/pages/CreateNotificationPage.js +473 -452
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.js +87 -83
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +139 -100
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +63 -59
- 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 +127 -100
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +258 -210
- 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 b() {
|
|
|
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 b() {
|
|
|
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 b() {
|
|
|
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 b() {
|
|
|
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 b() {
|
|
|
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 b() {
|
|
|
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 b() {
|
|
|
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 b() {
|
|
|
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,33 +238,33 @@ function b() {
|
|
|
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:
|
|
261
|
+
children: k.length === 0 ? /* @__PURE__ */ p(v, {
|
|
228
262
|
illustration: "empty-search",
|
|
229
|
-
title:
|
|
230
|
-
description:
|
|
231
|
-
}) :
|
|
263
|
+
title: C("notifications.noNotificationsFound", "No notifications found"),
|
|
264
|
+
description: C("notifications.adjustSearchOrDateRange", "Try adjusting your filters")
|
|
265
|
+
}) : k.map((e) => /* @__PURE__ */ p("button", {
|
|
232
266
|
type: "button",
|
|
233
|
-
onClick: () =>
|
|
267
|
+
onClick: () => P(e.id),
|
|
234
268
|
className: "block w-full text-left",
|
|
235
269
|
children: /* @__PURE__ */ p(r, {
|
|
236
270
|
notification: e,
|
|
@@ -249,14 +283,15 @@ function b() {
|
|
|
249
283
|
className: "text-accent-primary"
|
|
250
284
|
}), /* @__PURE__ */ p("h2", {
|
|
251
285
|
className: "text-base font-semibold text-primary",
|
|
252
|
-
children:
|
|
286
|
+
children: C("notifications.scheduledNotifications", "Scheduled Notifications")
|
|
253
287
|
})]
|
|
254
288
|
}), /* @__PURE__ */ p("div", {
|
|
255
289
|
className: "space-y-3",
|
|
256
|
-
children:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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", {
|
|
260
295
|
className: "rounded-md border border-default bg-bg-canvas p-4",
|
|
261
296
|
children: /* @__PURE__ */ m("div", {
|
|
262
297
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
@@ -271,20 +306,20 @@ function b() {
|
|
|
271
306
|
e.notification.type,
|
|
272
307
|
" •",
|
|
273
308
|
" ",
|
|
274
|
-
|
|
309
|
+
S(e.scheduledFor)
|
|
275
310
|
]
|
|
276
311
|
})] }), /* @__PURE__ */ m("div", {
|
|
277
312
|
className: "flex items-center gap-2",
|
|
278
313
|
children: [/* @__PURE__ */ p("button", {
|
|
279
314
|
type: "button",
|
|
280
|
-
onClick: () =>
|
|
315
|
+
onClick: () => P(e.notification.id),
|
|
281
316
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
282
|
-
children:
|
|
317
|
+
children: C("notifications.view", "View")
|
|
283
318
|
}), e.status === "PENDING" && /* @__PURE__ */ p("button", {
|
|
284
319
|
type: "button",
|
|
285
|
-
onClick: () =>
|
|
320
|
+
onClick: () => L(e.id),
|
|
286
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",
|
|
287
|
-
children:
|
|
322
|
+
children: C("notifications.cancel", "Cancel")
|
|
288
323
|
})]
|
|
289
324
|
})]
|
|
290
325
|
})
|
|
@@ -293,22 +328,22 @@ function b() {
|
|
|
293
328
|
})]
|
|
294
329
|
}), /* @__PURE__ */ p("aside", {
|
|
295
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",
|
|
296
|
-
children:
|
|
331
|
+
children: j ? /* @__PURE__ */ m("div", {
|
|
297
332
|
className: "space-y-4",
|
|
298
333
|
children: [
|
|
299
334
|
/* @__PURE__ */ m("div", {
|
|
300
335
|
className: "flex items-start justify-between gap-3",
|
|
301
336
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
|
|
302
337
|
className: "text-lg font-semibold text-primary",
|
|
303
|
-
children:
|
|
338
|
+
children: j.title
|
|
304
339
|
}), /* @__PURE__ */ p("p", {
|
|
305
340
|
className: "text-sm text-secondary",
|
|
306
|
-
children:
|
|
341
|
+
children: j.body
|
|
307
342
|
})] }), /* @__PURE__ */ p("button", {
|
|
308
343
|
type: "button",
|
|
309
|
-
onClick:
|
|
344
|
+
onClick: z,
|
|
310
345
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
311
|
-
children:
|
|
346
|
+
children: C("notifications.close", "Close")
|
|
312
347
|
})]
|
|
313
348
|
}),
|
|
314
349
|
/* @__PURE__ */ m("div", {
|
|
@@ -317,63 +352,63 @@ function b() {
|
|
|
317
352
|
/* @__PURE__ */ m("div", { children: [
|
|
318
353
|
/* @__PURE__ */ p("strong", { children: "Status:" }),
|
|
319
354
|
" ",
|
|
320
|
-
|
|
355
|
+
j.status
|
|
321
356
|
] }),
|
|
322
357
|
/* @__PURE__ */ m("div", { children: [
|
|
323
358
|
/* @__PURE__ */ p("strong", { children: "Delivery:" }),
|
|
324
359
|
" ",
|
|
325
|
-
|
|
360
|
+
j.deliveryStatus || "—"
|
|
326
361
|
] }),
|
|
327
362
|
/* @__PURE__ */ m("div", { children: [
|
|
328
363
|
/* @__PURE__ */ p("strong", { children: "Topic:" }),
|
|
329
364
|
" ",
|
|
330
|
-
|
|
365
|
+
j.topic?.name || "—"
|
|
331
366
|
] }),
|
|
332
367
|
/* @__PURE__ */ m("div", { children: [
|
|
333
368
|
/* @__PURE__ */ p("strong", { children: "Created:" }),
|
|
334
369
|
" ",
|
|
335
|
-
|
|
370
|
+
S(j.createdAt)
|
|
336
371
|
] }),
|
|
337
372
|
/* @__PURE__ */ m("div", { children: [
|
|
338
373
|
/* @__PURE__ */ p("strong", { children: "Sent:" }),
|
|
339
374
|
" ",
|
|
340
|
-
|
|
375
|
+
S(j.sentAt)
|
|
341
376
|
] }),
|
|
342
377
|
/* @__PURE__ */ m("div", { children: [
|
|
343
378
|
/* @__PURE__ */ p("strong", { children: "Delivered:" }),
|
|
344
379
|
" ",
|
|
345
|
-
|
|
380
|
+
S(j.deliveredAt)
|
|
346
381
|
] }),
|
|
347
382
|
/* @__PURE__ */ m("div", { children: [
|
|
348
383
|
/* @__PURE__ */ p("strong", { children: "Opened:" }),
|
|
349
384
|
" ",
|
|
350
|
-
|
|
385
|
+
S(j.openedAt)
|
|
351
386
|
] }),
|
|
352
387
|
/* @__PURE__ */ m("div", { children: [
|
|
353
388
|
/* @__PURE__ */ p("strong", { children: "Clicked:" }),
|
|
354
389
|
" ",
|
|
355
|
-
|
|
390
|
+
S(j.clickedAt)
|
|
356
391
|
] }),
|
|
357
392
|
/* @__PURE__ */ m("div", { children: [
|
|
358
393
|
/* @__PURE__ */ p("strong", { children: "Read:" }),
|
|
359
394
|
" ",
|
|
360
|
-
|
|
395
|
+
S(j.readAt)
|
|
361
396
|
] }),
|
|
362
397
|
/* @__PURE__ */ m("div", { children: [
|
|
363
398
|
/* @__PURE__ */ p("strong", { children: "Recipient:" }),
|
|
364
399
|
" ",
|
|
365
|
-
|
|
400
|
+
j.recipientEmail || j.recipientPhone || j.id
|
|
366
401
|
] })
|
|
367
402
|
]
|
|
368
403
|
}),
|
|
369
|
-
|
|
404
|
+
j.media.length > 0 && /* @__PURE__ */ m("div", {
|
|
370
405
|
className: "space-y-2",
|
|
371
406
|
children: [/* @__PURE__ */ p("h3", {
|
|
372
407
|
className: "text-sm font-semibold text-primary",
|
|
373
|
-
children:
|
|
408
|
+
children: C("notifications.media", "Media")
|
|
374
409
|
}), /* @__PURE__ */ p("div", {
|
|
375
410
|
className: "grid gap-3",
|
|
376
|
-
children:
|
|
411
|
+
children: j.media.map((e) => /* @__PURE__ */ p("a", {
|
|
377
412
|
href: e.url,
|
|
378
413
|
target: "_blank",
|
|
379
414
|
rel: "noreferrer",
|
|
@@ -382,14 +417,14 @@ function b() {
|
|
|
382
417
|
}, e.url))
|
|
383
418
|
})]
|
|
384
419
|
}),
|
|
385
|
-
|
|
420
|
+
j.actions.length > 0 && /* @__PURE__ */ m("div", {
|
|
386
421
|
className: "space-y-2",
|
|
387
422
|
children: [/* @__PURE__ */ p("h3", {
|
|
388
423
|
className: "text-sm font-semibold text-primary",
|
|
389
|
-
children:
|
|
424
|
+
children: C("notifications.actions", "Actions")
|
|
390
425
|
}), /* @__PURE__ */ p("div", {
|
|
391
426
|
className: "grid gap-2",
|
|
392
|
-
children:
|
|
427
|
+
children: j.actions.map((e) => /* @__PURE__ */ m("div", {
|
|
393
428
|
className: "rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary",
|
|
394
429
|
children: [/* @__PURE__ */ p("div", {
|
|
395
430
|
className: "font-medium text-primary",
|
|
@@ -401,72 +436,72 @@ function b() {
|
|
|
401
436
|
}, e.id))
|
|
402
437
|
})]
|
|
403
438
|
}),
|
|
404
|
-
|
|
439
|
+
j.scheduledNotification && /* @__PURE__ */ m("div", {
|
|
405
440
|
className: "space-y-3 rounded-md border border-default bg-bg-canvas p-3",
|
|
406
441
|
children: [
|
|
407
442
|
/* @__PURE__ */ p("div", {
|
|
408
443
|
className: "text-sm font-semibold text-primary",
|
|
409
|
-
children:
|
|
444
|
+
children: C("notifications.scheduling", "Scheduling")
|
|
410
445
|
}),
|
|
411
446
|
/* @__PURE__ */ p("div", {
|
|
412
447
|
className: "text-sm text-secondary",
|
|
413
|
-
children:
|
|
448
|
+
children: S(j.scheduledNotification.scheduledFor)
|
|
414
449
|
}),
|
|
415
|
-
|
|
450
|
+
j.scheduledNotification.status === "PENDING" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("input", {
|
|
416
451
|
type: "datetime-local",
|
|
417
|
-
value:
|
|
418
|
-
onChange: (e) =>
|
|
452
|
+
value: B,
|
|
453
|
+
onChange: (e) => V(e.target.value),
|
|
419
454
|
className: "w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary"
|
|
420
455
|
}), /* @__PURE__ */ m("div", {
|
|
421
456
|
className: "flex items-center gap-2",
|
|
422
457
|
children: [/* @__PURE__ */ p("button", {
|
|
423
458
|
type: "button",
|
|
424
|
-
onClick: () =>
|
|
459
|
+
onClick: () => B && R(j.scheduledNotification.id, new Date(B).toISOString()),
|
|
425
460
|
className: "rounded-md bg-accent-primary px-3 py-2 text-xs font-medium text-text-inverse hover:opacity-90",
|
|
426
|
-
children:
|
|
461
|
+
children: C("notifications.reschedule", "Reschedule")
|
|
427
462
|
}), /* @__PURE__ */ p("button", {
|
|
428
463
|
type: "button",
|
|
429
|
-
onClick: () =>
|
|
464
|
+
onClick: () => L(j.scheduledNotification.id),
|
|
430
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",
|
|
431
|
-
children:
|
|
466
|
+
children: C("notifications.cancel", "Cancel")
|
|
432
467
|
})]
|
|
433
468
|
})] })
|
|
434
469
|
]
|
|
435
470
|
}),
|
|
436
471
|
/* @__PURE__ */ p("div", {
|
|
437
472
|
className: "flex items-center gap-2",
|
|
438
|
-
children:
|
|
473
|
+
children: j.archivedAt ? /* @__PURE__ */ p("button", {
|
|
439
474
|
type: "button",
|
|
440
|
-
onClick: () =>
|
|
475
|
+
onClick: () => I(j.id),
|
|
441
476
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
442
|
-
children:
|
|
477
|
+
children: C("notifications.restore", "Restore")
|
|
443
478
|
}) : /* @__PURE__ */ p("button", {
|
|
444
479
|
type: "button",
|
|
445
|
-
onClick: () =>
|
|
480
|
+
onClick: () => F(j.id),
|
|
446
481
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
447
|
-
children:
|
|
482
|
+
children: C("notifications.archive", "Archive")
|
|
448
483
|
})
|
|
449
484
|
}),
|
|
450
485
|
/* @__PURE__ */ m("div", {
|
|
451
486
|
className: "space-y-2",
|
|
452
487
|
children: [/* @__PURE__ */ p("h3", {
|
|
453
488
|
className: "text-sm font-semibold text-primary",
|
|
454
|
-
children:
|
|
455
|
-
}),
|
|
489
|
+
children: C("notifications.eventTimeline", "Event Timeline")
|
|
490
|
+
}), M.length === 0 ? /* @__PURE__ */ p("div", {
|
|
456
491
|
className: "rounded-md border border-dashed border-border-seam p-4 text-sm text-secondary",
|
|
457
|
-
children:
|
|
458
|
-
}) : /* @__PURE__ */ p(
|
|
492
|
+
children: C("notifications.noEvents", "No events recorded yet.")
|
|
493
|
+
}) : /* @__PURE__ */ p(x, {
|
|
459
494
|
collapsedHeight: 180,
|
|
460
495
|
children: /* @__PURE__ */ p("div", {
|
|
461
496
|
className: "space-y-2",
|
|
462
|
-
children:
|
|
497
|
+
children: M.map((e) => /* @__PURE__ */ m("div", {
|
|
463
498
|
className: "rounded-md border border-border-seam bg-surface p-3 text-sm text-secondary",
|
|
464
499
|
children: [
|
|
465
500
|
/* @__PURE__ */ p("div", {
|
|
466
501
|
className: "font-medium text-primary",
|
|
467
502
|
children: e.eventType
|
|
468
503
|
}),
|
|
469
|
-
/* @__PURE__ */ p("div", { children:
|
|
504
|
+
/* @__PURE__ */ p("div", { children: S(e.timestamp) }),
|
|
470
505
|
e.deliveryStatus && /* @__PURE__ */ m("div", { children: ["Delivery: ", e.deliveryStatus] })
|
|
471
506
|
]
|
|
472
507
|
}, e.id))
|
|
@@ -475,18 +510,22 @@ function b() {
|
|
|
475
510
|
})
|
|
476
511
|
]
|
|
477
512
|
}) : /* @__PURE__ */ p("div", {
|
|
478
|
-
className: "flex h-full min-h-[360px] items-center justify-center
|
|
479
|
-
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
|
+
})
|
|
480
519
|
})
|
|
481
520
|
})]
|
|
482
521
|
})
|
|
483
522
|
]
|
|
484
523
|
}) : /* @__PURE__ */ p("div", {
|
|
485
524
|
className: "p-8 text-center text-text-secondary",
|
|
486
|
-
children:
|
|
525
|
+
children: C("notifications.noPermissionHistory", "You don't have permission to view notification history.")
|
|
487
526
|
});
|
|
488
527
|
}
|
|
489
528
|
//#endregion
|
|
490
|
-
export {
|
|
529
|
+
export { C as NotificationHistoryAdminPage };
|
|
491
530
|
|
|
492
531
|
//# sourceMappingURL=NotificationHistoryAdminPage.js.map
|