@asaleh37/ui-base 1.2.3 → 1.2.5

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 (157) hide show
  1. package/dist/index.d.ts +20 -13
  2. package/dist/index.js +6 -6
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +6 -6
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +15 -3
  7. package/src/components/App.tsx +1 -1
  8. package/src/components/BaseApp.tsx +2 -19
  9. package/src/components/administration/admin/OrgMemberRoleForm.tsx +83 -0
  10. package/src/components/administration/admin/OrganizationApplicationModuleGrid.tsx +131 -0
  11. package/src/components/administration/admin/OrganizationGrid.tsx +165 -0
  12. package/src/components/administration/admin/OrganizationMemberGrid.tsx +176 -0
  13. package/src/components/administration/admin/OrganizationMemberRoleGrid.tsx +87 -0
  14. package/src/components/{admin → administration/admin}/OrganizationRankGrid.tsx +49 -19
  15. package/src/components/administration/admin/OrganizationUnitGrid.tsx +139 -0
  16. package/src/components/administration/admin/OrganizationUnitTypeGrid.tsx +121 -0
  17. package/src/components/administration/admin/PersonGrid.tsx +195 -0
  18. package/src/components/{admin → administration/admin}/RoleAuthoritiesForm.tsx +30 -11
  19. package/src/components/administration/admin/SystemApplicationAuthorityGrid.tsx +142 -0
  20. package/src/components/administration/admin/SystemApplicationGrid.tsx +161 -0
  21. package/src/components/administration/admin/SystemApplicationModuleGrid.tsx +109 -0
  22. package/src/components/administration/admin/SystemApplicationRoleAuthorityGrid.tsx +67 -0
  23. package/src/components/administration/admin/SystemApplicationRoleGrid.tsx +130 -0
  24. package/src/components/administration/dev/BluePrintGrid.tsx +129 -0
  25. package/src/components/administration/dev/DashboardGrid.tsx +173 -0
  26. package/src/components/administration/dev/DashboardWidgetGrid.tsx +164 -0
  27. package/src/components/administration/dev/DataQueryGrid.tsx +206 -0
  28. package/src/components/administration/dev/DataQueryParameterGrid.tsx +191 -0
  29. package/src/components/administration/dev/DataQueryParametersForm.tsx +84 -0
  30. package/src/components/administration/dev/DatasourceConnectionGrid.tsx +150 -0
  31. package/src/components/administration/dev/EntityParameterGrid.tsx +279 -0
  32. package/src/components/administration/dev/LookupGrid.tsx +131 -0
  33. package/src/components/administration/dev/MailAttachmentGrid.tsx +155 -0
  34. package/src/components/administration/dev/MailBodyGrid.tsx +215 -0
  35. package/src/components/{admin → administration/dev}/MailNotificationQueueGrid.tsx +114 -26
  36. package/src/components/administration/dev/MailRecipientGrid.tsx +169 -0
  37. package/src/components/administration/dev/MailSenderConfigGrid.tsx +478 -0
  38. package/src/components/administration/dev/MailTemplateGrid.tsx +388 -0
  39. package/src/components/administration/dev/ReportGrid.tsx +504 -0
  40. package/src/components/administration/dev/ReportParameterGrid.tsx +186 -0
  41. package/src/components/administration/dev/ReportParametersForm.tsx +84 -0
  42. package/src/components/administration/dev/WidgetGrid.tsx +431 -0
  43. package/src/components/administration/dev/WorkflowDocumentActionGrid.tsx +264 -0
  44. package/src/components/administration/dev/WorkflowDocumentActionHistoryGrid.tsx +172 -0
  45. package/src/components/administration/dev/WorkflowDocumentActionMailGrid.tsx +161 -0
  46. package/src/components/administration/dev/WorkflowDocumentGrid.tsx +377 -0
  47. package/src/components/{admin → administration/dev}/WorkflowDocumentMailLogGrid.tsx +87 -10
  48. package/src/components/administration/dev/WorkflowDocumentStatusGrid.tsx +243 -0
  49. package/src/components/common/ChangeOrgForm.tsx +81 -0
  50. package/src/components/common/Home.tsx +28 -22
  51. package/src/components/common/LoadingMask.tsx +9 -4
  52. package/src/components/common/Login.tsx +9 -13
  53. package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +30 -6
  54. package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +46 -5
  55. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +64 -5
  56. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementGroup.tsx +11 -3
  57. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/CheckBox.tsx +2 -2
  58. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +1 -2
  59. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/HtmlEditor.tsx +144 -0
  60. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/SystemLookupCombobox.tsx +55 -0
  61. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +9 -1
  62. package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +45 -5
  63. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +8 -7
  64. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +38 -10
  65. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridRecordAction.tsx +4 -1
  66. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridTopBar.tsx +3 -4
  67. package/src/components/templates/TransferList.tsx +16 -6
  68. package/src/components/templates/index.ts +0 -2
  69. package/src/components/templates/report/ExcelReportViewer.tsx +65 -0
  70. package/src/components/templates/report/ReportViewer.tsx +382 -0
  71. package/src/components/templates/visuals/DashboardRouteView.tsx +9 -0
  72. package/src/components/templates/visuals/DashboardViewer.tsx +148 -0
  73. package/src/components/templates/visuals/WidgetViewer.tsx +198 -0
  74. package/src/components/templates/visuals/charts/TemplateBarChart.tsx +9 -2
  75. package/src/components/templates/visuals/charts/TemplateDataCard.tsx +6 -31
  76. package/src/components/templates/visuals/charts/TemplateGauge.tsx +8 -3
  77. package/src/components/templates/visuals/charts/TemplateLineChart.tsx +8 -2
  78. package/src/components/templates/visuals/charts/TemplateLineProgress.tsx +5 -3
  79. package/src/components/templates/visuals/charts/TemplatePieChart.tsx +1 -2
  80. package/src/components/templates/workflow/WorkflowDocumentPanel.tsx +581 -0
  81. package/src/components/templates/workflow/WorkflowDocumentTimeLine.tsx +134 -0
  82. package/src/hooks/UseSession.tsx +3 -7
  83. package/src/hooks/UseWindow.tsx +2 -1
  84. package/src/hooks/useAxios.tsx +9 -27
  85. package/src/hooks/useLookupGridColumn.tsx +35 -0
  86. package/src/layout/Layout.tsx +2 -46
  87. package/src/layout/MainContent.tsx +60 -7
  88. package/src/layout/MobileDrawer.tsx +5 -5
  89. package/src/layout/NavigationTree.tsx +0 -1
  90. package/src/layout/RouteWrapper.tsx +36 -0
  91. package/src/layout/SideBar.tsx +15 -10
  92. package/src/layout/TopBar.tsx +139 -71
  93. package/src/locales/arabic/adminLocalsAr.json +81 -344
  94. package/src/locales/arabic/common.json +11 -1
  95. package/src/locales/arabic/devLocalsAr.json +280 -0
  96. package/src/locales/arabic/index.ts +2 -0
  97. package/src/locales/english/adminLocalsEn.json +86 -346
  98. package/src/locales/english/common.json +11 -1
  99. package/src/locales/english/devLocalsEn.json +281 -0
  100. package/src/locales/english/index.ts +3 -0
  101. package/src/main.tsx +5 -6
  102. package/src/navigationItems/Administration/adminNavigationItems.tsx +65 -99
  103. package/src/navigationItems/Administration/index.tsx +10 -65
  104. package/src/redux/features/administration/AdministrationStoresMetaData.ts +45 -12
  105. package/src/redux/features/common/AppLayoutSlice.ts +0 -8
  106. package/src/redux/features/common/CommonStoreSlice.ts +4 -0
  107. package/src/redux/features/common/SideBarSlice.ts +29 -0
  108. package/src/redux/features/common/UserSessionSlice.ts +15 -23
  109. package/src/redux/store.ts +1 -1
  110. package/src/routes/administration/adminRoutes.tsx +41 -222
  111. package/src/routes/administration/devRoutes.tsx +90 -0
  112. package/src/routes/administration/index.ts +5 -1
  113. package/src/routes/index.ts +1 -0
  114. package/src/styles/index.css +3 -3
  115. package/src/util/AppUtils.ts +5 -0
  116. package/vite.config.ts +14 -0
  117. package/src/components/admin/AttachmentGrid.tsx +0 -116
  118. package/src/components/admin/AuthorityGrid.tsx +0 -88
  119. package/src/components/admin/BluePrintGrid.tsx +0 -55
  120. package/src/components/admin/BluePrintPageGrid.tsx +0 -85
  121. package/src/components/admin/BluePrintPointGrid.tsx +0 -85
  122. package/src/components/admin/DashboardGrid.tsx +0 -95
  123. package/src/components/admin/DashboardWidgetGrid.tsx +0 -75
  124. package/src/components/admin/DataQueryGrid.tsx +0 -75
  125. package/src/components/admin/DataQueryParameterGrid.tsx +0 -98
  126. package/src/components/admin/DatasourceConnectionGrid.tsx +0 -98
  127. package/src/components/admin/EmployeeGrid.tsx +0 -105
  128. package/src/components/admin/EntityParameterGrid.tsx +0 -125
  129. package/src/components/admin/ExcelUploaderDetailGrid.tsx +0 -78
  130. package/src/components/admin/ExcelUploaderHeaderGrid.tsx +0 -78
  131. package/src/components/admin/LookupGrid.tsx +0 -95
  132. package/src/components/admin/MailAttachmentGrid.tsx +0 -65
  133. package/src/components/admin/MailBodyGrid.tsx +0 -105
  134. package/src/components/admin/MailRecipientGrid.tsx +0 -75
  135. package/src/components/admin/MailTemplateGrid.tsx +0 -145
  136. package/src/components/admin/NewTableGrid.tsx +0 -65
  137. package/src/components/admin/NotificationGrid.tsx +0 -115
  138. package/src/components/admin/NotificationQueueGrid.tsx +0 -125
  139. package/src/components/admin/OrganizationApplicationGrid.tsx +0 -81
  140. package/src/components/admin/OrganizationGrid.tsx +0 -65
  141. package/src/components/admin/OrganizationUnitGrid.tsx +0 -85
  142. package/src/components/admin/OrganizationUserGrid.tsx +0 -75
  143. package/src/components/admin/OrganizationUserRoleGrid.tsx +0 -98
  144. package/src/components/admin/ReportGrid.tsx +0 -155
  145. package/src/components/admin/ReportParameterGrid.tsx +0 -95
  146. package/src/components/admin/RoleAuthorityGrid.tsx +0 -65
  147. package/src/components/admin/RoleGrid.tsx +0 -132
  148. package/src/components/admin/UserAccountGrid.tsx +0 -65
  149. package/src/components/admin/UserRequestGrid.tsx +0 -145
  150. package/src/components/admin/WidgetGrid.tsx +0 -175
  151. package/src/components/admin/WorkflowDocumentActionGrid.tsx +0 -111
  152. package/src/components/admin/WorkflowDocumentActionHistoryGrid.tsx +0 -111
  153. package/src/components/admin/WorkflowDocumentActionMailGrid.tsx +0 -71
  154. package/src/components/admin/WorkflowDocumentGrid.tsx +0 -185
  155. package/src/components/admin/WorkflowDocumentStatusGrid.tsx +0 -121
  156. package/src/components/templates/visuals/TemplateDashboard.tsx +0 -126
  157. package/src/redux/features/CounterSlice.tsx +0 -13
package/vite.config.ts CHANGED
@@ -1,10 +1,24 @@
1
1
  import { defineConfig } from "vite";
2
2
  import react from "@vitejs/plugin-react";
3
+ import rollupNodePolyFill from 'rollup-plugin-polyfill-node';
4
+
3
5
 
4
6
  // https://vite.dev/config/
5
7
  export default defineConfig({
6
8
  plugins: [react()],
9
+ define: {
10
+ global: 'globalThis', // Fix for global
11
+ },
12
+ optimizeDeps: {
13
+ include: ['fbjs'],
14
+ },
15
+ build: {
16
+ rollupOptions: {
17
+ plugins: [rollupNodePolyFill()],
18
+ },
19
+ },
7
20
  server: {
8
21
  port: 3000,
9
22
  },
10
23
  });
24
+
@@ -1,116 +0,0 @@
1
- import { useState } from "react";
2
- import useApiActions from "../../hooks/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;
@@ -1,88 +0,0 @@
1
- import { useState } from "react";
2
- import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../../hooks/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;
@@ -1,55 +0,0 @@
1
- import { useState } from "react";
2
- import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../../hooks/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;
@@ -1,85 +0,0 @@
1
- import { useState } from "react";
2
- import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../../hooks/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;
@@ -1,85 +0,0 @@
1
- import { useState } from "react";
2
- import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../../hooks/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;
@@ -1,95 +0,0 @@
1
- import { useState } from "react";
2
- import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../../hooks/useApiActions";
4
- import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
-
6
- const DashboardGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/dashboard/all",
10
- deleteById: "api/v1/admin/dashboard",
11
- save: "api/v1/admin/dashboard",
12
- findById: "api/v1/admin/dashboard",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "DASHBOARD_DASHBOARD_CODE",
22
- fieldName: "dashboardCode",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "DASHBOARD_DASHBOARD_NAME",
32
- fieldName: "dashboardName",
33
- required: false,
34
- fieldType: "text",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "DASHBOARD_DASHBOARD_TITLE",
42
- fieldName: "dashboardTitle",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "DASHBOARD_ENABLED",
52
- fieldName: "enabled",
53
- required: false,
54
- fieldType: "checkbox",
55
- },
56
- },
57
- {
58
- type: "field",
59
- mode: "props",
60
- props: {
61
- fieldLabel: "DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY",
62
- fieldName: "loadWidgetsIndividually",
63
- required: false,
64
- fieldType: "checkbox",
65
- },
66
- },
67
- {
68
- type: "field",
69
- mode: "props",
70
- props: {
71
- fieldLabel: "DASHBOARD_NUMBER_OF_COLUMNS",
72
- fieldName: "numberOfColumns",
73
- required: false,
74
- fieldType: "text",
75
- },
76
- },
77
- ];
78
-
79
- return (
80
- <TemplateGrid
81
- apiActions={apiActions}
82
- data={data}
83
- setData={setData}
84
- editMode={{ editMode: "row" }}
85
- formElements={formElements}
86
- keyColumnName={"id"}
87
- gridTitle="DASHBOARD_PLURAL"
88
- girdIcon="table-cells"
89
- editAction={{ isEnabled: true, authority: "DASHBOARD_EDIT" }}
90
- deleteAction={{ isEnabled: true, authority: "DASHBOARD_DELETE" }}
91
- />
92
- );
93
- };
94
-
95
- export default DashboardGrid;
@@ -1,75 +0,0 @@
1
- import { useState } from "react";
2
- import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../../hooks/useApiActions";
4
- import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
-
6
- const DashboardWidgetGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/dashboardwidget/all",
10
- deleteById: "api/v1/admin/dashboardwidget",
11
- save: "api/v1/admin/dashboardwidget",
12
- findById: "api/v1/admin/dashboardwidget",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "DASHBOARD_WIDGET_DASHBOARD_ID",
22
- fieldName: "dashboardId",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "DASHBOARD_WIDGET_ENABLED",
32
- fieldName: "enabled",
33
- required: false,
34
- fieldType: "checkbox",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "DASHBOARD_WIDGET_WIDGET_ID",
42
- fieldName: "widgetId",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "DASHBOARD_WIDGET_WIDGET_ORDER",
52
- fieldName: "widgetOrder",
53
- required: false,
54
- fieldType: "text",
55
- },
56
- },
57
- ];
58
-
59
- return (
60
- <TemplateGrid
61
- apiActions={apiActions}
62
- data={data}
63
- setData={setData}
64
- editMode={{ editMode: "row" }}
65
- formElements={formElements}
66
- keyColumnName={"id"}
67
- gridTitle="DASHBOARD_WIDGET_PLURAL"
68
- girdIcon="table-cells"
69
- editAction={{ isEnabled: true, authority: "DASHBOARD_WIDGET_EDIT" }}
70
- deleteAction={{ isEnabled: true, authority: "DASHBOARD_WIDGET_DELETE" }}
71
- />
72
- );
73
- };
74
-
75
- export default DashboardWidgetGrid;
@@ -1,75 +0,0 @@
1
- import { useState } from "react";
2
- import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
3
- import useApiActions from "../../hooks/useApiActions";
4
- import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
5
-
6
- const DataQueryGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- commonStoreKey: "SystemDataQueries",
10
- deleteById: "api/v1/admin/dataquery",
11
- save: "api/v1/admin/dataquery",
12
- findById: "api/v1/admin/dataquery",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "DATA_QUERY_DATASOURCE_CON_ID",
22
- fieldName: "datasourceConId",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "DATA_QUERY_QUERY_NAME",
32
- fieldName: "queryName",
33
- required: false,
34
- fieldType: "text",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "DATA_QUERY_QUERY_STR",
42
- fieldName: "queryStr",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "DATA_QUERY_USE_SYS_CON",
52
- fieldName: "useSysCon",
53
- required: false,
54
- fieldType: "checkbox",
55
- },
56
- },
57
- ];
58
-
59
- return (
60
- <TemplateGrid
61
- apiActions={apiActions}
62
- data={data}
63
- setData={setData}
64
- editMode={{ editMode: "row", reloadAfterSave: true }}
65
- formElements={formElements}
66
- keyColumnName={"id"}
67
- gridTitle="DATA_QUERY_PLURAL"
68
- girdIcon="table-cells"
69
- editAction={{ isEnabled: true, authority: "DATA_QUERY_EDIT" }}
70
- deleteAction={{ isEnabled: true, authority: "DATA_QUERY_DELETE" }}
71
- />
72
- );
73
- };
74
-
75
- export default DataQueryGrid;