mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 08:48:11 +00:00
feat: complete train scheduling integration
This commit is contained in:
12
apps/edr-freight-web/backoffice/src/hooks/use-cargo-types.ts
Normal file
12
apps/edr-freight-web/backoffice/src/hooks/use-cargo-types.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { cargoTypesService } from '@/services/cargo-types.service';
|
||||
|
||||
export const CARGO_TYPES_QUERY_KEY = ['cargo-types'];
|
||||
|
||||
export function useCargoTypes() {
|
||||
return useQuery({
|
||||
queryKey: CARGO_TYPES_QUERY_KEY,
|
||||
queryFn: () => cargoTypesService.getCargoTypes(),
|
||||
staleTime: Infinity,
|
||||
});
|
||||
}
|
||||
1
apps/edr-freight-web/backoffice/src/hooks/use-cargoes.ts
Normal file
1
apps/edr-freight-web/backoffice/src/hooks/use-cargoes.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@/components/container_management/use-cargoes';
|
||||
@@ -0,0 +1,12 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { containerTypesService } from '@/services/container-types.service';
|
||||
|
||||
export const CONTAINER_TYPES_QUERY_KEY = ['container-types'];
|
||||
|
||||
export function useContainerTypes() {
|
||||
return useQuery({
|
||||
queryKey: CONTAINER_TYPES_QUERY_KEY,
|
||||
queryFn: () => containerTypesService.getContainerTypes(),
|
||||
staleTime: Infinity,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from '@/components/container_management/use-containers';
|
||||
12
apps/edr-freight-web/backoffice/src/hooks/use-wagon-types.ts
Normal file
12
apps/edr-freight-web/backoffice/src/hooks/use-wagon-types.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { wagonTypesService } from '@/services/wagon-types.service';
|
||||
|
||||
export const WAGON_TYPES_QUERY_KEY = ['wagon-types'];
|
||||
|
||||
export function useWagonTypes() {
|
||||
return useQuery({
|
||||
queryKey: WAGON_TYPES_QUERY_KEY,
|
||||
queryFn: () => wagonTypesService.getWagonTypes(),
|
||||
staleTime: Infinity,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user