@krak-stack/notifications-admin 0.0.0-stage → 0.2.0

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.
@@ -0,0 +1,704 @@
1
+ import {
2
+ Button,
3
+ Dialog,
4
+ DialogContent,
5
+ DialogHeader,
6
+ DialogTitle,
7
+ DialogDescription
8
+ } from "./chunk-tck9drx2.js";
9
+ import {
10
+ Tabs,
11
+ TabsList,
12
+ TabsTrigger
13
+ } from "./chunk-28xppc9m.js";
14
+ import {
15
+ NotificationTable2,
16
+ NotificationReference2
17
+ } from "./chunk-aqmv7g24.js";
18
+
19
+ // src/operations.tsx
20
+ import { useState } from "react";
21
+ import { Effect, Schema } from "effect";
22
+ import * as S from "@krak-stack/notifications/admin/operations.schema";
23
+ import { useAppForm } from "@krak-stack/registry/form";
24
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
25
+ var views = S.OperationsView.literals;
26
+ var metricKeys = [
27
+ "total",
28
+ "queued",
29
+ "processing",
30
+ "retrying",
31
+ "accepted",
32
+ "failed",
33
+ "suppressed",
34
+ "cancelled",
35
+ "confirmed",
36
+ "hardBounced",
37
+ "softBounced",
38
+ "complained",
39
+ "pendingFeedback",
40
+ "activeSuppressions"
41
+ ];
42
+ var tableFeatures = {
43
+ pagination: { mode: "client" }
44
+ };
45
+ var Records = ({
46
+ items,
47
+ columns,
48
+ m,
49
+ table
50
+ }) => /* @__PURE__ */ jsx(NotificationTable2, {
51
+ rowData: items ?? [],
52
+ columnDefs: columns.map((column) => column.colId === "inspect" || column.colId === "remove" ? {
53
+ ...column,
54
+ sortable: false,
55
+ filterable: false,
56
+ searchable: false,
57
+ hideable: false
58
+ } : column),
59
+ getRowId: (row) => row.id,
60
+ features: tableFeatures,
61
+ messages: {
62
+ en: { empty: m.empty, loading: m.loading },
63
+ fr: { empty: m.empty, loading: m.loading }
64
+ },
65
+ ...table
66
+ });
67
+ var OverviewWindowForm2 = ({
68
+ filters,
69
+ m,
70
+ onFilters
71
+ }) => {
72
+ const defaultValues = {
73
+ since: filters.since?.toISOString() ?? "",
74
+ until: filters.until?.toISOString() ?? ""
75
+ };
76
+ const form = useAppForm({
77
+ defaultValues,
78
+ validators: { onSubmit: Schema.toStandardSchemaV1(S.OverviewWindowForm) },
79
+ onSubmit: async ({ value }) => {
80
+ const v = await Effect.runPromise(Schema.decodeEffect(S.OverviewWindowForm)(value));
81
+ onFilters({
82
+ since: v.since || undefined,
83
+ until: v.until || undefined
84
+ });
85
+ }
86
+ });
87
+ return /* @__PURE__ */ jsx(form.AppForm, {
88
+ children: /* @__PURE__ */ jsxs("form", {
89
+ className: "grid gap-3 sm:grid-cols-3",
90
+ onSubmit: (e) => {
91
+ e.preventDefault();
92
+ form.handleSubmit();
93
+ },
94
+ children: [
95
+ /* @__PURE__ */ jsxs(Fragment, {
96
+ children: [
97
+ /* @__PURE__ */ jsx(form.AppField, {
98
+ name: "since",
99
+ children: (field) => /* @__PURE__ */ jsx(field.TextField, {
100
+ label: m.since
101
+ })
102
+ }),
103
+ /* @__PURE__ */ jsx(form.AppField, {
104
+ name: "until",
105
+ children: (field) => /* @__PURE__ */ jsx(field.TextField, {
106
+ label: m.until
107
+ })
108
+ })
109
+ ]
110
+ }),
111
+ /* @__PURE__ */ jsx(form.SubmitButton, {
112
+ children: m.apply
113
+ })
114
+ ]
115
+ })
116
+ });
117
+ };
118
+ var SuppressionDialog = ({
119
+ record,
120
+ m,
121
+ onAdd,
122
+ onRemove,
123
+ onClose
124
+ }) => {
125
+ const [requestId] = useState(() => crypto.randomUUID());
126
+ const [failure, setFailure] = useState();
127
+ const form = useAppForm({
128
+ defaultValues: { email: record?.email ?? "", reason: "" },
129
+ validators: { onSubmit: Schema.toStandardSchemaV1(S.SuppressionForm) },
130
+ onSubmit: async ({ value }) => {
131
+ setFailure(undefined);
132
+ try {
133
+ if (record)
134
+ await onRemove({
135
+ id: record.id,
136
+ payload: {
137
+ requestId,
138
+ version: record.version,
139
+ reason: value.reason
140
+ }
141
+ });
142
+ else
143
+ await onAdd({ requestId, email: value.email, reason: value.reason });
144
+ onClose();
145
+ } catch {
146
+ setFailure(m.failed);
147
+ }
148
+ }
149
+ });
150
+ return /* @__PURE__ */ jsx(Dialog, {
151
+ open: true,
152
+ onOpenChange: (open) => {
153
+ if (!open)
154
+ onClose();
155
+ },
156
+ children: /* @__PURE__ */ jsxs(DialogContent, {
157
+ children: [
158
+ /* @__PURE__ */ jsxs(DialogHeader, {
159
+ children: [
160
+ /* @__PURE__ */ jsx(DialogTitle, {
161
+ children: record ? m.removeSuppression : m.addSuppression
162
+ }),
163
+ /* @__PURE__ */ jsx(DialogDescription, {
164
+ children: m.suppressionWarning
165
+ })
166
+ ]
167
+ }),
168
+ record && /* @__PURE__ */ jsxs("dl", {
169
+ children: [
170
+ /* @__PURE__ */ jsx("dt", {
171
+ children: m.email
172
+ }),
173
+ /* @__PURE__ */ jsx("dd", {
174
+ children: record.email
175
+ }),
176
+ /* @__PURE__ */ jsx("dt", {
177
+ children: m.previousReason
178
+ }),
179
+ /* @__PURE__ */ jsx("dd", {
180
+ children: record.reason ?? "—"
181
+ })
182
+ ]
183
+ }),
184
+ /* @__PURE__ */ jsx(form.AppForm, {
185
+ children: /* @__PURE__ */ jsxs("form", {
186
+ className: "space-y-3",
187
+ onSubmit: (e) => {
188
+ e.preventDefault();
189
+ form.handleSubmit();
190
+ },
191
+ children: [
192
+ !record && /* @__PURE__ */ jsx(form.AppField, {
193
+ name: "email",
194
+ children: (field) => /* @__PURE__ */ jsx(field.TextField, {
195
+ label: m.email,
196
+ type: "email"
197
+ })
198
+ }),
199
+ /* @__PURE__ */ jsx(form.AppField, {
200
+ name: "reason",
201
+ children: (field) => /* @__PURE__ */ jsx(field.TextAreaField, {
202
+ label: m.reason
203
+ })
204
+ }),
205
+ failure && /* @__PURE__ */ jsx("p", {
206
+ role: "alert",
207
+ children: failure
208
+ }),
209
+ /* @__PURE__ */ jsx(form.SubmitButton, {
210
+ children: m.confirm
211
+ })
212
+ ]
213
+ })
214
+ })
215
+ ]
216
+ })
217
+ });
218
+ };
219
+ var SendOperationsAdmin2 = (p) => {
220
+ const { messages: m, view } = p;
221
+ const tableControls = {
222
+ state: p.tableState,
223
+ onStateChange: p.onTableStateChange,
224
+ status: { loading: p.pending, error: p.error },
225
+ features: {
226
+ pagination: p.total === undefined ? { mode: "client" } : { mode: "server", rowCount: p.total },
227
+ refresh: p.onRefresh
228
+ }
229
+ };
230
+ const [manage, setManage] = useState();
231
+ const date = (value) => value ? value.toLocaleString() : m.never;
232
+ const activityColumns = [
233
+ { field: "email", headerName: m.email },
234
+ { field: "subject", headerName: m.subject },
235
+ {
236
+ field: "status",
237
+ headerName: m.status,
238
+ filterOptions: Object.entries(m.statuses).map(([value, label]) => ({
239
+ value,
240
+ label
241
+ })),
242
+ cellRenderer: ({ data }) => m.statuses[data.status]
243
+ },
244
+ {
245
+ field: "campaignName",
246
+ headerName: m.campaign,
247
+ cellRenderer: ({ data }) => data.campaignId && p.onCampaign ? /* @__PURE__ */ jsx(Button, {
248
+ variant: "link",
249
+ onClick: () => p.onCampaign?.(data.campaignId),
250
+ children: data.campaignName
251
+ }) : data.campaignName ?? "—"
252
+ },
253
+ { field: "attempts", headerName: m.attempts, type: "number" },
254
+ { field: "provider", headerName: m.provider },
255
+ { field: "errorMessage", headerName: m.reason },
256
+ { field: "createdAt", headerName: m.created, type: "date" },
257
+ { field: "scheduledFor", headerName: m.scheduled, type: "date" },
258
+ { field: "sentAt", headerName: m.accepted, type: "date" },
259
+ {
260
+ colId: "inspect",
261
+ headerName: m.inspect,
262
+ cellRenderer: ({ data }) => /* @__PURE__ */ jsx(Button, {
263
+ variant: "outline",
264
+ onClick: () => p.onInspect(data.id),
265
+ children: m.inspect
266
+ })
267
+ }
268
+ ];
269
+ const feedbackColumns = [
270
+ { field: "recipientAddress", headerName: m.email },
271
+ {
272
+ field: "kind",
273
+ headerName: m.views.feedback,
274
+ filterOptions: Object.entries(m.kinds).filter(([value]) => value !== "bounces").map(([value, label]) => ({ value, label })),
275
+ cellRenderer: ({ data }) => m.kinds[data.kind]
276
+ },
277
+ {
278
+ colId: "correlation",
279
+ headerName: m.correlation,
280
+ filterOptions: [
281
+ { value: "pending", label: m.pending },
282
+ { value: "applied", label: m.applied }
283
+ ],
284
+ filterValueGetter: ({ data }) => data.appliedAt ? "applied" : "pending",
285
+ cellRenderer: ({ data }) => data.appliedAt ? m.applied : m.pending
286
+ },
287
+ { field: "provider", headerName: m.provider },
288
+ { field: "providerMessageId", headerName: m.providerMessageId },
289
+ { field: "eventId", headerName: m.eventId },
290
+ {
291
+ field: "occurredAt",
292
+ type: "date",
293
+ headerName: m.occurred,
294
+ cellRenderer: ({ data }) => date(data.occurredAt)
295
+ },
296
+ {
297
+ field: "receivedAt",
298
+ type: "date",
299
+ headerName: m.received,
300
+ cellRenderer: ({ data }) => date(data.receivedAt)
301
+ },
302
+ {
303
+ field: "checkedAt",
304
+ type: "date",
305
+ headerName: m.checked,
306
+ cellRenderer: ({ data }) => date(data.checkedAt)
307
+ },
308
+ {
309
+ field: "appliedAt",
310
+ type: "date",
311
+ headerName: m.applied,
312
+ cellRenderer: ({ data }) => date(data.appliedAt)
313
+ },
314
+ { field: "deliveryId", headerName: m.deliveryId },
315
+ { field: "contactId", headerName: m.contactId },
316
+ { field: "campaignId", headerName: m.campaign },
317
+ {
318
+ colId: "inspect",
319
+ headerName: m.inspect,
320
+ cellRenderer: ({ data }) => data.deliveryId ? /* @__PURE__ */ jsx(Button, {
321
+ variant: "outline",
322
+ onClick: () => p.onInspect(data.deliveryId),
323
+ children: m.inspect
324
+ }) : "—"
325
+ }
326
+ ];
327
+ const suppressionColumns = [
328
+ { field: "email", headerName: m.email },
329
+ {
330
+ field: "purpose",
331
+ headerName: m.purpose,
332
+ cellRenderer: ({ data }) => data.purpose ?? m.all
333
+ },
334
+ { field: "reason", headerName: m.reason },
335
+ {
336
+ field: "active",
337
+ type: "boolean",
338
+ typeOptions: { trueLabel: m.active, falseLabel: m.expired },
339
+ headerName: m.status,
340
+ cellRenderer: ({ data }) => data.active ? m.active : m.expired
341
+ },
342
+ {
343
+ field: "createdAt",
344
+ type: "date",
345
+ headerName: m.created,
346
+ cellRenderer: ({ data }) => date(data.createdAt)
347
+ },
348
+ {
349
+ field: "expiresAt",
350
+ type: "date",
351
+ headerName: m.expires,
352
+ cellRenderer: ({ data }) => date(data.expiresAt)
353
+ },
354
+ {
355
+ colId: "remove",
356
+ headerName: m.removeSuppression,
357
+ cellRenderer: ({ data }) => /* @__PURE__ */ jsx(Button, {
358
+ variant: "destructive",
359
+ onClick: () => setManage(data),
360
+ children: m.removeSuppression
361
+ })
362
+ }
363
+ ];
364
+ const auditColumns = [
365
+ { field: "email", headerName: m.email },
366
+ {
367
+ field: "action",
368
+ headerName: m.action,
369
+ filterOptions: [
370
+ { value: "add", label: m.add },
371
+ { value: "remove", label: m.remove }
372
+ ],
373
+ cellRenderer: ({ data }) => data.action === "add" ? m.add : m.remove
374
+ },
375
+ { field: "reason", headerName: m.reason },
376
+ { field: "previousReason", headerName: m.previousReason },
377
+ { field: "actor", headerName: m.actor },
378
+ {
379
+ field: "occurredAt",
380
+ type: "date",
381
+ headerName: m.occurred,
382
+ cellRenderer: ({ data }) => date(data.occurredAt)
383
+ },
384
+ { field: "requestId", headerName: m.requestId },
385
+ { field: "suppressionId", headerName: m.id }
386
+ ];
387
+ const recipientColumns = [
388
+ { field: "email", headerName: m.email },
389
+ {
390
+ field: "status",
391
+ headerName: m.status,
392
+ cellRenderer: ({ data }) => m.recipientStatuses[data.status],
393
+ filterOptions: Object.entries(m.recipientStatuses).map(([value, label]) => ({
394
+ value,
395
+ label
396
+ }))
397
+ },
398
+ { field: "reason", headerName: m.reason },
399
+ {
400
+ colId: "inspect",
401
+ headerName: m.inspect,
402
+ cellRenderer: ({ data }) => data.deliveryId ? /* @__PURE__ */ jsx(Button, {
403
+ variant: "outline",
404
+ onClick: () => p.onInspect(data.deliveryId),
405
+ children: m.inspect
406
+ }) : "—"
407
+ }
408
+ ];
409
+ const delivery = p.inspection?.delivery;
410
+ return /* @__PURE__ */ jsxs("section", {
411
+ className: "space-y-4",
412
+ "aria-busy": p.pending,
413
+ children: [
414
+ /* @__PURE__ */ jsxs("header", {
415
+ className: "flex items-start justify-between gap-4",
416
+ children: [
417
+ /* @__PURE__ */ jsxs("div", {
418
+ children: [
419
+ /* @__PURE__ */ jsx("h1", {
420
+ className: "text-2xl font-semibold",
421
+ children: m.title
422
+ }),
423
+ /* @__PURE__ */ jsx("p", {
424
+ children: m.description
425
+ })
426
+ ]
427
+ }),
428
+ /* @__PURE__ */ jsx(Button, {
429
+ variant: "outline",
430
+ onClick: p.onRefresh,
431
+ children: m.refresh
432
+ })
433
+ ]
434
+ }),
435
+ /* @__PURE__ */ jsx(Tabs, {
436
+ value: view,
437
+ onValueChange: (value) => p.onView(Schema.decodeUnknownSync(S.OperationsView)(value)),
438
+ children: /* @__PURE__ */ jsx(TabsList, {
439
+ className: "h-auto flex-wrap",
440
+ "aria-label": m.title,
441
+ children: views.map((v) => /* @__PURE__ */ jsx(TabsTrigger, {
442
+ value: v,
443
+ children: m.views[v]
444
+ }, v))
445
+ })
446
+ }),
447
+ view === "overview" && /* @__PURE__ */ jsx(OverviewWindowForm2, {
448
+ filters: p.filters,
449
+ m,
450
+ onFilters: p.onFilters
451
+ }, `${view}:${JSON.stringify(p.filters)}`),
452
+ p.filters.contactId && /* @__PURE__ */ jsxs("p", {
453
+ children: [
454
+ m.contactId,
455
+ ": ",
456
+ /* @__PURE__ */ jsx("code", {
457
+ children: p.filters.contactId
458
+ })
459
+ ]
460
+ }),
461
+ p.filters.deliveryId && /* @__PURE__ */ jsxs("p", {
462
+ children: [
463
+ m.deliveryId,
464
+ ": ",
465
+ /* @__PURE__ */ jsx("code", {
466
+ children: p.filters.deliveryId
467
+ })
468
+ ]
469
+ }),
470
+ p.error && /* @__PURE__ */ jsx("p", {
471
+ role: "alert",
472
+ children: p.error
473
+ }),
474
+ p.pending && /* @__PURE__ */ jsx("p", {
475
+ role: "status",
476
+ children: m.loading
477
+ }),
478
+ view === "overview" && p.overview && /* @__PURE__ */ jsx("dl", {
479
+ className: "grid gap-3 sm:grid-cols-3",
480
+ children: metricKeys.map((key) => /* @__PURE__ */ jsxs("div", {
481
+ role: "group",
482
+ "aria-label": m.metrics[key],
483
+ className: "rounded border p-3",
484
+ children: [
485
+ /* @__PURE__ */ jsx("dt", {
486
+ children: m.metrics[key]
487
+ }),
488
+ /* @__PURE__ */ jsx("dd", {
489
+ className: "text-2xl font-semibold",
490
+ children: p.overview?.[key]
491
+ })
492
+ ]
493
+ }, key))
494
+ }),
495
+ view === "activity" && /* @__PURE__ */ jsx(Records, {
496
+ items: p.activity?.items,
497
+ columns: activityColumns,
498
+ m,
499
+ table: tableControls
500
+ }),
501
+ view === "feedback" && /* @__PURE__ */ jsx(Records, {
502
+ items: p.feedback?.items,
503
+ columns: feedbackColumns,
504
+ m,
505
+ table: tableControls
506
+ }),
507
+ view === "suppressions" && /* @__PURE__ */ jsxs(Fragment, {
508
+ children: [
509
+ /* @__PURE__ */ jsx(Button, {
510
+ onClick: () => setManage(null),
511
+ children: m.addSuppression
512
+ }),
513
+ /* @__PURE__ */ jsx(Records, {
514
+ items: p.suppressions?.items,
515
+ columns: suppressionColumns,
516
+ table: tableControls,
517
+ m
518
+ })
519
+ ]
520
+ }),
521
+ view === "audit" && /* @__PURE__ */ jsx(Records, {
522
+ items: p.audit?.items.map((row) => ({ ...row, id: row.requestId })),
523
+ columns: auditColumns,
524
+ table: tableControls,
525
+ m
526
+ }),
527
+ view === "recipients" && (p.filters.campaignId ? /* @__PURE__ */ jsx(Records, {
528
+ items: p.recipients?.items,
529
+ columns: recipientColumns,
530
+ table: tableControls,
531
+ m
532
+ }) : /* @__PURE__ */ jsx("p", {
533
+ children: m.recipientsHint
534
+ })),
535
+ /* @__PURE__ */ jsx(Dialog, {
536
+ open: p.inspecting,
537
+ onOpenChange: (open) => {
538
+ if (!open)
539
+ p.onCloseInspection();
540
+ },
541
+ children: /* @__PURE__ */ jsxs(DialogContent, {
542
+ className: "max-h-[90vh] overflow-auto sm:max-w-4xl",
543
+ children: [
544
+ /* @__PURE__ */ jsx(DialogHeader, {
545
+ children: /* @__PURE__ */ jsx(DialogTitle, {
546
+ children: m.inspect
547
+ })
548
+ }),
549
+ p.error && /* @__PURE__ */ jsx("p", {
550
+ role: "alert",
551
+ children: p.error
552
+ }),
553
+ !delivery && !p.error && /* @__PURE__ */ jsx("p", {
554
+ role: "status",
555
+ children: m.loading
556
+ }),
557
+ delivery && /* @__PURE__ */ jsxs(Fragment, {
558
+ children: [
559
+ p.onContact && /* @__PURE__ */ jsx(Button, {
560
+ variant: "outline",
561
+ onClick: () => p.onContact?.(delivery.contactId),
562
+ children: m.contactId
563
+ }),
564
+ /* @__PURE__ */ jsx("dl", {
565
+ className: "grid gap-2 break-all sm:grid-cols-2",
566
+ children: [
567
+ [
568
+ m.id,
569
+ /* @__PURE__ */ jsx(NotificationReference2, {
570
+ kind: "delivery",
571
+ id: delivery.id
572
+ }, "delivery")
573
+ ],
574
+ [
575
+ m.contactId,
576
+ /* @__PURE__ */ jsx(NotificationReference2, {
577
+ kind: "contact",
578
+ id: delivery.contactId
579
+ }, "contact")
580
+ ],
581
+ [m.email, delivery.email],
582
+ [m.subject, delivery.subject],
583
+ [m.status, m.statuses[delivery.status]],
584
+ [m.purpose, delivery.purpose],
585
+ [m.campaign, delivery.campaignName],
586
+ [m.provider, delivery.provider],
587
+ [m.providerMessageId, delivery.providerMessageId],
588
+ [m.reason, delivery.errorMessage],
589
+ [
590
+ m.attempts,
591
+ `${delivery.attempts} / ${delivery.maxAttempts}`
592
+ ],
593
+ [m.created, date(delivery.createdAt)],
594
+ [m.scheduled, date(delivery.scheduledFor)],
595
+ [m.updated, date(delivery.updatedAt)],
596
+ [m.accepted, date(delivery.sentAt)]
597
+ ].map(([label, value], index) => /* @__PURE__ */ jsxs("div", {
598
+ children: [
599
+ /* @__PURE__ */ jsx("dt", {
600
+ className: "font-semibold",
601
+ children: label
602
+ }),
603
+ /* @__PURE__ */ jsx("dd", {
604
+ children: value ?? "—"
605
+ })
606
+ ]
607
+ }, index))
608
+ }),
609
+ /* @__PURE__ */ jsx("dl", {
610
+ children: [
611
+ "confirmed",
612
+ "hardBounced",
613
+ "softBounced",
614
+ "complained"
615
+ ].map((key) => /* @__PURE__ */ jsxs("div", {
616
+ children: [
617
+ /* @__PURE__ */ jsx("dt", {
618
+ children: m.metrics[key]
619
+ }),
620
+ /* @__PURE__ */ jsx("dd", {
621
+ children: delivery[key] ? 1 : 0
622
+ })
623
+ ]
624
+ }, key))
625
+ }),
626
+ /* @__PURE__ */ jsx("h3", {
627
+ children: m.attempts
628
+ }),
629
+ /* @__PURE__ */ jsx(Records, {
630
+ items: p.inspection?.attempts,
631
+ m,
632
+ columns: [
633
+ { field: "generation", headerName: m.generation },
634
+ { field: "attempt", headerName: m.attempts },
635
+ {
636
+ colId: "outcome",
637
+ headerName: m.outcome,
638
+ cellRenderer: ({ data }) => data.outcome ? m.outcomes[data.outcome._tag] : m.pending
639
+ },
640
+ {
641
+ colId: "reason",
642
+ headerName: m.reason,
643
+ cellRenderer: ({ data }) => {
644
+ const outcome = data.outcome;
645
+ if (!outcome)
646
+ return "—";
647
+ switch (outcome._tag) {
648
+ case "Sent":
649
+ return outcome.providerMessageId ?? "—";
650
+ case "Skipped":
651
+ return outcome.reason;
652
+ case "RetryableFailure":
653
+ case "PermanentFailure":
654
+ case "Unavailable":
655
+ return outcome.message;
656
+ }
657
+ }
658
+ },
659
+ {
660
+ colId: "started",
661
+ headerName: m.started,
662
+ cellRenderer: ({ data }) => date(data.startedAt)
663
+ },
664
+ {
665
+ colId: "completed",
666
+ headerName: m.completed,
667
+ cellRenderer: ({ data }) => date(data.completedAt)
668
+ }
669
+ ]
670
+ }),
671
+ /* @__PURE__ */ jsx(Button, {
672
+ onClick: () => {
673
+ p.onCloseInspection();
674
+ p.onDeliveryFeedback(delivery.id);
675
+ },
676
+ children: m.views.feedback
677
+ })
678
+ ]
679
+ }),
680
+ /* @__PURE__ */ jsx(Button, {
681
+ variant: "outline",
682
+ onClick: p.onRefresh,
683
+ children: m.refresh
684
+ }),
685
+ /* @__PURE__ */ jsx(Button, {
686
+ variant: "outline",
687
+ onClick: p.onCloseInspection,
688
+ children: m.close
689
+ })
690
+ ]
691
+ })
692
+ }),
693
+ manage !== undefined && /* @__PURE__ */ jsx(SuppressionDialog, {
694
+ record: manage,
695
+ m,
696
+ onAdd: p.onAddSuppression,
697
+ onRemove: p.onRemoveSuppression,
698
+ onClose: () => setManage(undefined)
699
+ })
700
+ ]
701
+ });
702
+ };
703
+
704
+ export { SendOperationsAdmin2 };