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