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 38e16eb on 2026-09-15. Licensed under the Functional Source License (FSL-1.1-ALv2).
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
"use client";
|
||||
/* The Done screen as its own history entry. A finished hand-over or delivery router.replace()s its
|
||||
form here (components/SignFlow showDone), so Back skips the spent form, a router refresh re-renders
|
||||
this screen rather than the form's parent, and a reload still shows what was just recorded. */
|
||||
import { useEffect, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { DoneScreen, readDone, type DoneProps } from "@/components/SignFlow";
|
||||
import { MBody, MKick, MRule, MTop } from "@/components/m";
|
||||
|
||||
export default function DonePage() {
|
||||
const router = useRouter();
|
||||
const [done, setDone] = useState<DoneProps | null>(null);
|
||||
useEffect(() => {
|
||||
const d = readDone();
|
||||
if (d) setDone(d);
|
||||
else router.replace("/m");
|
||||
}, [router]);
|
||||
|
||||
if (done) return <DoneScreen {...done} />;
|
||||
return (
|
||||
<>
|
||||
<MTop title="Done" />
|
||||
<MRule />
|
||||
<MBody pad><MKick>Loading</MKick></MBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user