8c86c988c1
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).
18 lines
714 B
TypeScript
18 lines
714 B
TypeScript
import { notFound, redirect } from "next/navigation";
|
|
import { currentStaff } from "@/lib/staffsession";
|
|
import { reviewData } from "@/lib/managerdata";
|
|
import ReviewScreen from "@/components/screens/Review";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function MyReview({ params }: { params: Promise<{ id: string }> }) {
|
|
const sess = await currentStaff();
|
|
if (!sess) redirect("/my/signin");
|
|
const { id } = await params;
|
|
// reviewData starts from `managerId: sess.staffId`, so a request addressed to another manager
|
|
// is not filtered out afterwards — it is never selected.
|
|
const data = await reviewData(sess, id);
|
|
if (!data) notFound();
|
|
return <ReviewScreen data={data} />;
|
|
}
|