ThreadCount Community edition
Uniform stock management for healthcare linen rooms: the coordinator app, the phone counter and the staff app, for your own server. Built from 2d04e45 on 2026-09-15. Licensed under the Functional Source License (FSL-1.1-ALv2).
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
"use client";
|
||||
import { useState } from "react";
|
||||
import type { IssueRec } from "@/lib/compute";
|
||||
import type { Act } from "./shared";
|
||||
|
||||
/** The receipt tick for one issue line (issue.receipt). Issuers may use it. */
|
||||
export default function SignedToggle({ issue, what, act }: { issue: IssueRec; what: string; act: Act }) {
|
||||
const [busy, setBusy] = useState(false);
|
||||
return (
|
||||
<button type="button" className={"tc-people-signed" + (issue.receipt ? "" : " no")} aria-pressed={issue.receipt} disabled={busy}
|
||||
aria-label={`Receipt signed for ${what}`}
|
||||
onClick={async () => { setBusy(true); await act("issue.receipt", { id: issue.id, receipt: !issue.receipt }); setBusy(false); }}>
|
||||
{issue.receipt ? "signed" : "not signed"}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user