feat: unify Person and User creation form with conditional password

This commit is contained in:
2026-06-16 21:48:59 +02:00
parent e5717461cf
commit 1f5a849bf5
21 changed files with 462 additions and 171 deletions
+3 -22
View File
@@ -1,24 +1,5 @@
import { getI18n } from "@/i18n/server"
import { redirect } from "next/navigation"
import PersonForm from "../_components/person.form"
export default async function NewPersonPage() {
const { dictionary } = await getI18n()
const copy = dictionary.inventory.people
return (
<div className="flex flex-col gap-4">
<div className="flex items-center justify-between gap-4">
<h1 className="text-2xl font-bold">{copy.new.title}</h1>
</div>
<PersonForm
mode="create"
formCopy={copy.form}
schemaCopy={copy.schema}
departmentCopy={copy.departments}
fallbackCopy={copy.fallback}
submitButtonCopy={dictionary.common.submitButton}
/>
</div>
)
export default function NewPersonPage() {
redirect("/admin/users/new")
}