@fewangsit/wangsvue-fats 1.0.1-alpha.68 → 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 +9 -8
- package/assetinfo/index.d.ts +5 -4
- package/assetinfo/index.es.js +113 -97
- package/backgroundimagecropper/index.es.js +14 -12
- package/button/index.es.js +58 -48
- package/buttonbulkaction/index.es.js +67 -59
- package/buttondownload/index.es.js +18 -18
- package/buttonradio/index.es.js +11 -11
- package/buttonscan/index.es.js +1 -1
- package/buttonsearch/index.es.js +14 -14
- package/buttonselectuser/index.es.js +29 -29
- package/checkbox/index.es.js +5 -5
- package/config/defaultProps.es.js +3 -4
- package/datatable/index.es.js +470 -465
- package/datepicker/index.es.js +17 -17
- package/daypicker/index.es.js +21 -21
- package/dialog/index.es.js +17 -15
- package/dialogbasictransferlog/index.es.js +89 -89
- package/dialogconfirm/index.es.js +33 -33
- package/dialogdamagelog/index.es.js +89 -89
- package/dialogform/index.es.js +16 -16
- package/dialogfulltransferlog/index.es.js +96 -96
- package/dialoglinkedasset/index.es.js +48 -48
- package/dialogprintqr/index.es.js +70 -70
- 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 +16 -16
- 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 +1 -1
- 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/fieldwrapper/index.es.js +7 -7
- package/fileupload/index.es.js +35 -31
- package/hardwaresync/index.es.js +12 -12
- package/headercell/index.es.js +4 -4
- package/icon/index.es.js +26 -25
- package/imagecompressor/index.es.js +143 -143
- 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 +18 -18
- package/inputtext/index.es.js +33 -33
- package/litedropdown/index.es.js +48 -40
- package/menuitem/index.es.js +27 -26
- package/multirow/index.es.js +16 -16
- package/multiselect/index.es.js +86 -83
- package/package.json +1 -1
- package/plugins/basei18n.d.ts +2 -2
- package/plugins/basei18n.es.js +48 -42
- package/stats.html +1 -1
- package/style.css +1 -1
- package/tabmenu/index.es.js +14 -9
- package/tagtype/index.es.js +33 -30
- package/textarea/index.es.js +3 -3
- package/toggledarkmode/store/index.d.ts +7 -0
- package/toggleswitch/index.es.js +3 -3
- package/treesearchinput/index.es.js +11 -11
- package/username/index.es.js +39 -39
- 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 +17750 -17086
- package/wangsvue-fats.system.js +73 -72
package/datepicker/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, onMounted as D, reactive as M, shallowRef as f, computed as N, watch as y, createElementBlock as s, openBlock as i, Fragment as
|
|
1
|
+
import { defineComponent as B, onMounted as D, reactive as M, shallowRef as f, computed as N, watch as y, createElementBlock as s, openBlock as i, Fragment as _, createVNode as o, withCtx as u, unref as c, createCommentVNode as v, createElementVNode as E, renderSlot as h, renderList as S, toDisplayString as F } from "vue";
|
|
2
2
|
import { u as P } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
3
|
import { u as R } from "../plugins/basei18n.es.js";
|
|
4
4
|
import { s as T } from "../vendor/primevue/inputtext/inputtext.esm.es.js";
|
|
@@ -35,7 +35,7 @@ const O = {
|
|
|
35
35
|
n.fieldName ?? "date",
|
|
36
36
|
(e) => {
|
|
37
37
|
var t;
|
|
38
|
-
return !(e != null && e.length) && n.mandatory ?
|
|
38
|
+
return !(e != null && e.length) && n.mandatory ? m(((t = n.errorMessage) == null ? void 0 : t.empty) ?? "You must pick a date") : !0;
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
initialValue: n.initialValue ?? []
|
|
@@ -43,17 +43,17 @@ const O = {
|
|
|
43
43
|
)
|
|
44
44
|
);
|
|
45
45
|
});
|
|
46
|
-
const { t:
|
|
46
|
+
const { t: m } = R(), a = M({ value: [] }), d = f(), p = f(), b = N(() => {
|
|
47
47
|
const e = a.value[0], t = a.value[1];
|
|
48
48
|
return t && e !== t ? e + " - " + t : e == null ? void 0 : e.toString();
|
|
49
49
|
}), x = Array.from({ length: 31 }, (e, t) => t + 1), V = (e) => {
|
|
50
50
|
var l;
|
|
51
51
|
const t = a.value[0], r = a.value[1];
|
|
52
|
-
t != null && r != null && t === r ? (a.value[1] = e, (l =
|
|
52
|
+
t != null && r != null && t === r ? (a.value[1] = e, (l = d.value) == null || l.hide()) : a.value = [e, e], a.value.sort((w, C) => w - C);
|
|
53
53
|
}, g = (e) => {
|
|
54
54
|
var r, l;
|
|
55
55
|
const t = ((r = p.value) == null ? void 0 : r.$el) || null;
|
|
56
|
-
t &&
|
|
56
|
+
t && d.value && t.focus(), (l = d.value) == null || l.toggle(e);
|
|
57
57
|
}, $ = (e) => {
|
|
58
58
|
var t;
|
|
59
59
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -80,23 +80,23 @@ const O = {
|
|
|
80
80
|
(e) => {
|
|
81
81
|
a.value = e ?? [];
|
|
82
82
|
}
|
|
83
|
-
), (e, t) => (i(), s(
|
|
83
|
+
), (e, t) => (i(), s(_, null, [
|
|
84
84
|
o(A, {
|
|
85
|
-
label: e.label
|
|
85
|
+
label: e.label,
|
|
86
86
|
mandatory: e.mandatory
|
|
87
87
|
}, {
|
|
88
|
-
default:
|
|
88
|
+
default: u(() => [
|
|
89
89
|
o(K, {
|
|
90
90
|
invalid: !!a.errorMessage,
|
|
91
91
|
onClick: g,
|
|
92
92
|
class: "grid grid-cols-[1fr,max-content] !items-center gap-1 px-3 py-1"
|
|
93
93
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
o(
|
|
94
|
+
default: u(() => [
|
|
95
|
+
o(c(T), {
|
|
96
96
|
ref_key: "inputtext",
|
|
97
97
|
ref: p,
|
|
98
98
|
"model-value": b.value,
|
|
99
|
-
placeholder:
|
|
99
|
+
placeholder: c(m)("Select date"),
|
|
100
100
|
onKeydown: $,
|
|
101
101
|
class: "!p-0",
|
|
102
102
|
readonly: ""
|
|
@@ -116,9 +116,9 @@ const O = {
|
|
|
116
116
|
]),
|
|
117
117
|
_: 1
|
|
118
118
|
}, 8, ["label", "mandatory"]),
|
|
119
|
-
o(
|
|
119
|
+
o(c(j), {
|
|
120
120
|
ref_key: "panel",
|
|
121
|
-
ref:
|
|
121
|
+
ref: d,
|
|
122
122
|
pt: {
|
|
123
123
|
content: {
|
|
124
124
|
class: "p-6"
|
|
@@ -126,12 +126,12 @@ const O = {
|
|
|
126
126
|
},
|
|
127
127
|
class: "border-none !mt-0 !shadow-panel"
|
|
128
128
|
}, {
|
|
129
|
-
default:
|
|
129
|
+
default: u(() => [
|
|
130
130
|
e.$slots.header ? (i(), s("div", O, [
|
|
131
131
|
h(e.$slots, "header")
|
|
132
|
-
])) :
|
|
132
|
+
])) : v("", !0),
|
|
133
133
|
E("div", Y, [
|
|
134
|
-
(i(!0), s(
|
|
134
|
+
(i(!0), s(_, null, S(c(x), (r) => (i(), s("span", {
|
|
135
135
|
key: r,
|
|
136
136
|
"aria-selected": a.value.includes(r),
|
|
137
137
|
"data-in-range": a.value[0] < r && r < a.value[1],
|
|
@@ -142,7 +142,7 @@ const O = {
|
|
|
142
142
|
]),
|
|
143
143
|
e.$slots.footer ? (i(), s("div", z, [
|
|
144
144
|
h(e.$slots, "footer")
|
|
145
|
-
])) :
|
|
145
|
+
])) : v("", !0)
|
|
146
146
|
]),
|
|
147
147
|
_: 3
|
|
148
148
|
}, 512)
|
package/daypicker/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as S, onMounted as B, reactive as N, shallowRef as f, computed as D, watch as v, createElementBlock as
|
|
1
|
+
import { defineComponent as S, onMounted as B, reactive as N, shallowRef as f, computed as D, watch as v, createElementBlock as i, openBlock as d, Fragment as _, createVNode as n, withCtx as g, unref as u, createCommentVNode as h, createElementVNode as k, renderSlot as b, renderList as F, normalizeClass as T, toDisplayString as E } from "vue";
|
|
2
2
|
import { u as P } from "../vendor/vee-validate/dist/vee-validate.esm.es.js";
|
|
3
3
|
import { u as R } from "../plugins/basei18n.es.js";
|
|
4
4
|
import { s as j } from "../vendor/primevue/inputtext/inputtext.esm.es.js";
|
|
@@ -35,13 +35,13 @@ const Y = {
|
|
|
35
35
|
s.fieldName ?? "day",
|
|
36
36
|
(e) => {
|
|
37
37
|
var t;
|
|
38
|
-
return !(e != null && e.length) && s.mandatory ?
|
|
38
|
+
return !(e != null && e.length) && s.mandatory ? m(((t = s.errorMessage) == null ? void 0 : t.empty) ?? "You must pick a day") : !0;
|
|
39
39
|
},
|
|
40
40
|
{ initialValue: s.initialValue ?? [] }
|
|
41
41
|
)
|
|
42
42
|
);
|
|
43
43
|
});
|
|
44
|
-
const
|
|
44
|
+
const c = [
|
|
45
45
|
"Monday",
|
|
46
46
|
"Tuesday",
|
|
47
47
|
"Wednesday",
|
|
@@ -49,17 +49,17 @@ const Y = {
|
|
|
49
49
|
"Friday",
|
|
50
50
|
"Saturday",
|
|
51
51
|
"Sunday"
|
|
52
|
-
], { t:
|
|
53
|
-
const e =
|
|
52
|
+
], { t: m } = R(), a = N({ value: [] }), o = f(), y = f(), $ = D(() => {
|
|
53
|
+
const e = c[a.value[0]], t = c[a.value[1]];
|
|
54
54
|
return t && e !== t ? e + " - " + t : e;
|
|
55
|
-
}),
|
|
55
|
+
}), x = (e, t) => {
|
|
56
56
|
var p;
|
|
57
57
|
const r = a.value[0], l = a.value[1];
|
|
58
|
-
r != null && l != null && r === l ? (a.value[1] = t, (p =
|
|
59
|
-
},
|
|
58
|
+
r != null && l != null && r === l ? (a.value[1] = t, (p = o.value) == null || p.hide()) : a.value = [t, t], a.value.sort((C, M) => C - M);
|
|
59
|
+
}, w = (e) => {
|
|
60
60
|
var r, l;
|
|
61
61
|
const t = ((r = y.value) == null ? void 0 : r.$el) || null;
|
|
62
|
-
t &&
|
|
62
|
+
t && o.value && t.focus(), (l = o.value) == null || l.toggle(e);
|
|
63
63
|
};
|
|
64
64
|
return v(
|
|
65
65
|
() => s.initialValue,
|
|
@@ -75,23 +75,23 @@ const Y = {
|
|
|
75
75
|
(e) => {
|
|
76
76
|
a.value = e ?? [];
|
|
77
77
|
}
|
|
78
|
-
), (e, t) => (
|
|
78
|
+
), (e, t) => (d(), i(_, null, [
|
|
79
79
|
n(I, {
|
|
80
|
-
label: e.label
|
|
80
|
+
label: e.label,
|
|
81
81
|
mandatory: e.mandatory
|
|
82
82
|
}, {
|
|
83
83
|
default: g(() => [
|
|
84
84
|
n(O, {
|
|
85
85
|
invalid: !!a.errorMessage,
|
|
86
|
-
onClick:
|
|
86
|
+
onClick: w,
|
|
87
87
|
class: "grid grid-cols-[1fr,max-content] !items-center gap-1 px-3 py-1"
|
|
88
88
|
}, {
|
|
89
89
|
default: g(() => [
|
|
90
|
-
n(
|
|
90
|
+
n(u(j), {
|
|
91
91
|
ref_key: "inputtext",
|
|
92
92
|
ref: y,
|
|
93
93
|
"model-value": $.value,
|
|
94
|
-
placeholder:
|
|
94
|
+
placeholder: u(m)("Select day"),
|
|
95
95
|
class: "!p-0",
|
|
96
96
|
readonly: ""
|
|
97
97
|
}, null, 8, ["model-value", "placeholder"]),
|
|
@@ -110,9 +110,9 @@ const Y = {
|
|
|
110
110
|
]),
|
|
111
111
|
_: 1
|
|
112
112
|
}, 8, ["label", "mandatory"]),
|
|
113
|
-
n(
|
|
113
|
+
n(u(z), {
|
|
114
114
|
ref_key: "panel",
|
|
115
|
-
ref:
|
|
115
|
+
ref: o,
|
|
116
116
|
pt: {
|
|
117
117
|
content: {
|
|
118
118
|
class: "p-6"
|
|
@@ -121,20 +121,20 @@ const Y = {
|
|
|
121
121
|
class: "border-none !mt-0 !shadow-panel"
|
|
122
122
|
}, {
|
|
123
123
|
default: g(() => [
|
|
124
|
-
e.$slots.header ? (
|
|
124
|
+
e.$slots.header ? (d(), i("div", Y, [
|
|
125
125
|
b(e.$slots, "header")
|
|
126
126
|
])) : h("", !0),
|
|
127
127
|
k("div", q, [
|
|
128
|
-
(
|
|
128
|
+
(d(), i(_, null, F(c, (r, l) => k("span", {
|
|
129
129
|
key: r,
|
|
130
130
|
"aria-selected": a.value.includes(l),
|
|
131
131
|
class: T([{ "col-start-2": r === "Sunday" }, "text-xs text-general-800 dark:text-general-50 bg-white dark:bg-grayscale-900 hover:bg-primary-100 dark:hover:bg-general-900 rounded-[20px] [&[data-in-range='true']]:bg-primary-200 dark:[&[data-in-range='true']]:bg-primary-300 [&[data-in-range='true']]:text-general-800 dark:[&[data-in-range='true']]:text-general-50 [&[data-in-range='true']]:rounded-[0] [&[aria-selected='true']]:bg-primary-500 dark:[&[aria-selected='true']]:bg-primary-300 [&[aria-selected='true']]:text-white dark:[&[aria-selected='true']]:text-grayscale-900 text-center p-2 cursor-pointer"]),
|
|
132
132
|
"data-in-range": a.value[0] < l && l < a.value[1],
|
|
133
|
-
onClick: (p) =>
|
|
133
|
+
onClick: (p) => x(r, l),
|
|
134
134
|
"data-ts-section": "day"
|
|
135
|
-
}, E(
|
|
135
|
+
}, E(u(m)(r)), 11, A)), 64))
|
|
136
136
|
]),
|
|
137
|
-
e.$slots.footer ? (
|
|
137
|
+
e.$slots.footer ? (d(), i("div", G, [
|
|
138
138
|
b(e.$slots, "footer")
|
|
139
139
|
])) : h("", !0)
|
|
140
140
|
]),
|
package/dialog/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { s as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as $, inject as y, createBlock as v, openBlock as B, unref as s, mergeProps as g, createSlots as C, withCtx as t, renderSlot as l } from "vue";
|
|
2
|
+
import { s as b } from "../vendor/primevue/dialog/dialog.esm.es.js";
|
|
3
|
+
const h = /* @__PURE__ */ $({
|
|
4
4
|
__name: "Dialog",
|
|
5
5
|
props: {
|
|
6
6
|
header: { default: void 0 },
|
|
@@ -38,45 +38,47 @@ const A = /* @__PURE__ */ u({
|
|
|
38
38
|
footerClass: {}
|
|
39
39
|
},
|
|
40
40
|
emits: ["update:visible", "hide", "afterHide", "show", "maximize", "unmaximize", "dragend"],
|
|
41
|
-
setup(
|
|
42
|
-
const
|
|
41
|
+
setup(u) {
|
|
42
|
+
const d = y("preset", {}).dialog, i = u, m = () => {
|
|
43
43
|
setTimeout(() => {
|
|
44
44
|
document.querySelectorAll('[data-pc-name="dialog"]').length && document.body.classList.add("p-overflow-hidden");
|
|
45
45
|
}, 10);
|
|
46
46
|
};
|
|
47
47
|
return (e, o) => {
|
|
48
|
-
var
|
|
49
|
-
return
|
|
48
|
+
var r, n, p, f;
|
|
49
|
+
return B(), v(s(b), g(e.$props, {
|
|
50
|
+
footer: e.$t(i.footer),
|
|
51
|
+
header: e.$t(i.header),
|
|
50
52
|
pt: {
|
|
51
53
|
root: {
|
|
52
54
|
class: [
|
|
53
|
-
...(
|
|
55
|
+
...(r = s(d)) == null ? void 0 : r.root({ state: {} }).class,
|
|
54
56
|
...Array.isArray(e.$props.class) ? e.$props.class : [e.$props.class]
|
|
55
57
|
]
|
|
56
58
|
},
|
|
57
59
|
header: {
|
|
58
60
|
class: [
|
|
59
|
-
...(n = s(
|
|
61
|
+
...(n = s(d)) == null ? void 0 : n.header.class,
|
|
60
62
|
...Array.isArray(e.$props.headerClass) ? e.$props.headerClass : [e.$props.headerClass]
|
|
61
63
|
],
|
|
62
64
|
"data-wv-section": "dialogheader"
|
|
63
65
|
},
|
|
64
66
|
content: {
|
|
65
67
|
class: [
|
|
66
|
-
...(
|
|
68
|
+
...(p = s(d)) == null ? void 0 : p.content({ state: {}, instance: {} }).class,
|
|
67
69
|
...Array.isArray(e.$props.contentClass) ? e.$props.contentClass : [e.$props.contentClass]
|
|
68
70
|
]
|
|
69
71
|
},
|
|
70
72
|
footer: {
|
|
71
73
|
class: [
|
|
72
|
-
...(
|
|
74
|
+
...(f = s(d)) == null ? void 0 : f.footer.class,
|
|
73
75
|
...Array.isArray(e.$props.footerClass) ? e.$props.footerClass : [e.$props.footerClass]
|
|
74
76
|
]
|
|
75
77
|
},
|
|
76
78
|
...e.$props.pt
|
|
77
79
|
},
|
|
78
80
|
onAfterHide: o[0] || (o[0] = (a) => {
|
|
79
|
-
e.$emit("afterHide"),
|
|
81
|
+
e.$emit("afterHide"), m();
|
|
80
82
|
}),
|
|
81
83
|
onDragend: o[1] || (o[1] = (a) => e.$emit("dragend", a)),
|
|
82
84
|
onHide: o[2] || (o[2] = (a) => e.$emit("hide")),
|
|
@@ -84,7 +86,7 @@ const A = /* @__PURE__ */ u({
|
|
|
84
86
|
onShow: o[4] || (o[4] = (a) => e.$emit("show")),
|
|
85
87
|
onUnmaximize: o[5] || (o[5] = (a) => e.$emit("unmaximize", a)),
|
|
86
88
|
"onUpdate:visible": o[6] || (o[6] = (a) => e.$emit("update:visible", a))
|
|
87
|
-
}),
|
|
89
|
+
}), C({
|
|
88
90
|
default: t(() => [
|
|
89
91
|
l(e.$slots, "default")
|
|
90
92
|
]),
|
|
@@ -118,10 +120,10 @@ const A = /* @__PURE__ */ u({
|
|
|
118
120
|
]),
|
|
119
121
|
key: "3"
|
|
120
122
|
} : void 0
|
|
121
|
-
]), 1040, ["pt"]);
|
|
123
|
+
]), 1040, ["footer", "header", "pt"]);
|
|
122
124
|
};
|
|
123
125
|
}
|
|
124
126
|
});
|
|
125
127
|
export {
|
|
126
|
-
|
|
128
|
+
h as _
|
|
127
129
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as O, mergeModels as S, useModel as F, ref as
|
|
1
|
+
import { defineComponent as O, mergeModels as S, useModel as F, ref as m, inject as K, computed as _, watch as L, createBlock as g, openBlock as i, withCtx as y, createElementBlock as p, createCommentVNode as M, createElementVNode as a, createVNode as r, toDisplayString as c } from "vue";
|
|
2
2
|
import { TransferServices as q } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import { u as E } from "../utils/baseToast.util.es.js";
|
|
4
4
|
import { _ as d } from "../badge/index.es.js";
|
|
@@ -9,22 +9,22 @@ import { _ as R } from "../tabmenu/index.es.js";
|
|
|
9
9
|
import { _ as U } from "../timeline/index.es.js";
|
|
10
10
|
import { _ as W } from "../assetinfo/index.es.js";
|
|
11
11
|
import { _ as Z } from "../userwithicon/index.es.js";
|
|
12
|
-
const z = { class: "w-full flex items-center justify-between pr-4" }, J = { class: "flex items-center gap-2" },
|
|
12
|
+
const z = { class: "w-full flex items-center justify-between pr-4" }, J = { class: "flex gap-3 items-center" }, Q = { class: "text-sm font-bold" }, X = { class: "flex items-center gap-2" }, Y = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "flex flex-col gap-3"
|
|
15
|
-
},
|
|
15
|
+
}, P = { class: "flex justify-between items-center" }, ee = { class: "flex items-center gap-1" }, te = { class: "flex items-center gap-0.5" }, ae = { class: "flex items-center gap-0.5" }, se = { class: "flex items-center gap-2" }, le = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "flex flex-row items-center gap-1"
|
|
18
|
-
},
|
|
18
|
+
}, ne = { class: "text-xs font-medium text-general-400 dark:text-general-200" }, re = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "flex flex-col gap-1"
|
|
21
|
-
},
|
|
21
|
+
}, ie = { class: "flex flex-row items-center gap-1" }, oe = { class: "text-xs font-medium text-general-400 dark:text-general-200" }, ue = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "flex flex-row items-center gap-1"
|
|
24
|
-
},
|
|
24
|
+
}, ce = { class: "text-xs font-medium text-general-400 dark:text-general-200" }, de = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "text-xs font-medium"
|
|
27
|
-
},
|
|
27
|
+
}, $e = /* @__PURE__ */ O({
|
|
28
28
|
__name: "DialogBasicTransferLog",
|
|
29
29
|
props: /* @__PURE__ */ S({
|
|
30
30
|
id: {}
|
|
@@ -33,32 +33,32 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
33
33
|
visibleModifiers: {}
|
|
34
34
|
}),
|
|
35
35
|
emits: ["update:visible"],
|
|
36
|
-
setup(
|
|
37
|
-
const C =
|
|
38
|
-
var
|
|
39
|
-
return (
|
|
40
|
-
}),
|
|
41
|
-
var
|
|
42
|
-
return (
|
|
43
|
-
}),
|
|
44
|
-
var
|
|
45
|
-
return (
|
|
46
|
-
}), D =
|
|
36
|
+
setup(h) {
|
|
37
|
+
const C = h, x = F(h, "visible"), B = E(), n = m(), k = m(), o = m(), $ = m(0), u = K("requestIds") ?? m([]), b = _(() => {
|
|
38
|
+
var e;
|
|
39
|
+
return (e = u.value) != null && e.length ? u.value.findIndex((t) => o.value === t) : -1;
|
|
40
|
+
}), w = _(() => {
|
|
41
|
+
var e, t;
|
|
42
|
+
return (e = u.value) != null && e.length ? o.value === ((t = u.value) == null ? void 0 : t[0]) : !1;
|
|
43
|
+
}), j = _(() => {
|
|
44
|
+
var e, t, s;
|
|
45
|
+
return (e = u.value) != null && e.length ? o.value === ((s = u.value) == null ? void 0 : s[((t = u.value) == null ? void 0 : t.length) - 1]) : !1;
|
|
46
|
+
}), D = _(
|
|
47
47
|
() => {
|
|
48
|
-
var
|
|
49
|
-
return (
|
|
50
|
-
_id:
|
|
51
|
-
action:
|
|
52
|
-
createdAt:
|
|
53
|
-
title:
|
|
54
|
-
date:
|
|
55
|
-
username:
|
|
56
|
-
body:
|
|
57
|
-
detail:
|
|
48
|
+
var e;
|
|
49
|
+
return (e = k.value) == null ? void 0 : e.map((t) => ({
|
|
50
|
+
_id: t.id,
|
|
51
|
+
action: t.action,
|
|
52
|
+
createdAt: t.updatedAt,
|
|
53
|
+
title: t.action + " by",
|
|
54
|
+
date: t.updatedAt,
|
|
55
|
+
username: t.userFullName,
|
|
56
|
+
body: t.action === "Handed over" ? void 0 : N(t.detail),
|
|
57
|
+
detail: t.action === "Handed over" ? void 0 : N(t.detail)
|
|
58
58
|
}));
|
|
59
59
|
}
|
|
60
|
-
), G = (
|
|
61
|
-
switch (
|
|
60
|
+
), G = (e) => {
|
|
61
|
+
switch (e) {
|
|
62
62
|
case "Rejected":
|
|
63
63
|
case "Reported Missing":
|
|
64
64
|
return "danger";
|
|
@@ -71,64 +71,64 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
71
71
|
default:
|
|
72
72
|
return "primary";
|
|
73
73
|
}
|
|
74
|
-
},
|
|
75
|
-
if (!
|
|
74
|
+
}, N = (e) => {
|
|
75
|
+
if (!e || !Object.keys(e).length)
|
|
76
76
|
return;
|
|
77
|
-
const
|
|
78
|
-
for (const
|
|
79
|
-
const
|
|
80
|
-
|
|
77
|
+
const t = {}, s = Object.keys(e);
|
|
78
|
+
for (const f of s) {
|
|
79
|
+
const v = f.replace(/([A-Z])/g, " $1"), l = v.charAt(0).toUpperCase() + v.slice(1);
|
|
80
|
+
t[l === "Notes" ? "Note" : l] = e[f] ?? "-";
|
|
81
81
|
}
|
|
82
|
-
return
|
|
82
|
+
return t;
|
|
83
83
|
}, I = async () => {
|
|
84
|
-
var
|
|
85
|
-
if ((
|
|
84
|
+
var e;
|
|
85
|
+
if ((e = o.value) != null && e.length)
|
|
86
86
|
try {
|
|
87
|
-
const { data:
|
|
87
|
+
const { data: t } = await q.getTransactionLog(
|
|
88
88
|
o.value
|
|
89
89
|
);
|
|
90
|
-
|
|
91
|
-
} catch (
|
|
90
|
+
t && (n.value = t.data.request, k.value = t.data.logs, $.value++);
|
|
91
|
+
} catch (t) {
|
|
92
92
|
B.add({
|
|
93
|
-
error:
|
|
93
|
+
error: t,
|
|
94
94
|
message: "Error, failed to load transfer transaction log"
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
},
|
|
98
|
-
if (
|
|
97
|
+
}, T = (e) => {
|
|
98
|
+
if (b.value === -1 || e === "prev" && w.value || e === "next" && j.value)
|
|
99
99
|
return;
|
|
100
|
-
const
|
|
101
|
-
o.value = u.value[
|
|
100
|
+
const t = e === "prev" ? b.value - 1 : b.value + 1;
|
|
101
|
+
o.value = u.value[t];
|
|
102
102
|
};
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
}),
|
|
106
|
-
|
|
107
|
-
}), (
|
|
108
|
-
visible:
|
|
109
|
-
"onUpdate:visible":
|
|
103
|
+
return L(x, (e) => {
|
|
104
|
+
e && (o.value = C.id);
|
|
105
|
+
}), L(o, (e) => {
|
|
106
|
+
e && I();
|
|
107
|
+
}), (e, t) => (i(), g(H, {
|
|
108
|
+
visible: x.value,
|
|
109
|
+
"onUpdate:visible": t[2] || (t[2] = (s) => x.value = s),
|
|
110
110
|
draggable: !1,
|
|
111
111
|
class: "!w-[600px]",
|
|
112
112
|
"footer-class": "flex items-end justify-end gap-1",
|
|
113
113
|
header: "Transfer Log",
|
|
114
114
|
modal: ""
|
|
115
115
|
}, {
|
|
116
|
-
header:
|
|
116
|
+
header: y(() => [
|
|
117
117
|
a("div", z, [
|
|
118
|
-
e[3] || (e[3] = a("div", { class: "flex gap-3 items-center" }, [
|
|
119
|
-
a("span", { class: "text-sm font-bold" }, "Transfer Log")
|
|
120
|
-
], -1)),
|
|
121
118
|
a("div", J, [
|
|
119
|
+
a("span", Q, c(e.$t("Transfer Log")), 1)
|
|
120
|
+
]),
|
|
121
|
+
a("div", X, [
|
|
122
122
|
r(A, {
|
|
123
|
-
disabled:
|
|
124
|
-
onClick:
|
|
123
|
+
disabled: w.value,
|
|
124
|
+
onClick: t[0] || (t[0] = (s) => T("prev")),
|
|
125
125
|
class: "!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",
|
|
126
126
|
label: "<Prev",
|
|
127
127
|
text: ""
|
|
128
128
|
}, null, 8, ["disabled"]),
|
|
129
129
|
r(A, {
|
|
130
|
-
disabled:
|
|
131
|
-
onClick:
|
|
130
|
+
disabled: j.value,
|
|
131
|
+
onClick: t[1] || (t[1] = (s) => T("next")),
|
|
132
132
|
class: "!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",
|
|
133
133
|
label: "Next>",
|
|
134
134
|
text: ""
|
|
@@ -136,21 +136,21 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
136
136
|
])
|
|
137
137
|
])
|
|
138
138
|
]),
|
|
139
|
-
default:
|
|
140
|
-
var s,
|
|
139
|
+
default: y(() => {
|
|
140
|
+
var s, f, v;
|
|
141
141
|
return [
|
|
142
|
-
n.value ? (i(),
|
|
143
|
-
(i(),
|
|
142
|
+
n.value ? (i(), p("div", Y, [
|
|
143
|
+
(i(), g(W, {
|
|
144
144
|
id: n.value.asset,
|
|
145
145
|
key: n.value.asset,
|
|
146
146
|
fields: ["brand", "model", "group"],
|
|
147
147
|
"use-nfc": !1,
|
|
148
148
|
"use-tag-type": !1
|
|
149
149
|
}, null, 8, ["id"])),
|
|
150
|
-
a("div",
|
|
151
|
-
a("div",
|
|
152
|
-
a("div",
|
|
153
|
-
|
|
150
|
+
a("div", P, [
|
|
151
|
+
a("div", ee, [
|
|
152
|
+
a("div", te, [
|
|
153
|
+
a("span", null, c(e.$t("Origin")) + ":", 1),
|
|
154
154
|
r(d, {
|
|
155
155
|
label: (s = n.value.originGroup) == null ? void 0 : s.name
|
|
156
156
|
}, null, 8, ["label"])
|
|
@@ -158,19 +158,19 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
158
158
|
r(Z, {
|
|
159
159
|
user: {
|
|
160
160
|
...n.value.manager,
|
|
161
|
-
fullName: (
|
|
161
|
+
fullName: (f = n.value.manager) == null ? void 0 : f.fullName
|
|
162
162
|
}
|
|
163
163
|
}, null, 8, ["user"])
|
|
164
164
|
]),
|
|
165
|
-
a("div",
|
|
166
|
-
|
|
165
|
+
a("div", ae, [
|
|
166
|
+
a("span", null, c(e.$t("Destination")) + ":", 1),
|
|
167
167
|
r(d, {
|
|
168
|
-
label: (
|
|
168
|
+
label: (v = n.value.destinationGroup) == null ? void 0 : v.name
|
|
169
169
|
}, null, 8, ["label"])
|
|
170
170
|
])
|
|
171
171
|
]),
|
|
172
|
-
a("div",
|
|
173
|
-
|
|
172
|
+
a("div", se, [
|
|
173
|
+
a("span", null, c(e.$t("Status")) + ":", 1),
|
|
174
174
|
r(d, {
|
|
175
175
|
label: n.value.status,
|
|
176
176
|
severity: G(n.value.status),
|
|
@@ -182,19 +182,19 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
182
182
|
menu: [{ label: "Transfer Log" }],
|
|
183
183
|
type: "tab"
|
|
184
184
|
}),
|
|
185
|
-
(i(),
|
|
186
|
-
key:
|
|
185
|
+
(i(), g(U, {
|
|
186
|
+
key: $.value,
|
|
187
187
|
value: D.value
|
|
188
188
|
}, {
|
|
189
|
-
detail:
|
|
190
|
-
l.key === "To" ? (i(),
|
|
191
|
-
|
|
189
|
+
detail: y((l) => [
|
|
190
|
+
l.key === "To" ? (i(), p("div", le, [
|
|
191
|
+
a("span", ne, c(e.$t("Destination Group")) + ": ", 1),
|
|
192
192
|
r(d, {
|
|
193
193
|
label: l.value
|
|
194
194
|
}, null, 8, ["label"])
|
|
195
|
-
])) : l.key === "From" ? (i(),
|
|
196
|
-
a("div",
|
|
197
|
-
|
|
195
|
+
])) : l.key === "From" ? (i(), p("div", re, [
|
|
196
|
+
a("div", ie, [
|
|
197
|
+
a("span", oe, c(e.$t("Destination Group")) + ": ", 1),
|
|
198
198
|
r(d, {
|
|
199
199
|
label: l.value
|
|
200
200
|
}, null, 8, ["label"])
|
|
@@ -203,12 +203,12 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
203
203
|
class: "!text-general-800 dark:!text-general-400 !text-xs -rotate-90",
|
|
204
204
|
icon: "arrow-left"
|
|
205
205
|
})
|
|
206
|
-
])) : (i(),
|
|
207
|
-
a("span",
|
|
208
|
-
l.key.includes("Group") ? (i(),
|
|
206
|
+
])) : (i(), p("div", ue, [
|
|
207
|
+
a("span", ce, c(e.$t(l.key)) + ": ", 1),
|
|
208
|
+
l.key.includes("Group") ? (i(), g(d, {
|
|
209
209
|
key: 0,
|
|
210
210
|
label: l.value
|
|
211
|
-
}, null, 8, ["label"])) : (i(),
|
|
211
|
+
}, null, 8, ["label"])) : (i(), p("span", de, c(l.value), 1))
|
|
212
212
|
]))
|
|
213
213
|
]),
|
|
214
214
|
_: 1
|
|
@@ -221,5 +221,5 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
export {
|
|
224
|
-
|
|
224
|
+
$e as _
|
|
225
225
|
};
|