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

@ -36,6 +36,7 @@ export default function StudentInfoForm({
setIsPageValid,
hasInteracted,
setHasInteracted,
enable = true,
}) {
const [isLoading, setIsLoading] = useState(true);
@ -181,6 +182,7 @@ export default function StudentInfoForm({
required
errorMsg={getError('last_name')}
errorLocalMsg={getLocalError('last_name')}
enable={enable}
/>
<InputText
name="first_name"
@ -190,6 +192,7 @@ export default function StudentInfoForm({
errorMsg={getError('first_name')}
errorLocalMsg={getLocalError('first_name')}
required
enable={enable}
/>
<SelectChoice
name="gender"
@ -201,6 +204,7 @@ export default function StudentInfoForm({
required
errorMsg={getError('gender')}
errorLocalMsg={getLocalError('gender')}
disabled={!enable}
/>
</div>
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
@ -213,6 +217,7 @@ export default function StudentInfoForm({
required
errorMsg={getError('birth_date')}
errorLocalMsg={getLocalError('birth_date')}
enable={enable}
/>
<InputText
name="birth_place"
@ -222,6 +227,7 @@ export default function StudentInfoForm({
required
errorMsg={getError('birth_place')}
errorLocalMsg={getLocalError('birth_place')}
enable={enable}
/>
<InputText
name="birth_postal_code"
@ -231,6 +237,7 @@ export default function StudentInfoForm({
required
errorMsg={getError('birth_postal_code')}
errorLocalMsg={getLocalError('birth_postal_code')}
enable={enable}
/>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
@ -242,6 +249,7 @@ export default function StudentInfoForm({
onChange={(e) => onChange('nationality', e.target.value)}
errorMsg={getError('nationality')}
errorLocalMsg={getLocalError('nationality')}
enable={enable}
/>
<InputText
name="address"
@ -251,6 +259,7 @@ export default function StudentInfoForm({
required
errorMsg={getError('address')}
errorLocalMsg={getLocalError('address')}
enable={enable}
/>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
@ -262,6 +271,7 @@ export default function StudentInfoForm({
required
errorMsg={getError('attending_physician')}
errorLocalMsg={getLocalError('attending_physician')}
enable={enable}
/>
<SelectChoice
name="level"
@ -273,6 +283,7 @@ export default function StudentInfoForm({
required
errorMsg={getError('level')}
errorLocalMsg={getLocalError('level')}
disabled={!enable}
/>
</div>
<div className="grid grid-cols-1 md:grid-cols-1 gap-8">
@ -281,6 +292,7 @@ export default function StudentInfoForm({
onFileSelect={(file) => handlePhotoUpload(file)}
existingFile={formData.photo}
errorMsg={getError('photo')}
enable={enable}
/>
</div>
</div>