diff --git a/frontend/src/routes/_old/old/-components/ocp/Lots.tsx b/frontend/src/routes/_old/old/-components/ocp/Lots.tsx index fa972b5..ad57e3c 100644 --- a/frontend/src/routes/_old/old/-components/ocp/Lots.tsx +++ b/frontend/src/routes/_old/old/-components/ocp/Lots.tsx @@ -10,7 +10,7 @@ import { TableRow, } from "@/components/ui/table"; import { useAuth, userAccess } from "@/lib/authClient"; -import { useSettingStore } from "../../-lib/store/useSettings"; +//import { useSettingStore } from "../../-lib/store/useSettings"; import type { LotType } from "../../-types/lots"; import { getlots } from "../../-utils/querys/ocp/lots"; import { LstCard } from "../extendedUi/LstCard"; @@ -67,9 +67,9 @@ export default function Lots() { const { data, isError, isLoading } = useQuery(getlots()); const { session } = useAuth(); - const { settings } = useSettingStore(); + //const { settings } = useSettingStore(); - const server = settings.filter((n) => n.name === "dbServer")[0]?.value || ""; + //const server = settings.filter((n) => n.name === "dbServer")[0]?.value || ""; const lotdata = data ? data : []; const accessRoles = userAccess("ocp", [ @@ -229,7 +229,8 @@ export default function Lots() { {session?.user && accessRoles && ( <> - {server === "usday1vms006" || server === "localhost" ? ( + {location.hostname.includes("usday1") || + location.hostname.includes("localhost") ? ( <> diff --git a/frontend/src/routes/_old/old/-components/ocp/ManualPrinting/ManualPrintForm.tsx b/frontend/src/routes/_old/old/-components/ocp/ManualPrinting/ManualPrintForm.tsx index 2b2b4a9..ce92cf4 100644 --- a/frontend/src/routes/_old/old/-components/ocp/ManualPrinting/ManualPrintForm.tsx +++ b/frontend/src/routes/_old/old/-components/ocp/ManualPrinting/ManualPrintForm.tsx @@ -37,11 +37,10 @@ const printReason = [ ]; export default function ManualPrintForm() { - const token = localStorage.getItem("auth_token"); const { settings } = useSettingStore(); const [open, setOpen] = useState(false); const [isSubmitting, setIsSubmitting] = useState(false); - const server = settings.filter((n) => n.name === "server")[0]?.value; + // const serverPort = settings.filter((n) => n.name === "serverPort")[0]?.value; // const serverUrl = `http://${server}:${serverPort}`; @@ -61,9 +60,7 @@ export default function ManualPrintForm() { const logdataUrl = `/lst/old/api/ocp/manuallabellog`; setIsSubmitting(true); axios - .post(logdataUrl, logData, { - headers: { Authorization: `Bearer ${token}` }, - }) + .post(logdataUrl, logData, {}) .then((d) => { console.log(d); if (d.data.success) { @@ -135,7 +132,7 @@ export default function ManualPrintForm() { If you clicked this in error just click close


- {server == "usday1vms006" ? ( + {location.hostname.includes("usday1") ? (
- {dyco[0].value === "0" && ( + {dyco[0]?.value === "0" && (

Enter the missing tag number.


diff --git a/frontend/src/routes/_old/old/-components/ocp/OcpPage.tsx b/frontend/src/routes/_old/old/-components/ocp/OcpPage.tsx index 039ee99..f7c80ca 100644 --- a/frontend/src/routes/_old/old/-components/ocp/OcpPage.tsx +++ b/frontend/src/routes/_old/old/-components/ocp/OcpPage.tsx @@ -5,6 +5,7 @@ import { } from "@/components/ui/resizable"; import { useSettingStore } from "../../-lib/store/useSettings"; import WrapperManualTrigger from "../ocme/WrapperCard"; +//import WrapperManualTrigger from "../ocme/WrapperCard"; import LabelLog from "./LabelLog"; import LabelRatio from "./LabelRatio"; import Lots from "./Lots"; @@ -15,8 +16,6 @@ export default function OCPPage() { const { settings } = useSettingStore(); if (settings.length === 0) return; - let token = settings.filter((n) => n.name === "plantToken"); - return (
- {token[0].value === "usday1vms006" || - (location.pathname === "localhost" && ( + {location.hostname.includes("usday1") || + (location.hostname === "localhost" && (