fix: refactor filter UIs on /bookings (#19532)
* Reapply "fix: replace filter implementations on bookings (#19445)" (#19506)
This reverts commit f6af6e34bd.
* force custom date range selector for bookings except for Past tab
* fix e2e test
* add e2e tests
* fix e2e test
This commit is contained in:
1 parent
ca1f84c827
commit
3d3acba82a
19 files changed
+658
-215
No files matched your search
@@ -151,7 +151,7 @@ export const dataTableFilter = (cellValue: unknown, filterValue: FilterValue) =>
|
||||
|
||||
export const convertFacetedValuesToMap = (array: FacetedValue[]) => {
|
||||
return new Map<FacetedValue, number>(
|
||||
array.map((option) => [{ label: option.label, value: option.value }, 1])
|
||||
array.map((option) => [{ label: option.label, value: option.value, section: option.section }, 1])
|
||||
);
|
||||
};
|
||||
|
||||
@@ -161,8 +161,8 @@ export const convertMapToFacetedValues = (map: Map<FacetedValue, number> | undef
|
||||
}
|
||||
return Array.from(map.keys()).map((option) => {
|
||||
if (typeof option === "string") {
|
||||
return { label: option, value: option };
|
||||
return { label: option, value: option, section: undefined };
|
||||
}
|
||||
return { label: option.label as string, value: option.value as string | number };
|
||||
return { label: option.label as string, value: option.value as string | number, section: option.section };
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user