@visns-studio/visns-components 4.9.1 → 4.9.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.
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
76
76
|
},
|
|
77
77
|
"name": "@visns-studio/visns-components",
|
|
78
|
-
"version": "4.9.
|
|
78
|
+
"version": "4.9.3",
|
|
79
79
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
80
80
|
"main": "src/index.js",
|
|
81
81
|
"files": [
|
|
@@ -673,13 +673,18 @@ function Field({
|
|
|
673
673
|
className={inputClass[settings.id]}
|
|
674
674
|
onChange={onChange}
|
|
675
675
|
/>
|
|
676
|
+
{console.info(inputValue)}
|
|
676
677
|
{inputValue && inputValue.length > 0 && (
|
|
677
678
|
<ul className="file-list">
|
|
678
679
|
{inputValue.map((file, index) => (
|
|
679
680
|
<li
|
|
680
681
|
key={`file-${settings.id}-${index}`}
|
|
681
682
|
>
|
|
682
|
-
{file.name
|
|
683
|
+
{file.name
|
|
684
|
+
? file.name
|
|
685
|
+
: file.file_name
|
|
686
|
+
? file.file_name
|
|
687
|
+
: ''}
|
|
683
688
|
<button
|
|
684
689
|
className="trash-button"
|
|
685
690
|
onClick={(e) => {
|
|
@@ -432,10 +432,6 @@ function Form({
|
|
|
432
432
|
const renderInputValue = (i, f) => {
|
|
433
433
|
let value = '';
|
|
434
434
|
|
|
435
|
-
if (i.id === 'event_detail.type_of_event') {
|
|
436
|
-
console.info(i, f);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
435
|
if (i.hasOwnProperty('parent') && i.parent) {
|
|
440
436
|
if (f[i.parent]) {
|
|
441
437
|
value = i.hasOwnProperty('key')
|
|
@@ -397,10 +397,27 @@ const GenericDynamic = ({
|
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
const
|
|
400
|
+
const resSave = await Download(s.url, s.method, payload);
|
|
401
401
|
|
|
402
|
-
if (
|
|
403
|
-
saveAs(
|
|
402
|
+
if (resSave.data) {
|
|
403
|
+
saveAs(resSave.data);
|
|
404
|
+
}
|
|
405
|
+
break;
|
|
406
|
+
case 'fetch':
|
|
407
|
+
if (s.payload?.length > 0) {
|
|
408
|
+
s.payload.forEach((p) => {
|
|
409
|
+
if (data[p]) {
|
|
410
|
+
payload[p] = data[p];
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
const resFetch = await CustomFetch(s.url, s.method, payload);
|
|
416
|
+
|
|
417
|
+
if (resFetch.data.error === '') {
|
|
418
|
+
toast.success(
|
|
419
|
+
s.message ? s.message : 'Form fetched successfully'
|
|
420
|
+
);
|
|
404
421
|
}
|
|
405
422
|
break;
|
|
406
423
|
default:
|