@burdenoff/microfe-notification 2026.624.2 → 2026.625.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/FeatureDisabledPage.js +1 -1
- package/dist/components/FeatureDisabledPage.js.map +1 -1
- package/dist/components/NotificationCard.js +4 -3
- 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 +473 -471
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.js +83 -80
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +117 -111
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +41 -38
- 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 +96 -94
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +58 -56
- 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, ShowMore as _ } from "@burdenoff/fe-libs/ui";
|
|
12
13
|
//#region src/pages/NotificationHistoryAdminPage.tsx
|
|
13
|
-
function
|
|
14
|
+
function v(e) {
|
|
14
15
|
return e ? new Date(e).toLocaleString() : "—";
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
return
|
|
17
|
+
function y() {
|
|
18
|
+
let y = n(), { hasPermission: b, isLoading: x } = s(), { topics: S } = t(), { filters: C, setFilters: w, notifications: T, scheduledNotifications: E, selectedNotification: D, events: O, isLoading: k, loadNotification: A, archiveNotification: j, unarchiveNotification: M, cancelScheduledNotification: N, rescheduleNotification: P, clearSelection: F } = e(), [I, L] = o("");
|
|
19
|
+
return x ? /* @__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
|
+
}) : b(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: y("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: y("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(y, T),
|
|
37
|
+
disabled: T.length === 0,
|
|
38
|
+
className: "gap-2",
|
|
39
|
+
children: [/* @__PURE__ */ p(l, { size: 16 }), y("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: C.search,
|
|
54
|
+
onChange: (e) => w((t) => ({
|
|
52
55
|
...t,
|
|
53
56
|
search: e.target.value
|
|
54
57
|
})),
|
|
55
|
-
placeholder:
|
|
58
|
+
placeholder: y("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: C.status,
|
|
64
|
+
onChange: (e) => w((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: y("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: C.channel,
|
|
98
|
+
onChange: (e) => w((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: y("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: C.deliveryStatus,
|
|
132
|
+
onChange: (e) => w((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: y("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: C.topicId,
|
|
166
|
+
onChange: (e) => w((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: y("notifications.allTopics", "All Topics")
|
|
174
|
+
}), S.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: C.archived,
|
|
181
|
+
onChange: (e) => w((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: y("notifications.activeAndArchived", "Active + Archived")
|
|
187
190
|
}),
|
|
188
191
|
/* @__PURE__ */ p("option", {
|
|
189
192
|
value: "active",
|
|
190
|
-
children:
|
|
193
|
+
children: y("notifications.activeOnly", "Active Only")
|
|
191
194
|
}),
|
|
192
195
|
/* @__PURE__ */ p("option", {
|
|
193
196
|
value: "archived",
|
|
194
|
-
children:
|
|
197
|
+
children: y("notifications.archivedOnly", "Archived Only")
|
|
195
198
|
})
|
|
196
199
|
]
|
|
197
200
|
})
|
|
@@ -202,31 +205,31 @@ 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: y("notifications.sentNotifications", "Notifications")
|
|
211
214
|
}), /* @__PURE__ */ m("p", {
|
|
212
215
|
className: "text-sm text-secondary",
|
|
213
216
|
children: [
|
|
214
|
-
|
|
217
|
+
T.length,
|
|
215
218
|
" ",
|
|
216
|
-
|
|
219
|
+
y("notifications.resultsFoundShort", "results")
|
|
217
220
|
]
|
|
218
|
-
})] }),
|
|
221
|
+
})] }), k && /* @__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:
|
|
227
|
+
children: T.length === 0 ? /* @__PURE__ */ p("div", {
|
|
225
228
|
className: "rounded-md border border-dashed border-default p-6 text-sm text-secondary",
|
|
226
|
-
children:
|
|
227
|
-
}) :
|
|
229
|
+
children: y("notifications.noNotificationsFound", "No notifications found")
|
|
230
|
+
}) : T.map((e) => /* @__PURE__ */ p("button", {
|
|
228
231
|
type: "button",
|
|
229
|
-
onClick: () =>
|
|
232
|
+
onClick: () => A(e.id),
|
|
230
233
|
className: "block w-full text-left",
|
|
231
234
|
children: /* @__PURE__ */ p(r, {
|
|
232
235
|
notification: e,
|
|
@@ -237,7 +240,7 @@ function g() {
|
|
|
237
240
|
}, e.id))
|
|
238
241
|
})]
|
|
239
242
|
}), /* @__PURE__ */ m("section", {
|
|
240
|
-
className: "rounded-lg border border-
|
|
243
|
+
className: "rounded-lg border border-border-seam bg-gloss-card p-4",
|
|
241
244
|
children: [/* @__PURE__ */ m("div", {
|
|
242
245
|
className: "mb-4 flex items-center gap-2",
|
|
243
246
|
children: [/* @__PURE__ */ p(c, {
|
|
@@ -245,14 +248,14 @@ function g() {
|
|
|
245
248
|
className: "text-accent-primary"
|
|
246
249
|
}), /* @__PURE__ */ p("h2", {
|
|
247
250
|
className: "text-base font-semibold text-primary",
|
|
248
|
-
children:
|
|
251
|
+
children: y("notifications.scheduledNotifications", "Scheduled Notifications")
|
|
249
252
|
})]
|
|
250
253
|
}), /* @__PURE__ */ p("div", {
|
|
251
254
|
className: "space-y-3",
|
|
252
|
-
children:
|
|
255
|
+
children: E.length === 0 ? /* @__PURE__ */ p("div", {
|
|
253
256
|
className: "rounded-md border border-dashed border-default p-6 text-sm text-secondary",
|
|
254
|
-
children:
|
|
255
|
-
}) :
|
|
257
|
+
children: y("notifications.noScheduledNotifications", "No scheduled notifications")
|
|
258
|
+
}) : E.map((e) => /* @__PURE__ */ p("div", {
|
|
256
259
|
className: "rounded-md border border-default bg-bg-canvas p-4",
|
|
257
260
|
children: /* @__PURE__ */ m("div", {
|
|
258
261
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
@@ -267,20 +270,20 @@ function g() {
|
|
|
267
270
|
e.notification.type,
|
|
268
271
|
" •",
|
|
269
272
|
" ",
|
|
270
|
-
|
|
273
|
+
v(e.scheduledFor)
|
|
271
274
|
]
|
|
272
275
|
})] }), /* @__PURE__ */ m("div", {
|
|
273
276
|
className: "flex items-center gap-2",
|
|
274
277
|
children: [/* @__PURE__ */ p("button", {
|
|
275
278
|
type: "button",
|
|
276
|
-
onClick: () =>
|
|
279
|
+
onClick: () => A(e.notification.id),
|
|
277
280
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
278
|
-
children:
|
|
281
|
+
children: y("notifications.view", "View")
|
|
279
282
|
}), e.status === "PENDING" && /* @__PURE__ */ p("button", {
|
|
280
283
|
type: "button",
|
|
281
|
-
onClick: () =>
|
|
284
|
+
onClick: () => N(e.id),
|
|
282
285
|
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:
|
|
286
|
+
children: y("notifications.cancel", "Cancel")
|
|
284
287
|
})]
|
|
285
288
|
})]
|
|
286
289
|
})
|
|
@@ -288,23 +291,23 @@ function g() {
|
|
|
288
291
|
})]
|
|
289
292
|
})]
|
|
290
293
|
}), /* @__PURE__ */ p("aside", {
|
|
291
|
-
className: "rounded-lg border border-
|
|
292
|
-
children:
|
|
294
|
+
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: D ? /* @__PURE__ */ m("div", {
|
|
293
296
|
className: "space-y-4",
|
|
294
297
|
children: [
|
|
295
298
|
/* @__PURE__ */ m("div", {
|
|
296
299
|
className: "flex items-start justify-between gap-3",
|
|
297
300
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
|
|
298
301
|
className: "text-lg font-semibold text-primary",
|
|
299
|
-
children:
|
|
302
|
+
children: D.title
|
|
300
303
|
}), /* @__PURE__ */ p("p", {
|
|
301
304
|
className: "text-sm text-secondary",
|
|
302
|
-
children:
|
|
305
|
+
children: D.body
|
|
303
306
|
})] }), /* @__PURE__ */ p("button", {
|
|
304
307
|
type: "button",
|
|
305
|
-
onClick:
|
|
308
|
+
onClick: F,
|
|
306
309
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
307
|
-
children:
|
|
310
|
+
children: y("notifications.close", "Close")
|
|
308
311
|
})]
|
|
309
312
|
}),
|
|
310
313
|
/* @__PURE__ */ m("div", {
|
|
@@ -313,63 +316,63 @@ function g() {
|
|
|
313
316
|
/* @__PURE__ */ m("div", { children: [
|
|
314
317
|
/* @__PURE__ */ p("strong", { children: "Status:" }),
|
|
315
318
|
" ",
|
|
316
|
-
|
|
319
|
+
D.status
|
|
317
320
|
] }),
|
|
318
321
|
/* @__PURE__ */ m("div", { children: [
|
|
319
322
|
/* @__PURE__ */ p("strong", { children: "Delivery:" }),
|
|
320
323
|
" ",
|
|
321
|
-
|
|
324
|
+
D.deliveryStatus || "—"
|
|
322
325
|
] }),
|
|
323
326
|
/* @__PURE__ */ m("div", { children: [
|
|
324
327
|
/* @__PURE__ */ p("strong", { children: "Topic:" }),
|
|
325
328
|
" ",
|
|
326
|
-
|
|
329
|
+
D.topic?.name || "—"
|
|
327
330
|
] }),
|
|
328
331
|
/* @__PURE__ */ m("div", { children: [
|
|
329
332
|
/* @__PURE__ */ p("strong", { children: "Created:" }),
|
|
330
333
|
" ",
|
|
331
|
-
|
|
334
|
+
v(D.createdAt)
|
|
332
335
|
] }),
|
|
333
336
|
/* @__PURE__ */ m("div", { children: [
|
|
334
337
|
/* @__PURE__ */ p("strong", { children: "Sent:" }),
|
|
335
338
|
" ",
|
|
336
|
-
|
|
339
|
+
v(D.sentAt)
|
|
337
340
|
] }),
|
|
338
341
|
/* @__PURE__ */ m("div", { children: [
|
|
339
342
|
/* @__PURE__ */ p("strong", { children: "Delivered:" }),
|
|
340
343
|
" ",
|
|
341
|
-
|
|
344
|
+
v(D.deliveredAt)
|
|
342
345
|
] }),
|
|
343
346
|
/* @__PURE__ */ m("div", { children: [
|
|
344
347
|
/* @__PURE__ */ p("strong", { children: "Opened:" }),
|
|
345
348
|
" ",
|
|
346
|
-
|
|
349
|
+
v(D.openedAt)
|
|
347
350
|
] }),
|
|
348
351
|
/* @__PURE__ */ m("div", { children: [
|
|
349
352
|
/* @__PURE__ */ p("strong", { children: "Clicked:" }),
|
|
350
353
|
" ",
|
|
351
|
-
|
|
354
|
+
v(D.clickedAt)
|
|
352
355
|
] }),
|
|
353
356
|
/* @__PURE__ */ m("div", { children: [
|
|
354
357
|
/* @__PURE__ */ p("strong", { children: "Read:" }),
|
|
355
358
|
" ",
|
|
356
|
-
|
|
359
|
+
v(D.readAt)
|
|
357
360
|
] }),
|
|
358
361
|
/* @__PURE__ */ m("div", { children: [
|
|
359
362
|
/* @__PURE__ */ p("strong", { children: "Recipient:" }),
|
|
360
363
|
" ",
|
|
361
|
-
|
|
364
|
+
D.recipientEmail || D.recipientPhone || D.id
|
|
362
365
|
] })
|
|
363
366
|
]
|
|
364
367
|
}),
|
|
365
|
-
|
|
368
|
+
D.media.length > 0 && /* @__PURE__ */ m("div", {
|
|
366
369
|
className: "space-y-2",
|
|
367
370
|
children: [/* @__PURE__ */ p("h3", {
|
|
368
371
|
className: "text-sm font-semibold text-primary",
|
|
369
|
-
children:
|
|
372
|
+
children: y("notifications.media", "Media")
|
|
370
373
|
}), /* @__PURE__ */ p("div", {
|
|
371
374
|
className: "grid gap-3",
|
|
372
|
-
children:
|
|
375
|
+
children: D.media.map((e) => /* @__PURE__ */ p("a", {
|
|
373
376
|
href: e.url,
|
|
374
377
|
target: "_blank",
|
|
375
378
|
rel: "noreferrer",
|
|
@@ -378,14 +381,14 @@ function g() {
|
|
|
378
381
|
}, e.url))
|
|
379
382
|
})]
|
|
380
383
|
}),
|
|
381
|
-
|
|
384
|
+
D.actions.length > 0 && /* @__PURE__ */ m("div", {
|
|
382
385
|
className: "space-y-2",
|
|
383
386
|
children: [/* @__PURE__ */ p("h3", {
|
|
384
387
|
className: "text-sm font-semibold text-primary",
|
|
385
|
-
children:
|
|
388
|
+
children: y("notifications.actions", "Actions")
|
|
386
389
|
}), /* @__PURE__ */ p("div", {
|
|
387
390
|
className: "grid gap-2",
|
|
388
|
-
children:
|
|
391
|
+
children: D.actions.map((e) => /* @__PURE__ */ m("div", {
|
|
389
392
|
className: "rounded-md border border-default bg-bg-canvas p-3 text-sm text-secondary",
|
|
390
393
|
children: [/* @__PURE__ */ p("div", {
|
|
391
394
|
className: "font-medium text-primary",
|
|
@@ -397,89 +400,92 @@ function g() {
|
|
|
397
400
|
}, e.id))
|
|
398
401
|
})]
|
|
399
402
|
}),
|
|
400
|
-
|
|
403
|
+
D.scheduledNotification && /* @__PURE__ */ m("div", {
|
|
401
404
|
className: "space-y-3 rounded-md border border-default bg-bg-canvas p-3",
|
|
402
405
|
children: [
|
|
403
406
|
/* @__PURE__ */ p("div", {
|
|
404
407
|
className: "text-sm font-semibold text-primary",
|
|
405
|
-
children:
|
|
408
|
+
children: y("notifications.scheduling", "Scheduling")
|
|
406
409
|
}),
|
|
407
410
|
/* @__PURE__ */ p("div", {
|
|
408
411
|
className: "text-sm text-secondary",
|
|
409
|
-
children:
|
|
412
|
+
children: v(D.scheduledNotification.scheduledFor)
|
|
410
413
|
}),
|
|
411
|
-
|
|
414
|
+
D.scheduledNotification.status === "PENDING" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("input", {
|
|
412
415
|
type: "datetime-local",
|
|
413
|
-
value:
|
|
414
|
-
onChange: (e) =>
|
|
416
|
+
value: I,
|
|
417
|
+
onChange: (e) => L(e.target.value),
|
|
415
418
|
className: "w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary"
|
|
416
419
|
}), /* @__PURE__ */ m("div", {
|
|
417
420
|
className: "flex items-center gap-2",
|
|
418
421
|
children: [/* @__PURE__ */ p("button", {
|
|
419
422
|
type: "button",
|
|
420
|
-
onClick: () =>
|
|
423
|
+
onClick: () => I && P(D.scheduledNotification.id, new Date(I).toISOString()),
|
|
421
424
|
className: "rounded-md bg-accent-primary px-3 py-2 text-xs font-medium text-text-inverse hover:opacity-90",
|
|
422
|
-
children:
|
|
425
|
+
children: y("notifications.reschedule", "Reschedule")
|
|
423
426
|
}), /* @__PURE__ */ p("button", {
|
|
424
427
|
type: "button",
|
|
425
|
-
onClick: () =>
|
|
428
|
+
onClick: () => N(D.scheduledNotification.id),
|
|
426
429
|
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:
|
|
430
|
+
children: y("notifications.cancel", "Cancel")
|
|
428
431
|
})]
|
|
429
432
|
})] })
|
|
430
433
|
]
|
|
431
434
|
}),
|
|
432
435
|
/* @__PURE__ */ p("div", {
|
|
433
436
|
className: "flex items-center gap-2",
|
|
434
|
-
children:
|
|
437
|
+
children: D.archivedAt ? /* @__PURE__ */ p("button", {
|
|
435
438
|
type: "button",
|
|
436
|
-
onClick: () =>
|
|
439
|
+
onClick: () => M(D.id),
|
|
437
440
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
438
|
-
children:
|
|
441
|
+
children: y("notifications.restore", "Restore")
|
|
439
442
|
}) : /* @__PURE__ */ p("button", {
|
|
440
443
|
type: "button",
|
|
441
|
-
onClick: () =>
|
|
444
|
+
onClick: () => j(D.id),
|
|
442
445
|
className: "rounded-md border border-default px-3 py-2 text-xs text-secondary hover:bg-bg-sunken",
|
|
443
|
-
children:
|
|
446
|
+
children: y("notifications.archive", "Archive")
|
|
444
447
|
})
|
|
445
448
|
}),
|
|
446
449
|
/* @__PURE__ */ m("div", {
|
|
447
450
|
className: "space-y-2",
|
|
448
451
|
children: [/* @__PURE__ */ p("h3", {
|
|
449
452
|
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
|
-
|
|
453
|
+
children: y("notifications.eventTimeline", "Event Timeline")
|
|
454
|
+
}), O.length === 0 ? /* @__PURE__ */ p("div", {
|
|
455
|
+
className: "rounded-md border border-dashed border-border-seam p-4 text-sm text-secondary",
|
|
456
|
+
children: y("notifications.noEvents", "No events recorded yet.")
|
|
457
|
+
}) : /* @__PURE__ */ p(_, {
|
|
458
|
+
collapsedHeight: 180,
|
|
459
|
+
children: /* @__PURE__ */ p("div", {
|
|
460
|
+
className: "space-y-2",
|
|
461
|
+
children: O.map((e) => /* @__PURE__ */ m("div", {
|
|
462
|
+
className: "rounded-md border border-border-seam bg-surface p-3 text-sm text-secondary",
|
|
463
|
+
children: [
|
|
464
|
+
/* @__PURE__ */ p("div", {
|
|
465
|
+
className: "font-medium text-primary",
|
|
466
|
+
children: e.eventType
|
|
467
|
+
}),
|
|
468
|
+
/* @__PURE__ */ p("div", { children: v(e.timestamp) }),
|
|
469
|
+
e.deliveryStatus && /* @__PURE__ */ m("div", { children: ["Delivery: ", e.deliveryStatus] })
|
|
470
|
+
]
|
|
471
|
+
}, e.id))
|
|
472
|
+
})
|
|
467
473
|
})]
|
|
468
474
|
})
|
|
469
475
|
]
|
|
470
476
|
}) : /* @__PURE__ */ p("div", {
|
|
471
477
|
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:
|
|
478
|
+
children: y("notifications.selectNotificationForDetails", "Select a notification to inspect details, delivery receipts, and activity.")
|
|
473
479
|
})
|
|
474
480
|
})]
|
|
475
481
|
})
|
|
476
482
|
]
|
|
477
483
|
}) : /* @__PURE__ */ p("div", {
|
|
478
484
|
className: "p-8 text-center text-text-secondary",
|
|
479
|
-
children:
|
|
485
|
+
children: y("notifications.noPermissionHistory", "You don't have permission to view notification history.")
|
|
480
486
|
});
|
|
481
487
|
}
|
|
482
488
|
//#endregion
|
|
483
|
-
export {
|
|
489
|
+
export { y as NotificationHistoryAdminPage };
|
|
484
490
|
|
|
485
491
|
//# sourceMappingURL=NotificationHistoryAdminPage.js.map
|