import { LstCard } from "@/components/extendedUI/LstCard"; import { Skeleton } from "@/components/ui/skeleton"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; // import {useSessionStore} from "@/lib/store/sessionStore"; // import {useSettingStore} from "@/lib/store/useSettings"; import { useQuery } from "@tanstack/react-query"; import { getlabels } from "@/utils/querys/production/labels"; import { format } from "date-fns"; const labelLogs = [ { key: "line", label: "Line" }, { key: "printerName", label: "Printer" }, { key: "runningNr", label: "Running #" }, { key: "upd_date", label: "Label date" }, { key: "status", label: "Label Status" }, //{key: "reprint", label: "Reprint"}, // removing the reprint button for now until repritning is working as intended ]; export default function LabelLog() { const { data, isError, isLoading } = useQuery(getlabels("4")); if (isError) { return (
Labels for the last 2 hours
{labelData.length === 0 ? ( No labels have been printed in the last 2 hours ) : ( Labels for the last 2 hours )}