Refactor event type handling and add data management page (options and event types)
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
|  | ||||
| class EventOption { | ||||
|   final String id; | ||||
|   final String code; // Nouveau champ code | ||||
|   final String name; | ||||
|   final String details; | ||||
|   final double valMin; | ||||
| @@ -9,6 +9,7 @@ class EventOption { | ||||
|  | ||||
|   EventOption({ | ||||
|     required this.id, | ||||
|     required this.code, | ||||
|     required this.name, | ||||
|     required this.details, | ||||
|     required this.valMin, | ||||
| @@ -19,6 +20,7 @@ class EventOption { | ||||
|   factory EventOption.fromMap(Map<String, dynamic> map, String id) { | ||||
|     return EventOption( | ||||
|       id: id, | ||||
|       code: map['code'] ?? id, // Utilise le code ou l'ID en fallback | ||||
|       name: map['name'] ?? '', | ||||
|       details: map['details'] ?? '', | ||||
|       valMin: (map['valMin'] ?? 0.0).toDouble(), | ||||
| @@ -31,6 +33,7 @@ class EventOption { | ||||
|  | ||||
|   Map<String, dynamic> toMap() { | ||||
|     return { | ||||
|       'code': code, | ||||
|       'name': name, | ||||
|       'details': details, | ||||
|       'valMin': valMin, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 ElPoyo
					ElPoyo