feat: unify Person and User creation form with conditional password
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user