mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-04-03 16:51:26 +00:00
fix: Ajout du mode Visu
This commit is contained in:
@ -11,6 +11,7 @@ export default function ResponsableInputFields({
|
||||
setGuardians,
|
||||
errors,
|
||||
setIsPageValid,
|
||||
enable = true,
|
||||
}) {
|
||||
const t = useTranslations('ResponsableInputFields');
|
||||
const { selectedEstablishmentId } = useEstablishment();
|
||||
@ -145,6 +146,7 @@ export default function ResponsableInputFields({
|
||||
errorMsg={getError('last_name')}
|
||||
errorLocalMsg={getLocalError(index, 'last_name')}
|
||||
required
|
||||
enable={enable}
|
||||
/>
|
||||
<InputText
|
||||
name="prenomResponsable"
|
||||
@ -157,6 +159,7 @@ export default function ResponsableInputFields({
|
||||
errorMsg={getError('first_name')}
|
||||
errorLocalMsg={getLocalError(index, 'first_name')}
|
||||
required
|
||||
enable={enable}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -176,6 +179,7 @@ export default function ResponsableInputFields({
|
||||
errorMsg={getError('associated_profile_email')}
|
||||
errorLocalMsg={getLocalError(index, 'associated_profile_email')}
|
||||
required
|
||||
enable={enable}
|
||||
/>
|
||||
<InputPhone
|
||||
name="telephoneResponsable"
|
||||
@ -187,6 +191,7 @@ export default function ResponsableInputFields({
|
||||
errorMsg={getError('phone')}
|
||||
errorLocalMsg={getLocalError(index, 'phone')}
|
||||
required
|
||||
enable={enable}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -202,6 +207,7 @@ export default function ResponsableInputFields({
|
||||
errorMsg={getError('birth_date')}
|
||||
errorLocalMsg={getLocalError(index, 'birth_date')}
|
||||
required
|
||||
enable={enable}
|
||||
/>
|
||||
<InputText
|
||||
name="professionResponsable"
|
||||
@ -214,6 +220,7 @@ export default function ResponsableInputFields({
|
||||
errorMsg={getError('profession')}
|
||||
errorLocalMsg={getLocalError(index, 'profession')}
|
||||
required
|
||||
enable={enable}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -229,29 +236,32 @@ export default function ResponsableInputFields({
|
||||
errorMsg={getError('address')}
|
||||
errorLocalMsg={getLocalError(index, 'address')}
|
||||
required
|
||||
enable={enable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Plus
|
||||
className={`w-8 h-8 ${
|
||||
guardians.length >= MAX_GUARDIANS
|
||||
? 'text-gray-400 cursor-not-allowed'
|
||||
: 'text-green-500 cursor-pointer hover:text-green-700'
|
||||
} transition-colors border-2 ${
|
||||
guardians.length >= MAX_GUARDIANS
|
||||
? 'border-gray-400'
|
||||
: 'border-green-500 hover:border-green-700'
|
||||
} rounded-full p-1`}
|
||||
onClick={(e) => {
|
||||
if (guardians.length < MAX_GUARDIANS) {
|
||||
addGuardian(e);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{enable && (
|
||||
<div className="flex justify-center">
|
||||
<Plus
|
||||
className={`w-8 h-8 ${
|
||||
guardians.length >= MAX_GUARDIANS
|
||||
? 'text-gray-400 cursor-not-allowed'
|
||||
: 'text-green-500 cursor-pointer hover:text-green-700'
|
||||
} transition-colors border-2 ${
|
||||
guardians.length >= MAX_GUARDIANS
|
||||
? 'border-gray-400'
|
||||
: 'border-green-500 hover:border-green-700'
|
||||
} rounded-full p-1`}
|
||||
onClick={(e) => {
|
||||
if (guardians.length < MAX_GUARDIANS) {
|
||||
addGuardian(e);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user