Files
flux/lib/features/master_data/staff/blocs/staff_state.dart
Mark M2 Macbook 1dff8ab90d added password reset - resend invite link (#10)
Co-authored-by: Copilot <copilot@github.com>
Reviewed-on: #10
Co-authored-by: Mark M2 Macbook <marco@catelli.it>
Co-committed-by: Mark M2 Macbook <marco@catelli.it>
2026-04-29 09:20:17 +02:00

45 lines
1.1 KiB
Dart

part of 'staff_cubit.dart';
enum StaffStatus { initial, loading, success, emailSent, error }
class StaffState extends Equatable {
final StaffStatus status;
final List<StaffMemberModel> allStaff;
final Map<String, List<StoreModel>> storesByStaff;
final Map<String, List<StaffMemberModel>> staffByStore;
final String? error;
const StaffState({
this.status = StaffStatus.initial,
this.allStaff = const [],
this.storesByStaff = const {},
this.staffByStore = const {},
this.error,
});
StaffState copyWith({
StaffStatus? status,
List<StaffMemberModel>? allStaff,
Map<String, List<StoreModel>>? storesByStaff,
Map<String, List<StaffMemberModel>>? staffByStore,
String? error,
}) {
return StaffState(
status: status ?? this.status,
allStaff: allStaff ?? this.allStaff,
storesByStaff: storesByStaff ?? this.storesByStaff,
staffByStore: staffByStore ?? this.staffByStore,
error: error,
);
}
@override
List<Object?> get props => [
status,
allStaff,
storesByStaff,
staffByStore,
error,
];
}