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