renamed services folder to operations

This commit is contained in:
2026-05-01 09:41:48 +02:00
parent a562606613
commit 87b4661d33
29 changed files with 56 additions and 56 deletions

View File

@@ -0,0 +1,68 @@
part of 'services_cubit.dart';
enum ServicesStatus {
initial,
loading,
ready,
saving,
saved,
savedNoPop,
success,
failure,
}
class ServicesState extends Equatable {
final ServicesStatus status;
final List<ServiceModel> allServices;
final ServiceModel? currentService; // La bozza che stiamo editando
final String? errorMessage;
final String query;
final DateTimeRange? dateRange;
final bool hasReachedMax;
final bool isSavingDraft;
const ServicesState({
required this.status,
this.allServices = const [],
this.currentService,
this.errorMessage,
this.query = '',
this.dateRange,
this.hasReachedMax = false,
this.isSavingDraft = false,
});
ServicesState copyWith({
ServicesStatus? status,
List<ServiceModel>? allServices,
ServiceModel? currentService,
String? errorMessage,
String? query,
DateTimeRange? dateRange,
bool? hasReachedMax,
bool? isSavingDraft,
}) {
return ServicesState(
status: status ?? this.status,
allServices: allServices ?? this.allServices,
currentService: currentService ?? this.currentService,
errorMessage: errorMessage,
query: query ?? this.query,
dateRange: dateRange ?? this.dateRange,
hasReachedMax: hasReachedMax ?? this.hasReachedMax,
isSavingDraft: isSavingDraft ?? this.isSavingDraft,
);
}
@override
List<Object?> get props => [
status,
allServices,
currentService,
errorMessage,
query,
dateRange,
hasReachedMax,
isSavingDraft,
];
}