@asaleh37/ui-base 25.10.22 → 25.11.6
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 +3 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/common/ChangeOrgForm.tsx +4 -0
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +2 -0
- package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +1 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +8 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +1 -1
- package/src/layout/NavigationTree.tsx +1 -4
- package/src/main.tsx +1 -1
package/package.json
CHANGED
|
@@ -64,6 +64,10 @@ const ChangeOrgForm: React.FC<ChangeOrgFormProps> = (props) => {
|
|
|
64
64
|
...response.data,
|
|
65
65
|
isAuthenticated: true,
|
|
66
66
|
};
|
|
67
|
+
if (response?.data?.token) {
|
|
68
|
+
localStorage.setItem("TOKEN", response.data.token);
|
|
69
|
+
}
|
|
70
|
+
UserSession.token = null;
|
|
67
71
|
dispatch(UserSessionActions.setAuthenticated(UserSession));
|
|
68
72
|
if (props.successChangeCallBackFn) {
|
|
69
73
|
props.successChangeCallBackFn();
|
|
@@ -101,6 +101,7 @@ export type TemplateGridColDef = GridColDef & {
|
|
|
101
101
|
dataQueryId?: number;
|
|
102
102
|
storeUrl?: string;
|
|
103
103
|
storeLoadParam?: any;
|
|
104
|
+
comboboxGroupField?: string;
|
|
104
105
|
};
|
|
105
106
|
|
|
106
107
|
export type TemplateGridAttachmentProps = {
|
|
@@ -207,6 +208,7 @@ export type RecordFieldProps = {
|
|
|
207
208
|
| "custom";
|
|
208
209
|
lookupType?: string;
|
|
209
210
|
comboboxValueDataType?: "number" | "string";
|
|
211
|
+
comboboxGroupField?: string;
|
|
210
212
|
commonStoreKey?: string;
|
|
211
213
|
dataQueryId?: number;
|
|
212
214
|
storeUrl?: string;
|
|
@@ -132,6 +132,7 @@ export const constructGridColumnsFromFields: (
|
|
|
132
132
|
} else if (tableField?.fieldType === "combobox") {
|
|
133
133
|
const column: TemplateGridColDef = generateComboColumn({
|
|
134
134
|
...tableField?.gridProps?.muiProps,
|
|
135
|
+
comboboxGroupField: tableField?.comboboxGroupField,
|
|
135
136
|
editable:
|
|
136
137
|
tableField?.gridProps?.muiProps?.editable != undefined
|
|
137
138
|
? tableField?.gridProps?.muiProps?.editable
|
package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx
CHANGED
|
@@ -10,6 +10,7 @@ interface ComboBoxProps {
|
|
|
10
10
|
label: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
required?: boolean;
|
|
13
|
+
groupField?: string;
|
|
13
14
|
|
|
14
15
|
commonStoreKey?: string;
|
|
15
16
|
dataQueryId?: number;
|
|
@@ -126,6 +127,13 @@ const ComboBox: React.FC<ComboBoxProps> = (props) => {
|
|
|
126
127
|
/>
|
|
127
128
|
),
|
|
128
129
|
}}
|
|
130
|
+
groupBy={
|
|
131
|
+
props?.groupField
|
|
132
|
+
? (option: any) => {
|
|
133
|
+
return option[props.groupField] ? option[props.groupField] : "";
|
|
134
|
+
}
|
|
135
|
+
: undefined
|
|
136
|
+
}
|
|
129
137
|
renderInput={(params) => {
|
|
130
138
|
return (
|
|
131
139
|
<TextField
|
package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx
CHANGED
|
@@ -114,7 +114,6 @@ export const generateComboColumn: (
|
|
|
114
114
|
storeUrl: colDef?.storeUrl,
|
|
115
115
|
storeLoadParam: colDef?.storeLoadParam,
|
|
116
116
|
renderEditCell: (params: any) => {
|
|
117
|
-
debugger;
|
|
118
117
|
return (
|
|
119
118
|
<ComboBox
|
|
120
119
|
{...params}
|
|
@@ -126,6 +125,7 @@ export const generateComboColumn: (
|
|
|
126
125
|
// storeLoadParam={params?.colDef?.storeLoadParam}
|
|
127
126
|
valueField={params?.colDef?.valueField}
|
|
128
127
|
displayField={params?.colDef?.displayField}
|
|
128
|
+
groupField={params?.colDef?.comboboxGroupField}
|
|
129
129
|
onChangeCallBack={(v: any, selectedRecord: any) => {
|
|
130
130
|
if (v === null) {
|
|
131
131
|
params.api.setEditCellValue({
|
|
@@ -279,10 +279,7 @@ export default function NavigationTree() {
|
|
|
279
279
|
);
|
|
280
280
|
if (
|
|
281
281
|
navigationItem?.action === "NAVIGATION" &&
|
|
282
|
-
navigationItem?.actionPayload != null
|
|
283
|
-
(navigationItem.children === undefined ||
|
|
284
|
-
navigationItem.children === null ||
|
|
285
|
-
navigationItem.children.length == 0)
|
|
282
|
+
navigationItem?.actionPayload != null
|
|
286
283
|
) {
|
|
287
284
|
navigate(navigationItem?.actionPayload?.path || "");
|
|
288
285
|
if (isMobile) {
|
package/src/main.tsx
CHANGED
|
@@ -11,7 +11,7 @@ createRoot(document.getElementById("root")!).render(
|
|
|
11
11
|
themeMode: "dark",
|
|
12
12
|
backgroundImageNameInPublicFolder: "bg.jpg",
|
|
13
13
|
}}
|
|
14
|
-
appVersion="25.
|
|
14
|
+
appVersion="25.11.6"
|
|
15
15
|
authenticationMethod="APP"
|
|
16
16
|
azureConfiguration={{
|
|
17
17
|
frontEndClientId: "c3bbbdbd-f392-4459-b3dd-2351cb07f924",
|