wcz-layout 10.1.2 → 10.1.7
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/{AggregatedCell-C7nAQyMO.mjs → AggregatedCell-CqGptV6i.mjs} +199 -150
- package/dist/AggregatedCell-CqGptV6i.mjs.map +1 -0
- package/dist/Approval-DoD-GRRH.mjs.map +1 -1
- package/dist/DialogsContext-DLqA8RJ_.mjs.map +1 -1
- package/dist/Email-BzQQkbe9.mjs.map +1 -1
- package/dist/FileMeta-DDqUju1Y.mjs.map +1 -1
- package/dist/{LayoutTable-DX9IaO8V.d.mts → LayoutTable-CRo43iWr.d.mts} +7 -3
- package/dist/{RouterListItemButton-ULMlaQh6.mjs → RouterListItemButton-ke6iPKkL.mjs} +9 -9
- package/dist/RouterListItemButton-ke6iPKkL.mjs.map +1 -0
- package/dist/{approval-DiNOXd4B.mjs → approval-L09uPzTU.mjs} +2 -2
- package/dist/approval-L09uPzTU.mjs.map +1 -0
- package/dist/auth.d.mts +1 -0
- package/dist/auth.mjs +15 -12
- package/dist/auth.mjs.map +1 -1
- package/dist/components.d.mts +1 -1
- package/dist/components.mjs +594 -361
- package/dist/components.mjs.map +1 -1
- package/dist/{createApi-DGJJ4I_R.mjs → createApi-BhNkG4jz.mjs} +3 -3
- package/dist/createApi-BhNkG4jz.mjs.map +1 -0
- package/dist/data/client.mjs +3 -3
- package/dist/data/client.mjs.map +1 -1
- package/dist/data/server.mjs +4 -4
- package/dist/data/server.mjs.map +1 -1
- package/dist/{file-C14fhUeg.mjs → file-Chlljz3o.mjs} +4 -4
- package/dist/file-Chlljz3o.mjs.map +1 -0
- package/dist/{file-C5BOj1q8.mjs → file-Dl8JCcqy.mjs} +4 -4
- package/dist/file-Dl8JCcqy.mjs.map +1 -0
- package/dist/hooks.d.mts +2 -1
- package/dist/hooks.mjs +541 -591
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.d.mts +9 -0
- package/dist/index.mjs +438 -428
- package/dist/index.mjs.map +1 -1
- package/dist/middleware.mjs +2 -2
- package/dist/middleware.mjs.map +1 -1
- package/dist/models.mjs.map +1 -1
- package/dist/{peoplesoft-BkJMCcHb.mjs → peoplesoft-BhintHQz.mjs} +3 -3
- package/dist/peoplesoft-BhintHQz.mjs.map +1 -0
- package/dist/{providers-DrairEO2.mjs → providers-BvuZWkpD.mjs} +2 -2
- package/dist/providers-BvuZWkpD.mjs.map +1 -0
- package/dist/{tokens-BLRreL1j.mjs → tokens-XuFhVbh5.mjs} +9 -6
- package/dist/tokens-XuFhVbh5.mjs.map +1 -0
- package/dist/{utils-BUpDoqme.mjs → utils-CaeVFWF-.mjs} +18 -7
- package/dist/utils-CaeVFWF-.mjs.map +1 -0
- package/dist/utils.mjs +1 -1
- package/dist/vite.mjs +11 -0
- package/dist/vite.mjs.map +1 -1
- package/package.json +131 -130
- package/skills/client-db/SKILL.md +136 -136
- package/skills/db-schema/SKILL.md +98 -98
- package/skills/dialogs/SKILL.md +74 -74
- package/skills/forms/SKILL.md +122 -122
- package/skills/general/SKILL.md +127 -127
- package/skills/general/references/exports.md +6 -1
- package/skills/migrations/SKILL.md +57 -57
- package/skills/migrations/versions/migrate-v10-to-v11.md +2 -1
- package/skills/migrations/versions/migrate-v9-to-v10.md +582 -582
- package/skills/routing/SKILL.md +87 -87
- package/skills/server-functions/SKILL.md +95 -95
- package/skills/services/SKILL.md +34 -34
- package/skills/services/docs/email.md +32 -32
- package/skills/services/docs/file.md +108 -108
- package/skills/services/docs/peoplesoft.md +114 -114
- package/skills/start/SKILL.md +52 -52
- package/skills/start/steps/01-git-setup.md +10 -10
- package/skills/start/steps/02-project-name-setup.md +19 -19
- package/skills/start/steps/03-apm-setup.md +97 -208
- package/skills/start/steps/04-wicop-setup.md +105 -105
- package/skills/start/steps/05-database-setup.md +52 -52
- package/skills/start/steps/06-entra-setup.md +96 -96
- package/skills/start/steps/07-vault-setup.md +115 -115
- package/skills/start/steps/08-generate-favicon.md +8 -8
- package/skills/start/steps/09-gitlab-ci.md +25 -25
- package/skills/start/steps/10-commit.md +15 -15
- package/skills/table/SKILL.md +266 -264
- package/dist/AggregatedCell-C7nAQyMO.mjs.map +0 -1
- package/dist/RouterListItemButton-ULMlaQh6.mjs.map +0 -1
- package/dist/approval-DiNOXd4B.mjs.map +0 -1
- package/dist/createApi-DGJJ4I_R.mjs.map +0 -1
- package/dist/file-C14fhUeg.mjs.map +0 -1
- package/dist/file-C5BOj1q8.mjs.map +0 -1
- package/dist/peoplesoft-BkJMCcHb.mjs.map +0 -1
- package/dist/providers-DrairEO2.mjs.map +0 -1
- package/dist/tokens-BLRreL1j.mjs.map +0 -1
- package/dist/utils-BUpDoqme.mjs.map +0 -1
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
# file
|
|
2
|
-
|
|
3
|
-
## Client
|
|
4
|
-
|
|
5
|
-
- Query:
|
|
6
|
-
`fileMetasQueryOptions`
|
|
7
|
-
`fileThumbnailQueryOptions`
|
|
8
|
-
`fileQueryOptions`
|
|
9
|
-
- Mutation:
|
|
10
|
-
`downloadFileMutationOptions`
|
|
11
|
-
`openFileMutationOptions`
|
|
12
|
-
`updateFileMetaMutationOptions`
|
|
13
|
-
`deleteFileMutationOptions`
|
|
14
|
-
`batchDeleteFilesMutationOptions`
|
|
15
|
-
`uploadFileMutationOptions`
|
|
16
|
-
|
|
17
|
-
## Server
|
|
18
|
-
|
|
19
|
-
- Fetch:
|
|
20
|
-
`getFileMetas`
|
|
21
|
-
`getFileThumbnail`
|
|
22
|
-
`getFile`
|
|
23
|
-
`downloadFile`
|
|
24
|
-
- Mutate:
|
|
25
|
-
`updateFileMeta`
|
|
26
|
-
`deleteFile`
|
|
27
|
-
`batchDeleteFiles`
|
|
28
|
-
`uploadFile`
|
|
29
|
-
|
|
30
|
-
## Schemas/Models
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
const FileMetaSchema = z.object({
|
|
34
|
-
id: z.uuid(),
|
|
35
|
-
subId: z.uuid(),
|
|
36
|
-
appName: z.string().trim().min(1).max(255),
|
|
37
|
-
fileName: z.string().trim().min(1).max(255),
|
|
38
|
-
fileExtension: z.string().trim().min(1).max(255),
|
|
39
|
-
fileSize: z.number().min(0),
|
|
40
|
-
mediaSubType: z.string().trim().min(1).max(255),
|
|
41
|
-
mediaType: z.string().trim().min(1).max(255),
|
|
42
|
-
mimeType: z.string().trim().min(1).max(255),
|
|
43
|
-
createdBy: z.string().trim().min(1).max(255),
|
|
44
|
-
createdDate: z.date(),
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const GetFileMetasSchema = z.object({
|
|
48
|
-
appName: z.string().min(1).max(255),
|
|
49
|
-
subId: z.uuid(),
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
const FileSchema = z.object({
|
|
53
|
-
appName: z.string().min(1).max(255),
|
|
54
|
-
id: z.uuid(),
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
const UpdateFileMetaSchema = FileMetaSchema.extend({
|
|
58
|
-
fileName: z.string().min(1).max(255),
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const UploadFileMetaSchema = z.object({
|
|
62
|
-
appName: z.string().min(1).max(255),
|
|
63
|
-
subId: z.uuid(),
|
|
64
|
-
file: z.instanceof(File),
|
|
65
|
-
});
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Examples
|
|
69
|
-
|
|
70
|
-
```ts
|
|
71
|
-
import { fileMetasQueryOptions, fileQueryOptions, uploadFileMutationOptions } from "wcz-layout/data/client";
|
|
72
|
-
import { Dropzone, FileViewer } from "wcz-layout/components";
|
|
73
|
-
import { useInView } from "wcz-layout/hooks";
|
|
74
|
-
|
|
75
|
-
// fetch metas + fetch first file
|
|
76
|
-
const { ref, inView } = useInView();
|
|
77
|
-
|
|
78
|
-
const { data: fileMetas = [] } = useQuery({
|
|
79
|
-
...fileMetasQueryOptions({ appName: packageJson.name, subId }),
|
|
80
|
-
enabled: inView,
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
const { data: file } = useQuery({
|
|
84
|
-
...fileQueryOptions({ appName: packageJson.name, id: fileMetas[0]?.id ?? "" }),
|
|
85
|
-
enabled: !!fileMetas[0],
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
// upload
|
|
89
|
-
const [progress, setProgress] = useState(0);
|
|
90
|
-
const { mutateAsync: uploadFile } = useMutation(uploadFileMutationOptions({ queryClient }));
|
|
91
|
-
|
|
92
|
-
// Dropzone
|
|
93
|
-
const onDrop = async (acceptedFiles: File[]) => {
|
|
94
|
-
await Promise.allSettled(
|
|
95
|
-
acceptedFiles.map((file) =>
|
|
96
|
-
uploadFile({ appName: packageJson.name, subId, file, setProgress }),
|
|
97
|
-
),
|
|
98
|
-
);
|
|
99
|
-
setUploadProgress(0);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
<Dropzone onDrop={onDrop} progress={progress} />
|
|
103
|
-
|
|
104
|
-
// File Viewer - no manual fetch metas needed (default)
|
|
105
|
-
<FileViewer appName={packageJson.name} subId={subId}>
|
|
106
|
-
{(component) => <component.Grid />} // or component.List
|
|
107
|
-
</FileViewer>
|
|
108
|
-
```
|
|
1
|
+
# file
|
|
2
|
+
|
|
3
|
+
## Client
|
|
4
|
+
|
|
5
|
+
- Query:
|
|
6
|
+
`fileMetasQueryOptions`
|
|
7
|
+
`fileThumbnailQueryOptions`
|
|
8
|
+
`fileQueryOptions`
|
|
9
|
+
- Mutation:
|
|
10
|
+
`downloadFileMutationOptions`
|
|
11
|
+
`openFileMutationOptions`
|
|
12
|
+
`updateFileMetaMutationOptions`
|
|
13
|
+
`deleteFileMutationOptions`
|
|
14
|
+
`batchDeleteFilesMutationOptions`
|
|
15
|
+
`uploadFileMutationOptions`
|
|
16
|
+
|
|
17
|
+
## Server
|
|
18
|
+
|
|
19
|
+
- Fetch:
|
|
20
|
+
`getFileMetas`
|
|
21
|
+
`getFileThumbnail`
|
|
22
|
+
`getFile`
|
|
23
|
+
`downloadFile`
|
|
24
|
+
- Mutate:
|
|
25
|
+
`updateFileMeta`
|
|
26
|
+
`deleteFile`
|
|
27
|
+
`batchDeleteFiles`
|
|
28
|
+
`uploadFile`
|
|
29
|
+
|
|
30
|
+
## Schemas/Models
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
const FileMetaSchema = z.object({
|
|
34
|
+
id: z.uuid(),
|
|
35
|
+
subId: z.uuid(),
|
|
36
|
+
appName: z.string().trim().min(1).max(255),
|
|
37
|
+
fileName: z.string().trim().min(1).max(255),
|
|
38
|
+
fileExtension: z.string().trim().min(1).max(255),
|
|
39
|
+
fileSize: z.number().min(0),
|
|
40
|
+
mediaSubType: z.string().trim().min(1).max(255),
|
|
41
|
+
mediaType: z.string().trim().min(1).max(255),
|
|
42
|
+
mimeType: z.string().trim().min(1).max(255),
|
|
43
|
+
createdBy: z.string().trim().min(1).max(255),
|
|
44
|
+
createdDate: z.date(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const GetFileMetasSchema = z.object({
|
|
48
|
+
appName: z.string().min(1).max(255),
|
|
49
|
+
subId: z.uuid(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const FileSchema = z.object({
|
|
53
|
+
appName: z.string().min(1).max(255),
|
|
54
|
+
id: z.uuid(),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const UpdateFileMetaSchema = FileMetaSchema.extend({
|
|
58
|
+
fileName: z.string().min(1).max(255),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const UploadFileMetaSchema = z.object({
|
|
62
|
+
appName: z.string().min(1).max(255),
|
|
63
|
+
subId: z.uuid(),
|
|
64
|
+
file: z.instanceof(File),
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Examples
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { fileMetasQueryOptions, fileQueryOptions, uploadFileMutationOptions } from "wcz-layout/data/client";
|
|
72
|
+
import { Dropzone, FileViewer } from "wcz-layout/components";
|
|
73
|
+
import { useInView } from "wcz-layout/hooks";
|
|
74
|
+
|
|
75
|
+
// fetch metas + fetch first file
|
|
76
|
+
const { ref, inView } = useInView();
|
|
77
|
+
|
|
78
|
+
const { data: fileMetas = [] } = useQuery({
|
|
79
|
+
...fileMetasQueryOptions({ appName: packageJson.name, subId }),
|
|
80
|
+
enabled: inView,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const { data: file } = useQuery({
|
|
84
|
+
...fileQueryOptions({ appName: packageJson.name, id: fileMetas[0]?.id ?? "" }),
|
|
85
|
+
enabled: !!fileMetas[0],
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// upload
|
|
89
|
+
const [progress, setProgress] = useState(0);
|
|
90
|
+
const { mutateAsync: uploadFile } = useMutation(uploadFileMutationOptions({ queryClient }));
|
|
91
|
+
|
|
92
|
+
// Dropzone
|
|
93
|
+
const onDrop = async (acceptedFiles: File[]) => {
|
|
94
|
+
await Promise.allSettled(
|
|
95
|
+
acceptedFiles.map((file) =>
|
|
96
|
+
uploadFile({ appName: packageJson.name, subId, file, setProgress }),
|
|
97
|
+
),
|
|
98
|
+
);
|
|
99
|
+
setUploadProgress(0);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
<Dropzone onDrop={onDrop} progress={progress} />
|
|
103
|
+
|
|
104
|
+
// File Viewer - no manual fetch metas needed (default)
|
|
105
|
+
<FileViewer appName={packageJson.name} subId={subId}>
|
|
106
|
+
{(component) => <component.Grid />} // or component.List
|
|
107
|
+
</FileViewer>
|
|
108
|
+
```
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
# peoplesoft
|
|
2
|
-
|
|
3
|
-
## Client
|
|
4
|
-
|
|
5
|
-
- Employee:
|
|
6
|
-
`searchEmployeesQueryOptions`
|
|
7
|
-
`employeesQueryOptions`
|
|
8
|
-
`activeEmployeesQueryOptions`
|
|
9
|
-
`employeeByEmployeeIdQueryOptions`
|
|
10
|
-
`previousEmployeeIdsQueryOptions`
|
|
11
|
-
`employeeSupervisorQueryOptions`
|
|
12
|
-
`employeeSubordinatesQueryOptions`
|
|
13
|
-
`employeeManagerQueryOptions`
|
|
14
|
-
`employeeGeneralManagerQueryOptions`
|
|
15
|
-
`companyGeneralManagerQueryOptions`
|
|
16
|
-
`searchEmployees`
|
|
17
|
-
`getEmployees`
|
|
18
|
-
`getActiveEmployees`
|
|
19
|
-
- Department:
|
|
20
|
-
`departmentsQueryOptions`
|
|
21
|
-
`departmentByIdQueryOptions`
|
|
22
|
-
`departmentManagerQueryOptions`
|
|
23
|
-
`departmentEmployeesQueryOptions`
|
|
24
|
-
`getDepartments`
|
|
25
|
-
|
|
26
|
-
## Server
|
|
27
|
-
|
|
28
|
-
- Employee:
|
|
29
|
-
`searchEmployees`
|
|
30
|
-
`getEmployees`
|
|
31
|
-
`getActiveEmployees`
|
|
32
|
-
`getEmployeeByEmployeeId`
|
|
33
|
-
`getPreviousEmployeeIds`
|
|
34
|
-
`getEmployeeSupervisor`
|
|
35
|
-
`getEmployeeSubordinates`
|
|
36
|
-
`getEmployeeManager`
|
|
37
|
-
`getEmployeeGeneralManager`
|
|
38
|
-
`getCompanyGeneralManager`
|
|
39
|
-
- Department:
|
|
40
|
-
`getDepartments`
|
|
41
|
-
`getDepartmentById`
|
|
42
|
-
`getDepartmentManager`
|
|
43
|
-
`getDepartmentEmployees`
|
|
44
|
-
|
|
45
|
-
## Schemas/Models
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
const EmployeeSchema = z.object({
|
|
49
|
-
badgeId: z.string().trim(),
|
|
50
|
-
category: z.string().trim(),
|
|
51
|
-
categoryGroup: EmployeeCategoryGroup,
|
|
52
|
-
companyCode: z.string().trim(),
|
|
53
|
-
contactPhone: z.string().trim(),
|
|
54
|
-
departmentId: z.string().trim(),
|
|
55
|
-
departmentDescription: z.string().trim(),
|
|
56
|
-
emailString: z.string().trim().nullable(),
|
|
57
|
-
employeeId: z.string().trim(),
|
|
58
|
-
extensionNumber: z.string().trim(),
|
|
59
|
-
firstName: z.string().trim(),
|
|
60
|
-
gender: z.string().trim(),
|
|
61
|
-
hiredDate: z.date(),
|
|
62
|
-
lastName: z.string().trim(),
|
|
63
|
-
managerId: z.string().trim(),
|
|
64
|
-
middleName: z.string().trim(),
|
|
65
|
-
name: z.string().trim(),
|
|
66
|
-
nameTitleCase: z.string().trim(),
|
|
67
|
-
nfcSn: z.string().trim(),
|
|
68
|
-
plantId: z.string().trim(),
|
|
69
|
-
position: z.string().trim(),
|
|
70
|
-
previousEmployeeIds: z.string().trim().nullable(),
|
|
71
|
-
reHiredDate: z.date().nullable(),
|
|
72
|
-
recordNumber: z.number(),
|
|
73
|
-
status: EmployeeStatus,
|
|
74
|
-
supervisorId: z.string().trim(),
|
|
75
|
-
terminationDate: z.date().nullable(),
|
|
76
|
-
terminationFutureDate: z.date().nullable(),
|
|
77
|
-
type: z.string().trim(),
|
|
78
|
-
upperDepartmentId: z.string().trim(),
|
|
79
|
-
jobCode: z.string().trim(),
|
|
80
|
-
jobDescription: z.string().trim(),
|
|
81
|
-
terminationReason: z.string().trim().nullable(),
|
|
82
|
-
supervisorRecordNumber: z.number(),
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
const DepartmentSchema = z.object({
|
|
86
|
-
departmentId: z.string().trim(),
|
|
87
|
-
description: z.string().trim(),
|
|
88
|
-
managerId: z.string().trim(),
|
|
89
|
-
managerRecordNumber: z.string().trim(),
|
|
90
|
-
treeLevel: z.number(),
|
|
91
|
-
upperDepartmentId: z.string().trim(),
|
|
92
|
-
companyCode: z.string().trim(),
|
|
93
|
-
location: z.string().trim(),
|
|
94
|
-
salLocation: z.string().trim(),
|
|
95
|
-
plantId: z.string().trim(),
|
|
96
|
-
manager: EmployeeSchema,
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
const EmployeeCategoryGroup = z.enum(["IDL", "FD", "FI"]);
|
|
100
|
-
const EmployeeStatus = z.enum(["Active", "Terminated", "Leave of Absence"]);
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Examples
|
|
104
|
-
|
|
105
|
-
```ts
|
|
106
|
-
import { activeEmployeesQueryOptions } from "wcz-layout/data/client";
|
|
107
|
-
import { getEmployeeManager } from "wcz-layout/data/server";
|
|
108
|
-
|
|
109
|
-
// client
|
|
110
|
-
const { data: employees = [] } = useQuery(activeEmployeesQueryOptions());
|
|
111
|
-
|
|
112
|
-
// server
|
|
113
|
-
const manager = await getEmployeeManager({ data: { employeeId } });
|
|
114
|
-
```
|
|
1
|
+
# peoplesoft
|
|
2
|
+
|
|
3
|
+
## Client
|
|
4
|
+
|
|
5
|
+
- Employee:
|
|
6
|
+
`searchEmployeesQueryOptions`
|
|
7
|
+
`employeesQueryOptions`
|
|
8
|
+
`activeEmployeesQueryOptions`
|
|
9
|
+
`employeeByEmployeeIdQueryOptions`
|
|
10
|
+
`previousEmployeeIdsQueryOptions`
|
|
11
|
+
`employeeSupervisorQueryOptions`
|
|
12
|
+
`employeeSubordinatesQueryOptions`
|
|
13
|
+
`employeeManagerQueryOptions`
|
|
14
|
+
`employeeGeneralManagerQueryOptions`
|
|
15
|
+
`companyGeneralManagerQueryOptions`
|
|
16
|
+
`searchEmployees`
|
|
17
|
+
`getEmployees`
|
|
18
|
+
`getActiveEmployees`
|
|
19
|
+
- Department:
|
|
20
|
+
`departmentsQueryOptions`
|
|
21
|
+
`departmentByIdQueryOptions`
|
|
22
|
+
`departmentManagerQueryOptions`
|
|
23
|
+
`departmentEmployeesQueryOptions`
|
|
24
|
+
`getDepartments`
|
|
25
|
+
|
|
26
|
+
## Server
|
|
27
|
+
|
|
28
|
+
- Employee:
|
|
29
|
+
`searchEmployees`
|
|
30
|
+
`getEmployees`
|
|
31
|
+
`getActiveEmployees`
|
|
32
|
+
`getEmployeeByEmployeeId`
|
|
33
|
+
`getPreviousEmployeeIds`
|
|
34
|
+
`getEmployeeSupervisor`
|
|
35
|
+
`getEmployeeSubordinates`
|
|
36
|
+
`getEmployeeManager`
|
|
37
|
+
`getEmployeeGeneralManager`
|
|
38
|
+
`getCompanyGeneralManager`
|
|
39
|
+
- Department:
|
|
40
|
+
`getDepartments`
|
|
41
|
+
`getDepartmentById`
|
|
42
|
+
`getDepartmentManager`
|
|
43
|
+
`getDepartmentEmployees`
|
|
44
|
+
|
|
45
|
+
## Schemas/Models
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
const EmployeeSchema = z.object({
|
|
49
|
+
badgeId: z.string().trim(),
|
|
50
|
+
category: z.string().trim(),
|
|
51
|
+
categoryGroup: EmployeeCategoryGroup,
|
|
52
|
+
companyCode: z.string().trim(),
|
|
53
|
+
contactPhone: z.string().trim(),
|
|
54
|
+
departmentId: z.string().trim(),
|
|
55
|
+
departmentDescription: z.string().trim(),
|
|
56
|
+
emailString: z.string().trim().nullable(),
|
|
57
|
+
employeeId: z.string().trim(),
|
|
58
|
+
extensionNumber: z.string().trim(),
|
|
59
|
+
firstName: z.string().trim(),
|
|
60
|
+
gender: z.string().trim(),
|
|
61
|
+
hiredDate: z.date(),
|
|
62
|
+
lastName: z.string().trim(),
|
|
63
|
+
managerId: z.string().trim(),
|
|
64
|
+
middleName: z.string().trim(),
|
|
65
|
+
name: z.string().trim(),
|
|
66
|
+
nameTitleCase: z.string().trim(),
|
|
67
|
+
nfcSn: z.string().trim(),
|
|
68
|
+
plantId: z.string().trim(),
|
|
69
|
+
position: z.string().trim(),
|
|
70
|
+
previousEmployeeIds: z.string().trim().nullable(),
|
|
71
|
+
reHiredDate: z.date().nullable(),
|
|
72
|
+
recordNumber: z.number(),
|
|
73
|
+
status: EmployeeStatus,
|
|
74
|
+
supervisorId: z.string().trim(),
|
|
75
|
+
terminationDate: z.date().nullable(),
|
|
76
|
+
terminationFutureDate: z.date().nullable(),
|
|
77
|
+
type: z.string().trim(),
|
|
78
|
+
upperDepartmentId: z.string().trim(),
|
|
79
|
+
jobCode: z.string().trim(),
|
|
80
|
+
jobDescription: z.string().trim(),
|
|
81
|
+
terminationReason: z.string().trim().nullable(),
|
|
82
|
+
supervisorRecordNumber: z.number(),
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const DepartmentSchema = z.object({
|
|
86
|
+
departmentId: z.string().trim(),
|
|
87
|
+
description: z.string().trim(),
|
|
88
|
+
managerId: z.string().trim(),
|
|
89
|
+
managerRecordNumber: z.string().trim(),
|
|
90
|
+
treeLevel: z.number(),
|
|
91
|
+
upperDepartmentId: z.string().trim(),
|
|
92
|
+
companyCode: z.string().trim(),
|
|
93
|
+
location: z.string().trim(),
|
|
94
|
+
salLocation: z.string().trim(),
|
|
95
|
+
plantId: z.string().trim(),
|
|
96
|
+
manager: EmployeeSchema,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const EmployeeCategoryGroup = z.enum(["IDL", "FD", "FI"]);
|
|
100
|
+
const EmployeeStatus = z.enum(["Active", "Terminated", "Leave of Absence"]);
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Examples
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
import { activeEmployeesQueryOptions } from "wcz-layout/data/client";
|
|
107
|
+
import { getEmployeeManager } from "wcz-layout/data/server";
|
|
108
|
+
|
|
109
|
+
// client
|
|
110
|
+
const { data: employees = [] } = useQuery(activeEmployeesQueryOptions());
|
|
111
|
+
|
|
112
|
+
// server
|
|
113
|
+
const manager = await getEmployeeManager({ data: { employeeId } });
|
|
114
|
+
```
|
package/skills/start/SKILL.md
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: start
|
|
3
|
-
description: "Use when bootstrapping a cloned template: git remote, project rename, APM and WiCOP registration, Postgres, Entra ID, Vault, favicon, GitLab CI, and first push."
|
|
4
|
-
metadata:
|
|
5
|
-
type: workflow
|
|
6
|
-
library: wcz-layout
|
|
7
|
-
disable-model-invocation: "true"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Project initialization
|
|
11
|
-
|
|
12
|
-
## Role
|
|
13
|
-
|
|
14
|
-
You are an AI assistant helping a developer bootstrap a new project from this template.
|
|
15
|
-
|
|
16
|
-
## Execution Rules
|
|
17
|
-
|
|
18
|
-
- Execute steps in order. Read **only** the current step file.
|
|
19
|
-
- Run terminal commands and browser actions yourself. When a step needs user input, ask only the required question through the prescribed question tool, consume the answer, and resume in the same turn.
|
|
20
|
-
- Do not skip ahead or batch multiple steps.
|
|
21
|
-
- When a step has branches (yes/no), follow only the matching branch.
|
|
22
|
-
- To read a step, open the linked file in the **File** column directly.
|
|
23
|
-
|
|
24
|
-
## Opening Message
|
|
25
|
-
|
|
26
|
-
Begin every conversation with:
|
|
27
|
-
|
|
28
|
-
> To make initialization flexible, you can choose:
|
|
29
|
-
>
|
|
30
|
-
> - **Full initialization** for a new project
|
|
31
|
-
> - **Selected steps** from the list below
|
|
32
|
-
|
|
33
|
-
Then list all steps by name so the user can pick.
|
|
34
|
-
|
|
35
|
-
## Steps
|
|
36
|
-
|
|
37
|
-
| # | File | Summary |
|
|
38
|
-
| --- | ---------------------------------------------------------- | ------------------------------- |
|
|
39
|
-
| 1 | [01-git-setup.md](steps/01-git-setup.md) | Configure remote and branch |
|
|
40
|
-
| 2 | [02-project-name-setup.md](steps/02-project-name-setup.md) | Replace placeholder names |
|
|
41
|
-
| 3 | [03-apm-setup.md](steps/03-apm-setup.md) | Register the app internally |
|
|
42
|
-
| 4 | [04-wicop-setup.md](steps/04-wicop-setup.md) | Request release management (CD) |
|
|
43
|
-
| 5 | [05-database-setup.md](steps/05-database-setup.md) | Postgres via Docker or existing |
|
|
44
|
-
| 6 | [06-entra-setup.md](steps/06-entra-setup.md) | Entra ID app registration |
|
|
45
|
-
| 7 | [07-vault-setup.md](steps/07-vault-setup.md) | Vault secrets configuration |
|
|
46
|
-
| 8 | [08-generate-favicon.md](steps/08-generate-favicon.md) | Generate and replace favicon |
|
|
47
|
-
| 9 | [09-gitlab-ci.md](steps/09-gitlab-ci.md) | SAST setup before the first run |
|
|
48
|
-
| 10 | [10-commit.md](steps/10-commit.md) | Commit and push to origin |
|
|
49
|
-
|
|
50
|
-
## Completion
|
|
51
|
-
|
|
52
|
-
After step 10 succeeds, the workflow ends — no further action needed.
|
|
1
|
+
---
|
|
2
|
+
name: start
|
|
3
|
+
description: "Use when bootstrapping a cloned template: git remote, project rename, APM and WiCOP registration, Postgres, Entra ID, Vault, favicon, GitLab CI, and first push."
|
|
4
|
+
metadata:
|
|
5
|
+
type: workflow
|
|
6
|
+
library: wcz-layout
|
|
7
|
+
disable-model-invocation: "true"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Project initialization
|
|
11
|
+
|
|
12
|
+
## Role
|
|
13
|
+
|
|
14
|
+
You are an AI assistant helping a developer bootstrap a new project from this template.
|
|
15
|
+
|
|
16
|
+
## Execution Rules
|
|
17
|
+
|
|
18
|
+
- Execute steps in order. Read **only** the current step file.
|
|
19
|
+
- Run terminal commands and browser actions yourself. When a step needs user input, ask only the required question through the prescribed question tool, consume the answer, and resume in the same turn.
|
|
20
|
+
- Do not skip ahead or batch multiple steps.
|
|
21
|
+
- When a step has branches (yes/no), follow only the matching branch.
|
|
22
|
+
- To read a step, open the linked file in the **File** column directly.
|
|
23
|
+
|
|
24
|
+
## Opening Message
|
|
25
|
+
|
|
26
|
+
Begin every conversation with:
|
|
27
|
+
|
|
28
|
+
> To make initialization flexible, you can choose:
|
|
29
|
+
>
|
|
30
|
+
> - **Full initialization** for a new project
|
|
31
|
+
> - **Selected steps** from the list below
|
|
32
|
+
|
|
33
|
+
Then list all steps by name so the user can pick.
|
|
34
|
+
|
|
35
|
+
## Steps
|
|
36
|
+
|
|
37
|
+
| # | File | Summary |
|
|
38
|
+
| --- | ---------------------------------------------------------- | ------------------------------- |
|
|
39
|
+
| 1 | [01-git-setup.md](steps/01-git-setup.md) | Configure remote and branch |
|
|
40
|
+
| 2 | [02-project-name-setup.md](steps/02-project-name-setup.md) | Replace placeholder names |
|
|
41
|
+
| 3 | [03-apm-setup.md](steps/03-apm-setup.md) | Register the app internally |
|
|
42
|
+
| 4 | [04-wicop-setup.md](steps/04-wicop-setup.md) | Request release management (CD) |
|
|
43
|
+
| 5 | [05-database-setup.md](steps/05-database-setup.md) | Postgres via Docker or existing |
|
|
44
|
+
| 6 | [06-entra-setup.md](steps/06-entra-setup.md) | Entra ID app registration |
|
|
45
|
+
| 7 | [07-vault-setup.md](steps/07-vault-setup.md) | Vault secrets configuration |
|
|
46
|
+
| 8 | [08-generate-favicon.md](steps/08-generate-favicon.md) | Generate and replace favicon |
|
|
47
|
+
| 9 | [09-gitlab-ci.md](steps/09-gitlab-ci.md) | SAST setup before the first run |
|
|
48
|
+
| 10 | [10-commit.md](steps/10-commit.md) | Commit and push to origin |
|
|
49
|
+
|
|
50
|
+
## Completion
|
|
51
|
+
|
|
52
|
+
After step 10 succeeds, the workflow ends — no further action needed.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Git Setup
|
|
2
|
-
|
|
3
|
-
## Actions
|
|
4
|
-
|
|
5
|
-
1. Run `git remote -v`.
|
|
6
|
-
- **No remote exists** → ask for the repository URL, then run `git remote add origin <url>`.
|
|
7
|
-
- **Remote exists** → continue.
|
|
8
|
-
2. Run `git branch --show-current`.
|
|
9
|
-
- **Not `master`** → run `git branch -M master`.
|
|
10
|
-
- **Already `master`** → continue.
|
|
1
|
+
# Git Setup
|
|
2
|
+
|
|
3
|
+
## Actions
|
|
4
|
+
|
|
5
|
+
1. Run `git remote -v`.
|
|
6
|
+
- **No remote exists** → ask for the repository URL, then run `git remote add origin <url>`.
|
|
7
|
+
- **Remote exists** → continue.
|
|
8
|
+
2. Run `git branch --show-current`.
|
|
9
|
+
- **Not `master`** → run `git branch -M master`.
|
|
10
|
+
- **Already `master`** → continue.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# Project Name Setup
|
|
2
|
-
|
|
3
|
-
## User Input
|
|
4
|
-
|
|
5
|
-
Ask via **AskUserQuestion** both questions at once:
|
|
6
|
-
|
|
7
|
-
1. **Full name** (required): "What is your application's full name?"
|
|
8
|
-
2. **Short name** (optional): "What short name should appear in the mobile app bar? Leave blank to omit it."
|
|
9
|
-
|
|
10
|
-
## Actions
|
|
11
|
-
|
|
12
|
-
Using the full name, search-and-replace across the **entire workspace**:
|
|
13
|
-
|
|
14
|
-
| Find | Replace with |
|
|
15
|
-
| -------------- | -------------------------------------- |
|
|
16
|
-
| `project-name` | kebab-case version (e.g. `user-input`) |
|
|
17
|
-
| `Project Name` | Title Case version (e.g. `User Input`) |
|
|
18
|
-
|
|
19
|
-
If a short name was provided, set the `short_name` property in `public/manifest.json` to it.
|
|
1
|
+
# Project Name Setup
|
|
2
|
+
|
|
3
|
+
## User Input
|
|
4
|
+
|
|
5
|
+
Ask via **AskUserQuestion** both questions at once:
|
|
6
|
+
|
|
7
|
+
1. **Full name** (required): "What is your application's full name?"
|
|
8
|
+
2. **Short name** (optional): "What short name should appear in the mobile app bar? Leave blank to omit it."
|
|
9
|
+
|
|
10
|
+
## Actions
|
|
11
|
+
|
|
12
|
+
Using the full name, search-and-replace across the **entire workspace**:
|
|
13
|
+
|
|
14
|
+
| Find | Replace with |
|
|
15
|
+
| -------------- | -------------------------------------- |
|
|
16
|
+
| `project-name` | kebab-case version (e.g. `user-input`) |
|
|
17
|
+
| `Project Name` | Title Case version (e.g. `User Input`) |
|
|
18
|
+
|
|
19
|
+
If a short name was provided, set the `short_name` property in `public/manifest.json` to it.
|