wcz-layout 6.7.2 → 8.3.2
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/Approval-BTJTexDo.js +143 -0
- package/dist/Approval-BTJTexDo.js.map +1 -0
- package/dist/DialogsContext-DLqA8RJ_.js +7 -0
- package/dist/DialogsContext-DLqA8RJ_.js.map +1 -0
- package/dist/Email-C9qwj7GD.js +20 -0
- package/dist/Email-C9qwj7GD.js.map +1 -0
- package/dist/FileMeta-DDqUju1Y.js +19 -0
- package/dist/FileMeta-DDqUju1Y.js.map +1 -0
- package/dist/FileMeta-ILLTOjaM.d.ts +20 -0
- package/dist/NotificationContext-CgwUOeW0.js +7 -0
- package/dist/NotificationContext-CgwUOeW0.js.map +1 -0
- package/dist/RouterListItemButton-owZVvuC_.js +78 -0
- package/dist/RouterListItemButton-owZVvuC_.js.map +1 -0
- package/dist/User-CT_IDGuG.d.ts +15 -0
- package/dist/apiMiddleware-CtY4rOFU.js +23 -0
- package/dist/apiMiddleware-CtY4rOFU.js.map +1 -0
- package/dist/components.d.ts +118 -0
- package/dist/components.js +1554 -0
- package/dist/components.js.map +1 -0
- package/dist/data/client.d.ts +3111 -0
- package/dist/data/client.js +188 -0
- package/dist/data/client.js.map +1 -0
- package/dist/data/server.d.ts +19 -0
- package/dist/data/server.js +16 -0
- package/dist/data/server.js.map +1 -0
- package/dist/data.d.ts +7 -0
- package/dist/data.js +2 -0
- package/dist/env-ON-cyE3N.js +31 -0
- package/dist/env-ON-cyE3N.js.map +1 -0
- package/dist/file-BUdLb7H1.js +148 -0
- package/dist/file-BUdLb7H1.js.map +1 -0
- package/dist/file-Dsht7yOP.js +100 -0
- package/dist/file-Dsht7yOP.js.map +1 -0
- package/dist/hooks.d.ts +226 -0
- package/dist/hooks.js +1180 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +2106 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware.d.ts +47 -0
- package/dist/middleware.js +80 -0
- package/dist/middleware.js.map +1 -0
- package/dist/models.d.ts +474 -0
- package/dist/models.js +74 -0
- package/dist/models.js.map +1 -0
- package/dist/msalClient-CYiQAFnY.d.ts +15 -0
- package/dist/msalServer-B9sVqpQ2.js +47 -0
- package/dist/msalServer-B9sVqpQ2.js.map +1 -0
- package/dist/peoplesoft-BCjRje6b.js +240 -0
- package/dist/peoplesoft-BCjRje6b.js.map +1 -0
- package/dist/peoplesoft-Cze2ngGd.d.ts +1150 -0
- package/dist/queryClient-D64McLhZ.js +7 -0
- package/dist/queryClient-D64McLhZ.js.map +1 -0
- package/dist/useDialogs-BJVhBr8S.js +248 -0
- package/dist/useDialogs-BJVhBr8S.js.map +1 -0
- package/dist/utils-BMUmv2ws.js +191 -0
- package/dist/utils-BMUmv2ws.js.map +1 -0
- package/dist/utils-CvvyM8Xw.d.ts +56 -0
- package/dist/utils.d.ts +21 -0
- package/dist/utils.js +6 -0
- package/dist/vite.d.ts +7 -0
- package/dist/vite.js +147 -0
- package/dist/vite.js.map +1 -0
- package/package.json +158 -62
- package/skills/client-db/SKILL.md +107 -0
- package/skills/data-grid/SKILL.md +147 -0
- package/skills/db-schema/SKILL.md +68 -0
- package/skills/dialogs/SKILL.md +79 -0
- package/skills/forms/SKILL.md +82 -0
- package/skills/general/SKILL.md +17 -0
- package/skills/notifications/SKILL.md +43 -0
- package/skills/routing/SKILL.md +123 -0
- package/skills/server-functions/SKILL.md +109 -0
- package/skills/services/SKILL.md +28 -0
- package/skills/services/docs/approval.md +204 -0
- package/skills/services/docs/email.md +32 -0
- package/skills/services/docs/file.md +85 -0
- package/skills/services/docs/peoplesoft.md +110 -0
- package/skills/start/SKILL.md +46 -0
- package/skills/start/steps/01-git-setup.md +10 -0
- package/skills/start/steps/02-project-name-setup.md +14 -0
- package/skills/start/steps/03-apm-setup.md +208 -0
- package/skills/start/steps/04-database-setup.md +37 -0
- package/skills/start/steps/05-entra-setup.md +59 -0
- package/skills/start/steps/06-vault-setup.md +53 -0
- package/skills/start/steps/07-generate-favicon.md +10 -0
- package/skills/start/steps/08-commit.md +15 -0
- package/dist/src/components/Layout.d.ts +0 -16
- package/dist/src/components/Layout.js +0 -122
- package/dist/src/components/Layout.js.map +0 -1
- package/dist/src/components/dataGrid/ChipInputCell.d.ts +0 -9
- package/dist/src/components/dataGrid/ChipInputCell.js +0 -17
- package/dist/src/components/dataGrid/ChipInputCell.js.map +0 -1
- package/dist/src/components/dataGrid/EditableColumnHeader.d.ts +0 -2
- package/dist/src/components/dataGrid/EditableColumnHeader.js +0 -7
- package/dist/src/components/dataGrid/EditableColumnHeader.js.map +0 -1
- package/dist/src/components/dataGrid/GridToolbar.d.ts +0 -8
- package/dist/src/components/dataGrid/GridToolbar.js +0 -40
- package/dist/src/components/dataGrid/GridToolbar.js.map +0 -1
- package/dist/src/components/dataGrid/TableContainer.d.ts +0 -3
- package/dist/src/components/dataGrid/TableContainer.js +0 -32
- package/dist/src/components/dataGrid/TableContainer.js.map +0 -1
- package/dist/src/components/form/FormAutocomplete.d.ts +0 -7
- package/dist/src/components/form/FormAutocomplete.js +0 -10
- package/dist/src/components/form/FormAutocomplete.js.map +0 -1
- package/dist/src/components/form/FormCheckbox.d.ts +0 -7
- package/dist/src/components/form/FormCheckbox.js +0 -11
- package/dist/src/components/form/FormCheckbox.js.map +0 -1
- package/dist/src/components/form/FormDatePicker.d.ts +0 -9
- package/dist/src/components/form/FormDatePicker.js +0 -19
- package/dist/src/components/form/FormDatePicker.js.map +0 -1
- package/dist/src/components/form/FormDateTimePicker.d.ts +0 -9
- package/dist/src/components/form/FormDateTimePicker.js +0 -19
- package/dist/src/components/form/FormDateTimePicker.js.map +0 -1
- package/dist/src/components/form/FormNumberField.d.ts +0 -12
- package/dist/src/components/form/FormNumberField.js +0 -12
- package/dist/src/components/form/FormNumberField.js.map +0 -1
- package/dist/src/components/form/FormRadioGroup.d.ts +0 -13
- package/dist/src/components/form/FormRadioGroup.js +0 -11
- package/dist/src/components/form/FormRadioGroup.js.map +0 -1
- package/dist/src/components/form/FormSlider.d.ts +0 -7
- package/dist/src/components/form/FormSlider.js +0 -11
- package/dist/src/components/form/FormSlider.js.map +0 -1
- package/dist/src/components/form/FormSubmitButton.d.ts +0 -5
- package/dist/src/components/form/FormSubmitButton.js +0 -13
- package/dist/src/components/form/FormSubmitButton.js.map +0 -1
- package/dist/src/components/form/FormSwitch.d.ts +0 -7
- package/dist/src/components/form/FormSwitch.js +0 -11
- package/dist/src/components/form/FormSwitch.js.map +0 -1
- package/dist/src/components/form/FormTextField.d.ts +0 -7
- package/dist/src/components/form/FormTextField.js +0 -11
- package/dist/src/components/form/FormTextField.js.map +0 -1
- package/dist/src/components/layout/AccountMenu.d.ts +0 -9
- package/dist/src/components/layout/AccountMenu.js +0 -44
- package/dist/src/components/layout/AccountMenu.js.map +0 -1
- package/dist/src/components/layout/DevelopmentBanner.d.ts +0 -7
- package/dist/src/components/layout/DevelopmentBanner.js +0 -29
- package/dist/src/components/layout/DevelopmentBanner.js.map +0 -1
- package/dist/src/components/layout/ErrorPage.d.ts +0 -2
- package/dist/src/components/layout/ErrorPage.js +0 -25
- package/dist/src/components/layout/ErrorPage.js.map +0 -1
- package/dist/src/components/layout/LayoutDialog.d.ts +0 -12
- package/dist/src/components/layout/LayoutDialog.js +0 -12
- package/dist/src/components/layout/LayoutDialog.js.map +0 -1
- package/dist/src/components/layout/LayoutSnackbar.d.ts +0 -8
- package/dist/src/components/layout/LayoutSnackbar.js +0 -25
- package/dist/src/components/layout/LayoutSnackbar.js.map +0 -1
- package/dist/src/components/layout/NavigationDrawer.d.ts +0 -11
- package/dist/src/components/layout/NavigationDrawer.js +0 -70
- package/dist/src/components/layout/NavigationDrawer.js.map +0 -1
- package/dist/src/components/layout/NotificationMenu.d.ts +0 -8
- package/dist/src/components/layout/NotificationMenu.js +0 -26
- package/dist/src/components/layout/NotificationMenu.js.map +0 -1
- package/dist/src/components/layout/TypographyWithIcon.d.ts +0 -7
- package/dist/src/components/layout/TypographyWithIcon.js +0 -22
- package/dist/src/components/layout/TypographyWithIcon.js.map +0 -1
- package/dist/src/components/layout/Unauthorized.d.ts +0 -2
- package/dist/src/components/layout/Unauthorized.js +0 -26
- package/dist/src/components/layout/Unauthorized.js.map +0 -1
- package/dist/src/contexts/LayoutContext.d.ts +0 -40
- package/dist/src/contexts/LayoutContext.js +0 -60
- package/dist/src/contexts/LayoutContext.js.map +0 -1
- package/dist/src/contexts/UserContext.d.ts +0 -24
- package/dist/src/contexts/UserContext.js +0 -55
- package/dist/src/contexts/UserContext.js.map +0 -1
- package/dist/src/hooks/FormHooks.d.ts +0 -46
- package/dist/src/hooks/FormHooks.js +0 -31
- package/dist/src/hooks/FormHooks.js.map +0 -1
- package/dist/src/hooks/UseSnackbar.d.ts +0 -10
- package/dist/src/hooks/UseSnackbar.js +0 -23
- package/dist/src/hooks/UseSnackbar.js.map +0 -1
- package/dist/src/hooks/UseUser.d.ts +0 -10
- package/dist/src/hooks/UseUser.js +0 -25
- package/dist/src/hooks/UseUser.js.map +0 -1
- package/dist/src/index.d.ts +0 -20
- package/dist/src/index.js +0 -15
- package/dist/src/index.js.map +0 -1
- package/dist/src/models/Error.d.ts +0 -6
- package/dist/src/models/Error.js +0 -2
- package/dist/src/models/Error.js.map +0 -1
- package/dist/src/models/KeycloakSettings.d.ts +0 -8
- package/dist/src/models/KeycloakSettings.js +0 -2
- package/dist/src/models/KeycloakSettings.js.map +0 -1
- package/dist/src/models/LayoutPaletteColorOptions.d.ts +0 -6
- package/dist/src/models/LayoutPaletteColorOptions.js +0 -2
- package/dist/src/models/LayoutPaletteColorOptions.js.map +0 -1
- package/dist/src/models/LayoutRoute.d.ts +0 -14
- package/dist/src/models/LayoutRoute.js +0 -2
- package/dist/src/models/LayoutRoute.js.map +0 -1
- package/dist/src/models/Notification.d.ts +0 -9
- package/dist/src/models/Notification.js +0 -2
- package/dist/src/models/Notification.js.map +0 -1
- package/dist/src/models/PeoplesoftDepartment.d.ts +0 -14
- package/dist/src/models/PeoplesoftDepartment.js +0 -2
- package/dist/src/models/PeoplesoftDepartment.js.map +0 -1
- package/dist/src/models/PeoplesoftEmployee.d.ts +0 -34
- package/dist/src/models/PeoplesoftEmployee.js +0 -2
- package/dist/src/models/PeoplesoftEmployee.js.map +0 -1
- package/dist/src/models/Snackbar.d.ts +0 -15
- package/dist/src/models/Snackbar.js +0 -2
- package/dist/src/models/Snackbar.js.map +0 -1
- package/dist/src/models/User.d.ts +0 -27
- package/dist/src/models/User.js +0 -11
- package/dist/src/models/User.js.map +0 -1
- package/dist/src/models/types/EmployeeCategoryGroup.d.ts +0 -1
- package/dist/src/models/types/EmployeeCategoryGroup.js +0 -2
- package/dist/src/models/types/EmployeeCategoryGroup.js.map +0 -1
- package/dist/src/models/types/EmployeeStatus.d.ts +0 -1
- package/dist/src/models/types/EmployeeStatus.js +0 -2
- package/dist/src/models/types/EmployeeStatus.js.map +0 -1
- package/dist/src/utils/Auth.d.ts +0 -12
- package/dist/src/utils/Auth.js +0 -49
- package/dist/src/utils/Auth.js.map +0 -1
- package/dist/src/utils/Fetches.d.ts +0 -5
- package/dist/src/utils/Fetches.js +0 -66
- package/dist/src/utils/Fetches.js.map +0 -1
- package/dist/src/utils/FormUtils.d.ts +0 -7
- package/dist/src/utils/FormUtils.js +0 -9
- package/dist/src/utils/FormUtils.js.map +0 -1
- package/dist/src/utils/Helpers.d.ts +0 -11
- package/dist/src/utils/Helpers.js +0 -26
- package/dist/src/utils/Helpers.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/components/Layout.tsx +0 -183
- package/src/components/dataGrid/ChipInputCell.tsx +0 -31
- package/src/components/dataGrid/EditableColumnHeader.tsx +0 -7
- package/src/components/dataGrid/GridToolbar.tsx +0 -63
- package/src/components/dataGrid/TableContainer.tsx +0 -39
- package/src/components/form/FormAutocomplete.tsx +0 -34
- package/src/components/form/FormCheckbox.tsx +0 -32
- package/src/components/form/FormDatePicker.tsx +0 -34
- package/src/components/form/FormDateTimePicker.tsx +0 -34
- package/src/components/form/FormNumberField.tsx +0 -33
- package/src/components/form/FormRadioGroup.tsx +0 -43
- package/src/components/form/FormSlider.tsx +0 -28
- package/src/components/form/FormSubmitButton.tsx +0 -29
- package/src/components/form/FormSwitch.tsx +0 -32
- package/src/components/form/FormTextField.tsx +0 -26
- package/src/components/layout/AccountMenu.tsx +0 -160
- package/src/components/layout/DevelopmentBanner.tsx +0 -54
- package/src/components/layout/ErrorPage.tsx +0 -34
- package/src/components/layout/LayoutDialog.tsx +0 -50
- package/src/components/layout/LayoutSnackbar.tsx +0 -44
- package/src/components/layout/NavigationDrawer.tsx +0 -131
- package/src/components/layout/NotificationMenu.tsx +0 -76
- package/src/components/layout/TypographyWithIcon.tsx +0 -35
- package/src/components/layout/Unauthorized.tsx +0 -37
- package/src/contexts/LayoutContext.tsx +0 -127
- package/src/contexts/UserContext.tsx +0 -88
- package/src/hooks/FormHooks.ts +0 -33
- package/src/hooks/UseSnackbar.tsx +0 -28
- package/src/hooks/UseUser.tsx +0 -29
- package/src/index.ts +0 -27
- package/src/models/Error.tsx +0 -6
- package/src/models/KeycloakSettings.ts +0 -8
- package/src/models/LayoutPaletteColorOptions.tsx +0 -7
- package/src/models/LayoutRoute.ts +0 -15
- package/src/models/Notification.ts +0 -10
- package/src/models/PeoplesoftDepartment.ts +0 -15
- package/src/models/PeoplesoftEmployee.ts +0 -35
- package/src/models/Snackbar.ts +0 -16
- package/src/models/User.ts +0 -13
- package/src/models/types/EmployeeCategoryGroup.ts +0 -1
- package/src/models/types/EmployeeStatus.ts +0 -1
- package/src/utils/Auth.ts +0 -58
- package/src/utils/Fetches.ts +0 -83
- package/src/utils/FormUtils.ts +0 -22
- package/src/utils/Helpers.ts +0 -27
- package/tsconfig.json +0 -29
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# APM Setup
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Create the new application entry in **Application Portfolio Management (APM)**. APM is the internal source list of our company applications and must contain the app before later workflows, such as requesting a WiCOP server namespace, can reference it.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Control the browser carefully and fill only information that is known, provided by the user, or visible in APM.
|
|
10
|
+
- Do not click the final approval `Confirm` button until the user has reviewed the approval dialog and explicitly agrees to submit.
|
|
11
|
+
|
|
12
|
+
## Browser Actions
|
|
13
|
+
|
|
14
|
+
1. Open https://apm.wistron.com/ and let user sign in if needed.
|
|
15
|
+
2. Start a new record with `Create` button.
|
|
16
|
+
3. Fill the tabs from left to right using the sections below.
|
|
17
|
+
4. When a tab shows a checkmark/save icon after editing, click it before switching tabs.
|
|
18
|
+
5. If validation errors appear, fix only fields whose correct values are known. Ask the user for the rest.
|
|
19
|
+
|
|
20
|
+
## Tab 1 — Application Information
|
|
21
|
+
|
|
22
|
+
### Basic Information
|
|
23
|
+
|
|
24
|
+
Fill these fields:
|
|
25
|
+
|
|
26
|
+
| APM label | Action |
|
|
27
|
+
| ---------------------------------- | ------------------------------------------------------- |
|
|
28
|
+
| `Application Name` | Enter the user-provided application name in Title Case. |
|
|
29
|
+
| `Application English Abbreviation` | Use the same as `Application name` field. |
|
|
30
|
+
| `Application English Name` | Use the same as `Application name` field. |
|
|
31
|
+
| `Application Chinese Name` | Use the same as `Application name` field. |
|
|
32
|
+
| `BCM Domain` | Ask user to provide business domain. Do not infer. |
|
|
33
|
+
| `Application Description` | Ask user to provide description. |
|
|
34
|
+
| `Initial On-line Date` | Use APM's date picker and set end of curent month. |
|
|
35
|
+
|
|
36
|
+
### HealthCheck
|
|
37
|
+
|
|
38
|
+
Click add icon and fill these fields:
|
|
39
|
+
|
|
40
|
+
| APM label | Action |
|
|
41
|
+
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
42
|
+
| `type` | Search by employee ID or name, select the user-provided owner, and verify the owner appears in the table with job number, name, and email. |
|
|
43
|
+
| `url` | Search by employee ID or name, select the user-provided owner, and verify the owner appears in the table with job number, name, and email. |
|
|
44
|
+
|
|
45
|
+
### Owner Information
|
|
46
|
+
|
|
47
|
+
| APM label | Action |
|
|
48
|
+
| ------------------- | -------------------- |
|
|
49
|
+
| `Application Owner` | Ask user to fill in. |
|
|
50
|
+
|
|
51
|
+
### Development Team Information
|
|
52
|
+
|
|
53
|
+
| APM label | Action |
|
|
54
|
+
| ----------- | -------------------- |
|
|
55
|
+
| `Developer` | Ask user to fill in. |
|
|
56
|
+
|
|
57
|
+
### Maintain Team Information
|
|
58
|
+
|
|
59
|
+
Copy the maintainers from development team. Keep the order!
|
|
60
|
+
|
|
61
|
+
| APM label | Action |
|
|
62
|
+
| ------------ | ------------------------------------------------ |
|
|
63
|
+
| `Maintainer` | Copy by searching `Job Number` from table above. |
|
|
64
|
+
|
|
65
|
+
## Tab 2 — Application Status
|
|
66
|
+
|
|
67
|
+
### Cloud Maturity
|
|
68
|
+
|
|
69
|
+
Fill or confirm these fields with the user:
|
|
70
|
+
|
|
71
|
+
| APM label | Action |
|
|
72
|
+
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| `Hosting Type` | Select the user-confirmed hosting type. For WiCOP deployment this may be `Private Cloud (Kubernetes)`, but still confirm with the user. |
|
|
74
|
+
| `Cloud Maturity Feasibility` | Select the user-confirmed Yes/No value. |
|
|
75
|
+
| `Cloud Maturity Plan Date` | Enter/select the user-provided plan date. |
|
|
76
|
+
| `Postponed Cloud Maturity Date` | Leave unchanged unless the user provides a date. |
|
|
77
|
+
| `Cloud Maturity Date` | Leave unchanged unless the user provides a date. |
|
|
78
|
+
| `Cloud Maturity Progress` | Leave unchanged unless the user provides a progress value. |
|
|
79
|
+
| `Cloud Maturity Remark` | Leave unchanged unless the user provides a remark. |
|
|
80
|
+
| `Cloud Admin Remark` | Read-only or admin-owned. Do not fill unless APM allows and the user provides the exact text. |
|
|
81
|
+
|
|
82
|
+
### Database
|
|
83
|
+
|
|
84
|
+
The screenshot shows this table empty. Add database rows only if the user provides database details. Required row data may include `Database`, `Version`, and `Vendor`.
|
|
85
|
+
|
|
86
|
+
### Main Programming Language
|
|
87
|
+
|
|
88
|
+
The screenshot shows this table empty. Add programming language rows only if the user provides details. Required row data may include `Programming Language`, `Version`, `Status`, `Start Date`, `End Date`, and `Vendor`.
|
|
89
|
+
|
|
90
|
+
### Lifecycle
|
|
91
|
+
|
|
92
|
+
Only the `Lifecycle` heading is visible in the reference screenshot. Do not fill lifecycle data unless APM requires it or the user provides exact values.
|
|
93
|
+
|
|
94
|
+
## Tab 3 — Application Use Status
|
|
95
|
+
|
|
96
|
+
### Application User
|
|
97
|
+
|
|
98
|
+
Fill these fields:
|
|
99
|
+
|
|
100
|
+
| APM label | Action |
|
|
101
|
+
| --------- | ------------------------------------------------------------------------ |
|
|
102
|
+
| `useSite` | Select the user-provided site. Example from screenshot: `WCZ`. |
|
|
103
|
+
| `useBg` | Select the user-provided business group. Example from screenshot: `ALL`. |
|
|
104
|
+
|
|
105
|
+
## Tab 4 — Application Complexity
|
|
106
|
+
|
|
107
|
+
No reference screenshot was provided for this tab. Open it and inspect whether APM requires any fields.
|
|
108
|
+
|
|
109
|
+
- If there are no required fields, leave the tab unchanged.
|
|
110
|
+
- If required fields exist, ask the user for each value before filling it.
|
|
111
|
+
- Do not infer complexity from the codebase or project template.
|
|
112
|
+
|
|
113
|
+
## Tab 5 — Information Security
|
|
114
|
+
|
|
115
|
+
### DevSecOps Information
|
|
116
|
+
|
|
117
|
+
Fill or confirm these fields with the user:
|
|
118
|
+
|
|
119
|
+
| APM label | Action |
|
|
120
|
+
| ----------------------------------------------- | --------------------------------------------------------------------------- |
|
|
121
|
+
| `SAMM Feasibility of Implementation` | Select the user-confirmed Yes/No value. Example from screenshot: `No`. |
|
|
122
|
+
| `DSOMM Feasibility of Implementation` | Select the user-confirmed Yes/No value. Example from screenshot: `Yes`. |
|
|
123
|
+
| `Implementation Completion Date` | Enter/select the user-provided date. Example from screenshot: `2027-01-01`. |
|
|
124
|
+
| `DSOMM/SAMM Execution Progress` | Enter the user-provided progress. Example from screenshot: `0 %`. |
|
|
125
|
+
| `Reasons for DSOMM/SAMM Implementation Failure` | Fill only if the user provides a reason or APM requires one. |
|
|
126
|
+
| `Remarks` | Fill only if the user provides remarks. |
|
|
127
|
+
| `Internet Facing` | Select the user-confirmed Yes/No value. Example from screenshot: `No`. |
|
|
128
|
+
|
|
129
|
+
### Division Lead
|
|
130
|
+
|
|
131
|
+
Fill `Division Lead` by searching for the user-provided employee ID or name. Verify the selected lead appears in the table with job number, name, and email.
|
|
132
|
+
|
|
133
|
+
### Information Security
|
|
134
|
+
|
|
135
|
+
Fill or confirm these fields with the user:
|
|
136
|
+
|
|
137
|
+
| APM label | Action |
|
|
138
|
+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
139
|
+
| `Data Sensitivity` | Select the user-confirmed Yes/No value. Example from screenshot: `No`. |
|
|
140
|
+
| `Is CI/CD Implemented` | Select the user-confirmed Yes/No value. Example from screenshot: `Yes`. |
|
|
141
|
+
| `Is WiCOP Resource Available` | For a brand-new app created before the WiCOP namespace request, this is usually not available yet, but confirm with the user. If the user has an existing WiCOP resource, use the `Check` flow and verify the result. |
|
|
142
|
+
| `Is CMDB/ITSM Resource Available` | Confirm with the user. If they provide a resource name or identifier, enter it and click `Check`; otherwise leave as `No` or the APM default. |
|
|
143
|
+
|
|
144
|
+
Do not create or guess WiCOP, CMDB, or ITSM resource identifiers.
|
|
145
|
+
|
|
146
|
+
## Tab 6 — Approval Status Inquiry
|
|
147
|
+
|
|
148
|
+
Fill `Approval` with the user-confirmed value. The reference screenshot shows `No`, but confirm before using that value.
|
|
149
|
+
|
|
150
|
+
## Tab 7 — Covering Enterprise Domain
|
|
151
|
+
|
|
152
|
+
This tab maps the application to Wistron's enterprise domain taxonomy. These values are business-specific and cannot be determined automatically.
|
|
153
|
+
|
|
154
|
+
### Add Cover Domain Row
|
|
155
|
+
|
|
156
|
+
1. Click the `+` button on the right side of the Cover Domain table.
|
|
157
|
+
2. In the `Edit` dialog, fill the fields from top to bottom using values supplied or selected by the user:
|
|
158
|
+
|
|
159
|
+
| Dialog label | Action |
|
|
160
|
+
| ---------------- | ----------------------------------------------- |
|
|
161
|
+
| `L0 Domain` | Select the user-provided L0 domain. |
|
|
162
|
+
| `L1 Subdomain` | Select the user-provided L1 subdomain. |
|
|
163
|
+
| `L2 Value Chain` | Select the user-provided L2 value chain. |
|
|
164
|
+
| `L3 Activity` | Select one or more user-provided L3 activities. |
|
|
165
|
+
|
|
166
|
+
3. Click `Confirm` in the dialog.
|
|
167
|
+
4. Verify the new row appears in the Cover Domain table.
|
|
168
|
+
|
|
169
|
+
The screenshot example shows `1 Manufacturing` → `1.5 Quality` → `1.5.17 Customer Quality Relationship` → `1.5.17.5 Disaster Emergency Measures And Status Reports`, but use those values only if the user explicitly selects or confirms them.
|
|
170
|
+
|
|
171
|
+
Use `Upload Excel file` only when the user provides a file path and asks to upload domain mappings from Excel.
|
|
172
|
+
|
|
173
|
+
## Tab 8 — Appendix
|
|
174
|
+
|
|
175
|
+
No reference screenshot was provided for this tab. Upload or fill appendix data only if the user provides attachments or exact values. Otherwise leave it unchanged.
|
|
176
|
+
|
|
177
|
+
## Tab 9 — Revised Record
|
|
178
|
+
|
|
179
|
+
This tab is expected to be historical/read-only. Review it only if needed. Do not edit anything unless APM exposes required fields and the user provides exact values.
|
|
180
|
+
|
|
181
|
+
## Tab 10 — Approval Record
|
|
182
|
+
|
|
183
|
+
This tab is expected to be historical/read-only. Review it only if needed. Do not edit anything unless APM exposes required fields and the user provides exact values.
|
|
184
|
+
|
|
185
|
+
## Send Approval Dialog
|
|
186
|
+
|
|
187
|
+
After all required tabs are complete and saved:
|
|
188
|
+
|
|
189
|
+
1. Click `Send Approval` in the top-right area of APM.
|
|
190
|
+
2. A dialog titled `Approval Content` opens. This dialog is not a tab.
|
|
191
|
+
3. Read the warning text: new application values are shown in black; modified existing application values are shown in red.
|
|
192
|
+
4. Scroll through the dialog and verify the summarized values against the user-provided data, especially:
|
|
193
|
+
- basic application names and abbreviation;
|
|
194
|
+
- BCM domain;
|
|
195
|
+
- initial online date;
|
|
196
|
+
- application description;
|
|
197
|
+
- owner, development team, and maintain team;
|
|
198
|
+
- cloud maturity values;
|
|
199
|
+
- use site and use BG;
|
|
200
|
+
- information security values;
|
|
201
|
+
- covering enterprise domain taxonomy.
|
|
202
|
+
5. If anything is missing, wrong, or uncertain, click `Cancel`, return to the relevant tab, and fix it with user input.
|
|
203
|
+
6. Ask the user to confirm submission.
|
|
204
|
+
7. Only after the user explicitly agrees, click `Confirm` in the approval dialog.
|
|
205
|
+
|
|
206
|
+
## Completion
|
|
207
|
+
|
|
208
|
+
The step is complete when APM accepts the approval submission or the user confirms that the APM record has been saved for later submission. Record the generated `EA ID` if APM shows one after saving or submission.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Database Setup
|
|
2
|
+
|
|
3
|
+
## User Input
|
|
4
|
+
|
|
5
|
+
Ask: **"Do you already have a Postgres database created for this project? (yes/no)"**
|
|
6
|
+
|
|
7
|
+
## Branch A — Existing database
|
|
8
|
+
|
|
9
|
+
1. Ask: **"Please enter your database schema name (e.g. `dev_portal`)."**
|
|
10
|
+
2. Update `.env.local` → set `DATABASE_SCHEMA=<user-input>`.
|
|
11
|
+
|
|
12
|
+
## Branch B — No database
|
|
13
|
+
|
|
14
|
+
Ask: **"Would you like me to create a local Postgres database using Docker? (yes/no)"**
|
|
15
|
+
|
|
16
|
+
- **No** → continue to next step.
|
|
17
|
+
- **Yes** → execute the Docker flow below.
|
|
18
|
+
|
|
19
|
+
### Docker flow
|
|
20
|
+
|
|
21
|
+
The container name is `<project-name>-postgres` where `<project-name>` is the kebab-case project name (read from the `name` field in `package.json`).
|
|
22
|
+
|
|
23
|
+
1. Ensure the Docker daemon is running. If not, start Docker Desktop via terminal automatically.
|
|
24
|
+
2. Auto-generate password.
|
|
25
|
+
3. Discover occupied ports by listing **all** containers (including stopped) and pick the first port in **5432 → 5450** that does **not** appear in the output. If all ports are occupied, stop and inform the user.
|
|
26
|
+
4. Run the container on the chosen port:
|
|
27
|
+
|
|
28
|
+
```powershell
|
|
29
|
+
docker run --name <project-name>-postgres -e POSTGRES_PASSWORD=<password> -d -p <PORT>:5432 postgres
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- **Success** → continue.
|
|
33
|
+
- **Error** → stop and show the full error to the user.
|
|
34
|
+
|
|
35
|
+
5. Update `.env.local` → set `DATABASE_URL=postgres://postgres:<password>@localhost:<PORT>/postgres`.
|
|
36
|
+
6. Output exactly:
|
|
37
|
+
> ✅ Local Postgres database created successfully on port [PORT]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Entra ID Setup
|
|
2
|
+
|
|
3
|
+
Execute parts A → B → C sequentially. Pause for user input at each part.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Part A — Application Creation
|
|
8
|
+
|
|
9
|
+
Ask: **"Is the Entra ID application already created for this project? (yes/no)"**
|
|
10
|
+
|
|
11
|
+
- **Yes** → proceed to Part B.
|
|
12
|
+
- **No** → output exactly:
|
|
13
|
+
|
|
14
|
+
> Please navigate to https://itsr.wistron.com/homepage/apply and request the application creation.
|
|
15
|
+
> Actions: Select Service Type → Azure AD - Application Management - Add or Modify → Add Application → Add Applicant → Fill in application details → Submit → Submit.
|
|
16
|
+
> Since approval takes time, we will skip the rest of Entra ID configuration for now. Please type 'done' once you have submitted the request.
|
|
17
|
+
|
|
18
|
+
Wait for "done", then **skip Parts B and C** and continue to the next step.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Part B — Application Configuration
|
|
23
|
+
|
|
24
|
+
Ask: **"Have you configured the Entra ID application settings? (yes/no)"**
|
|
25
|
+
|
|
26
|
+
- **Yes** → proceed to Part C.
|
|
27
|
+
- **No** → output the full configuration guide:
|
|
28
|
+
|
|
29
|
+
> Please navigate to https://entra.microsoft.com/ and configure your application:
|
|
30
|
+
>
|
|
31
|
+
> **Left navigation: App Registrations:**
|
|
32
|
+
>
|
|
33
|
+
> 1. Search for your application and open it.
|
|
34
|
+
> 2. **Authentication:** Add 'Single-page application' and configure your Redirect URIs.
|
|
35
|
+
> 3. **Token Configuration:** Add groups claims → Security groups. Ensure ID, Access, and SAML token properties have checked `sAMAccountName`.
|
|
36
|
+
> 4. **Expose an API:** Set the Application ID URI. Add a Scope named `access_as_user` (Admins and users) with appropriate display names/descriptions.
|
|
37
|
+
> 5. **Owners:** Add other developers as owners.
|
|
38
|
+
> 6. **Manifest:** Update the `api` object: `"acceptMappedClaims": true` and `"requestedAccessTokenVersion": 2`.
|
|
39
|
+
>
|
|
40
|
+
> **Left navigation: Enterprise Applications:**
|
|
41
|
+
>
|
|
42
|
+
> 1. Search for your application and open it.
|
|
43
|
+
> 2. **Single Sign-on:** Add custom claims for `employeeId` (Source: user.extensionattribute5) and `department` (Source: user.department). Optionally add `employeeCategory` (Source: user.extensionattribute13) and `companyName` (Source: user.companyname).
|
|
44
|
+
> 3. **Owners:** Add other developers as owners.
|
|
45
|
+
>
|
|
46
|
+
> Once you have finished these steps, type 'continue'.
|
|
47
|
+
|
|
48
|
+
Wait for "continue", then proceed to Part C.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Part C — Credentials
|
|
53
|
+
|
|
54
|
+
Ask: **"Please provide the CLIENT_ID and CLIENT_SECRET for your Entra ID application."**
|
|
55
|
+
|
|
56
|
+
Once received:
|
|
57
|
+
|
|
58
|
+
1. Update `.env.local` → set `VITE_ENTRA_CLIENT_ID=<CLIENT_ID>`.
|
|
59
|
+
2. **CRITICAL**: Do **not** save `CLIENT_SECRET` to any file. Memorize it in context for use in the Vault Setup step only.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Vault Setup
|
|
2
|
+
|
|
3
|
+
Execute parts A → B → C sequentially. Pause for user input at each part.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Part A — Default Secrets
|
|
8
|
+
|
|
9
|
+
Output:
|
|
10
|
+
|
|
11
|
+
> 1. Navigate to https://vault-dev.wistron.com:8200/ui/ and log in.
|
|
12
|
+
> 2. Find your project, open the "default" secret path, click 'Edit' (toggle 'View as JSON').
|
|
13
|
+
> 3. Copy and paste the following JSON block, then save. When finished, type 'done'.
|
|
14
|
+
|
|
15
|
+
Provide this JSON with values pulled from `.env.local` and the memorized `CLIENT_SECRET`:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"DATABASE_URL": "[DATABASE_URL from .env.local]",
|
|
20
|
+
"ENTRA_CLIENT_ID": "[VITE_ENTRA_CLIENT_ID from .env.local]",
|
|
21
|
+
"ENTRA_CLIENT_SECRET": "[memorized CLIENT_SECRET]",
|
|
22
|
+
"ENTRA_TENANT_ID": "de0795e0-d7c0-4eeb-b9bb-bc94d8980d3b"
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Wait for "done".
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Part B — Harbor Vault Secret
|
|
31
|
+
|
|
32
|
+
Output:
|
|
33
|
+
|
|
34
|
+
> Now, go to the root path of your project in Vault and click 'Create secret'.
|
|
35
|
+
>
|
|
36
|
+
> 1. Name it exactly: `harborvault`
|
|
37
|
+
> 2. Toggle 'JSON' mode.
|
|
38
|
+
> 3. Go to another existing project in your Vault, copy the JSON values from its `harborvault` secret, and paste them into this new one, then save.
|
|
39
|
+
>
|
|
40
|
+
> Once finished, type 'done'.
|
|
41
|
+
|
|
42
|
+
Wait for "done".
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Part C — Local Vault Credentials
|
|
47
|
+
|
|
48
|
+
Ask: **"Please provide your Vault Username and Password so I can add them to your local environment."**
|
|
49
|
+
|
|
50
|
+
Once received, update `.env.local`:
|
|
51
|
+
|
|
52
|
+
- `VAULT_USERNAME=<username>`
|
|
53
|
+
- `VAULT_PASSWORD=<password>`
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Favicon Generation
|
|
2
|
+
|
|
3
|
+
> 1. Navigate to https://favicon.io/favicon-converter/
|
|
4
|
+
> 2. Upload your app logo (at least 512×512 pixels for best results).
|
|
5
|
+
> 3. Download the generated `.zip` file and extract its contents.
|
|
6
|
+
> 4. Replace everything inside your project's `/public` folder with those extracted files.
|
|
7
|
+
>
|
|
8
|
+
> Once you have finished replacing the files, type 'done'.
|
|
9
|
+
|
|
10
|
+
Wait for "done".
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Initial Commit
|
|
2
|
+
|
|
3
|
+
## Actions
|
|
4
|
+
|
|
5
|
+
Run sequentially:
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
git add .
|
|
9
|
+
git commit -m "initial project setup"
|
|
10
|
+
git push -u origin master
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Wait for completion. Once the push succeeds, output:
|
|
14
|
+
|
|
15
|
+
> **✅ Project initialization is complete! Happy coding.**
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { Dispatch, SetStateAction } from "react";
|
|
2
|
-
import { LayoutPaletteColorOptions } from "../models/LayoutPaletteColorOptions";
|
|
3
|
-
import { LayoutRoute } from "../models/LayoutRoute";
|
|
4
|
-
import Notification from "../models/Notification";
|
|
5
|
-
import { User } from "../models/User";
|
|
6
|
-
interface LayoutProps {
|
|
7
|
-
routes: LayoutRoute[];
|
|
8
|
-
appVersion: string;
|
|
9
|
-
colors: LayoutPaletteColorOptions;
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
user: User;
|
|
12
|
-
notifications: Notification[] | undefined;
|
|
13
|
-
setNotifications: Dispatch<SetStateAction<Notification[] | undefined>>;
|
|
14
|
-
}
|
|
15
|
-
export declare const Layout: React.FC<LayoutProps>;
|
|
16
|
-
export {};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Menu } from "@mui/icons-material";
|
|
3
|
-
import { Box, Chip, CssBaseline, IconButton, LinearProgress, AppBar as MuiAppBar, Toolbar, Typography, useMediaQuery } from "@mui/material";
|
|
4
|
-
import { grey } from "@mui/material/colors";
|
|
5
|
-
import { csCZ, enUS } from "@mui/material/locale";
|
|
6
|
-
import { ThemeProvider, createTheme, styled } from "@mui/material/styles";
|
|
7
|
-
import { csCZ as dataGridCsCz, enUS as dataGridEnUs } from "@mui/x-data-grid-premium/locales";
|
|
8
|
-
import { csCZ as datePickersCsCz, enUS as datePickersEnUs } from "@mui/x-date-pickers-pro/locales";
|
|
9
|
-
import { useIsFetching, useIsMutating } from "@tanstack/react-query";
|
|
10
|
-
import { useEffect, useState } from "react";
|
|
11
|
-
import { useTranslation } from "react-i18next";
|
|
12
|
-
import { matchPath, useLocation } from "react-router-dom";
|
|
13
|
-
import { environment } from "../utils/Helpers";
|
|
14
|
-
import { AccountMenu } from "./layout/AccountMenu";
|
|
15
|
-
import { DevelopmentBanner } from "./layout/DevelopmentBanner";
|
|
16
|
-
import { NavigationDrawer } from "./layout/NavigationDrawer";
|
|
17
|
-
import { NotificationMenu } from "./layout/NotificationMenu";
|
|
18
|
-
import { Unauthorized } from "./layout/Unauthorized";
|
|
19
|
-
import useLocalStorageState from "use-local-storage-state";
|
|
20
|
-
import { useIsAuthenticated, useMsal } from "@azure/msal-react";
|
|
21
|
-
import { InteractionStatus } from "@azure/msal-browser";
|
|
22
|
-
//Drawer
|
|
23
|
-
const drawerWidth = 240;
|
|
24
|
-
const DrawerHeader = styled("div")(({ theme }) => ({
|
|
25
|
-
display: "flex",
|
|
26
|
-
alignItems: "center",
|
|
27
|
-
justifyContent: "flex-end",
|
|
28
|
-
padding: theme.spacing(0, 1),
|
|
29
|
-
// necessary for content to be below app bar
|
|
30
|
-
...theme.mixins.toolbar,
|
|
31
|
-
}));
|
|
32
|
-
const AppBar = styled(MuiAppBar, {
|
|
33
|
-
shouldForwardProp: (prop) => prop !== "open",
|
|
34
|
-
})(({ theme, open }) => ({
|
|
35
|
-
zIndex: theme.zIndex.drawer + 1,
|
|
36
|
-
transition: theme.transitions.create(["width", "margin"], {
|
|
37
|
-
easing: theme.transitions.easing.sharp,
|
|
38
|
-
duration: theme.transitions.duration.leavingScreen,
|
|
39
|
-
}),
|
|
40
|
-
...(open && {
|
|
41
|
-
marginLeft: drawerWidth,
|
|
42
|
-
width: `calc(100% - ${drawerWidth}px)`,
|
|
43
|
-
transition: theme.transitions.create(["width", "margin"], {
|
|
44
|
-
easing: theme.transitions.easing.sharp,
|
|
45
|
-
duration: theme.transitions.duration.enteringScreen,
|
|
46
|
-
}),
|
|
47
|
-
}),
|
|
48
|
-
}));
|
|
49
|
-
const getAllRoutesWithPath = (routes) => {
|
|
50
|
-
let result = [];
|
|
51
|
-
for (const route of routes) {
|
|
52
|
-
if (route.path) {
|
|
53
|
-
result.push(route);
|
|
54
|
-
}
|
|
55
|
-
if (route.children) {
|
|
56
|
-
result = result.concat(getAllRoutesWithPath(route.children));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return result;
|
|
60
|
-
};
|
|
61
|
-
export const Layout = ({ routes, colors, appVersion, user, notifications, setNotifications, children }) => {
|
|
62
|
-
var _a, _b, _c, _d, _e;
|
|
63
|
-
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
|
64
|
-
const [mode, setMode] = useLocalStorageState("mui-mode", { defaultValue: "system" });
|
|
65
|
-
const [leftDrawerOpen, setLeftDrawerOpen] = useState(false);
|
|
66
|
-
const { i18n } = useTranslation();
|
|
67
|
-
const isFetching = !!useIsFetching();
|
|
68
|
-
const isMutating = !!useIsMutating();
|
|
69
|
-
const location = useLocation();
|
|
70
|
-
const navigationRoutes = getAllRoutesWithPath(routes);
|
|
71
|
-
const route = navigationRoutes.find(r => matchPath(r.path, location.pathname));
|
|
72
|
-
const { instance, inProgress } = useMsal();
|
|
73
|
-
const isAuthenticated = useIsAuthenticated();
|
|
74
|
-
useEffect(() => {
|
|
75
|
-
if (route.authenticated !== false && !isAuthenticated && inProgress === InteractionStatus.None)
|
|
76
|
-
instance.loginRedirect({ scopes: [], redirectUri: "/" });
|
|
77
|
-
}, [route, isAuthenticated, inProgress]);
|
|
78
|
-
const resolvedMode = mode === "system" ? (prefersDarkMode ? "dark" : "light") : mode;
|
|
79
|
-
const theme = createTheme({
|
|
80
|
-
palette: {
|
|
81
|
-
mode: resolvedMode,
|
|
82
|
-
primary: { main: ((_a = colors.primary) === null || _a === void 0 ? void 0 : _a[resolvedMode]) || ((_b = colors.primary) === null || _b === void 0 ? void 0 : _b.main), },
|
|
83
|
-
secondary: { main: ((_c = colors.secondary) === null || _c === void 0 ? void 0 : _c[resolvedMode]) || ((_d = colors.secondary) === null || _d === void 0 ? void 0 : _d.main), },
|
|
84
|
-
background: resolvedMode === "light" && colors.background ? { default: colors.background.default, paper: colors.background.paper, } : {},
|
|
85
|
-
},
|
|
86
|
-
components: {
|
|
87
|
-
MuiCssBaseline: {
|
|
88
|
-
styleOverrides: (theme) => ({
|
|
89
|
-
body: {
|
|
90
|
-
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
91
|
-
width: "0.7em",
|
|
92
|
-
height: "0.7em",
|
|
93
|
-
},
|
|
94
|
-
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {
|
|
95
|
-
backgroundColor: theme.palette.mode === "dark" ? grey[900] : grey[200],
|
|
96
|
-
borderRadius: "5px",
|
|
97
|
-
},
|
|
98
|
-
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
99
|
-
backgroundColor: theme.palette.mode === "dark" ? grey[800] : grey[400],
|
|
100
|
-
borderRadius: "10px",
|
|
101
|
-
},
|
|
102
|
-
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
103
|
-
backgroundColor: theme.palette.mode === "dark" ? grey[700] : grey[500],
|
|
104
|
-
},
|
|
105
|
-
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
|
|
106
|
-
backgroundColor: "transparent",
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
}),
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
}, i18n.language === "cs" ? datePickersCsCz : datePickersEnUs, i18n.language === "cs" ? dataGridCsCz : dataGridEnUs, i18n.language === "cs" ? csCZ : enUS);
|
|
113
|
-
const title = (_e = route.pageTitle) !== null && _e !== void 0 ? _e : route.title;
|
|
114
|
-
useEffect(() => {
|
|
115
|
-
if (title)
|
|
116
|
-
document.title = title;
|
|
117
|
-
}, [title]);
|
|
118
|
-
const toggleNavigationDrawer = () => setLeftDrawerOpen(!leftDrawerOpen);
|
|
119
|
-
const hasNavigationRoutes = navigationRoutes.filter(route => route.showInMenu && !route.disabled).length > 1;
|
|
120
|
-
return (_jsxs(ThemeProvider, { theme: theme, children: [_jsxs(Box, { sx: { display: "flex", position: "sticky" }, children: [_jsx(CssBaseline, {}), _jsx(AppBar, { position: "fixed", open: leftDrawerOpen, children: _jsxs(Toolbar, { children: [_jsx(IconButton, { color: "inherit", onClick: toggleNavigationDrawer, edge: "start", sx: { marginRight: 2, ...((leftDrawerOpen || !hasNavigationRoutes) && { display: "none" }) }, children: _jsx(Menu, {}) }), _jsx(Typography, { variant: "h6", noWrap: true, component: "div", sx: { flexGrow: 1 }, children: title }), environment !== "prd" && _jsx(Chip, { sx: theme => ({ mr: 1, bgcolor: "secondary.main", color: theme.palette.primary.contrastText }), label: environment }), _jsx(NotificationMenu, { notifications: notifications, setNotifications: setNotifications }), _jsx(AccountMenu, { mode: mode, setMode: setMode, user: user })] }) }), _jsx(NavigationDrawer, { routes: navigationRoutes, appVersion: appVersion, open: leftDrawerOpen, setOpen: setLeftDrawerOpen, hasRoutes: hasNavigationRoutes }), _jsxs(Box, { component: "main", sx: { flex: 1, overflow: "auto" }, children: [_jsx(DrawerHeader, {}), (route.authenticated === false || isAuthenticated) && !route.disabled ? children : _jsx(Unauthorized, {})] })] }), _jsx(DevelopmentBanner, { user: user, hasNavigationRoutes: hasNavigationRoutes }), (isFetching || isMutating) && _jsx(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })] }));
|
|
121
|
-
};
|
|
122
|
-
//# sourceMappingURL=Layout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../../src/components/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,IAAI,SAAS,EAAwC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAClL,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC9F,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAc,EAA4B,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAK1D,OAAO,EAAE,WAAW,EAAE,MAA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AG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAI,IAC5G,CACnB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { Menu } from \"@mui/icons-material\";\r\nimport { Box, Chip, CssBaseline, IconButton, LinearProgress, AppBar as MuiAppBar, AppBarProps as MuiAppBarProps, Theme, Toolbar, Typography, useMediaQuery } from \"@mui/material\";\r\nimport { grey } from \"@mui/material/colors\";\r\nimport { csCZ, enUS } from \"@mui/material/locale\";\r\nimport { ThemeProvider, createTheme, styled } from \"@mui/material/styles\";\r\nimport { csCZ as dataGridCsCz, enUS as dataGridEnUs } from \"@mui/x-data-grid-premium/locales\";\r\nimport { csCZ as datePickersCsCz, enUS as datePickersEnUs } from \"@mui/x-date-pickers-pro/locales\";\r\nimport { useIsFetching, useIsMutating } from \"@tanstack/react-query\";\r\nimport React, { Dispatch, SetStateAction, useEffect, useState } from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { matchPath, useLocation } from \"react-router-dom\";\r\nimport { LayoutPaletteColorOptions } from \"../models/LayoutPaletteColorOptions\";\r\nimport { LayoutRoute } from \"../models/LayoutRoute\";\r\nimport Notification from \"../models/Notification\";\r\nimport { User } from \"../models/User\";\r\nimport { environment } from \"../utils/Helpers\";\r\nimport { AccountMenu } from \"./layout/AccountMenu\";\r\nimport { DevelopmentBanner } from \"./layout/DevelopmentBanner\";\r\nimport { NavigationDrawer } from \"./layout/NavigationDrawer\";\r\nimport { NotificationMenu } from \"./layout/NotificationMenu\";\r\nimport { Unauthorized } from \"./layout/Unauthorized\";\r\nimport useLocalStorageState from \"use-local-storage-state\";\r\nimport { useIsAuthenticated, useMsal } from \"@azure/msal-react\";\r\nimport { InteractionStatus } from \"@azure/msal-browser\";\r\n\r\n//Drawer\r\nconst drawerWidth = 240;\r\nconst DrawerHeader = styled(\"div\")(({ theme }) => ({\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"flex-end\",\r\n padding: theme.spacing(0, 1),\r\n // necessary for content to be below app bar\r\n ...theme.mixins.toolbar,\r\n}));\r\n\r\n//AppBar\r\ninterface AppBarProps extends MuiAppBarProps {\r\n open?: boolean;\r\n}\r\n\r\nconst AppBar = styled(MuiAppBar, {\r\n shouldForwardProp: (prop) => prop !== \"open\",\r\n})<AppBarProps>(({ theme, open }) => ({\r\n zIndex: theme.zIndex.drawer + 1,\r\n transition: theme.transitions.create([\"width\", \"margin\"], {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.leavingScreen,\r\n }),\r\n ...(open && {\r\n marginLeft: drawerWidth,\r\n width: `calc(100% - ${drawerWidth}px)`,\r\n transition: theme.transitions.create([\"width\", \"margin\"], {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.enteringScreen,\r\n }),\r\n }),\r\n}));\r\n\r\nconst getAllRoutesWithPath = (routes: LayoutRoute[]): LayoutRoute[] => {\r\n let result: LayoutRoute[] = [];\r\n for (const route of routes) {\r\n if (route.path) {\r\n result.push(route);\r\n }\r\n if (route.children) {\r\n result = result.concat(getAllRoutesWithPath(route.children));\r\n }\r\n }\r\n return result;\r\n};\r\n\r\ninterface LayoutProps {\r\n routes: LayoutRoute[];\r\n appVersion: string;\r\n colors: LayoutPaletteColorOptions;\r\n children: React.ReactNode;\r\n user: User;\r\n notifications: Notification[] | undefined;\r\n setNotifications: Dispatch<SetStateAction<Notification[] | undefined>>;\r\n}\r\n\r\nexport const Layout: React.FC<LayoutProps> = ({ routes, colors, appVersion, user, notifications, setNotifications, children }) => {\r\n const prefersDarkMode: boolean = useMediaQuery(\"(prefers-color-scheme: dark)\");\r\n const [mode, setMode] = useLocalStorageState<\"light\" | \"dark\" | \"system\">(\"mui-mode\", { defaultValue: \"system\" });\r\n const [leftDrawerOpen, setLeftDrawerOpen] = useState<boolean>(false);\r\n const { i18n } = useTranslation();\r\n const isFetching = !!useIsFetching();\r\n const isMutating = !!useIsMutating();\r\n const location = useLocation();\r\n const navigationRoutes = getAllRoutesWithPath(routes);\r\n const route = navigationRoutes.find(r => matchPath(r.path!, location.pathname))!;\r\n const { instance, inProgress } = useMsal();\r\n const isAuthenticated = useIsAuthenticated();\r\n\r\n useEffect(() => {\r\n if (route.authenticated !== false && !isAuthenticated && inProgress === InteractionStatus.None)\r\n instance.loginRedirect({ scopes: [], redirectUri: \"/\" });\r\n }, [route, isAuthenticated, inProgress]);\r\n\r\n const resolvedMode = mode === \"system\" ? (prefersDarkMode ? \"dark\" : \"light\") : mode;\r\n\r\n const theme: Theme = createTheme({\r\n palette: {\r\n mode: resolvedMode,\r\n primary: { main: (colors.primary as any)?.[resolvedMode] || (colors.primary as any)?.main, },\r\n secondary: { main: (colors.secondary as any)?.[resolvedMode] || (colors.secondary as any)?.main, },\r\n background: resolvedMode === \"light\" && colors.background ? { default: colors.background.default, paper: colors.background.paper, } : {},\r\n },\r\n components: {\r\n MuiCssBaseline: {\r\n styleOverrides: (theme) => ({\r\n body: {\r\n \"&::-webkit-scrollbar, & *::-webkit-scrollbar\": {\r\n width: \"0.7em\",\r\n height: \"0.7em\",\r\n },\r\n \"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track\": {\r\n backgroundColor: theme.palette.mode === \"dark\" ? grey[900] : grey[200],\r\n borderRadius: \"5px\",\r\n },\r\n \"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb\": {\r\n backgroundColor: theme.palette.mode === \"dark\" ? grey[800] : grey[400],\r\n borderRadius: \"10px\",\r\n },\r\n \"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover\": {\r\n backgroundColor: theme.palette.mode === \"dark\" ? grey[700] : grey[500],\r\n },\r\n \"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner\": {\r\n backgroundColor: \"transparent\",\r\n },\r\n },\r\n }),\r\n },\r\n },\r\n },\r\n i18n.language === \"cs\" ? datePickersCsCz : datePickersEnUs,\r\n i18n.language === \"cs\" ? dataGridCsCz : dataGridEnUs,\r\n i18n.language === \"cs\" ? csCZ : enUS\r\n );\r\n\r\n const title = route.pageTitle ?? route.title;\r\n\r\n useEffect(() => {\r\n if (title) document.title = title;\r\n }, [title]);\r\n\r\n const toggleNavigationDrawer = () => setLeftDrawerOpen(!leftDrawerOpen);\r\n\r\n const hasNavigationRoutes: boolean = navigationRoutes.filter(route => route.showInMenu && !route.disabled).length > 1;\r\n\r\n return (\r\n <ThemeProvider theme={theme}>\r\n <Box sx={{ display: \"flex\", position: \"sticky\" }}>\r\n <CssBaseline />\r\n <AppBar position=\"fixed\" open={leftDrawerOpen}>\r\n <Toolbar>\r\n <IconButton color=\"inherit\" onClick={toggleNavigationDrawer} edge=\"start\" sx={{ marginRight: 2, ...((leftDrawerOpen || !hasNavigationRoutes) && { display: \"none\" }) }} >\r\n <Menu />\r\n </IconButton>\r\n\r\n <Typography variant=\"h6\" noWrap component=\"div\" sx={{ flexGrow: 1 }}>{title}</Typography>\r\n\r\n {environment !== \"prd\" && <Chip sx={theme => ({ mr: 1, bgcolor: \"secondary.main\", color: theme.palette.primary.contrastText })} label={environment} />}\r\n\r\n <NotificationMenu notifications={notifications} setNotifications={setNotifications} />\r\n <AccountMenu mode={mode} setMode={setMode} user={user}/>\r\n </Toolbar>\r\n </AppBar>\r\n\r\n <NavigationDrawer routes={navigationRoutes} appVersion={appVersion} open={leftDrawerOpen} setOpen={setLeftDrawerOpen} hasRoutes={hasNavigationRoutes} />\r\n\r\n <Box component=\"main\" sx={{ flex: 1, overflow: \"auto\" }}>\r\n <DrawerHeader />\r\n {(route.authenticated === false || isAuthenticated) && !route.disabled ? children : <Unauthorized />}\r\n </Box>\r\n </Box>\r\n\r\n <DevelopmentBanner user={user} hasNavigationRoutes={hasNavigationRoutes} />\r\n {(isFetching || isMutating) && <LinearProgress sx={{ position: \"fixed\", top: { xs: 56, sm: 64 }, left: 0, right: 0 }} />}\r\n </ThemeProvider>\r\n );\r\n};\r\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ChipProps } from "@mui/material";
|
|
2
|
-
import { GridRenderCellParams, GridValidRowModel } from "@mui/x-data-grid-premium";
|
|
3
|
-
interface ChipInputCellProps<T extends GridValidRowModel> {
|
|
4
|
-
params: GridRenderCellParams<T>;
|
|
5
|
-
slotProps?: ChipProps;
|
|
6
|
-
getLabel?: (object: T) => string | number;
|
|
7
|
-
}
|
|
8
|
-
export declare const ChipInputCell: <T extends GridValidRowModel>({ params, slotProps, getLabel }: ChipInputCellProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Chip, Stack } from "@mui/material";
|
|
3
|
-
import { newGuid } from "../../utils/Helpers";
|
|
4
|
-
const isArray = (value) => Array.isArray(value);
|
|
5
|
-
export const ChipInputCell = ({ params, slotProps, getLabel }) => {
|
|
6
|
-
if (!params.value)
|
|
7
|
-
return null;
|
|
8
|
-
const getLabelValue = (value) => {
|
|
9
|
-
if (getLabel)
|
|
10
|
-
return getLabel(value);
|
|
11
|
-
return value;
|
|
12
|
-
};
|
|
13
|
-
if (isArray(params.value))
|
|
14
|
-
return (_jsx(Stack, { direction: "row", alignItems: "center", gap: 1, sx: { overflowX: "auto", height: "100%", width: params.colDef.computedWidth }, children: params.value.map((value) => _jsx(Chip, { label: getLabelValue(value), ...slotProps }, newGuid())) }));
|
|
15
|
-
return _jsx(Chip, { label: getLabelValue(params.value), ...slotProps });
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=ChipInputCell.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChipInputCell.js","sourceRoot":"","sources":["../../../../src/components/dataGrid/ChipInputCell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAa,KAAK,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,OAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAQrD,MAAM,CAAC,MAAM,aAAa,GAAG,CAA8B,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAyB,EAAE,EAAE;IACjH,IAAI,CAAC,MAAM,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAE/B,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE;QACjC,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC;IAEF,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;QACrB,OAAO,CACH,KAAC,KAAK,IAAC,SAAS,EAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,YAC3H,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAC7B,KAAC,IAAI,IAAiB,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,KAAM,SAAS,IAArD,OAAO,EAAE,CAAgD,CACvE,GACG,CACX,CAAC;IAEN,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,KAAM,SAAS,GAAI,CAAC;AACvE,CAAC,CAAC","sourcesContent":["import { Chip, ChipProps, Stack } from \"@mui/material\";\r\nimport { GridRenderCellParams, GridValidRowModel } from \"@mui/x-data-grid-premium\";\r\nimport { newGuid } from \"../../utils/Helpers\";\r\n\r\nconst isArray = (value: any) => Array.isArray(value);\r\n\r\ninterface ChipInputCellProps<T extends GridValidRowModel> {\r\n params: GridRenderCellParams<T>;\r\n slotProps?: ChipProps;\r\n getLabel?: (object: T) => string | number;\r\n}\r\n\r\nexport const ChipInputCell = <T extends GridValidRowModel>({ params, slotProps, getLabel }: ChipInputCellProps<T>) => {\r\n if (!params.value) return null;\r\n\r\n const getLabelValue = (value: any) => {\r\n if (getLabel) return getLabel(value);\r\n return value;\r\n };\r\n\r\n if (isArray(params.value))\r\n return (\r\n <Stack direction=\"row\" alignItems=\"center\" gap={1} sx={{ overflowX: \"auto\", height: \"100%\", width: params.colDef.computedWidth }}>\r\n {params.value.map((value: any) =>\r\n <Chip key={newGuid()} label={getLabelValue(value)} {...slotProps} />\r\n )}\r\n </Stack>\r\n );\r\n\r\n return <Chip label={getLabelValue(params.value)} {...slotProps} />;\r\n};"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Edit } from "@mui/icons-material";
|
|
3
|
-
import { TypographyWithIcon } from "../layout/TypographyWithIcon";
|
|
4
|
-
export const EditableColumnHeader = ({ colDef }) => {
|
|
5
|
-
return _jsx(TypographyWithIcon, { endIcon: _jsx(Edit, { color: "disabled", fontSize: "small" }), variant: "body2", className: "MuiDataGrid-columnHeaderTitle", children: colDef.headerName });
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=EditableColumnHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditableColumnHeader.js","sourceRoot":"","sources":["../../../../src/components/dataGrid/EditableColumnHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAA8B,EAAE,MAAM,EAA6B,EAAE,EAAE;IACvG,OAAO,KAAC,kBAAkB,IAAC,OAAO,EAAE,KAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,GAAG,EAAE,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,+BAA+B,YAAE,MAAM,CAAC,UAAU,GAAsB,CAAC;AACvL,CAAC,CAAC","sourcesContent":["import { Edit } from \"@mui/icons-material\";\r\nimport { GridColumnHeaderParams, GridValidRowModel } from \"@mui/x-data-grid-premium\";\r\nimport { TypographyWithIcon } from \"../layout/TypographyWithIcon\";\r\n\r\nexport const EditableColumnHeader = <T extends GridValidRowModel>({ colDef }: GridColumnHeaderParams<T>) => {\r\n return <TypographyWithIcon endIcon={<Edit color=\"disabled\" fontSize=\"small\" />} variant=\"body2\" className=\"MuiDataGrid-columnHeaderTitle\">{colDef.headerName}</TypographyWithIcon>;\r\n};"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GridToolbarProps as MuiGridToolbarProps } from "@mui/x-data-grid-premium";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface GridToolbarProps extends MuiGridToolbarProps {
|
|
4
|
-
actions?: React.ReactNode[];
|
|
5
|
-
hideAddNewRow?: boolean;
|
|
6
|
-
newRowDefaultValue?: any;
|
|
7
|
-
}
|
|
8
|
-
export declare const GridToolbar: React.FC<GridToolbarProps>;
|