Versione OK Pour l'onglet événements.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import '../../../../core/models/cotisation_model.dart';
|
||||
import '../../../../core/models/payment_model.dart';
|
||||
|
||||
/// États du BLoC des cotisations
|
||||
abstract class CotisationsState extends Equatable {
|
||||
@@ -245,3 +246,137 @@ class CotisationsSearchResults extends CotisationsState {
|
||||
@override
|
||||
List<Object?> get props => [cotisations, searchCriteria, hasReachedMax, currentPage];
|
||||
}
|
||||
|
||||
/// État pour un paiement en cours
|
||||
class PaymentInProgress extends CotisationsState {
|
||||
final String cotisationId;
|
||||
final String paymentId;
|
||||
final String methodePaiement;
|
||||
final double montant;
|
||||
|
||||
const PaymentInProgress({
|
||||
required this.cotisationId,
|
||||
required this.paymentId,
|
||||
required this.methodePaiement,
|
||||
required this.montant,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cotisationId, paymentId, methodePaiement, montant];
|
||||
}
|
||||
|
||||
/// État pour un paiement réussi
|
||||
class PaymentSuccess extends CotisationsState {
|
||||
final String cotisationId;
|
||||
final PaymentModel payment;
|
||||
final CotisationModel updatedCotisation;
|
||||
|
||||
const PaymentSuccess({
|
||||
required this.cotisationId,
|
||||
required this.payment,
|
||||
required this.updatedCotisation,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cotisationId, payment, updatedCotisation];
|
||||
}
|
||||
|
||||
/// État pour un paiement échoué
|
||||
class PaymentFailure extends CotisationsState {
|
||||
final String cotisationId;
|
||||
final String paymentId;
|
||||
final String errorMessage;
|
||||
final String? errorCode;
|
||||
|
||||
const PaymentFailure({
|
||||
required this.cotisationId,
|
||||
required this.paymentId,
|
||||
required this.errorMessage,
|
||||
this.errorCode,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cotisationId, paymentId, errorMessage, errorCode];
|
||||
}
|
||||
|
||||
/// État pour un paiement annulé
|
||||
class PaymentCancelled extends CotisationsState {
|
||||
final String cotisationId;
|
||||
final String paymentId;
|
||||
|
||||
const PaymentCancelled({
|
||||
required this.cotisationId,
|
||||
required this.paymentId,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cotisationId, paymentId];
|
||||
}
|
||||
|
||||
/// État pour la synchronisation en cours
|
||||
class SyncInProgress extends CotisationsState {
|
||||
final String message;
|
||||
|
||||
const SyncInProgress(this.message);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
|
||||
/// État pour la synchronisation terminée
|
||||
class SyncCompleted extends CotisationsState {
|
||||
final int itemsSynced;
|
||||
final DateTime syncTime;
|
||||
|
||||
const SyncCompleted({
|
||||
required this.itemsSynced,
|
||||
required this.syncTime,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [itemsSynced, syncTime];
|
||||
}
|
||||
|
||||
/// État pour l'export en cours
|
||||
class ExportInProgress extends CotisationsState {
|
||||
final String format;
|
||||
final int totalItems;
|
||||
|
||||
const ExportInProgress({
|
||||
required this.format,
|
||||
required this.totalItems,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [format, totalItems];
|
||||
}
|
||||
|
||||
/// État pour l'export terminé
|
||||
class ExportCompleted extends CotisationsState {
|
||||
final String format;
|
||||
final String filePath;
|
||||
final int itemsExported;
|
||||
|
||||
const ExportCompleted({
|
||||
required this.format,
|
||||
required this.filePath,
|
||||
required this.itemsExported,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [format, filePath, itemsExported];
|
||||
}
|
||||
|
||||
/// État pour les notifications programmées
|
||||
class NotificationsScheduled extends CotisationsState {
|
||||
final int notificationsCount;
|
||||
final List<String> cotisationIds;
|
||||
|
||||
const NotificationsScheduled({
|
||||
required this.notificationsCount,
|
||||
required this.cotisationIds,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [notificationsCount, cotisationIds];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user