feat(barcode gen): added in lane exports both single and multiple intial release
This commit is contained in:
20
frontend/src/utils/querys/logistics/getWarehouseLanes.tsx
Normal file
20
frontend/src/utils/querys/logistics/getWarehouseLanes.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { queryOptions } from "@tanstack/react-query";
|
||||
import axios from "axios";
|
||||
|
||||
export function getLanes() {
|
||||
return queryOptions({
|
||||
queryKey: ["getLanes"],
|
||||
queryFn: () => fetch(),
|
||||
//enabled:
|
||||
staleTime: 1000,
|
||||
refetchInterval: 60 * 1000,
|
||||
refetchOnWindowFocus: true,
|
||||
});
|
||||
}
|
||||
|
||||
const fetch = async () => {
|
||||
const { data } = await axios.get(`/api/logistics/getactivelanes`);
|
||||
// // if we are not localhost ignore the devDir setting.
|
||||
// //const url: string = window.location.host.split(":")[0];
|
||||
return data.data ?? [];
|
||||
};
|
||||
Reference in New Issue
Block a user