@fewangsit/wangsvue-fats 1.0.1-alpha.53 → 1.0.1-alpha.55
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/assetinfo/index.es.js +82 -81
- package/basecalendartimezone/index.es.js +992 -0
- package/calendar/index.es.js +62 -42
- package/filtercontainer/index.d.ts +6 -1
- package/icon/index.d.ts +1 -0
- package/package.json +1 -1
- package/stats.html +1 -1
- package/wangsvue-fats.esm.browser.js +14678 -13682
- package/wangsvue-fats.system.js +70 -70
package/assetinfo/index.es.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
import { AssetServices as
|
|
1
|
+
import { shallowRef as O, ref as Y, defineComponent as Z, onMounted as ee, computed as c, watch as se, createElementBlock as r, openBlock as d, createVNode as p, createElementVNode as l, createCommentVNode as f, toDisplayString as x, Fragment as ae, unref as z, normalizeClass as y } from "vue";
|
|
2
|
+
import { AssetServices as te } from "@tagsamurai/fats-api-services";
|
|
3
3
|
import "../utils/role.util.es.js";
|
|
4
|
-
import { g as
|
|
5
|
-
import { u as
|
|
6
|
-
import { _
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
const
|
|
10
|
-
loading:
|
|
11
|
-
message:
|
|
12
|
-
setLoading: (
|
|
13
|
-
|
|
4
|
+
import { g as le } from "../utils/getStatusSeverity.util.es.js";
|
|
5
|
+
import { u as ne } from "../utils/toast.util.es.js";
|
|
6
|
+
import { _ } from "../badge/index.es.js";
|
|
7
|
+
import { _ as oe } from "../image/index.es.js";
|
|
8
|
+
import { _ as ie } from "../tagtype/index.es.js";
|
|
9
|
+
const J = O(!1), K = Y(), ue = () => ({
|
|
10
|
+
loading: J,
|
|
11
|
+
message: K,
|
|
12
|
+
setLoading: (m, t) => {
|
|
13
|
+
J.value = m, K.value = t, document.body.classList[m ? "add" : "remove"]("loading");
|
|
14
14
|
}
|
|
15
|
-
}), re = { class: "flex justify-between gap-[18px] dark:text-general-100" },
|
|
15
|
+
}), re = { class: "flex justify-between gap-[18px] dark:text-general-100" }, de = { class: "w-full flex flex-col gap-[6px]" }, ce = { class: "flex justify-between" }, pe = { class: "" }, fe = { class: "text-[16px] font-bold leading-[19.12px]" }, me = { class: "flex items-center gap-[6px]" }, ve = { class: "text-general-400 leading-[16.39px]" }, ge = ["href"], ye = { class: "flex flex-col gap-1" }, _e = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "flex gap-3"
|
|
18
|
-
},
|
|
18
|
+
}, xe = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "flex gap-3"
|
|
21
|
-
},
|
|
21
|
+
}, be = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "flex gap-3"
|
|
24
|
-
},
|
|
24
|
+
}, he = {
|
|
25
25
|
key: 3,
|
|
26
26
|
class: "flex gap-3"
|
|
27
|
-
},
|
|
27
|
+
}, Ce = /* @__PURE__ */ Z({
|
|
28
28
|
__name: "AssetInfo",
|
|
29
29
|
props: {
|
|
30
30
|
id: {},
|
|
@@ -33,122 +33,123 @@ const q = J(!1), z = X(), ie = () => ({
|
|
|
33
33
|
useNfc: { type: Boolean, default: !0 },
|
|
34
34
|
useTagType: { type: Boolean, default: !0 }
|
|
35
35
|
},
|
|
36
|
-
setup(
|
|
37
|
-
const t =
|
|
38
|
-
|
|
39
|
-
t.transactionDetail ? e.value = t.transactionDetail : await
|
|
36
|
+
setup(b, { expose: m }) {
|
|
37
|
+
const t = b;
|
|
38
|
+
ee(async () => {
|
|
39
|
+
t.transactionDetail ? e.value = t.transactionDetail : await X();
|
|
40
40
|
});
|
|
41
|
-
const
|
|
41
|
+
const R = ne(), { setLoading: h } = ue(), H = JSON.parse(localStorage.getItem("user") ?? "{}"), e = O(), k = c(() => {
|
|
42
42
|
var s;
|
|
43
43
|
return (s = t.fields) == null ? void 0 : s.includes("status");
|
|
44
|
-
}),
|
|
44
|
+
}), P = c(() => {
|
|
45
45
|
const {
|
|
46
46
|
setDefault: s,
|
|
47
47
|
firstImageBig: a,
|
|
48
48
|
secondImageBig: n,
|
|
49
49
|
assetImage: o,
|
|
50
50
|
firstImage: i,
|
|
51
|
-
secondImage:
|
|
52
|
-
} = e.value ?? {},
|
|
53
|
-
return t.transactionDetail ? o :
|
|
54
|
-
}),
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
secondImage: u
|
|
52
|
+
} = e.value ?? {}, g = s === "firstImage";
|
|
53
|
+
return t.transactionDetail ? o : g ? i ?? a : u ?? n;
|
|
54
|
+
}), I = c(() => {
|
|
55
|
+
var a, n, o, i, u;
|
|
56
|
+
const s = t.transactionDetail ? "assetName" : "name";
|
|
57
|
+
return (o = (n = (a = e.value) == null ? void 0 : a[s]) == null ? void 0 : n.aliasCode) != null && o.length ? `${(u = (i = e.value) == null ? void 0 : i[s]) == null ? void 0 : u.aliasCode}` : void 0;
|
|
58
|
+
}), Q = c(() => {
|
|
58
59
|
var s, a;
|
|
59
60
|
return ((s = e.value) == null ? void 0 : s.assetTagType) ?? ((a = e.value) == null ? void 0 : a.tagType);
|
|
60
|
-
}),
|
|
61
|
+
}), U = c(() => {
|
|
61
62
|
var s, a;
|
|
62
63
|
return ((s = e.value) == null ? void 0 : s.assetName) ?? ((a = e.value) == null ? void 0 : a.name);
|
|
63
|
-
}),
|
|
64
|
+
}), v = c(() => [
|
|
64
65
|
{
|
|
65
|
-
"w-[69px]": !
|
|
66
|
-
"w-[76px]":
|
|
66
|
+
"w-[69px]": !k.value,
|
|
67
|
+
"w-[76px]": k.value
|
|
67
68
|
}
|
|
68
|
-
]),
|
|
69
|
+
]), X = async () => {
|
|
69
70
|
try {
|
|
70
|
-
|
|
71
|
-
const { data: s } = await
|
|
71
|
+
h(!0);
|
|
72
|
+
const { data: s } = await te.getAssetDetail(t.id);
|
|
72
73
|
s && (e.value = s.data);
|
|
73
74
|
} catch (s) {
|
|
74
|
-
|
|
75
|
+
R.add({ error: s, message: "Error, failed to load asset details." });
|
|
75
76
|
} finally {
|
|
76
|
-
|
|
77
|
+
h(!1);
|
|
77
78
|
}
|
|
78
79
|
};
|
|
79
|
-
return
|
|
80
|
+
return se(
|
|
80
81
|
() => t.transactionDetail,
|
|
81
82
|
(s) => {
|
|
82
83
|
e.value = s;
|
|
83
84
|
},
|
|
84
85
|
{ deep: !0 }
|
|
85
|
-
),
|
|
86
|
-
var n, o, i,
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
l("div",
|
|
90
|
-
l("div",
|
|
91
|
-
l("div",
|
|
92
|
-
l("div",
|
|
93
|
-
l("div",
|
|
94
|
-
l("span",
|
|
95
|
-
s.useTagType ? (
|
|
86
|
+
), m({ asset: e }), (s, a) => {
|
|
87
|
+
var n, o, i, u, g, T, w, D, S, B, N, C, A, $, L, E, F, M, V, j, G, W, q;
|
|
88
|
+
return d(), r("div", re, [
|
|
89
|
+
p(oe, { src: P.value }, null, 8, ["src"]),
|
|
90
|
+
l("div", de, [
|
|
91
|
+
l("div", ce, [
|
|
92
|
+
l("div", pe, [
|
|
93
|
+
l("div", fe, x(((n = U.value) == null ? void 0 : n.nameWithSequence) ?? "-"), 1),
|
|
94
|
+
l("div", me, [
|
|
95
|
+
l("span", ve, x(I.value ?? ((o = e.value) == null ? void 0 : o.assetId)) + " " + x(I.value ? `(${(i = e.value) == null ? void 0 : i.assetId})` : ""), 1),
|
|
96
|
+
s.useTagType ? (d(), r(ae, { key: 0 }, [
|
|
96
97
|
a[0] || (a[0] = l("div", { class: "w-[6px] h-[6px] rounded-full bg-general-100" }, null, -1)),
|
|
97
|
-
|
|
98
|
-
type:
|
|
98
|
+
p(ie, {
|
|
99
|
+
type: Q.value,
|
|
99
100
|
"use-nfc": s.useNfc
|
|
100
101
|
}, null, 8, ["type", "use-nfc"])
|
|
101
|
-
], 64)) :
|
|
102
|
+
], 64)) : f("", !0)
|
|
102
103
|
])
|
|
103
104
|
]),
|
|
104
|
-
|
|
105
|
+
z(H).userType !== "Basic" ? (d(), r("a", {
|
|
105
106
|
key: 0,
|
|
106
|
-
href: `/assets/detail/${((
|
|
107
|
+
href: `/assets/detail/${((u = e.value) == null ? void 0 : u.asset) ?? ((g = e.value) == null ? void 0 : g._id)}`,
|
|
107
108
|
class: "text-primary-500",
|
|
108
109
|
target: "_blank"
|
|
109
|
-
}, " Asset Detail > ", 8,
|
|
110
|
+
}, " Asset Detail > ", 8, ge)) : f("", !0)
|
|
110
111
|
]),
|
|
111
|
-
l("div",
|
|
112
|
-
!t.fields || (
|
|
112
|
+
l("div", ye, [
|
|
113
|
+
!t.fields || (T = t.fields) != null && T.includes("brand") ? (d(), r("div", _e, [
|
|
113
114
|
l("span", {
|
|
114
|
-
class:
|
|
115
|
+
class: y(v.value)
|
|
115
116
|
}, " Brand ", 2),
|
|
116
117
|
a[1] || (a[1] = l("span", null, ":", -1)),
|
|
117
|
-
|
|
118
|
-
label: ((
|
|
118
|
+
p(_, {
|
|
119
|
+
label: ((D = (w = e.value) == null ? void 0 : w.assetBrand) == null ? void 0 : D.name) ?? ((B = (S = e.value) == null ? void 0 : S.brand) == null ? void 0 : B.name) ?? "-",
|
|
119
120
|
severity: "dark"
|
|
120
121
|
}, null, 8, ["label"])
|
|
121
|
-
])) :
|
|
122
|
-
!t.fields || (N = t.fields) != null && N.includes("model") ? (
|
|
122
|
+
])) : f("", !0),
|
|
123
|
+
!t.fields || (N = t.fields) != null && N.includes("model") ? (d(), r("div", xe, [
|
|
123
124
|
l("span", {
|
|
124
|
-
class:
|
|
125
|
+
class: y(v.value)
|
|
125
126
|
}, " Model/Type ", 2),
|
|
126
127
|
a[2] || (a[2] = l("span", null, ":", -1)),
|
|
127
|
-
|
|
128
|
-
label: ((
|
|
128
|
+
p(_, {
|
|
129
|
+
label: ((A = (C = e.value) == null ? void 0 : C.assetModel) == null ? void 0 : A.name) ?? ((L = ($ = e.value) == null ? void 0 : $.model) == null ? void 0 : L.name) ?? "-",
|
|
129
130
|
severity: "dark"
|
|
130
131
|
}, null, 8, ["label"])
|
|
131
|
-
])) :
|
|
132
|
-
!t.fields || (
|
|
132
|
+
])) : f("", !0),
|
|
133
|
+
!t.fields || (E = t.fields) != null && E.includes("group") ? (d(), r("div", be, [
|
|
133
134
|
l("span", {
|
|
134
|
-
class:
|
|
135
|
+
class: y(v.value)
|
|
135
136
|
}, " Group ", 2),
|
|
136
137
|
a[3] || (a[3] = l("span", null, ":", -1)),
|
|
137
|
-
|
|
138
|
-
label: ((
|
|
138
|
+
p(_, {
|
|
139
|
+
label: ((M = (F = e.value) == null ? void 0 : F.assetGroup) == null ? void 0 : M.name) ?? ((j = (V = e.value) == null ? void 0 : V.group) == null ? void 0 : j.name) ?? "-"
|
|
139
140
|
}, null, 8, ["label"])
|
|
140
|
-
])) :
|
|
141
|
-
(
|
|
141
|
+
])) : f("", !0),
|
|
142
|
+
(G = t.fields) != null && G.includes("status") ? (d(), r("div", he, [
|
|
142
143
|
l("span", {
|
|
143
|
-
class:
|
|
144
|
+
class: y(v.value)
|
|
144
145
|
}, " Asset Status ", 2),
|
|
145
146
|
a[4] || (a[4] = l("span", null, ":", -1)),
|
|
146
|
-
|
|
147
|
-
label: ((
|
|
148
|
-
severity:
|
|
147
|
+
p(_, {
|
|
148
|
+
label: ((W = e.value) == null ? void 0 : W.status) ?? "-",
|
|
149
|
+
severity: z(le)((q = e.value) == null ? void 0 : q.status),
|
|
149
150
|
format: "nowrap"
|
|
150
151
|
}, null, 8, ["label", "severity"])
|
|
151
|
-
])) :
|
|
152
|
+
])) : f("", !0)
|
|
152
153
|
])
|
|
153
154
|
])
|
|
154
155
|
]);
|
|
@@ -156,6 +157,6 @@ const q = J(!1), z = X(), ie = () => ({
|
|
|
156
157
|
}
|
|
157
158
|
});
|
|
158
159
|
export {
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
Ce as _,
|
|
161
|
+
ue as u
|
|
161
162
|
};
|