@fewangsit/wangsvue-fats 1.0.1-alpha.66 → 1.0.1-alpha.68
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 +29 -20
- package/approverinfo/index.es.js +50 -50
- package/assetinfo/index.es.js +8 -8
- 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/buttoncopy/index.es.js +8 -8
- package/buttonscan/index.es.js +48 -48
- package/buttonselecttree/index.d.ts +4 -2
- package/buttonselecttree/index.es.js +50 -50
- package/carousel/index.es.js +24 -24
- package/columnlist/index.es.js +142 -132
- package/config/defaultProps.es.js +14 -9
- package/datatable/index.d.ts +14 -0
- package/datatable/index.es.js +416 -410
- package/datepicker/index.es.js +22 -22
- package/daypicker/index.es.js +13 -13
- package/dialogbasictransferlog/index.es.js +25 -25
- package/dialogdamagelog/index.es.js +69 -66
- package/dialogform/index.es.js +11 -11
- package/dialogfulltransferlog/index.es.js +11 -11
- package/dialoglinkedasset/index.es.js +35 -35
- package/dialogprintqr/index.es.js +33 -35
- package/dialogselecttree/index.es.js +4 -4
- package/dialogselectuser/index.es.js +1 -1
- package/disposalreport/index.es.js +2 -2
- package/editor/index.es.js +51 -48
- package/fileupload/index.es.js +14 -14
- package/icon/index.es.js +27 -27
- package/imagecompressor/index.es.js +82 -82
- package/imageinputinfo/index.es.js +9 -9
- package/inputsearch/index.es.js +27 -27
- package/litedropdown/index.es.js +26 -26
- 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/multirow/index.es.js +11 -10
- 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/stats.html +1 -1
- package/steps/index.es.js +18 -16
- package/style.css +2 -2
- package/tagtype/index.es.js +13 -13
- package/transactionroles/index.es.js +4 -1
- package/treesearchinput/index.es.js +7 -7
- package/username/index.es.js +8 -8
- package/wangsvue-fats.esm.browser.js +19472 -19430
- package/wangsvue-fats.system.js +72 -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
|
|
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 v, createVNode as o, unref as d, withCtx as m, createCommentVNode as _, 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 ? u(((t = n.errorMessage) == null ? void 0 : t.empty) ?? "You must pick a date") : !0;
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
initialValue: n.initialValue ?? []
|
|
@@ -43,18 +43,18 @@ const O = {
|
|
|
43
43
|
)
|
|
44
44
|
);
|
|
45
45
|
});
|
|
46
|
-
const { t:
|
|
46
|
+
const { t: u } = R(), a = M({ value: [] }), c = 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 = c.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 &&
|
|
57
|
-
},
|
|
56
|
+
t && c.value && t.focus(), (l = c.value) == null || l.toggle(e);
|
|
57
|
+
}, $ = (e) => {
|
|
58
58
|
var t;
|
|
59
59
|
if (e.key === "Enter" || e.key === " ") {
|
|
60
60
|
e.preventDefault();
|
|
@@ -66,7 +66,7 @@ const O = {
|
|
|
66
66
|
g(l);
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
return
|
|
69
|
+
return y(
|
|
70
70
|
() => n.initialValue,
|
|
71
71
|
() => {
|
|
72
72
|
var e;
|
|
@@ -75,14 +75,14 @@ const O = {
|
|
|
75
75
|
{
|
|
76
76
|
once: !0
|
|
77
77
|
}
|
|
78
|
-
),
|
|
78
|
+
), y(
|
|
79
79
|
() => n.modelValue,
|
|
80
80
|
(e) => {
|
|
81
81
|
a.value = e ?? [];
|
|
82
82
|
}
|
|
83
83
|
), (e, t) => (i(), s(v, null, [
|
|
84
84
|
o(A, {
|
|
85
|
-
label: e.label ?
|
|
85
|
+
label: e.label ? d(u)(e.label) : void 0,
|
|
86
86
|
mandatory: e.mandatory
|
|
87
87
|
}, {
|
|
88
88
|
default: m(() => [
|
|
@@ -92,17 +92,17 @@ const O = {
|
|
|
92
92
|
class: "grid grid-cols-[1fr,max-content] !items-center gap-1 px-3 py-1"
|
|
93
93
|
}, {
|
|
94
94
|
default: m(() => [
|
|
95
|
-
o(
|
|
95
|
+
o(d(T), {
|
|
96
96
|
ref_key: "inputtext",
|
|
97
97
|
ref: p,
|
|
98
|
-
"model-value":
|
|
99
|
-
placeholder:
|
|
100
|
-
onKeydown:
|
|
98
|
+
"model-value": b.value,
|
|
99
|
+
placeholder: d(u)("Select date"),
|
|
100
|
+
onKeydown: $,
|
|
101
101
|
class: "!p-0",
|
|
102
102
|
readonly: ""
|
|
103
103
|
}, null, 8, ["model-value", "placeholder"]),
|
|
104
104
|
o(I, {
|
|
105
|
-
class: "w-4 h-4 shrink-0 !text-general-500",
|
|
105
|
+
class: "w-4 h-4 shrink-0 !text-general-500 dark:!text-white",
|
|
106
106
|
"data-ts-section": "inputtrigger",
|
|
107
107
|
icon: "calendar"
|
|
108
108
|
})
|
|
@@ -116,9 +116,9 @@ const O = {
|
|
|
116
116
|
]),
|
|
117
117
|
_: 1
|
|
118
118
|
}, 8, ["label", "mandatory"]),
|
|
119
|
-
o(
|
|
119
|
+
o(d(j), {
|
|
120
120
|
ref_key: "panel",
|
|
121
|
-
ref:
|
|
121
|
+
ref: c,
|
|
122
122
|
pt: {
|
|
123
123
|
content: {
|
|
124
124
|
class: "p-6"
|
|
@@ -129,20 +129,20 @@ const O = {
|
|
|
129
129
|
default: m(() => [
|
|
130
130
|
e.$slots.header ? (i(), s("div", O, [
|
|
131
131
|
h(e.$slots, "header")
|
|
132
|
-
])) :
|
|
132
|
+
])) : _("", !0),
|
|
133
133
|
E("div", Y, [
|
|
134
|
-
(i(!0), s(v, null, S(
|
|
134
|
+
(i(!0), s(v, null, S(d(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],
|
|
138
|
-
onClick: (l) =>
|
|
139
|
-
class: "text-xs text-general-800 bg-white hover:bg-primary-100 rounded-[20px] [&[data-in-range='true']]:bg-primary-200 [&[data-in-range='true']]:text-general-800 [&[data-in-range='true']]:rounded-[0] [&[aria-selected='true']]:bg-primary-500 [&[aria-selected='true']]:text-white text-center p-2 cursor-pointer",
|
|
138
|
+
onClick: (l) => V(r),
|
|
139
|
+
class: "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",
|
|
140
140
|
"data-ts-section": "date"
|
|
141
141
|
}, F(r), 9, q))), 128))
|
|
142
142
|
]),
|
|
143
143
|
e.$slots.footer ? (i(), s("div", z, [
|
|
144
144
|
h(e.$slots, "footer")
|
|
145
|
-
])) :
|
|
145
|
+
])) : _("", !0)
|
|
146
146
|
]),
|
|
147
147
|
_: 3
|
|
148
148
|
}, 512)
|
package/daypicker/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, onMounted as B, reactive as N, shallowRef as f, computed as D, watch as v, createElementBlock as u, openBlock as c, Fragment as _, createVNode as n, unref as o, withCtx as g, 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";
|
|
@@ -13,7 +13,7 @@ const Y = {
|
|
|
13
13
|
}, q = { class: "grid grid-cols-3 gap-y-4" }, A = ["aria-selected", "data-in-range", "onClick"], G = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "mt-2.5"
|
|
16
|
-
}, te = /* @__PURE__ */
|
|
16
|
+
}, te = /* @__PURE__ */ S({
|
|
17
17
|
__name: "DayPicker",
|
|
18
18
|
props: {
|
|
19
19
|
modelValue: {},
|
|
@@ -26,9 +26,9 @@ const Y = {
|
|
|
26
26
|
errorMessage: {}
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:modelValue"],
|
|
29
|
-
setup(
|
|
30
|
-
const s =
|
|
31
|
-
|
|
29
|
+
setup(V) {
|
|
30
|
+
const s = V;
|
|
31
|
+
B(() => {
|
|
32
32
|
s.useValidator && Object.assign(
|
|
33
33
|
a,
|
|
34
34
|
P(
|
|
@@ -49,14 +49,14 @@ const Y = {
|
|
|
49
49
|
"Friday",
|
|
50
50
|
"Saturday",
|
|
51
51
|
"Sunday"
|
|
52
|
-
], { t: i } = R(), a =
|
|
52
|
+
], { t: i } = R(), a = N({ value: [] }), d = f(), y = f(), $ = D(() => {
|
|
53
53
|
const e = m[a.value[0]], t = m[a.value[1]];
|
|
54
54
|
return t && e !== t ? e + " - " + t : e;
|
|
55
55
|
}), w = (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 = d.value) == null || p.hide()) : a.value = [t, t], a.value.sort((
|
|
59
|
-
},
|
|
58
|
+
r != null && l != null && r === l ? (a.value[1] = t, (p = d.value) == null || p.hide()) : a.value = [t, t], a.value.sort((C, M) => C - M);
|
|
59
|
+
}, x = (e) => {
|
|
60
60
|
var r, l;
|
|
61
61
|
const t = ((r = y.value) == null ? void 0 : r.$el) || null;
|
|
62
62
|
t && d.value && t.focus(), (l = d.value) == null || l.toggle(e);
|
|
@@ -83,7 +83,7 @@ const Y = {
|
|
|
83
83
|
default: g(() => [
|
|
84
84
|
n(O, {
|
|
85
85
|
invalid: !!a.errorMessage,
|
|
86
|
-
onClick:
|
|
86
|
+
onClick: x,
|
|
87
87
|
class: "grid grid-cols-[1fr,max-content] !items-center gap-1 px-3 py-1"
|
|
88
88
|
}, {
|
|
89
89
|
default: g(() => [
|
|
@@ -96,7 +96,7 @@ const Y = {
|
|
|
96
96
|
readonly: ""
|
|
97
97
|
}, null, 8, ["model-value", "placeholder"]),
|
|
98
98
|
n(L, {
|
|
99
|
-
class: "w-4 h-4 shrink-0 !text-general-500",
|
|
99
|
+
class: "w-4 h-4 shrink-0 !text-general-500 dark:!text-white",
|
|
100
100
|
"data-ts-section": "inputtrigger",
|
|
101
101
|
icon: "calendar"
|
|
102
102
|
})
|
|
@@ -122,20 +122,20 @@ const Y = {
|
|
|
122
122
|
}, {
|
|
123
123
|
default: g(() => [
|
|
124
124
|
e.$slots.header ? (c(), u("div", Y, [
|
|
125
|
-
|
|
125
|
+
b(e.$slots, "header")
|
|
126
126
|
])) : h("", !0),
|
|
127
127
|
k("div", q, [
|
|
128
128
|
(c(), u(_, null, F(m, (r, l) => k("span", {
|
|
129
129
|
key: r,
|
|
130
130
|
"aria-selected": a.value.includes(l),
|
|
131
|
-
class: T([{ "col-start-2": r === "Sunday" }, "text-xs text-general-800 bg-white hover:bg-primary-100 rounded-[20px] [&[data-in-range='true']]:bg-primary-200 [&[data-in-range='true']]:text-general-800 [&[data-in-range='true']]:rounded-[0] [&[aria-selected='true']]:bg-primary-500 [&[aria-selected='true']]:text-white text-center p-2 cursor-pointer"]),
|
|
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
133
|
onClick: (p) => w(r, l),
|
|
134
134
|
"data-ts-section": "day"
|
|
135
135
|
}, E(o(i)(r)), 11, A)), 64))
|
|
136
136
|
]),
|
|
137
137
|
e.$slots.footer ? (c(), u("div", G, [
|
|
138
|
-
|
|
138
|
+
b(e.$slots, "footer")
|
|
139
139
|
])) : h("", !0)
|
|
140
140
|
]),
|
|
141
141
|
_: 3
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as O, mergeModels as S, useModel as F, ref as v, inject as K, computed as p, watch as T, createBlock as x, openBlock as
|
|
1
|
+
import { defineComponent as O, mergeModels as S, useModel as F, ref as v, inject as K, computed as p, watch as T, createBlock as x, openBlock as i, withCtx as b, createElementBlock as m, createCommentVNode as M, createElementVNode as a, createVNode as r, toDisplayString as L } 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";
|
|
@@ -21,7 +21,7 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
21
21
|
}, le = { class: "flex flex-row items-center gap-1" }, ne = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "flex flex-row items-center gap-1"
|
|
24
|
-
},
|
|
24
|
+
}, re = { class: "text-xs font-medium text-general-400 dark:text-general-200" }, ie = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "text-xs font-medium"
|
|
27
27
|
}, be = /* @__PURE__ */ O({
|
|
@@ -104,7 +104,7 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
104
104
|
t && (o.value = C.id);
|
|
105
105
|
}), T(o, (t) => {
|
|
106
106
|
t && I();
|
|
107
|
-
}), (t, e) => (
|
|
107
|
+
}), (t, e) => (i(), x(H, {
|
|
108
108
|
visible: g.value,
|
|
109
109
|
"onUpdate:visible": e[2] || (e[2] = (s) => g.value = s),
|
|
110
110
|
draggable: !1,
|
|
@@ -119,14 +119,14 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
119
119
|
a("span", { class: "text-sm font-bold" }, "Transfer Log")
|
|
120
120
|
], -1)),
|
|
121
121
|
a("div", J, [
|
|
122
|
-
|
|
122
|
+
r(A, {
|
|
123
123
|
disabled: h.value,
|
|
124
124
|
onClick: e[0] || (e[0] = (s) => N("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
130
|
disabled: $.value,
|
|
131
131
|
onClick: e[1] || (e[1] = (s) => N("next")),
|
|
132
132
|
class: "!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",
|
|
@@ -139,8 +139,8 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
139
139
|
default: b(() => {
|
|
140
140
|
var s, c, f;
|
|
141
141
|
return [
|
|
142
|
-
n.value ? (
|
|
143
|
-
(
|
|
142
|
+
n.value ? (i(), m("div", Q, [
|
|
143
|
+
(i(), x(W, {
|
|
144
144
|
id: n.value.asset,
|
|
145
145
|
key: n.value.asset,
|
|
146
146
|
fields: ["brand", "model", "group"],
|
|
@@ -151,11 +151,11 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
151
151
|
a("div", Y, [
|
|
152
152
|
a("div", P, [
|
|
153
153
|
e[4] || (e[4] = a("span", null, "Origin:", -1)),
|
|
154
|
-
|
|
154
|
+
r(d, {
|
|
155
155
|
label: (s = n.value.originGroup) == null ? void 0 : s.name
|
|
156
156
|
}, null, 8, ["label"])
|
|
157
157
|
]),
|
|
158
|
-
|
|
158
|
+
r(Z, {
|
|
159
159
|
user: {
|
|
160
160
|
...n.value.manager,
|
|
161
161
|
fullName: (c = n.value.manager) == null ? void 0 : c.fullName
|
|
@@ -164,51 +164,51 @@ const z = { class: "w-full flex items-center justify-between pr-4" }, J = { clas
|
|
|
164
164
|
]),
|
|
165
165
|
a("div", ee, [
|
|
166
166
|
e[5] || (e[5] = a("span", null, "Destination:", -1)),
|
|
167
|
-
|
|
167
|
+
r(d, {
|
|
168
168
|
label: (f = n.value.destinationGroup) == null ? void 0 : f.name
|
|
169
169
|
}, null, 8, ["label"])
|
|
170
170
|
])
|
|
171
171
|
]),
|
|
172
172
|
a("div", te, [
|
|
173
173
|
e[6] || (e[6] = a("span", null, "Status:", -1)),
|
|
174
|
-
|
|
174
|
+
r(d, {
|
|
175
175
|
label: n.value.status,
|
|
176
176
|
severity: G(n.value.status),
|
|
177
177
|
format: "nowrap"
|
|
178
178
|
}, null, 8, ["label", "severity"])
|
|
179
179
|
]),
|
|
180
|
-
|
|
180
|
+
r(R, {
|
|
181
181
|
"active-index": 0,
|
|
182
182
|
menu: [{ label: "Transfer Log" }],
|
|
183
183
|
type: "tab"
|
|
184
184
|
}),
|
|
185
|
-
(
|
|
185
|
+
(i(), x(U, {
|
|
186
186
|
key: w.value,
|
|
187
187
|
value: D.value
|
|
188
188
|
}, {
|
|
189
189
|
detail: b((l) => [
|
|
190
|
-
l.key === "To" ? (
|
|
191
|
-
e[7] || (e[7] = a("span", { class: "text-xs font-medium text-general-400" }, " Destination Group: ", -1)),
|
|
192
|
-
|
|
190
|
+
l.key === "To" ? (i(), m("div", ae, [
|
|
191
|
+
e[7] || (e[7] = a("span", { class: "text-xs font-medium text-general-400 dark:text-general-200" }, " Destination Group: ", -1)),
|
|
192
|
+
r(d, {
|
|
193
193
|
label: l.value
|
|
194
194
|
}, null, 8, ["label"])
|
|
195
|
-
])) : l.key === "From" ? (
|
|
195
|
+
])) : l.key === "From" ? (i(), m("div", se, [
|
|
196
196
|
a("div", le, [
|
|
197
|
-
e[8] || (e[8] = a("span", { class: "text-xs font-medium text-general-400" }, " Destination Group: ", -1)),
|
|
198
|
-
|
|
197
|
+
e[8] || (e[8] = a("span", { class: "text-xs font-medium text-general-400 dark:text-general-200" }, " Destination Group: ", -1)),
|
|
198
|
+
r(d, {
|
|
199
199
|
label: l.value
|
|
200
200
|
}, null, 8, ["label"])
|
|
201
201
|
]),
|
|
202
|
-
|
|
203
|
-
class: "!text-general-800 !text-xs -rotate-90",
|
|
202
|
+
r(V, {
|
|
203
|
+
class: "!text-general-800 dark:!text-general-400 !text-xs -rotate-90",
|
|
204
204
|
icon: "arrow-left"
|
|
205
205
|
})
|
|
206
|
-
])) : (
|
|
207
|
-
a("span",
|
|
208
|
-
l.key.includes("Group") ? (
|
|
206
|
+
])) : (i(), m("div", ne, [
|
|
207
|
+
a("span", re, L(l.key) + ": ", 1),
|
|
208
|
+
l.key.includes("Group") ? (i(), x(d, {
|
|
209
209
|
key: 0,
|
|
210
210
|
label: l.value
|
|
211
|
-
}, null, 8, ["label"])) : (
|
|
211
|
+
}, null, 8, ["label"])) : (i(), m("span", ie, L(l.value), 1))
|
|
212
212
|
]))
|
|
213
213
|
]),
|
|
214
214
|
_: 1
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as xe, mergeModels as ee, useModel as be, ref as c, computed as te, watch as _e, createBlock as p, openBlock as n, withCtx as v, createElementVNode as t, createVNode as i, createCommentVNode as x, toDisplayString as
|
|
1
|
+
import { defineComponent as xe, mergeModels as ee, useModel as be, ref as c, computed as te, watch as _e, createBlock as p, openBlock as n, withCtx as v, createElementVNode as t, createVNode as i, createCommentVNode as x, toDisplayString as d, createElementBlock as ae, unref as se, Fragment as ye, createTextVNode as he, normalizeClass as b } from "vue";
|
|
2
2
|
import { t as we } from "../vendor/single-spa/lib/es2015/esm/single-spa.min.es.js";
|
|
3
3
|
import { DamageServices as De } from "@tagsamurai/fats-api-services";
|
|
4
|
-
import { u as
|
|
5
|
-
import { a as
|
|
4
|
+
import { u as ke } from "../assetinfo/index.es.js";
|
|
5
|
+
import { a as Ie } from "../utils/role.util.es.js";
|
|
6
6
|
import { f as qe } from "../utils/date.util.es.js";
|
|
7
7
|
import { u as Re } from "../utils/toast.util.es.js";
|
|
8
8
|
import { _ as f } from "../badge/index.es.js";
|
|
9
9
|
import { _ as Ne } from "../dialog/index.es.js";
|
|
10
|
-
import { _ as
|
|
10
|
+
import { _ as re } from "../image/index.es.js";
|
|
11
11
|
import { _ as Ce } from "../tabmenu/index.es.js";
|
|
12
12
|
import { _ as Le } from "../tagtype/index.es.js";
|
|
13
13
|
import { _ as Se } from "../timeline/index.es.js";
|
|
14
|
-
const $e = { class: "w-full flex items-center justify-between" }, Te = { class: "flex items-center gap-2" }, Be = ["disabled"], Me = ["disabled"], Pe = { class: "flex items-start gap-[18px]" }, Ve = { class: "flex flex-col w-full" }, Ae = { class: "w-full flex items-center justify-between" }, je = { class: "text-body-medium !font-bold" }, Ee = { class: "flex items-center gap-[6px] text-general-400" }, ze = { class: "flex gap-3 w-full mt-[6px]" }, Fe = { class: "flex flex-col gap-1 items-start self-stretch" }, Ge = { class: "flex gap-2" }, Ue = ["data-wv-section"], Ke = {
|
|
15
|
-
class: "text-body-medium text-general-400",
|
|
14
|
+
const $e = { class: "w-full flex items-center justify-between" }, Te = { class: "flex items-center gap-2" }, Be = ["disabled"], Me = ["disabled"], Pe = { class: "flex items-start gap-[18px]" }, Ve = { class: "flex flex-col w-full" }, Ae = { class: "w-full flex items-center justify-between" }, je = { class: "text-body-medium !font-bold" }, Ee = { class: "flex items-center gap-[6px] text-general-400 dark:text-general-200" }, ze = { class: "flex gap-3 w-full mt-[6px]" }, Fe = { class: "flex flex-col gap-1 items-start self-stretch" }, Ge = { class: "flex gap-2" }, Ue = ["data-wv-section"], Ke = {
|
|
15
|
+
class: "text-body-medium text-general-400 dark:text-general-200",
|
|
16
16
|
"data-wv-section": "key"
|
|
17
17
|
}, We = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "text-body-medium"
|
|
20
|
-
},
|
|
20
|
+
}, lt = /* @__PURE__ */ xe({
|
|
21
21
|
__name: "DialogDamageLog",
|
|
22
22
|
props: /* @__PURE__ */ ee({
|
|
23
23
|
id: {},
|
|
@@ -27,14 +27,14 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
27
27
|
modelModifiers: {}
|
|
28
28
|
}),
|
|
29
29
|
emits: /* @__PURE__ */ ee(["prev", "next"], ["update:modelValue"]),
|
|
30
|
-
setup(_, { emit:
|
|
31
|
-
const y = _, h =
|
|
30
|
+
setup(_, { emit: oe }) {
|
|
31
|
+
const y = _, h = oe, w = be(_, "modelValue"), le = Re(), { setLoading: D } = ke(), s = c(), o = c(0), k = c(0), u = te(() => y.listId), ne = [
|
|
32
32
|
{
|
|
33
33
|
label: "Damage Log"
|
|
34
34
|
}
|
|
35
35
|
], g = c([]), ie = te(() => {
|
|
36
|
-
var
|
|
37
|
-
switch ((e = (
|
|
36
|
+
var a, e;
|
|
37
|
+
switch ((e = (a = s.value) == null ? void 0 : a.request) == null ? void 0 : e.status) {
|
|
38
38
|
case "Damaged":
|
|
39
39
|
return "danger";
|
|
40
40
|
case "Repaired":
|
|
@@ -42,24 +42,24 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
42
42
|
default:
|
|
43
43
|
return "dark";
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
45
|
+
}), de = async (a) => (pe(a), await I(o.value)), I = async (a) => {
|
|
46
46
|
var e;
|
|
47
47
|
try {
|
|
48
48
|
D(!0);
|
|
49
|
-
const { data:
|
|
50
|
-
|
|
49
|
+
const { data: r } = await De.getDamageReportDetail(
|
|
50
|
+
u.value[a]
|
|
51
51
|
);
|
|
52
|
-
|
|
53
|
-
} catch (
|
|
54
|
-
|
|
55
|
-
error:
|
|
52
|
+
s.value = r.data, g.value = ce((e = s.value) == null ? void 0 : e.logs), k.value++;
|
|
53
|
+
} catch (r) {
|
|
54
|
+
le.add({
|
|
55
|
+
error: r,
|
|
56
56
|
message: "Error, failed to fetch damage detail."
|
|
57
57
|
});
|
|
58
58
|
} finally {
|
|
59
59
|
D(!1);
|
|
60
60
|
}
|
|
61
|
-
},
|
|
62
|
-
switch (
|
|
61
|
+
}, ue = (a) => {
|
|
62
|
+
switch (a) {
|
|
63
63
|
case "Reported Damaged":
|
|
64
64
|
return "Reported damaged by";
|
|
65
65
|
case "Reported Disposal":
|
|
@@ -75,8 +75,8 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
75
75
|
default:
|
|
76
76
|
return "";
|
|
77
77
|
}
|
|
78
|
-
}, me = (
|
|
79
|
-
switch (
|
|
78
|
+
}, me = (a, e) => {
|
|
79
|
+
switch (a) {
|
|
80
80
|
case "Reported Damaged":
|
|
81
81
|
return {
|
|
82
82
|
Note: (e == null ? void 0 : e.notes) ?? "-",
|
|
@@ -88,35 +88,35 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
88
88
|
Note: (e == null ? void 0 : e.notes) ?? "-"
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
}, ce = (
|
|
91
|
+
}, ce = (a) => a.map((e) => ({
|
|
92
92
|
_id: e._id,
|
|
93
|
-
action:
|
|
93
|
+
action: ue(e.action),
|
|
94
94
|
date: e.createdAt,
|
|
95
95
|
username: e.userFullName,
|
|
96
96
|
danger: !1,
|
|
97
97
|
detail: me(e.action, e.detail),
|
|
98
98
|
createdAt: e.createdAt
|
|
99
|
-
})), pe = (
|
|
100
|
-
var
|
|
101
|
-
const e = (
|
|
102
|
-
|
|
99
|
+
})), pe = (a) => {
|
|
100
|
+
var r;
|
|
101
|
+
const e = (r = y.listId) == null ? void 0 : r.findIndex((m) => m === a);
|
|
102
|
+
o.value = e;
|
|
103
103
|
}, ve = () => {
|
|
104
|
-
|
|
104
|
+
o.value++, h("next", o.value);
|
|
105
105
|
}, fe = () => {
|
|
106
|
-
|
|
106
|
+
o.value--, h("prev", o.value);
|
|
107
107
|
}, ge = () => {
|
|
108
|
-
var
|
|
109
|
-
we(`/assets/detail/${(e = (
|
|
108
|
+
var a, e;
|
|
109
|
+
we(`/assets/detail/${(e = (a = s.value) == null ? void 0 : a.request) == null ? void 0 : e.asset}`);
|
|
110
110
|
};
|
|
111
111
|
return _e(
|
|
112
|
-
() =>
|
|
113
|
-
(
|
|
114
|
-
|
|
112
|
+
() => o.value,
|
|
113
|
+
(a) => {
|
|
114
|
+
I(a);
|
|
115
115
|
}
|
|
116
|
-
), (
|
|
116
|
+
), (a, e) => (n(), p(Ne, {
|
|
117
117
|
visible: w.value,
|
|
118
|
-
"onUpdate:visible": e[0] || (e[0] = (
|
|
119
|
-
onShow: e[1] || (e[1] = (
|
|
118
|
+
"onUpdate:visible": e[0] || (e[0] = (r) => w.value = r),
|
|
119
|
+
onShow: e[1] || (e[1] = (r) => de(a.id)),
|
|
120
120
|
class: "w-[600px]",
|
|
121
121
|
modal: ""
|
|
122
122
|
}, {
|
|
@@ -125,17 +125,20 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
125
125
|
e[2] || (e[2] = t("h1", { class: "!text-base font-bold" }, "Damage Log", -1)),
|
|
126
126
|
t("div", Te, [
|
|
127
127
|
t("button", {
|
|
128
|
-
class: b([
|
|
129
|
-
|
|
128
|
+
class: b([
|
|
129
|
+
o.value === 0 ? "text-general-100 dark:text-general-400" : "text-primary-500 dark:text-primary-300",
|
|
130
|
+
"text-xs font-medium"
|
|
131
|
+
]),
|
|
132
|
+
disabled: o.value === 0,
|
|
130
133
|
onClick: fe,
|
|
131
134
|
"data-wv-section": "prev-button"
|
|
132
135
|
}, " <Prev ", 10, Be),
|
|
133
136
|
t("button", {
|
|
134
137
|
class: b([
|
|
135
|
-
|
|
138
|
+
o.value === u.value.length - 1 || u.value.length === 1 ? "text-general-100 dark:text-general-400" : "text-primary-500 dark:text-primary-300",
|
|
136
139
|
"text-xs font-medium"
|
|
137
140
|
]),
|
|
138
|
-
disabled:
|
|
141
|
+
disabled: o.value === u.value.length - 1 || u.value.length === 1,
|
|
139
142
|
onClick: ve,
|
|
140
143
|
"data-wv-section": "next-button"
|
|
141
144
|
}, " Next> ", 10, Me)
|
|
@@ -143,29 +146,29 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
143
146
|
])
|
|
144
147
|
]),
|
|
145
148
|
default: v(() => {
|
|
146
|
-
var
|
|
149
|
+
var r, m, q, R, N, C, L, S, $, T, B, M, P, V, A, j, E, z, F, G, U, K, W, H, J, O, Q, X, Y;
|
|
147
150
|
return [
|
|
148
151
|
t("div", Pe, [
|
|
149
|
-
i(
|
|
150
|
-
src: (m = (
|
|
152
|
+
i(re, {
|
|
153
|
+
src: (m = (r = s.value) == null ? void 0 : r.request) == null ? void 0 : m.assetImage,
|
|
151
154
|
size: "big"
|
|
152
155
|
}, null, 8, ["src"]),
|
|
153
156
|
t("div", Ve, [
|
|
154
157
|
t("div", Ae, [
|
|
155
|
-
t("p", je,
|
|
158
|
+
t("p", je, d((N = (R = (q = s.value) == null ? void 0 : q.request) == null ? void 0 : R.assetName) == null ? void 0 : N.nameWithSequence), 1),
|
|
156
159
|
t("button", {
|
|
157
160
|
onClick: ge,
|
|
158
|
-
class: "!text-xs font-medium !text-primary-500",
|
|
161
|
+
class: "!text-xs font-medium !text-primary-500 dark:!text-primary-300",
|
|
159
162
|
"data-wv-section": "detail-button"
|
|
160
163
|
}, " Asset Detail > ")
|
|
161
164
|
]),
|
|
162
165
|
t("div", Ee, [
|
|
163
|
-
t("p", null,
|
|
164
|
-
|
|
165
|
-
e[3] || (e[3] = t("div", { class: "w-[6px] h-[6px] bg-general-100 rounded" }, null, -1)),
|
|
166
|
-
(j = (A =
|
|
166
|
+
t("p", null, d(((L = (C = s.value) == null ? void 0 : C.request) == null ? void 0 : L.assetId) ?? "-") + " " + d((B = (T = ($ = (S = s.value) == null ? void 0 : S.request) == null ? void 0 : $.assetName) == null ? void 0 : T.aliasCode) != null && B.length ? `(${(V = (P = (M = s.value) == null ? void 0 : M.request) == null ? void 0 : P.assetName) == null ? void 0 : V.aliasCode})` : ""), 1),
|
|
167
|
+
se(Ie)() === "Enterprise" ? (n(), ae(ye, { key: 0 }, [
|
|
168
|
+
e[3] || (e[3] = t("div", { class: "w-[6px] h-[6px] bg-general-100 dark:bg-general-400 rounded" }, null, -1)),
|
|
169
|
+
(j = (A = s.value) == null ? void 0 : A.request) != null && j.tagType ? (n(), p(Le, {
|
|
167
170
|
key: 0,
|
|
168
|
-
type: (z = (E =
|
|
171
|
+
type: (z = (E = s.value) == null ? void 0 : E.request) == null ? void 0 : z.tagType
|
|
169
172
|
}, null, 8, ["type"])) : x("", !0)
|
|
170
173
|
], 64)) : x("", !0)
|
|
171
174
|
]),
|
|
@@ -182,17 +185,17 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
182
185
|
], -1)),
|
|
183
186
|
t("div", Fe, [
|
|
184
187
|
i(f, {
|
|
185
|
-
label: (U = (G = (F =
|
|
188
|
+
label: (U = (G = (F = s.value) == null ? void 0 : F.request) == null ? void 0 : G.assetBrand) == null ? void 0 : U.name,
|
|
186
189
|
format: "nowrap",
|
|
187
190
|
severity: "dark"
|
|
188
191
|
}, null, 8, ["label"]),
|
|
189
192
|
i(f, {
|
|
190
|
-
label: (H = (W = (K =
|
|
193
|
+
label: (H = (W = (K = s.value) == null ? void 0 : K.request) == null ? void 0 : W.assetModel) == null ? void 0 : H.name,
|
|
191
194
|
format: "nowrap",
|
|
192
195
|
severity: "dark"
|
|
193
196
|
}, null, 8, ["label"]),
|
|
194
197
|
i(f, {
|
|
195
|
-
label: (Q = (O = (J =
|
|
198
|
+
label: (Q = (O = (J = s.value) == null ? void 0 : J.request) == null ? void 0 : O.assetGroup) == null ? void 0 : Q.name,
|
|
196
199
|
format: "nowrap",
|
|
197
200
|
severity: "primary"
|
|
198
201
|
}, null, 8, ["label"])
|
|
@@ -203,7 +206,7 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
203
206
|
t("div", Ge, [
|
|
204
207
|
e[6] || (e[6] = t("p", { class: "text-xs font-medium tracking-tight" }, "Status:", -1)),
|
|
205
208
|
i(f, {
|
|
206
|
-
label: (Y = (X =
|
|
209
|
+
label: (Y = (X = s.value) == null ? void 0 : X.request) == null ? void 0 : Y.status,
|
|
207
210
|
severity: ie.value,
|
|
208
211
|
format: "nowrap"
|
|
209
212
|
}, null, 8, ["label", "severity"])
|
|
@@ -214,27 +217,27 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
214
217
|
type: "tab"
|
|
215
218
|
}),
|
|
216
219
|
g.value.length ? (n(), p(Se, {
|
|
217
|
-
key:
|
|
220
|
+
key: k.value,
|
|
218
221
|
value: g.value
|
|
219
222
|
}, {
|
|
220
|
-
detail: v(({ key:
|
|
223
|
+
detail: v(({ key: l, value: Z }) => [
|
|
221
224
|
t("div", {
|
|
222
225
|
class: b([
|
|
223
226
|
"flex gap-1 items-baseline",
|
|
224
|
-
{ "flex-col":
|
|
227
|
+
{ "flex-col": l === "Damaged Photo" }
|
|
225
228
|
]),
|
|
226
|
-
"data-wv-section":
|
|
229
|
+
"data-wv-section": l
|
|
227
230
|
}, [
|
|
228
|
-
t("span", Ke,
|
|
229
|
-
|
|
231
|
+
t("span", Ke, d(l) + ": ", 1),
|
|
232
|
+
l === "Damaged Photo" ? (n(), p(re, {
|
|
230
233
|
key: 0,
|
|
231
234
|
src: Z,
|
|
232
235
|
width: 36
|
|
233
|
-
}, null, 8, ["src"])) : (n(),
|
|
236
|
+
}, null, 8, ["src"])) : (n(), ae("span", We, d(Z), 1))
|
|
234
237
|
], 10, Ue)
|
|
235
238
|
]),
|
|
236
|
-
date: v(({ date:
|
|
237
|
-
he(
|
|
239
|
+
date: v(({ date: l }) => [
|
|
240
|
+
he(d(se(qe)(new Date(l), { showTime: !0 })), 1)
|
|
238
241
|
]),
|
|
239
242
|
_: 1
|
|
240
243
|
}, 8, ["value"])) : x("", !0)
|
|
@@ -245,5 +248,5 @@ const $e = { class: "w-full flex items-center justify-between" }, Te = { class:
|
|
|
245
248
|
}
|
|
246
249
|
});
|
|
247
250
|
export {
|
|
248
|
-
|
|
251
|
+
lt as _
|
|
249
252
|
};
|