{title}
{subtitle}
|
{photo.label}
|
) : null}
{row.map((field) => (
import { de } from '@/lib/i18n/de' import { dossierRows, dossierSpan, fillPlaceholders, isInputField, type TemplateField, } from '@/lib/templates/fields' import { RedactedText } from '@/components/Redacted' import { FoundationMark } from './FoundationMark' import type { RenderedSection } from '@/lib/sections/render' /** * Das Aktenblatt: ein Formular, kein Bildschirmelement. * * Nachgebaut nach dem Blatt, das die Personalabteilung bislang von Hand * ausgefüllt hat — Raster, Rahmenstärken und Beschriftungen entsprechen ihm. * Es steht bewusst außerhalb des Design-Systems der Oberfläche, weil es * gedruckt weitergereicht wird und auf Papier gleich aussehen muss. * * Welche Felder wo stehen, kommt aus der Vorlage, nicht von hier. Damit trägt * dieselbe Bauform später einen Vorfallsbericht oder einen Bußgeldbescheid. * Siehe docs/13-entscheidungen.md. */ export function Sheet({ sections, title, subtitle, documentNumber, issuedAt, foundationLevels, footerNote, }: { sections: RenderedSection[] title: string subtitle: string documentNumber: string issuedAt: Date /** Aus FoundationClearance. Steuert keinen Zugriff, nur den Balken. */ foundationLevels: { level: number; name: string; colorHex: string }[] footerNote: string }) { const fields = sections.map((section) => section.field) const byKey = new Map(sections.map((section) => [section.fieldKey, section])) const werte = Object.fromEntries( sections.filter((s) => s.visible).map((s) => [s.fieldKey, s.value]), ) const { photo, photoRows, rows } = dossierRows(fields) const klassifikation = sections.find( (section) => isInputField(section.field) && section.field.slot === 'classbar', ) const stufe = klassifikation?.visible ? Number(klassifikation.value) : NaN const balken = foundationLevels.find((l) => l.level === stufe) return (
|
{photo.label}
|
) : null}
{row.map((field) => (