mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 18:48:11 +00:00
Warehouse
This commit is contained in:
16
apps/edr-freight-web/backoffice/src/hooks/useStations.ts
Normal file
16
apps/edr-freight-web/backoffice/src/hooks/useStations.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
|
||||
import { trainSchedulingService } from '@/services/trainScheduling.service';
|
||||
import { QUERY_KEYS } from '@/constants/QUERY_KEYS';
|
||||
|
||||
/**
|
||||
* The 21 network stations / yards, sourced from the existing booking
|
||||
* reference-data API. Reused as the parent "Facility / Port" for warehouses.
|
||||
*/
|
||||
export function useStations() {
|
||||
return useQuery({
|
||||
queryKey: QUERY_KEYS.TRAIN_SCHEDULING.stations(),
|
||||
queryFn: () => trainSchedulingService.getStations(),
|
||||
staleTime: 5 * 60 * 1000,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user