2026-04-10 10:47:56 +02:00
|
|
|
part of 'customer_bloc.dart';
|
|
|
|
|
|
|
|
|
|
abstract class CustomerEvent extends Equatable {
|
|
|
|
|
const CustomerEvent();
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Carica tutti i clienti dell'azienda
|
|
|
|
|
class LoadCustomersRequested extends CustomerEvent {
|
|
|
|
|
final String companyId;
|
|
|
|
|
const LoadCustomersRequested(this.companyId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Crea un cliente (usato sia dalla lista che dalla Dialog operazioni)
|
|
|
|
|
class CreateCustomerRequested extends CustomerEvent {
|
|
|
|
|
final CustomerModel customer;
|
|
|
|
|
const CreateCustomerRequested(this.customer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Ricerca in tempo reale
|
|
|
|
|
class SearchCustomersRequested extends CustomerEvent {
|
|
|
|
|
final String companyId;
|
|
|
|
|
final String query;
|
|
|
|
|
const SearchCustomersRequested(this.companyId, this.query);
|
|
|
|
|
}
|
2026-04-10 11:11:55 +02:00
|
|
|
|
|
|
|
|
class UpdateCustomerRequested extends CustomerEvent {
|
|
|
|
|
final CustomerModel customer;
|
|
|
|
|
const UpdateCustomerRequested(this.customer);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [customer];
|
|
|
|
|
}
|