Merge branch 'feature/travel-cost-calculator' into main

This commit is contained in:
ElPoyo
2026-06-05 15:04:12 +02:00
61 changed files with 24723 additions and 8 deletions
@@ -256,6 +256,20 @@ class EventFormController extends ChangeNotifier {
notifyListeners();
}
/// Ajoute ou met à jour l'option FRAIS_KM avec le prix calculé.
/// L'option est au format attendu par Firestore : { id: "FRAIS_KM", price: <valeur> }
void addTravelCostOption(double price) {
// Retirer l'éventuelle option FRAIS_KM existante
_selectedOptions.removeWhere((opt) => opt['id'] == 'FRAIS_KM');
// Ajouter la nouvelle
_selectedOptions.add({
'id': 'FRAIS_KM',
'price': double.parse(price.toStringAsFixed(2)),
});
_onAnyFieldChanged();
notifyListeners();
}
void setAssignedEquipment(List<EventEquipment> equipment, List<String> containers) {
_assignedEquipment = equipment;
_assignedContainers = containers;