diff --git a/frontend/src/routes/_old/old/-components/dashboard/Cards.tsx b/frontend/src/routes/_old/old/-components/dashboard/Cards.tsx index 6f2e2c8..9540b04 100644 --- a/frontend/src/routes/_old/old/-components/dashboard/Cards.tsx +++ b/frontend/src/routes/_old/old/-components/dashboard/Cards.tsx @@ -17,7 +17,7 @@ export default function Cards(card: any) { active: existing[0]?.active ?? false, }, onSubmit: async ({ value }) => { - console.log(value); + //console.log(value); const testCard: any = cards.filter((i: any) => i.name === value.name); if (value.active) { diff --git a/frontend/src/routes/_old/old/-utils/querys/logistics/getInventoryCheck.tsx b/frontend/src/routes/_old/old/-utils/querys/logistics/getInventoryCheck.tsx index 80786f7..d3d95b8 100644 --- a/frontend/src/routes/_old/old/-utils/querys/logistics/getInventoryCheck.tsx +++ b/frontend/src/routes/_old/old/-utils/querys/logistics/getInventoryCheck.tsx @@ -2,24 +2,24 @@ import { queryOptions } from "@tanstack/react-query"; import axios from "axios"; export function getinventoryCheck(data: any) { - return queryOptions({ - queryKey: ["getInvCheck"], - queryFn: () => fetchStockSilo(data), - //enabled: - staleTime: 1000, - refetchInterval: 1000 * 60 * 15, - refetchOnWindowFocus: true, - }); + return queryOptions({ + queryKey: ["getInvCheck"], + queryFn: () => fetchStockSilo(data), + //enabled: + staleTime: 1000, + refetchInterval: 1000 * 60 * 15, + refetchOnWindowFocus: true, + }); } const fetchStockSilo = async (info: any) => { - //console.log("What tpye of info:", info); - const { data } = await axios.post(`/api/logistics/cyclecountcheck`, { - age: info.age ? parseInt(info.age) : null, - type: "", - }); + //console.log("What tpye of info:", info); + const { data } = await axios.post(`/lst/old/api/logistics/cyclecountcheck`, { + age: info.age ? parseInt(info.age) : null, + type: "", + }); - // if we are not localhost ignore the devDir setting. - //const url: string = window.location.host.split(":")[0]; - return data.data ?? []; + // if we are not localhost ignore the devDir setting. + //const url: string = window.location.host.split(":")[0]; + return data.data ?? []; }; diff --git a/frontend/src/routes/_old/old/-utils/querys/logistics/getOpenOrders.tsx b/frontend/src/routes/_old/old/-utils/querys/logistics/getOpenOrders.tsx index 3fc49bf..c6a22db 100644 --- a/frontend/src/routes/_old/old/-utils/querys/logistics/getOpenOrders.tsx +++ b/frontend/src/routes/_old/old/-utils/querys/logistics/getOpenOrders.tsx @@ -2,21 +2,21 @@ import { queryOptions } from "@tanstack/react-query"; import axios from "axios"; export function getOpenOrders() { - return queryOptions({ - queryKey: ["getOpenOrders"], - queryFn: () => fetchStockSilo(), - //enabled: - staleTime: 1000, - refetchInterval: 1000 * 60 * 15, - refetchOnWindowFocus: true, - }); + return queryOptions({ + queryKey: ["getOpenOrders"], + queryFn: () => fetchStockSilo(), + //enabled: + staleTime: 1000, + refetchInterval: 1000 * 60 * 15, + refetchOnWindowFocus: true, + }); } const fetchStockSilo = async () => { - const { data } = await axios.get( - `/api/datamart/getopenorders?sDay=15&eDay=45` - ); - // if we are not localhost ignore the devDir setting. - //const url: string = window.location.host.split(":")[0]; - return data.data ?? []; + const { data } = await axios.get( + `/lst/old/api/datamart/getopenorders?sDay=15&eDay=45`, + ); + // if we are not localhost ignore the devDir setting. + //const url: string = window.location.host.split(":")[0]; + return data.data ?? []; }; diff --git a/frontend/src/routes/_old/old/-utils/querys/logistics/getWarehouseLanes.tsx b/frontend/src/routes/_old/old/-utils/querys/logistics/getWarehouseLanes.tsx index 2671950..f88d6b2 100644 --- a/frontend/src/routes/_old/old/-utils/querys/logistics/getWarehouseLanes.tsx +++ b/frontend/src/routes/_old/old/-utils/querys/logistics/getWarehouseLanes.tsx @@ -2,19 +2,19 @@ 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, - }); + 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 ?? []; + const { data } = await axios.get(`/lst/old/api/logistics/getactivelanes`); + // // if we are not localhost ignore the devDir setting. + // //const url: string = window.location.host.split(":")[0]; + return data.data ?? []; }; diff --git a/frontend/src/routes/_old/old/index.tsx b/frontend/src/routes/_old/old/index.tsx index c4fb4d4..10a648b 100644 --- a/frontend/src/routes/_old/old/index.tsx +++ b/frontend/src/routes/_old/old/index.tsx @@ -1,9 +1,26 @@ import { createFileRoute } from "@tanstack/react-router"; +import { AddCards } from "./-components/dashboard/AddCards"; +import DashBoard from "./-components/dashboard/Dashboard"; +import { useCardStore } from "./-lib/store/useCardStore"; export const Route = createFileRoute("/_old/old/")({ component: RouteComponent, }); function RouteComponent() { - return
Missing DashBoard
; + const { cards } = useCardStore(); + return ( +
+ {cards.length > 0 ? ( + + ) : ( +
+ + Looks like you have no cards added try clicking adding some + {" "} + +
+ )} +
+ ); } diff --git a/frontend/src/routes/_old/old/route.tsx b/frontend/src/routes/_old/old/route.tsx index e487f46..de07f90 100644 --- a/frontend/src/routes/_old/old/route.tsx +++ b/frontend/src/routes/_old/old/route.tsx @@ -28,19 +28,21 @@ function RouteComponent() { const { session } = useAuth(); const logout = useLogout(); //const { settings } = useSettingStore(); + console.log(location.pathname); return (