wcz-test 4.8.0 → 4.10.0
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/dist/index.d.ts +1015 -65
- package/dist/index.js +648 -219
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
47
47
|
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
48
48
|
var x = b ? Symbol.for("react.responder") : 60118;
|
|
49
49
|
var y = b ? Symbol.for("react.scope") : 60119;
|
|
50
|
-
function
|
|
50
|
+
function z18(a) {
|
|
51
51
|
if ("object" === typeof a && null !== a) {
|
|
52
52
|
var u = a.$$typeof;
|
|
53
53
|
switch (u) {
|
|
@@ -78,7 +78,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
function A(a) {
|
|
81
|
-
return
|
|
81
|
+
return z18(a) === m;
|
|
82
82
|
}
|
|
83
83
|
exports.AsyncMode = l;
|
|
84
84
|
exports.ConcurrentMode = m;
|
|
@@ -94,46 +94,46 @@ var require_react_is_production_min = __commonJS({
|
|
|
94
94
|
exports.StrictMode = f;
|
|
95
95
|
exports.Suspense = p;
|
|
96
96
|
exports.isAsyncMode = function(a) {
|
|
97
|
-
return A(a) ||
|
|
97
|
+
return A(a) || z18(a) === l;
|
|
98
98
|
};
|
|
99
99
|
exports.isConcurrentMode = A;
|
|
100
100
|
exports.isContextConsumer = function(a) {
|
|
101
|
-
return
|
|
101
|
+
return z18(a) === k;
|
|
102
102
|
};
|
|
103
103
|
exports.isContextProvider = function(a) {
|
|
104
|
-
return
|
|
104
|
+
return z18(a) === h;
|
|
105
105
|
};
|
|
106
106
|
exports.isElement = function(a) {
|
|
107
107
|
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
108
108
|
};
|
|
109
109
|
exports.isForwardRef = function(a) {
|
|
110
|
-
return
|
|
110
|
+
return z18(a) === n;
|
|
111
111
|
};
|
|
112
112
|
exports.isFragment = function(a) {
|
|
113
|
-
return
|
|
113
|
+
return z18(a) === e;
|
|
114
114
|
};
|
|
115
115
|
exports.isLazy = function(a) {
|
|
116
|
-
return
|
|
116
|
+
return z18(a) === t2;
|
|
117
117
|
};
|
|
118
118
|
exports.isMemo = function(a) {
|
|
119
|
-
return
|
|
119
|
+
return z18(a) === r;
|
|
120
120
|
};
|
|
121
121
|
exports.isPortal = function(a) {
|
|
122
|
-
return
|
|
122
|
+
return z18(a) === d;
|
|
123
123
|
};
|
|
124
124
|
exports.isProfiler = function(a) {
|
|
125
|
-
return
|
|
125
|
+
return z18(a) === g;
|
|
126
126
|
};
|
|
127
127
|
exports.isStrictMode = function(a) {
|
|
128
|
-
return
|
|
128
|
+
return z18(a) === f;
|
|
129
129
|
};
|
|
130
130
|
exports.isSuspense = function(a) {
|
|
131
|
-
return
|
|
131
|
+
return z18(a) === p;
|
|
132
132
|
};
|
|
133
133
|
exports.isValidElementType = function(a) {
|
|
134
134
|
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t2 || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
135
135
|
};
|
|
136
|
-
exports.typeOf =
|
|
136
|
+
exports.typeOf = z18;
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
|
|
@@ -167,12 +167,12 @@ var require_react_is_development = __commonJS({
|
|
|
167
167
|
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
168
168
|
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
169
169
|
}
|
|
170
|
-
function typeOf(
|
|
171
|
-
if (typeof
|
|
172
|
-
var $$typeof =
|
|
170
|
+
function typeOf(object2) {
|
|
171
|
+
if (typeof object2 === "object" && object2 !== null) {
|
|
172
|
+
var $$typeof = object2.$$typeof;
|
|
173
173
|
switch ($$typeof) {
|
|
174
174
|
case REACT_ELEMENT_TYPE:
|
|
175
|
-
var type =
|
|
175
|
+
var type = object2.type;
|
|
176
176
|
switch (type) {
|
|
177
177
|
case REACT_ASYNC_MODE_TYPE:
|
|
178
178
|
case REACT_CONCURRENT_MODE_TYPE:
|
|
@@ -214,50 +214,50 @@ var require_react_is_development = __commonJS({
|
|
|
214
214
|
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
215
215
|
var Suspense = REACT_SUSPENSE_TYPE;
|
|
216
216
|
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
217
|
-
function isAsyncMode(
|
|
217
|
+
function isAsyncMode(object2) {
|
|
218
218
|
{
|
|
219
219
|
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
220
220
|
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
221
221
|
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
return isConcurrentMode(
|
|
224
|
+
return isConcurrentMode(object2) || typeOf(object2) === REACT_ASYNC_MODE_TYPE;
|
|
225
225
|
}
|
|
226
|
-
function isConcurrentMode(
|
|
227
|
-
return typeOf(
|
|
226
|
+
function isConcurrentMode(object2) {
|
|
227
|
+
return typeOf(object2) === REACT_CONCURRENT_MODE_TYPE;
|
|
228
228
|
}
|
|
229
|
-
function isContextConsumer(
|
|
230
|
-
return typeOf(
|
|
229
|
+
function isContextConsumer(object2) {
|
|
230
|
+
return typeOf(object2) === REACT_CONTEXT_TYPE;
|
|
231
231
|
}
|
|
232
|
-
function isContextProvider(
|
|
233
|
-
return typeOf(
|
|
232
|
+
function isContextProvider(object2) {
|
|
233
|
+
return typeOf(object2) === REACT_PROVIDER_TYPE;
|
|
234
234
|
}
|
|
235
|
-
function isElement(
|
|
236
|
-
return typeof
|
|
235
|
+
function isElement(object2) {
|
|
236
|
+
return typeof object2 === "object" && object2 !== null && object2.$$typeof === REACT_ELEMENT_TYPE;
|
|
237
237
|
}
|
|
238
|
-
function isForwardRef(
|
|
239
|
-
return typeOf(
|
|
238
|
+
function isForwardRef(object2) {
|
|
239
|
+
return typeOf(object2) === REACT_FORWARD_REF_TYPE;
|
|
240
240
|
}
|
|
241
|
-
function isFragment(
|
|
242
|
-
return typeOf(
|
|
241
|
+
function isFragment(object2) {
|
|
242
|
+
return typeOf(object2) === REACT_FRAGMENT_TYPE;
|
|
243
243
|
}
|
|
244
|
-
function isLazy(
|
|
245
|
-
return typeOf(
|
|
244
|
+
function isLazy(object2) {
|
|
245
|
+
return typeOf(object2) === REACT_LAZY_TYPE;
|
|
246
246
|
}
|
|
247
|
-
function isMemo(
|
|
248
|
-
return typeOf(
|
|
247
|
+
function isMemo(object2) {
|
|
248
|
+
return typeOf(object2) === REACT_MEMO_TYPE;
|
|
249
249
|
}
|
|
250
|
-
function isPortal(
|
|
251
|
-
return typeOf(
|
|
250
|
+
function isPortal(object2) {
|
|
251
|
+
return typeOf(object2) === REACT_PORTAL_TYPE;
|
|
252
252
|
}
|
|
253
|
-
function isProfiler(
|
|
254
|
-
return typeOf(
|
|
253
|
+
function isProfiler(object2) {
|
|
254
|
+
return typeOf(object2) === REACT_PROFILER_TYPE;
|
|
255
255
|
}
|
|
256
|
-
function isStrictMode(
|
|
257
|
-
return typeOf(
|
|
256
|
+
function isStrictMode(object2) {
|
|
257
|
+
return typeOf(object2) === REACT_STRICT_MODE_TYPE;
|
|
258
258
|
}
|
|
259
|
-
function isSuspense(
|
|
260
|
-
return typeOf(
|
|
259
|
+
function isSuspense(object2) {
|
|
260
|
+
return typeOf(object2) === REACT_SUSPENSE_TYPE;
|
|
261
261
|
}
|
|
262
262
|
exports.AsyncMode = AsyncMode;
|
|
263
263
|
exports.ConcurrentMode = ConcurrentMode;
|
|
@@ -975,85 +975,54 @@ var require_prop_types = __commonJS({
|
|
|
975
975
|
// src/components/core/TypographyWithIcon.tsx
|
|
976
976
|
import { Stack, Typography } from "@mui/material";
|
|
977
977
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
978
|
-
var
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
"mb",
|
|
988
|
-
"ml",
|
|
989
|
-
"mx",
|
|
990
|
-
"my",
|
|
991
|
-
"padding",
|
|
992
|
-
"paddingTop",
|
|
993
|
-
"paddingRight",
|
|
994
|
-
"paddingBottom",
|
|
995
|
-
"paddingLeft",
|
|
996
|
-
"p",
|
|
997
|
-
"pt",
|
|
998
|
-
"pr",
|
|
999
|
-
"pb",
|
|
1000
|
-
"pl",
|
|
1001
|
-
"px",
|
|
1002
|
-
"py",
|
|
1003
|
-
"flexGrow",
|
|
1004
|
-
"flexShrink",
|
|
1005
|
-
"flexBasis",
|
|
1006
|
-
"flexDirection",
|
|
1007
|
-
"alignItems",
|
|
1008
|
-
"justifyContent",
|
|
1009
|
-
"position",
|
|
1010
|
-
"zIndex",
|
|
1011
|
-
"top",
|
|
1012
|
-
"right",
|
|
1013
|
-
"bottom",
|
|
1014
|
-
"left",
|
|
1015
|
-
"gridGap",
|
|
1016
|
-
"gridColumnGap",
|
|
1017
|
-
"gridRowGap",
|
|
1018
|
-
"gridColumn",
|
|
1019
|
-
"gridRow",
|
|
1020
|
-
"gridAutoFlow",
|
|
1021
|
-
"gap",
|
|
1022
|
-
"columnGap",
|
|
1023
|
-
"rowGap"
|
|
1024
|
-
];
|
|
1025
|
-
var TypographyWithIcon = ({ startIcon, endIcon, children, sx, gutterBottom, ...props }) => {
|
|
1026
|
-
const sxCopy = { ...sx };
|
|
1027
|
-
const stackStyles = {};
|
|
1028
|
-
for (const current of stackSxProps) {
|
|
1029
|
-
if (sxCopy[current]) {
|
|
1030
|
-
stackStyles[current] = sxCopy[current];
|
|
1031
|
-
delete sxCopy[current];
|
|
978
|
+
var TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
|
|
979
|
+
const iconSx = {
|
|
980
|
+
display: "inline-flex",
|
|
981
|
+
alignItems: "center",
|
|
982
|
+
justifyContent: "center",
|
|
983
|
+
flexShrink: 0,
|
|
984
|
+
lineHeight: 0,
|
|
985
|
+
"& > svg": {
|
|
986
|
+
display: "block"
|
|
1032
987
|
}
|
|
1033
|
-
}
|
|
1034
|
-
return /* @__PURE__ */ jsxs(
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
988
|
+
};
|
|
989
|
+
return /* @__PURE__ */ jsxs(
|
|
990
|
+
Typography,
|
|
991
|
+
{
|
|
992
|
+
component: "span",
|
|
993
|
+
sx: {
|
|
994
|
+
display: "inline-flex",
|
|
995
|
+
alignItems: "center",
|
|
996
|
+
verticalAlign: "middle",
|
|
997
|
+
...sx
|
|
998
|
+
},
|
|
999
|
+
gap: 1,
|
|
1000
|
+
...props,
|
|
1001
|
+
children: [
|
|
1002
|
+
startIcon && /* @__PURE__ */ jsx(Stack, { component: "span", sx: iconSx, children: startIcon }),
|
|
1003
|
+
/* @__PURE__ */ jsx(Stack, { component: "span", sx: { display: "inline", lineHeight: "inherit" }, children }),
|
|
1004
|
+
endIcon && /* @__PURE__ */ jsx(Stack, { component: "span", sx: iconSx, children: endIcon })
|
|
1005
|
+
]
|
|
1006
|
+
}
|
|
1007
|
+
);
|
|
1039
1008
|
};
|
|
1040
1009
|
|
|
1041
1010
|
// src/components/core/Fullscreen.tsx
|
|
1042
1011
|
import { Box } from "@mui/material";
|
|
1043
|
-
import { useEffect, useRef, useState } from "react";
|
|
1012
|
+
import { useEffect, useEffectEvent, useRef, useState } from "react";
|
|
1044
1013
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1045
1014
|
var Fullscreen = ({ children, sx, ...props }) => {
|
|
1046
1015
|
const reference = useRef(null);
|
|
1047
1016
|
const [height, setHeight] = useState();
|
|
1017
|
+
const recompute = useEffectEvent(() => {
|
|
1018
|
+
if (!reference.current) return;
|
|
1019
|
+
const top = Math.ceil(reference.current.getBoundingClientRect().top);
|
|
1020
|
+
const avail = Math.max(0, window.innerHeight - top);
|
|
1021
|
+
setHeight(avail);
|
|
1022
|
+
});
|
|
1048
1023
|
useEffect(() => {
|
|
1049
1024
|
const element = reference.current;
|
|
1050
1025
|
if (!element) return;
|
|
1051
|
-
const recompute = () => {
|
|
1052
|
-
if (!reference.current) return;
|
|
1053
|
-
const top = Math.ceil(reference.current.getBoundingClientRect().top);
|
|
1054
|
-
const avail = Math.max(0, window.innerHeight - top);
|
|
1055
|
-
setHeight(avail);
|
|
1056
|
-
};
|
|
1057
1026
|
recompute();
|
|
1058
1027
|
window.addEventListener("resize", recompute);
|
|
1059
1028
|
const ro = new ResizeObserver(recompute);
|
|
@@ -1079,11 +1048,7 @@ var Fullscreen = ({ children, sx, ...props }) => {
|
|
|
1079
1048
|
},
|
|
1080
1049
|
height,
|
|
1081
1050
|
...props,
|
|
1082
|
-
children
|
|
1083
|
-
flex: 1,
|
|
1084
|
-
minHeight: 0,
|
|
1085
|
-
height: "100%"
|
|
1086
|
-
}, children })
|
|
1051
|
+
children
|
|
1087
1052
|
}
|
|
1088
1053
|
);
|
|
1089
1054
|
};
|
|
@@ -1215,7 +1180,22 @@ var useAppTitle = () => {
|
|
|
1215
1180
|
return rootRouterState.meta?.find((meta) => meta?.title)?.title;
|
|
1216
1181
|
};
|
|
1217
1182
|
|
|
1218
|
-
// src/
|
|
1183
|
+
// src/env.ts
|
|
1184
|
+
import { createEnv } from "@t3-oss/env-core";
|
|
1185
|
+
import { z } from "zod";
|
|
1186
|
+
var clientEnv = createEnv({
|
|
1187
|
+
clientPrefix: "VITE_",
|
|
1188
|
+
client: {
|
|
1189
|
+
VITE_MUI_LICENSE_KEY: z.string(),
|
|
1190
|
+
VITE_DYNAMSOFT_LICENSE_KEY: z.string().optional(),
|
|
1191
|
+
VITE_FILE_API_BASE_URL: z.url().optional(),
|
|
1192
|
+
VITE_PEOPLESOFT_API_BASE_URL: z.url().optional(),
|
|
1193
|
+
VITE_APPROVAL_API_BASE_URL: z.url().optional()
|
|
1194
|
+
},
|
|
1195
|
+
runtimeEnv: import.meta.env
|
|
1196
|
+
});
|
|
1197
|
+
|
|
1198
|
+
// src/lib/utils.ts
|
|
1219
1199
|
import axios from "axios";
|
|
1220
1200
|
var Platform = class {
|
|
1221
1201
|
static get isAndroid() {
|
|
@@ -1247,15 +1227,22 @@ var rootRouteHead = ({ title }) => () => ({
|
|
|
1247
1227
|
{ rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" },
|
|
1248
1228
|
{ rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png" },
|
|
1249
1229
|
{ rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png" },
|
|
1250
|
-
{ rel: "manifest", href: "/manifest" },
|
|
1230
|
+
{ rel: "manifest", href: "/manifest.json" },
|
|
1251
1231
|
{ rel: "icon", href: "/favicon.ico" }
|
|
1252
1232
|
]
|
|
1253
1233
|
});
|
|
1254
1234
|
var wczApiClient = axios.create();
|
|
1235
|
+
var getFieldStatus = (field) => {
|
|
1236
|
+
const { meta } = field.state;
|
|
1237
|
+
const isTouched = meta.isTouched;
|
|
1238
|
+
const hasError = !!meta.errors.length;
|
|
1239
|
+
const helperText = meta.errors[0]?.message;
|
|
1240
|
+
return { isTouched, hasError, helperText };
|
|
1241
|
+
};
|
|
1255
1242
|
|
|
1256
1243
|
// src/hooks/FileHooks.ts
|
|
1257
|
-
var BASE_URL =
|
|
1258
|
-
var QUERY_KEY = "
|
|
1244
|
+
var BASE_URL = clientEnv.VITE_FILE_API_BASE_URL;
|
|
1245
|
+
var QUERY_KEY = "File";
|
|
1259
1246
|
var HOUR = 1e3 * 60 * 60;
|
|
1260
1247
|
var useGetFileMetas = (subId, options) => {
|
|
1261
1248
|
const appTitle = useAppTitle();
|
|
@@ -2242,18 +2229,18 @@ var AdapterDayjs = class {
|
|
|
2242
2229
|
}
|
|
2243
2230
|
};
|
|
2244
2231
|
createSystemDate = (value) => {
|
|
2245
|
-
let
|
|
2232
|
+
let date2;
|
|
2246
2233
|
if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
|
|
2247
2234
|
const timezone = dayjs.tz.guess();
|
|
2248
2235
|
if (timezone === "UTC") {
|
|
2249
|
-
|
|
2236
|
+
date2 = dayjs(value);
|
|
2250
2237
|
} else {
|
|
2251
|
-
|
|
2238
|
+
date2 = dayjs.tz(value, timezone);
|
|
2252
2239
|
}
|
|
2253
2240
|
} else {
|
|
2254
|
-
|
|
2241
|
+
date2 = dayjs(value);
|
|
2255
2242
|
}
|
|
2256
|
-
return this.setLocaleToValue(
|
|
2243
|
+
return this.setLocaleToValue(date2);
|
|
2257
2244
|
};
|
|
2258
2245
|
createUTCDate = (value) => {
|
|
2259
2246
|
if (!this.hasUTCPlugin()) {
|
|
@@ -2513,8 +2500,8 @@ var AdapterDayjs = class {
|
|
|
2513
2500
|
setMonth = (value, month) => {
|
|
2514
2501
|
return this.adjustOffset(value.set("month", month));
|
|
2515
2502
|
};
|
|
2516
|
-
setDate = (value,
|
|
2517
|
-
return this.adjustOffset(value.set("date",
|
|
2503
|
+
setDate = (value, date2) => {
|
|
2504
|
+
return this.adjustOffset(value.set("date", date2));
|
|
2518
2505
|
};
|
|
2519
2506
|
setHours = (value, hours) => {
|
|
2520
2507
|
return this.adjustOffset(value.set("hour", hours));
|
|
@@ -2566,10 +2553,9 @@ var AdapterDayjs = class {
|
|
|
2566
2553
|
};
|
|
2567
2554
|
|
|
2568
2555
|
// src/providers/LayoutProvider.tsx
|
|
2569
|
-
import { useEffect as useEffect6 } from "react";
|
|
2556
|
+
import { useEffect as useEffect6, useEffectEvent as useEffectEvent2 } from "react";
|
|
2570
2557
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
2571
|
-
import * as
|
|
2572
|
-
import { cs, en } from "zod/locales";
|
|
2558
|
+
import * as z2 from "zod";
|
|
2573
2559
|
|
|
2574
2560
|
// src/components/core/Layout.tsx
|
|
2575
2561
|
import Menu3 from "@mui/icons-material/Menu";
|
|
@@ -2942,38 +2928,27 @@ import Translate from "@mui/icons-material/Translate";
|
|
|
2942
2928
|
import { Avatar as Avatar2, Box as Box8, IconButton as IconButton4, List as List4, ListItem as ListItem2, ListItemButton as ListItemButton5, ListItemIcon as ListItemIcon4, ListItemText as ListItemText4, ListSubheader as ListSubheader2, Menu as Menu2, Typography as Typography7, useColorScheme } from "@mui/material";
|
|
2943
2929
|
import { Fragment as Fragment6, useState as useState8 } from "react";
|
|
2944
2930
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
2931
|
+
import Done from "@mui/icons-material/Done";
|
|
2945
2932
|
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2933
|
+
var capitalize = (value) => value && value.charAt(0).toUpperCase() + value.slice(1);
|
|
2946
2934
|
var ToolbarAccount = () => {
|
|
2947
2935
|
const [anchorElement, setAnchorElement] = useState8();
|
|
2948
2936
|
const [tab, setTab] = useState8("settings");
|
|
2949
2937
|
const open = Boolean(anchorElement);
|
|
2950
2938
|
const { t: t2, i18n } = useTranslation5();
|
|
2951
2939
|
const { mode, setMode } = useColorScheme();
|
|
2952
|
-
const
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2940
|
+
const supportedLanguages = (Array.isArray(i18n.options.supportedLngs) ? i18n.options.supportedLngs : []).filter((lng) => lng !== "cimode");
|
|
2941
|
+
const languageDisplayNames = new Intl.DisplayNames([i18n.language], { type: "language" });
|
|
2942
|
+
const colorModes = [
|
|
2943
|
+
{ mode: "light", icon: LightMode, label: t2("Layout.Light") },
|
|
2944
|
+
{ mode: "dark", icon: DarkMode, label: t2("Layout.Dark") },
|
|
2945
|
+
{ mode: "system", icon: SettingsBrightness, label: t2("Layout.System") }
|
|
2946
|
+
];
|
|
2959
2947
|
const user = {
|
|
2960
2948
|
name: "Dalibor Homola",
|
|
2961
2949
|
employeeId: "C2503017",
|
|
2962
2950
|
department: "IT"
|
|
2963
2951
|
};
|
|
2964
|
-
const getModeText = () => {
|
|
2965
|
-
switch (mode) {
|
|
2966
|
-
case "light": {
|
|
2967
|
-
return t2("Layout.Light");
|
|
2968
|
-
}
|
|
2969
|
-
case "dark": {
|
|
2970
|
-
return t2("Layout.Dark");
|
|
2971
|
-
}
|
|
2972
|
-
default: {
|
|
2973
|
-
return t2("Layout.System");
|
|
2974
|
-
}
|
|
2975
|
-
}
|
|
2976
|
-
};
|
|
2977
2952
|
const usernameInitials = () => {
|
|
2978
2953
|
if (!user.name) return "";
|
|
2979
2954
|
const splittedName = user.name.split(" ");
|
|
@@ -2988,41 +2963,52 @@ var ToolbarAccount = () => {
|
|
|
2988
2963
|
const settings = /* @__PURE__ */ jsxs13(List4, { component: "nav", subheader: /* @__PURE__ */ jsx24(ListSubheader2, { sx: { backgroundColor: "transparent" }, children: t2("Layout.Settings") }), children: [
|
|
2989
2964
|
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeTab("theme"), sx: { py: 0.3 }, children: [
|
|
2990
2965
|
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(Brightness4, {}) }),
|
|
2991
|
-
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Appearance"), secondary:
|
|
2966
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Appearance"), secondary: colorModes.find((m) => m.mode === mode)?.label }),
|
|
2992
2967
|
/* @__PURE__ */ jsx24(ChevronRight, {})
|
|
2993
2968
|
] }),
|
|
2994
2969
|
/* @__PURE__ */ jsxs13(ListItemButton5, { onClick: changeTab("language"), sx: { py: 0.3 }, children: [
|
|
2995
2970
|
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(Translate, {}) }),
|
|
2996
|
-
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Language"), secondary: i18n.
|
|
2971
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: t2("Layout.Language"), secondary: capitalize(languageDisplayNames.of(i18n.language)) }),
|
|
2997
2972
|
/* @__PURE__ */ jsx24(ChevronRight, {})
|
|
2998
2973
|
] })
|
|
2999
2974
|
] });
|
|
3000
|
-
const theme = /* @__PURE__ */
|
|
2975
|
+
const theme = /* @__PURE__ */ jsx24(List4, { subheader: /* @__PURE__ */ jsxs13(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
3001
2976
|
/* @__PURE__ */ jsx24(IconButton4, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx24(ArrowBack, { fontSize: "small" }) }),
|
|
3002
2977
|
" ",
|
|
3003
2978
|
t2("Layout.Appearance")
|
|
3004
|
-
] }), children:
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
2979
|
+
] }), children: colorModes.map(({ mode: modeValue, icon: Icon, label }) => /* @__PURE__ */ jsxs13(
|
|
2980
|
+
ListItemButton5,
|
|
2981
|
+
{
|
|
2982
|
+
onClick: () => {
|
|
2983
|
+
setMode(modeValue);
|
|
2984
|
+
closeMenu();
|
|
2985
|
+
},
|
|
2986
|
+
selected: mode === modeValue,
|
|
2987
|
+
children: [
|
|
2988
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: /* @__PURE__ */ jsx24(Icon, {}) }),
|
|
2989
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: label })
|
|
2990
|
+
]
|
|
2991
|
+
},
|
|
2992
|
+
modeValue
|
|
2993
|
+
)) });
|
|
2994
|
+
const language = /* @__PURE__ */ jsx24(List4, { subheader: /* @__PURE__ */ jsxs13(ListSubheader2, { onClick: changeTab("settings"), sx: { backgroundColor: "transparent", display: "flex", alignItems: "center", px: 1, cursor: "pointer" }, children: [
|
|
3019
2995
|
/* @__PURE__ */ jsx24(IconButton4, { size: "small", sx: { mr: 0.5 }, children: /* @__PURE__ */ jsx24(ArrowBack, { fontSize: "small" }) }),
|
|
3020
2996
|
" ",
|
|
3021
2997
|
t2("Layout.Language")
|
|
3022
|
-
] }), children:
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
2998
|
+
] }), children: supportedLanguages.map(
|
|
2999
|
+
(languageCode) => /* @__PURE__ */ jsxs13(
|
|
3000
|
+
ListItemButton5,
|
|
3001
|
+
{
|
|
3002
|
+
onClick: () => i18n.changeLanguage(languageCode).finally(() => closeMenu()),
|
|
3003
|
+
selected: i18n.resolvedLanguage === languageCode,
|
|
3004
|
+
children: [
|
|
3005
|
+
/* @__PURE__ */ jsx24(ListItemIcon4, { children: i18n.resolvedLanguage === languageCode && /* @__PURE__ */ jsx24(Done, {}) }),
|
|
3006
|
+
/* @__PURE__ */ jsx24(ListItemText4, { primary: capitalize(languageDisplayNames.of(languageCode)) })
|
|
3007
|
+
]
|
|
3008
|
+
},
|
|
3009
|
+
languageCode
|
|
3010
|
+
)
|
|
3011
|
+
) });
|
|
3026
3012
|
return /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
3027
3013
|
/* @__PURE__ */ jsx24(IconButton4, { size: "small", edge: "end", onClick: openMenu, children: user.name ? /* @__PURE__ */ jsx24(Avatar2, { sx: { width: { xs: 32, sm: 40 }, height: { xs: 32, sm: 40 }, bgcolor: "primary.main" }, children: /* @__PURE__ */ jsx24(Typography7, { variant: "subtitle2", sx: { fontWeight: "bold", lineHeight: 0 }, children: usernameInitials() }) }) : /* @__PURE__ */ jsx24(AccountCircle, { fontSize: "large" }) }),
|
|
3028
3014
|
/* @__PURE__ */ jsx24(Menu2, { anchorEl: anchorElement, open, onClose: closeMenu, children: /* @__PURE__ */ jsxs13(Box8, { sx: { width: 240 }, children: [
|
|
@@ -3430,6 +3416,7 @@ var csCZGrid = {
|
|
|
3430
3416
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
3431
3417
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
3432
3418
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
3419
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
3433
3420
|
};
|
|
3434
3421
|
var csCZ = getGridLocalization(csCZGrid);
|
|
3435
3422
|
|
|
@@ -3719,7 +3706,8 @@ var GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
3719
3706
|
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ""}`,
|
|
3720
3707
|
promptChangePivotRowsLabel: (count) => `Rows (${count})`,
|
|
3721
3708
|
promptChangePivotValuesLabel: (count) => `Values (${count})`,
|
|
3722
|
-
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})
|
|
3709
|
+
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
|
|
3710
|
+
promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
|
|
3723
3711
|
};
|
|
3724
3712
|
|
|
3725
3713
|
// node_modules/@mui/x-data-grid/esm/locales/enUS.js
|
|
@@ -3806,6 +3794,10 @@ var csCZ2 = getPickersLocalization(csCZPickers);
|
|
|
3806
3794
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
3807
3795
|
var WISTRON_PRIMARY_COLOR = "#00506E";
|
|
3808
3796
|
var WISTRON_SECONDARY_COLOR = "#64DC00";
|
|
3797
|
+
var LOCALE_MAP = {
|
|
3798
|
+
cs: [csCZ, csCZ2, csCZ3],
|
|
3799
|
+
en: [enUS2, enUS, enUS3]
|
|
3800
|
+
};
|
|
3809
3801
|
var useGetTheme = (theme) => {
|
|
3810
3802
|
const { i18n } = useTranslation6();
|
|
3811
3803
|
return createTheme(
|
|
@@ -3855,36 +3847,10 @@ var useGetTheme = (theme) => {
|
|
|
3855
3847
|
};
|
|
3856
3848
|
}
|
|
3857
3849
|
},
|
|
3858
|
-
MuiDataGrid: {
|
|
3859
|
-
styleOverrides: {
|
|
3860
|
-
root: ({ theme: muiTheme }) => ({
|
|
3861
|
-
"& .MuiDataGrid-cell--editing": {
|
|
3862
|
-
"& .MuiInputBase-root": {
|
|
3863
|
-
height: "100%"
|
|
3864
|
-
}
|
|
3865
|
-
},
|
|
3866
|
-
"& .MuiDataGrid-columnHeaderTitle": {
|
|
3867
|
-
fontWeight: 600
|
|
3868
|
-
},
|
|
3869
|
-
"& .Mui-error": {
|
|
3870
|
-
backgroundColor: muiTheme.palette.error.main,
|
|
3871
|
-
color: muiTheme.palette.error.contrastText
|
|
3872
|
-
},
|
|
3873
|
-
"& .MuiDataGrid-booleanCell[data-value='true']": {
|
|
3874
|
-
color: `${muiTheme.palette.success.main} !important`
|
|
3875
|
-
},
|
|
3876
|
-
"& .MuiDataGrid-booleanCell[data-value='false']": {
|
|
3877
|
-
color: `${muiTheme.palette.error.main} !important`
|
|
3878
|
-
}
|
|
3879
|
-
})
|
|
3880
|
-
}
|
|
3881
|
-
},
|
|
3882
3850
|
...theme?.components
|
|
3883
3851
|
}
|
|
3884
3852
|
},
|
|
3885
|
-
i18n.
|
|
3886
|
-
i18n.resolvedLanguage === "cs" ? csCZ2 : enUS,
|
|
3887
|
-
i18n.resolvedLanguage === "cs" ? csCZ3 : enUS3
|
|
3853
|
+
...LOCALE_MAP[i18n.language]
|
|
3888
3854
|
);
|
|
3889
3855
|
};
|
|
3890
3856
|
|
|
@@ -3963,38 +3929,27 @@ import { jsx as jsx27 } from "react/jsx-runtime";
|
|
|
3963
3929
|
var LayoutProvider = ({ navigation, theme, children }) => {
|
|
3964
3930
|
const { i18n } = useTranslation7();
|
|
3965
3931
|
const createdTheme = useGetTheme(theme);
|
|
3932
|
+
const languageChangedHandler = useEffectEvent2(() => {
|
|
3933
|
+
z2.config(z2.core.locales[i18n.language]());
|
|
3934
|
+
});
|
|
3966
3935
|
useEffect6(() => {
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
};
|
|
3970
|
-
handler();
|
|
3971
|
-
i18n.on("languageChanged", handler);
|
|
3936
|
+
languageChangedHandler();
|
|
3937
|
+
i18n.on("languageChanged", languageChangedHandler);
|
|
3972
3938
|
return () => {
|
|
3973
|
-
i18n.off("languageChanged",
|
|
3939
|
+
i18n.off("languageChanged", languageChangedHandler);
|
|
3974
3940
|
};
|
|
3975
3941
|
}, []);
|
|
3976
3942
|
return /* @__PURE__ */ jsx27(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsx27(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.resolvedLanguage, children: /* @__PURE__ */ jsx27(DialogsProvider, { children: /* @__PURE__ */ jsx27(Layout, { navigation, children }) }) }) });
|
|
3977
3943
|
};
|
|
3978
3944
|
|
|
3979
3945
|
// src/index.ts
|
|
3980
|
-
import { uuidv7 as
|
|
3946
|
+
import { uuidv7 as uuidv76 } from "uuidv7";
|
|
3981
3947
|
|
|
3982
3948
|
// src/hooks/FormHooks.ts
|
|
3983
3949
|
import { createFormHook, createFormHookContexts } from "@tanstack/react-form";
|
|
3984
3950
|
|
|
3985
3951
|
// src/components/form/FormAutocomplete.tsx
|
|
3986
3952
|
import { Autocomplete, TextField } from "@mui/material";
|
|
3987
|
-
|
|
3988
|
-
// src/utils/FormUtils.ts
|
|
3989
|
-
var getFieldStatus = (field) => {
|
|
3990
|
-
const { meta } = field.state;
|
|
3991
|
-
const isTouched = meta.isTouched;
|
|
3992
|
-
const hasError = !!meta.errors.length;
|
|
3993
|
-
const helperText = meta.errors[0]?.message;
|
|
3994
|
-
return { isTouched, hasError, helperText };
|
|
3995
|
-
};
|
|
3996
|
-
|
|
3997
|
-
// src/components/form/FormAutocomplete.tsx
|
|
3998
3953
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3999
3954
|
var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
4000
3955
|
const field = useFieldContext();
|
|
@@ -4282,10 +4237,468 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
|
|
|
4282
4237
|
import { default as default2 } from "use-local-storage-state";
|
|
4283
4238
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
4284
4239
|
import { t } from "i18next";
|
|
4240
|
+
|
|
4241
|
+
// src/hooks/PeopleSoftHooks.ts
|
|
4242
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
4243
|
+
var BASE_URL2 = clientEnv.VITE_PEOPLESOFT_API_BASE_URL;
|
|
4244
|
+
var QUERY_KEY2 = "PeopleSoft";
|
|
4245
|
+
var DAY = 1e3 * 60 * 60 * 24;
|
|
4246
|
+
var useGetPeopleSoftEmployeesSearch = (searchTerm, options) => {
|
|
4247
|
+
return useQuery2({
|
|
4248
|
+
...options,
|
|
4249
|
+
queryKey: [QUERY_KEY2, "employee", "search", searchTerm],
|
|
4250
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4251
|
+
url: `${BASE_URL2}/v1/employee?search=${searchTerm}`,
|
|
4252
|
+
method: "GET",
|
|
4253
|
+
signal
|
|
4254
|
+
}),
|
|
4255
|
+
staleTime: DAY,
|
|
4256
|
+
gcTime: DAY,
|
|
4257
|
+
refetchOnWindowFocus: false
|
|
4258
|
+
});
|
|
4259
|
+
};
|
|
4260
|
+
var useGetPeopleSoftEmployees = (options) => {
|
|
4261
|
+
return useQuery2({
|
|
4262
|
+
...options,
|
|
4263
|
+
queryKey: [QUERY_KEY2, "employee"],
|
|
4264
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4265
|
+
url: `${BASE_URL2}/v1/employee/all`,
|
|
4266
|
+
method: "GET",
|
|
4267
|
+
signal
|
|
4268
|
+
}),
|
|
4269
|
+
staleTime: DAY,
|
|
4270
|
+
gcTime: DAY,
|
|
4271
|
+
refetchOnWindowFocus: false
|
|
4272
|
+
});
|
|
4273
|
+
};
|
|
4274
|
+
var useGetPeopleSoftActiveEmployees = (options) => {
|
|
4275
|
+
return useQuery2({
|
|
4276
|
+
...options,
|
|
4277
|
+
queryKey: [QUERY_KEY2, "employee", "active"],
|
|
4278
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4279
|
+
url: `${BASE_URL2}/v1/employee/active`,
|
|
4280
|
+
method: "GET",
|
|
4281
|
+
signal
|
|
4282
|
+
}),
|
|
4283
|
+
staleTime: DAY,
|
|
4284
|
+
gcTime: DAY,
|
|
4285
|
+
refetchOnWindowFocus: false
|
|
4286
|
+
});
|
|
4287
|
+
};
|
|
4288
|
+
var useGetPeopleSoftEmployeeById = (employeeId, options) => {
|
|
4289
|
+
return useQuery2({
|
|
4290
|
+
...options,
|
|
4291
|
+
queryKey: [QUERY_KEY2, "employee", employeeId],
|
|
4292
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4293
|
+
url: `${BASE_URL2}/v1/employee/${employeeId}`,
|
|
4294
|
+
method: "GET",
|
|
4295
|
+
signal
|
|
4296
|
+
}),
|
|
4297
|
+
staleTime: DAY,
|
|
4298
|
+
gcTime: DAY,
|
|
4299
|
+
refetchOnWindowFocus: false
|
|
4300
|
+
});
|
|
4301
|
+
};
|
|
4302
|
+
var useGetPeopleSoftPreviousEmployeeIds = (options) => {
|
|
4303
|
+
return useQuery2({
|
|
4304
|
+
...options,
|
|
4305
|
+
queryKey: [QUERY_KEY2, "employee", "previousIds"],
|
|
4306
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4307
|
+
url: `${BASE_URL2}/v1/employee/previousIds`,
|
|
4308
|
+
method: "GET",
|
|
4309
|
+
signal
|
|
4310
|
+
}),
|
|
4311
|
+
staleTime: DAY,
|
|
4312
|
+
gcTime: DAY,
|
|
4313
|
+
refetchOnWindowFocus: false
|
|
4314
|
+
});
|
|
4315
|
+
};
|
|
4316
|
+
var useGetPeopleSoftEmployeeSupervisor = (employeeId, options) => {
|
|
4317
|
+
return useQuery2({
|
|
4318
|
+
...options,
|
|
4319
|
+
queryKey: [QUERY_KEY2, "employee", employeeId, "supervisor"],
|
|
4320
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4321
|
+
url: `${BASE_URL2}/v1/employee/${employeeId}/supervisor`,
|
|
4322
|
+
method: "GET",
|
|
4323
|
+
signal
|
|
4324
|
+
}),
|
|
4325
|
+
staleTime: DAY,
|
|
4326
|
+
gcTime: DAY,
|
|
4327
|
+
refetchOnWindowFocus: false
|
|
4328
|
+
});
|
|
4329
|
+
};
|
|
4330
|
+
var useGetPeopleSoftEmployeeSubordinates = (employeeId, options) => {
|
|
4331
|
+
return useQuery2({
|
|
4332
|
+
...options,
|
|
4333
|
+
queryKey: [QUERY_KEY2, "employee", employeeId, "subordinates"],
|
|
4334
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4335
|
+
url: `${BASE_URL2}/v1/employee/${employeeId}/subordinates`,
|
|
4336
|
+
method: "GET",
|
|
4337
|
+
signal
|
|
4338
|
+
}),
|
|
4339
|
+
staleTime: DAY,
|
|
4340
|
+
gcTime: DAY,
|
|
4341
|
+
refetchOnWindowFocus: false
|
|
4342
|
+
});
|
|
4343
|
+
};
|
|
4344
|
+
var useGetPeopleSoftEmployeeManager = (employeeId, options) => {
|
|
4345
|
+
return useQuery2({
|
|
4346
|
+
...options,
|
|
4347
|
+
queryKey: [QUERY_KEY2, "employee", employeeId, "manager"],
|
|
4348
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4349
|
+
url: `${BASE_URL2}/v1/employee/${employeeId}/manager`,
|
|
4350
|
+
method: "GET",
|
|
4351
|
+
signal
|
|
4352
|
+
}),
|
|
4353
|
+
staleTime: DAY,
|
|
4354
|
+
gcTime: DAY,
|
|
4355
|
+
refetchOnWindowFocus: false
|
|
4356
|
+
});
|
|
4357
|
+
};
|
|
4358
|
+
var useGetPeopleSoftEmployeeGeneralManager = (employeeId, options) => {
|
|
4359
|
+
return useQuery2({
|
|
4360
|
+
...options,
|
|
4361
|
+
queryKey: [QUERY_KEY2, "employee", employeeId, "generalManager"],
|
|
4362
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4363
|
+
url: `${BASE_URL2}/v1/employee/${employeeId}/generalManager`,
|
|
4364
|
+
method: "GET",
|
|
4365
|
+
signal
|
|
4366
|
+
}),
|
|
4367
|
+
staleTime: DAY,
|
|
4368
|
+
gcTime: DAY,
|
|
4369
|
+
refetchOnWindowFocus: false
|
|
4370
|
+
});
|
|
4371
|
+
};
|
|
4372
|
+
var useGetPeopleSoftDepartments = (options) => {
|
|
4373
|
+
return useQuery2({
|
|
4374
|
+
...options,
|
|
4375
|
+
queryKey: [QUERY_KEY2, "department"],
|
|
4376
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4377
|
+
url: `${BASE_URL2}/v1/department/all`,
|
|
4378
|
+
method: "GET",
|
|
4379
|
+
signal
|
|
4380
|
+
}),
|
|
4381
|
+
staleTime: DAY,
|
|
4382
|
+
gcTime: DAY,
|
|
4383
|
+
refetchOnWindowFocus: false
|
|
4384
|
+
});
|
|
4385
|
+
};
|
|
4386
|
+
var useGetPeopleSoftDepartmentById = (departmentId, options) => {
|
|
4387
|
+
return useQuery2({
|
|
4388
|
+
...options,
|
|
4389
|
+
queryKey: [QUERY_KEY2, "department", departmentId],
|
|
4390
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4391
|
+
url: `${BASE_URL2}/v1/department/${departmentId}`,
|
|
4392
|
+
method: "GET",
|
|
4393
|
+
signal
|
|
4394
|
+
}),
|
|
4395
|
+
staleTime: DAY,
|
|
4396
|
+
gcTime: DAY,
|
|
4397
|
+
refetchOnWindowFocus: false
|
|
4398
|
+
});
|
|
4399
|
+
};
|
|
4400
|
+
var useGetPeopleSoftDepartmentManager = (departmentId, options) => {
|
|
4401
|
+
return useQuery2({
|
|
4402
|
+
...options,
|
|
4403
|
+
queryKey: [QUERY_KEY2, "department", departmentId, "manager"],
|
|
4404
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4405
|
+
url: `${BASE_URL2}/v1/department/${departmentId}/manager`,
|
|
4406
|
+
method: "GET",
|
|
4407
|
+
signal
|
|
4408
|
+
}),
|
|
4409
|
+
staleTime: DAY,
|
|
4410
|
+
gcTime: DAY,
|
|
4411
|
+
refetchOnWindowFocus: false
|
|
4412
|
+
});
|
|
4413
|
+
};
|
|
4414
|
+
var useGetPeopleSoftDepartmentEmployees = (departmentId, options) => {
|
|
4415
|
+
return useQuery2({
|
|
4416
|
+
...options,
|
|
4417
|
+
queryKey: [QUERY_KEY2, "department", departmentId, "employees"],
|
|
4418
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4419
|
+
url: `${BASE_URL2}/v1/department/${departmentId}/employees`,
|
|
4420
|
+
method: "GET",
|
|
4421
|
+
signal
|
|
4422
|
+
}),
|
|
4423
|
+
staleTime: DAY,
|
|
4424
|
+
gcTime: DAY,
|
|
4425
|
+
refetchOnWindowFocus: false
|
|
4426
|
+
});
|
|
4427
|
+
};
|
|
4428
|
+
var useGetPeopleSoftCompanyGeneralManager = (companyCode, options) => {
|
|
4429
|
+
return useQuery2({
|
|
4430
|
+
...options,
|
|
4431
|
+
queryKey: [QUERY_KEY2, "company", companyCode, "generalManager"],
|
|
4432
|
+
queryFn: ({ signal }) => wczApiClient.request({
|
|
4433
|
+
url: `${BASE_URL2}/v1/company/${companyCode}/generalManager`,
|
|
4434
|
+
method: "GET",
|
|
4435
|
+
signal
|
|
4436
|
+
}),
|
|
4437
|
+
staleTime: DAY,
|
|
4438
|
+
gcTime: DAY,
|
|
4439
|
+
refetchOnWindowFocus: false
|
|
4440
|
+
});
|
|
4441
|
+
};
|
|
4442
|
+
|
|
4443
|
+
// src/models/file/FileMeta.ts
|
|
4444
|
+
import { uuidv7 as uuidv72 } from "uuidv7";
|
|
4445
|
+
import * as z3 from "zod";
|
|
4446
|
+
var FileMetaSchema = z3.object({
|
|
4447
|
+
id: z3.uuid().default(uuidv72),
|
|
4448
|
+
subId: z3.uuid().default(uuidv72),
|
|
4449
|
+
appName: z3.string().min(1).max(255),
|
|
4450
|
+
fileName: z3.string().min(1).max(255),
|
|
4451
|
+
fileExtension: z3.string().min(1).max(255),
|
|
4452
|
+
fileSize: z3.number().min(0),
|
|
4453
|
+
mediaSubType: z3.string().min(1).max(255),
|
|
4454
|
+
mediaType: z3.string().min(1).max(255),
|
|
4455
|
+
mimeType: z3.string().min(1).max(255),
|
|
4456
|
+
createdBy: z3.string().min(1).max(255),
|
|
4457
|
+
createdDate: z3.date()
|
|
4458
|
+
});
|
|
4459
|
+
|
|
4460
|
+
// src/models/email/Email.ts
|
|
4461
|
+
import z5 from "zod";
|
|
4462
|
+
|
|
4463
|
+
// src/models/email/EmailAttachment.ts
|
|
4464
|
+
import z4 from "zod";
|
|
4465
|
+
var EmailAttachmentSchema = z4.object({
|
|
4466
|
+
appName: z4.string().min(1).max(100),
|
|
4467
|
+
subId: z4.uuid()
|
|
4468
|
+
});
|
|
4469
|
+
|
|
4470
|
+
// src/models/email/Email.ts
|
|
4471
|
+
var EmailSchema = z5.object({
|
|
4472
|
+
subject: z5.string().min(1).max(60),
|
|
4473
|
+
body: z5.string().min(1),
|
|
4474
|
+
to: z5.array(z5.email()).min(1),
|
|
4475
|
+
bcc: z5.array(z5.email()).optional(),
|
|
4476
|
+
cc: z5.array(z5.email()).optional(),
|
|
4477
|
+
attachments: z5.array(EmailAttachmentSchema).optional()
|
|
4478
|
+
});
|
|
4479
|
+
|
|
4480
|
+
// src/models/peoplesoft/Employee.ts
|
|
4481
|
+
import z8 from "zod";
|
|
4482
|
+
|
|
4483
|
+
// src/models/peoplesoft/EmployeeCategoryGroup.ts
|
|
4484
|
+
import z6 from "zod";
|
|
4485
|
+
var EmployeeCategoryGroup = z6.enum([
|
|
4486
|
+
"IDL",
|
|
4487
|
+
"FD",
|
|
4488
|
+
"FI"
|
|
4489
|
+
]);
|
|
4490
|
+
|
|
4491
|
+
// src/models/peoplesoft/EmployeeStatus.ts
|
|
4492
|
+
import z7 from "zod";
|
|
4493
|
+
var EmployeeStatus = z7.enum([
|
|
4494
|
+
"Active",
|
|
4495
|
+
"Terminated",
|
|
4496
|
+
"Leave of Absence"
|
|
4497
|
+
]);
|
|
4498
|
+
|
|
4499
|
+
// src/models/peoplesoft/Employee.ts
|
|
4500
|
+
var EmployeeSchema = z8.object({
|
|
4501
|
+
badgeId: z8.string(),
|
|
4502
|
+
category: z8.string(),
|
|
4503
|
+
categoryGroup: EmployeeCategoryGroup,
|
|
4504
|
+
companyCode: z8.string(),
|
|
4505
|
+
contactPhone: z8.string(),
|
|
4506
|
+
departmentId: z8.string(),
|
|
4507
|
+
departmentDescription: z8.string(),
|
|
4508
|
+
emailString: z8.string(),
|
|
4509
|
+
employeeId: z8.string(),
|
|
4510
|
+
extensionNumber: z8.string(),
|
|
4511
|
+
firstName: z8.string(),
|
|
4512
|
+
gender: z8.string(),
|
|
4513
|
+
hiredDate: z8.date(),
|
|
4514
|
+
lastName: z8.string(),
|
|
4515
|
+
managerId: z8.string(),
|
|
4516
|
+
middleName: z8.string(),
|
|
4517
|
+
name: z8.string(),
|
|
4518
|
+
nameTitleCase: z8.string(),
|
|
4519
|
+
nfcSn: z8.string(),
|
|
4520
|
+
plantId: z8.string(),
|
|
4521
|
+
position: z8.string(),
|
|
4522
|
+
previousEmployeeIds: z8.string().nullable(),
|
|
4523
|
+
reHiredDate: z8.date().nullable(),
|
|
4524
|
+
recordNumber: z8.number(),
|
|
4525
|
+
status: EmployeeStatus,
|
|
4526
|
+
supervisorId: z8.string(),
|
|
4527
|
+
terminationDate: z8.date().nullable(),
|
|
4528
|
+
terminationFutureDate: z8.date().nullable(),
|
|
4529
|
+
type: z8.string(),
|
|
4530
|
+
upperDepartmentId: z8.string(),
|
|
4531
|
+
jobCode: z8.string(),
|
|
4532
|
+
jobDescription: z8.string(),
|
|
4533
|
+
terminationReason: z8.string().nullable(),
|
|
4534
|
+
supervisorRecordNumber: z8.number()
|
|
4535
|
+
});
|
|
4536
|
+
|
|
4537
|
+
// src/models/peoplesoft/Department.ts
|
|
4538
|
+
import z9 from "zod";
|
|
4539
|
+
var DepartmentSchema = z9.object({
|
|
4540
|
+
departmentId: z9.string(),
|
|
4541
|
+
description: z9.string(),
|
|
4542
|
+
managerId: z9.string(),
|
|
4543
|
+
managerRecordNumber: z9.string(),
|
|
4544
|
+
treeLevel: z9.number(),
|
|
4545
|
+
upperDepartmentId: z9.string(),
|
|
4546
|
+
companyCode: z9.string(),
|
|
4547
|
+
location: z9.string(),
|
|
4548
|
+
salLocation: z9.string(),
|
|
4549
|
+
plantId: z9.string(),
|
|
4550
|
+
manager: EmployeeSchema
|
|
4551
|
+
});
|
|
4552
|
+
|
|
4553
|
+
// src/models/approval/Approval.ts
|
|
4554
|
+
import { uuidv7 as uuidv75 } from "uuidv7";
|
|
4555
|
+
import z17 from "zod";
|
|
4556
|
+
|
|
4557
|
+
// src/models/approval/ApprovalFlow.ts
|
|
4558
|
+
import { uuidv7 as uuidv73 } from "uuidv7";
|
|
4559
|
+
import { z as z11 } from "zod";
|
|
4560
|
+
|
|
4561
|
+
// src/models/approval/StepApprovalOrder.ts
|
|
4562
|
+
import z10 from "zod";
|
|
4563
|
+
var StepApprovalOrder = z10.enum([
|
|
4564
|
+
"Serial",
|
|
4565
|
+
"Parallel",
|
|
4566
|
+
"OneOfThem"
|
|
4567
|
+
]);
|
|
4568
|
+
|
|
4569
|
+
// src/models/approval/ApprovalFlow.ts
|
|
4570
|
+
var ApprovalFlowSchema = z11.object({
|
|
4571
|
+
id: z11.uuid().default(uuidv73),
|
|
4572
|
+
approvalStage: z11.number(),
|
|
4573
|
+
batchSequence: z11.number().optional(),
|
|
4574
|
+
approvalSequence: z11.number(),
|
|
4575
|
+
stepApprovalOrder: StepApprovalOrder,
|
|
4576
|
+
steps: z11.array(z11.custom()),
|
|
4577
|
+
isActive: z11.boolean().default(false)
|
|
4578
|
+
});
|
|
4579
|
+
|
|
4580
|
+
// src/models/approval/ApprovalFlowStep.ts
|
|
4581
|
+
import { uuidv7 as uuidv74 } from "uuidv7";
|
|
4582
|
+
import { z as z14 } from "zod";
|
|
4583
|
+
|
|
4584
|
+
// src/models/approval/ApprovalEmployee.ts
|
|
4585
|
+
import { z as z12 } from "zod";
|
|
4586
|
+
var ApprovalEmployeeSchema = z12.object({
|
|
4587
|
+
employeeId: z12.string().min(1).max(20),
|
|
4588
|
+
name: z12.string().min(1).max(50),
|
|
4589
|
+
email: z12.email().min(1).max(100)
|
|
4590
|
+
});
|
|
4591
|
+
|
|
4592
|
+
// src/models/approval/ApprovalStepResult.ts
|
|
4593
|
+
import z13 from "zod";
|
|
4594
|
+
var ApprovalStepResult = z13.enum([
|
|
4595
|
+
"NotAvailable",
|
|
4596
|
+
"FutureApproval",
|
|
4597
|
+
"WaitingForApproval",
|
|
4598
|
+
"Approved",
|
|
4599
|
+
"Rejected",
|
|
4600
|
+
"Skipped",
|
|
4601
|
+
"Withdrawn",
|
|
4602
|
+
"Cancelled"
|
|
4603
|
+
]);
|
|
4604
|
+
|
|
4605
|
+
// src/models/approval/ApprovalFlowStep.ts
|
|
4606
|
+
var ApprovalFlowStepSchema = z14.object({
|
|
4607
|
+
id: z14.uuid().default(uuidv74),
|
|
4608
|
+
order: z14.number(),
|
|
4609
|
+
approverRole: z14.string().min(1).max(100).default("Approver"),
|
|
4610
|
+
approver: ApprovalEmployeeSchema,
|
|
4611
|
+
actualApprover: ApprovalEmployeeSchema.optional(),
|
|
4612
|
+
result: ApprovalStepResult.default("NotAvailable"),
|
|
4613
|
+
resultDate: z14.date().optional(),
|
|
4614
|
+
resultComment: z14.string().max(2e3).optional()
|
|
4615
|
+
});
|
|
4616
|
+
|
|
4617
|
+
// src/models/approval/ApprovalRequestType.ts
|
|
4618
|
+
import z15 from "zod";
|
|
4619
|
+
var ApprovalRequestType = z15.enum([
|
|
4620
|
+
"Single",
|
|
4621
|
+
"Batch"
|
|
4622
|
+
]);
|
|
4623
|
+
|
|
4624
|
+
// src/models/approval/ApprovalStatus.ts
|
|
4625
|
+
import z16 from "zod";
|
|
4626
|
+
var ApprovalStatus = z16.enum([
|
|
4627
|
+
"WaitingForApproval",
|
|
4628
|
+
"Approved",
|
|
4629
|
+
"PartiallyApproved",
|
|
4630
|
+
"Rejected",
|
|
4631
|
+
"Withdrawn",
|
|
4632
|
+
"Cancelled"
|
|
4633
|
+
]);
|
|
4634
|
+
|
|
4635
|
+
// src/models/approval/Approval.ts
|
|
4636
|
+
var ApprovalSchema = z17.object({
|
|
4637
|
+
id: z17.uuid().default(uuidv75),
|
|
4638
|
+
number: z17.string().max(30).optional(),
|
|
4639
|
+
applicationName: z17.string().min(1).max(50),
|
|
4640
|
+
type: ApprovalRequestType.default("Single"),
|
|
4641
|
+
status: ApprovalStatus,
|
|
4642
|
+
emailBody: z17.string().min(1),
|
|
4643
|
+
created: z17.date(),
|
|
4644
|
+
createdBy: z17.custom(),
|
|
4645
|
+
updated: z17.date(),
|
|
4646
|
+
updatedBy: z17.custom(),
|
|
4647
|
+
approvalFlows: z17.array(z17.custom()).min(1),
|
|
4648
|
+
currentApprovers: z17.array(z17.custom())
|
|
4649
|
+
});
|
|
4650
|
+
var ApprovalCreateSchema = ApprovalSchema.pick({
|
|
4651
|
+
id: true,
|
|
4652
|
+
number: true,
|
|
4653
|
+
applicationName: true,
|
|
4654
|
+
type: true,
|
|
4655
|
+
emailBody: true,
|
|
4656
|
+
approvalFlows: true
|
|
4657
|
+
}).extend({
|
|
4658
|
+
approvalFlows: z17.array(
|
|
4659
|
+
ApprovalFlowSchema.pick({
|
|
4660
|
+
approvalStage: true,
|
|
4661
|
+
batchSequence: true,
|
|
4662
|
+
stepApprovalOrder: true,
|
|
4663
|
+
steps: true
|
|
4664
|
+
}).extend({
|
|
4665
|
+
steps: z17.array(
|
|
4666
|
+
ApprovalFlowStepSchema.pick({
|
|
4667
|
+
approverRole: true,
|
|
4668
|
+
approver: true
|
|
4669
|
+
})
|
|
4670
|
+
)
|
|
4671
|
+
})
|
|
4672
|
+
).min(1)
|
|
4673
|
+
});
|
|
4674
|
+
var SingleApprovalSchema = z17.object({
|
|
4675
|
+
result: ApprovalStepResult,
|
|
4676
|
+
resultComment: z17.string().max(2e3).optional(),
|
|
4677
|
+
emailBody: z17.string().min(1)
|
|
4678
|
+
});
|
|
4679
|
+
var CancelApprovalSchema = z17.object({
|
|
4680
|
+
comment: z17.string().min(1).max(2e3),
|
|
4681
|
+
emailBody: z17.string().min(1)
|
|
4682
|
+
});
|
|
4683
|
+
var WithdrawApprovalSchema = z17.object({
|
|
4684
|
+
comment: z17.string().min(1).max(2e3),
|
|
4685
|
+
emailBody: z17.string().min(1)
|
|
4686
|
+
});
|
|
4285
4687
|
export {
|
|
4688
|
+
ApprovalCreateSchema,
|
|
4689
|
+
ApprovalEmployeeSchema,
|
|
4690
|
+
ApprovalFlowSchema,
|
|
4691
|
+
ApprovalFlowStepSchema,
|
|
4692
|
+
ApprovalSchema,
|
|
4693
|
+
CancelApprovalSchema,
|
|
4286
4694
|
ChipInputCell,
|
|
4695
|
+
DepartmentSchema,
|
|
4287
4696
|
Dropzone,
|
|
4288
4697
|
EditableColumnHeader,
|
|
4698
|
+
EmailAttachmentSchema,
|
|
4699
|
+
EmailSchema,
|
|
4700
|
+
EmployeeSchema,
|
|
4701
|
+
FileMetaSchema,
|
|
4289
4702
|
FileViewer,
|
|
4290
4703
|
Fullscreen,
|
|
4291
4704
|
LayoutProvider,
|
|
@@ -4298,7 +4711,9 @@ export {
|
|
|
4298
4711
|
RouterListItemButton,
|
|
4299
4712
|
RouterNotFound,
|
|
4300
4713
|
RouterTab,
|
|
4714
|
+
SingleApprovalSchema,
|
|
4301
4715
|
TypographyWithIcon,
|
|
4716
|
+
WithdrawApprovalSchema,
|
|
4302
4717
|
rootRouteHead,
|
|
4303
4718
|
t,
|
|
4304
4719
|
useDeleteFile,
|
|
@@ -4310,13 +4725,27 @@ export {
|
|
|
4310
4725
|
useGetFile,
|
|
4311
4726
|
useGetFileMetas,
|
|
4312
4727
|
useGetFileThumbnail,
|
|
4728
|
+
useGetPeopleSoftActiveEmployees,
|
|
4729
|
+
useGetPeopleSoftCompanyGeneralManager,
|
|
4730
|
+
useGetPeopleSoftDepartmentById,
|
|
4731
|
+
useGetPeopleSoftDepartmentEmployees,
|
|
4732
|
+
useGetPeopleSoftDepartmentManager,
|
|
4733
|
+
useGetPeopleSoftDepartments,
|
|
4734
|
+
useGetPeopleSoftEmployeeById,
|
|
4735
|
+
useGetPeopleSoftEmployeeGeneralManager,
|
|
4736
|
+
useGetPeopleSoftEmployeeManager,
|
|
4737
|
+
useGetPeopleSoftEmployeeSubordinates,
|
|
4738
|
+
useGetPeopleSoftEmployeeSupervisor,
|
|
4739
|
+
useGetPeopleSoftEmployees,
|
|
4740
|
+
useGetPeopleSoftEmployeesSearch,
|
|
4741
|
+
useGetPeopleSoftPreviousEmployeeIds,
|
|
4313
4742
|
useLayoutForm,
|
|
4314
4743
|
default2 as useLocalStorageState,
|
|
4315
4744
|
useOpenFile,
|
|
4316
4745
|
useTranslation8 as useTranslation,
|
|
4317
4746
|
useUpdateFileMeta,
|
|
4318
4747
|
useUploadFile,
|
|
4319
|
-
|
|
4748
|
+
uuidv76 as uuidv7,
|
|
4320
4749
|
wczApiClient,
|
|
4321
4750
|
withLayoutForm
|
|
4322
4751
|
};
|