85 lines
1.7 KiB
Dart
85 lines
1.7 KiB
Dart
import 'dart:typed_data';
|
|
|
|
import 'package:hl_lieferservice/model/delivery.dart';
|
|
import 'package:hl_lieferservice/model/tour.dart';
|
|
|
|
abstract class DeliveryEvent {}
|
|
|
|
class LoadDeliveryEvent extends DeliveryEvent {
|
|
LoadDeliveryEvent({required this.delivery});
|
|
|
|
Delivery delivery;
|
|
}
|
|
|
|
class UnscanArticleEvent extends DeliveryEvent {
|
|
UnscanArticleEvent({
|
|
required this.articleId,
|
|
required this.newAmount,
|
|
required this.reason,
|
|
});
|
|
|
|
String articleId;
|
|
String reason;
|
|
int newAmount;
|
|
}
|
|
|
|
class ResetScanAmountEvent extends DeliveryEvent {
|
|
ResetScanAmountEvent({required this.articleId});
|
|
|
|
String articleId;
|
|
}
|
|
|
|
class AddDiscountEvent extends DeliveryEvent {
|
|
AddDiscountEvent({
|
|
required this.deliveryId,
|
|
required this.value,
|
|
required this.reason,
|
|
});
|
|
|
|
String deliveryId;
|
|
String reason;
|
|
int value;
|
|
}
|
|
|
|
class RemoveDiscountEvent extends DeliveryEvent {
|
|
RemoveDiscountEvent({required this.deliveryId});
|
|
|
|
String deliveryId;
|
|
}
|
|
|
|
class UpdateDiscountEvent extends DeliveryEvent {
|
|
UpdateDiscountEvent({
|
|
required this.deliveryId,
|
|
required this.value,
|
|
required this.reason,
|
|
});
|
|
|
|
String deliveryId;
|
|
String? reason;
|
|
int? value;
|
|
}
|
|
|
|
class UpdateDeliveryOptionEvent extends DeliveryEvent {
|
|
UpdateDeliveryOptionEvent({required this.key, required this.value});
|
|
|
|
String key;
|
|
dynamic value;
|
|
}
|
|
|
|
class UpdateSelectedPaymentMethodEvent extends DeliveryEvent {
|
|
UpdateSelectedPaymentMethodEvent({required this.payment});
|
|
|
|
Payment payment;
|
|
}
|
|
|
|
class FinishDeliveryEvent extends DeliveryEvent {
|
|
FinishDeliveryEvent({
|
|
required this.delivery,
|
|
required this.driverSignature,
|
|
required this.customerSignature,
|
|
});
|
|
|
|
Delivery delivery;
|
|
Uint8List customerSignature;
|
|
Uint8List driverSignature;
|
|
} |