Files
unionflow-server-api/unionflow/unionflow-mobile-apps/lib/features/profile/domain/usecases/update_preferences.dart
dahoud e8ad874015 feat: WebSocket temps réel + Finance Workflow + corrections
- Task #6: WebSocket /ws/dashboard + Kafka events (5 topics)
  * Backend: KafkaEventProducer, KafkaEventConsumer
  * Mobile: WebSocketService (reconnection, heartbeat, typed events)
  * DashboardBloc: Auto-refresh depuis WebSocket events

- Finance Workflow: approbations + budgets (backend + mobile)
  * Backend: entities, services, resources, migrations Flyway V6
  * Mobile: features finance_workflow complète avec BLoC

- Corrections DI: interfaces IRepository partout
  * IProfileRepository, IOrganizationRepository, IMembreRepository
  * GetIt configuré avec @injectable

- Spec-Kit: constitution + templates mis à jour
  * .specify/memory/constitution.md enrichie
  * Templates agent, plan, spec, tasks, checklist

- Nettoyage: fichiers temporaires supprimés

Signed-off-by: lions dev Team
2026-03-15 02:12:17 +00:00

25 lines
908 B
Dart

/// Use Case: Mettre à jour les préférences utilisateur
library update_preferences;
import 'package:injectable/injectable.dart';
import '../repositories/profile_repository.dart';
/// Met à jour les préférences utilisateur (langue, notifications, thème, etc.)
/// Endpoint: PUT /api/membres/{id}/preferences
/// Fallback sur stockage local si endpoint non disponible
@injectable
class UpdatePreferences {
final IProfileRepository _repository;
UpdatePreferences(this._repository);
/// Exécute le use case
/// [id] : Identifiant du membre
/// [preferences] : Map contenant les préférences à mettre à jour
/// Exemple: { "langue": "fr", "notificationsEmail": true, "theme": "dark" }
/// Retourne les préférences mises à jour
Future<Map<String, dynamic>> call(String id, Map<String, dynamic> preferences) async {
return _repository.updatePreferences(id, preferences);
}
}