diff --git a/src/app/admin/contract-management/components/contractEditor.tsx b/src/app/admin/contract-management/components/contractEditor.tsx index d2cb6b8..7f3bdbc 100644 --- a/src/app/admin/contract-management/components/contractEditor.tsx +++ b/src/app/admin/contract-management/components/contractEditor.tsx @@ -16,6 +16,7 @@ export default function ContractEditor({ onSaved }: Props) { const [lang, setLang] = useState<'en' | 'de'>('en'); const [type, setType] = useState<'contract' | 'bill' | 'other'>('contract'); + const [contractType, setContractType] = useState<'contract' | 'gdpr'>('contract'); const [userType, setUserType] = useState<'personal' | 'company' | 'both'>('personal'); const [description, setDescription] = useState(''); @@ -101,6 +102,7 @@ export default function ContractEditor({ onSaved }: Props) { htmlCode.trim() && description.trim() && type && + (type === 'contract' ? contractType : true) && userType && lang ) @@ -123,6 +125,7 @@ export default function ContractEditor({ onSaved }: Props) { file, name, type, + contract_type: type === 'contract' ? contractType : undefined, lang, description: description || undefined, user_type: userType, @@ -187,6 +190,17 @@ export default function ContractEditor({ onSaved }: Props) { + {type === 'contract' && ( + + )}