@fewangsit/wangsvue-fats 1.0.1-alpha.43 → 1.0.1-alpha.45
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/approverinfo/index.d.ts +4 -0
- package/approverinfo/index.es.js +50 -43
- package/assetinfo/index.es.js +14 -13
- package/columnlist/index.es.js +141 -116
- package/customcolumn/index.d.ts +5 -1
- package/dialoglinkedasset/index.es.js +3 -2
- package/dialogselectuser/index.es.js +1 -1
- package/disposalreporttable/index.es.js +4 -3
- package/disposalreporttablefilter/index.es.js +3 -2
- package/package.json +1 -1
- package/stats.html +1 -1
- package/utils/index.es.js +1 -0
- package/utils/role.util.es.js +44 -46
- package/wangsvue-fats.esm.browser.js +9658 -9628
- package/wangsvue-fats.system.js +71 -71
package/utils/index.es.js
CHANGED
package/utils/role.util.es.js
CHANGED
|
@@ -1,70 +1,68 @@
|
|
|
1
|
-
const
|
|
2
|
-
const { plan: e } = JSON.parse(
|
|
1
|
+
const t = localStorage.getItem("user") ?? "{}", o = localStorage.getItem("userFixedAsset"), u = () => {
|
|
2
|
+
const { plan: e } = JSON.parse(o ?? t);
|
|
3
3
|
return e;
|
|
4
|
-
},
|
|
5
|
-
const { transactionRoles:
|
|
6
|
-
|
|
4
|
+
}, n = (e) => {
|
|
5
|
+
const { transactionRoles: s } = JSON.parse(
|
|
6
|
+
o ?? t
|
|
7
7
|
);
|
|
8
|
-
return (
|
|
8
|
+
return (s == null ? void 0 : s[e]) ?? {
|
|
9
9
|
monitoringReport: !1,
|
|
10
10
|
manager: !1,
|
|
11
11
|
staff: !1,
|
|
12
12
|
approver: !1
|
|
13
13
|
};
|
|
14
|
-
},
|
|
15
|
-
const { systemRoles:
|
|
16
|
-
|
|
17
|
-
);
|
|
18
|
-
return (t == null ? void 0 : t[e]) ?? {
|
|
14
|
+
}, p = (e) => {
|
|
15
|
+
const { systemRoles: s } = JSON.parse(o ?? t);
|
|
16
|
+
return (s == null ? void 0 : s[e]) ?? {
|
|
19
17
|
create: !1,
|
|
20
18
|
view: !1,
|
|
21
19
|
update: !1,
|
|
22
20
|
delete: !1
|
|
23
21
|
};
|
|
24
|
-
},
|
|
25
|
-
const { manager:
|
|
26
|
-
return
|
|
27
|
-
},
|
|
28
|
-
const { manager:
|
|
29
|
-
return
|
|
30
|
-
},
|
|
22
|
+
}, g = (e) => p(e).view, m = (e) => {
|
|
23
|
+
const { manager: s, staff: a, monitoringReport: r } = n(e);
|
|
24
|
+
return s || a || r;
|
|
25
|
+
}, R = (e) => {
|
|
26
|
+
const { manager: s } = n(e);
|
|
27
|
+
return s;
|
|
28
|
+
}, h = () => {
|
|
31
29
|
const { transactionRoles: e } = JSON.parse(
|
|
32
|
-
|
|
30
|
+
o ?? t
|
|
33
31
|
);
|
|
34
|
-
return Object.entries(e).some(([,
|
|
35
|
-
},
|
|
32
|
+
return Object.entries(e).some(([, s]) => s.manager);
|
|
33
|
+
}, d = () => {
|
|
36
34
|
const { transactionRoles: e } = JSON.parse(
|
|
37
|
-
|
|
35
|
+
o ?? t
|
|
38
36
|
);
|
|
39
37
|
return Object.entries(e).some(
|
|
40
|
-
([,
|
|
38
|
+
([, s]) => s.monitoringReport
|
|
41
39
|
);
|
|
42
40
|
}, S = (e) => {
|
|
43
|
-
const { staff:
|
|
44
|
-
return
|
|
45
|
-
},
|
|
46
|
-
const { monitoringReport:
|
|
47
|
-
return
|
|
48
|
-
},
|
|
49
|
-
const { approver:
|
|
50
|
-
return
|
|
51
|
-
},
|
|
52
|
-
const { userType:
|
|
41
|
+
const { staff: s } = n(e);
|
|
42
|
+
return s;
|
|
43
|
+
}, A = (e) => {
|
|
44
|
+
const { monitoringReport: s } = n(e);
|
|
45
|
+
return s;
|
|
46
|
+
}, O = (e) => {
|
|
47
|
+
const { approver: s } = n(e);
|
|
48
|
+
return s;
|
|
49
|
+
}, v = (e, s, a) => {
|
|
50
|
+
const { userType: r } = JSON.parse(
|
|
53
51
|
localStorage.getItem("user") ?? "{}"
|
|
54
|
-
), { hasAccess:
|
|
55
|
-
(
|
|
52
|
+
), { hasAccess: c = !0 } = e.meta, l = r === "Admin", i = e.path.includes("handover-confirmation"), f = e.path.includes("my-profile");
|
|
53
|
+
(l || i || f) && c ? a() : a("/not-found");
|
|
56
54
|
};
|
|
57
55
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
u as a,
|
|
57
|
+
p as b,
|
|
58
|
+
m as c,
|
|
59
|
+
R as d,
|
|
60
|
+
h as e,
|
|
61
|
+
d as f,
|
|
62
|
+
n as g,
|
|
63
|
+
g as h,
|
|
66
64
|
S as i,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
A as j,
|
|
66
|
+
O as k,
|
|
67
|
+
v as l
|
|
70
68
|
};
|