@fewangsit/wangsvue-fats 1.0.1-alpha.67 → 1.0.1-alpha.69
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/animation/index.es.js +30 -20
- package/approverinfo/index.es.js +50 -50
- package/assetinfo/index.d.ts +5 -4
- package/assetinfo/index.es.js +116 -100
- package/assets/lottiejs/loading-page-dark.es.js +4 -0
- package/assets/lottiejs/loading-table-dark.es.js +4 -0
- package/assets/lottiejs/no-data-dark.es.js +4 -0
- package/backgroundimagecropper/index.es.js +14 -12
- package/button/index.es.js +58 -48
- package/buttonbulkaction/index.es.js +67 -59
- package/buttoncopy/index.es.js +8 -8
- package/buttondownload/index.es.js +18 -18
- package/buttonradio/index.es.js +11 -11
- package/buttonscan/index.es.js +48 -48
- package/buttonsearch/index.es.js +14 -14
- package/buttonselectuser/index.es.js +29 -29
- package/carousel/index.es.js +24 -24
- package/checkbox/index.es.js +5 -5
- package/columnlist/index.es.js +142 -132
- package/config/defaultProps.es.js +15 -11
- package/datatable/index.d.ts +14 -0
- package/datatable/index.es.js +520 -509
- package/datepicker/index.es.js +24 -24
- package/daypicker/index.es.js +29 -29
- package/dialog/index.es.js +17 -15
- package/dialogbasictransferlog/index.es.js +100 -100
- package/dialogconfirm/index.es.js +33 -33
- package/dialogdamagelog/index.es.js +106 -103
- package/dialogform/index.es.js +25 -25
- package/dialogfulltransferlog/index.es.js +98 -98
- package/dialoglinkedasset/index.es.js +61 -61
- package/dialogprintqr/index.es.js +78 -80
- package/dialogreportdamage/index.es.js +57 -57
- package/dialogreportmissing/index.es.js +94 -86
- package/dialogselecttree/index.es.js +18 -16
- package/dialogselectuser/index.es.js +17 -17
- package/directives/index.d.ts +1 -0
- package/directives/index.es.js +1 -0
- package/directives/safeHtml.d.ts +16 -0
- package/directives/safeHtml.es.js +12 -0
- package/disposalreport/index.es.js +3 -3
- package/disposalreportbulkaction/index.es.js +40 -41
- package/disposalreportdialogselectasset/index.es.js +72 -72
- package/disposalreporttable/index.es.js +108 -108
- package/disposalreporttablefilter/index.es.js +16 -17
- package/dropdown/index.es.js +120 -117
- package/editor/index.es.js +51 -48
- package/fieldwrapper/index.es.js +7 -7
- package/fileupload/index.es.js +44 -40
- package/hardwaresync/index.es.js +12 -12
- package/headercell/index.es.js +4 -4
- package/icon/index.es.js +36 -35
- package/imagecompressor/index.es.js +155 -155
- package/imageinputinfo/index.es.js +13 -13
- package/inlinemessage/index.es.js +12 -12
- package/inputbadge/index.es.js +42 -43
- package/inputnumber/index.es.js +7 -7
- package/inputpassword/index.es.js +9 -9
- package/inputrangenumber/index.es.js +16 -16
- package/inputsearch/index.es.js +27 -27
- package/inputtext/index.es.js +33 -33
- package/litedropdown/index.es.js +47 -39
- package/loading-page-dark-e0SrRAHc.js +4 -0
- package/loading-page-dark-mz8tLHZ3.js +1 -0
- package/loading-table-dark-BGh0tAPM.js +4 -0
- package/loading-table-dark-Cky7AB_C.js +1 -0
- package/menuitem/index.es.js +27 -26
- package/multirow/index.es.js +17 -16
- package/multiselect/index.es.js +86 -83
- package/no-data-dark-DERIJ8Ml.js +1 -0
- package/no-data-dark-nK4e4RAM.js +4 -0
- package/package.json +1 -1
- package/plugins/WangsVue.es.js +11 -9
- package/plugins/basei18n.d.ts +2 -2
- package/plugins/basei18n.es.js +48 -42
- package/stats.html +1 -1
- package/steps/index.es.js +18 -16
- package/style.css +2 -2
- package/tabmenu/index.es.js +14 -9
- package/tagtype/index.es.js +35 -32
- package/textarea/index.es.js +3 -3
- package/toggledarkmode/store/index.d.ts +7 -0
- package/toggleswitch/index.es.js +3 -3
- package/transactionroles/index.es.js +4 -1
- package/treesearchinput/index.es.js +15 -15
- package/username/index.es.js +37 -37
- package/utils/baseToast.util.es.js +23 -22
- package/utils/index.es.js +1 -2
- package/utils/textFormatter.util.d.ts +32 -0
- package/utils/textFormatter.util.es.js +38 -10
- package/validatormessage/index.es.js +1 -1
- package/vendor/dompurify/dist/purify.es.es.js +553 -0
- package/wangsvue-fats.d.ts +2 -1
- package/wangsvue-fats.es.js +190 -186
- package/wangsvue-fats.esm.browser.js +22487 -21781
- package/wangsvue-fats.system.js +72 -71
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as J, computed as v, ref as V, shallowRef as x, watch as q, createElementBlock as R, openBlock as u, Fragment as O, createVNode as l, withCtx as S, createElementVNode as b, createCommentVNode as m, unref as I, createBlock as k, createTextVNode as H, toDisplayString as F } from "vue";
|
|
2
2
|
import { DamageServices as K, AssetServices as P } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as X, _ as Y } from "../assetinfo/index.es.js";
|
|
4
4
|
import { a as Z } from "../utils/role.util.es.js";
|
|
5
5
|
import { u as ee } from "../utils/toast.util.es.js";
|
|
6
|
-
import { _ as
|
|
6
|
+
import { _ as E } from "../badge/index.es.js";
|
|
7
7
|
import { _ as te } from "../button/index.es.js";
|
|
8
|
-
import { _ as
|
|
8
|
+
import { _ as Q } from "../buttonscan/index.es.js";
|
|
9
9
|
import { _ as ae } from "../dialogconfirm/index.es.js";
|
|
10
10
|
import { _ as se } from "../dialogform/index.es.js";
|
|
11
11
|
import { _ as oe } from "../icon/index.es.js";
|
|
@@ -22,7 +22,7 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
22
22
|
}, pe = { class: "flex" }, fe = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "flex mr-1"
|
|
25
|
-
}, Ue = /* @__PURE__ */
|
|
25
|
+
}, Ue = /* @__PURE__ */ J({
|
|
26
26
|
__name: "DialogReportDamage",
|
|
27
27
|
props: {
|
|
28
28
|
id: {},
|
|
@@ -33,49 +33,49 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
33
33
|
submitFunction: { type: Function }
|
|
34
34
|
},
|
|
35
35
|
emits: ["update:visible", "reported"],
|
|
36
|
-
setup(
|
|
37
|
-
const r =
|
|
36
|
+
setup(G, { emit: L }) {
|
|
37
|
+
const r = G, g = L, { plan: M } = JSON.parse(
|
|
38
38
|
localStorage.getItem("user") ?? "{}"
|
|
39
|
-
), { setLoading:
|
|
39
|
+
), { setLoading: T } = X(), c = ee(), h = v(() => r.visible), w = v(
|
|
40
40
|
() => {
|
|
41
|
-
var
|
|
42
|
-
return ((e = (
|
|
41
|
+
var a, e, t, s;
|
|
42
|
+
return ((e = (a = i.value) == null ? void 0 : a.asset) == null ? void 0 : e.rfid) || ((s = (t = i.value) == null ? void 0 : t.asset) == null ? void 0 : s.qr);
|
|
43
43
|
}
|
|
44
|
-
),
|
|
45
|
-
var
|
|
46
|
-
return ((e = (
|
|
47
|
-
}),
|
|
48
|
-
var o, d, f, _,
|
|
49
|
-
const
|
|
50
|
-
return (!e && !
|
|
51
|
-
}),
|
|
52
|
-
const { qr:
|
|
53
|
-
return
|
|
54
|
-
}),
|
|
44
|
+
), U = V(), i = V(), $ = x(!1), n = x(!1), D = x(), p = v(() => {
|
|
45
|
+
var a, e;
|
|
46
|
+
return ((e = (a = i.value) == null ? void 0 : a.asset) == null ? void 0 : e.tagReported) ?? {};
|
|
47
|
+
}), W = v(() => {
|
|
48
|
+
var o, d, f, _, N, B;
|
|
49
|
+
const a = (o = p.value) == null ? void 0 : o.qr, e = (d = p.value) == null ? void 0 : d.rfid, t = !!((_ = (f = i.value) == null ? void 0 : f.asset) != null && _.qr), s = !!((B = (N = i.value) == null ? void 0 : N.asset) != null && B.rfid);
|
|
50
|
+
return (!e && !a || !a && t || !e && s) && !n.value;
|
|
51
|
+
}), A = v(() => {
|
|
52
|
+
const { qr: a, rfid: e } = p.value ?? {};
|
|
53
|
+
return a && e ? "RFID & QR Reported" : e ? "RFID Reported" : a ? "QR Reported" : "";
|
|
54
|
+
}), z = async (a) => {
|
|
55
55
|
try {
|
|
56
|
-
|
|
56
|
+
T(!0);
|
|
57
57
|
const e = {
|
|
58
|
-
notes:
|
|
59
|
-
image:
|
|
58
|
+
notes: a.formValues.notes,
|
|
59
|
+
image: a.formValues.image,
|
|
60
60
|
reportSource: r.reportSource,
|
|
61
61
|
serialNumber: D.value
|
|
62
62
|
}, t = "Success, damaged asset report has been submitted.";
|
|
63
63
|
if (r.submitFunction)
|
|
64
64
|
await r.submitFunction(e) && (c.add({ message: r.successMessage ?? t }), g("reported"), y());
|
|
65
65
|
else {
|
|
66
|
-
const { data:
|
|
67
|
-
|
|
66
|
+
const { data: s } = await K.putReportDamage(r.id, e);
|
|
67
|
+
s && (c.add({ message: r.successMessage ?? t }), g("reported"), y());
|
|
68
68
|
}
|
|
69
69
|
} catch (e) {
|
|
70
70
|
c.add({ error: e, message: "Error, failed to report damaged asset." });
|
|
71
71
|
} finally {
|
|
72
|
-
|
|
72
|
+
T(!1);
|
|
73
73
|
}
|
|
74
|
-
},
|
|
75
|
-
var
|
|
74
|
+
}, C = async (a, e, t) => {
|
|
75
|
+
var s;
|
|
76
76
|
try {
|
|
77
77
|
const { data: o } = await P.matchAssetWithTag(r.id, e);
|
|
78
|
-
return D.value = t, (
|
|
78
|
+
return D.value = t, (s = o == null ? void 0 : o.data) != null && s.totalRecords ? !0 : (c.add({
|
|
79
79
|
severity: "error",
|
|
80
80
|
message: "Error, failed to verify. TAG doesn't match.",
|
|
81
81
|
group: "scan-error-validation"
|
|
@@ -88,20 +88,20 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
return !1;
|
|
91
|
-
},
|
|
92
|
-
|
|
91
|
+
}, j = () => {
|
|
92
|
+
$.value = !0, y();
|
|
93
93
|
}, y = () => {
|
|
94
94
|
g("update:visible", !1);
|
|
95
95
|
};
|
|
96
|
-
return
|
|
96
|
+
return q(h, () => {
|
|
97
97
|
n.value = !!r.byUser, D.value = void 0;
|
|
98
|
-
}),
|
|
98
|
+
}), q(n, (a) => {
|
|
99
99
|
var e;
|
|
100
|
-
|
|
101
|
-
}), (
|
|
100
|
+
a || (e = U.value.form) == null || e.clearField();
|
|
101
|
+
}), (a, e) => (u(), R(O, null, [
|
|
102
102
|
l(se, {
|
|
103
103
|
ref_key: "dialogForm",
|
|
104
|
-
ref:
|
|
104
|
+
ref: U,
|
|
105
105
|
visible: h.value,
|
|
106
106
|
"onUpdate:visible": e[2] || (e[2] = (t) => h.value = t),
|
|
107
107
|
"buttons-template": ["cancel", "submit"],
|
|
@@ -118,8 +118,8 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
118
118
|
confirm: S((t) => [
|
|
119
119
|
l(ae, {
|
|
120
120
|
visible: t.visible,
|
|
121
|
-
onConfirm: (
|
|
122
|
-
"onUpdate:visible": (
|
|
121
|
+
onConfirm: (s) => t.submit(z),
|
|
122
|
+
"onUpdate:visible": (s) => !s && t.hide(),
|
|
123
123
|
body: "Are you sure want to continue?",
|
|
124
124
|
"confirm-label": "Continue",
|
|
125
125
|
"data-ts-section": "confirm-dialog",
|
|
@@ -127,35 +127,35 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
127
127
|
severity: "danger"
|
|
128
128
|
}, {
|
|
129
129
|
body: S(() => {
|
|
130
|
-
var
|
|
130
|
+
var s, o, d;
|
|
131
131
|
return [
|
|
132
132
|
b("p", null, [
|
|
133
|
-
b("span", de,
|
|
134
|
-
|
|
133
|
+
b("span", de, F(((d = (o = (s = i.value) == null ? void 0 : s.asset) == null ? void 0 : o.name) == null ? void 0 : d.nameWithSequence) ?? "-"), 1),
|
|
134
|
+
H(" " + F(a.$t("will be reported as damaged asset.")), 1)
|
|
135
135
|
]),
|
|
136
|
-
|
|
136
|
+
b("p", null, F(a.$t("Are you sure want to continue?")), 1)
|
|
137
137
|
];
|
|
138
138
|
}),
|
|
139
139
|
_: 2
|
|
140
140
|
}, 1032, ["visible", "onConfirm", "onUpdate:visible"])
|
|
141
141
|
]),
|
|
142
142
|
fields: S(() => {
|
|
143
|
-
var t,
|
|
143
|
+
var t, s, o, d, f;
|
|
144
144
|
return [
|
|
145
145
|
b("div", ue, [
|
|
146
146
|
l(Y, {
|
|
147
147
|
id: r.id,
|
|
148
148
|
ref_key: "assetInfo",
|
|
149
149
|
ref: i,
|
|
150
|
-
"use-tag-type":
|
|
150
|
+
"use-tag-type": I(Z)() !== "Basic"
|
|
151
151
|
}, null, 8, ["id", "use-tag-type"]),
|
|
152
152
|
(t = i.value) != null && t.asset ? (u(), R("div", me, [
|
|
153
|
-
!r.byUser && w.value &&
|
|
153
|
+
!r.byUser && w.value && I(M) !== "Basic" ? (u(), R("div", ce, [
|
|
154
154
|
b("div", pe, [
|
|
155
|
-
(o = (
|
|
156
|
-
l(
|
|
155
|
+
(o = (s = i.value) == null ? void 0 : s.asset) != null && o.rfid ? (u(), R("div", fe, [
|
|
156
|
+
l(Q, {
|
|
157
157
|
disabled: p.value.rfid,
|
|
158
|
-
"scan-validation":
|
|
158
|
+
"scan-validation": C,
|
|
159
159
|
onScan: e[0] || (e[0] = (_) => n.value = !0),
|
|
160
160
|
size: "small"
|
|
161
161
|
}, null, 8, ["disabled"]),
|
|
@@ -166,28 +166,28 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
166
166
|
severity: "primary"
|
|
167
167
|
})
|
|
168
168
|
])) : m("", !0),
|
|
169
|
-
(f = (d = i.value) == null ? void 0 : d.asset) != null && f.qr ? (u(), k(
|
|
169
|
+
(f = (d = i.value) == null ? void 0 : d.asset) != null && f.qr ? (u(), k(Q, {
|
|
170
170
|
key: 1,
|
|
171
171
|
disabled: p.value.qr,
|
|
172
|
-
"scan-validation":
|
|
172
|
+
"scan-validation": C,
|
|
173
173
|
onScan: e[1] || (e[1] = (_) => n.value = !0),
|
|
174
174
|
size: "small",
|
|
175
175
|
type: "QR"
|
|
176
176
|
}, null, 8, ["disabled"])) : m("", !0)
|
|
177
177
|
]),
|
|
178
|
-
l(
|
|
178
|
+
l(E, {
|
|
179
179
|
label: n.value ? "Verified" : "Unverified",
|
|
180
180
|
severity: n.value ? "success" : "warning"
|
|
181
181
|
}, null, 8, ["label", "severity"]),
|
|
182
|
-
|
|
182
|
+
A.value ? (u(), k(E, {
|
|
183
183
|
key: 0,
|
|
184
|
-
label:
|
|
184
|
+
label: A.value,
|
|
185
185
|
format: "nowrap",
|
|
186
186
|
severity: "danger"
|
|
187
187
|
}, null, 8, ["label"])) : m("", !0),
|
|
188
|
-
|
|
188
|
+
W.value ? (u(), k(te, {
|
|
189
189
|
key: 1,
|
|
190
|
-
onClick:
|
|
190
|
+
onClick: j,
|
|
191
191
|
label: "Report TAG",
|
|
192
192
|
text: ""
|
|
193
193
|
})) : m("", !0)
|
|
@@ -230,8 +230,8 @@ const de = { class: "font-bold" }, ue = { class: "flex flex-col gap-3" }, me = {
|
|
|
230
230
|
}, 8, ["visible"]),
|
|
231
231
|
l(ne, {
|
|
232
232
|
id: r.id,
|
|
233
|
-
visible:
|
|
234
|
-
"onUpdate:visible": e[3] || (e[3] = (t) =>
|
|
233
|
+
visible: $.value,
|
|
234
|
+
"onUpdate:visible": e[3] || (e[3] = (t) => $.value = t),
|
|
235
235
|
onReported: e[4] || (e[4] = (t) => g("reported"))
|
|
236
236
|
}, null, 8, ["id", "visible"])
|
|
237
237
|
], 64));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TrackingServices as
|
|
3
|
-
import { u as
|
|
4
|
-
import { a as
|
|
5
|
-
import { u as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as $, computed as l, ref as k, resolveDirective as R, createBlock as b, openBlock as y, withCtx as m, createElementVNode as p, createVNode as v, unref as x, withDirectives as B, toDisplayString as C } from "vue";
|
|
2
|
+
import { TrackingServices as F, MissingServices as A } from "@tagsamurai/fats-api-services";
|
|
3
|
+
import { u as D, _ as E } from "../assetinfo/index.es.js";
|
|
4
|
+
import { a as I } from "../utils/role.util.es.js";
|
|
5
|
+
import { u as N } from "../utils/toast.util.es.js";
|
|
6
|
+
import { _ as U } from "../dialogconfirm/index.es.js";
|
|
7
|
+
import { _ as V } from "../dialogform/index.es.js";
|
|
8
|
+
import { _ as W } from "../textarea/index.es.js";
|
|
9
|
+
const H = { class: "flex flex-col gap-3" }, K = /* @__PURE__ */ $({
|
|
10
10
|
__name: "DialogReportMissing",
|
|
11
11
|
props: {
|
|
12
12
|
id: {},
|
|
@@ -20,99 +20,107 @@ const T = { class: "font-bold" }, W = { class: "flex flex-col gap-3" }, J = /* @
|
|
|
20
20
|
},
|
|
21
21
|
emits: ["update:visible", "reported"],
|
|
22
22
|
setup(_, { emit: M }) {
|
|
23
|
-
const e = _,
|
|
23
|
+
const e = _, i = M, { setLoading: c } = D(), o = N(), d = l(() => e.visible), h = l(
|
|
24
24
|
() => e.permanentlyMissing ? "Report Permanently Missing" : "Report Missing"
|
|
25
|
-
), S =
|
|
25
|
+
), S = l(
|
|
26
26
|
() => e.permanentlyMissing ? "Report as Permanenly Missing" : "Report Missing Asset"
|
|
27
|
-
),
|
|
27
|
+
), u = k(), w = async (r) => {
|
|
28
28
|
try {
|
|
29
|
-
|
|
29
|
+
c(!0);
|
|
30
30
|
const s = {
|
|
31
|
-
notes:
|
|
31
|
+
notes: r.formValues.notes,
|
|
32
32
|
reportSource: e.reportSource
|
|
33
|
-
},
|
|
33
|
+
}, a = e.permanentlyMissing ? "Success, asset has been reported as permanently missing." : "Success, missing asset has been reported.";
|
|
34
34
|
if (e.submitWithoutApi)
|
|
35
|
-
|
|
35
|
+
o.add({ message: e.successMessage ?? a }), i("reported", s), i("update:visible", !1);
|
|
36
36
|
else if (e.submitFunction)
|
|
37
|
-
await e.submitFunction(s) && (
|
|
37
|
+
await e.submitFunction(s) && (o.add({ message: e.successMessage ?? a }), i("reported"), i("update:visible", !1));
|
|
38
38
|
else {
|
|
39
|
-
const { data:
|
|
39
|
+
const { data: t } = e.permanentlyMissing ? await F.putReportPermanentlyMissing(
|
|
40
40
|
e.trackingId ?? "",
|
|
41
41
|
s
|
|
42
|
-
) : await
|
|
43
|
-
|
|
42
|
+
) : await A.putReportMissing(e.id, s);
|
|
43
|
+
t && (o.add({ message: e.successMessage ?? a }), i("reported"), i("update:visible", !1));
|
|
44
44
|
}
|
|
45
45
|
} catch (s) {
|
|
46
|
-
const
|
|
47
|
-
|
|
46
|
+
const a = e.permanentlyMissing ? "Error, failed to report asset as permanently missing." : "Error, failed to report missing asset.";
|
|
47
|
+
o.add({ error: s, message: a });
|
|
48
48
|
} finally {
|
|
49
|
-
|
|
49
|
+
c(!1);
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
return (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
B(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
52
|
+
return (r, s) => {
|
|
53
|
+
const a = R("safe-html");
|
|
54
|
+
return y(), b(V, {
|
|
55
|
+
visible: d.value,
|
|
56
|
+
"onUpdate:visible": s[0] || (s[0] = (t) => d.value = t),
|
|
57
|
+
"buttons-template": ["cancel", "submit"],
|
|
58
|
+
header: h.value,
|
|
59
|
+
"reset-after-submit": !1,
|
|
60
|
+
"show-stay-checkbox": !1,
|
|
61
|
+
"use-clear-btn": !1,
|
|
62
|
+
onClose: s[1] || (s[1] = (t) => i("update:visible", !1)),
|
|
63
|
+
action: "Submit",
|
|
64
|
+
closable: "",
|
|
65
|
+
"data-ts-name": "report-missing",
|
|
66
|
+
width: "large"
|
|
67
|
+
}, {
|
|
68
|
+
confirm: m((t) => [
|
|
69
|
+
v(U, {
|
|
70
|
+
header: S.value,
|
|
71
|
+
visible: t.visible,
|
|
72
|
+
onConfirm: (n) => t.submit(w),
|
|
73
|
+
"onUpdate:visible": (n) => !n && t.hide(),
|
|
74
|
+
"confirm-label": "Report",
|
|
75
|
+
"data-ts-section": "confirm-dialog",
|
|
76
|
+
severity: "danger"
|
|
77
|
+
}, {
|
|
78
|
+
body: m(() => {
|
|
79
|
+
var n, f, g;
|
|
80
|
+
return [
|
|
81
|
+
B(p("p", null, null, 512), [
|
|
82
|
+
[
|
|
83
|
+
a,
|
|
84
|
+
r.$t(
|
|
85
|
+
`|%s| will be reported as ${e.permanentlyMissing ? "permanently missing asset" : "missing asset"}`,
|
|
86
|
+
((g = (f = (n = u.value) == null ? void 0 : n.asset) == null ? void 0 : f.name) == null ? void 0 : g.nameWithSequence) ?? "-"
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
]),
|
|
90
|
+
p("p", null, C(r.$t("Are you sure you want to report it?")), 1)
|
|
91
|
+
];
|
|
92
|
+
}),
|
|
93
|
+
_: 2
|
|
94
|
+
}, 1032, ["header", "visible", "onConfirm", "onUpdate:visible"])
|
|
95
|
+
]),
|
|
96
|
+
fields: m(() => [
|
|
97
|
+
p("div", H, [
|
|
98
|
+
(y(), b(E, {
|
|
99
|
+
id: e.id,
|
|
100
|
+
key: e.id,
|
|
101
|
+
ref_key: "assetInfo",
|
|
102
|
+
ref: u,
|
|
103
|
+
"use-tag-type": x(I)() !== "Basic"
|
|
104
|
+
}, null, 8, ["id", "use-tag-type"])),
|
|
105
|
+
v(W, {
|
|
106
|
+
"custom-validation": { empty: "Note must not be empty" },
|
|
107
|
+
"max-input": 120,
|
|
108
|
+
rows: 3,
|
|
109
|
+
"data-ts-section": "notes-input",
|
|
110
|
+
"field-name": "notes",
|
|
111
|
+
"input-class": "!min-h-[67px]",
|
|
112
|
+
label: "Note",
|
|
113
|
+
mandatory: "",
|
|
114
|
+
placeholder: "Enter note",
|
|
115
|
+
"use-validator": ""
|
|
116
|
+
})
|
|
117
|
+
])
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
}, 8, ["visible", "header"]);
|
|
121
|
+
};
|
|
114
122
|
}
|
|
115
123
|
});
|
|
116
124
|
export {
|
|
117
|
-
|
|
125
|
+
K as _
|
|
118
126
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as P, mergeModels as T, useModel as U, inject as W, ref as o, computed as x, watch as b, createBlock as N, openBlock as d, unref as f, createSlots as O, withCtx as g, createVNode as B, mergeProps as z, renderSlot as $, createElementVNode as D, createElementBlock as k, createCommentVNode as h, normalizeClass as V, toDisplayString as K, Fragment as I, renderList as Y, withDirectives as q, vShow as J } from "vue";
|
|
2
2
|
import { g as Q } from "../utils/object.util.es.js";
|
|
3
3
|
import { _ as j } from "../button/index.es.js";
|
|
4
4
|
import { _ as R } from "../dialog/index.es.js";
|
|
@@ -15,7 +15,7 @@ const ee = {
|
|
|
15
15
|
}, te = {
|
|
16
16
|
class: "flex gap-1 items-center justify-end",
|
|
17
17
|
"data-wv-section": "footer-button"
|
|
18
|
-
}, ue = /* @__PURE__ */
|
|
18
|
+
}, ue = /* @__PURE__ */ P({
|
|
19
19
|
__name: "DialogSelectTree",
|
|
20
20
|
props: /* @__PURE__ */ T({
|
|
21
21
|
fetchTree: {},
|
|
@@ -77,8 +77,8 @@ const ee = {
|
|
|
77
77
|
visibleModifiers: {}
|
|
78
78
|
}),
|
|
79
79
|
emits: /* @__PURE__ */ T(["select", "hide"], ["update:visible"]),
|
|
80
|
-
setup(
|
|
81
|
-
const s =
|
|
80
|
+
setup(L, { expose: A, emit: F }) {
|
|
81
|
+
const s = L, C = F, n = U(L, "visible"), v = W("preset", {}).dialog, r = o(), p = o(""), y = o(""), m = o([]), c = o(), S = o(), E = o(!1), u = o(), w = o(), H = x(() => s.header ? s.header : s.type === "group" ? "Select Group" : "Select Category"), M = (e = !0) => {
|
|
82
82
|
c.value = u.value, S.value = w.value, Object.keys(c.value ?? {}).length ? (C("select", {
|
|
83
83
|
keys: c.value,
|
|
84
84
|
selectedNodes: m.value,
|
|
@@ -148,7 +148,7 @@ const ee = {
|
|
|
148
148
|
header: g(() => {
|
|
149
149
|
var t;
|
|
150
150
|
return [
|
|
151
|
-
|
|
151
|
+
$(e.$slots, "header", {
|
|
152
152
|
dialogHeader: H.value,
|
|
153
153
|
filter: p.value,
|
|
154
154
|
isLoading: !!((t = r.value) != null && t.isLoading),
|
|
@@ -159,20 +159,22 @@ const ee = {
|
|
|
159
159
|
}, () => {
|
|
160
160
|
var a;
|
|
161
161
|
return [
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
D("div", ee, [
|
|
163
|
+
D("h3", {
|
|
164
164
|
class: V([...f(v).title.class, "!leading-6"])
|
|
165
|
-
},
|
|
165
|
+
}, K(e.$t(H.value)), 3),
|
|
166
166
|
e.lists ? (d(), k("ul", le, [
|
|
167
|
-
(d(!0), k(I, null, Y(e.lists, (i,
|
|
168
|
-
key:
|
|
169
|
-
class: "text-xs leading-[16.39px] tracking-[0.02em] font-medium text-general-800 list-disc ps-[6px]"
|
|
170
|
-
},
|
|
167
|
+
(d(!0), k(I, null, Y(e.lists, (i, G) => (d(), k("li", {
|
|
168
|
+
key: G,
|
|
169
|
+
class: "text-xs leading-[16.39px] tracking-[0.02em] font-medium text-general-800 dark:text-white list-disc ps-[6px]"
|
|
170
|
+
}, K(e.$t(
|
|
171
|
+
e.listLabel && typeof i != "string" ? f(Q)(i, e.listLabel) : i
|
|
172
|
+
)), 1))), 128))
|
|
171
173
|
])) : h("", !0),
|
|
172
174
|
e.subHeader ? (d(), k("h4", {
|
|
173
175
|
key: 1,
|
|
174
176
|
class: V([...f(v).title.class, "!leading-6 text-sm"])
|
|
175
|
-
},
|
|
177
|
+
}, K(e.$t(e.subHeader)), 3)) : h("", !0),
|
|
176
178
|
(a = r.value) != null && a.isLoading ? h("", !0) : (d(), N(Z, {
|
|
177
179
|
key: 2,
|
|
178
180
|
modelValue: p.value,
|
|
@@ -217,7 +219,7 @@ const ee = {
|
|
|
217
219
|
e.$slots.treenode ? {
|
|
218
220
|
name: "default",
|
|
219
221
|
fn: g(({ node: t, checked: a, disabled: i }) => [
|
|
220
|
-
|
|
222
|
+
$(e.$slots, "treenode", {
|
|
221
223
|
checked: a,
|
|
222
224
|
disabled: i,
|
|
223
225
|
node: t
|
|
@@ -232,7 +234,7 @@ const ee = {
|
|
|
232
234
|
s.readonly ? void 0 : {
|
|
233
235
|
name: "footer",
|
|
234
236
|
fn: g(() => [
|
|
235
|
-
|
|
237
|
+
$(e.$slots, "footer", {}, () => {
|
|
236
238
|
var t;
|
|
237
239
|
return [
|
|
238
240
|
e.allowEmptySelection ? h("", !0) : q((d(), N(_, {
|
|
@@ -242,7 +244,7 @@ const ee = {
|
|
|
242
244
|
}, null, 8, ["message"])), [
|
|
243
245
|
[J, !!y.value]
|
|
244
246
|
]),
|
|
245
|
-
|
|
247
|
+
D("div", te, [
|
|
246
248
|
B(j, {
|
|
247
249
|
onClick: l[5] || (l[5] = (a) => n.value = !1),
|
|
248
250
|
label: "Cancel",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as c, defineComponent as F, computed as S, watch as C, createBlock as N, openBlock as u, withCtx as y, createElementVNode as i, createElementBlock as f, createCommentVNode as h, createVNode as n, Fragment as U, renderList as D, toDisplayString as b, unref as B, renderSlot as P } from "vue";
|
|
2
2
|
import { _ as E } from "../image/index.es.js";
|
|
3
3
|
import { _ } from "../button/index.es.js";
|
|
4
4
|
import { _ as O } from "../buttonfilter/index.es.js";
|
|
@@ -6,7 +6,7 @@ import { _ as j } from "../buttonsearch/index.es.js";
|
|
|
6
6
|
import { D as I } from "../datatable/index.es.js";
|
|
7
7
|
import { _ as L } from "../dialog/index.es.js";
|
|
8
8
|
import { _ as V } from "../dialogselectuserfilter/index.es.js";
|
|
9
|
-
const z = () =>
|
|
9
|
+
const z = () => c([
|
|
10
10
|
{
|
|
11
11
|
field: "profilePictureSmall",
|
|
12
12
|
header: "Photo",
|
|
@@ -77,9 +77,9 @@ const z = () => u([
|
|
|
77
77
|
"data-ts-section": "dialog-asset-name-detail-action-group"
|
|
78
78
|
}, q = { class: "" }, A = { class: "flex justify-end items-center gap-1" }, G = { class: "flex flex-col justify-end gap-1" }, H = {
|
|
79
79
|
key: 0,
|
|
80
|
-
class: "text-danger-500 text-[12px] font-light",
|
|
80
|
+
class: "text-danger-500 dark:text-danger-300 text-[12px] font-light",
|
|
81
81
|
"data-ts-section": "warning-message"
|
|
82
|
-
}, le = /* @__PURE__ */
|
|
82
|
+
}, le = /* @__PURE__ */ F({
|
|
83
83
|
__name: "DialogSelectUser",
|
|
84
84
|
props: {
|
|
85
85
|
header: { default: "Select User" },
|
|
@@ -93,21 +93,21 @@ const z = () => u([
|
|
|
93
93
|
},
|
|
94
94
|
emits: ["update:visible", "selected"],
|
|
95
95
|
setup(e, { emit: g }) {
|
|
96
|
-
const t = e, m = g, p =
|
|
96
|
+
const t = e, m = g, p = S(() => t.visible), d = c(!1), v = c(), r = c([]), a = c(), k = z(), x = () => {
|
|
97
97
|
!r.value.length && !a.value ? d.value = !0 : (t.selectionType === "checkbox" ? m("selected", r.value) : m("selected", a.value), m("update:visible", !1));
|
|
98
98
|
}, w = () => {
|
|
99
99
|
r.value = [], a.value = void 0, d.value = !1;
|
|
100
|
-
},
|
|
100
|
+
}, $ = async (o) => {
|
|
101
101
|
if (t.fetchFunction)
|
|
102
102
|
return await t.fetchFunction(o);
|
|
103
103
|
};
|
|
104
104
|
return C(
|
|
105
105
|
p,
|
|
106
106
|
async (o) => {
|
|
107
|
-
w(), o && t.fetchOptionFunction && (
|
|
107
|
+
w(), o && t.fetchOptionFunction && (v.value = await t.fetchOptionFunction());
|
|
108
108
|
},
|
|
109
109
|
{ immediate: !0 }
|
|
110
|
-
), (o, l) => (
|
|
110
|
+
), (o, l) => (u(), N(L, {
|
|
111
111
|
visible: p.value,
|
|
112
112
|
"onUpdate:visible": [
|
|
113
113
|
l[3] || (l[3] = (s) => p.value = s),
|
|
@@ -120,10 +120,10 @@ const z = () => u([
|
|
|
120
120
|
"data-ts-name": "dialog-asset-name-detail",
|
|
121
121
|
modal: ""
|
|
122
122
|
}, {
|
|
123
|
-
footer:
|
|
123
|
+
footer: y(() => [
|
|
124
124
|
P(o.$slots, "footer", {}, () => [
|
|
125
125
|
i("div", G, [
|
|
126
|
-
d.value ? (
|
|
126
|
+
d.value ? (u(), f("span", H, b(o.$t("You must pick a user")), 1)) : h("", !0),
|
|
127
127
|
i("div", null, [
|
|
128
128
|
n(_, {
|
|
129
129
|
onClick: l[2] || (l[2] = (s) => o.$emit("update:visible", !1)),
|
|
@@ -141,27 +141,27 @@ const z = () => u([
|
|
|
141
141
|
])
|
|
142
142
|
])
|
|
143
143
|
]),
|
|
144
|
-
default:
|
|
144
|
+
default: y(() => [
|
|
145
145
|
i("div", R, [
|
|
146
|
-
t.list && t.list.length ? (
|
|
147
|
-
(
|
|
148
|
-
])) :
|
|
146
|
+
t.list && t.list.length ? (u(), f("ul", W, [
|
|
147
|
+
(u(!0), f(U, null, D(t.list, (s, T) => (u(), f("li", { key: T }, b(s), 1))), 128))
|
|
148
|
+
])) : h("", !0),
|
|
149
149
|
i("div", Y, [
|
|
150
|
-
i("div", q,
|
|
150
|
+
i("div", q, b(o.$t(o.description)), 1),
|
|
151
151
|
i("div", A, [
|
|
152
152
|
n(j, { "table-name": "dialog-select-user-table" }),
|
|
153
153
|
n(O, { "table-name": "dialog-select-user-table" })
|
|
154
154
|
])
|
|
155
155
|
]),
|
|
156
156
|
n(V, {
|
|
157
|
-
"filter-options":
|
|
157
|
+
"filter-options": v.value,
|
|
158
158
|
"table-name": "dialog-select-user-table"
|
|
159
159
|
}, null, 8, ["filter-options"]),
|
|
160
160
|
n(I, {
|
|
161
161
|
"selected-data": r.value,
|
|
162
162
|
"onUpdate:selectedData": l[0] || (l[0] = (s) => r.value = s),
|
|
163
163
|
columns: B(k),
|
|
164
|
-
"fetch-function":
|
|
164
|
+
"fetch-function": $,
|
|
165
165
|
rows: 10,
|
|
166
166
|
"selection-type": t.selectionType,
|
|
167
167
|
"use-option": !1,
|
package/directives/index.d.ts
CHANGED