diff --git a/src/app/(app)/reglages/convention/AgreementForm.tsx b/src/app/(app)/reglages/convention/AgreementForm.tsx new file mode 100644 index 0000000..5bbc28a --- /dev/null +++ b/src/app/(app)/reglages/convention/AgreementForm.tsx @@ -0,0 +1,187 @@ +'use client'; + +import { useActionState } from 'react'; + +import { Field, FormError, SubmitButton } from '@/components/ui/Form'; +import { PersistentForm } from '@/components/ui/PersistentForm'; +import type { AgreementParameters } from '@/domain/compliance/parameters'; +import { + publishAgreementVersionAction, + type ActionState, +} from '@/server/settings/agreement'; + +const empty: ActionState = {}; + +function Group({ + title, + note, + children, +}: { + title: string; + note?: string; + children: React.ReactNode; +}) { + return ( +
+ + {title} + + {note ?

{note}

: null} +
{children}
+
+ ); +} + +function Area({ + label, + name, + defaultValue, + hint, +}: { + label: string; + name: string; + defaultValue: string; + hint: string; +}) { + return ( +