wcz-test 6.0.1 → 6.1.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 +3 -7
- package/dist/index.js +116 -119
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { DateTimePickerProps, DatePickerProps } from '@mui/x-date-pickers-pro';
|
|
|
13
13
|
import { NumericFormatProps, InputAttributes } from 'react-number-format/types/types';
|
|
14
14
|
import * as _tanstack_react_form from '@tanstack/react-form';
|
|
15
15
|
import * as _tanstack_form_core from '@tanstack/form-core';
|
|
16
|
-
export { default as useLocalStorageState } from 'use-local-storage-state';
|
|
17
16
|
export { useTranslation } from 'react-i18next';
|
|
18
17
|
export { t } from 'i18next';
|
|
19
18
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -147,10 +146,7 @@ declare class Platform {
|
|
|
147
146
|
static get isMacOS(): boolean;
|
|
148
147
|
private static get userAgent();
|
|
149
148
|
}
|
|
150
|
-
|
|
151
|
-
title: string;
|
|
152
|
-
}
|
|
153
|
-
declare const rootRouteHead: ({ title }: RootRouteHeadProps) => () => {
|
|
149
|
+
declare const rootRouteHead: () => {
|
|
154
150
|
meta: ({
|
|
155
151
|
charSet: string;
|
|
156
152
|
name?: undefined;
|
|
@@ -184,7 +180,7 @@ declare const rootRouteHead: ({ title }: RootRouteHeadProps) => () => {
|
|
|
184
180
|
type?: undefined;
|
|
185
181
|
})[];
|
|
186
182
|
};
|
|
187
|
-
declare const
|
|
183
|
+
declare const httpClient: axios.AxiosInstance;
|
|
188
184
|
type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
|
|
189
185
|
|
|
190
186
|
type FormSubmitButtonProps = Omit<ButtonProps, "loading" | "disabled" | "onClick" | "type">;
|
|
@@ -1384,4 +1380,4 @@ declare const StepApprovalOrder: z__default.ZodEnum<{
|
|
|
1384
1380
|
OneOfThem: "OneOfThem";
|
|
1385
1381
|
}>;
|
|
1386
1382
|
|
|
1387
|
-
export { type Approval, type ApprovalEmployee, ApprovalEmployeeSchema, type ApprovalFlow, ApprovalFlowSchema, type ApprovalFlowStep, ApprovalFlowStepSchema, ApprovalRequestType, ApprovalSchema, ApprovalStatus, ApprovalStepResult, type ApproveApproval, ApproveApprovalSchema, type CancelApproval, CancelApprovalSchema, ChipInputCell, type CreateApproval, CreateApprovalSchema, type Department, DepartmentSchema, type DialogProps, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, EmailAttachmentSchema, EmailSchema, type Employee, EmployeeCategoryGroup, EmployeeSchema, EmployeeStatus, type FileMeta, FileMetaSchema, FileViewer, Fullscreen, LayoutProvider, type Navigation, Platform, type ResubmitApproval, ResubmitApprovalSchema, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, StepApprovalOrder, TypographyWithIcon, type User, type WithdrawApproval, WithdrawApprovalSchema, rootRouteHead, useDeleteFile, useDeleteFiles, useDialogs, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useGetPeopleSoftActiveEmployees, useGetPeopleSoftCompanyGeneralManager, useGetPeopleSoftDepartmentById, useGetPeopleSoftDepartmentEmployees, useGetPeopleSoftDepartmentManager, useGetPeopleSoftDepartments, useGetPeopleSoftEmployeeById, useGetPeopleSoftEmployeeGeneralManager, useGetPeopleSoftEmployeeManager, useGetPeopleSoftEmployeeSubordinates, useGetPeopleSoftEmployeeSupervisor, useGetPeopleSoftEmployees, useGetPeopleSoftEmployeesSearch, useGetPeopleSoftPreviousEmployeeIds, useLayoutForm, useOpenFile, useUpdateFileMeta, useUploadFile,
|
|
1383
|
+
export { type Approval, type ApprovalEmployee, ApprovalEmployeeSchema, type ApprovalFlow, ApprovalFlowSchema, type ApprovalFlowStep, ApprovalFlowStepSchema, ApprovalRequestType, ApprovalSchema, ApprovalStatus, ApprovalStepResult, type ApproveApproval, ApproveApprovalSchema, type CancelApproval, CancelApprovalSchema, ChipInputCell, type CreateApproval, CreateApprovalSchema, type Department, DepartmentSchema, type DialogProps, Dropzone, EditableColumnHeader, type Email, type EmailAttachment, EmailAttachmentSchema, EmailSchema, type Employee, EmployeeCategoryGroup, EmployeeSchema, EmployeeStatus, type FileMeta, FileMetaSchema, FileViewer, Fullscreen, LayoutProvider, type Navigation, Platform, type ResubmitApproval, ResubmitApprovalSchema, RouterButton, RouterError, RouterGridActionsCellItem, RouterIconButton, RouterLink, RouterListItemButton, RouterNotFound, RouterTab, StepApprovalOrder, TypographyWithIcon, type User, type WithdrawApproval, WithdrawApprovalSchema, httpClient, rootRouteHead, useDeleteFile, useDeleteFiles, useDialogs, useDownloadFile, useFieldContext, useFormContext, useGetFile, useGetFileMetas, useGetFileThumbnail, useGetPeopleSoftActiveEmployees, useGetPeopleSoftCompanyGeneralManager, useGetPeopleSoftDepartmentById, useGetPeopleSoftDepartmentEmployees, useGetPeopleSoftDepartmentManager, useGetPeopleSoftDepartments, useGetPeopleSoftEmployeeById, useGetPeopleSoftEmployeeGeneralManager, useGetPeopleSoftEmployeeManager, useGetPeopleSoftEmployeeSubordinates, useGetPeopleSoftEmployeeSupervisor, useGetPeopleSoftEmployees, useGetPeopleSoftEmployeesSearch, useGetPeopleSoftPreviousEmployeeIds, useLayoutForm, useOpenFile, useUpdateFileMeta, useUploadFile, withLayoutForm };
|
package/dist/index.js
CHANGED
|
@@ -1186,13 +1186,12 @@ import { z } from "zod";
|
|
|
1186
1186
|
var clientEnv = createEnv({
|
|
1187
1187
|
clientPrefix: "VITE_",
|
|
1188
1188
|
client: {
|
|
1189
|
+
VITE_APP_TITLE: z.string(),
|
|
1189
1190
|
VITE_MUI_LICENSE_KEY: z.string(),
|
|
1190
|
-
|
|
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()
|
|
1191
|
+
VITE_BASE_URL: z.url()
|
|
1194
1192
|
},
|
|
1195
|
-
runtimeEnv: import.meta.env
|
|
1193
|
+
runtimeEnv: import.meta.env,
|
|
1194
|
+
emptyStringAsUndefined: true
|
|
1196
1195
|
});
|
|
1197
1196
|
|
|
1198
1197
|
// src/lib/utils.ts
|
|
@@ -1214,13 +1213,13 @@ var Platform = class {
|
|
|
1214
1213
|
return typeof navigator === "undefined" ? "" : navigator.userAgent;
|
|
1215
1214
|
}
|
|
1216
1215
|
};
|
|
1217
|
-
var rootRouteHead = (
|
|
1216
|
+
var rootRouteHead = () => ({
|
|
1218
1217
|
meta: [
|
|
1219
1218
|
{ charSet: "utf-8" },
|
|
1220
1219
|
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
|
1221
|
-
{ title },
|
|
1220
|
+
{ title: clientEnv.VITE_APP_TITLE },
|
|
1222
1221
|
{ name: "og:type", content: "website" },
|
|
1223
|
-
{ name: "og:title", content:
|
|
1222
|
+
{ name: "og:title", content: clientEnv.VITE_APP_TITLE },
|
|
1224
1223
|
{ name: "og:image", content: "/favicon-32x32.png" }
|
|
1225
1224
|
],
|
|
1226
1225
|
links: [
|
|
@@ -1231,7 +1230,9 @@ var rootRouteHead = ({ title }) => () => ({
|
|
|
1231
1230
|
{ rel: "icon", href: "/favicon.ico" }
|
|
1232
1231
|
]
|
|
1233
1232
|
});
|
|
1234
|
-
var
|
|
1233
|
+
var httpClient = axios.create({
|
|
1234
|
+
baseURL: clientEnv.VITE_BASE_URL
|
|
1235
|
+
});
|
|
1235
1236
|
var getFieldStatus = (field) => {
|
|
1236
1237
|
const { meta } = field.state;
|
|
1237
1238
|
const isTouched = meta.isTouched;
|
|
@@ -1241,16 +1242,15 @@ var getFieldStatus = (field) => {
|
|
|
1241
1242
|
};
|
|
1242
1243
|
|
|
1243
1244
|
// src/hooks/FileHooks.ts
|
|
1244
|
-
var
|
|
1245
|
-
var QUERY_KEY = "File";
|
|
1245
|
+
var QUERY_KEY = "file";
|
|
1246
1246
|
var HOUR = 1e3 * 60 * 60;
|
|
1247
1247
|
var useGetFileMetas = (subId, options) => {
|
|
1248
1248
|
const appTitle = useAppTitle();
|
|
1249
1249
|
return useQuery({
|
|
1250
1250
|
...options,
|
|
1251
1251
|
queryKey: [QUERY_KEY, "meta", subId, appTitle],
|
|
1252
|
-
queryFn: ({ signal }) =>
|
|
1253
|
-
url:
|
|
1252
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
1253
|
+
url: `/${QUERY_KEY}/v1/meta?appName=${appTitle}&subId=${subId}`,
|
|
1254
1254
|
method: "GET",
|
|
1255
1255
|
signal
|
|
1256
1256
|
}),
|
|
@@ -1264,8 +1264,8 @@ var useGetFileThumbnail = (meta, options) => {
|
|
|
1264
1264
|
return useQuery({
|
|
1265
1265
|
...options,
|
|
1266
1266
|
queryKey: [QUERY_KEY, "thumbnail", meta?.id, appTitle],
|
|
1267
|
-
queryFn: ({ signal }) =>
|
|
1268
|
-
url:
|
|
1267
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
1268
|
+
url: `/${QUERY_KEY}/v1/thumbnail?appName=${appTitle}&id=${meta?.id}`,
|
|
1269
1269
|
method: "GET",
|
|
1270
1270
|
signal,
|
|
1271
1271
|
responseType: "blob"
|
|
@@ -1282,8 +1282,8 @@ var useGetFile = (meta, options) => {
|
|
|
1282
1282
|
return useQuery({
|
|
1283
1283
|
...options,
|
|
1284
1284
|
queryKey: [QUERY_KEY, meta?.id, appTitle],
|
|
1285
|
-
queryFn: ({ signal }) =>
|
|
1286
|
-
url:
|
|
1285
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
1286
|
+
url: `/${QUERY_KEY}/v1?appName=${appTitle}&id=${meta?.id}`,
|
|
1287
1287
|
method: "GET",
|
|
1288
1288
|
signal,
|
|
1289
1289
|
responseType: "blob"
|
|
@@ -1299,8 +1299,8 @@ var useDownloadFile = (options) => {
|
|
|
1299
1299
|
const appTitle = useAppTitle();
|
|
1300
1300
|
return useMutation({
|
|
1301
1301
|
...options,
|
|
1302
|
-
mutationFn: (meta) =>
|
|
1303
|
-
url:
|
|
1302
|
+
mutationFn: (meta) => httpClient.request({
|
|
1303
|
+
url: `/${QUERY_KEY}/v1/download?appName=${appTitle}&id=${meta.id}`,
|
|
1304
1304
|
method: "GET",
|
|
1305
1305
|
responseType: "blob"
|
|
1306
1306
|
}),
|
|
@@ -1311,8 +1311,8 @@ var useOpenFile = (options) => {
|
|
|
1311
1311
|
const appTitle = useAppTitle();
|
|
1312
1312
|
return useMutation({
|
|
1313
1313
|
...options,
|
|
1314
|
-
mutationFn: (meta) =>
|
|
1315
|
-
url:
|
|
1314
|
+
mutationFn: (meta) => httpClient.request({
|
|
1315
|
+
url: `/${QUERY_KEY}/v1?appName=${appTitle}&id=${meta.id}`,
|
|
1316
1316
|
method: "GET",
|
|
1317
1317
|
responseType: "blob"
|
|
1318
1318
|
}),
|
|
@@ -1326,8 +1326,8 @@ var useUpdateFileMeta = (options) => {
|
|
|
1326
1326
|
const queryClient = useQueryClient();
|
|
1327
1327
|
return useMutation({
|
|
1328
1328
|
...options,
|
|
1329
|
-
mutationFn: (meta) =>
|
|
1330
|
-
url:
|
|
1329
|
+
mutationFn: (meta) => httpClient.request({
|
|
1330
|
+
url: `/${QUERY_KEY}/v1/meta?appName=${appTitle}&id=${meta.id}`,
|
|
1331
1331
|
method: "PUT",
|
|
1332
1332
|
data: meta
|
|
1333
1333
|
}),
|
|
@@ -1339,8 +1339,8 @@ var useDeleteFile = (options) => {
|
|
|
1339
1339
|
const queryClient = useQueryClient();
|
|
1340
1340
|
return useMutation({
|
|
1341
1341
|
...options,
|
|
1342
|
-
mutationFn: (meta) =>
|
|
1343
|
-
url:
|
|
1342
|
+
mutationFn: (meta) => httpClient.request({
|
|
1343
|
+
url: `/${QUERY_KEY}/v1?appName=${appTitle}&id=${meta.id}`,
|
|
1344
1344
|
method: "DELETE"
|
|
1345
1345
|
}),
|
|
1346
1346
|
onSettled: () => queryClient.invalidateQueries({ queryKey: [QUERY_KEY, "meta"], exact: false })
|
|
@@ -1351,8 +1351,8 @@ var useDeleteFiles = (options) => {
|
|
|
1351
1351
|
const queryClient = useQueryClient();
|
|
1352
1352
|
return useMutation({
|
|
1353
1353
|
...options,
|
|
1354
|
-
mutationFn: (subId) =>
|
|
1355
|
-
url:
|
|
1354
|
+
mutationFn: (subId) => httpClient.request({
|
|
1355
|
+
url: `/${QUERY_KEY}/v1?appName=${appTitle}&subId=${subId}`,
|
|
1356
1356
|
method: "DELETE"
|
|
1357
1357
|
}),
|
|
1358
1358
|
onSettled: () => queryClient.invalidateQueries({ queryKey: [QUERY_KEY, "meta"], exact: false })
|
|
@@ -1372,7 +1372,7 @@ var useUploadFile = ({ subId, onSuccess, onError }) => {
|
|
|
1372
1372
|
fileName: file.name
|
|
1373
1373
|
};
|
|
1374
1374
|
const upload = new TusUpload(file, {
|
|
1375
|
-
endpoint: `${
|
|
1375
|
+
endpoint: `${clientEnv.VITE_BASE_URL}/${QUERY_KEY}/v1/upload`,
|
|
1376
1376
|
chunkSize: 1048576,
|
|
1377
1377
|
// 1 MB
|
|
1378
1378
|
metadata: {
|
|
@@ -4234,21 +4234,19 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
|
|
|
4234
4234
|
});
|
|
4235
4235
|
|
|
4236
4236
|
// src/index.ts
|
|
4237
|
-
import { default as default2 } from "use-local-storage-state";
|
|
4238
4237
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
4239
4238
|
import { t } from "i18next";
|
|
4240
4239
|
|
|
4241
4240
|
// src/hooks/PeopleSoftHooks.ts
|
|
4242
4241
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
4243
|
-
var
|
|
4244
|
-
var QUERY_KEY2 = "PeopleSoft";
|
|
4242
|
+
var QUERY_KEY2 = "ps";
|
|
4245
4243
|
var DAY = 1e3 * 60 * 60 * 24;
|
|
4246
4244
|
var useGetPeopleSoftEmployeesSearch = (searchTerm, options) => {
|
|
4247
4245
|
return useQuery2({
|
|
4248
4246
|
...options,
|
|
4249
4247
|
queryKey: [QUERY_KEY2, "employee", "search", searchTerm],
|
|
4250
|
-
queryFn: ({ signal }) =>
|
|
4251
|
-
url:
|
|
4248
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4249
|
+
url: `/${QUERY_KEY2}/v1/employee?search=${searchTerm}`,
|
|
4252
4250
|
method: "GET",
|
|
4253
4251
|
signal
|
|
4254
4252
|
}),
|
|
@@ -4261,8 +4259,8 @@ var useGetPeopleSoftEmployees = (options) => {
|
|
|
4261
4259
|
return useQuery2({
|
|
4262
4260
|
...options,
|
|
4263
4261
|
queryKey: [QUERY_KEY2, "employee"],
|
|
4264
|
-
queryFn: ({ signal }) =>
|
|
4265
|
-
url:
|
|
4262
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4263
|
+
url: `/${QUERY_KEY2}/v1/employee/all`,
|
|
4266
4264
|
method: "GET",
|
|
4267
4265
|
signal
|
|
4268
4266
|
}),
|
|
@@ -4275,8 +4273,8 @@ var useGetPeopleSoftActiveEmployees = (options) => {
|
|
|
4275
4273
|
return useQuery2({
|
|
4276
4274
|
...options,
|
|
4277
4275
|
queryKey: [QUERY_KEY2, "employee", "active"],
|
|
4278
|
-
queryFn: ({ signal }) =>
|
|
4279
|
-
url:
|
|
4276
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4277
|
+
url: `/${QUERY_KEY2}/v1/employee/active`,
|
|
4280
4278
|
method: "GET",
|
|
4281
4279
|
signal
|
|
4282
4280
|
}),
|
|
@@ -4289,8 +4287,8 @@ var useGetPeopleSoftEmployeeById = (employeeId, options) => {
|
|
|
4289
4287
|
return useQuery2({
|
|
4290
4288
|
...options,
|
|
4291
4289
|
queryKey: [QUERY_KEY2, "employee", employeeId],
|
|
4292
|
-
queryFn: ({ signal }) =>
|
|
4293
|
-
url:
|
|
4290
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4291
|
+
url: `/${QUERY_KEY2}/v1/employee/${employeeId}`,
|
|
4294
4292
|
method: "GET",
|
|
4295
4293
|
signal
|
|
4296
4294
|
}),
|
|
@@ -4303,8 +4301,8 @@ var useGetPeopleSoftPreviousEmployeeIds = (options) => {
|
|
|
4303
4301
|
return useQuery2({
|
|
4304
4302
|
...options,
|
|
4305
4303
|
queryKey: [QUERY_KEY2, "employee", "previousIds"],
|
|
4306
|
-
queryFn: ({ signal }) =>
|
|
4307
|
-
url:
|
|
4304
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4305
|
+
url: `/${QUERY_KEY2}/v1/employee/previousIds`,
|
|
4308
4306
|
method: "GET",
|
|
4309
4307
|
signal
|
|
4310
4308
|
}),
|
|
@@ -4317,8 +4315,8 @@ var useGetPeopleSoftEmployeeSupervisor = (employeeId, options) => {
|
|
|
4317
4315
|
return useQuery2({
|
|
4318
4316
|
...options,
|
|
4319
4317
|
queryKey: [QUERY_KEY2, "employee", employeeId, "supervisor"],
|
|
4320
|
-
queryFn: ({ signal }) =>
|
|
4321
|
-
url:
|
|
4318
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4319
|
+
url: `/${QUERY_KEY2}/v1/employee/${employeeId}/supervisor`,
|
|
4322
4320
|
method: "GET",
|
|
4323
4321
|
signal
|
|
4324
4322
|
}),
|
|
@@ -4331,8 +4329,8 @@ var useGetPeopleSoftEmployeeSubordinates = (employeeId, options) => {
|
|
|
4331
4329
|
return useQuery2({
|
|
4332
4330
|
...options,
|
|
4333
4331
|
queryKey: [QUERY_KEY2, "employee", employeeId, "subordinates"],
|
|
4334
|
-
queryFn: ({ signal }) =>
|
|
4335
|
-
url:
|
|
4332
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4333
|
+
url: `/${QUERY_KEY2}/v1/employee/${employeeId}/subordinates`,
|
|
4336
4334
|
method: "GET",
|
|
4337
4335
|
signal
|
|
4338
4336
|
}),
|
|
@@ -4345,8 +4343,8 @@ var useGetPeopleSoftEmployeeManager = (employeeId, options) => {
|
|
|
4345
4343
|
return useQuery2({
|
|
4346
4344
|
...options,
|
|
4347
4345
|
queryKey: [QUERY_KEY2, "employee", employeeId, "manager"],
|
|
4348
|
-
queryFn: ({ signal }) =>
|
|
4349
|
-
url:
|
|
4346
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4347
|
+
url: `/${QUERY_KEY2}/v1/employee/${employeeId}/manager`,
|
|
4350
4348
|
method: "GET",
|
|
4351
4349
|
signal
|
|
4352
4350
|
}),
|
|
@@ -4359,8 +4357,8 @@ var useGetPeopleSoftEmployeeGeneralManager = (employeeId, options) => {
|
|
|
4359
4357
|
return useQuery2({
|
|
4360
4358
|
...options,
|
|
4361
4359
|
queryKey: [QUERY_KEY2, "employee", employeeId, "generalManager"],
|
|
4362
|
-
queryFn: ({ signal }) =>
|
|
4363
|
-
url:
|
|
4360
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4361
|
+
url: `/${QUERY_KEY2}/v1/employee/${employeeId}/generalManager`,
|
|
4364
4362
|
method: "GET",
|
|
4365
4363
|
signal
|
|
4366
4364
|
}),
|
|
@@ -4373,8 +4371,8 @@ var useGetPeopleSoftDepartments = (options) => {
|
|
|
4373
4371
|
return useQuery2({
|
|
4374
4372
|
...options,
|
|
4375
4373
|
queryKey: [QUERY_KEY2, "department"],
|
|
4376
|
-
queryFn: ({ signal }) =>
|
|
4377
|
-
url:
|
|
4374
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4375
|
+
url: `/${QUERY_KEY2}/v1/department/all`,
|
|
4378
4376
|
method: "GET",
|
|
4379
4377
|
signal
|
|
4380
4378
|
}),
|
|
@@ -4387,8 +4385,8 @@ var useGetPeopleSoftDepartmentById = (departmentId, options) => {
|
|
|
4387
4385
|
return useQuery2({
|
|
4388
4386
|
...options,
|
|
4389
4387
|
queryKey: [QUERY_KEY2, "department", departmentId],
|
|
4390
|
-
queryFn: ({ signal }) =>
|
|
4391
|
-
url:
|
|
4388
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4389
|
+
url: `/${QUERY_KEY2}/v1/department/${departmentId}`,
|
|
4392
4390
|
method: "GET",
|
|
4393
4391
|
signal
|
|
4394
4392
|
}),
|
|
@@ -4401,8 +4399,8 @@ var useGetPeopleSoftDepartmentManager = (departmentId, options) => {
|
|
|
4401
4399
|
return useQuery2({
|
|
4402
4400
|
...options,
|
|
4403
4401
|
queryKey: [QUERY_KEY2, "department", departmentId, "manager"],
|
|
4404
|
-
queryFn: ({ signal }) =>
|
|
4405
|
-
url:
|
|
4402
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4403
|
+
url: `/${QUERY_KEY2}/v1/department/${departmentId}/manager`,
|
|
4406
4404
|
method: "GET",
|
|
4407
4405
|
signal
|
|
4408
4406
|
}),
|
|
@@ -4415,8 +4413,8 @@ var useGetPeopleSoftDepartmentEmployees = (departmentId, options) => {
|
|
|
4415
4413
|
return useQuery2({
|
|
4416
4414
|
...options,
|
|
4417
4415
|
queryKey: [QUERY_KEY2, "department", departmentId, "employees"],
|
|
4418
|
-
queryFn: ({ signal }) =>
|
|
4419
|
-
url:
|
|
4416
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4417
|
+
url: `/${QUERY_KEY2}/v1/department/${departmentId}/employees`,
|
|
4420
4418
|
method: "GET",
|
|
4421
4419
|
signal
|
|
4422
4420
|
}),
|
|
@@ -4429,8 +4427,8 @@ var useGetPeopleSoftCompanyGeneralManager = (companyCode, options) => {
|
|
|
4429
4427
|
return useQuery2({
|
|
4430
4428
|
...options,
|
|
4431
4429
|
queryKey: [QUERY_KEY2, "company", companyCode, "generalManager"],
|
|
4432
|
-
queryFn: ({ signal }) =>
|
|
4433
|
-
url:
|
|
4430
|
+
queryFn: ({ signal }) => httpClient.request({
|
|
4431
|
+
url: `/${QUERY_KEY2}/v1/company/${companyCode}/generalManager`,
|
|
4434
4432
|
method: "GET",
|
|
4435
4433
|
signal
|
|
4436
4434
|
}),
|
|
@@ -4446,14 +4444,14 @@ import * as z3 from "zod";
|
|
|
4446
4444
|
var FileMetaSchema = z3.object({
|
|
4447
4445
|
id: z3.uuid().default(uuidv72),
|
|
4448
4446
|
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),
|
|
4447
|
+
appName: z3.string().trim().min(1).max(255),
|
|
4448
|
+
fileName: z3.string().trim().min(1).max(255),
|
|
4449
|
+
fileExtension: z3.string().trim().min(1).max(255),
|
|
4452
4450
|
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),
|
|
4451
|
+
mediaSubType: z3.string().trim().min(1).max(255),
|
|
4452
|
+
mediaType: z3.string().trim().min(1).max(255),
|
|
4453
|
+
mimeType: z3.string().trim().min(1).max(255),
|
|
4454
|
+
createdBy: z3.string().trim().min(1).max(255),
|
|
4457
4455
|
createdDate: z3.date()
|
|
4458
4456
|
});
|
|
4459
4457
|
|
|
@@ -4463,14 +4461,14 @@ import z5 from "zod";
|
|
|
4463
4461
|
// src/models/email/EmailAttachment.ts
|
|
4464
4462
|
import z4 from "zod";
|
|
4465
4463
|
var EmailAttachmentSchema = z4.object({
|
|
4466
|
-
appName: z4.string().min(1).max(100),
|
|
4464
|
+
appName: z4.string().trim().min(1).max(100),
|
|
4467
4465
|
subId: z4.uuid()
|
|
4468
4466
|
});
|
|
4469
4467
|
|
|
4470
4468
|
// src/models/email/Email.ts
|
|
4471
4469
|
var EmailSchema = z5.object({
|
|
4472
|
-
subject: z5.string().min(1).max(60),
|
|
4473
|
-
body: z5.string().min(1),
|
|
4470
|
+
subject: z5.string().trim().min(1).max(60),
|
|
4471
|
+
body: z5.string().trim().min(1),
|
|
4474
4472
|
to: z5.array(z5.email()).min(1),
|
|
4475
4473
|
bcc: z5.array(z5.email()).optional(),
|
|
4476
4474
|
cc: z5.array(z5.email()).optional(),
|
|
@@ -4498,55 +4496,55 @@ var EmployeeStatus = z7.enum([
|
|
|
4498
4496
|
|
|
4499
4497
|
// src/models/peoplesoft/Employee.ts
|
|
4500
4498
|
var EmployeeSchema = z8.object({
|
|
4501
|
-
badgeId: z8.string(),
|
|
4502
|
-
category: z8.string(),
|
|
4499
|
+
badgeId: z8.string().trim(),
|
|
4500
|
+
category: z8.string().trim(),
|
|
4503
4501
|
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(),
|
|
4502
|
+
companyCode: z8.string().trim(),
|
|
4503
|
+
contactPhone: z8.string().trim(),
|
|
4504
|
+
departmentId: z8.string().trim(),
|
|
4505
|
+
departmentDescription: z8.string().trim(),
|
|
4506
|
+
emailString: z8.string().trim(),
|
|
4507
|
+
employeeId: z8.string().trim(),
|
|
4508
|
+
extensionNumber: z8.string().trim(),
|
|
4509
|
+
firstName: z8.string().trim(),
|
|
4510
|
+
gender: z8.string().trim(),
|
|
4513
4511
|
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(),
|
|
4512
|
+
lastName: z8.string().trim(),
|
|
4513
|
+
managerId: z8.string().trim(),
|
|
4514
|
+
middleName: z8.string().trim(),
|
|
4515
|
+
name: z8.string().trim(),
|
|
4516
|
+
nameTitleCase: z8.string().trim(),
|
|
4517
|
+
nfcSn: z8.string().trim(),
|
|
4518
|
+
plantId: z8.string().trim(),
|
|
4519
|
+
position: z8.string().trim(),
|
|
4520
|
+
previousEmployeeIds: z8.string().trim().nullable(),
|
|
4523
4521
|
reHiredDate: z8.date().nullable(),
|
|
4524
4522
|
recordNumber: z8.number(),
|
|
4525
4523
|
status: EmployeeStatus,
|
|
4526
|
-
supervisorId: z8.string(),
|
|
4524
|
+
supervisorId: z8.string().trim(),
|
|
4527
4525
|
terminationDate: z8.date().nullable(),
|
|
4528
4526
|
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(),
|
|
4527
|
+
type: z8.string().trim(),
|
|
4528
|
+
upperDepartmentId: z8.string().trim(),
|
|
4529
|
+
jobCode: z8.string().trim(),
|
|
4530
|
+
jobDescription: z8.string().trim(),
|
|
4531
|
+
terminationReason: z8.string().trim().nullable(),
|
|
4534
4532
|
supervisorRecordNumber: z8.number()
|
|
4535
4533
|
});
|
|
4536
4534
|
|
|
4537
4535
|
// src/models/peoplesoft/Department.ts
|
|
4538
4536
|
import z9 from "zod";
|
|
4539
4537
|
var DepartmentSchema = z9.object({
|
|
4540
|
-
departmentId: z9.string(),
|
|
4541
|
-
description: z9.string(),
|
|
4542
|
-
managerId: z9.string(),
|
|
4543
|
-
managerRecordNumber: z9.string(),
|
|
4538
|
+
departmentId: z9.string().trim(),
|
|
4539
|
+
description: z9.string().trim(),
|
|
4540
|
+
managerId: z9.string().trim(),
|
|
4541
|
+
managerRecordNumber: z9.string().trim(),
|
|
4544
4542
|
treeLevel: z9.number(),
|
|
4545
|
-
upperDepartmentId: z9.string(),
|
|
4546
|
-
companyCode: z9.string(),
|
|
4547
|
-
location: z9.string(),
|
|
4548
|
-
salLocation: z9.string(),
|
|
4549
|
-
plantId: z9.string(),
|
|
4543
|
+
upperDepartmentId: z9.string().trim(),
|
|
4544
|
+
companyCode: z9.string().trim(),
|
|
4545
|
+
location: z9.string().trim(),
|
|
4546
|
+
salLocation: z9.string().trim(),
|
|
4547
|
+
plantId: z9.string().trim(),
|
|
4550
4548
|
manager: EmployeeSchema
|
|
4551
4549
|
});
|
|
4552
4550
|
|
|
@@ -4584,8 +4582,8 @@ import { z as z14 } from "zod";
|
|
|
4584
4582
|
// src/models/approval/ApprovalEmployee.ts
|
|
4585
4583
|
import { z as z12 } from "zod";
|
|
4586
4584
|
var ApprovalEmployeeSchema = z12.object({
|
|
4587
|
-
employeeId: z12.string().min(1).max(20),
|
|
4588
|
-
name: z12.string().min(1).max(50),
|
|
4585
|
+
employeeId: z12.string().trim().min(1).max(20),
|
|
4586
|
+
name: z12.string().trim().min(1).max(50),
|
|
4589
4587
|
email: z12.email().min(1).max(100)
|
|
4590
4588
|
});
|
|
4591
4589
|
|
|
@@ -4606,12 +4604,12 @@ var ApprovalStepResult = z13.enum([
|
|
|
4606
4604
|
var ApprovalFlowStepSchema = z14.object({
|
|
4607
4605
|
id: z14.uuid().default(uuidv74),
|
|
4608
4606
|
order: z14.number(),
|
|
4609
|
-
approverRole: z14.string().min(1).max(100).default("Approver"),
|
|
4607
|
+
approverRole: z14.string().trim().min(1).max(100).default("Approver"),
|
|
4610
4608
|
approver: ApprovalEmployeeSchema,
|
|
4611
4609
|
actualApprover: ApprovalEmployeeSchema.optional(),
|
|
4612
4610
|
result: ApprovalStepResult.default("NotAvailable"),
|
|
4613
4611
|
resultDate: z14.date().optional(),
|
|
4614
|
-
resultComment: z14.string().max(2e3).optional()
|
|
4612
|
+
resultComment: z14.string().trim().max(2e3).optional()
|
|
4615
4613
|
});
|
|
4616
4614
|
|
|
4617
4615
|
// src/models/approval/ApprovalRequestType.ts
|
|
@@ -4635,11 +4633,11 @@ var ApprovalStatus = z16.enum([
|
|
|
4635
4633
|
// src/models/approval/Approval.ts
|
|
4636
4634
|
var ApprovalSchema = z17.object({
|
|
4637
4635
|
id: z17.uuid().default(uuidv75),
|
|
4638
|
-
number: z17.string().max(30).optional(),
|
|
4639
|
-
applicationName: z17.string().min(1).max(50),
|
|
4636
|
+
number: z17.string().trim().max(30).optional(),
|
|
4637
|
+
applicationName: z17.string().trim().min(1).max(50),
|
|
4640
4638
|
type: ApprovalRequestType.default("Single"),
|
|
4641
4639
|
status: ApprovalStatus,
|
|
4642
|
-
emailBody: z17.string().min(1),
|
|
4640
|
+
emailBody: z17.string().trim().min(1),
|
|
4643
4641
|
created: z17.date(),
|
|
4644
4642
|
createdBy: z17.custom(),
|
|
4645
4643
|
updated: z17.date(),
|
|
@@ -4674,8 +4672,8 @@ var CreateApprovalSchema = ApprovalSchema.pick({
|
|
|
4674
4672
|
var ApproveApprovalSchema = z17.object({
|
|
4675
4673
|
id: z17.uuid(),
|
|
4676
4674
|
result: ApprovalStepResult,
|
|
4677
|
-
resultComment: z17.string().max(2e3).optional(),
|
|
4678
|
-
emailBody: z17.string().min(1)
|
|
4675
|
+
resultComment: z17.string().trim().max(2e3).optional(),
|
|
4676
|
+
emailBody: z17.string().trim().min(1)
|
|
4679
4677
|
});
|
|
4680
4678
|
var ResubmitApprovalSchema = ApprovalSchema.pick({
|
|
4681
4679
|
id: true,
|
|
@@ -4699,13 +4697,13 @@ var ResubmitApprovalSchema = ApprovalSchema.pick({
|
|
|
4699
4697
|
});
|
|
4700
4698
|
var CancelApprovalSchema = z17.object({
|
|
4701
4699
|
id: z17.uuid(),
|
|
4702
|
-
comment: z17.string().min(1).max(2e3),
|
|
4703
|
-
emailBody: z17.string().min(1)
|
|
4700
|
+
comment: z17.string().trim().min(1).max(2e3),
|
|
4701
|
+
emailBody: z17.string().trim().min(1)
|
|
4704
4702
|
});
|
|
4705
4703
|
var WithdrawApprovalSchema = z17.object({
|
|
4706
4704
|
id: z17.uuid(),
|
|
4707
|
-
comment: z17.string().min(1).max(2e3),
|
|
4708
|
-
emailBody: z17.string().min(1)
|
|
4705
|
+
comment: z17.string().trim().min(1).max(2e3),
|
|
4706
|
+
emailBody: z17.string().trim().min(1)
|
|
4709
4707
|
});
|
|
4710
4708
|
export {
|
|
4711
4709
|
ApprovalEmployeeSchema,
|
|
@@ -4738,6 +4736,7 @@ export {
|
|
|
4738
4736
|
RouterTab,
|
|
4739
4737
|
TypographyWithIcon,
|
|
4740
4738
|
WithdrawApprovalSchema,
|
|
4739
|
+
httpClient,
|
|
4741
4740
|
rootRouteHead,
|
|
4742
4741
|
t,
|
|
4743
4742
|
useDeleteFile,
|
|
@@ -4764,13 +4763,11 @@ export {
|
|
|
4764
4763
|
useGetPeopleSoftEmployeesSearch,
|
|
4765
4764
|
useGetPeopleSoftPreviousEmployeeIds,
|
|
4766
4765
|
useLayoutForm,
|
|
4767
|
-
default2 as useLocalStorageState,
|
|
4768
4766
|
useOpenFile,
|
|
4769
4767
|
useTranslation8 as useTranslation,
|
|
4770
4768
|
useUpdateFileMeta,
|
|
4771
4769
|
useUploadFile,
|
|
4772
4770
|
uuidv76 as uuidv7,
|
|
4773
|
-
wczApiClient,
|
|
4774
4771
|
withLayoutForm
|
|
4775
4772
|
};
|
|
4776
4773
|
/*! Bundled license information:
|