V5.0.0 //

-> Refonte du système de GESTION DES ROULEMENTS de matériels roulants
-> Optimisation rendue BDD
This commit is contained in:
AdminGit committed 2026-10-03 21:54:39 +02:00
1 parent f77d59ca1c
commit 4b771e546e
6 files changed
+310 -4182

No files matched your search

+3 -3
View File
@@ -317,7 +317,7 @@ export default function CreerPerturbation() {
}
];
const { data, error } = await updateHoraireComposition(horaireTarget.id, newComp);
const { error } = await updateHoraireComposition(horaireTarget.id, newComp);
if (error) throw error;
setHoraires(prev => prev.map(h => h.id === horaireTarget.id ? { ...h, composition_train: newComp } : h));
@@ -362,7 +362,7 @@ export default function CreerPerturbation() {
try {
for (const h of selectedHoraires) {
const arrets = perturbationsArretsMap[h.id] || [];
const payload = buildPayload({
const { payload, modificationsParcours } = buildPayload({
selectedHoraire: h,
cause,
causeDetails,
@@ -374,7 +374,7 @@ export default function CreerPerturbation() {
scopedRegionId,
});
const { error } = await createPerturbation(payload);
const { error } = await createPerturbation(payload, modificationsParcours);
if (error) {
alert(`Erreur lors de la création pour le train ${h.numero_train} : ` + (error.message || 'Erreur'));
setSaving(false);