fix: Ajout du mode Visu

This commit is contained in:
N3WT DE COMPET
2025-05-04 14:32:06 +02:00
parent 4ecf25a6ab
commit e1c607308c
29 changed files with 531 additions and 414 deletions

View File

@ -10,6 +10,7 @@ export default function SiblingInputFields({
setFormData,
errors,
setIsPageValid,
enable = true,
}) {
const getError = (index, field) => {
return errors[index]?.[field]?.[0];
@ -121,6 +122,7 @@ export default function SiblingInputFields({
errorMsg={getError('last_name')}
errorLocalMsg={getLocalError(index, 'last_name')}
required
enable={enable}
/>
<InputText
name="first_name"
@ -133,6 +135,7 @@ export default function SiblingInputFields({
errorMsg={getError('first_name')}
errorLocalMsg={getLocalError(index, 'first_name')}
required
enable={enable}
/>
</div>
@ -148,17 +151,20 @@ export default function SiblingInputFields({
errorMsg={getError('birth_date')}
errorLocalMsg={getLocalError(index, 'birth_date')}
required
enable={enable}
/>
</div>
</div>
))}
<div className="flex justify-center">
<Plus
className="w-8 h-8 text-green-500 cursor-pointer hover:text-green-700 transition-colors border-2 border-green-500 hover:border-green-700 rounded-full p-1"
onClick={addSibling}
/>
</div>
{enable && (
<div className="flex justify-center">
<Plus
className="w-8 h-8 text-green-500 cursor-pointer hover:text-green-700 transition-colors border-2 border-green-500 hover:border-green-700 rounded-full p-1"
onClick={addSibling}
/>
</div>
)}
</div>
);
}