diff --git a/web/src/routes/backOffice/containers/list/containersStore.ts b/web/src/routes/backOffice/containers/list/containersStore.ts index e066826f..20bcb696 100644 --- a/web/src/routes/backOffice/containers/list/containersStore.ts +++ b/web/src/routes/backOffice/containers/list/containersStore.ts @@ -123,7 +123,7 @@ async function getContainers( sort: "createdAt", order: "desc", category, - locationName: location, + locationName: location || undefined, }, }, }); diff --git a/web/src/routes/backOffice/employees/list/employeesStore.ts b/web/src/routes/backOffice/employees/list/employeesStore.ts index e43feade..6ce90111 100644 --- a/web/src/routes/backOffice/employees/list/employeesStore.ts +++ b/web/src/routes/backOffice/employees/list/employeesStore.ts @@ -156,8 +156,8 @@ async function getEmployees( limit: DEFAULT_PAGE_SIZE, sort, order, - username, role, + username: username || undefined, }, }, }); diff --git a/web/src/routes/backOffice/landfills/list/landfillsStore.ts b/web/src/routes/backOffice/landfills/list/landfillsStore.ts index 65b167fa..475a5890 100644 --- a/web/src/routes/backOffice/landfills/list/landfillsStore.ts +++ b/web/src/routes/backOffice/landfills/list/landfillsStore.ts @@ -100,7 +100,7 @@ async function getLandfills( limit: DEFAULT_PAGE_SIZE, sort: "createdAt", order: "desc", - locationName: location, + locationName: location || undefined, }, }, }); diff --git a/web/src/routes/backOffice/routes/list/routesStore.ts b/web/src/routes/backOffice/routes/list/routesStore.ts index be0db180..a78d3ac8 100644 --- a/web/src/routes/backOffice/routes/list/routesStore.ts +++ b/web/src/routes/backOffice/routes/list/routesStore.ts @@ -93,7 +93,7 @@ async function getRoutes(filters: RoutesFilters): Promise { limit: DEFAULT_PAGE_SIZE, sort: "createdAt", order: "desc", - name: route, + name: route || undefined, }, }, }); diff --git a/web/src/routes/backOffice/trucks/list/trucksStore.ts b/web/src/routes/backOffice/trucks/list/trucksStore.ts index 9f75e9c2..0df420b5 100644 --- a/web/src/routes/backOffice/trucks/list/trucksStore.ts +++ b/web/src/routes/backOffice/trucks/list/trucksStore.ts @@ -137,7 +137,7 @@ async function getTrucks(filters: TrucksFilters): Promise { limit: DEFAULT_PAGE_SIZE, sort, order, - licensePlate, + licensePlate: licensePlate || undefined, }, }, }); diff --git a/web/src/routes/backOffice/warehouses/list/warehousesStore.ts b/web/src/routes/backOffice/warehouses/list/warehousesStore.ts index 53d29af1..1baee48c 100644 --- a/web/src/routes/backOffice/warehouses/list/warehousesStore.ts +++ b/web/src/routes/backOffice/warehouses/list/warehousesStore.ts @@ -141,7 +141,7 @@ async function getWarehouses( limit: DEFAULT_PAGE_SIZE, sort, order, - locationName: location, + locationName: location || undefined, }, }, });