@pnkx-lib/ui 1.9.539 → 1.9.540
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/es/chunks/RefuseApprovalDropListIcon-DkyYANWt.js +192 -0
- package/es/chunks/table-Btvh90Co.js +50 -0
- package/es/constants/index.js +1 -51
- package/es/fields/Radio.js +3 -0
- package/es/index.js +8 -2
- package/es/ui/BulkActions/index.js +314 -0
- package/es/ui/Clock/index.js +67 -0
- package/es/ui/CustomeBulkActions/index.js +928 -0
- package/es/ui/ExportFile.js +12 -3
- package/es/ui/Table/index.js +404 -0
- package/es/ui/TableCategory/index.js +4784 -0
- package/es/ui/TableForm/index.js +213 -0
- package/es/ui/index.js +143 -6981
- package/package.json +1 -1
- package/types/components/fields/Radio.d.ts +1 -0
- package/types/components/ui/ExportFile.d.ts +2 -1
- package/types/ui/BulkActions/index.d.ts +2 -0
- package/types/ui/Clock/index.d.ts +2 -0
- package/types/ui/CustomeBulkActions/index.d.ts +6 -0
- package/types/ui/Table/index.d.ts +2 -0
- package/types/ui/TableCategory/index.d.ts +2 -0
- package/types/ui/TableForm/index.d.ts +2 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
const RestoreIcon = ({ stroke, fill }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 22, fill: "none", children: /* @__PURE__ */ jsx(
|
|
4
|
+
"path",
|
|
5
|
+
{
|
|
6
|
+
stroke,
|
|
7
|
+
fill,
|
|
8
|
+
strokeLinecap: "round",
|
|
9
|
+
strokeLinejoin: "round",
|
|
10
|
+
strokeWidth: 1.5,
|
|
11
|
+
d: "M3.405 6.611a8.824 8.824 0 0 1 7.64-4.388c3.701 0 6.87 2.269 8.179 5.486m-13.14 0h-4.41V3.32m16.92 12.069a8.824 8.824 0 0 1-7.64 4.388 8.822 8.822 0 0 1-8.178-5.486m13.14 0h4.41v4.389"
|
|
12
|
+
}
|
|
13
|
+
) });
|
|
14
|
+
|
|
15
|
+
const SendApprovalIcon = ({ stroke, fill }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 22, fill: "none", children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
fill,
|
|
19
|
+
stroke,
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeWidth: 1.714,
|
|
22
|
+
d: "M6.44 11h4.45m-4.584-.521L2.912 4.37c-.513-.922.474-1.953 1.419-1.481l14.304 7.15a1.073 1.073 0 0 1 0 1.92L4.33 19.11c-.945.472-1.932-.559-1.42-1.482l3.395-6.107c.18-.324.18-.718 0-1.042Z"
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
25
|
+
|
|
26
|
+
const CancelSendApprovalIcon = ({ fill, stroke }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 22, fill: "none", children: /* @__PURE__ */ jsx(
|
|
27
|
+
"path",
|
|
28
|
+
{
|
|
29
|
+
fill,
|
|
30
|
+
stroke,
|
|
31
|
+
strokeLinecap: "round",
|
|
32
|
+
strokeWidth: 1.5,
|
|
33
|
+
d: "M12.829 7.343 9.17 14.657M20.143 11a9.143 9.143 0 1 1-18.286 0 9.143 9.143 0 0 1 18.286 0Z"
|
|
34
|
+
}
|
|
35
|
+
) });
|
|
36
|
+
|
|
37
|
+
const ApprovalIcon = ({ stroke, fill }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 22, fill: "none", children: /* @__PURE__ */ jsx(
|
|
38
|
+
"path",
|
|
39
|
+
{
|
|
40
|
+
fill,
|
|
41
|
+
stroke,
|
|
42
|
+
strokeLinecap: "round",
|
|
43
|
+
strokeWidth: 1.714,
|
|
44
|
+
d: "m15.33 6.429-8.667 8.89a.827.827 0 0 1-1.19 0L1.856 11.61m9.618 3.707 8.668-8.89"
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
|
|
48
|
+
const CancelApprovalIcon = ({ stroke, fill }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 22, fill: "none", children: /* @__PURE__ */ jsx(
|
|
49
|
+
"path",
|
|
50
|
+
{
|
|
51
|
+
fill,
|
|
52
|
+
stroke,
|
|
53
|
+
strokeLinecap: "round",
|
|
54
|
+
strokeWidth: 1.5,
|
|
55
|
+
d: "M13.743 8.257 11 11m0 0-2.743 2.743M11 11l2.743 2.743M11 11 8.257 8.257M20.143 11a9.143 9.143 0 1 1-18.286 0 9.143 9.143 0 0 1 18.286 0Z"
|
|
56
|
+
}
|
|
57
|
+
) });
|
|
58
|
+
|
|
59
|
+
const RefuseApprovalIcon = ({ stroke, fill }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 22, fill: "none", children: [
|
|
60
|
+
/* @__PURE__ */ jsx("mask", { id: "a", fill: "#fff", children: /* @__PURE__ */ jsx("path", { d: "M11 2.086A8.914 8.914 0 1 0 19.914 11 8.924 8.924 0 0 0 11 2.086ZM18.543 11a7.505 7.505 0 0 1-1.75 4.824L6.176 5.206A7.543 7.543 0 0 1 18.543 11ZM3.457 11a7.505 7.505 0 0 1 1.75-4.824l10.617 10.618A7.544 7.544 0 0 1 3.457 11Z" }) }),
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
"path",
|
|
63
|
+
{
|
|
64
|
+
fill: "#fff",
|
|
65
|
+
d: "M11 2.086A8.914 8.914 0 1 0 19.914 11 8.924 8.924 0 0 0 11 2.086ZM18.543 11a7.505 7.505 0 0 1-1.75 4.824L6.176 5.206A7.543 7.543 0 0 1 18.543 11ZM3.457 11a7.505 7.505 0 0 1 1.75-4.824l10.617 10.618A7.544 7.544 0 0 1 3.457 11Z"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
"path",
|
|
70
|
+
{
|
|
71
|
+
fill,
|
|
72
|
+
stroke,
|
|
73
|
+
d: "m11 2.086.002-1.714H11v1.714ZM19.914 11h1.715v-.002L19.914 11Zm-1.371 0-1.714.001h1.714Zm-1.75 4.824-1.212 1.212 1.325 1.325 1.202-1.437-1.315-1.1ZM6.176 5.206 5.08 3.888 3.635 5.089l1.329 1.329 1.212-1.212ZM3.457 11h1.714v-.002L3.457 11Zm1.75-4.824 1.212-1.212-1.325-1.325-1.202 1.437 1.315 1.1Zm10.617 10.618 1.096 1.318 1.445-1.201-1.329-1.329-1.212 1.212ZM11 2.086V.372c-2.102 0-4.157.623-5.905 1.79l.952 1.426L7 5.014A7.2 7.2 0 0 1 11 3.8V2.086ZM6.047 3.588l-.952-1.425a10.629 10.629 0 0 0-3.915 4.77l1.584.656 1.584.656A7.2 7.2 0 0 1 7 5.014l-.953-1.426Zm-3.283 4L1.18 6.934a10.629 10.629 0 0 0-.604 6.14l1.681-.334 1.681-.334a7.2 7.2 0 0 1 .41-4.16l-1.584-.656Zm-.507 5.151-1.681.335a10.628 10.628 0 0 0 2.908 5.442l1.213-1.212 1.212-1.213a7.2 7.2 0 0 1-1.97-3.686l-1.682.334Zm2.44 4.564-1.213 1.213a10.628 10.628 0 0 0 5.442 2.908l.335-1.68.334-1.682a7.201 7.201 0 0 1-3.686-1.97l-1.212 1.212Zm4.564 2.44-.335 1.681c2.062.41 4.2.2 6.141-.604l-.656-1.584-.656-1.584a7.2 7.2 0 0 1-4.16.41l-.334 1.681Zm5.15-.507.656 1.584a10.628 10.628 0 0 0 4.77-3.915l-1.425-.952L16.987 15a7.2 7.2 0 0 1-3.232 2.652l.656 1.584Zm4-3.283 1.426.952A10.628 10.628 0 0 0 21.63 11H18.2a7.2 7.2 0 0 1-1.213 4l1.425.953ZM19.915 11l1.715-.002a10.638 10.638 0 0 0-3.116-7.51L17.3 4.7l-1.213 1.212a7.21 7.21 0 0 1 2.112 5.09L19.914 11Zm-2.613-6.3 1.212-1.213A10.638 10.638 0 0 0 11.002.372L11 2.086 10.998 3.8a7.21 7.21 0 0 1 5.09 2.112L17.301 4.7Zm1.242 6.3-1.714.002a5.79 5.79 0 0 1-1.35 3.722l1.314 1.1 1.315 1.1a9.22 9.22 0 0 0 2.15-5.926L18.542 11Zm-1.75 4.824 1.213-1.212L7.388 3.994 6.176 5.206 4.964 6.418 15.58 17.036l1.212-1.212ZM6.176 5.206l1.096 1.318a5.828 5.828 0 0 1 2.985-1.3l-.219-1.7-.219-1.701a9.257 9.257 0 0 0-4.74 2.065l1.097 1.318Zm3.862-1.683.219 1.7a5.828 5.828 0 0 1 3.216.503l.727-1.552.728-1.552a9.257 9.257 0 0 0-5.109-.8l.22 1.701Zm4.162.651-.727 1.552a5.829 5.829 0 0 1 2.445 2.15l1.446-.92 1.447-.92a9.257 9.257 0 0 0-3.883-3.414L14.2 4.174Zm3.164 2.782-1.446.92c.594.934.91 2.018.91 3.125h1.715l1.714-.002a9.257 9.257 0 0 0-1.447-4.964l-1.446.92ZM3.457 11l1.714-.002a5.79 5.79 0 0 1 1.35-3.722l-1.314-1.1-1.315-1.1a9.22 9.22 0 0 0-2.15 5.926L3.458 11Zm1.75-4.824L3.994 7.388l10.618 10.618 1.212-1.212 1.212-1.212L6.42 4.964 5.207 6.176Zm10.617 10.618-1.096-1.318a5.828 5.828 0 0 1-2.985 1.3l.219 1.701.219 1.7a9.257 9.257 0 0 0 4.74-2.065l-1.097-1.318Zm-3.862 1.683-.219-1.7a5.829 5.829 0 0 1-3.216-.503L7.8 17.826l-.728 1.552a9.257 9.257 0 0 0 5.109.8l-.22-1.7Zm-4.162-.65.727-1.553a5.83 5.83 0 0 1-2.445-2.15l-1.446.92-1.447.92a9.257 9.257 0 0 0 3.883 3.414l.728-1.552Zm-3.164-2.782 1.446-.92a5.829 5.829 0 0 1-.91-3.126L3.456 11l-1.714.001a9.257 9.257 0 0 0 1.446 4.964l1.447-.92Z",
|
|
74
|
+
mask: "url(#a)"
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] });
|
|
78
|
+
|
|
79
|
+
const ActivateIcon = ({ stroke, fill }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 22, height: 22, fill: "none", children: /* @__PURE__ */ jsx(
|
|
80
|
+
"path",
|
|
81
|
+
{
|
|
82
|
+
fill,
|
|
83
|
+
stroke,
|
|
84
|
+
strokeLinecap: "round",
|
|
85
|
+
strokeWidth: 1.714,
|
|
86
|
+
d: "M14.657 8.257V6.43a3.657 3.657 0 0 0-6.076-2.743M7.526 19.229h6.948c1.024 0 1.536 0 1.927-.2.345-.175.624-.455.8-.799.199-.391.199-.903.199-1.927v-5.12c0-1.024 0-1.536-.2-1.928a1.83 1.83 0 0 0-.799-.799c-.39-.199-.903-.199-1.927-.199H7.526c-1.025 0-1.537 0-1.928.2a1.829 1.829 0 0 0-.799.798c-.2.392-.2.904-.2 1.928v5.12c0 1.024 0 1.536.2 1.927.175.344.455.624.8.8.39.198.902.198 1.927.198Z"
|
|
87
|
+
}
|
|
88
|
+
) });
|
|
89
|
+
|
|
90
|
+
const DeleteIcon = ({ stroke, fill = "#DD4338" }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 23, height: 24, fill: "none", children: /* @__PURE__ */ jsx(
|
|
91
|
+
"path",
|
|
92
|
+
{
|
|
93
|
+
fill,
|
|
94
|
+
stroke,
|
|
95
|
+
d: "m18.219 17.634.75.006-.75-.006ZM4.319 5.65a.75.75 0 1 0 0 1.5v-1.5Zm14.934 1.5a.75.75 0 0 0 0-1.5v1.5Zm-8.584 2.984a.75.75 0 1 0-1.5 0h1.5ZM9.17 17.6a.75.75 0 0 0 1.5 0h-1.5Zm5.234-7.466a.75.75 0 1 0-1.5 0h1.5Zm-1.5 7.466a.75.75 0 0 0 1.5 0h-1.5Zm5.416-11.2-.75-.006-.1 11.233.75.007.75.006.1-11.233-.75-.007Zm-3.833 14.934v-.75h-5.5v1.5h5.5v-.75ZM5.253 6.4h-.75v11.2h1.5V6.4h-.75Zm-.934 0v.75h.934v-1.5h-.934v.75Zm.934 0v.75h2.8v-1.5h-2.8v.75Zm2.8 0v.75h7.466v-1.5H8.053v.75Zm7.466 0v.75h2.8v-1.5h-2.8v.75Zm2.8 0v.75h.934v-1.5h-.934v.75ZM8.053 5.985h.75c0-1.338 1.25-2.568 2.983-2.568v-1.5c-2.39 0-4.483 1.74-4.483 4.068h.75Zm3.733-3.318v.75c1.733 0 2.983 1.23 2.983 2.568h1.5c0-2.327-2.092-4.068-4.483-4.068v.75ZM8.053 5.985h-.75V6.4h1.5v-.415h-.75Zm7.466 0h-.75V6.4h1.5v-.415h-.75ZM8.986 21.334v-.75A2.983 2.983 0 0 1 6.003 17.6h-1.5a4.483 4.483 0 0 0 4.483 4.484v-.75Zm9.233-3.7-.75-.007a2.983 2.983 0 0 1-2.983 2.957v1.5a4.483 4.483 0 0 0 4.483-4.444l-.75-.006Zm-8.3-7.5h-.75V17.6h1.5v-7.466h-.75Zm3.734 0h-.75V17.6h1.5v-7.466h-.75Z"
|
|
96
|
+
}
|
|
97
|
+
) });
|
|
98
|
+
|
|
99
|
+
const InActiveIcon = ({ stroke, fill }) => /* @__PURE__ */ jsx(
|
|
100
|
+
"svg",
|
|
101
|
+
{
|
|
102
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
+
width: 22,
|
|
104
|
+
height: 22,
|
|
105
|
+
fill: "none",
|
|
106
|
+
children: /* @__PURE__ */ jsx(
|
|
107
|
+
"path",
|
|
108
|
+
{
|
|
109
|
+
fill,
|
|
110
|
+
stroke,
|
|
111
|
+
strokeLinecap: "round",
|
|
112
|
+
strokeWidth: 1.714,
|
|
113
|
+
d: "M7.343 8.257V6.43a3.657 3.657 0 0 1 7.314 0v1.828M7.526 19.23h6.948c1.024 0 1.536 0 1.927-.2.345-.175.624-.455.8-.799.199-.391.199-.903.199-1.927v-5.12c0-1.024 0-1.536-.2-1.928a1.83 1.83 0 0 0-.799-.799c-.39-.199-.903-.199-1.927-.199H7.526c-1.025 0-1.537 0-1.928.2a1.829 1.829 0 0 0-.799.798c-.2.392-.2.904-.2 1.928v5.12c0 1.024 0 1.536.2 1.927.175.344.455.624.8.8.39.198.902.198 1.927.198Z"
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const MoreIcon = ({ stroke, fill }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 18, height: 18, fill: "none", children: /* @__PURE__ */ jsx(
|
|
120
|
+
"path",
|
|
121
|
+
{
|
|
122
|
+
fill,
|
|
123
|
+
stroke,
|
|
124
|
+
fillRule: "evenodd",
|
|
125
|
+
d: "M4 8h2v2H4V8Zm4 0h2v2H8V8Zm4 0h2v2h-2V8Z",
|
|
126
|
+
clipRule: "evenodd"
|
|
127
|
+
}
|
|
128
|
+
) });
|
|
129
|
+
|
|
130
|
+
const RefuseApprovalDropListIcon = ({
|
|
131
|
+
size = 22,
|
|
132
|
+
color = "currentColor",
|
|
133
|
+
className,
|
|
134
|
+
style,
|
|
135
|
+
onClick,
|
|
136
|
+
"aria-label": ariaLabel,
|
|
137
|
+
title,
|
|
138
|
+
stroke,
|
|
139
|
+
...props
|
|
140
|
+
}) => /* @__PURE__ */ jsx(
|
|
141
|
+
"div",
|
|
142
|
+
{
|
|
143
|
+
className,
|
|
144
|
+
style: {
|
|
145
|
+
width: size,
|
|
146
|
+
height: size,
|
|
147
|
+
cursor: onClick ? "pointer" : "default",
|
|
148
|
+
...style
|
|
149
|
+
},
|
|
150
|
+
onClick,
|
|
151
|
+
role: onClick ? "button" : void 0,
|
|
152
|
+
"aria-label": ariaLabel,
|
|
153
|
+
title,
|
|
154
|
+
...props,
|
|
155
|
+
children: /* @__PURE__ */ jsxs(
|
|
156
|
+
"svg",
|
|
157
|
+
{
|
|
158
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
159
|
+
width: "100%",
|
|
160
|
+
height: "100%",
|
|
161
|
+
viewBox: "0 0 22 22",
|
|
162
|
+
fill: "none",
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ jsx(
|
|
165
|
+
"path",
|
|
166
|
+
{
|
|
167
|
+
d: "M11 20.1663C16.06 20.1663 20.1666 16.0597 20.1666 10.9997C20.1666 5.93967 16.06 1.83301 11 1.83301C5.93998 1.83301 1.83331 5.93967 1.83331 10.9997C1.83331 16.0597 5.93998 20.1663 11 20.1663Z",
|
|
168
|
+
stroke: stroke || "#292D32",
|
|
169
|
+
strokeWidth: "1.5",
|
|
170
|
+
"stroke-miterlimit": "10",
|
|
171
|
+
strokeLinecap: "round",
|
|
172
|
+
"stroke-linejoin": "round"
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ jsx(
|
|
176
|
+
"path",
|
|
177
|
+
{
|
|
178
|
+
d: "M17.3249 4.58301L4.49158 17.4163",
|
|
179
|
+
stroke: stroke || "#292D32",
|
|
180
|
+
strokeWidth: "1.5",
|
|
181
|
+
"stroke-miterlimit": "10",
|
|
182
|
+
strokeLinecap: "round",
|
|
183
|
+
"stroke-linejoin": "round"
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
export { ApprovalIcon as A, CancelSendApprovalIcon as C, DeleteIcon as D, InActiveIcon as I, MoreIcon as M, RestoreIcon as R, SendApprovalIcon as S, RefuseApprovalIcon as a, RefuseApprovalDropListIcon as b, CancelApprovalIcon as c, ActivateIcon as d };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const START_PAGE = 1;
|
|
2
|
+
const START_PAGE_SIZE = 10;
|
|
3
|
+
const PAGE_NUMBER = "page";
|
|
4
|
+
const PAGE_SIZE = "size";
|
|
5
|
+
const SORT = "sort";
|
|
6
|
+
var TypeActionRowTable = /* @__PURE__ */ ((TypeActionRowTable2) => {
|
|
7
|
+
TypeActionRowTable2["DELETE"] = "DELETE";
|
|
8
|
+
TypeActionRowTable2["EDIT"] = "EDIT";
|
|
9
|
+
TypeActionRowTable2["UNDO"] = "UNDO";
|
|
10
|
+
TypeActionRowTable2["CANCELUNDO"] = "CANCELUNDO";
|
|
11
|
+
TypeActionRowTable2["CHECKIN"] = "CHECKIN";
|
|
12
|
+
TypeActionRowTable2["PRINT"] = "PRINT";
|
|
13
|
+
TypeActionRowTable2["PAYMENT"] = "PAYMENT";
|
|
14
|
+
TypeActionRowTable2["PLAY"] = "PLAY";
|
|
15
|
+
TypeActionRowTable2["PAUSE"] = "PAUSE";
|
|
16
|
+
TypeActionRowTable2["DOWNLOAD"] = "DOWNLOAD";
|
|
17
|
+
TypeActionRowTable2["VIEW"] = "VIEW";
|
|
18
|
+
TypeActionRowTable2["EDIT_FORM"] = "EDIT_FORM";
|
|
19
|
+
TypeActionRowTable2["SWAP"] = "SWAP";
|
|
20
|
+
return TypeActionRowTable2;
|
|
21
|
+
})(TypeActionRowTable || {});
|
|
22
|
+
var TypeBulkActions = /* @__PURE__ */ ((TypeBulkActions2) => {
|
|
23
|
+
TypeBulkActions2["BULKACTION"] = "bulkaction";
|
|
24
|
+
TypeBulkActions2["DROPLIST"] = "droplist";
|
|
25
|
+
return TypeBulkActions2;
|
|
26
|
+
})(TypeBulkActions || {});
|
|
27
|
+
var TypeCategoryBulkActions = /* @__PURE__ */ ((TypeCategoryBulkActions2) => {
|
|
28
|
+
TypeCategoryBulkActions2[TypeCategoryBulkActions2["CATEGORY"] = 0] = "CATEGORY";
|
|
29
|
+
TypeCategoryBulkActions2[TypeCategoryBulkActions2["PRICE_SERVICE"] = 1] = "PRICE_SERVICE";
|
|
30
|
+
return TypeCategoryBulkActions2;
|
|
31
|
+
})(TypeCategoryBulkActions || {});
|
|
32
|
+
var TypeStatusTable = /* @__PURE__ */ ((TypeStatusTable2) => {
|
|
33
|
+
TypeStatusTable2["ALL"] = "ALL";
|
|
34
|
+
TypeStatusTable2[TypeStatusTable2["DRAFT"] = 0] = "DRAFT";
|
|
35
|
+
TypeStatusTable2[TypeStatusTable2["WAITING_APPROVAL"] = 1] = "WAITING_APPROVAL";
|
|
36
|
+
TypeStatusTable2[TypeStatusTable2["ACTIVE"] = 2] = "ACTIVE";
|
|
37
|
+
TypeStatusTable2[TypeStatusTable2["INACTIVE"] = 3] = "INACTIVE";
|
|
38
|
+
TypeStatusTable2[TypeStatusTable2["REJECTED"] = 4] = "REJECTED";
|
|
39
|
+
TypeStatusTable2[TypeStatusTable2["DELETED"] = 5] = "DELETED";
|
|
40
|
+
return TypeStatusTable2;
|
|
41
|
+
})(TypeStatusTable || {});
|
|
42
|
+
const ListStatusApproved = [
|
|
43
|
+
"ALL" /* ALL */,
|
|
44
|
+
2 /* ACTIVE */,
|
|
45
|
+
3 /* INACTIVE */,
|
|
46
|
+
5 /* DELETED */
|
|
47
|
+
];
|
|
48
|
+
const RemoveIconColor = "#DD4338";
|
|
49
|
+
|
|
50
|
+
export { ListStatusApproved as L, PAGE_NUMBER as P, RemoveIconColor as R, START_PAGE as S, TypeActionRowTable as T, START_PAGE_SIZE as a, PAGE_SIZE as b, SORT as c, TypeBulkActions as d, TypeCategoryBulkActions as e, TypeStatusTable as f };
|
package/es/constants/index.js
CHANGED
|
@@ -1,52 +1,2 @@
|
|
|
1
1
|
export { I as ID_TABLE_WRAPPER, a as MAX_TAG_COUNT, M as MAX_TAG_TEXT_LENGTH, T as TINY_API } from '../chunks/common-BcURBmQ-.js';
|
|
2
|
-
|
|
3
|
-
const START_PAGE = 1;
|
|
4
|
-
const START_PAGE_SIZE = 10;
|
|
5
|
-
const PAGE_NUMBER = "page";
|
|
6
|
-
const PAGE_SIZE = "size";
|
|
7
|
-
const SORT = "sort";
|
|
8
|
-
var TypeActionRowTable = /* @__PURE__ */ ((TypeActionRowTable2) => {
|
|
9
|
-
TypeActionRowTable2["DELETE"] = "DELETE";
|
|
10
|
-
TypeActionRowTable2["EDIT"] = "EDIT";
|
|
11
|
-
TypeActionRowTable2["UNDO"] = "UNDO";
|
|
12
|
-
TypeActionRowTable2["CANCELUNDO"] = "CANCELUNDO";
|
|
13
|
-
TypeActionRowTable2["CHECKIN"] = "CHECKIN";
|
|
14
|
-
TypeActionRowTable2["PRINT"] = "PRINT";
|
|
15
|
-
TypeActionRowTable2["PAYMENT"] = "PAYMENT";
|
|
16
|
-
TypeActionRowTable2["PLAY"] = "PLAY";
|
|
17
|
-
TypeActionRowTable2["PAUSE"] = "PAUSE";
|
|
18
|
-
TypeActionRowTable2["DOWNLOAD"] = "DOWNLOAD";
|
|
19
|
-
TypeActionRowTable2["VIEW"] = "VIEW";
|
|
20
|
-
TypeActionRowTable2["EDIT_FORM"] = "EDIT_FORM";
|
|
21
|
-
TypeActionRowTable2["SWAP"] = "SWAP";
|
|
22
|
-
return TypeActionRowTable2;
|
|
23
|
-
})(TypeActionRowTable || {});
|
|
24
|
-
var TypeBulkActions = /* @__PURE__ */ ((TypeBulkActions2) => {
|
|
25
|
-
TypeBulkActions2["BULKACTION"] = "bulkaction";
|
|
26
|
-
TypeBulkActions2["DROPLIST"] = "droplist";
|
|
27
|
-
return TypeBulkActions2;
|
|
28
|
-
})(TypeBulkActions || {});
|
|
29
|
-
var TypeCategoryBulkActions = /* @__PURE__ */ ((TypeCategoryBulkActions2) => {
|
|
30
|
-
TypeCategoryBulkActions2[TypeCategoryBulkActions2["CATEGORY"] = 0] = "CATEGORY";
|
|
31
|
-
TypeCategoryBulkActions2[TypeCategoryBulkActions2["PRICE_SERVICE"] = 1] = "PRICE_SERVICE";
|
|
32
|
-
return TypeCategoryBulkActions2;
|
|
33
|
-
})(TypeCategoryBulkActions || {});
|
|
34
|
-
var TypeStatusTable = /* @__PURE__ */ ((TypeStatusTable2) => {
|
|
35
|
-
TypeStatusTable2["ALL"] = "ALL";
|
|
36
|
-
TypeStatusTable2[TypeStatusTable2["DRAFT"] = 0] = "DRAFT";
|
|
37
|
-
TypeStatusTable2[TypeStatusTable2["WAITING_APPROVAL"] = 1] = "WAITING_APPROVAL";
|
|
38
|
-
TypeStatusTable2[TypeStatusTable2["ACTIVE"] = 2] = "ACTIVE";
|
|
39
|
-
TypeStatusTable2[TypeStatusTable2["INACTIVE"] = 3] = "INACTIVE";
|
|
40
|
-
TypeStatusTable2[TypeStatusTable2["REJECTED"] = 4] = "REJECTED";
|
|
41
|
-
TypeStatusTable2[TypeStatusTable2["DELETED"] = 5] = "DELETED";
|
|
42
|
-
return TypeStatusTable2;
|
|
43
|
-
})(TypeStatusTable || {});
|
|
44
|
-
const ListStatusApproved = [
|
|
45
|
-
"ALL" /* ALL */,
|
|
46
|
-
2 /* ACTIVE */,
|
|
47
|
-
3 /* INACTIVE */,
|
|
48
|
-
5 /* DELETED */
|
|
49
|
-
];
|
|
50
|
-
const RemoveIconColor = "#DD4338";
|
|
51
|
-
|
|
52
|
-
export { ListStatusApproved, PAGE_NUMBER, PAGE_SIZE, RemoveIconColor, SORT, START_PAGE, START_PAGE_SIZE, TypeActionRowTable, TypeBulkActions, TypeCategoryBulkActions, TypeStatusTable };
|
|
2
|
+
export { L as ListStatusApproved, P as PAGE_NUMBER, b as PAGE_SIZE, R as RemoveIconColor, c as SORT, S as START_PAGE, a as START_PAGE_SIZE, T as TypeActionRowTable, d as TypeBulkActions, e as TypeCategoryBulkActions, f as TypeStatusTable } from '../chunks/table-Btvh90Co.js';
|
package/es/fields/Radio.js
CHANGED
|
@@ -13,6 +13,8 @@ const RadioGroup = (props) => {
|
|
|
13
13
|
customStyleWrap = "",
|
|
14
14
|
afterOnChange,
|
|
15
15
|
options,
|
|
16
|
+
disabled: groupDisabled = false,
|
|
17
|
+
// disabled hoặc không disabled cả 2 nút
|
|
16
18
|
...restProps
|
|
17
19
|
} = props;
|
|
18
20
|
const { name, value, onChange } = field || {};
|
|
@@ -42,6 +44,7 @@ const RadioGroup = (props) => {
|
|
|
42
44
|
{
|
|
43
45
|
value: item.value,
|
|
44
46
|
className: customStyleRadio,
|
|
47
|
+
disabled: groupDisabled || item.disabled,
|
|
45
48
|
children: /* @__PURE__ */ jsxs(Typography.Text, { children: [
|
|
46
49
|
" ",
|
|
47
50
|
item.label
|
package/es/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { FloatButton } from './ui/FloatButton.js';
|
|
|
3
3
|
export { CascaderField } from './ui/Cascader.js';
|
|
4
4
|
export { ErrorMessage } from './ui/ErrorMessage.js';
|
|
5
5
|
export { Typography } from './ui/Typography.js';
|
|
6
|
-
export {
|
|
6
|
+
export { Table } from './ui/Table/index.js';
|
|
7
7
|
export { Modal } from './ui/Modal.js';
|
|
8
8
|
export { Tooltip } from './ui/Tooltip.js';
|
|
9
9
|
export { Tabs } from './ui/Tabs.js';
|
|
@@ -50,8 +50,10 @@ export { Image } from './ui/Image.js';
|
|
|
50
50
|
export { ConfirmModal } from './ui/ConfirmModal.js';
|
|
51
51
|
export { ErrorBoundary } from './ui/ErrorBoundary.js';
|
|
52
52
|
export { CATEGORY_LIST_ENUM, CATEGORY_PRICE_LIST_ENUM, COUNT_LEVEL, CategoryStatus, badgeStatusCategoryConfig } from './ui/CategoryStatus.js';
|
|
53
|
+
export { ActionRowTable } from './ui/index.js';
|
|
53
54
|
export { I as ID_TABLE_WRAPPER, a as MAX_TAG_COUNT, M as MAX_TAG_TEXT_LENGTH, T as TINY_API } from './chunks/common-BcURBmQ-.js';
|
|
54
|
-
export { ListStatusApproved, PAGE_NUMBER, PAGE_SIZE, RemoveIconColor, SORT, START_PAGE, START_PAGE_SIZE, TypeActionRowTable, TypeBulkActions, TypeCategoryBulkActions, TypeStatusTable } from './
|
|
55
|
+
export { L as ListStatusApproved, P as PAGE_NUMBER, b as PAGE_SIZE, R as RemoveIconColor, c as SORT, S as START_PAGE, a as START_PAGE_SIZE, T as TypeActionRowTable, d as TypeBulkActions, e as TypeCategoryBulkActions, f as TypeStatusTable } from './chunks/table-Btvh90Co.js';
|
|
56
|
+
export { BulkActions } from './ui/BulkActions/index.js';
|
|
55
57
|
export { BreadcrumbHeading } from './ui/BreadcrumbHeading.js';
|
|
56
58
|
export { Card } from './ui/Card.js';
|
|
57
59
|
export { ConfigProvider } from './ui/ConfigProvider.js';
|
|
@@ -67,7 +69,11 @@ export { Sidebar } from './ui/Sidebar/index.js';
|
|
|
67
69
|
export { SelectTable } from './ui/SelectTable.js';
|
|
68
70
|
export { SelectSingleTable } from './ui/SelectSingleTable.js';
|
|
69
71
|
export { GenericUploadModal } from './ui/GenericUploadModal.js';
|
|
72
|
+
export { TableCategory } from './ui/TableCategory/index.js';
|
|
73
|
+
export { TableForm } from './ui/TableForm/index.js';
|
|
70
74
|
export { Descriptions } from './ui/Descriptions.js';
|
|
75
|
+
export { CustomeBulkActions } from './ui/CustomeBulkActions/index.js';
|
|
76
|
+
export { Clock } from './ui/Clock/index.js';
|
|
71
77
|
export { Input } from './fields/Input.js';
|
|
72
78
|
export { PnkxField } from './fields/PnkxField.js';
|
|
73
79
|
export { Select } from './fields/Select.js';
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Tooltip } from '../Tooltip.js';
|
|
4
|
+
import { isEmpty, isBoolean } from 'lodash';
|
|
5
|
+
import { ConfirmModal } from '../ConfirmModal.js';
|
|
6
|
+
import { useToggle } from '@pnkx-lib/core';
|
|
7
|
+
import { CATEGORY_LIST_ENUM } from '../CategoryStatus.js';
|
|
8
|
+
import { t as twMerge } from '../../chunks/bundle-mjs-BME7zF0Z.js';
|
|
9
|
+
import { Popover } from '../Popover.js';
|
|
10
|
+
import { Tooltip as Tooltip$1 } from 'antd';
|
|
11
|
+
import { M as MoreIcon, R as RestoreIcon, S as SendApprovalIcon, C as CancelSendApprovalIcon, a as RefuseApprovalIcon, b as RefuseApprovalDropListIcon, A as ApprovalIcon, c as CancelApprovalIcon, D as DeleteIcon, d as ActivateIcon, I as InActiveIcon } from '../../chunks/RefuseApprovalDropListIcon-DkyYANWt.js';
|
|
12
|
+
import { d as TypeBulkActions } from '../../chunks/table-Btvh90Co.js';
|
|
13
|
+
|
|
14
|
+
const BulkAction = ({
|
|
15
|
+
quantity = 0,
|
|
16
|
+
listIcon,
|
|
17
|
+
status,
|
|
18
|
+
setNotifyContent,
|
|
19
|
+
toggle
|
|
20
|
+
}) => {
|
|
21
|
+
//! State
|
|
22
|
+
//! Function
|
|
23
|
+
const IsShow = (arrStatus) => {
|
|
24
|
+
return arrStatus.includes(status);
|
|
25
|
+
};
|
|
26
|
+
//! Render
|
|
27
|
+
return /* @__PURE__ */ jsx("div", { className: "w-full flex justify-center items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-[10px] py-3 bg-[#2561ED] rounded-lg w-fit", children: [
|
|
28
|
+
/* @__PURE__ */ jsxs("div", { className: "text-white px-3", children: [
|
|
29
|
+
"Đã chọn: ",
|
|
30
|
+
quantity
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ jsx("div", { className: "h-5 border-l border-white mx-1" }),
|
|
33
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center space-x-3", children: !isEmpty(listIcon) && listIcon?.map(
|
|
34
|
+
(item, index) => IsShow(item?.arrShow) && /* @__PURE__ */ jsx(Tooltip, { title: item?.name, children: /* @__PURE__ */ jsx(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
className: "p-1 rounded-sm transition duration-200 cursor-pointer hover:bg-[#1B4ACB] hover:rounded-sm",
|
|
38
|
+
onClick: () => {
|
|
39
|
+
toggle();
|
|
40
|
+
setNotifyContent({
|
|
41
|
+
title: item?.title || "",
|
|
42
|
+
content: item?.content || "",
|
|
43
|
+
typeIcon: item?.typeIcon,
|
|
44
|
+
handleCancel: () => {
|
|
45
|
+
toggle();
|
|
46
|
+
},
|
|
47
|
+
handleSubmit: () => {
|
|
48
|
+
if (item?.action) {
|
|
49
|
+
item?.action();
|
|
50
|
+
}
|
|
51
|
+
toggle();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
children: item.icon
|
|
56
|
+
},
|
|
57
|
+
index
|
|
58
|
+
) })
|
|
59
|
+
) })
|
|
60
|
+
] }) });
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const DropListActions = ({
|
|
64
|
+
listIcon,
|
|
65
|
+
status,
|
|
66
|
+
setNotifyContent,
|
|
67
|
+
toggle,
|
|
68
|
+
contentDropList
|
|
69
|
+
}) => {
|
|
70
|
+
//! State
|
|
71
|
+
//! Function
|
|
72
|
+
const IsShow = (arrStatus) => {
|
|
73
|
+
return arrStatus.includes(status);
|
|
74
|
+
};
|
|
75
|
+
const renderContentPopover = () => {
|
|
76
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: !isEmpty(listIcon) && listIcon?.map(
|
|
77
|
+
(item, index) => item?.showTitle && IsShow(item?.arrShow) && /* @__PURE__ */ jsxs(
|
|
78
|
+
"button",
|
|
79
|
+
{
|
|
80
|
+
className: twMerge(
|
|
81
|
+
"flex gap-4 px-3 py-2 rounded-sm transition duration-200 hover:rounded-sm",
|
|
82
|
+
IsShow(item?.arrShow) ? "hover:bg-[#F5F6F7] cursor-pointer" : "text-[#B2B7C2] cursor-not-allowed"
|
|
83
|
+
),
|
|
84
|
+
disabled: IsShow(item?.arrShow) ? false : true,
|
|
85
|
+
onClick: () => {
|
|
86
|
+
toggle();
|
|
87
|
+
setNotifyContent({
|
|
88
|
+
title: item?.title || "",
|
|
89
|
+
content: item?.content || "",
|
|
90
|
+
typeIcon: item?.typeIcon,
|
|
91
|
+
handleCancel: () => {
|
|
92
|
+
toggle();
|
|
93
|
+
},
|
|
94
|
+
handleSubmit: () => {
|
|
95
|
+
if (item?.action) {
|
|
96
|
+
item?.action();
|
|
97
|
+
}
|
|
98
|
+
toggle();
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
children: [
|
|
103
|
+
item.iconDropList,
|
|
104
|
+
/* @__PURE__ */ jsx("span", { children: item.name || "" })
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
index
|
|
108
|
+
)
|
|
109
|
+
) });
|
|
110
|
+
};
|
|
111
|
+
//! Render
|
|
112
|
+
return /* @__PURE__ */ jsx("div", { className: "w-full flex justify-center items-center", children: /* @__PURE__ */ jsx(Tooltip$1, { title: "Thao tác khác", children: /* @__PURE__ */ jsx(
|
|
113
|
+
Popover,
|
|
114
|
+
{
|
|
115
|
+
placement: "bottom",
|
|
116
|
+
content: renderContentPopover(),
|
|
117
|
+
trigger: "click",
|
|
118
|
+
children: contentDropList ? contentDropList : /* @__PURE__ */ jsx("div", { className: "p-1 border-[#BDE3FF] rounded-full border cursor-pointer", children: /* @__PURE__ */ jsx(MoreIcon, { fill: "#007BE5" }) })
|
|
119
|
+
}
|
|
120
|
+
) }) });
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const BulkActions = ({
|
|
124
|
+
quantity = 0,
|
|
125
|
+
handleDelete,
|
|
126
|
+
handleSubmitForApproval,
|
|
127
|
+
handleCancelSubmission,
|
|
128
|
+
handleApprove,
|
|
129
|
+
handleCancelApproval,
|
|
130
|
+
handleReject,
|
|
131
|
+
handleDeactivate,
|
|
132
|
+
handleActivate,
|
|
133
|
+
handleRestore,
|
|
134
|
+
status,
|
|
135
|
+
typeBulkaction,
|
|
136
|
+
isApproved,
|
|
137
|
+
// Chỉ sử dụng khi là danh sách icon
|
|
138
|
+
isShowDelete = false
|
|
139
|
+
}) => {
|
|
140
|
+
//! State
|
|
141
|
+
const listIcon = [
|
|
142
|
+
{
|
|
143
|
+
icon: /* @__PURE__ */ jsx(RestoreIcon, { stroke: "white" }),
|
|
144
|
+
iconDropList: /* @__PURE__ */ jsx(RestoreIcon, { stroke: "#0F1D40" }),
|
|
145
|
+
iconDisable: /* @__PURE__ */ jsx(RestoreIcon, { stroke: "#B2B7C2" }),
|
|
146
|
+
action: handleRestore,
|
|
147
|
+
name: "Khôi phục",
|
|
148
|
+
typeIcon: "info",
|
|
149
|
+
title: "Xác nhận khôi phục",
|
|
150
|
+
content: "Bạn có chắc chắn muốn khôi phục không?",
|
|
151
|
+
arrShow: [CATEGORY_LIST_ENUM?.DELETE, CATEGORY_LIST_ENUM?.REJECT],
|
|
152
|
+
showTitle: true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
icon: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "white" }),
|
|
156
|
+
iconDropList: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "#0F1D40" }),
|
|
157
|
+
iconDisable: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "#B2B7C2" }),
|
|
158
|
+
action: handleSubmitForApproval,
|
|
159
|
+
name: "Gửi duyệt",
|
|
160
|
+
typeIcon: "info",
|
|
161
|
+
title: "Xác nhận gửi duyệt",
|
|
162
|
+
content: "Bạn có chắc chắn muốn gửi duyệt không?",
|
|
163
|
+
arrShow: [CATEGORY_LIST_ENUM?.DRAFT],
|
|
164
|
+
showTitle: true
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
icon: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "white" }),
|
|
168
|
+
iconDropList: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "#0F1D40" }),
|
|
169
|
+
iconDisable: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "#B2B7C2" }),
|
|
170
|
+
action: handleCancelSubmission,
|
|
171
|
+
name: "Huỷ gửi duyệt",
|
|
172
|
+
typeIcon: "error",
|
|
173
|
+
title: "Xác nhận hủy gửi duyệt",
|
|
174
|
+
content: "Bạn có chắc chắn muốn hủy gửi duyệt không?",
|
|
175
|
+
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL],
|
|
176
|
+
showTitle: true
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
icon: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "white" }),
|
|
180
|
+
iconDropList: /* @__PURE__ */ jsx(RefuseApprovalDropListIcon, {}),
|
|
181
|
+
iconDisable: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "#B2B7C2" }),
|
|
182
|
+
action: handleReject,
|
|
183
|
+
name: "Từ chối duyệt",
|
|
184
|
+
typeIcon: "error",
|
|
185
|
+
title: "Xác nhận từ chối duyệt",
|
|
186
|
+
content: "Bạn có chắc chắn muốn từ chối duyệt không? Hành động này không thể hoàn tác.",
|
|
187
|
+
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL],
|
|
188
|
+
showTitle: true
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
icon: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "white" }),
|
|
192
|
+
iconDropList: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "#0F1D40" }),
|
|
193
|
+
iconDisable: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "#B2B7C2" }),
|
|
194
|
+
action: handleApprove,
|
|
195
|
+
name: "Duyệt",
|
|
196
|
+
typeIcon: "info",
|
|
197
|
+
title: "Xác nhận duyệt",
|
|
198
|
+
content: "Bạn có chắc chắn muốn duyệt không?",
|
|
199
|
+
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL],
|
|
200
|
+
showTitle: true
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
icon: /* @__PURE__ */ jsx(CancelApprovalIcon, { stroke: "white" }),
|
|
204
|
+
iconDropList: /* @__PURE__ */ jsx(CancelApprovalIcon, { stroke: "#0F1D40" }),
|
|
205
|
+
iconDisable: /* @__PURE__ */ jsx(CancelApprovalIcon, { stroke: "#B2B7C2" }),
|
|
206
|
+
action: handleCancelApproval,
|
|
207
|
+
typeIcon: "error",
|
|
208
|
+
name: "Hủy duyệt",
|
|
209
|
+
title: "Xác nhận hủy duyệt",
|
|
210
|
+
content: "Bạn có chắc chắn muốn hủy duyệt không?",
|
|
211
|
+
arrShow: isBoolean(isApproved) && !isApproved ? [] : [CATEGORY_LIST_ENUM?.ACTIVE],
|
|
212
|
+
showTitle: true
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
icon: /* @__PURE__ */ jsx(DeleteIcon, { fill: "white" }),
|
|
216
|
+
iconDropList: /* @__PURE__ */ jsx(DeleteIcon, { fill: "#0F1D40" }),
|
|
217
|
+
iconDisable: /* @__PURE__ */ jsx(DeleteIcon, { fill: "#B2B7C2" }),
|
|
218
|
+
action: handleDelete,
|
|
219
|
+
typeIcon: "error",
|
|
220
|
+
name: "Xoá",
|
|
221
|
+
title: "Xác nhận xóa",
|
|
222
|
+
content: "Bạn có chắc chắn muốn xóa không? Hành động này không thể hoàn tác.",
|
|
223
|
+
arrShow: isShowDelete ? [
|
|
224
|
+
CATEGORY_LIST_ENUM?.DRAFT,
|
|
225
|
+
CATEGORY_LIST_ENUM?.ACTIVE,
|
|
226
|
+
CATEGORY_LIST_ENUM?.INACTIVE,
|
|
227
|
+
CATEGORY_LIST_ENUM?.REJECT,
|
|
228
|
+
CATEGORY_LIST_ENUM?.WATING_APPROVAL
|
|
229
|
+
] : isBoolean(isApproved) && !isApproved ? [
|
|
230
|
+
CATEGORY_LIST_ENUM?.DRAFT,
|
|
231
|
+
CATEGORY_LIST_ENUM?.ACTIVE,
|
|
232
|
+
CATEGORY_LIST_ENUM?.INACTIVE
|
|
233
|
+
] : [CATEGORY_LIST_ENUM?.DRAFT],
|
|
234
|
+
showTitle: isShowDelete
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
icon: /* @__PURE__ */ jsx(ActivateIcon, { stroke: "white" }),
|
|
238
|
+
iconDropList: /* @__PURE__ */ jsx(ActivateIcon, { stroke: "#0F1D40" }),
|
|
239
|
+
iconDisable: /* @__PURE__ */ jsx(ActivateIcon, { stroke: "#B2B7C2" }),
|
|
240
|
+
action: handleActivate,
|
|
241
|
+
typeIcon: "info",
|
|
242
|
+
name: "Kích hoạt",
|
|
243
|
+
title: "Xác nhận kích hoạt",
|
|
244
|
+
content: "Bạn có chắc chắn muốn kích hoạt không?",
|
|
245
|
+
arrShow: [CATEGORY_LIST_ENUM?.INACTIVE],
|
|
246
|
+
showTitle: true
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
icon: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "white" }),
|
|
250
|
+
iconDropList: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "#0F1D40" }),
|
|
251
|
+
iconDisable: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "#B2B7C2" }),
|
|
252
|
+
action: handleDeactivate,
|
|
253
|
+
name: "Vô hiệu hóa",
|
|
254
|
+
typeIcon: "error",
|
|
255
|
+
title: "Xác nhận vô hiệu hóa",
|
|
256
|
+
content: "Bạn có chắc chắn muốn vô hiệu hóa không?",
|
|
257
|
+
arrShow: [CATEGORY_LIST_ENUM?.ACTIVE],
|
|
258
|
+
showTitle: true
|
|
259
|
+
}
|
|
260
|
+
];
|
|
261
|
+
const { open, shouldRender, toggle } = useToggle();
|
|
262
|
+
const [notifyContent, setNotifyContent] = useState({
|
|
263
|
+
title: "",
|
|
264
|
+
content: "",
|
|
265
|
+
typeIcon: "info",
|
|
266
|
+
handleCancel: () => {
|
|
267
|
+
},
|
|
268
|
+
handleSubmit: () => {
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
//! Function
|
|
272
|
+
const renderBulkActions = () => {
|
|
273
|
+
switch (typeBulkaction) {
|
|
274
|
+
case TypeBulkActions.BULKACTION:
|
|
275
|
+
return /* @__PURE__ */ jsx(
|
|
276
|
+
BulkAction,
|
|
277
|
+
{
|
|
278
|
+
listIcon,
|
|
279
|
+
quantity,
|
|
280
|
+
setNotifyContent,
|
|
281
|
+
toggle,
|
|
282
|
+
status
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
case TypeBulkActions.DROPLIST:
|
|
286
|
+
return /* @__PURE__ */ jsx(
|
|
287
|
+
DropListActions,
|
|
288
|
+
{
|
|
289
|
+
listIcon,
|
|
290
|
+
setNotifyContent,
|
|
291
|
+
toggle,
|
|
292
|
+
status
|
|
293
|
+
}
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
//! Render
|
|
298
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
299
|
+
renderBulkActions(),
|
|
300
|
+
shouldRender && /* @__PURE__ */ jsx(
|
|
301
|
+
ConfirmModal,
|
|
302
|
+
{
|
|
303
|
+
title: notifyContent?.title,
|
|
304
|
+
content: notifyContent?.content,
|
|
305
|
+
typeIcon: notifyContent?.typeIcon,
|
|
306
|
+
open,
|
|
307
|
+
handleCancel: notifyContent?.handleCancel,
|
|
308
|
+
handleSubmit: notifyContent?.handleSubmit
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
] });
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export { BulkActions };
|