Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/apps/web/app/components/screens/projects/p9-operations-interim.visual-fixture.tsx
T

61 lines
2.4 KiB
TypeScript

import { createProjektOperationsInterimFixtureViewModels } from "@hivegrid/ui-mock";
import type { ProjectSignaturePanelVM } from "@hivegrid/view-models";
import { AcceptanceListPage } from "./AcceptanceListPage";
import { PlantafelPage } from "./PlantafelPage";
import { ProjectSubAreasPanel } from "./ProjectSubAreasPanel";
export const P9_OPERATIONS_INTERIM_VISUAL_SCREENS = ["plantafel", "acceptance-list", "sub-areas"] as const;
export type P9OperationsInterimVisualScreen = (typeof P9_OPERATIONS_INTERIM_VISUAL_SCREENS)[number];
const noOp = (): void => undefined;
const emptySignature: ProjectSignaturePanelVM = { status: "empty" };
/** Shared AD-28 fixture for the R-P9 interim markup snapshots (interim baseline, re-baseline on the D-PLAN/D-ABN nachzug). */
export function P9OperationsInterimVisualFixture({ screen }: { readonly screen: P9OperationsInterimVisualScreen }): React.JSX.Element {
const vms = createProjektOperationsInterimFixtureViewModels();
switch (screen) {
case "plantafel":
return (
<PlantafelPage
vm={vms.plantafel}
projectLabels={[{ id: "project-1", label: "P-2026-0001 · Heizungstausch Auenland" }]}
editableProjectIds={["project-1"]}
projectOptions={[{ id: "project-1", label: "P-2026-0001 · Heizungstausch Auenland" }]}
projectOptionsHasMore={false}
projectPickerLoading={false}
assigneeOptions={[{ id: "user-monteur", label: "Anna Schneider" }]}
canWrite
canBulkReassign
filter={{ assignedUserId: null, includePast: false, sort: "start_asc" }}
view="table"
anchorIso="2026-07-20"
todayIso="2026-07-20"
submitting={false}
actions={{ onSubmit: noOp, onProjectSearch: noOp, onFilterChange: noOp, onViewChange: noOp, onAnchorChange: noOp }}
/>
);
case "acceptance-list":
return (
<AcceptanceListPage
vm={vms.acceptanceList}
createHref="/:tenant/projects/project-1/acceptance/new"
submitting={false}
actions={{ onSubmit: noOp }}
/>
);
case "sub-areas":
return (
<ProjectSubAreasPanel
vm={vms.subAreas}
signature={emptySignature}
submitting={false}
userOptions={[{ id: "user-monteur", label: "Anna Schneider" }]}
actions={{ onSubmit: noOp, onOpenChat: noOp }}
/>
);
}
}