@asaleh37/ui-base 25.9.29 → 25.9.30-1
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/dist/index.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +4 -0
- package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +5 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +3 -7
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +15 -15
- package/src/components/templates/workflow/WorkflowDocumentPanel.tsx +3 -2
- package/src/main.tsx +1 -1
package/package.json
CHANGED
|
@@ -97,6 +97,10 @@ export type TemplateGridColDef = GridColDef & {
|
|
|
97
97
|
options?: Array<object>;
|
|
98
98
|
displayField?: string;
|
|
99
99
|
valueField?: string;
|
|
100
|
+
commonStoreKey?: string;
|
|
101
|
+
dataQueryId?: number;
|
|
102
|
+
storeUrl?: string;
|
|
103
|
+
storeLoadParam?: any;
|
|
100
104
|
};
|
|
101
105
|
|
|
102
106
|
export type TemplateGridAttachmentProps = {
|
|
@@ -145,6 +145,7 @@ export const constructGridColumnsFromFields: (
|
|
|
145
145
|
valueField: tableField?.optionValueField || "value",
|
|
146
146
|
displayField: tableField?.optionDisplayField || "display",
|
|
147
147
|
options: tableField?.options || [],
|
|
148
|
+
|
|
148
149
|
flex: tableField?.gridProps?.muiProps?.flex || 1,
|
|
149
150
|
minWidth: tableField?.gridProps?.muiProps?.width
|
|
150
151
|
? tableField?.gridProps?.muiProps?.width
|
|
@@ -163,6 +164,10 @@ export const constructGridColumnsFromFields: (
|
|
|
163
164
|
headerName: t(tableField?.fieldLabel || tableField?.fieldName),
|
|
164
165
|
headerAlign: "center",
|
|
165
166
|
align: "center",
|
|
167
|
+
commonStoreKey: tableField?.commonStoreKey,
|
|
168
|
+
dataQueryId: tableField?.dataQueryId,
|
|
169
|
+
storeUrl: tableField?.storeUrl,
|
|
170
|
+
storeLoadParam: tableField?.storeLoadParam,
|
|
166
171
|
hidden: tableField?.hidden,
|
|
167
172
|
searchable: tableField?.gridProps?.searchable,
|
|
168
173
|
valueField: tableField?.optionValueField || "value",
|
|
@@ -83,13 +83,6 @@ const TemplateForm: React.FC<TemplateFormProps> = (
|
|
|
83
83
|
);
|
|
84
84
|
if (retrievedRecord) {
|
|
85
85
|
formManager.reset({ ...retrievedRecord });
|
|
86
|
-
if (props?.formValuesChangeCallBk) {
|
|
87
|
-
props?.formValuesChangeCallBk(
|
|
88
|
-
{ ...retrievedRecord },
|
|
89
|
-
formActions,
|
|
90
|
-
formManager
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
86
|
for (const field of fields) {
|
|
94
87
|
if (
|
|
95
88
|
field?.fieldType === "combobox" &&
|
|
@@ -111,6 +104,9 @@ const TemplateForm: React.FC<TemplateFormProps> = (
|
|
|
111
104
|
}
|
|
112
105
|
}
|
|
113
106
|
}
|
|
107
|
+
if (props?.formValuesChangeCallBk) {
|
|
108
|
+
props?.formValuesChangeCallBk(formValues, formActions, formManager);
|
|
109
|
+
}
|
|
114
110
|
}
|
|
115
111
|
} else {
|
|
116
112
|
formManager.reset({});
|
package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx
CHANGED
|
@@ -93,21 +93,21 @@ export const generateComboColumn: (
|
|
|
93
93
|
}
|
|
94
94
|
return value;
|
|
95
95
|
},
|
|
96
|
-
renderCell: (parameters: any) => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
},
|
|
96
|
+
// renderCell: (parameters: any) => {
|
|
97
|
+
// let record = null;
|
|
98
|
+
// try {
|
|
99
|
+
// record = parameters.colDef.options.find(
|
|
100
|
+
// (item: any) => item[parameters.colDef.valueField] == parameters.value
|
|
101
|
+
// );
|
|
102
|
+
// } catch (e) {}
|
|
103
|
+
// return (
|
|
104
|
+
// <div>
|
|
105
|
+
// {record != null
|
|
106
|
+
// ? record[parameters.colDef.displayField]
|
|
107
|
+
// : parameters.value}
|
|
108
|
+
// </div>
|
|
109
|
+
// );
|
|
110
|
+
// },
|
|
111
111
|
|
|
112
112
|
renderEditCell: (params: any) => {
|
|
113
113
|
return (
|
|
@@ -123,7 +123,7 @@ const WorkflowDocumentPanel: React.FC<WorkflowDocumentPanelProps> = (props) => {
|
|
|
123
123
|
refDocumentId: props.refDocumentId,
|
|
124
124
|
},
|
|
125
125
|
successCallBkFn: (response: any) => {
|
|
126
|
-
setWorkflowDocumentInfo(structuredClone(response.data));
|
|
126
|
+
setWorkflowDocumentInfo(structuredClone(response.data));
|
|
127
127
|
},
|
|
128
128
|
failureCallBkFn: () => {
|
|
129
129
|
setWorkflowDocumentInfo({
|
|
@@ -289,8 +289,9 @@ const WorkflowDocumentPanel: React.FC<WorkflowDocumentPanelProps> = (props) => {
|
|
|
289
289
|
<Box
|
|
290
290
|
sx={{
|
|
291
291
|
width: "100%",
|
|
292
|
+
maxWidth: 600,
|
|
292
293
|
textAlign: "center",
|
|
293
|
-
fontSize:
|
|
294
|
+
fontSize: 16,
|
|
294
295
|
fontWeight: "bold",
|
|
295
296
|
display: "flex",
|
|
296
297
|
alignItems: "center",
|
package/src/main.tsx
CHANGED
|
@@ -12,7 +12,7 @@ createRoot(document.getElementById("root")!).render(
|
|
|
12
12
|
backgroundImageNameInPublicFolder: "bg.jpg",
|
|
13
13
|
}}
|
|
14
14
|
appVersion="0.0"
|
|
15
|
-
authenticationMethod="
|
|
15
|
+
authenticationMethod="AZURE"
|
|
16
16
|
azureConfiguration={{
|
|
17
17
|
frontEndClientId: "c3bbbdbd-f392-4459-b3dd-2351cb07f924",
|
|
18
18
|
tenantId: "9f136fef-4529-475f-98e6-d271eb04eb00",
|