@fewangsit/wangsvue-fats 1.0.1-alpha.46 → 1.0.1-alpha.49
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/config/locale.es.js +45 -3
- package/dialogdamagelog/index.es.js +82 -78
- package/package.json +1 -1
- package/plugins/WangsVue.d.ts +1 -1
- package/plugins/WangsVue.es.js +1 -0
- package/stats.html +1 -1
- package/wangsvue-fats.esm.browser.js +2858 -2814
- package/wangsvue-fats.system.js +70 -70
package/config/locale.es.js
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { D as e } from "../plugins/WangsVue.es.js";
|
|
2
|
+
const t = {
|
|
3
|
+
global: {
|
|
4
|
+
...e,
|
|
5
|
+
monthNames: [
|
|
6
|
+
"January",
|
|
7
|
+
"February",
|
|
8
|
+
"March",
|
|
9
|
+
"April",
|
|
10
|
+
"May",
|
|
11
|
+
"June",
|
|
12
|
+
"July",
|
|
13
|
+
"August",
|
|
14
|
+
"September",
|
|
15
|
+
"October",
|
|
16
|
+
"November",
|
|
17
|
+
"December"
|
|
18
|
+
],
|
|
19
|
+
monthNamesShort: [
|
|
20
|
+
"Jan",
|
|
21
|
+
"Feb",
|
|
22
|
+
"Mar",
|
|
23
|
+
"Apr",
|
|
24
|
+
"May",
|
|
25
|
+
"Jun",
|
|
26
|
+
"Jul",
|
|
27
|
+
"Aug",
|
|
28
|
+
"Sep",
|
|
29
|
+
"Oct",
|
|
30
|
+
"Nov",
|
|
31
|
+
"Dec"
|
|
32
|
+
],
|
|
33
|
+
dayNames: [
|
|
34
|
+
"Sunday",
|
|
35
|
+
"Monday",
|
|
36
|
+
"Tuesday",
|
|
37
|
+
"Wednesday",
|
|
38
|
+
"Thursday",
|
|
39
|
+
"Friday",
|
|
40
|
+
"Saturday"
|
|
41
|
+
],
|
|
42
|
+
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
43
|
+
dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
|
|
44
|
+
},
|
|
3
45
|
components: {
|
|
4
46
|
FieldWrapper: {
|
|
5
47
|
labelRequired: "*"
|
|
@@ -82,5 +124,5 @@ const e = {
|
|
|
82
124
|
}
|
|
83
125
|
};
|
|
84
126
|
export {
|
|
85
|
-
|
|
127
|
+
t as l
|
|
86
128
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { t as
|
|
3
|
-
import { DamageServices as
|
|
4
|
-
import { u as
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { _ as Ce } from "../
|
|
12
|
-
import { _ as Le } from "../
|
|
13
|
-
|
|
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 u, createElementBlock as se, unref as ae, Fragment as ye, createTextVNode as he, normalizeClass as b } from "vue";
|
|
2
|
+
import { t as we } from "../vendor/single-spa/lib/es2015/esm/single-spa.min.es.js";
|
|
3
|
+
import { DamageServices as De } from "@tagsamurai/fats-api-services";
|
|
4
|
+
import { u as Ie } from "../assetinfo/index.es.js";
|
|
5
|
+
import { a as ke } from "../utils/role.util.es.js";
|
|
6
|
+
import { f as qe } from "../utils/date.util.es.js";
|
|
7
|
+
import { u as Re } from "../utils/toast.util.es.js";
|
|
8
|
+
import { _ as f } from "../badge/index.es.js";
|
|
9
|
+
import { _ as Ne } from "../dialog/index.es.js";
|
|
10
|
+
import { _ as oe } from "../image/index.es.js";
|
|
11
|
+
import { _ as Ce } from "../tabmenu/index.es.js";
|
|
12
|
+
import { _ as Le } from "../tagtype/index.es.js";
|
|
13
|
+
import { _ as Se } from "../timeline/index.es.js";
|
|
14
|
+
const $e = { class: "w-full flex items-center justify-between" }, Be = { class: "flex items-center gap-2" }, Te = ["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 = {
|
|
14
15
|
class: "text-body-medium text-general-400",
|
|
15
16
|
"data-wv-section": "key"
|
|
16
|
-
},
|
|
17
|
+
}, We = {
|
|
17
18
|
key: 1,
|
|
18
19
|
class: "text-body-medium"
|
|
19
|
-
},
|
|
20
|
+
}, rt = /* @__PURE__ */ xe({
|
|
20
21
|
__name: "DialogDamageLog",
|
|
21
22
|
props: /* @__PURE__ */ ee({
|
|
22
23
|
id: {},
|
|
@@ -26,12 +27,12 @@ const Ne = { class: "w-full flex items-center justify-between" }, Se = { class:
|
|
|
26
27
|
modelModifiers: {}
|
|
27
28
|
}),
|
|
28
29
|
emits: /* @__PURE__ */ ee(["prev", "next"], ["update:modelValue"]),
|
|
29
|
-
setup(_, { emit:
|
|
30
|
-
const y = _, h =
|
|
30
|
+
setup(_, { emit: le }) {
|
|
31
|
+
const y = _, h = le, w = be(_, "modelValue"), re = Re(), { setLoading: D } = Ie(), a = c(), l = c(0), I = c(0), d = te(() => y.listId), ne = [
|
|
31
32
|
{
|
|
32
33
|
label: "Damage Log"
|
|
33
34
|
}
|
|
34
|
-
],
|
|
35
|
+
], g = c([]), ie = te(() => {
|
|
35
36
|
var s, e;
|
|
36
37
|
switch ((e = (s = a.value) == null ? void 0 : s.request) == null ? void 0 : e.status) {
|
|
37
38
|
case "Damaged":
|
|
@@ -41,23 +42,23 @@ const Ne = { class: "w-full flex items-center justify-between" }, Se = { class:
|
|
|
41
42
|
default:
|
|
42
43
|
return "dark";
|
|
43
44
|
}
|
|
44
|
-
}),
|
|
45
|
+
}), ue = async (s) => (pe(s), await k(l.value)), k = async (s) => {
|
|
45
46
|
var e;
|
|
46
47
|
try {
|
|
47
48
|
D(!0);
|
|
48
|
-
const { data: o } = await
|
|
49
|
-
|
|
49
|
+
const { data: o } = await De.getDamageReportDetail(
|
|
50
|
+
d.value[s]
|
|
50
51
|
);
|
|
51
|
-
a.value = o.data,
|
|
52
|
+
a.value = o.data, g.value = ce((e = a.value) == null ? void 0 : e.logs), I.value++;
|
|
52
53
|
} catch (o) {
|
|
53
|
-
|
|
54
|
+
re.add({
|
|
54
55
|
error: o,
|
|
55
56
|
message: "Error, failed to fetch damage detail."
|
|
56
57
|
});
|
|
57
58
|
} finally {
|
|
58
59
|
D(!1);
|
|
59
60
|
}
|
|
60
|
-
},
|
|
61
|
+
}, de = (s) => {
|
|
61
62
|
switch (s) {
|
|
62
63
|
case "Reported Damaged":
|
|
63
64
|
return "Reported damaged by";
|
|
@@ -74,7 +75,7 @@ const Ne = { class: "w-full flex items-center justify-between" }, Se = { class:
|
|
|
74
75
|
default:
|
|
75
76
|
return "";
|
|
76
77
|
}
|
|
77
|
-
},
|
|
78
|
+
}, me = (s, e) => {
|
|
78
79
|
switch (s) {
|
|
79
80
|
case "Reported Damaged":
|
|
80
81
|
return {
|
|
@@ -89,86 +90,86 @@ const Ne = { class: "w-full flex items-center justify-between" }, Se = { class:
|
|
|
89
90
|
}
|
|
90
91
|
}, ce = (s) => s.map((e) => ({
|
|
91
92
|
_id: e._id,
|
|
92
|
-
action:
|
|
93
|
+
action: de(e.action),
|
|
93
94
|
date: e.createdAt,
|
|
94
95
|
username: e.userFullName,
|
|
95
96
|
danger: !1,
|
|
96
|
-
detail:
|
|
97
|
+
detail: me(e.action, e.detail),
|
|
97
98
|
createdAt: e.createdAt
|
|
98
|
-
})),
|
|
99
|
+
})), pe = (s) => {
|
|
99
100
|
var o;
|
|
100
|
-
const e = (o = y.listId) == null ? void 0 : o.findIndex((
|
|
101
|
+
const e = (o = y.listId) == null ? void 0 : o.findIndex((m) => m === s);
|
|
101
102
|
l.value = e;
|
|
102
|
-
}, pe = () => {
|
|
103
|
-
l.value++, h("next", l.value);
|
|
104
103
|
}, ve = () => {
|
|
105
|
-
l.value
|
|
104
|
+
l.value++, h("next", l.value);
|
|
106
105
|
}, fe = () => {
|
|
106
|
+
l.value--, h("prev", l.value);
|
|
107
|
+
}, ge = () => {
|
|
107
108
|
var s, e;
|
|
108
|
-
|
|
109
|
+
we(`/assets/detail/${(e = (s = a.value) == null ? void 0 : s.request) == null ? void 0 : e.asset}`);
|
|
109
110
|
};
|
|
110
|
-
return
|
|
111
|
+
return _e(
|
|
111
112
|
() => l.value,
|
|
112
113
|
(s) => {
|
|
113
114
|
k(s);
|
|
114
115
|
}
|
|
115
|
-
), (s, e) => (
|
|
116
|
+
), (s, e) => (n(), p(Ne, {
|
|
116
117
|
visible: w.value,
|
|
117
118
|
"onUpdate:visible": e[0] || (e[0] = (o) => w.value = o),
|
|
118
|
-
onShow: e[1] || (e[1] = (o) =>
|
|
119
|
+
onShow: e[1] || (e[1] = (o) => ue(s.id)),
|
|
119
120
|
class: "w-[600px]",
|
|
120
121
|
modal: ""
|
|
121
122
|
}, {
|
|
122
|
-
header:
|
|
123
|
-
t("div",
|
|
123
|
+
header: v(() => [
|
|
124
|
+
t("div", $e, [
|
|
124
125
|
e[2] || (e[2] = t("h1", { class: "!text-base font-bold" }, "Damage Log", -1)),
|
|
125
|
-
t("div",
|
|
126
|
+
t("div", Be, [
|
|
126
127
|
t("button", {
|
|
127
128
|
class: b([l.value === 0 ? "text-general-100" : "text-primary", "text-xs font-medium"]),
|
|
128
129
|
disabled: l.value === 0,
|
|
129
|
-
onClick:
|
|
130
|
+
onClick: fe,
|
|
130
131
|
"data-wv-section": "prev-button"
|
|
131
|
-
}, " <Prev ", 10,
|
|
132
|
+
}, " <Prev ", 10, Te),
|
|
132
133
|
t("button", {
|
|
133
134
|
class: b([
|
|
134
|
-
l.value ===
|
|
135
|
+
l.value === d.value.length - 1 || d.value.length === 1 ? "text-general-100" : "text-primary",
|
|
135
136
|
"text-xs font-medium"
|
|
136
137
|
]),
|
|
137
|
-
disabled: l.value ===
|
|
138
|
-
onClick:
|
|
138
|
+
disabled: l.value === d.value.length - 1 || d.value.length === 1,
|
|
139
|
+
onClick: ve,
|
|
139
140
|
"data-wv-section": "next-button"
|
|
140
|
-
}, " Next> ", 10,
|
|
141
|
+
}, " Next> ", 10, Me)
|
|
141
142
|
])
|
|
142
143
|
])
|
|
143
144
|
]),
|
|
144
|
-
default:
|
|
145
|
-
var o,
|
|
145
|
+
default: v(() => {
|
|
146
|
+
var o, m, q, R, N, C, L, S, $, B, T, M, P, V, A, j, E, z, F, G, U, K, W, H, J, O, Q, X, Y;
|
|
146
147
|
return [
|
|
147
|
-
t("div",
|
|
148
|
-
|
|
149
|
-
src: (
|
|
148
|
+
t("div", Pe, [
|
|
149
|
+
i(oe, {
|
|
150
|
+
src: (m = (o = a.value) == null ? void 0 : o.request) == null ? void 0 : m.assetImageBig,
|
|
150
151
|
size: "big"
|
|
151
152
|
}, null, 8, ["src"]),
|
|
152
|
-
t("div",
|
|
153
|
-
t("div",
|
|
154
|
-
t("p",
|
|
153
|
+
t("div", Ve, [
|
|
154
|
+
t("div", Ae, [
|
|
155
|
+
t("p", je, u((N = (R = (q = a.value) == null ? void 0 : q.request) == null ? void 0 : R.assetName) == null ? void 0 : N.nameWithSequence), 1),
|
|
155
156
|
t("button", {
|
|
156
|
-
onClick:
|
|
157
|
+
onClick: ge,
|
|
157
158
|
class: "!text-xs font-medium !text-primary-500",
|
|
158
159
|
"data-wv-section": "detail-button"
|
|
159
160
|
}, " Asset Detail > ")
|
|
160
161
|
]),
|
|
161
|
-
t("div",
|
|
162
|
-
t("p", null, u(((
|
|
163
|
-
|
|
162
|
+
t("div", Ee, [
|
|
163
|
+
t("p", null, u(((L = (C = a.value) == null ? void 0 : C.request) == null ? void 0 : L.assetId) ?? "-") + " " + u((T = (B = ($ = (S = a.value) == null ? void 0 : S.request) == null ? void 0 : $.assetName) == null ? void 0 : B.aliasCode) != null && T.length ? `(${(V = (P = (M = a.value) == null ? void 0 : M.request) == null ? void 0 : P.assetName) == null ? void 0 : V.aliasCode})` : ""), 1),
|
|
164
|
+
ae(ke)() === "Enterprise" ? (n(), se(ye, { key: 0 }, [
|
|
164
165
|
e[3] || (e[3] = t("div", { class: "w-[6px] h-[6px] bg-general-100 rounded" }, null, -1)),
|
|
165
|
-
(j = (A = a.value) == null ? void 0 : A.request) != null && j.tagType ? (
|
|
166
|
+
(j = (A = a.value) == null ? void 0 : A.request) != null && j.tagType ? (n(), p(Le, {
|
|
166
167
|
key: 0,
|
|
167
168
|
type: (z = (E = a.value) == null ? void 0 : E.request) == null ? void 0 : z.tagType
|
|
168
169
|
}, null, 8, ["type"])) : x("", !0)
|
|
169
170
|
], 64)) : x("", !0)
|
|
170
171
|
]),
|
|
171
|
-
t("div",
|
|
172
|
+
t("div", ze, [
|
|
172
173
|
e[4] || (e[4] = t("div", { class: "flex flex-col justify-between items-start self-stretch" }, [
|
|
173
174
|
t("p", null, "Brand"),
|
|
174
175
|
t("p", null, "Model/Type"),
|
|
@@ -179,18 +180,18 @@ const Ne = { class: "w-full flex items-center justify-between" }, Se = { class:
|
|
|
179
180
|
t("p", null, ":"),
|
|
180
181
|
t("p", null, ":")
|
|
181
182
|
], -1)),
|
|
182
|
-
t("div",
|
|
183
|
-
|
|
183
|
+
t("div", Fe, [
|
|
184
|
+
i(f, {
|
|
184
185
|
label: (U = (G = (F = a.value) == null ? void 0 : F.request) == null ? void 0 : G.assetBrand) == null ? void 0 : U.name,
|
|
185
186
|
format: "nowrap",
|
|
186
187
|
severity: "dark"
|
|
187
188
|
}, null, 8, ["label"]),
|
|
188
|
-
|
|
189
|
+
i(f, {
|
|
189
190
|
label: (H = (W = (K = a.value) == null ? void 0 : K.request) == null ? void 0 : W.assetModel) == null ? void 0 : H.name,
|
|
190
191
|
format: "nowrap",
|
|
191
192
|
severity: "dark"
|
|
192
193
|
}, null, 8, ["label"]),
|
|
193
|
-
|
|
194
|
+
i(f, {
|
|
194
195
|
label: (Q = (O = (J = a.value) == null ? void 0 : J.request) == null ? void 0 : O.assetGroup) == null ? void 0 : Q.name,
|
|
195
196
|
format: "nowrap",
|
|
196
197
|
severity: "primary"
|
|
@@ -199,38 +200,41 @@ const Ne = { class: "w-full flex items-center justify-between" }, Se = { class:
|
|
|
199
200
|
])
|
|
200
201
|
])
|
|
201
202
|
]),
|
|
202
|
-
t("div",
|
|
203
|
+
t("div", Ge, [
|
|
203
204
|
e[6] || (e[6] = t("p", { class: "text-xs font-medium tracking-tight" }, "Status:", -1)),
|
|
204
|
-
|
|
205
|
+
i(f, {
|
|
205
206
|
label: (Y = (X = a.value) == null ? void 0 : X.request) == null ? void 0 : Y.status,
|
|
206
|
-
severity:
|
|
207
|
+
severity: ie.value,
|
|
207
208
|
format: "nowrap"
|
|
208
209
|
}, null, 8, ["label", "severity"])
|
|
209
210
|
]),
|
|
210
|
-
|
|
211
|
+
i(Ce, {
|
|
211
212
|
"active-index": 0,
|
|
212
|
-
menu:
|
|
213
|
+
menu: ne,
|
|
213
214
|
type: "tab"
|
|
214
215
|
}),
|
|
215
|
-
|
|
216
|
+
g.value.length ? (n(), p(Se, {
|
|
216
217
|
key: I.value,
|
|
217
|
-
value:
|
|
218
|
+
value: g.value
|
|
218
219
|
}, {
|
|
219
|
-
detail:
|
|
220
|
+
detail: v(({ key: r, value: Z }) => [
|
|
220
221
|
t("div", {
|
|
221
222
|
class: b([
|
|
222
223
|
"flex gap-1 items-baseline",
|
|
223
|
-
{ "flex-col":
|
|
224
|
+
{ "flex-col": r === "Damaged Photo" }
|
|
224
225
|
]),
|
|
225
|
-
"data-wv-section":
|
|
226
|
+
"data-wv-section": r
|
|
226
227
|
}, [
|
|
227
|
-
t("span",
|
|
228
|
-
|
|
228
|
+
t("span", Ke, u(r) + ": ", 1),
|
|
229
|
+
r === "Damaged Photo" ? (n(), p(oe, {
|
|
229
230
|
key: 0,
|
|
230
231
|
src: Z,
|
|
231
232
|
width: 36
|
|
232
|
-
}, null, 8, ["src"])) : (
|
|
233
|
-
], 10,
|
|
233
|
+
}, null, 8, ["src"])) : (n(), se("span", We, u(Z), 1))
|
|
234
|
+
], 10, Ue)
|
|
235
|
+
]),
|
|
236
|
+
date: v(({ date: r }) => [
|
|
237
|
+
he(u(ae(qe)(new Date(r), { showTime: !0 })), 1)
|
|
234
238
|
]),
|
|
235
239
|
_: 1
|
|
236
240
|
}, 8, ["value"])) : x("", !0)
|
|
@@ -241,5 +245,5 @@ const Ne = { class: "w-full flex items-center justify-between" }, Se = { class:
|
|
|
241
245
|
}
|
|
242
246
|
});
|
|
243
247
|
export {
|
|
244
|
-
|
|
248
|
+
rt as _
|
|
245
249
|
};
|
package/package.json
CHANGED
package/plugins/WangsVue.d.ts
CHANGED
|
@@ -144,7 +144,7 @@ export interface WangsVueInstance {
|
|
|
144
144
|
componentName: ComponentName,
|
|
145
145
|
): WangsVueComponentConfig<ComponentName>;
|
|
146
146
|
}
|
|
147
|
-
declare const DEFAULT_GLOBAL_LOCALE_CONFIG: {
|
|
147
|
+
export declare const DEFAULT_GLOBAL_LOCALE_CONFIG: {
|
|
148
148
|
startsWith: string;
|
|
149
149
|
contains: string;
|
|
150
150
|
notContains: string;
|