mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Ajout d'un nouvel état dans l'automatique lorsqu'un mandat SEPA
doit être envoyé aux parent
This commit is contained in:
@ -23,7 +23,7 @@ import StudentInfoForm from '@/components/Inscription/StudentInfoForm';
|
||||
import ResponsableInputFields from '@/components/Inscription/ResponsableInputFields';
|
||||
import PaymentMethodSelector from '@/components/Inscription/PaymentMethodSelector';
|
||||
import ProgressStep from '@/components/ProgressStep';
|
||||
import { CheckCircle, Loader2 } from 'lucide-react';
|
||||
import { CheckCircle, Hourglass } from 'lucide-react';
|
||||
|
||||
/**
|
||||
* Composant de formulaire d'inscription partagé
|
||||
@ -315,16 +315,21 @@ export default function InscriptionFormShared({
|
||||
// Soumission du formulaire
|
||||
const handleSubmit = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
// Vérifier si le mode de paiement sélectionné est un prélèvement SEPA
|
||||
const isSepaPayment =
|
||||
formData.registration_payment === '1' || formData.tuition_payment === '1';
|
||||
const data = {
|
||||
student: {
|
||||
...formData,
|
||||
guardians,
|
||||
},
|
||||
establishment: selectedEstablishmentId,
|
||||
status: 3,
|
||||
status: isSepaPayment ? 8 : 3,
|
||||
tuition_payment: formData.tuition_payment,
|
||||
registration_payment: formData.registration_payment,
|
||||
};
|
||||
|
||||
onSubmit(data);
|
||||
};
|
||||
|
||||
@ -448,7 +453,7 @@ export default function InscriptionFormShared({
|
||||
{template.file !== null ? (
|
||||
<CheckCircle className="w-5 h-5 text-green-600" />
|
||||
) : (
|
||||
<Loader2 className="w-5 h-5 text-gray-600" />
|
||||
<Hourglass className="w-5 h-5 text-gray-600" />
|
||||
)}
|
||||
</span>
|
||||
{template.name || 'Document sans nom'}
|
||||
|
||||
Reference in New Issue
Block a user