@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
@@ -1,65 +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 RoleAuthorityGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/roleauthority/all",
10
- deleteById: "api/v1/admin/roleauthority",
11
- save: "api/v1/admin/roleauthority",
12
- findById: "api/v1/admin/roleauthority",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "ROLE_AUTHORITY_AUTHORITY_ID",
22
- fieldName: "authorityId",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "ROLE_AUTHORITY_IS_ACTIVE",
32
- fieldName: "isActive",
33
- required: false,
34
- fieldType: "checkbox",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "ROLE_AUTHORITY_ROLE_ID",
42
- fieldName: "roleId",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- ];
48
-
49
- return (
50
- <TemplateGrid
51
- apiActions={apiActions}
52
- data={data}
53
- setData={setData}
54
- editMode={{ editMode: "row" }}
55
- formElements={formElements}
56
- keyColumnName={"id"}
57
- gridTitle="ROLE_AUTHORITY_PLURAL"
58
- girdIcon="table-cells"
59
- editAction={{ isEnabled: true, authority: "ROLE_AUTHORITY_EDIT" }}
60
- deleteAction={{ isEnabled: true, authority: "ROLE_AUTHORITY_DELETE" }}
61
- />
62
- );
63
- };
64
-
65
- export default RoleAuthorityGrid;
@@ -1,132 +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
- import { useAxios, useWindow } from "../../hooks";
6
- import RoleAuthoritiesForm from "./RoleAuthoritiesForm";
7
-
8
- const RoleGrid: React.FC = () => {
9
- const [data, setData] = useState([]);
10
- const apiActions = useApiActions({
11
- commonStoreKey: "SystemRoles",
12
- deleteById: "api/v1/admin/role",
13
- save: "api/v1/admin/role",
14
- findById: "api/v1/admin/role",
15
- setData: setData,
16
- });
17
- const [selectedRole, setSelectedRole] = useState<any>(null);
18
- const { handleGetRequest } = useAxios();
19
- const [selectedRoleAuthorities, setSelectedRoleAuthorities] = useState<any>(
20
- []
21
- );
22
- const [
23
- selectedRoleAvailableAuthorities,
24
- setSelectedRoleAvailableAuthorities,
25
- ] = useState<any>([]);
26
- const {
27
- Window: RoleAuthoritiesWindow,
28
- setWindowState: setRoleAuthorirtiesWindowOpen,
29
- } = useWindow({
30
- width: "50%",
31
- windowIcon: "key",
32
- windowTitle: "Role Authorities",
33
- });
34
- const loadRoleAuthorities = async (data: any) => {
35
- await handleGetRequest({
36
- endPointURI: "api/v1/admin/role/authorities",
37
- showMask: true,
38
- parameters: {
39
- roleId: data.id,
40
- },
41
- successCallBkFn: (response: any) => {
42
- setRoleAuthorirtiesWindowOpen(true);
43
- setSelectedRoleAuthorities(response.data.selectedAuthorities);
44
- setSelectedRoleAvailableAuthorities(response.data.availableAuthorities);
45
- },
46
- });
47
- };
48
- const formElements: Array<FormElementProps> = [
49
- {
50
- type: "field",
51
- mode: "props",
52
- props: {
53
- fieldLabel: "ROLE_ROLE_NAME",
54
- fieldName: "roleName",
55
- required: true,
56
- fieldType: "text",
57
- },
58
- },
59
- {
60
- type: "field",
61
- mode: "props",
62
- props: {
63
- fieldLabel: "ROLE_DESCRIPTION",
64
- fieldName: "description",
65
- required: true,
66
- fieldType: "text",
67
- },
68
- },
69
- {
70
- type: "field",
71
- mode: "props",
72
- props: {
73
- fieldLabel: "ROLE_IS_ACTIVE",
74
- fieldName: "isActive",
75
- required: false,
76
- fieldType: "checkbox",
77
- },
78
- },
79
- {
80
- type: "field",
81
- mode: "props",
82
- props: {
83
- fieldLabel: "ROLE_ORGANIZATION_APPLICATION_ID",
84
- fieldName: "organizationApplicationId",
85
- required: false,
86
- fieldType: "text",
87
- gridProps: {
88
- hidden: true,
89
- },
90
- },
91
- },
92
- ];
93
-
94
- return (
95
- <>
96
- <RoleAuthoritiesWindow>
97
- <RoleAuthoritiesForm
98
- roleId={selectedRole?.id}
99
- availableAuthorities={selectedRoleAvailableAuthorities}
100
- currentRoleAuthorities={selectedRoleAuthorities}
101
- closeModalFn={() => {
102
- setRoleAuthorirtiesWindowOpen(false);
103
- }}
104
- />
105
- </RoleAuthoritiesWindow>
106
- <TemplateGrid
107
- rowActions={[
108
- {
109
- icon: "key",
110
- label: "authorities",
111
- actionFn: async (data) => {
112
- setSelectedRole(data);
113
- loadRoleAuthorities(data);
114
- },
115
- },
116
- ]}
117
- apiActions={apiActions}
118
- data={data}
119
- setData={setData}
120
- editMode={{ editMode: "row", reloadAfterSave: true }}
121
- formElements={formElements}
122
- keyColumnName={"id"}
123
- gridTitle="ROLE_PLURAL"
124
- girdIcon="table-cells"
125
- editAction={{ isEnabled: true, authority: "ROLE_EDIT" }}
126
- deleteAction={{ isEnabled: true, authority: "ROLE_DELETE" }}
127
- />
128
- </>
129
- );
130
- };
131
-
132
- export default RoleGrid;
@@ -1,65 +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 UserAccountGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/useraccount/all",
10
- deleteById: "api/v1/admin/useraccount",
11
- save: "api/v1/admin/useraccount",
12
- findById: "api/v1/admin/useraccount",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "USER_ACCOUNT_ENABLED",
22
- fieldName: "enabled",
23
- required: false,
24
- fieldType: "checkbox",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "USER_ACCOUNT_PASSWORD",
32
- fieldName: "password",
33
- required: false,
34
- fieldType: "text",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "USER_ACCOUNT_USERNAME",
42
- fieldName: "username",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- ];
48
-
49
- return (
50
- <TemplateGrid
51
- apiActions={apiActions}
52
- data={data}
53
- setData={setData}
54
- editMode={{ editMode: "row" }}
55
- formElements={formElements}
56
- keyColumnName={"id"}
57
- gridTitle="USER_ACCOUNT_PLURAL"
58
- girdIcon="table-cells"
59
- editAction={{ isEnabled: true, authority: "USER_ACCOUNT_EDIT" }}
60
- deleteAction={{ isEnabled: true, authority: "USER_ACCOUNT_DELETE" }}
61
- />
62
- );
63
- };
64
-
65
- export default UserAccountGrid;
@@ -1,145 +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 UserRequestGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/userrequest/all",
10
- deleteById: "api/v1/admin/userrequest",
11
- save: "api/v1/admin/userrequest",
12
- findById: "api/v1/admin/userrequest",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "USER_REQUEST_IS_NOTIFIED",
22
- fieldName: "isNotified",
23
- required: false,
24
- fieldType: "checkbox",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "USER_REQUEST_MAILS_TO_NOTIFY",
32
- fieldName: "mailsToNotify",
33
- required: false,
34
- fieldType: "text",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "USER_REQUEST_NOTIFICATION_MESSAGE",
42
- fieldName: "notificationMessage",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "USER_REQUEST_NOTIFICATION_TIME",
52
- fieldName: "notificationTime",
53
- required: false,
54
- fieldType: "datetime",
55
- },
56
- },
57
- {
58
- type: "field",
59
- mode: "props",
60
- props: {
61
- fieldLabel: "USER_REQUEST_NOTIFICATION_TYPE",
62
- fieldName: "notificationType",
63
- required: false,
64
- fieldType: "text",
65
- },
66
- },
67
- {
68
- type: "field",
69
- mode: "props",
70
- props: {
71
- fieldLabel: "USER_REQUEST_NOTIFY_USER",
72
- fieldName: "notifyUser",
73
- required: false,
74
- fieldType: "checkbox",
75
- },
76
- },
77
- {
78
- type: "field",
79
- mode: "props",
80
- props: {
81
- fieldLabel: "USER_REQUEST_REPORT_CODE",
82
- fieldName: "reportCode",
83
- required: false,
84
- fieldType: "text",
85
- },
86
- },
87
- {
88
- type: "field",
89
- mode: "props",
90
- props: {
91
- fieldLabel: "USER_REQUEST_REPORT_PARAMETERS",
92
- fieldName: "reportParameters",
93
- required: false,
94
- fieldType: "text",
95
- },
96
- },
97
- {
98
- type: "field",
99
- mode: "props",
100
- props: {
101
- fieldLabel: "USER_REQUEST_REQUEST_TYPE",
102
- fieldName: "requestType",
103
- required: false,
104
- fieldType: "text",
105
- },
106
- },
107
- {
108
- type: "field",
109
- mode: "props",
110
- props: {
111
- fieldLabel: "USER_REQUEST_STATUS",
112
- fieldName: "status",
113
- required: false,
114
- fieldType: "text",
115
- },
116
- },
117
- {
118
- type: "field",
119
- mode: "props",
120
- props: {
121
- fieldLabel: "USER_REQUEST_STATUS_MESSAGE",
122
- fieldName: "statusMessage",
123
- required: false,
124
- fieldType: "text",
125
- },
126
- },
127
- ];
128
-
129
- return (
130
- <TemplateGrid
131
- apiActions={apiActions}
132
- data={data}
133
- setData={setData}
134
- editMode={{ editMode: "row" }}
135
- formElements={formElements}
136
- keyColumnName={"id"}
137
- gridTitle="USER_REQUEST_PLURAL"
138
- girdIcon="table-cells"
139
- editAction={{ isEnabled: true, authority: "USER_REQUEST_EDIT" }}
140
- deleteAction={{ isEnabled: true, authority: "USER_REQUEST_DELETE" }}
141
- />
142
- );
143
- };
144
-
145
- export default UserRequestGrid;
@@ -1,175 +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 WidgetGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/widget/all",
10
- deleteById: "api/v1/admin/widget",
11
- save: "api/v1/admin/widget",
12
- findById: "api/v1/admin/widget",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "WIDGET_DATA_QUERY_ID",
22
- fieldName: "dataQueryId",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "WIDGET_ENABLED",
32
- fieldName: "enabled",
33
- required: false,
34
- fieldType: "checkbox",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "WIDGET_HEIGHT",
42
- fieldName: "height",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "WIDGET_HORIZONTAL_AXIS_FIELD",
52
- fieldName: "horizontalAxisField",
53
- required: false,
54
- fieldType: "text",
55
- },
56
- },
57
- {
58
- type: "field",
59
- mode: "props",
60
- props: {
61
- fieldLabel: "WIDGET_HORIZONTAL_AXIS_LABEL",
62
- fieldName: "horizontalAxisLabel",
63
- required: false,
64
- fieldType: "text",
65
- },
66
- },
67
- {
68
- type: "field",
69
- mode: "props",
70
- props: {
71
- fieldLabel: "WIDGET_ICON",
72
- fieldName: "icon",
73
- required: false,
74
- fieldType: "text",
75
- },
76
- },
77
- {
78
- type: "field",
79
- mode: "props",
80
- props: {
81
- fieldLabel: "WIDGET_SERIES_KEYS",
82
- fieldName: "seriesKeys",
83
- required: false,
84
- fieldType: "text",
85
- },
86
- },
87
- {
88
- type: "field",
89
- mode: "props",
90
- props: {
91
- fieldLabel: "WIDGET_TITLE",
92
- fieldName: "title",
93
- required: false,
94
- fieldType: "text",
95
- },
96
- },
97
- {
98
- type: "field",
99
- mode: "props",
100
- props: {
101
- fieldLabel: "WIDGET_VERTICAL_AXIS_FIELD",
102
- fieldName: "verticalAxisField",
103
- required: false,
104
- fieldType: "text",
105
- },
106
- },
107
- {
108
- type: "field",
109
- mode: "props",
110
- props: {
111
- fieldLabel: "WIDGET_VERTICAL_AXIS_LABEL",
112
- fieldName: "verticalAxisLabel",
113
- required: false,
114
- fieldType: "text",
115
- },
116
- },
117
- {
118
- type: "field",
119
- mode: "props",
120
- props: {
121
- fieldLabel: "WIDGET_WIDGET_DESCRIPTION",
122
- fieldName: "widgetDescription",
123
- required: false,
124
- fieldType: "text",
125
- },
126
- },
127
- {
128
- type: "field",
129
- mode: "props",
130
- props: {
131
- fieldLabel: "WIDGET_WIDGET_NAME",
132
- fieldName: "widgetName",
133
- required: false,
134
- fieldType: "text",
135
- },
136
- },
137
- {
138
- type: "field",
139
- mode: "props",
140
- props: {
141
- fieldLabel: "WIDGET_WIDGET_TYPE",
142
- fieldName: "widgetType",
143
- required: false,
144
- fieldType: "text",
145
- },
146
- },
147
- {
148
- type: "field",
149
- mode: "props",
150
- props: {
151
- fieldLabel: "WIDGET_WIDTH",
152
- fieldName: "width",
153
- required: false,
154
- fieldType: "text",
155
- },
156
- },
157
- ];
158
-
159
- return (
160
- <TemplateGrid
161
- apiActions={apiActions}
162
- data={data}
163
- setData={setData}
164
- editMode={{ editMode: "row" }}
165
- formElements={formElements}
166
- keyColumnName={"id"}
167
- gridTitle="WIDGET_PLURAL"
168
- girdIcon="table-cells"
169
- editAction={{ isEnabled: true, authority: "WIDGET_EDIT" }}
170
- deleteAction={{ isEnabled: true, authority: "WIDGET_DELETE" }}
171
- />
172
- );
173
- };
174
-
175
- export default WidgetGrid;
@@ -1,111 +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 WorkflowDocumentActionGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/workflowdocumentaction/all",
10
- deleteById: "api/v1/admin/workflowdocumentaction",
11
- save: "api/v1/admin/workflowdocumentaction",
12
- findById: "api/v1/admin/workflowdocumentaction",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",
22
- fieldName: "documentActionCode",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME",
32
- fieldName: "documentActionName",
33
- required: false,
34
- fieldType: "text",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",
42
- fieldName: "nextDocumentStatusId",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT",
52
- fieldName: "postActionEndpoint",
53
- required: false,
54
- fieldType: "text",
55
- },
56
- },
57
- {
58
- type: "field",
59
- mode: "props",
60
- props: {
61
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT",
62
- fieldName: "preActionEndpoint",
63
- required: false,
64
- fieldType: "text",
65
- },
66
- },
67
- {
68
- type: "field",
69
- mode: "props",
70
- props: {
71
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",
72
- fieldName: "requireComment",
73
- required: false,
74
- fieldType: "checkbox",
75
- },
76
- },
77
- {
78
- type: "field",
79
- mode: "props",
80
- props: {
81
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",
82
- fieldName: "workflowDocumentId",
83
- required: false,
84
- fieldType: "text",
85
- },
86
- },
87
- ];
88
-
89
- return (
90
- <TemplateGrid
91
- apiActions={apiActions}
92
- data={data}
93
- setData={setData}
94
- editMode={{ editMode: "row" }}
95
- formElements={formElements}
96
- keyColumnName={"id"}
97
- gridTitle="WORKFLOW_DOCUMENT_ACTION_PLURAL"
98
- girdIcon="table-cells"
99
- editAction={{
100
- isEnabled: true,
101
- authority: "WORKFLOW_DOCUMENT_ACTION_EDIT",
102
- }}
103
- deleteAction={{
104
- isEnabled: true,
105
- authority: "WORKFLOW_DOCUMENT_ACTION_DELETE",
106
- }}
107
- />
108
- );
109
- };
110
-
111
- export default WorkflowDocumentActionGrid;