Advanced filter (#1905)

* advanced filter start

* advanced filters stage 2

* adv filters stage 3

* fixes

* add test

* eslint fixes

* age filter update

* some fixes and filters tests

* fixes 2

* add csv export

* fixes 3

* add env variable for adv filter

* fix tests

* edit env temporary
This commit is contained in:
Igor Stuev
2024-12-16 13:43:44 +01:00
committed by GitHub
parent 54fe4919e2
commit 4b9a19b2bb
67 changed files with 2348 additions and 71 deletions
+18
View File
@@ -0,0 +1,18 @@
export default function getValuesArrayFromQuery(val: string | Array<string> | undefined) {
if (val === undefined) {
return;
}
const valArray = [];
if (typeof val === 'string') {
valArray.push(...val.split(','));
}
if (Array.isArray(val)) {
if (!val.length) {
return;
}
val.forEach(el => valArray.push(...el.split(',')));
}
return valArray;
}