mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-06 14:45:04 +00:00
paginate wagons, locomotives and routes lists server-side
This commit is contained in:
@@ -23,7 +23,7 @@ const listHandlers: Record<
|
||||
> = {
|
||||
locomotives: (filters) => locomotivesService.getAll(filters ?? {}).then((r) => r.data),
|
||||
trains: () => trainService.getAll().then((r) => r.data),
|
||||
wagons: (filters) => wagonService.getAll(filters ?? {}).then((r) => r.data),
|
||||
wagons: (filters) => wagonService.listAll(filters ?? {}),
|
||||
containers: () => containerService.getAll().then((r) => r.data),
|
||||
cargoes: () => cargoService.getAll().then((r) => r.data),
|
||||
vehicles: (filters) => vehiclesService.getAll(filters ?? {}).then((r) => r.data),
|
||||
@@ -38,7 +38,7 @@ const pagedHandlers: Partial<
|
||||
Record<FleetResourceSlug, (filters: FleetListFilters) => Promise<PaginatedResponse<FleetRecord>>>
|
||||
> = {
|
||||
locomotives: (filters) => locomotivesService.getPaged(filters).then((r) => r.data),
|
||||
wagons: (filters) => wagonService.getPaged(filters).then((r) => r.data),
|
||||
wagons: (filters) => wagonService.getAll(filters).then((r) => r.data),
|
||||
};
|
||||
|
||||
export const isFleetServerPaginated = (slug: FleetResourceSlug): boolean =>
|
||||
|
||||
Reference in New Issue
Block a user