Gemeinsame CrudSection fuer die drei kleinen Stammdatentabellen; sie unterscheiden sich nur in den Formularfeldern. Loeschen ist bewusst blockiert, solange Sets am Hersteller oder Thema haengen - Standorte duerfen weg, die Sammlungseintraege verlieren dann nur den Ort. Dazu die gemeinsamen Bausteine: zod-Schemata fuer alle Formulare, einheitliches ActionResult, Slug-Erzeugung mit deutschen Umlauten, Geld als Cent und Datumsformatierung dd.MM.yyyy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
17 lines
546 B
TypeScript
17 lines
546 B
TypeScript
import type { Metadata } from 'next';
|
|
import { LocationList, type LocationRow } from '@/components/verwaltung/location-list';
|
|
import { listLocations } from '@/lib/queries/master-data';
|
|
|
|
export const metadata: Metadata = { title: 'Standorte' };
|
|
|
|
export default function StandortePage() {
|
|
const rows: LocationRow[] = listLocations().map((row) => ({
|
|
id: row.id,
|
|
title: row.name,
|
|
subtitle: row.parentName ? `in ${row.parentName}` : null,
|
|
parentLocationId: row.parentLocationId,
|
|
}));
|
|
|
|
return <LocationList locations={rows} />;
|
|
}
|