feat: Formulaire de création RF sur une seule pag

This commit is contained in:
N3WT DE COMPET
2025-05-05 20:57:51 +02:00
parent 2a6b3bdf63
commit 76f9a7dd14
19 changed files with 1299 additions and 422 deletions

View File

@ -14,6 +14,8 @@ import InputPhone from '../InputPhone';
import { PhoneLabel } from '../PhoneLabel';
import CheckBox from '@/components/CheckBox';
import RadioList from '@/components/RadioList';
import SelectChoice from '@/components/SelectChoice';
import { getCurrentSchoolYear, getNextSchoolYear } from '@/utils/Date';
const InscriptionForm = ({
students,
@ -52,6 +54,7 @@ const InscriptionForm = ({
selectedTuitionDiscounts: [],
selectedTuitionFees: [],
selectedFileGroup: null, // Ajout du groupe de fichiers sélectionné
schoolYear: getCurrentSchoolYear(),
};
});
@ -390,6 +393,24 @@ const InscriptionForm = ({
{step === 1 && (
<div className="mt-6">
{/* Sélection de l'année scolaire */}
<SelectChoice
name="schoolYear"
label="Année scolaire"
placeHolder="Sélectionnez une année scolaire"
choices={[
{ value: getCurrentSchoolYear(), label: getCurrentSchoolYear() },
{ value: getNextSchoolYear(), label: getNextSchoolYear() },
]}
selected={formData.schoolYear || getCurrentSchoolYear()}
callback={(e) =>
setFormData((prevData) => ({
...prevData,
schoolYear: e.target.value,
}))
}
className="w-full mt-4"
/>
<InputTextIcon
name="studentLastName"
type="text"

View File

@ -8,23 +8,7 @@ import SectionHeader from '@/components/SectionHeader';
import { User } from 'lucide-react';
import FileUpload from '@/components/FileUpload';
import { BASE_URL } from '@/utils/Url';
const levels = [
{ value: '1', label: 'TPS - Très Petite Section' },
{ value: '2', label: 'PS - Petite Section' },
{ value: '3', label: 'MS - Moyenne Section' },
{ value: '4', label: 'GS - Grande Section' },
{ value: '5', label: 'CP' },
{ value: '6', label: 'CE1' },
{ value: '7', label: 'CE2' },
{ value: '8', label: 'CM1' },
{ value: '9', label: 'CM2' },
];
const genders = [
{ value: '1', label: 'Garçon' },
{ value: '2', label: 'Fille' },
];
import { levels, genders } from '@/utils/constants';
export default function StudentInfoForm({
studentId,