@asaleh37/ui-base 1.0.8 → 1.1.0

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 (129) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +1 -1
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/src/components/App.tsx +31 -0
  7. package/src/components/BaseApp.tsx +2 -3
  8. package/src/components/admin/AttachmentGrid.tsx +116 -0
  9. package/src/components/admin/AuthorityGrid.tsx +88 -0
  10. package/src/components/admin/BluePrintGrid.tsx +55 -0
  11. package/src/components/admin/BluePrintPageGrid.tsx +85 -0
  12. package/src/components/admin/BluePrintPointGrid.tsx +85 -0
  13. package/src/components/admin/DashboardGrid.tsx +95 -0
  14. package/src/components/admin/DashboardWidgetGrid.tsx +75 -0
  15. package/src/components/admin/DataQueryGrid.tsx +75 -0
  16. package/src/components/admin/DataQueryParameterGrid.tsx +98 -0
  17. package/src/components/admin/DatasourceConnectionGrid.tsx +98 -0
  18. package/src/components/admin/EmployeeGrid.tsx +105 -0
  19. package/src/components/admin/EntityParameterGrid.tsx +125 -0
  20. package/src/components/admin/ExcelUploaderDetailGrid.tsx +78 -0
  21. package/src/components/admin/ExcelUploaderHeaderGrid.tsx +78 -0
  22. package/src/components/admin/LookupGrid.tsx +95 -0
  23. package/src/components/admin/MailAttachmentGrid.tsx +65 -0
  24. package/src/components/admin/MailBodyGrid.tsx +105 -0
  25. package/src/components/admin/MailNotificationQueueGrid.tsx +131 -0
  26. package/src/components/admin/MailRecipientGrid.tsx +75 -0
  27. package/src/components/admin/MailTemplateGrid.tsx +145 -0
  28. package/src/components/admin/NewTableGrid.tsx +65 -0
  29. package/src/components/admin/NotificationGrid.tsx +115 -0
  30. package/src/components/admin/NotificationQueueGrid.tsx +125 -0
  31. package/src/components/admin/OrganizationApplicationGrid.tsx +81 -0
  32. package/src/components/admin/OrganizationGrid.tsx +65 -0
  33. package/src/components/admin/OrganizationRankGrid.tsx +85 -0
  34. package/src/components/admin/OrganizationUnitGrid.tsx +85 -0
  35. package/src/components/admin/OrganizationUserGrid.tsx +75 -0
  36. package/src/components/admin/OrganizationUserRoleGrid.tsx +98 -0
  37. package/src/components/admin/ReportGrid.tsx +155 -0
  38. package/src/components/admin/ReportParameterGrid.tsx +95 -0
  39. package/src/components/admin/RoleAuthorityGrid.tsx +65 -0
  40. package/src/components/admin/RoleGrid.tsx +78 -0
  41. package/src/components/admin/UserAccountGrid.tsx +65 -0
  42. package/src/components/admin/UserRequestGrid.tsx +145 -0
  43. package/src/components/admin/WidgetGrid.tsx +175 -0
  44. package/src/components/admin/WorkflowDocumentActionGrid.tsx +111 -0
  45. package/src/components/admin/WorkflowDocumentActionHistoryGrid.tsx +111 -0
  46. package/src/components/admin/WorkflowDocumentActionMailGrid.tsx +71 -0
  47. package/src/components/admin/WorkflowDocumentGrid.tsx +185 -0
  48. package/src/components/admin/WorkflowDocumentMailLogGrid.tsx +141 -0
  49. package/src/components/admin/WorkflowDocumentStatusGrid.tsx +121 -0
  50. package/src/components/common/Home.tsx +31 -0
  51. package/src/components/common/LanguageSwitcher.tsx +25 -0
  52. package/src/components/common/LayoutHandlers.tsx +12 -0
  53. package/src/components/common/LoadingMask.tsx +19 -0
  54. package/src/components/common/Login.tsx +183 -0
  55. package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +288 -0
  56. package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +201 -0
  57. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormAction.tsx +60 -0
  58. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +194 -0
  59. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementGroup.tsx +98 -0
  60. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/CheckBox.tsx +64 -0
  61. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +94 -0
  62. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/Datefield.tsx +65 -0
  63. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/DatetimeField.tsx +64 -0
  64. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/FiltersPanel.tsx +237 -0
  65. package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +9 -0
  66. package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +256 -0
  67. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +188 -0
  68. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +844 -0
  69. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridMultiRecordAction.tsx +89 -0
  70. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridRecordAction.tsx +92 -0
  71. package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridTopBar.tsx +228 -0
  72. package/src/components/templates/DataEntryTemplates/useApiActions.ts +125 -0
  73. package/src/components/templates/TransferList.tsx +250 -0
  74. package/src/components/templates/Window/ConfirmationWindow.tsx +55 -0
  75. package/src/components/templates/visuals/TemplateDashboard.tsx +126 -0
  76. package/src/components/templates/visuals/charts/TemplateBarChart.tsx +16 -0
  77. package/src/components/templates/visuals/charts/TemplateDataCard.tsx +60 -0
  78. package/src/components/templates/visuals/charts/TemplateGauge.tsx +16 -0
  79. package/src/components/templates/visuals/charts/TemplateLineChart.tsx +16 -0
  80. package/src/components/templates/visuals/charts/TemplateLineProgress.tsx +40 -0
  81. package/src/components/templates/visuals/charts/TemplatePieChart.tsx +25 -0
  82. package/src/hooks/UseConfirmationWindow.tsx +54 -0
  83. package/src/hooks/UseMobile.tsx +13 -0
  84. package/src/hooks/UseSession.tsx +26 -0
  85. package/src/hooks/UseWindow.tsx +106 -0
  86. package/src/hooks/useAxios.tsx +271 -0
  87. package/src/hooks/useLoadingMask.tsx +16 -0
  88. package/src/layout/DrawerHeader.tsx +10 -0
  89. package/src/layout/Layout.tsx +122 -0
  90. package/src/layout/MainContent.tsx +43 -0
  91. package/src/layout/MobileDrawer.tsx +103 -0
  92. package/src/layout/NavigationTree.tsx +284 -0
  93. package/src/layout/SideBar.tsx +80 -0
  94. package/src/layout/TopBar.tsx +142 -0
  95. package/src/locales/arabic/adminLocalsAr.json +356 -0
  96. package/src/locales/arabic/common.json +34 -0
  97. package/src/locales/arabic/index.ts +7 -0
  98. package/src/locales/english/adminLocalsEn.json +356 -0
  99. package/src/locales/english/common.json +33 -0
  100. package/src/locales/english/index.ts +6 -0
  101. package/src/locales/english/index.tsx +0 -0
  102. package/src/locales/i18n.ts +15 -0
  103. package/src/locales/index.ts +9 -0
  104. package/src/navigationItems/Administration/adminNavigationItems.tsx +182 -0
  105. package/src/navigationItems/Administration/index.tsx +71 -0
  106. package/src/navigationItems/common/CommonNavigationItems.tsx +12 -0
  107. package/src/navigationItems/common/index.tsx +7 -0
  108. package/src/navigationItems/index.tsx +34 -0
  109. package/src/redux/features/administration/AdministrationStoresMetaData.ts +72 -0
  110. package/src/redux/features/business/BusinessStoresMetaData.ts +3 -0
  111. package/src/redux/features/business/CommonStoreSlice.ts +37 -0
  112. package/src/redux/features/common/AppInfoSlice.ts +30 -0
  113. package/src/redux/features/common/AppLayoutSlice.ts +37 -0
  114. package/src/redux/features/common/LoadingMaskSlice.ts +30 -0
  115. package/src/redux/features/common/UserSessionSlice.ts +62 -0
  116. package/src/redux/store.ts +10 -10
  117. package/src/routes/administration/adminRoutes.tsx +259 -0
  118. package/src/routes/administration/index.ts +4 -0
  119. package/src/routes/index.ts +11 -0
  120. package/src/routes/types/index.ts +5 -0
  121. package/src/styles/index.css +20 -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/MyComponent1.tsx +0 -16
  128. package/src/components/Counter.tsx +0 -32
  129. package/src/redux/CounterSlice.ts +0 -17
@@ -0,0 +1,65 @@
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 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;
@@ -0,0 +1,145 @@
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 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;
@@ -0,0 +1,175 @@
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 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;
@@ -0,0 +1,111 @@
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 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;
@@ -0,0 +1,111 @@
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 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;
@@ -0,0 +1,71 @@
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 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;