@visns-studio/visns-components 2.8.1 → 2.8.3
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.
|
@@ -183,8 +183,8 @@ const DataGrid = forwardRef(
|
|
|
183
183
|
reload: () => {
|
|
184
184
|
handleReload();
|
|
185
185
|
},
|
|
186
|
-
reset: () => {
|
|
187
|
-
handleReset();
|
|
186
|
+
reset: (filter) => {
|
|
187
|
+
handleReset(filter);
|
|
188
188
|
},
|
|
189
189
|
}));
|
|
190
190
|
|
|
@@ -365,7 +365,13 @@ const DataGrid = forwardRef(
|
|
|
365
365
|
};
|
|
366
366
|
|
|
367
367
|
const handleReset = (filter) => {
|
|
368
|
-
|
|
368
|
+
if (filter && filter.length > 0) {
|
|
369
|
+
filter.forEach((f) => {
|
|
370
|
+
gridRef.current.setColumnFilterValue(f.name, f.value);
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
setFilterData(filter);
|
|
374
|
+
}
|
|
369
375
|
};
|
|
370
376
|
|
|
371
377
|
const handleReload = () => {
|
|
@@ -143,7 +143,7 @@ const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
|
|
|
143
143
|
<div className="formItem fwItem">
|
|
144
144
|
<label className="fi__label">
|
|
145
145
|
<input
|
|
146
|
-
type="
|
|
146
|
+
type="text"
|
|
147
147
|
name="email"
|
|
148
148
|
value={auth.email}
|
|
149
149
|
onChange={handleChange}
|
|
@@ -90,24 +90,32 @@ function GenericDetail({ setting, urlParam, userProfile }) {
|
|
|
90
90
|
|
|
91
91
|
const getValueFromData = (data, path, id) => {
|
|
92
92
|
let value =
|
|
93
|
-
path.reduce(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
: '',
|
|
100
|
-
data
|
|
101
|
-
) ?? '';
|
|
93
|
+
path.reduce((result, key) => (result ? result[key] : ''), data) ??
|
|
94
|
+
'';
|
|
95
|
+
|
|
96
|
+
if (path[0] && path[0] === 'insurance_types') {
|
|
97
|
+
console.info(value);
|
|
98
|
+
}
|
|
102
99
|
|
|
103
100
|
if (value) {
|
|
104
|
-
if (Array.isArray(
|
|
105
|
-
return
|
|
101
|
+
if (Array.isArray(value)) {
|
|
102
|
+
return value
|
|
103
|
+
.filter((item) => item[id]) // Filter out items without the specified id
|
|
104
|
+
.map((item) => item[id]) // Extract the id from each item
|
|
105
|
+
.join(', ');
|
|
106
106
|
} else {
|
|
107
|
-
|
|
107
|
+
if (Array.isArray(id)) {
|
|
108
|
+
return id.map((key) => value[key]).join(' ');
|
|
109
|
+
} else {
|
|
110
|
+
return value[id];
|
|
111
|
+
}
|
|
108
112
|
}
|
|
109
113
|
} else {
|
|
110
|
-
|
|
114
|
+
if (path.length > 0) {
|
|
115
|
+
return '';
|
|
116
|
+
} else {
|
|
117
|
+
return data[id] || '';
|
|
118
|
+
}
|
|
111
119
|
}
|
|
112
120
|
};
|
|
113
121
|
|
package/package.json
CHANGED