feat(stammdaten): crud fuer hersteller, themen und standorte
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>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import type { Metadata } from 'next';
|
||||
import { ManufacturerList, type ManufacturerRow } from '@/components/verwaltung/manufacturer-list';
|
||||
import { pluralize } from '@/lib/format';
|
||||
import { listManufacturers } from '@/lib/queries/master-data';
|
||||
|
||||
export const metadata: Metadata = { title: 'Hersteller' };
|
||||
|
||||
export default function HerstellerPage() {
|
||||
const rows: ManufacturerRow[] = listManufacturers().map((row) => ({
|
||||
id: row.id,
|
||||
title: row.name,
|
||||
subtitle: [pluralize(row.setCount, 'Set', 'Sets'), row.website]
|
||||
.filter(Boolean)
|
||||
.join(' · '),
|
||||
website: row.website,
|
||||
setCount: row.setCount,
|
||||
}));
|
||||
|
||||
return <ManufacturerList manufacturers={rows} />;
|
||||
}
|
||||
Reference in New Issue
Block a user