ThreadCount Community edition
Release / release (push) Has been skipped

Uniform stock management for healthcare linen rooms: the coordinator app, the phone counter and the staff app, for your own server. Built from 9776046 on 2026-09-16. Licensed under the Functional Source License (FSL-1.1-ALv2).
This commit is contained in:
ThreadCount committed 2026-09-17 04:35:27 +10:00
commit 0e18f3ba68
473 files changed
+58690

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
"use client";
import { useState } from "react";
import { useSnap } from "@/lib/client";
import { PageHead } from "@/components/ui";
import ToOrder from "@/components/orders/ToOrder";
import OnTheWay from "@/components/orders/OnTheWay";
import ThisMonth from "@/components/orders/ThisMonth";
import RecentOrders from "@/components/orders/RecentOrders";
import { NewOrder, OrdersStyles } from "@/components/orders/bits";
export default function OrdersPage() {
const { isAdmin } = useSnap();
const [dlg, setDlg] = useState<null | "stock" | "staff">(null);
return (
<section>
<OrdersStyles />
<PageHead title="Orders">
<button type="button" className="btn btn-onink" onClick={() => setDlg("staff")}>Order for a person</button>
<button type="button" className="btn btn-primary" onClick={() => setDlg("stock")}>New order</button>
</PageHead>
<div className="tc-orders-grid">
<div className="tc-orders-toorder">{isAdmin ? <ToOrder /> : <RecentOrders />}</div>
<div className="tc-orders-otw"><OnTheWay /></div>
<div className="tc-orders-month"><ThisMonth /></div>
</div>
{dlg && <NewOrder onClose={() => setDlg(null)} initOrderFor={dlg === "staff" ? "Staff Member" : undefined} />}
</section>
);
}