@webx-ui/module-inbox 0.6.8 → 0.8.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.
- package/dist/FormEditorPage-BoHzlFfz.js +786 -0
- package/dist/FormEditorPage-BoHzlFfz.js.map +1 -0
- package/dist/FormField.d.ts +18 -0
- package/dist/FormNotifications.d.ts +8 -1
- package/dist/InboxPage-CCYXnZed.js +387 -0
- package/dist/InboxPage-CCYXnZed.js.map +1 -0
- package/dist/StatusesPage-Mra8TB7G.js +296 -0
- package/dist/StatusesPage-Mra8TB7G.js.map +1 -0
- package/dist/SubmissionPage-DVNKYpWH.js +640 -0
- package/dist/SubmissionPage-DVNKYpWH.js.map +1 -0
- package/dist/index-BQj2UlUS.js +1735 -0
- package/dist/index-BQj2UlUS.js.map +1 -0
- package/dist/index.d.ts +61 -5
- package/dist/index.js +15 -3514
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +50 -1
- package/package.json +3 -3
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import { defineComponent as qe, ref as C, computed as p, watch as Se, openBlock as n, createElementBlock as m, createVNode as i, unref as a, withCtx as s, createBlock as c, createElementVNode as f, Fragment as z, renderList as W, toDisplayString as o, createTextVNode as d, createCommentVNode as y } from "vue";
|
|
2
|
+
import { useRoute as Te, useRouter as Ce } from "vue-router";
|
|
3
|
+
import { useAdmin as Ne, useTranslate as J, useErrorText as $e, WxScreenHead as Ve, WxNotes as Ae, WxDate as Q } from "@webx-ui/module-admin";
|
|
4
|
+
import { useLocales as Be, localizedValue as Ie, toast as h, confirm as De, WxAction as X, WxSkeleton as Ee, WxCard as N, WxEmpty as Re, WxDescriptions as Y, WxDescriptionsItem as $, WxFileCard as Ue, WxAlert as Z, WxTabs as je, WxTab as V, WxTimeline as Fe, WxTimelineItem as Le, WxText as v, WxBadge as R, WxButton as ee, WxSelect as ae } from "@webx-ui/core";
|
|
5
|
+
import { c as Me, u as Oe, d as Pe, _ as He } from "./index-BQj2UlUS.js";
|
|
6
|
+
const Ke = { class: "wx-submission" }, Ge = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "wx-submission__panes"
|
|
9
|
+
}, Je = { class: "wx-submission__main" }, Qe = { class: "wx-submission__value" }, Xe = { class: "wx-submission__files" }, Ye = { class: "wx-submission__by" }, Ze = { class: "wx-submission__fields" }, ea = ["href"], aa = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "wx-submission__detail"
|
|
12
|
+
}, ta = { class: "wx-submission__detail" }, la = {
|
|
13
|
+
key: 5,
|
|
14
|
+
class: "wx-submission__recipients"
|
|
15
|
+
}, sa = { key: 6 }, na = { class: "wx-submission__fields" }, ia = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "wx-submission__recipients"
|
|
18
|
+
}, ua = { class: "wx-submission__channel-text" }, oa = { key: 2 }, ra = { class: "wx-submission__aside" }, da = { class: "wx-submission__fields" }, ca = { class: "wx-submission__field" }, pa = { class: "wx-submission__field" }, ma = /* @__PURE__ */ qe({
|
|
19
|
+
__name: "SubmissionPage",
|
|
20
|
+
props: {
|
|
21
|
+
base: { default: "/inbox" }
|
|
22
|
+
},
|
|
23
|
+
setup(te) {
|
|
24
|
+
const U = te, j = Ne(), g = Me(j), _ = Te(), S = Ce(), le = Be();
|
|
25
|
+
Oe();
|
|
26
|
+
const t = J("webx-inbox"), se = J("webx-admin"), w = $e(), u = C(null), A = C([]), F = C([]), B = C(!0), x = p(() => j.can("inbox.update")), k = p(() => Number(_.params.id)), ne = p(() => ({
|
|
27
|
+
view: typeof _.query.view == "string" ? _.query.view : void 0,
|
|
28
|
+
search: typeof _.query.search == "string" ? _.query.search : void 0,
|
|
29
|
+
assignee: typeof _.query.assignee == "string" ? _.query.assignee : void 0
|
|
30
|
+
})), T = p(() => ({ path: U.base, query: { ..._.query } })), ie = p(
|
|
31
|
+
() => A.value.map((e) => ({ value: e.id, label: L(e) }))
|
|
32
|
+
), ue = p(
|
|
33
|
+
() => F.value.map((e) => ({ value: e.id, label: e.name }))
|
|
34
|
+
), L = Pe(), I = p(() => t("panel.submission", { id: String(k.value) })), M = p(() => {
|
|
35
|
+
const e = u.value?.form;
|
|
36
|
+
return e === void 0 ? "" : Ie(e.title ?? {}, le.active.value, e.slug ?? "");
|
|
37
|
+
}), O = p(() => (u.value?.values ?? []).find((l) => l.type === "email" && (l.value ?? "") !== "")?.value ?? null), P = p(() => {
|
|
38
|
+
if (O.value === null) return null;
|
|
39
|
+
const e = encodeURIComponent(`${M.value} — ${I.value}`);
|
|
40
|
+
return `mailto:${O.value}?subject=${e}`;
|
|
41
|
+
});
|
|
42
|
+
async function D() {
|
|
43
|
+
B.value = !0;
|
|
44
|
+
try {
|
|
45
|
+
u.value = await g.submission(k.value, ne.value);
|
|
46
|
+
} catch (e) {
|
|
47
|
+
h.danger(w(e)), S.replace(T.value);
|
|
48
|
+
} finally {
|
|
49
|
+
B.value = !1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async function oe() {
|
|
53
|
+
try {
|
|
54
|
+
A.value = await g.statuses(), x.value && (F.value = await g.recipients());
|
|
55
|
+
} catch (e) {
|
|
56
|
+
h.danger(w(e));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
Se(k, () => {
|
|
60
|
+
D();
|
|
61
|
+
}, { immediate: !0 }), oe();
|
|
62
|
+
async function H(e) {
|
|
63
|
+
try {
|
|
64
|
+
u.value = await g.saveSubmission(k.value, e), h.success(t("panel.saved"));
|
|
65
|
+
} catch (r) {
|
|
66
|
+
h.danger(w(r)), await D();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function re(e) {
|
|
70
|
+
typeof e == "number" && H({ status_id: e });
|
|
71
|
+
}
|
|
72
|
+
function de(e) {
|
|
73
|
+
H({ assignee_id: typeof e == "number" ? e : null });
|
|
74
|
+
}
|
|
75
|
+
const ce = p(() => {
|
|
76
|
+
const e = [];
|
|
77
|
+
return P.value && e.push({
|
|
78
|
+
key: "reply",
|
|
79
|
+
label: t("panel.reply"),
|
|
80
|
+
icon: "mail",
|
|
81
|
+
primary: !0,
|
|
82
|
+
href: P.value,
|
|
83
|
+
target: "_self"
|
|
84
|
+
}), x.value && u.value !== null && e.push(
|
|
85
|
+
{
|
|
86
|
+
key: "unread",
|
|
87
|
+
icon: "eye-off",
|
|
88
|
+
label: t("panel.mark-unread"),
|
|
89
|
+
menu: !0,
|
|
90
|
+
run: () => {
|
|
91
|
+
_e();
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: "notify",
|
|
96
|
+
icon: "mail",
|
|
97
|
+
label: t("panel.notify-again"),
|
|
98
|
+
menu: !0,
|
|
99
|
+
run: () => {
|
|
100
|
+
E();
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
key: "delete",
|
|
105
|
+
icon: "trash",
|
|
106
|
+
label: t("panel.delete"),
|
|
107
|
+
danger: !0,
|
|
108
|
+
run: () => {
|
|
109
|
+
be();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
), e;
|
|
113
|
+
});
|
|
114
|
+
async function E() {
|
|
115
|
+
try {
|
|
116
|
+
u.value = await g.notifySubmission(k.value), h.success(t("panel.notify-sent-again"));
|
|
117
|
+
} catch (e) {
|
|
118
|
+
h.danger(w(e));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const b = p(() => u.value?.notification ?? null);
|
|
122
|
+
function pe(e) {
|
|
123
|
+
return t(`panel.notify-recipient-${e}`);
|
|
124
|
+
}
|
|
125
|
+
const q = p(() => u.value?.channels ?? null), me = p(() => (q.value ?? []).some((e) => e.status === "failed")), ve = p(() => (q.value ?? []).some((e) => e.retryable));
|
|
126
|
+
function fe(e) {
|
|
127
|
+
return e.status === "failed" ? "danger" : e.status === "sent" ? "success" : e.status === "skipped" ? "warning" : "default";
|
|
128
|
+
}
|
|
129
|
+
async function _e() {
|
|
130
|
+
try {
|
|
131
|
+
await g.massSubmissions({ ids: [k.value], action: "unread" }), S.push(T.value);
|
|
132
|
+
} catch (e) {
|
|
133
|
+
h.danger(w(e));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
async function be() {
|
|
137
|
+
if (await De({
|
|
138
|
+
title: t("panel.delete-submission-title"),
|
|
139
|
+
message: t("panel.delete-submission-text"),
|
|
140
|
+
confirmText: t("panel.delete"),
|
|
141
|
+
cancelText: t("panel.cancel"),
|
|
142
|
+
tone: "danger"
|
|
143
|
+
}))
|
|
144
|
+
try {
|
|
145
|
+
await g.removeSubmission(k.value), h.success(t("panel.deleted")), S.push(T.value);
|
|
146
|
+
} catch (r) {
|
|
147
|
+
h.danger(w(r));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function K(e) {
|
|
151
|
+
e !== null && S.push({ path: `${U.base}/submissions/${e}`, query: { ..._.query } });
|
|
152
|
+
}
|
|
153
|
+
function ye(e) {
|
|
154
|
+
const r = A.value.find((l) => l.key === e);
|
|
155
|
+
return r === void 0 ? e : L(r);
|
|
156
|
+
}
|
|
157
|
+
const he = p(
|
|
158
|
+
() => u.value?.events?.some((e) => e.type === "no_recipients") ?? !1
|
|
159
|
+
);
|
|
160
|
+
function ge(e) {
|
|
161
|
+
switch (e.type) {
|
|
162
|
+
case "created":
|
|
163
|
+
return t("panel.event-created");
|
|
164
|
+
case "status":
|
|
165
|
+
return t("panel.event-status", { to: ye(e.to ?? "") });
|
|
166
|
+
case "assignee":
|
|
167
|
+
return e.to === null || e.to === "" ? t("panel.event-unassigned") : t("panel.event-assignee", { to: e.to });
|
|
168
|
+
case "note":
|
|
169
|
+
return t("panel.event-note");
|
|
170
|
+
case "notified":
|
|
171
|
+
return t("panel.event-notified");
|
|
172
|
+
// A handler of `webx-inbox.handlers`: `from` is its class, shown by its own short name.
|
|
173
|
+
case "handled":
|
|
174
|
+
return t("panel.event-handled", { name: G(e.from) });
|
|
175
|
+
case "handler_error":
|
|
176
|
+
return t("panel.event-handler-error", {
|
|
177
|
+
name: G(e.from),
|
|
178
|
+
error: e.to ?? ""
|
|
179
|
+
});
|
|
180
|
+
case "no_recipients":
|
|
181
|
+
return t("panel.event-no-recipients");
|
|
182
|
+
case "notify_queued":
|
|
183
|
+
return t("panel.event-notify-queued");
|
|
184
|
+
case "notify_failed":
|
|
185
|
+
return t("panel.event-notify-failed", { to: e.to ?? "" });
|
|
186
|
+
// An answer corrected by hand: named by the label it was asked under, when it still has one.
|
|
187
|
+
case "value":
|
|
188
|
+
return t("panel.event-value", {
|
|
189
|
+
field: xe(e.field ?? ""),
|
|
190
|
+
from: e.from ?? "",
|
|
191
|
+
to: e.to ?? ""
|
|
192
|
+
});
|
|
193
|
+
default:
|
|
194
|
+
return e.type;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function xe(e) {
|
|
198
|
+
return u.value?.values.find((l) => l.name === e)?.label || e;
|
|
199
|
+
}
|
|
200
|
+
function G(e) {
|
|
201
|
+
return (e ?? "").split("\\").pop() ?? "";
|
|
202
|
+
}
|
|
203
|
+
function ke(e) {
|
|
204
|
+
return `${Math.max(1, Math.round(e / 1024))} KB`;
|
|
205
|
+
}
|
|
206
|
+
const we = p(() => {
|
|
207
|
+
const e = u.value?.meta ?? {}, r = [];
|
|
208
|
+
typeof e.page == "string" && e.page !== "" && r.push({ label: t("panel.meta-page"), value: e.page, link: !0 });
|
|
209
|
+
const l = u.value?.placement;
|
|
210
|
+
typeof l == "string" && l !== "" && r.push({ label: t("panel.meta-placement"), value: l }), typeof e.referrer == "string" && e.referrer !== "" && r.push({ label: t("panel.meta-referrer"), value: e.referrer, link: !0 });
|
|
211
|
+
for (const [ze, We] of Object.entries(e.utm ?? {}))
|
|
212
|
+
r.push({ label: ze, value: String(We) });
|
|
213
|
+
return typeof e.locale == "string" && e.locale !== "" && r.push({ label: t("panel.meta-locale"), value: e.locale }), typeof e.ip == "string" && e.ip !== "" && r.push({ label: t("panel.meta-ip"), value: e.ip }), typeof e.user_agent == "string" && e.user_agent !== "" && r.push({ label: t("panel.meta-agent"), value: e.user_agent }), r;
|
|
214
|
+
});
|
|
215
|
+
return (e, r) => (n(), m("div", Ke, [
|
|
216
|
+
i(a(Ve), {
|
|
217
|
+
title: I.value,
|
|
218
|
+
subtitle: M.value,
|
|
219
|
+
back: T.value,
|
|
220
|
+
actions: ce.value
|
|
221
|
+
}, {
|
|
222
|
+
extra: s(() => [
|
|
223
|
+
i(a(X), {
|
|
224
|
+
icon: "chevron-left",
|
|
225
|
+
size: "lg",
|
|
226
|
+
title: a(t)("panel.previous"),
|
|
227
|
+
disabled: !u.value?.previous_id,
|
|
228
|
+
onClick: r[0] || (r[0] = (l) => K(u.value?.previous_id ?? null))
|
|
229
|
+
}, null, 8, ["title", "disabled"]),
|
|
230
|
+
i(a(X), {
|
|
231
|
+
icon: "chevron-right",
|
|
232
|
+
size: "lg",
|
|
233
|
+
title: a(t)("panel.next"),
|
|
234
|
+
disabled: !u.value?.next_id,
|
|
235
|
+
onClick: r[1] || (r[1] = (l) => K(u.value?.next_id ?? null))
|
|
236
|
+
}, null, 8, ["title", "disabled"])
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
}, 8, ["title", "subtitle", "back", "actions"]),
|
|
240
|
+
B.value ? (n(), c(a(Ee), {
|
|
241
|
+
key: 0,
|
|
242
|
+
rows: 6
|
|
243
|
+
})) : u.value ? (n(), m("div", Ge, [
|
|
244
|
+
f("div", Je, [
|
|
245
|
+
i(a(N), {
|
|
246
|
+
title: a(t)("panel.answers")
|
|
247
|
+
}, {
|
|
248
|
+
default: s(() => [
|
|
249
|
+
u.value.values.length === 0 ? (n(), c(a(Re), {
|
|
250
|
+
key: 0,
|
|
251
|
+
size: "sm",
|
|
252
|
+
description: a(t)("panel.no-answers")
|
|
253
|
+
}, null, 8, ["description"])) : (n(), c(a(Y), {
|
|
254
|
+
key: 1,
|
|
255
|
+
columns: 1,
|
|
256
|
+
layout: "vertical"
|
|
257
|
+
}, {
|
|
258
|
+
default: s(() => [
|
|
259
|
+
(n(!0), m(z, null, W(u.value.values, (l) => (n(), c(a($), {
|
|
260
|
+
key: l.id,
|
|
261
|
+
label: l.label ?? l.name
|
|
262
|
+
}, {
|
|
263
|
+
default: s(() => [
|
|
264
|
+
f("p", Qe, o(l.value || "—"), 1)
|
|
265
|
+
]),
|
|
266
|
+
_: 2
|
|
267
|
+
}, 1032, ["label"]))), 128))
|
|
268
|
+
]),
|
|
269
|
+
_: 1
|
|
270
|
+
}))
|
|
271
|
+
]),
|
|
272
|
+
_: 1
|
|
273
|
+
}, 8, ["title"]),
|
|
274
|
+
u.value.files.length > 0 ? (n(), c(a(N), {
|
|
275
|
+
key: 0,
|
|
276
|
+
title: a(t)("panel.attachments")
|
|
277
|
+
}, {
|
|
278
|
+
default: s(() => [
|
|
279
|
+
f("div", Xe, [
|
|
280
|
+
(n(!0), m(z, null, W(u.value.files, (l) => (n(), c(a(Ue), {
|
|
281
|
+
key: l.id,
|
|
282
|
+
name: l.name,
|
|
283
|
+
type: l.mime ?? void 0,
|
|
284
|
+
"download-url": l.url,
|
|
285
|
+
"download-label": a(t)("panel.download"),
|
|
286
|
+
size: "sm"
|
|
287
|
+
}, {
|
|
288
|
+
meta: s(() => [
|
|
289
|
+
d(o(ke(l.size)), 1)
|
|
290
|
+
]),
|
|
291
|
+
_: 2
|
|
292
|
+
}, 1032, ["name", "type", "download-url", "download-label"]))), 128))
|
|
293
|
+
])
|
|
294
|
+
]),
|
|
295
|
+
_: 1
|
|
296
|
+
}, 8, ["title"])) : y("", !0),
|
|
297
|
+
me.value ? (n(), c(a(Z), {
|
|
298
|
+
key: 1,
|
|
299
|
+
type: "warning",
|
|
300
|
+
closable: !1,
|
|
301
|
+
title: a(t)("panel.channels-failed")
|
|
302
|
+
}, null, 8, ["title"])) : y("", !0),
|
|
303
|
+
i(a(N), { class: "wx-submission__more" }, {
|
|
304
|
+
default: s(() => [
|
|
305
|
+
i(a(je), {
|
|
306
|
+
variant: "pill",
|
|
307
|
+
"aria-label": I.value
|
|
308
|
+
}, {
|
|
309
|
+
default: s(() => [
|
|
310
|
+
i(a(V), {
|
|
311
|
+
value: "notes",
|
|
312
|
+
label: a(se)("notes.title")
|
|
313
|
+
}, {
|
|
314
|
+
default: s(() => [
|
|
315
|
+
i(a(Ae), {
|
|
316
|
+
id: u.value.id,
|
|
317
|
+
type: "inbox_submission",
|
|
318
|
+
title: "",
|
|
319
|
+
can: x.value,
|
|
320
|
+
onChange: D
|
|
321
|
+
}, null, 8, ["id", "can"])
|
|
322
|
+
]),
|
|
323
|
+
_: 1
|
|
324
|
+
}, 8, ["label"]),
|
|
325
|
+
i(a(V), {
|
|
326
|
+
value: "log",
|
|
327
|
+
label: a(t)("panel.log")
|
|
328
|
+
}, {
|
|
329
|
+
default: s(() => [
|
|
330
|
+
i(a(Fe), { size: "sm" }, {
|
|
331
|
+
default: s(() => [
|
|
332
|
+
(n(!0), m(z, null, W(u.value.events, (l) => (n(), c(a(Le), {
|
|
333
|
+
key: l.id
|
|
334
|
+
}, {
|
|
335
|
+
default: s(() => [
|
|
336
|
+
i(a(v), {
|
|
337
|
+
size: "sm",
|
|
338
|
+
as: "p",
|
|
339
|
+
class: "wx-submission__event"
|
|
340
|
+
}, {
|
|
341
|
+
default: s(() => [
|
|
342
|
+
d(o(ge(l)), 1)
|
|
343
|
+
]),
|
|
344
|
+
_: 2
|
|
345
|
+
}, 1024),
|
|
346
|
+
f("p", Ye, [
|
|
347
|
+
i(a(v), {
|
|
348
|
+
size: "sm",
|
|
349
|
+
tone: "muted"
|
|
350
|
+
}, {
|
|
351
|
+
default: s(() => [
|
|
352
|
+
d(o(l.author?.name ?? a(t)("panel.system")), 1)
|
|
353
|
+
]),
|
|
354
|
+
_: 2
|
|
355
|
+
}, 1024),
|
|
356
|
+
i(a(Q), {
|
|
357
|
+
value: l.created_at
|
|
358
|
+
}, null, 8, ["value"])
|
|
359
|
+
])
|
|
360
|
+
]),
|
|
361
|
+
_: 2
|
|
362
|
+
}, 1024))), 128))
|
|
363
|
+
]),
|
|
364
|
+
_: 1
|
|
365
|
+
})
|
|
366
|
+
]),
|
|
367
|
+
_: 1
|
|
368
|
+
}, 8, ["label"]),
|
|
369
|
+
i(a(V), {
|
|
370
|
+
value: "details",
|
|
371
|
+
label: a(t)("panel.details")
|
|
372
|
+
}, {
|
|
373
|
+
default: s(() => [
|
|
374
|
+
f("div", Ze, [
|
|
375
|
+
i(a(Y), {
|
|
376
|
+
columns: 1,
|
|
377
|
+
layout: "vertical",
|
|
378
|
+
size: "sm"
|
|
379
|
+
}, {
|
|
380
|
+
default: s(() => [
|
|
381
|
+
i(a($), {
|
|
382
|
+
label: a(t)("panel.received")
|
|
383
|
+
}, {
|
|
384
|
+
default: s(() => [
|
|
385
|
+
i(a(Q), {
|
|
386
|
+
value: u.value.created_at,
|
|
387
|
+
tone: "default"
|
|
388
|
+
}, null, 8, ["value"])
|
|
389
|
+
]),
|
|
390
|
+
_: 1
|
|
391
|
+
}, 8, ["label"]),
|
|
392
|
+
i(a($), {
|
|
393
|
+
label: a(t)("panel.meta-source")
|
|
394
|
+
}, {
|
|
395
|
+
default: s(() => [
|
|
396
|
+
i(a(R), {
|
|
397
|
+
type: u.value.source === "panel" ? "info" : "default"
|
|
398
|
+
}, {
|
|
399
|
+
default: s(() => [
|
|
400
|
+
d(o(u.value.source === "panel" ? a(t)("panel.source-panel") : a(t)("panel.source-web")), 1)
|
|
401
|
+
]),
|
|
402
|
+
_: 1
|
|
403
|
+
}, 8, ["type"])
|
|
404
|
+
]),
|
|
405
|
+
_: 1
|
|
406
|
+
}, 8, ["label"]),
|
|
407
|
+
(n(!0), m(z, null, W(we.value, (l) => (n(), c(a($), {
|
|
408
|
+
key: l.label,
|
|
409
|
+
label: l.label
|
|
410
|
+
}, {
|
|
411
|
+
default: s(() => [
|
|
412
|
+
l.link ? (n(), m("a", {
|
|
413
|
+
key: 0,
|
|
414
|
+
href: l.value,
|
|
415
|
+
target: "_blank",
|
|
416
|
+
rel: "noreferrer"
|
|
417
|
+
}, o(l.value), 9, ea)) : (n(), m("span", aa, o(l.value), 1))
|
|
418
|
+
]),
|
|
419
|
+
_: 2
|
|
420
|
+
}, 1032, ["label"]))), 128))
|
|
421
|
+
]),
|
|
422
|
+
_: 1
|
|
423
|
+
}),
|
|
424
|
+
b.value?.state === "failed" ? (n(), c(a(Z), {
|
|
425
|
+
key: 0,
|
|
426
|
+
type: "warning",
|
|
427
|
+
closable: !1,
|
|
428
|
+
title: a(t)("panel.notify-failed")
|
|
429
|
+
}, {
|
|
430
|
+
default: s(() => [
|
|
431
|
+
f("span", ta, o(b.value.error), 1)
|
|
432
|
+
]),
|
|
433
|
+
_: 1
|
|
434
|
+
}, 8, ["title"])) : b.value?.state === "queued" ? (n(), c(a(v), {
|
|
435
|
+
key: 1,
|
|
436
|
+
size: "sm",
|
|
437
|
+
tone: "muted"
|
|
438
|
+
}, {
|
|
439
|
+
default: s(() => [
|
|
440
|
+
d(o(a(t)("panel.notify-queued")), 1)
|
|
441
|
+
]),
|
|
442
|
+
_: 1
|
|
443
|
+
})) : b.value?.state === "delivered" ? (n(), c(a(v), {
|
|
444
|
+
key: 2,
|
|
445
|
+
size: "sm",
|
|
446
|
+
tone: "muted"
|
|
447
|
+
}, {
|
|
448
|
+
default: s(() => [
|
|
449
|
+
d(o(a(t)("panel.notified")), 1)
|
|
450
|
+
]),
|
|
451
|
+
_: 1
|
|
452
|
+
})) : he.value ? (n(), c(a(v), {
|
|
453
|
+
key: 3,
|
|
454
|
+
size: "sm",
|
|
455
|
+
tone: "muted"
|
|
456
|
+
}, {
|
|
457
|
+
default: s(() => [
|
|
458
|
+
d(o(a(t)("panel.notified-nobody")), 1)
|
|
459
|
+
]),
|
|
460
|
+
_: 1
|
|
461
|
+
})) : (n(), c(a(v), {
|
|
462
|
+
key: 4,
|
|
463
|
+
size: "sm",
|
|
464
|
+
tone: "muted"
|
|
465
|
+
}, {
|
|
466
|
+
default: s(() => [
|
|
467
|
+
d(o(a(t)("panel.not-notified")), 1)
|
|
468
|
+
]),
|
|
469
|
+
_: 1
|
|
470
|
+
})),
|
|
471
|
+
b.value && b.value.recipients.length > 0 ? (n(), m("ul", la, [
|
|
472
|
+
(n(!0), m(z, null, W(b.value.recipients, (l) => (n(), m("li", {
|
|
473
|
+
key: l.address
|
|
474
|
+
}, [
|
|
475
|
+
i(a(v), { size: "sm" }, {
|
|
476
|
+
default: s(() => [
|
|
477
|
+
d(o(l.address), 1)
|
|
478
|
+
]),
|
|
479
|
+
_: 2
|
|
480
|
+
}, 1024),
|
|
481
|
+
i(a(R), {
|
|
482
|
+
type: l.state === "failed" ? "danger" : l.state === "delivered" ? "success" : "default"
|
|
483
|
+
}, {
|
|
484
|
+
default: s(() => [
|
|
485
|
+
d(o(pe(l.state)), 1)
|
|
486
|
+
]),
|
|
487
|
+
_: 2
|
|
488
|
+
}, 1032, ["type"])
|
|
489
|
+
]))), 128))
|
|
490
|
+
])) : y("", !0),
|
|
491
|
+
x.value && (b.value?.state === "failed" || b.value?.state === "queued") ? (n(), m("div", sa, [
|
|
492
|
+
i(a(ee), {
|
|
493
|
+
size: "sm",
|
|
494
|
+
onClick: E
|
|
495
|
+
}, {
|
|
496
|
+
default: s(() => [
|
|
497
|
+
d(o(a(t)("panel.notify-again")), 1)
|
|
498
|
+
]),
|
|
499
|
+
_: 1
|
|
500
|
+
})
|
|
501
|
+
])) : y("", !0)
|
|
502
|
+
])
|
|
503
|
+
]),
|
|
504
|
+
_: 1
|
|
505
|
+
}, 8, ["label"]),
|
|
506
|
+
q.value ? (n(), c(a(V), {
|
|
507
|
+
key: 0,
|
|
508
|
+
value: "channels",
|
|
509
|
+
label: a(t)("panel.channels")
|
|
510
|
+
}, {
|
|
511
|
+
default: s(() => [
|
|
512
|
+
f("div", na, [
|
|
513
|
+
q.value.length === 0 ? (n(), c(a(v), {
|
|
514
|
+
key: 0,
|
|
515
|
+
size: "sm",
|
|
516
|
+
tone: "muted"
|
|
517
|
+
}, {
|
|
518
|
+
default: s(() => [
|
|
519
|
+
d(o(a(t)("panel.channels-none")), 1)
|
|
520
|
+
]),
|
|
521
|
+
_: 1
|
|
522
|
+
})) : (n(), m("ul", ia, [
|
|
523
|
+
(n(!0), m(z, null, W(q.value, (l) => (n(), m("li", {
|
|
524
|
+
key: l.id,
|
|
525
|
+
class: "wx-submission__channel"
|
|
526
|
+
}, [
|
|
527
|
+
f("div", ua, [
|
|
528
|
+
i(a(v), { size: "sm" }, {
|
|
529
|
+
default: s(() => [
|
|
530
|
+
d(o(l.channel), 1)
|
|
531
|
+
]),
|
|
532
|
+
_: 2
|
|
533
|
+
}, 1024),
|
|
534
|
+
l.recipient !== "" ? (n(), c(a(v), {
|
|
535
|
+
key: 0,
|
|
536
|
+
size: "sm",
|
|
537
|
+
tone: "muted"
|
|
538
|
+
}, {
|
|
539
|
+
default: s(() => [
|
|
540
|
+
d(o(l.recipient_label ?? l.recipient), 1)
|
|
541
|
+
]),
|
|
542
|
+
_: 2
|
|
543
|
+
}, 1024)) : y("", !0),
|
|
544
|
+
l.error ?? l.reason_label ? (n(), c(a(v), {
|
|
545
|
+
key: 1,
|
|
546
|
+
size: "sm",
|
|
547
|
+
tone: "muted",
|
|
548
|
+
class: "wx-submission__detail"
|
|
549
|
+
}, {
|
|
550
|
+
default: s(() => [
|
|
551
|
+
d(o(l.error ?? l.reason_label), 1)
|
|
552
|
+
]),
|
|
553
|
+
_: 2
|
|
554
|
+
}, 1024)) : y("", !0)
|
|
555
|
+
]),
|
|
556
|
+
i(a(R), {
|
|
557
|
+
type: fe(l)
|
|
558
|
+
}, {
|
|
559
|
+
default: s(() => [
|
|
560
|
+
d(o(l.status_label), 1)
|
|
561
|
+
]),
|
|
562
|
+
_: 2
|
|
563
|
+
}, 1032, ["type"])
|
|
564
|
+
]))), 128))
|
|
565
|
+
])),
|
|
566
|
+
x.value && ve.value ? (n(), m("div", oa, [
|
|
567
|
+
i(a(ee), {
|
|
568
|
+
size: "sm",
|
|
569
|
+
onClick: E
|
|
570
|
+
}, {
|
|
571
|
+
default: s(() => [
|
|
572
|
+
d(o(a(t)("panel.notify-again")), 1)
|
|
573
|
+
]),
|
|
574
|
+
_: 1
|
|
575
|
+
})
|
|
576
|
+
])) : y("", !0)
|
|
577
|
+
])
|
|
578
|
+
]),
|
|
579
|
+
_: 1
|
|
580
|
+
}, 8, ["label"])) : y("", !0)
|
|
581
|
+
]),
|
|
582
|
+
_: 1
|
|
583
|
+
}, 8, ["aria-label"])
|
|
584
|
+
]),
|
|
585
|
+
_: 1
|
|
586
|
+
})
|
|
587
|
+
]),
|
|
588
|
+
f("aside", ra, [
|
|
589
|
+
i(a(N), null, {
|
|
590
|
+
default: s(() => [
|
|
591
|
+
f("div", da, [
|
|
592
|
+
f("label", ca, [
|
|
593
|
+
i(a(v), {
|
|
594
|
+
size: "sm",
|
|
595
|
+
tone: "muted"
|
|
596
|
+
}, {
|
|
597
|
+
default: s(() => [
|
|
598
|
+
d(o(a(t)("panel.status")), 1)
|
|
599
|
+
]),
|
|
600
|
+
_: 1
|
|
601
|
+
}),
|
|
602
|
+
i(a(ae), {
|
|
603
|
+
"model-value": u.value.status?.id ?? null,
|
|
604
|
+
options: ie.value,
|
|
605
|
+
disabled: !x.value,
|
|
606
|
+
"onUpdate:modelValue": re
|
|
607
|
+
}, null, 8, ["model-value", "options", "disabled"])
|
|
608
|
+
]),
|
|
609
|
+
f("label", pa, [
|
|
610
|
+
i(a(v), {
|
|
611
|
+
size: "sm",
|
|
612
|
+
tone: "muted"
|
|
613
|
+
}, {
|
|
614
|
+
default: s(() => [
|
|
615
|
+
d(o(a(t)("panel.assignee")), 1)
|
|
616
|
+
]),
|
|
617
|
+
_: 1
|
|
618
|
+
}),
|
|
619
|
+
i(a(ae), {
|
|
620
|
+
"model-value": u.value.assignee?.id ?? null,
|
|
621
|
+
options: ue.value,
|
|
622
|
+
disabled: !x.value,
|
|
623
|
+
clearable: "",
|
|
624
|
+
placeholder: a(t)("panel.unassigned"),
|
|
625
|
+
"onUpdate:modelValue": de
|
|
626
|
+
}, null, 8, ["model-value", "options", "disabled", "placeholder"])
|
|
627
|
+
])
|
|
628
|
+
])
|
|
629
|
+
]),
|
|
630
|
+
_: 1
|
|
631
|
+
})
|
|
632
|
+
])
|
|
633
|
+
])) : y("", !0)
|
|
634
|
+
]));
|
|
635
|
+
}
|
|
636
|
+
}), ha = /* @__PURE__ */ He(ma, [["__scopeId", "data-v-89eacc36"]]);
|
|
637
|
+
export {
|
|
638
|
+
ha as default
|
|
639
|
+
};
|
|
640
|
+
//# sourceMappingURL=SubmissionPage-DVNKYpWH.js.map
|