mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 09:58:12 +00:00
fix data table
This commit is contained in:
@@ -95,7 +95,14 @@ const FleetResourcePage = () => {
|
|||||||
const usesServerListFilters = Boolean(config?.listFilters?.length);
|
const usesServerListFilters = Boolean(config?.listFilters?.length);
|
||||||
|
|
||||||
const statusFilterOptions = useMemo(() => {
|
const statusFilterOptions = useMemo(() => {
|
||||||
if (!hasStatusColumn || usesServerListFilters || slug === "vehicles" || slug === "drivers") return [];
|
if (!hasStatusColumn || usesServerListFilters) return [];
|
||||||
|
if (slug === "vehicles" || slug === "drivers") {
|
||||||
|
return [
|
||||||
|
{ value: "ALL", label: "All statuses" },
|
||||||
|
{ value: "ACTIVE", label: "Active" },
|
||||||
|
{ value: "INACTIVE", label: "Inactive" },
|
||||||
|
];
|
||||||
|
}
|
||||||
const statuses = new Set(
|
const statuses = new Set(
|
||||||
allRows
|
allRows
|
||||||
.map((row) => String((row as unknown as Record<string, unknown>).status ?? ""))
|
.map((row) => String((row as unknown as Record<string, unknown>).status ?? ""))
|
||||||
|
|||||||
Reference in New Issue
Block a user