feat: Refactor group deletion logic to use tripId and add reset trips functionality

This commit is contained in:
Dayron
2025-10-20 15:34:06 +02:00
parent d0a76b5043
commit 068924a0f2
8 changed files with 117 additions and 58 deletions

View File

@@ -148,7 +148,7 @@ class GroupBloc extends Bloc<GroupEvent, GroupState> {
Emitter<GroupState> emit,
) async {
try {
await _repository.deleteGroup(event.groupId);
await _repository.deleteGroup(event.tripId);
emit(const GroupOperationSuccess('Groupe supprimé'));
} catch (e) {
emit(GroupError('Erreur lors de la suppression: $e'));

View File

@@ -88,10 +88,10 @@ class UpdateGroup extends GroupEvent {
// Supprimer un groupe
class DeleteGroup extends GroupEvent {
final String groupId;
final String tripId;
const DeleteGroup(this.groupId);
const DeleteGroup(this.tripId);
@override
List<Object?> get props => [groupId];
List<Object?> get props => [tripId];
}