@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,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 WorkflowDocumentActionHistoryGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/workflowdocumentactionhistory/all",
10
- deleteById: "api/v1/admin/workflowdocumentactionhistory",
11
- save: "api/v1/admin/workflowdocumentactionhistory",
12
- findById: "api/v1/admin/workflowdocumentactionhistory",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY",
22
- fieldName: "actionBy",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT",
32
- fieldName: "actionComment",
33
- required: false,
34
- fieldType: "text",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD",
42
- fieldName: "actionMethod",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME",
52
- fieldName: "actionTime",
53
- required: false,
54
- fieldType: "datetime",
55
- },
56
- },
57
- {
58
- type: "field",
59
- mode: "props",
60
- props: {
61
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID",
62
- fieldName: "documentActionId",
63
- required: false,
64
- fieldType: "text",
65
- },
66
- },
67
- {
68
- type: "field",
69
- mode: "props",
70
- props: {
71
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID",
72
- fieldName: "documentRefId",
73
- required: false,
74
- fieldType: "text",
75
- },
76
- },
77
- {
78
- type: "field",
79
- mode: "props",
80
- props: {
81
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_HISTORY_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_HISTORY_PLURAL"
98
- girdIcon="table-cells"
99
- editAction={{
100
- isEnabled: true,
101
- authority: "WORKFLOW_DOCUMENT_ACTION_HISTORY_EDIT",
102
- }}
103
- deleteAction={{
104
- isEnabled: true,
105
- authority: "WORKFLOW_DOCUMENT_ACTION_HISTORY_DELETE",
106
- }}
107
- />
108
- );
109
- };
110
-
111
- export default WorkflowDocumentActionHistoryGrid;
@@ -1,71 +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 WorkflowDocumentActionMailGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/workflowdocumentactionmail/all",
10
- deleteById: "api/v1/admin/workflowdocumentactionmail",
11
- save: "api/v1/admin/workflowdocumentactionmail",
12
- findById: "api/v1/admin/workflowdocumentactionmail",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",
22
- fieldName: "documentActionId",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",
32
- fieldName: "enabled",
33
- required: false,
34
- fieldType: "checkbox",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",
42
- fieldName: "mailTemplateId",
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="WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"
58
- girdIcon="table-cells"
59
- editAction={{
60
- isEnabled: true,
61
- authority: "WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",
62
- }}
63
- deleteAction={{
64
- isEnabled: true,
65
- authority: "WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE",
66
- }}
67
- />
68
- );
69
- };
70
-
71
- export default WorkflowDocumentActionMailGrid;
@@ -1,185 +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 WorkflowDocumentGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/workflowdocument/all",
10
- deleteById: "api/v1/admin/workflowdocument",
11
- save: "api/v1/admin/workflowdocument",
12
- findById: "api/v1/admin/workflowdocument",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",
22
- fieldName: "appNotificationIcon",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",
32
- fieldName: "appNotificationStyle",
33
- required: false,
34
- fieldType: "text",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",
42
- fieldName: "appViewRoute",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_CODE",
52
- fieldName: "documentCode",
53
- required: false,
54
- fieldType: "text",
55
- },
56
- },
57
- {
58
- type: "field",
59
- mode: "props",
60
- props: {
61
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",
62
- fieldName: "documentConId",
63
- required: false,
64
- fieldType: "text",
65
- },
66
- },
67
- {
68
- type: "field",
69
- mode: "props",
70
- props: {
71
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",
72
- fieldName: "documentDatabaseName",
73
- required: false,
74
- fieldType: "text",
75
- },
76
- },
77
- {
78
- type: "field",
79
- mode: "props",
80
- props: {
81
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",
82
- fieldName: "documentDatabaseTable",
83
- required: false,
84
- fieldType: "text",
85
- },
86
- },
87
- {
88
- type: "field",
89
- mode: "props",
90
- props: {
91
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",
92
- fieldName: "documentIdField",
93
- required: false,
94
- fieldType: "text",
95
- },
96
- },
97
- {
98
- type: "field",
99
- mode: "props",
100
- props: {
101
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_NAME",
102
- fieldName: "documentName",
103
- required: false,
104
- fieldType: "text",
105
- },
106
- },
107
- {
108
- type: "field",
109
- mode: "props",
110
- props: {
111
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",
112
- fieldName: "documentNumberField",
113
- required: false,
114
- fieldType: "text",
115
- },
116
- },
117
- {
118
- type: "field",
119
- mode: "props",
120
- props: {
121
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID",
122
- fieldName: "documentReportId",
123
- required: false,
124
- fieldType: "text",
125
- },
126
- },
127
- {
128
- type: "field",
129
- mode: "props",
130
- props: {
131
- fieldLabel: "WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",
132
- fieldName: "documentStatusField",
133
- required: false,
134
- fieldType: "text",
135
- },
136
- },
137
- {
138
- type: "field",
139
- mode: "props",
140
- props: {
141
- fieldLabel: "WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",
142
- fieldName: "mailApprovalAllowed",
143
- required: false,
144
- fieldType: "checkbox",
145
- },
146
- },
147
- {
148
- type: "field",
149
- mode: "props",
150
- props: {
151
- fieldLabel: "WORKFLOW_DOCUMENT_ORG_CODE",
152
- fieldName: "orgCode",
153
- required: false,
154
- fieldType: "text",
155
- },
156
- },
157
- {
158
- type: "field",
159
- mode: "props",
160
- props: {
161
- fieldLabel: "WORKFLOW_DOCUMENT_USE_SYSTEM_CON",
162
- fieldName: "useSystemCon",
163
- required: false,
164
- fieldType: "checkbox",
165
- },
166
- },
167
- ];
168
-
169
- return (
170
- <TemplateGrid
171
- apiActions={apiActions}
172
- data={data}
173
- setData={setData}
174
- editMode={{ editMode: "row" }}
175
- formElements={formElements}
176
- keyColumnName={"id"}
177
- gridTitle="WORKFLOW_DOCUMENT_PLURAL"
178
- girdIcon="table-cells"
179
- editAction={{ isEnabled: true, authority: "WORKFLOW_DOCUMENT_EDIT" }}
180
- deleteAction={{ isEnabled: true, authority: "WORKFLOW_DOCUMENT_DELETE" }}
181
- />
182
- );
183
- };
184
-
185
- export default WorkflowDocumentGrid;
@@ -1,121 +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 WorkflowDocumentStatusGrid: React.FC = () => {
7
- const [data, setData] = useState([]);
8
- const apiActions = useApiActions({
9
- findAll: "api/v1/admin/workflowdocumentstatus/all",
10
- deleteById: "api/v1/admin/workflowdocumentstatus",
11
- save: "api/v1/admin/workflowdocumentstatus",
12
- findById: "api/v1/admin/workflowdocumentstatus",
13
- setData: setData,
14
- });
15
-
16
- const formElements: Array<FormElementProps> = [
17
- {
18
- type: "field",
19
- mode: "props",
20
- props: {
21
- fieldLabel: "WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",
22
- fieldName: "documentStatusCode",
23
- required: false,
24
- fieldType: "text",
25
- },
26
- },
27
- {
28
- type: "field",
29
- mode: "props",
30
- props: {
31
- fieldLabel: "WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME",
32
- fieldName: "documentStatusName",
33
- required: false,
34
- fieldType: "text",
35
- },
36
- },
37
- {
38
- type: "field",
39
- mode: "props",
40
- props: {
41
- fieldLabel: "WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",
42
- fieldName: "documentStatusOrder",
43
- required: false,
44
- fieldType: "text",
45
- },
46
- },
47
- {
48
- type: "field",
49
- mode: "props",
50
- props: {
51
- fieldLabel: "WORKFLOW_DOCUMENT_STATUS_ENABLED",
52
- fieldName: "enabled",
53
- required: false,
54
- fieldType: "checkbox",
55
- },
56
- },
57
- {
58
- type: "field",
59
- mode: "props",
60
- props: {
61
- fieldLabel: "WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",
62
- fieldName: "isZeroState",
63
- required: false,
64
- fieldType: "checkbox",
65
- },
66
- },
67
- {
68
- type: "field",
69
- mode: "props",
70
- props: {
71
- fieldLabel: "WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID",
72
- fieldName: "nextActionTakersQueryId",
73
- required: false,
74
- fieldType: "text",
75
- },
76
- },
77
- {
78
- type: "field",
79
- mode: "props",
80
- props: {
81
- fieldLabel: "WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID",
82
- fieldName: "nextActionsQueryId",
83
- required: false,
84
- fieldType: "text",
85
- },
86
- },
87
- {
88
- type: "field",
89
- mode: "props",
90
- props: {
91
- fieldLabel: "WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",
92
- fieldName: "workflowDocumentId",
93
- required: false,
94
- fieldType: "text",
95
- },
96
- },
97
- ];
98
-
99
- return (
100
- <TemplateGrid
101
- apiActions={apiActions}
102
- data={data}
103
- setData={setData}
104
- editMode={{ editMode: "row" }}
105
- formElements={formElements}
106
- keyColumnName={"id"}
107
- gridTitle="WORKFLOW_DOCUMENT_STATUS_PLURAL"
108
- girdIcon="table-cells"
109
- editAction={{
110
- isEnabled: true,
111
- authority: "WORKFLOW_DOCUMENT_STATUS_EDIT",
112
- }}
113
- deleteAction={{
114
- isEnabled: true,
115
- authority: "WORKFLOW_DOCUMENT_STATUS_DELETE",
116
- }}
117
- />
118
- );
119
- };
120
-
121
- export default WorkflowDocumentStatusGrid;
@@ -1,126 +0,0 @@
1
- import Grid from "@mui/material/Grid2";
2
- import TemplatePieChart from "./charts/TemplatePieChart";
3
- import TemplateBarChart from "./charts/TemplateBarChart";
4
- import TemplateLineChart from "./charts/TemplateLineChart";
5
- import TemplateGauge from "./charts/TemplateGauge";
6
- import TemplateDataCard from "./charts/TemplateDataCard";
7
- import TemplateLineProgress from "./charts/TemplateLineProgress";
8
- import { Typography } from "@mui/material";
9
-
10
- interface WidgetContainerProps {
11
- children: React.ReactNode;
12
- widgetType: "Line" | "Bar" | "Pie" | "Card" | "Gauge" | "Progress";
13
- }
14
-
15
- export interface WidgetProps {
16
- widgetTitle?: string;
17
- widgetType: "Line" | "Bar" | "Pie" | "Card" | "Gauge" | "Progress";
18
- data: any;
19
- valueField: string; //x-axis field in case of line/bar chart
20
- labelField: string; //y-axis field in case of line/bar chart, it can also be a comma separated string for multiple series
21
- }
22
-
23
- export interface SingleRecordWidgetProps {
24
- widgetTitle?: string;
25
- record: object;
26
- valueField: string;
27
- labelField: string;
28
- }
29
-
30
- export interface DashboardProps {
31
- dashboardTitle: string;
32
- dashboardWidgets: Array<WidgetProps>;
33
- }
34
-
35
- const WidgetContainer: React.FC<WidgetContainerProps> = ({
36
- children,
37
- widgetType,
38
- }) => {
39
- return (
40
- <Grid
41
- size={{ xs: 12, sm: 6, md: 4 }}
42
- sx={{
43
- alignItems: "center",
44
- justifyContent: "center",
45
- padding: 1,
46
- display: "flex",
47
- flexDirection: widgetType != "Card" ? "column" : undefined,
48
- height: 300,
49
- }}
50
- >
51
- {children}
52
- </Grid>
53
- );
54
- };
55
-
56
- const TemplateDashboard: React.FC<DashboardProps> = (props) => {
57
- return (
58
- <>
59
- <Typography sx={{ fontSize: 20, fontWeight: "bold" }}>
60
- {props.dashboardTitle}
61
- </Typography>
62
- <Grid
63
- container
64
- sx={{
65
- flexGrow: 1,
66
- width: "100%",
67
- overflowY: "auto",
68
- padding: 2,
69
- }}
70
- >
71
- {props.dashboardWidgets.map((widgetProps: any, index: any) => {
72
- if (
73
- widgetProps.widgetType === "Card" ||
74
- widgetProps.widgetType === "Gauge" ||
75
- widgetProps.widgetType === "Progress"
76
- ) {
77
- return (
78
- <>
79
- {widgetProps.data.map((record: any, index: any) => {
80
- const singleRecordWidgetProps: SingleRecordWidgetProps = {
81
- widgetTitle: widgetProps.widgetTitle,
82
- record,
83
- labelField: widgetProps.labelField,
84
- valueField: widgetProps.valueField,
85
- };
86
- return (
87
- <WidgetContainer
88
- key={index}
89
- widgetType={widgetProps.widgetType}
90
- >
91
- {widgetProps.widgetType === "Card" ? (
92
- <TemplateDataCard {...singleRecordWidgetProps} />
93
- ) : null}
94
- {widgetProps.widgetType === "Gauge" ? (
95
- <TemplateGauge {...singleRecordWidgetProps} />
96
- ) : null}
97
- {widgetProps.widgetType === "Progress" ? (
98
- <TemplateLineProgress {...singleRecordWidgetProps} />
99
- ) : null}
100
- </WidgetContainer>
101
- );
102
- })}
103
- </>
104
- );
105
- } else {
106
- return (
107
- <WidgetContainer key={index} widgetType={widgetProps.widgetType}>
108
- {widgetProps.widgetType === "Pie" ? (
109
- <TemplatePieChart {...widgetProps} />
110
- ) : null}
111
- {widgetProps.widgetType === "Line" ? (
112
- <TemplateLineChart {...widgetProps} />
113
- ) : null}
114
- {widgetProps.widgetType === "Bar" ? (
115
- <TemplateBarChart {...widgetProps} />
116
- ) : null}
117
- </WidgetContainer>
118
- );
119
- }
120
- })}
121
- </Grid>
122
- </>
123
- );
124
- };
125
-
126
- export default TemplateDashboard;
@@ -1,13 +0,0 @@
1
- import { createSlice } from "@reduxjs/toolkit";
2
-
3
- const CounterSlice = createSlice({
4
- name: "counter",
5
- initialState: { value: 0 },
6
- reducers: {
7
- increment: (state) => {
8
- state.value = state.value + 1;
9
- },
10
- },
11
- });
12
-
13
- export default CounterSlice.reducer;