@asaleh37/ui-base 1.2.17 → 1.2.18
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.
- package/.env.development +1 -1
- package/dist/index.d.ts +27 -5
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/public/no_image.png +0 -0
- package/src/components/administration/admin/OrganizationApplicationModuleGrid.tsx +10 -34
- package/src/components/administration/admin/OrganizationGrid.tsx +4 -87
- package/src/components/administration/admin/OrganizationRankGrid.tsx +34 -16
- package/src/components/administration/admin/OrganizationUnitGrid.tsx +34 -30
- package/src/components/administration/admin/OrganizationUnitTypeGrid.tsx +3 -16
- package/src/components/administration/admin/PersonGrid.tsx +38 -1
- package/src/components/administration/admin/RoleAuthoritiesForm.tsx +2 -4
- package/src/components/administration/admin/SystemApplicationAuthorityGrid.tsx +2 -18
- package/src/components/administration/admin/SystemApplicationGrid.tsx +5 -83
- package/src/components/administration/admin/SystemApplicationModuleGrid.tsx +2 -15
- package/src/components/administration/admin/SystemApplicationRoleGrid.tsx +1 -15
- package/src/components/administration/dev/AttachmentConfigGrid.tsx +213 -0
- package/src/components/administration/dev/AttachmentGrid.tsx +172 -0
- package/src/components/administration/dev/LookupGrid.tsx +1 -12
- package/src/components/common/Home.tsx +24 -22
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +13 -1
- package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +6 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +1 -3
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/SystemLookupCombobox.tsx +1 -1
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +100 -8
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +105 -4
- package/src/components/templates/attachment/AttachmentCard.tsx +126 -0
- package/src/components/templates/attachment/AttachmentImageViewer.tsx +44 -0
- package/src/components/templates/attachment/AttachmentPanel.tsx +269 -0
- package/src/components/templates/workflow/WorkflowDocumentPanel.tsx +4 -4
- package/src/hooks/UseSession.tsx +20 -2
- package/src/hooks/useAxios.tsx +71 -11
- package/src/hooks/useLookupGridColumn.tsx +2 -2
- package/src/layout/MainContent.tsx +49 -46
- package/src/layout/TopBar.tsx +6 -1
- package/src/locales/arabic/devLocalsAr.json +13 -1
- package/src/locales/english/devLocalsEn.json +13 -1
- package/src/main.tsx +3 -3
- package/src/navigationItems/Administration/adminNavigationItems.tsx +77 -3
- package/src/redux/features/administration/AdministrationStoresMetaData.ts +14 -6
- package/src/routes/administration/adminRoutes.tsx +21 -0
- package/src/routes/administration/devRoutes.tsx +24 -0
- package/public/icons/LICENSE.md +0 -5
- package/public/icons/arrow-clockwise.svg +0 -4
- package/public/icons/arrow-counterclockwise.svg +0 -4
- package/public/icons/journal-text.svg +0 -5
- package/public/icons/justify.svg +0 -3
- package/public/icons/text-center.svg +0 -3
- package/public/icons/text-left.svg +0 -3
- package/public/icons/text-paragraph.svg +0 -3
- package/public/icons/text-right.svg +0 -3
- package/public/icons/type-bold.svg +0 -3
- package/public/icons/type-italic.svg +0 -3
- package/public/icons/type-strikethrough.svg +0 -3
- package/public/icons/type-underline.svg +0 -3
|
@@ -3,50 +3,18 @@ import TemplateGrid from "../../templates/DataEntryTemplates/TemplateDataGrid/Te
|
|
|
3
3
|
import { useApiActions, useWindow } from "../../../hooks";
|
|
4
4
|
import { FormElementProps } from "../../templates/DataEntryTemplates/DataEntryTypes";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
|
-
import SystemApplicationModuleGrid from "./SystemApplicationModuleGrid";
|
|
7
|
-
import SystemApplicationAuthorityGrid from "./SystemApplicationAuthorityGrid";
|
|
8
|
-
import SystemApplicationRoleGrid from "./SystemApplicationRoleGrid";
|
|
9
|
-
import LookupGrid from "../dev/LookupGrid";
|
|
10
6
|
|
|
11
7
|
const SystemApplicationGrid: React.FC = () => {
|
|
12
8
|
const { t } = useTranslation();
|
|
13
9
|
const [data, setData] = useState([]);
|
|
14
10
|
const apiActions = useApiActions({
|
|
15
|
-
findAll: "api/v1/admin/systemapplication/all",
|
|
16
|
-
deleteById: "api/v1/admin/systemapplication",
|
|
17
|
-
save: "api/v1/admin/systemapplication",
|
|
18
|
-
findById: "api/v1/admin/systemapplication",
|
|
11
|
+
findAll: "api/v1/org/admin/systemapplication/all",
|
|
12
|
+
deleteById: "api/v1/org/admin/systemapplication",
|
|
13
|
+
save: "api/v1/org/admin/systemapplication",
|
|
14
|
+
findById: "api/v1/org/admin/systemapplication",
|
|
19
15
|
setData: setData,
|
|
20
16
|
});
|
|
21
|
-
|
|
22
|
-
Window: ApplicationModulesWindow,
|
|
23
|
-
setWindowState: setApplicationModulesWindowState,
|
|
24
|
-
} = useWindow({
|
|
25
|
-
windowTitle: "System Application Modules",
|
|
26
|
-
windowIcon: "layer-group",
|
|
27
|
-
});
|
|
28
|
-
const {
|
|
29
|
-
Window: ApplicationAuthoritiessWindow,
|
|
30
|
-
setWindowState: setApplicationAuthoritiesWindowState,
|
|
31
|
-
} = useWindow({
|
|
32
|
-
windowTitle: "System Application Authorities",
|
|
33
|
-
windowIcon: "key",
|
|
34
|
-
});
|
|
35
|
-
const {
|
|
36
|
-
Window: ApplicationRolesWindow,
|
|
37
|
-
setWindowState: setApplicationRolesWindowState,
|
|
38
|
-
} = useWindow({
|
|
39
|
-
windowTitle: "System Application Roles",
|
|
40
|
-
windowIcon: "tag",
|
|
41
|
-
});
|
|
42
|
-
const {
|
|
43
|
-
Window: ApplicationLookupsWindow,
|
|
44
|
-
setWindowState: setApplicationLookupsWindowState,
|
|
45
|
-
} = useWindow({
|
|
46
|
-
windowTitle: "System Application Lookups",
|
|
47
|
-
windowIcon: "list-check",
|
|
48
|
-
});
|
|
49
|
-
const [selectedRecord, setSelectedRecord] = useState<any>(null);
|
|
17
|
+
|
|
50
18
|
const formElements: Array<FormElementProps> = [
|
|
51
19
|
{
|
|
52
20
|
type: "field",
|
|
@@ -93,54 +61,8 @@ const SystemApplicationGrid: React.FC = () => {
|
|
|
93
61
|
|
|
94
62
|
return (
|
|
95
63
|
<>
|
|
96
|
-
<ApplicationModulesWindow>
|
|
97
|
-
<SystemApplicationModuleGrid selectedApplication={selectedRecord} />
|
|
98
|
-
</ApplicationModulesWindow>
|
|
99
|
-
<ApplicationAuthoritiessWindow>
|
|
100
|
-
<SystemApplicationAuthorityGrid selectedApplication={selectedRecord} />
|
|
101
|
-
</ApplicationAuthoritiessWindow>
|
|
102
|
-
<ApplicationRolesWindow>
|
|
103
|
-
<SystemApplicationRoleGrid selectedApplication={selectedRecord} />
|
|
104
|
-
</ApplicationRolesWindow>
|
|
105
|
-
<ApplicationLookupsWindow>
|
|
106
|
-
<LookupGrid selectedApplication={selectedRecord} />
|
|
107
|
-
</ApplicationLookupsWindow>
|
|
108
64
|
<TemplateGrid
|
|
109
65
|
apiActions={apiActions}
|
|
110
|
-
rowActions={[
|
|
111
|
-
{
|
|
112
|
-
icon: "layer-group",
|
|
113
|
-
actionFn: async (data) => {
|
|
114
|
-
setSelectedRecord(data);
|
|
115
|
-
setApplicationModulesWindowState(true);
|
|
116
|
-
},
|
|
117
|
-
label: "modules",
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
icon: "key",
|
|
121
|
-
actionFn: async (data) => {
|
|
122
|
-
setSelectedRecord(data);
|
|
123
|
-
setApplicationAuthoritiesWindowState(true);
|
|
124
|
-
},
|
|
125
|
-
label: "Authorities",
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
icon: "tag",
|
|
129
|
-
actionFn: async (data) => {
|
|
130
|
-
setSelectedRecord(data);
|
|
131
|
-
setApplicationRolesWindowState(true);
|
|
132
|
-
},
|
|
133
|
-
label: "Roles",
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
icon: "list-check",
|
|
137
|
-
actionFn: async (data) => {
|
|
138
|
-
setSelectedRecord(data);
|
|
139
|
-
setApplicationLookupsWindowState(true);
|
|
140
|
-
},
|
|
141
|
-
label: "Lookups",
|
|
142
|
-
},
|
|
143
|
-
]}
|
|
144
66
|
data={data}
|
|
145
67
|
setData={setData}
|
|
146
68
|
editMode={{ editMode: "row" }}
|
|
@@ -4,17 +4,11 @@ import { useApiActions } from "../../../hooks";
|
|
|
4
4
|
import { FormElementProps } from "../../templates/DataEntryTemplates/DataEntryTypes";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
selectedApplication: any;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const SystemApplicationModuleGrid: React.FC<
|
|
12
|
-
SystemApplicationModuleGridProps
|
|
13
|
-
> = (props) => {
|
|
7
|
+
const SystemApplicationModuleGrid: React.FC = () => {
|
|
14
8
|
const { t } = useTranslation();
|
|
15
9
|
const [data, setData] = useState([]);
|
|
16
10
|
const apiActions = useApiActions({
|
|
17
|
-
|
|
11
|
+
commonStoreKey: "SystemApplicationModules",
|
|
18
12
|
deleteById: "api/v1/admin/systemapplicationmodule",
|
|
19
13
|
save: "api/v1/admin/systemapplicationmodule",
|
|
20
14
|
findById: "api/v1/admin/systemapplicationmodule",
|
|
@@ -80,9 +74,6 @@ const SystemApplicationModuleGrid: React.FC<
|
|
|
80
74
|
<TemplateGrid
|
|
81
75
|
apiActions={apiActions}
|
|
82
76
|
data={data}
|
|
83
|
-
gridLoadParametersValues={{
|
|
84
|
-
applicationId: props?.selectedApplication?.id,
|
|
85
|
-
}}
|
|
86
77
|
setData={setData}
|
|
87
78
|
editMode={{ editMode: "row" }}
|
|
88
79
|
formElements={formElements}
|
|
@@ -93,10 +84,6 @@ const SystemApplicationModuleGrid: React.FC<
|
|
|
93
84
|
editAction={{
|
|
94
85
|
isEnabled: true,
|
|
95
86
|
authority: "SYSTEM_APPLICATION_MODULE_EDIT",
|
|
96
|
-
preActionValidation: async (data) => {
|
|
97
|
-
data.systemApplicationId = props?.selectedApplication?.id;
|
|
98
|
-
return true;
|
|
99
|
-
},
|
|
100
87
|
}}
|
|
101
88
|
deleteAction={{
|
|
102
89
|
isEnabled: true,
|
|
@@ -5,13 +5,7 @@ import { FormElementProps } from "../../templates/DataEntryTemplates/DataEntryTy
|
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import RoleAuthoritiesForm from "./RoleAuthoritiesForm";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
selectedApplication: any;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const SystemApplicationRoleGrid: React.FC<SystemApplicationRoleGridProps> = (
|
|
13
|
-
props
|
|
14
|
-
) => {
|
|
8
|
+
const SystemApplicationRoleGrid: React.FC = () => {
|
|
15
9
|
const { t } = useTranslation();
|
|
16
10
|
const [data, setData] = useState([]);
|
|
17
11
|
const [selectedRole, setSelectedRole] = useState(null);
|
|
@@ -80,7 +74,6 @@ const SystemApplicationRoleGrid: React.FC<SystemApplicationRoleGridProps> = (
|
|
|
80
74
|
<>
|
|
81
75
|
<RoleaAuthoritiesWindow>
|
|
82
76
|
<RoleAuthoritiesForm
|
|
83
|
-
appId={props.selectedApplication.id}
|
|
84
77
|
roleId={selectedRole?.id}
|
|
85
78
|
closeModalFn={() => {
|
|
86
79
|
setRoleAuthoritiesWindowState(false);
|
|
@@ -91,9 +84,6 @@ const SystemApplicationRoleGrid: React.FC<SystemApplicationRoleGridProps> = (
|
|
|
91
84
|
apiActions={apiActions}
|
|
92
85
|
data={data}
|
|
93
86
|
hideInfoBar={true}
|
|
94
|
-
gridLoadParametersValues={{
|
|
95
|
-
applicationId: props?.selectedApplication?.id,
|
|
96
|
-
}}
|
|
97
87
|
setData={setData}
|
|
98
88
|
editMode={{ editMode: "row" }}
|
|
99
89
|
formElements={formElements}
|
|
@@ -113,10 +103,6 @@ const SystemApplicationRoleGrid: React.FC<SystemApplicationRoleGridProps> = (
|
|
|
113
103
|
editAction={{
|
|
114
104
|
isEnabled: true,
|
|
115
105
|
authority: "SYSTEM_APPLICATION_ROLE_EDIT",
|
|
116
|
-
preActionValidation: async (data) => {
|
|
117
|
-
data.systemApplicationId = props?.selectedApplication?.id;
|
|
118
|
-
return true;
|
|
119
|
-
},
|
|
120
106
|
}}
|
|
121
107
|
deleteAction={{
|
|
122
108
|
isEnabled: true,
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import TemplateGrid from "../../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
|
|
3
|
+
import { FormElementProps } from "../../templates/DataEntryTemplates/DataEntryTypes";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import { useApiActions } from "../../../hooks";
|
|
6
|
+
|
|
7
|
+
const storageTypes = [{ value: "FILE_SYSTEM" }, { value: "SFTP" }];
|
|
8
|
+
|
|
9
|
+
const AttachmentConfigGrid: React.FC = () => {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const [data, setData] = useState([]);
|
|
12
|
+
const apiActions = useApiActions({
|
|
13
|
+
findAll: "api/v1/dev/attachmentconfig/all",
|
|
14
|
+
deleteById: "api/v1/dev/attachmentconfig",
|
|
15
|
+
save: "api/v1/dev/attachmentconfig",
|
|
16
|
+
findById: "api/v1/dev/attachmentconfig",
|
|
17
|
+
setData: setData,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const formElements: Array<FormElementProps> = [
|
|
21
|
+
{
|
|
22
|
+
type: "field",
|
|
23
|
+
mode: "props",
|
|
24
|
+
props: {
|
|
25
|
+
fieldLabel: "id",
|
|
26
|
+
fieldName: "id",
|
|
27
|
+
fieldType: "number",
|
|
28
|
+
hidden: true,
|
|
29
|
+
gridProps: {
|
|
30
|
+
hidden: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "field",
|
|
36
|
+
mode: "props",
|
|
37
|
+
props: {
|
|
38
|
+
fieldLabel: "createTime",
|
|
39
|
+
fieldName: "createTime",
|
|
40
|
+
fieldType: "datetime",
|
|
41
|
+
hidden: true,
|
|
42
|
+
gridProps: {
|
|
43
|
+
hidden: true,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "field",
|
|
49
|
+
mode: "props",
|
|
50
|
+
props: {
|
|
51
|
+
fieldLabel: "createdBy",
|
|
52
|
+
fieldName: "createdBy",
|
|
53
|
+
fieldType: "text",
|
|
54
|
+
hidden: true,
|
|
55
|
+
gridProps: {
|
|
56
|
+
hidden: true,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: "field",
|
|
62
|
+
mode: "props",
|
|
63
|
+
props: {
|
|
64
|
+
fieldLabel: "lastUpdateBy",
|
|
65
|
+
fieldName: "lastUpdateBy",
|
|
66
|
+
fieldType: "text",
|
|
67
|
+
hidden: true,
|
|
68
|
+
gridProps: {
|
|
69
|
+
hidden: true,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: "field",
|
|
75
|
+
mode: "props",
|
|
76
|
+
props: {
|
|
77
|
+
fieldLabel: "lastUpdateTime",
|
|
78
|
+
fieldName: "lastUpdateTime",
|
|
79
|
+
fieldType: "datetime",
|
|
80
|
+
hidden: true,
|
|
81
|
+
gridProps: {
|
|
82
|
+
hidden: true,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: "field",
|
|
88
|
+
mode: "props",
|
|
89
|
+
props: {
|
|
90
|
+
fieldLabel: "ATTACHMENT_CONFIG_ATTACHMENT_CODE",
|
|
91
|
+
fieldName: "attachmentCode",
|
|
92
|
+
required: true,
|
|
93
|
+
fieldType: "text",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: "field",
|
|
98
|
+
mode: "props",
|
|
99
|
+
props: {
|
|
100
|
+
fieldLabel: "ATTACHMENT_CONFIG_RELATED_DATABASE_TABLE",
|
|
101
|
+
fieldName: "relatedDatabaseTable",
|
|
102
|
+
required: true,
|
|
103
|
+
fieldType: "text",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: "field",
|
|
108
|
+
mode: "props",
|
|
109
|
+
props: {
|
|
110
|
+
fieldLabel: "ATTACHMENT_CONFIG_STORAGE_TYPE",
|
|
111
|
+
fieldName: "storageType",
|
|
112
|
+
required: true,
|
|
113
|
+
fieldType: "combobox",
|
|
114
|
+
options: storageTypes,
|
|
115
|
+
optionDisplayField: "value",
|
|
116
|
+
optionValueField: "value",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: "field",
|
|
121
|
+
mode: "props",
|
|
122
|
+
props: {
|
|
123
|
+
fieldLabel: "ATTACHMENT_CONFIG_UPLOAD_DIRECTORY",
|
|
124
|
+
fieldName: "uploadDirectory",
|
|
125
|
+
required: true,
|
|
126
|
+
fieldType: "text",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: "field",
|
|
131
|
+
mode: "props",
|
|
132
|
+
props: {
|
|
133
|
+
fieldLabel: "ATTACHMENT_CONFIG_ALLOWED_FILE_TYPES",
|
|
134
|
+
fieldName: "allowedFileTypes",
|
|
135
|
+
required: false,
|
|
136
|
+
fieldType: "text",
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: "field",
|
|
141
|
+
mode: "props",
|
|
142
|
+
props: {
|
|
143
|
+
fieldLabel: "ATTACHMENT_CONFIG_ATTACHMENT_CATEGORIES",
|
|
144
|
+
fieldName: "attachmentCategories",
|
|
145
|
+
required: false,
|
|
146
|
+
fieldType: "text",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: "field",
|
|
151
|
+
mode: "props",
|
|
152
|
+
props: {
|
|
153
|
+
fieldLabel: "Is Category Mandatory",
|
|
154
|
+
fieldName: "isCategoryRequired",
|
|
155
|
+
required: false,
|
|
156
|
+
fieldType: "checkbox",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: "field",
|
|
161
|
+
mode: "props",
|
|
162
|
+
props: {
|
|
163
|
+
fieldLabel: "ATTACHMENT_CONFIG_MAX_ALLOWED_NUMBER_OF_FILES",
|
|
164
|
+
fieldName: "maxAllowedNumberOfFiles",
|
|
165
|
+
required: false,
|
|
166
|
+
fieldType: "number",
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: "field",
|
|
171
|
+
mode: "props",
|
|
172
|
+
props: {
|
|
173
|
+
fieldLabel: "ATTACHMENT_CONFIG_DOWNLOAD_AUTHORITY_KEY",
|
|
174
|
+
fieldName: "downloadAuthorityKey",
|
|
175
|
+
required: false,
|
|
176
|
+
fieldType: "text",
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
type: "field",
|
|
181
|
+
mode: "props",
|
|
182
|
+
props: {
|
|
183
|
+
fieldLabel: "ATTACHMENT_CONFIG_UPLOAD_AUTHORITY_KEY",
|
|
184
|
+
fieldName: "uploadAuthorityKey",
|
|
185
|
+
required: false,
|
|
186
|
+
fieldType: "text",
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
<TemplateGrid
|
|
193
|
+
apiActions={apiActions}
|
|
194
|
+
data={data}
|
|
195
|
+
setData={setData}
|
|
196
|
+
editMode={{
|
|
197
|
+
editMode: "modal",
|
|
198
|
+
specs: {
|
|
199
|
+
modalIcon: "paperclip",
|
|
200
|
+
modalTitle: "Attachment Configuration",
|
|
201
|
+
},
|
|
202
|
+
}}
|
|
203
|
+
formElements={formElements}
|
|
204
|
+
keyColumnName={"id"}
|
|
205
|
+
gridTitle={t("ATTACHMENT_CONFIG_PLURAL")}
|
|
206
|
+
girdIcon="paperclip"
|
|
207
|
+
editAction={{ isEnabled: true, authority: "ATTACHMENT_CONFIG_EDIT" }}
|
|
208
|
+
deleteAction={{ isEnabled: true, authority: "ATTACHMENT_CONFIG_DELETE" }}
|
|
209
|
+
/>
|
|
210
|
+
);
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export default AttachmentConfigGrid;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import TemplateGrid from "../../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
|
|
3
|
+
import { FormElementProps } from "../../templates/DataEntryTemplates/DataEntryTypes";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import { useApiActions } from "../../../hooks";
|
|
6
|
+
|
|
7
|
+
const AttachmentGrid: React.FC = () => {
|
|
8
|
+
const { t } = useTranslation();
|
|
9
|
+
const [data, setData] = useState([]);
|
|
10
|
+
const apiActions = useApiActions({
|
|
11
|
+
findAll: "api/v1/dev/attachment/all",
|
|
12
|
+
deleteById: "api/v1/dev/attachment",
|
|
13
|
+
save: "api/v1/dev/attachment",
|
|
14
|
+
findById: "api/v1/dev/attachment",
|
|
15
|
+
setData: setData,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const formElements: Array<FormElementProps> = [
|
|
19
|
+
{
|
|
20
|
+
type: "field",
|
|
21
|
+
mode: "props",
|
|
22
|
+
props: {
|
|
23
|
+
fieldLabel: "id",
|
|
24
|
+
fieldName: "id",
|
|
25
|
+
fieldType: "number",
|
|
26
|
+
hidden: true,
|
|
27
|
+
gridProps: {
|
|
28
|
+
hidden: true,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: "field",
|
|
34
|
+
mode: "props",
|
|
35
|
+
props: {
|
|
36
|
+
fieldLabel: "createTime",
|
|
37
|
+
fieldName: "createTime",
|
|
38
|
+
fieldType: "datetime",
|
|
39
|
+
hidden: true,
|
|
40
|
+
gridProps: {
|
|
41
|
+
hidden: true,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "field",
|
|
47
|
+
mode: "props",
|
|
48
|
+
props: {
|
|
49
|
+
fieldLabel: "createdBy",
|
|
50
|
+
fieldName: "createdBy",
|
|
51
|
+
fieldType: "text",
|
|
52
|
+
hidden: true,
|
|
53
|
+
gridProps: {
|
|
54
|
+
hidden: true,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: "field",
|
|
60
|
+
mode: "props",
|
|
61
|
+
props: {
|
|
62
|
+
fieldLabel: "lastUpdateBy",
|
|
63
|
+
fieldName: "lastUpdateBy",
|
|
64
|
+
fieldType: "text",
|
|
65
|
+
hidden: true,
|
|
66
|
+
gridProps: {
|
|
67
|
+
hidden: true,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "field",
|
|
73
|
+
mode: "props",
|
|
74
|
+
props: {
|
|
75
|
+
fieldLabel: "lastUpdateTime",
|
|
76
|
+
fieldName: "lastUpdateTime",
|
|
77
|
+
fieldType: "datetime",
|
|
78
|
+
hidden: true,
|
|
79
|
+
gridProps: {
|
|
80
|
+
hidden: true,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: "field",
|
|
86
|
+
mode: "props",
|
|
87
|
+
props: {
|
|
88
|
+
fieldLabel: "ATTACHMENT_ATTACHMENT_CONFIG_ID",
|
|
89
|
+
fieldName: "attachmentConfigId",
|
|
90
|
+
required: false,
|
|
91
|
+
fieldType: "number",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: "field",
|
|
96
|
+
mode: "props",
|
|
97
|
+
props: {
|
|
98
|
+
fieldLabel: "ATTACHMENT_ATTACHMENT_SIZE",
|
|
99
|
+
fieldName: "attachmentSize",
|
|
100
|
+
required: false,
|
|
101
|
+
fieldType: "number",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: "field",
|
|
106
|
+
mode: "props",
|
|
107
|
+
props: {
|
|
108
|
+
fieldLabel: "ATTACHMENT_CATEGORY",
|
|
109
|
+
fieldName: "category",
|
|
110
|
+
required: false,
|
|
111
|
+
fieldType: "text",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: "field",
|
|
116
|
+
mode: "props",
|
|
117
|
+
props: {
|
|
118
|
+
fieldLabel: "ATTACHMENT_DOC_TYPE",
|
|
119
|
+
fieldName: "docType",
|
|
120
|
+
required: false,
|
|
121
|
+
fieldType: "text",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: "field",
|
|
126
|
+
mode: "props",
|
|
127
|
+
props: {
|
|
128
|
+
fieldLabel: "ATTACHMENT_FILE_NAME",
|
|
129
|
+
fieldName: "fileName",
|
|
130
|
+
required: false,
|
|
131
|
+
fieldType: "text",
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: "field",
|
|
136
|
+
mode: "props",
|
|
137
|
+
props: {
|
|
138
|
+
fieldLabel: "ATTACHMENT_REF_KEY",
|
|
139
|
+
fieldName: "refKey",
|
|
140
|
+
required: false,
|
|
141
|
+
fieldType: "text",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: "field",
|
|
146
|
+
mode: "props",
|
|
147
|
+
props: {
|
|
148
|
+
fieldLabel: "ATTACHMENT_REMARK",
|
|
149
|
+
fieldName: "remark",
|
|
150
|
+
required: false,
|
|
151
|
+
fieldType: "text",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<TemplateGrid
|
|
158
|
+
apiActions={apiActions}
|
|
159
|
+
data={data}
|
|
160
|
+
setData={setData}
|
|
161
|
+
editMode={{ editMode: "row" }}
|
|
162
|
+
formElements={formElements}
|
|
163
|
+
keyColumnName={"id"}
|
|
164
|
+
gridTitle={t("ATTACHMENT_PLURAL")}
|
|
165
|
+
girdIcon="table-cells"
|
|
166
|
+
editAction={{ isEnabled: true, authority: "ATTACHMENT_EDIT" }}
|
|
167
|
+
deleteAction={{ isEnabled: true, authority: "ATTACHMENT_DELETE" }}
|
|
168
|
+
/>
|
|
169
|
+
);
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export default AttachmentGrid;
|
|
@@ -5,11 +5,7 @@ import { useTranslation } from "react-i18next";
|
|
|
5
5
|
import { useApiActions } from "../../../hooks";
|
|
6
6
|
import { useSelector } from "react-redux";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
selectedApplication: any;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const LookupGrid: React.FC<LookupGridProps> = (props) => {
|
|
8
|
+
const LookupGrid: React.FC = () => {
|
|
13
9
|
const SystemOrganizations = useSelector(
|
|
14
10
|
(state: any) => state.commonStores.stores.SystemOrganizations.data
|
|
15
11
|
);
|
|
@@ -107,9 +103,6 @@ const LookupGrid: React.FC<LookupGridProps> = (props) => {
|
|
|
107
103
|
data={data}
|
|
108
104
|
setData={setData}
|
|
109
105
|
hideInfoBar={true}
|
|
110
|
-
gridLoadParametersValues={{
|
|
111
|
-
systemApplicationId: props.selectedApplication.id,
|
|
112
|
-
}}
|
|
113
106
|
editMode={{ editMode: "row" }}
|
|
114
107
|
formElements={formElements}
|
|
115
108
|
keyColumnName={"id"}
|
|
@@ -118,10 +111,6 @@ const LookupGrid: React.FC<LookupGridProps> = (props) => {
|
|
|
118
111
|
editAction={{
|
|
119
112
|
isEnabled: true,
|
|
120
113
|
authority: "LOOKUP_EDIT",
|
|
121
|
-
preActionValidation: (data: any) => {
|
|
122
|
-
data.systemApplicationId = props.selectedApplication.id;
|
|
123
|
-
return true;
|
|
124
|
-
},
|
|
125
114
|
}}
|
|
126
115
|
deleteAction={{ isEnabled: true, authority: "LOOKUP_DELETE" }}
|
|
127
116
|
/>
|
|
@@ -4,32 +4,34 @@ import { TemplateForm } from "../templates";
|
|
|
4
4
|
import ReportViewer from "../templates/report/ReportViewer";
|
|
5
5
|
import WorkflowDocumentPanel from "../templates/workflow/WorkflowDocumentPanel";
|
|
6
6
|
import DashboardViewer from "../templates/visuals/DashboardViewer";
|
|
7
|
+
import AttachmentPanel from "../templates/attachment/AttachmentPanel";
|
|
7
8
|
|
|
8
9
|
const Home: React.FC = () => {
|
|
9
10
|
return (
|
|
10
11
|
// <DashboardViewer dashboardCode="XX_TEMPLATE_DASHBOARD" />
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</
|
|
12
|
+
<AttachmentPanel attachmentCode="DOC" refKey="1"/>
|
|
13
|
+
// <Box
|
|
14
|
+
// sx={{
|
|
15
|
+
// display: "flex",
|
|
16
|
+
// flexDirection: "column",
|
|
17
|
+
// alignItems: "center",
|
|
18
|
+
// justifyContent: "center",
|
|
19
|
+
// flex: 1,
|
|
20
|
+
// fontSize: 24,
|
|
21
|
+
// fontWeight: "bold",
|
|
22
|
+
// }}
|
|
23
|
+
// >
|
|
24
|
+
// <img src="logo.png" style={{ margin: 5 }} />
|
|
25
|
+
// <div>Welcome to Ezzsteel Flat Product Management System</div>
|
|
26
|
+
// <div style={{ fontSize: 16 }}>
|
|
27
|
+
// Use side menu [
|
|
28
|
+
// <FontAwesomeIcon
|
|
29
|
+
// icon="bars"
|
|
30
|
+
// style={{ marginLeft: 10, marginRight: 10 }}
|
|
31
|
+
// />
|
|
32
|
+
// ] to navigate to your authorized system modules
|
|
33
|
+
// </div>
|
|
34
|
+
// </Box>
|
|
33
35
|
);
|
|
34
36
|
};
|
|
35
37
|
|