@fewangsit/wangsvue-fats 1.0.1-alpha.43 → 1.0.1-alpha.44
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/dialogselectuser/index.es.js +1 -1
- package/disposalreporttable/index.es.js +1 -1
- package/package.json +1 -1
- package/stats.html +1 -1
- package/wangsvue-fats.esm.browser.js +710 -703
- package/wangsvue-fats.system.js +25 -25
package/approverinfo/index.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ export interface ApproverInfoProps {
|
|
|
20
20
|
* @default true
|
|
21
21
|
*/
|
|
22
22
|
showShortInfo?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* To customize the level 0 label, for example 'Senior'
|
|
25
|
+
*/
|
|
26
|
+
customLevelZeroLabel?: string;
|
|
23
27
|
/**
|
|
24
28
|
* To set label text when showShortInfo is false
|
|
25
29
|
*/
|
package/approverinfo/index.es.js
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { f as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { defineComponent as N, shallowRef as B, computed as F, createElementBlock as o, openBlock as t, Fragment as i, createElementVNode as l, createVNode as m, toDisplayString as r, withCtx as I, renderList as k, createBlock as g, createCommentVNode as h, createTextVNode as w } from "vue";
|
|
2
|
+
import { f as V } from "../utils/date.util.es.js";
|
|
3
|
+
import { _ as L } from "../badge/index.es.js";
|
|
4
4
|
import { _ as $ } from "../dialog/index.es.js";
|
|
5
5
|
import { _ as A } from "../icon/index.es.js";
|
|
6
|
-
const
|
|
6
|
+
const E = {
|
|
7
7
|
class: "flex justify-end gap-1 items-center pb-1 flex-wrap whitespace-nowrap",
|
|
8
8
|
"data-wv-name": "approver-info"
|
|
9
|
-
},
|
|
9
|
+
}, Z = { class: "text-primary-500" }, H = { class: "text-general-800" }, M = { key: 1 }, S = { class: "flex flex-col gap-3 justify-between" }, T = { class: "flex justify-between" }, U = { class: "text-general-800 text-xs font-medium" }, P = { class: "flex justify-between items-center" }, R = { class: "text-primary-500 font-medium text-xs" }, q = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "text-general-800 font-normal text-xs"
|
|
12
12
|
}, z = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "flex gap-1 justify-end items-center"
|
|
15
|
-
}, G = { class: "text-general-800 font-normal text-xs" }, X = /* @__PURE__ */
|
|
15
|
+
}, G = { class: "text-general-800 font-normal text-xs" }, X = /* @__PURE__ */ N({
|
|
16
16
|
__name: "ApproverInfo",
|
|
17
17
|
props: {
|
|
18
18
|
approvals: {},
|
|
19
19
|
showShortInfo: { type: Boolean, default: !0 },
|
|
20
|
+
customLevelZeroLabel: {},
|
|
20
21
|
label: {},
|
|
21
22
|
btnLabel: {},
|
|
22
23
|
useFormatDate: { type: Boolean, default: !0 }
|
|
23
24
|
},
|
|
24
25
|
setup(D) {
|
|
25
|
-
const u = D,
|
|
26
|
-
var
|
|
27
|
-
let
|
|
28
|
-
return (
|
|
29
|
-
e = b.approvers.findIndex((
|
|
26
|
+
const u = D, p = B(!1), d = F(() => {
|
|
27
|
+
var c, a, n, v, y, x, _;
|
|
28
|
+
let s, e;
|
|
29
|
+
return (c = u.approvals) == null || c.forEach((b) => {
|
|
30
|
+
e = b.approvers.findIndex((C) => !!C.actionAt), s = e === -1 ? 0 : b.level - 1, e = e === -1 ? 0 : e;
|
|
30
31
|
}), {
|
|
31
|
-
name: (v = (n = (
|
|
32
|
-
date: (
|
|
32
|
+
name: (v = (n = (a = u.approvals) == null ? void 0 : a[s]) == null ? void 0 : n.approvers[e]) == null ? void 0 : v.fullName,
|
|
33
|
+
date: (_ = (x = (y = u.approvals) == null ? void 0 : y[s]) == null ? void 0 : x.approvers[e]) == null ? void 0 : _.actionAt
|
|
33
34
|
};
|
|
34
|
-
}), j = (
|
|
35
|
+
}), j = (s) => {
|
|
35
36
|
let e;
|
|
36
|
-
switch (
|
|
37
|
+
switch (s) {
|
|
37
38
|
case "menyetujui":
|
|
38
39
|
e = "success";
|
|
39
40
|
break;
|
|
@@ -44,73 +45,79 @@ const V = {
|
|
|
44
45
|
e = "warning";
|
|
45
46
|
}
|
|
46
47
|
return e;
|
|
47
|
-
}, f = (
|
|
48
|
+
}, f = (s) => u.useFormatDate ? s ? V(new Date(s), {
|
|
48
49
|
locale: "id-ID",
|
|
49
50
|
dateFormat: "dd M yyyy",
|
|
50
51
|
timeFormat: "HH:mm:ss"
|
|
51
|
-
}) : "-" :
|
|
52
|
-
return (
|
|
53
|
-
var
|
|
54
|
-
return
|
|
55
|
-
l("div",
|
|
56
|
-
|
|
52
|
+
}) : "-" : s;
|
|
53
|
+
return (s, e) => {
|
|
54
|
+
var c;
|
|
55
|
+
return t(), o(i, null, [
|
|
56
|
+
l("div", E, [
|
|
57
|
+
s.showShortInfo ? (t(), o(i, { key: 0 }, [
|
|
57
58
|
e[3] || (e[3] = l("span", null, "Approver:", -1)),
|
|
58
|
-
(
|
|
59
|
+
(c = s.approvals) != null && c.length ? (t(), o(i, { key: 0 }, [
|
|
59
60
|
m(A, {
|
|
60
61
|
class: "!text-general-200 !text-base",
|
|
61
62
|
icon: "user"
|
|
62
63
|
}),
|
|
63
|
-
l("span",
|
|
64
|
+
l("span", Z, r(d.value.name), 1),
|
|
64
65
|
l("span", H, r(f(d.value.date)), 1),
|
|
65
66
|
l("span", {
|
|
66
|
-
onClick: e[0] || (e[0] = (
|
|
67
|
+
onClick: e[0] || (e[0] = (a) => p.value = !0),
|
|
67
68
|
class: "text-primary-500 hover:cursor-pointer"
|
|
68
69
|
}, r(u.btnLabel ?? "more"), 1)
|
|
69
|
-
], 64)) : (
|
|
70
|
-
], 64)) : (
|
|
70
|
+
], 64)) : (t(), o("span", M, "-"))
|
|
71
|
+
], 64)) : (t(), o("span", {
|
|
71
72
|
key: 1,
|
|
72
|
-
onClick: e[1] || (e[1] = (
|
|
73
|
+
onClick: e[1] || (e[1] = (a) => p.value = !0),
|
|
73
74
|
class: "text-primary-500 hover:cursor-pointer"
|
|
74
|
-
}, r(
|
|
75
|
+
}, r(s.label ?? "Lihat Approval"), 1))
|
|
75
76
|
]),
|
|
76
77
|
m($, {
|
|
77
|
-
visible:
|
|
78
|
-
"onUpdate:visible": e[2] || (e[2] = (
|
|
78
|
+
visible: p.value,
|
|
79
|
+
"onUpdate:visible": e[2] || (e[2] = (a) => p.value = a),
|
|
79
80
|
class: "min-w-[400px]",
|
|
80
81
|
header: "List Approver",
|
|
81
82
|
modal: ""
|
|
82
83
|
}, {
|
|
83
84
|
default: I(() => [
|
|
84
85
|
l("div", S, [
|
|
85
|
-
(
|
|
86
|
-
key:
|
|
86
|
+
(t(!0), o(i, null, k(s.approvals, (a) => (t(), o(i, {
|
|
87
|
+
key: a._id
|
|
87
88
|
}, [
|
|
88
|
-
l("div",
|
|
89
|
-
l("span",
|
|
90
|
-
|
|
89
|
+
l("div", T, [
|
|
90
|
+
l("span", U, [
|
|
91
|
+
a.level === 0 && u.customLevelZeroLabel ? (t(), o(i, { key: 0 }, [
|
|
92
|
+
w(r(u.customLevelZeroLabel), 1)
|
|
93
|
+
], 64)) : (t(), o(i, { key: 1 }, [
|
|
94
|
+
w(" Level " + r(a.level) + " (" + r(a.type.toLowerCase()) + ") ", 1)
|
|
95
|
+
], 64))
|
|
96
|
+
]),
|
|
97
|
+
a.status !== "menunggu approval" ? (t(), g(L, {
|
|
91
98
|
key: 0,
|
|
92
99
|
label: "selesai",
|
|
93
100
|
severity: "success"
|
|
94
|
-
})) :
|
|
101
|
+
})) : h("", !0)
|
|
95
102
|
]),
|
|
96
|
-
(
|
|
103
|
+
(t(!0), o(i, null, k(a.approvers, (n) => (t(), o("div", {
|
|
97
104
|
key: n._id,
|
|
98
105
|
class: "flex justify-between"
|
|
99
106
|
}, [
|
|
100
|
-
l("div",
|
|
107
|
+
l("div", P, [
|
|
101
108
|
m(A, {
|
|
102
109
|
class: "!text-general-200 !text-base",
|
|
103
110
|
icon: "user"
|
|
104
111
|
}),
|
|
105
|
-
l("span",
|
|
112
|
+
l("span", R, r(n.fullName), 1)
|
|
106
113
|
]),
|
|
107
|
-
|
|
114
|
+
a.status !== "menunggu approval" && !n.action ? (t(), o("span", q, " Tidak terlibat ")) : (t(), o("div", z, [
|
|
108
115
|
l("span", G, r(n.actionAt ? f(n.actionAt) : "Menunggu approval..."), 1),
|
|
109
|
-
n.action ? (
|
|
116
|
+
n.action ? (t(), g(L, {
|
|
110
117
|
key: 0,
|
|
111
118
|
label: n.action,
|
|
112
119
|
severity: j(n.action)
|
|
113
|
-
}, null, 8, ["label", "severity"])) :
|
|
120
|
+
}, null, 8, ["label", "severity"])) : h("", !0)
|
|
114
121
|
]))
|
|
115
122
|
]))), 128))
|
|
116
123
|
], 64))), 128))
|