2026-05-01 10:11:44 +02:00
|
|
|
part of 'operation_files_bloc.dart';
|
|
|
|
|
|
|
|
|
|
abstract class OperationFilesEvent extends Equatable {
|
|
|
|
|
const OperationFilesEvent();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class OperationsavedEvent extends OperationFilesEvent {
|
|
|
|
|
final String operationId;
|
|
|
|
|
const OperationsavedEvent(this.operationId);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [operationId];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class LoadOperationFilesEvent extends OperationFilesEvent {
|
|
|
|
|
final String? operationId;
|
2026-05-02 10:22:47 +02:00
|
|
|
final AttachmentModel? operation;
|
2026-05-01 10:11:44 +02:00
|
|
|
const LoadOperationFilesEvent({this.operationId, this.operation});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [operationId, operation];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class AddOperationFilesEvent extends OperationFilesEvent {
|
|
|
|
|
final List<PlatformFile> files;
|
|
|
|
|
const AddOperationFilesEvent(this.files);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [files];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class UploadOperationFilesEvent extends OperationFilesEvent {
|
|
|
|
|
final List<PlatformFile>? pickedFiles;
|
2026-05-02 10:22:47 +02:00
|
|
|
final List<XFile>? photos;
|
2026-05-01 10:11:44 +02:00
|
|
|
const UploadOperationFilesEvent({this.pickedFiles, this.photos});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [pickedFiles, photos];
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-02 10:22:47 +02:00
|
|
|
class LinkFilesToCustomerEvent extends OperationFilesEvent {
|
|
|
|
|
final String customerId;
|
|
|
|
|
|
|
|
|
|
const LinkFilesToCustomerEvent({required this.customerId});
|
|
|
|
|
|
2026-05-01 10:11:44 +02:00
|
|
|
@override
|
2026-05-02 10:22:47 +02:00
|
|
|
List<Object?> get props => [customerId];
|
2026-05-01 10:11:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class DeleteOperationFilesEvent extends OperationFilesEvent {}
|
|
|
|
|
|
|
|
|
|
class ToggleOperationFileSelectionEvent extends OperationFilesEvent {
|
2026-05-02 10:22:47 +02:00
|
|
|
final AttachmentModel file;
|
2026-05-01 10:11:44 +02:00
|
|
|
const ToggleOperationFileSelectionEvent(this.file);
|
|
|
|
|
}
|
2026-05-04 12:50:00 +02:00
|
|
|
|
|
|
|
|
class RenameOperationFileEvent extends OperationFilesEvent {
|
|
|
|
|
final AttachmentModel file;
|
|
|
|
|
final String newName;
|
|
|
|
|
|
|
|
|
|
const RenameOperationFileEvent(this.file, this.newName);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [file, newName];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class DeleteSpecificOperationFileEvent extends OperationFilesEvent {
|
|
|
|
|
final AttachmentModel file;
|
|
|
|
|
|
|
|
|
|
const DeleteSpecificOperationFileEvent(this.file);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
List<Object?> get props => [file];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SelectAllOperationFilesEvent extends OperationFilesEvent {}
|
|
|
|
|
|
|
|
|
|
class ClearOperationFileSelectionEvent extends OperationFilesEvent {}
|