@ssplib/react-components 0.0.236 → 0.0.237
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.
|
@@ -619,6 +619,30 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
619
619
|
}
|
|
620
620
|
});
|
|
621
621
|
break;
|
|
622
|
+
case 'entre':
|
|
623
|
+
currentData.forEach((cd) => {
|
|
624
|
+
var _a;
|
|
625
|
+
const dates = (_a = filtersFuncData[dt.customFunc]((0, lodash_get_1.default)(cd, dt.keyName, ''))) !== null && _a !== void 0 ? _a : [];
|
|
626
|
+
const dateA = (0, dayjs_1.default)(dt.value, 'DD/MM/YYYY');
|
|
627
|
+
const dateB = (0, dayjs_1.default)(dt.value2, 'DD/MM/YYYY');
|
|
628
|
+
let isBetween = false;
|
|
629
|
+
if (!dateA.isValid() || !dateB.isValid())
|
|
630
|
+
return;
|
|
631
|
+
dates.forEach((dtStr) => {
|
|
632
|
+
if (isBetween)
|
|
633
|
+
return;
|
|
634
|
+
const dt = (0, dayjs_1.default)(dtStr, 'DD/MM/YYYY');
|
|
635
|
+
if (!dt.isValid())
|
|
636
|
+
return;
|
|
637
|
+
if ((dt.isAfter(dateA) || dt.isSame(dateA)) && (dt.isBefore(dateB) || dt.isSame(dateB))) {
|
|
638
|
+
isBetween = true;
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
if (isBetween) {
|
|
642
|
+
filteredData.push(cd);
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
break;
|
|
622
646
|
}
|
|
623
647
|
break;
|
|
624
648
|
}
|
|
@@ -747,7 +771,9 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
747
771
|
? x.value.map((x) => x.label).join(' - ')
|
|
748
772
|
: typeof x.value === 'object'
|
|
749
773
|
? x.value.label
|
|
750
|
-
: x.
|
|
774
|
+
: x.value2
|
|
775
|
+
? `${x.value} e ${x.value2}`
|
|
776
|
+
: x.value.toString()),
|
|
751
777
|
react_1.default.createElement(material_1.IconButton, { onClick: (e) => {
|
|
752
778
|
var _a;
|
|
753
779
|
let currentValue = JSON.parse((_a = localStorage.getItem(localTableName)) !== null && _a !== void 0 ? _a : '[]');
|