@asaleh37/ui-base 1.0.9 → 1.1.1

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.
Files changed (127) hide show
  1. package/dist/index.js +31 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +31 -1
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +28 -25
  6. package/rollup.config.js +38 -36
  7. package/src/components/App.tsx +31 -0
  8. package/src/components/BaseApp.tsx +2 -1
  9. package/src/components/admin/AttachmentGrid.tsx +116 -0
  10. package/src/components/admin/AuthorityGrid.tsx +88 -0
  11. package/src/components/admin/BluePrintGrid.tsx +55 -0
  12. package/src/components/admin/BluePrintPageGrid.tsx +85 -0
  13. package/src/components/admin/BluePrintPointGrid.tsx +85 -0
  14. package/src/components/admin/DashboardGrid.tsx +95 -0
  15. package/src/components/admin/DashboardWidgetGrid.tsx +75 -0
  16. package/src/components/admin/DataQueryGrid.tsx +75 -0
  17. package/src/components/admin/DataQueryParameterGrid.tsx +98 -0
  18. package/src/components/admin/DatasourceConnectionGrid.tsx +98 -0
  19. package/src/components/admin/EmployeeGrid.tsx +105 -0
  20. package/src/components/admin/EntityParameterGrid.tsx +125 -0
  21. package/src/components/admin/ExcelUploaderDetailGrid.tsx +78 -0
  22. package/src/components/admin/ExcelUploaderHeaderGrid.tsx +78 -0
  23. package/src/components/admin/LookupGrid.tsx +95 -0
  24. package/src/components/admin/MailAttachmentGrid.tsx +65 -0
  25. package/src/components/admin/MailBodyGrid.tsx +105 -0
  26. package/src/components/admin/MailNotificationQueueGrid.tsx +131 -0
  27. package/src/components/admin/MailRecipientGrid.tsx +75 -0
  28. package/src/components/admin/MailTemplateGrid.tsx +145 -0
  29. package/src/components/admin/NewTableGrid.tsx +65 -0
  30. package/src/components/admin/NotificationGrid.tsx +115 -0
  31. package/src/components/admin/NotificationQueueGrid.tsx +125 -0
  32. package/src/components/admin/OrganizationApplicationGrid.tsx +81 -0
  33. package/src/components/admin/OrganizationGrid.tsx +65 -0
  34. package/src/components/admin/OrganizationRankGrid.tsx +85 -0
  35. package/src/components/admin/OrganizationUnitGrid.tsx +85 -0
  36. package/src/components/admin/OrganizationUserGrid.tsx +75 -0
  37. package/src/components/admin/OrganizationUserRoleGrid.tsx +98 -0
  38. package/src/components/admin/ReportGrid.tsx +155 -0
  39. package/src/components/admin/ReportParameterGrid.tsx +95 -0
  40. package/src/components/admin/RoleAuthorityGrid.tsx +65 -0
  41. package/src/components/admin/RoleGrid.tsx +78 -0
  42. package/src/components/admin/UserAccountGrid.tsx +65 -0
  43. package/src/components/admin/UserRequestGrid.tsx +145 -0
  44. package/src/components/admin/WidgetGrid.tsx +175 -0
  45. package/src/components/admin/WorkflowDocumentActionGrid.tsx +111 -0
  46. package/src/components/admin/WorkflowDocumentActionHistoryGrid.tsx +111 -0
  47. package/src/components/admin/WorkflowDocumentActionMailGrid.tsx +71 -0
  48. package/src/components/admin/WorkflowDocumentGrid.tsx +185 -0
  49. package/src/components/admin/WorkflowDocumentMailLogGrid.tsx +141 -0
  50. package/src/components/admin/WorkflowDocumentStatusGrid.tsx +121 -0
  51. package/src/components/common/Home.tsx +31 -0
  52. package/src/components/common/LanguageSwitcher.tsx +25 -0
  53. package/src/components/common/LayoutHandlers.tsx +12 -0
  54. package/src/components/common/LoadingMask.tsx +19 -0
  55. package/src/components/common/Login.tsx +183 -0
  56. package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +288 -0
  57. package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +201 -0
  58. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormAction.tsx +60 -0
  59. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +194 -0
  60. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementGroup.tsx +98 -0
  61. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/CheckBox.tsx +64 -0
  62. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +94 -0
  63. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/Datefield.tsx +65 -0
  64. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/DatetimeField.tsx +64 -0
  65. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/FiltersPanel.tsx +237 -0
  66. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +9 -0
  67. package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +256 -0
  68. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +188 -0
  69. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +844 -0
  70. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridMultiRecordAction.tsx +89 -0
  71. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridRecordAction.tsx +92 -0
  72. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridTopBar.tsx +228 -0
  73. package/src/components/templates/DataEntryTemplates/useApiActions.ts +125 -0
  74. package/src/components/templates/TransferList.tsx +250 -0
  75. package/src/components/templates/Window/ConfirmationWindow.tsx +55 -0
  76. package/src/components/templates/visuals/TemplateDashboard.tsx +126 -0
  77. package/src/components/templates/visuals/charts/TemplateBarChart.tsx +16 -0
  78. package/src/components/templates/visuals/charts/TemplateDataCard.tsx +60 -0
  79. package/src/components/templates/visuals/charts/TemplateGauge.tsx +16 -0
  80. package/src/components/templates/visuals/charts/TemplateLineChart.tsx +16 -0
  81. package/src/components/templates/visuals/charts/TemplateLineProgress.tsx +40 -0
  82. package/src/components/templates/visuals/charts/TemplatePieChart.tsx +25 -0
  83. package/src/hooks/UseConfirmationWindow.tsx +54 -0
  84. package/src/hooks/UseMobile.tsx +13 -0
  85. package/src/hooks/UseSession.tsx +26 -0
  86. package/src/hooks/UseWindow.tsx +106 -0
  87. package/src/hooks/useAxios.tsx +271 -0
  88. package/src/hooks/useLoadingMask.tsx +16 -0
  89. package/src/layout/DrawerHeader.tsx +10 -0
  90. package/src/layout/Layout.tsx +122 -0
  91. package/src/layout/MainContent.tsx +43 -0
  92. package/src/layout/MobileDrawer.tsx +103 -0
  93. package/src/layout/NavigationTree.tsx +284 -0
  94. package/src/layout/SideBar.tsx +80 -0
  95. package/src/layout/TopBar.tsx +142 -0
  96. package/src/locales/arabic/adminLocalsAr.json +356 -0
  97. package/src/locales/arabic/common.json +34 -0
  98. package/src/locales/arabic/index.ts +7 -0
  99. package/src/locales/english/adminLocalsEn.json +356 -0
  100. package/src/locales/english/common.json +33 -0
  101. package/src/locales/english/index.ts +6 -0
  102. package/src/locales/english/index.tsx +0 -0
  103. package/src/locales/i18n.ts +15 -0
  104. package/src/locales/index.ts +9 -0
  105. package/src/navigationItems/Administration/adminNavigationItems.tsx +182 -0
  106. package/src/navigationItems/Administration/index.tsx +71 -0
  107. package/src/navigationItems/common/CommonNavigationItems.tsx +12 -0
  108. package/src/navigationItems/common/index.tsx +7 -0
  109. package/src/navigationItems/index.tsx +34 -0
  110. package/src/redux/features/administration/AdministrationStoresMetaData.ts +72 -0
  111. package/src/redux/features/business/BusinessStoresMetaData.ts +3 -0
  112. package/src/redux/features/business/CommonStoreSlice.ts +37 -0
  113. package/src/redux/features/common/AppInfoSlice.ts +30 -0
  114. package/src/redux/features/common/AppLayoutSlice.ts +37 -0
  115. package/src/redux/features/common/LoadingMaskSlice.ts +30 -0
  116. package/src/redux/features/common/UserSessionSlice.ts +62 -0
  117. package/src/redux/store.ts +10 -10
  118. package/src/routes/administration/adminRoutes.tsx +259 -0
  119. package/src/routes/administration/index.ts +4 -0
  120. package/src/routes/index.ts +11 -0
  121. package/src/routes/types/index.ts +5 -0
  122. package/src/theme/DarkThemeOptions.ts +30 -0
  123. package/src/theme/LightThemeOptions.ts +34 -0
  124. package/src/util/AppUtils.ts +18 -0
  125. package/src/util/constants.ts +2 -0
  126. package/tsconfig.json +2 -2
  127. package/src/redux/CounterSlice.ts +0 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "1.0.9",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -13,31 +13,10 @@
13
13
  "dev": "vite"
14
14
  },
15
15
  "devDependencies": {
16
- "@rollup/plugin-commonjs": "^28.0.3",
17
- "@rollup/plugin-node-resolve": "^16.0.1",
18
- "@rollup/plugin-terser": "^0.4.4",
19
- "@rollup/plugin-typescript": "^12.1.2",
20
- "@types/react": "^19.1.6",
21
- "react": "^19.1.0",
22
- "rollup-plugin-dts": "^6.2.1",
23
- "rollup-plugin-peer-deps-external": "^2.2.4",
24
- "tslib": "^2.8.1",
25
- "@eslint/js": "^9.19.0",
26
- "@types/react-dom": "^19.0.3",
27
- "@types/react-i18next": "^7.8.3",
28
- "@vitejs/plugin-react": "^4.3.4",
29
- "eslint": "^9.19.0",
30
- "eslint-plugin-react-hooks": "^5.0.0",
31
- "eslint-plugin-react-refresh": "^0.4.18",
32
- "globals": "^15.14.0",
33
- "typescript": "~5.7.2",
34
- "typescript-eslint": "^8.22.0",
35
- "vite": "^6.1.0",
36
- "rollup": "^4.41.1",
37
- "rollup-plugin-postcss": "^4.0.2",
38
16
  "@emotion/cache": "^11.14.0",
39
17
  "@emotion/react": "^11.14.0",
40
18
  "@emotion/styled": "^11.14.0",
19
+ "@eslint/js": "^9.19.0",
41
20
  "@fortawesome/fontawesome-svg-core": "^6.7.2",
42
21
  "@fortawesome/free-brands-svg-icons": "^6.7.2",
43
22
  "@fortawesome/free-regular-svg-icons": "^6.7.2",
@@ -53,25 +32,44 @@
53
32
  "@mui/x-tree-view": "^7.26.0",
54
33
  "@react-spring/web": "^9.7.5",
55
34
  "@reduxjs/toolkit": "^2.5.1",
35
+ "@rollup/plugin-commonjs": "^28.0.3",
36
+ "@rollup/plugin-node-resolve": "^16.0.1",
37
+ "@rollup/plugin-terser": "^0.4.4",
38
+ "@rollup/plugin-typescript": "^12.1.2",
39
+ "@types/react": "^19.1.6",
40
+ "@types/react-dom": "^19.0.3",
41
+ "@types/react-i18next": "^7.8.3",
42
+ "@vitejs/plugin-react": "^4.3.4",
56
43
  "axios": "^1.8.1",
44
+ "eslint": "^9.19.0",
45
+ "eslint-plugin-react-hooks": "^5.0.0",
46
+ "eslint-plugin-react-refresh": "^0.4.18",
47
+ "globals": "^15.14.0",
57
48
  "i18next": "^24.2.2",
58
49
  "i18next-browser-languagedetector": "^8.0.3",
59
50
  "i18next-http-backend": "^3.0.2",
60
51
  "moment": "^2.30.1",
61
52
  "oidc-client-ts": "^3.1.0",
53
+ "react": "^19.1.0",
62
54
  "react-dom": "^19.0.0",
63
55
  "react-hook-form": "^7.54.2",
64
56
  "react-i18next": "^15.4.0",
65
57
  "react-redux": "^9.2.0",
66
58
  "react-router-dom": "^7.1.5",
67
59
  "react-toastify": "^11.0.5",
60
+ "rollup": "^4.41.1",
61
+ "rollup-plugin-dts": "^6.2.1",
62
+ "rollup-plugin-peer-deps-external": "^2.2.4",
63
+ "rollup-plugin-postcss": "^4.0.2",
68
64
  "stylis": "^4.3.6",
69
65
  "stylis-plugin-rtl": "^2.1.1",
66
+ "tslib": "^2.8.1",
67
+ "typescript": "~5.7.2",
68
+ "typescript-eslint": "^8.22.0",
69
+ "vite": "^6.1.0",
70
70
  "zod": "^3.24.2"
71
71
  },
72
72
  "peerDependencies": {
73
- "rollup": "^4.41.1",
74
- "rollup-plugin-postcss": "^4.0.2",
75
73
  "@emotion/cache": "^11.14.0",
76
74
  "@emotion/react": "^11.14.0",
77
75
  "@emotion/styled": "^11.14.0",
@@ -103,8 +101,13 @@
103
101
  "react-redux": "^9.2.0",
104
102
  "react-router-dom": "^7.1.5",
105
103
  "react-toastify": "^11.0.5",
104
+ "rollup": "^4.41.1",
105
+ "rollup-plugin-postcss": "^4.0.2",
106
106
  "stylis": "^4.3.6",
107
107
  "stylis-plugin-rtl": "^2.1.1",
108
108
  "zod": "^3.24.2"
109
+ },
110
+ "dependencies": {
111
+ "@rollup/plugin-json": "^6.1.0"
109
112
  }
110
113
  }
package/rollup.config.js CHANGED
@@ -1,43 +1,45 @@
1
- import resolve from "@rollup/plugin-node-resolve";
2
- import commonjs from "@rollup/plugin-commonjs";
3
- import typescript from "@rollup/plugin-typescript";
4
- import dts from "rollup-plugin-dts";
5
- import terser from "@rollup/plugin-terser";
6
- import peerDepsExternal from "rollup-plugin-peer-deps-external";
1
+ import resolve from "@rollup/plugin-node-resolve";
2
+ import commonjs from "@rollup/plugin-commonjs";
3
+ import typescript from "@rollup/plugin-typescript";
4
+ import dts from "rollup-plugin-dts";
5
+ import terser from "@rollup/plugin-terser";
6
+ import json from "@rollup/plugin-json";
7
+ import peerDepsExternal from "rollup-plugin-peer-deps-external";
7
8
 
8
- import postcss from "rollup-plugin-postcss";
9
+ import postcss from "rollup-plugin-postcss";
9
10
 
10
- const packageJson = require("./package.json");
11
+ const packageJson = require("./package.json");
11
12
 
12
- export default [
13
+ export default [
14
+ {
15
+ input: "src/index.ts",
16
+ output: [
13
17
  {
14
- input: "src/index.ts",
15
- output: [
16
- {
17
- file: packageJson.main,
18
- format: "cjs",
19
- sourcemap: true,
20
- },
21
- {
22
- file: packageJson.module,
23
- format: "esm",
24
- sourcemap: true,
25
- },
26
- ],
27
- plugins: [
28
- peerDepsExternal(),
29
- resolve(),
30
- commonjs(),
31
- typescript({ tsconfig: "./tsconfig.json" }),
32
- terser(),
33
- postcss(),
34
- ],
35
- external: ["react", "react-dom"],
18
+ file: packageJson.main,
19
+ format: "cjs",
20
+ sourcemap: true,
36
21
  },
37
22
  {
38
- input: "src/index.ts",
39
- output: [{ file: packageJson.types }],
40
- plugins: [dts.default()],
41
- external: [/\.css$/],
23
+ file: packageJson.module,
24
+ format: "esm",
25
+ sourcemap: true,
42
26
  },
43
- ];
27
+ ],
28
+ plugins: [
29
+ peerDepsExternal(),
30
+ resolve(),
31
+ commonjs(),
32
+ typescript({ tsconfig: "./tsconfig.json" }),
33
+ terser(),
34
+ postcss(),
35
+ json(),
36
+ ],
37
+ external: ["react", "react-dom"],
38
+ },
39
+ {
40
+ input: "src/index.ts",
41
+ output: [{ file: packageJson.types }],
42
+ plugins: [dts.default()],
43
+ external: [/\.css$/],
44
+ },
45
+ ];
@@ -0,0 +1,31 @@
1
+ import { useSelector } from "react-redux";
2
+ import { createTheme } from "@mui/material";
3
+ import { ThemeProvider } from "@emotion/react";
4
+ import { useEffect } from "react";
5
+ import { RootState } from "../redux/store";
6
+ import { LightThemeOptions } from "../theme/LightThemeOptions";
7
+ import { DarkThemeOptions } from "../theme/DarkThemeOptions";
8
+ import Layout from "../layout/Layout";
9
+
10
+ function App() {
11
+ const AppInfo = useSelector((state: RootState) => state.AppInfo);
12
+ const AppLayoutState = useSelector((state: RootState) => state.AppLayout);
13
+ let themeOptions = { ...LightThemeOptions };
14
+ if (AppLayoutState.themeMode === "dark") {
15
+ themeOptions = { ...DarkThemeOptions };
16
+ }
17
+ const theme = createTheme({
18
+ direction: AppLayoutState.appDirection,
19
+ ...themeOptions,
20
+ });
21
+ useEffect(() => {
22
+ document.title = AppInfo.documentTitle;
23
+ }, []);
24
+ return (
25
+ <ThemeProvider theme={theme}>
26
+ <Layout />
27
+ </ThemeProvider>
28
+ );
29
+ }
30
+
31
+ export default App;
@@ -11,6 +11,7 @@ LicenseInfo.setLicenseKey(
11
11
  "c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y"
12
12
  );
13
13
  import "react-toastify/dist/ReactToastify.css";
14
+ import App from "./App";
14
15
 
15
16
  library.add(fab);
16
17
  library.add(far);
@@ -21,7 +22,7 @@ export type BaseAppProps = {};
21
22
  export const BaseApp: React.FC<BaseAppProps> = (props) => {
22
23
  return (
23
24
  <Provider store={store}>
24
- <div>Base App</div>
25
+ <App />
25
26
  </Provider>
26
27
  );
27
28
  };
@@ -0,0 +1,116 @@
1
+ import { useState } from "react";
2
+ import useApiActions from "../templates/DataEntryTemplates/useApiActions";
3
+ import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
4
+ import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
5
+
6
+
7
+ const AttachmentGrid: React.FC = () => {
8
+ const [data, setData] = useState([]);
9
+ const apiActions = useApiActions({
10
+ findAll: "api/v1/admin/attachment/all",
11
+ deleteById: "api/v1/admin/attachment",
12
+ save: "api/v1/admin/attachment",
13
+ findById: "api/v1/admin/attachment",
14
+ setData: setData,
15
+ });
16
+
17
+ const formElements: Array<FormElementProps> = [
18
+ {
19
+ type: "field",
20
+ mode: "props",
21
+ props: {
22
+ fieldLabel: "ATTACHMENT_ATTACHMENT_NUMBER",
23
+ fieldName: "attachmentNumber",
24
+ required: false,
25
+ fieldType: "text",
26
+ },
27
+ },
28
+ {
29
+ type: "field",
30
+ mode: "props",
31
+ props: {
32
+ fieldLabel: "ATTACHMENT_ATTACHMENT_SIZE",
33
+ fieldName: "attachmentSize",
34
+ required: false,
35
+ fieldType: "text",
36
+ },
37
+ },
38
+ {
39
+ type: "field",
40
+ mode: "props",
41
+ props: {
42
+ fieldLabel: "ATTACHMENT_ATTACHMENT_TYPE",
43
+ fieldName: "attachmentType",
44
+ required: false,
45
+ fieldType: "text",
46
+ },
47
+ },
48
+ {
49
+ type: "field",
50
+ mode: "props",
51
+ props: {
52
+ fieldLabel: "ATTACHMENT_CATEGORY",
53
+ fieldName: "category",
54
+ required: false,
55
+ fieldType: "text",
56
+ },
57
+ },
58
+ {
59
+ type: "field",
60
+ mode: "props",
61
+ props: {
62
+ fieldLabel: "ATTACHMENT_DOC_TYPE",
63
+ fieldName: "docType",
64
+ required: false,
65
+ fieldType: "text",
66
+ },
67
+ },
68
+ {
69
+ type: "field",
70
+ mode: "props",
71
+ props: {
72
+ fieldLabel: "ATTACHMENT_FILE_NAME",
73
+ fieldName: "fileName",
74
+ required: false,
75
+ fieldType: "text",
76
+ },
77
+ },
78
+ {
79
+ type: "field",
80
+ mode: "props",
81
+ props: {
82
+ fieldLabel: "ATTACHMENT_REF_KEY",
83
+ fieldName: "refKey",
84
+ required: false,
85
+ fieldType: "text",
86
+ },
87
+ },
88
+ {
89
+ type: "field",
90
+ mode: "props",
91
+ props: {
92
+ fieldLabel: "ATTACHMENT_REMARK",
93
+ fieldName: "remark",
94
+ required: false,
95
+ fieldType: "text",
96
+ },
97
+ },
98
+ ];
99
+
100
+ return (
101
+ <TemplateGrid
102
+ apiActions={apiActions}
103
+ data={data}
104
+ setData={setData}
105
+ editMode={{ editMode: "row" }}
106
+ formElements={formElements}
107
+ keyColumnName={"id"}
108
+ gridTitle="ATTACHMENT_PLURAL"
109
+ girdIcon="table-cells"
110
+ editAction={{ isEnabled: true, authority: "ATTACHMENT_EDIT" }}
111
+ deleteAction={{ isEnabled: true, authority: "ATTACHMENT_DELETE" }}
112
+ />
113
+ );
114
+ };
115
+
116
+ export default AttachmentGrid;
@@ -0,0 +1,88 @@
1
+ import { useState } from "react";
2
+ import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
+ import useApiActions from "../templates/DataEntryTemplates/useApiActions";
4
+ import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
+
6
+ const AuthorityGrid: React.FC = () => {
7
+ const [data, setData] = useState([]);
8
+ const apiActions = useApiActions({
9
+ commonStoreKey: "SystemAuthorities",
10
+ deleteById: "api/v1/admin/authority",
11
+ save: "api/v1/admin/authority",
12
+ findById: "api/v1/admin/authority",
13
+ setData: setData,
14
+ });
15
+
16
+ const formElements: Array<FormElementProps> = [
17
+ {
18
+ type: "field",
19
+ mode: "props",
20
+ props: {
21
+ fieldLabel: "AUTHORITY_AUTHORITY_CODE",
22
+ fieldName: "authorityCode",
23
+ required: true,
24
+ fieldType: "text",
25
+ },
26
+ },
27
+ {
28
+ type: "field",
29
+ mode: "props",
30
+ props: {
31
+ fieldLabel: "AUTHORITY_AUTHORITY_DESCRIPTION",
32
+ fieldName: "authorityDescription",
33
+ required: true,
34
+ fieldType: "text",
35
+ },
36
+ },
37
+ {
38
+ type: "field",
39
+ mode: "props",
40
+ props: {
41
+ fieldLabel: "AUTHORITY_AUTHORITY_NAME",
42
+ fieldName: "authorityName",
43
+ required: true,
44
+ fieldType: "text",
45
+ },
46
+ },
47
+ {
48
+ type: "field",
49
+ mode: "props",
50
+ props: {
51
+ fieldLabel: "AUTHORITY_IS_ACTIVE",
52
+ fieldName: "isActive",
53
+ required: false,
54
+ fieldType: "checkbox",
55
+ },
56
+ },
57
+ {
58
+ type: "field",
59
+ mode: "props",
60
+ props: {
61
+ fieldLabel: "AUTHORITY_ORGANIZATION_APPLICATION_ID",
62
+ fieldName: "organizationApplicationId",
63
+ required: false,
64
+ fieldType: "text",
65
+ gridProps: {
66
+ hidden: true,
67
+ },
68
+ },
69
+ },
70
+ ];
71
+
72
+ return (
73
+ <TemplateGrid
74
+ apiActions={apiActions}
75
+ data={data}
76
+ setData={setData}
77
+ editMode={{ editMode: "row", reloadAfterSave: true }}
78
+ formElements={formElements}
79
+ keyColumnName={"id"}
80
+ gridTitle="AUTHORITY_PLURAL"
81
+ girdIcon="table-cells"
82
+ editAction={{ isEnabled: true, authority: "AUTHORITY_EDIT" }}
83
+ deleteAction={{ isEnabled: true, authority: "AUTHORITY_DELETE" }}
84
+ />
85
+ );
86
+ };
87
+
88
+ export default AuthorityGrid;
@@ -0,0 +1,55 @@
1
+ import { useState } from "react";
2
+ import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
+ import useApiActions from "../templates/DataEntryTemplates/useApiActions";
4
+ import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
+
6
+ const BluePrintGrid: React.FC = () => {
7
+ const [data, setData] = useState([]);
8
+ const apiActions = useApiActions({
9
+ findAll: "api/v1/admin/blueprint/all",
10
+ deleteById: "api/v1/admin/blueprint",
11
+ save: "api/v1/admin/blueprint",
12
+ findById: "api/v1/admin/blueprint",
13
+ setData: setData,
14
+ });
15
+
16
+ const formElements: Array<FormElementProps> = [
17
+ {
18
+ type: "field",
19
+ mode: "props",
20
+ props: {
21
+ fieldLabel: "BLUE_PRINT_BLUE_PRINT_CODE",
22
+ fieldName: "bluePrintCode",
23
+ required: false,
24
+ fieldType: "text",
25
+ },
26
+ },
27
+ {
28
+ type: "field",
29
+ mode: "props",
30
+ props: {
31
+ fieldLabel: "BLUE_PRINT_QUERY_ID",
32
+ fieldName: "queryId",
33
+ required: false,
34
+ fieldType: "text",
35
+ },
36
+ },
37
+ ];
38
+
39
+ return (
40
+ <TemplateGrid
41
+ apiActions={apiActions}
42
+ data={data}
43
+ setData={setData}
44
+ editMode={{ editMode: "row" }}
45
+ formElements={formElements}
46
+ keyColumnName={"id"}
47
+ gridTitle="BLUE_PRINT_PLURAL"
48
+ girdIcon="table-cells"
49
+ editAction={{ isEnabled: true, authority: "BLUE_PRINT_EDIT" }}
50
+ deleteAction={{ isEnabled: true, authority: "BLUE_PRINT_DELETE" }}
51
+ />
52
+ );
53
+ };
54
+
55
+ export default BluePrintGrid;
@@ -0,0 +1,85 @@
1
+ import { useState } from "react";
2
+ import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
+ import useApiActions from "../templates/DataEntryTemplates/useApiActions";
4
+ import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
+
6
+ const BluePrintPageGrid: React.FC = () => {
7
+ const [data, setData] = useState([]);
8
+ const apiActions = useApiActions({
9
+ findAll: "api/v1/admin/blueprintpage/all",
10
+ deleteById: "api/v1/admin/blueprintpage",
11
+ save: "api/v1/admin/blueprintpage",
12
+ findById: "api/v1/admin/blueprintpage",
13
+ setData: setData,
14
+ });
15
+
16
+ const formElements: Array<FormElementProps> = [
17
+ {
18
+ type: "field",
19
+ mode: "props",
20
+ props: {
21
+ fieldLabel: "BLUE_PRINT_PAGE_BLUE_PRINT_ID",
22
+ fieldName: "bluePrintId",
23
+ required: false,
24
+ fieldType: "text",
25
+ },
26
+ },
27
+ {
28
+ type: "field",
29
+ mode: "props",
30
+ props: {
31
+ fieldLabel: "BLUE_PRINT_PAGE_ENABLED",
32
+ fieldName: "enabled",
33
+ required: false,
34
+ fieldType: "checkbox",
35
+ },
36
+ },
37
+ {
38
+ type: "field",
39
+ mode: "props",
40
+ props: {
41
+ fieldLabel: "BLUE_PRINT_PAGE_PAGE_NAME",
42
+ fieldName: "pageName",
43
+ required: false,
44
+ fieldType: "text",
45
+ },
46
+ },
47
+ {
48
+ type: "field",
49
+ mode: "props",
50
+ props: {
51
+ fieldLabel: "BLUE_PRINT_PAGE_PAGE_ORDER",
52
+ fieldName: "pageOrder",
53
+ required: false,
54
+ fieldType: "text",
55
+ },
56
+ },
57
+ {
58
+ type: "field",
59
+ mode: "props",
60
+ props: {
61
+ fieldLabel: "BLUE_PRINT_PAGE_QUERY_ID",
62
+ fieldName: "queryId",
63
+ required: false,
64
+ fieldType: "text",
65
+ },
66
+ },
67
+ ];
68
+
69
+ return (
70
+ <TemplateGrid
71
+ apiActions={apiActions}
72
+ data={data}
73
+ setData={setData}
74
+ editMode={{ editMode: "row" }}
75
+ formElements={formElements}
76
+ keyColumnName={"id"}
77
+ gridTitle="BLUE_PRINT_PAGE_PLURAL"
78
+ girdIcon="table-cells"
79
+ editAction={{ isEnabled: true, authority: "BLUE_PRINT_PAGE_EDIT" }}
80
+ deleteAction={{ isEnabled: true, authority: "BLUE_PRINT_PAGE_DELETE" }}
81
+ />
82
+ );
83
+ };
84
+
85
+ export default BluePrintPageGrid;
@@ -0,0 +1,85 @@
1
+ import { useState } from "react";
2
+ import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
+ import useApiActions from "../templates/DataEntryTemplates/useApiActions";
4
+ import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
+
6
+ const BluePrintPointGrid: React.FC = () => {
7
+ const [data, setData] = useState([]);
8
+ const apiActions = useApiActions({
9
+ findAll: "api/v1/admin/blueprintpoint/all",
10
+ deleteById: "api/v1/admin/blueprintpoint",
11
+ save: "api/v1/admin/blueprintpoint",
12
+ findById: "api/v1/admin/blueprintpoint",
13
+ setData: setData,
14
+ });
15
+
16
+ const formElements: Array<FormElementProps> = [
17
+ {
18
+ type: "field",
19
+ mode: "props",
20
+ props: {
21
+ fieldLabel: "BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID",
22
+ fieldName: "bluePrintPageId",
23
+ required: false,
24
+ fieldType: "text",
25
+ },
26
+ },
27
+ {
28
+ type: "field",
29
+ mode: "props",
30
+ props: {
31
+ fieldLabel: "BLUE_PRINT_POINT_FONT_SIZE",
32
+ fieldName: "fontSize",
33
+ required: false,
34
+ fieldType: "text",
35
+ },
36
+ },
37
+ {
38
+ type: "field",
39
+ mode: "props",
40
+ props: {
41
+ fieldLabel: "BLUE_PRINT_POINT_POINT_CODE",
42
+ fieldName: "pointCode",
43
+ required: false,
44
+ fieldType: "text",
45
+ },
46
+ },
47
+ {
48
+ type: "field",
49
+ mode: "props",
50
+ props: {
51
+ fieldLabel: "BLUE_PRINT_POINT_X",
52
+ fieldName: "x",
53
+ required: false,
54
+ fieldType: "text",
55
+ },
56
+ },
57
+ {
58
+ type: "field",
59
+ mode: "props",
60
+ props: {
61
+ fieldLabel: "BLUE_PRINT_POINT_Y",
62
+ fieldName: "y",
63
+ required: false,
64
+ fieldType: "text",
65
+ },
66
+ },
67
+ ];
68
+
69
+ return (
70
+ <TemplateGrid
71
+ apiActions={apiActions}
72
+ data={data}
73
+ setData={setData}
74
+ editMode={{ editMode: "row" }}
75
+ formElements={formElements}
76
+ keyColumnName={"id"}
77
+ gridTitle="BLUE_PRINT_POINT_PLURAL"
78
+ girdIcon="table-cells"
79
+ editAction={{ isEnabled: true, authority: "BLUE_PRINT_POINT_EDIT" }}
80
+ deleteAction={{ isEnabled: true, authority: "BLUE_PRINT_POINT_DELETE" }}
81
+ />
82
+ );
83
+ };
84
+
85
+ export default BluePrintPointGrid;