Added Streams to TourRepository
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:hl_lieferservice/model/tour.dart';
|
||||
|
||||
import '../../../../model/delivery.dart';
|
||||
|
||||
abstract class TourEvent {}
|
||||
|
||||
class LoadTour extends TourEvent {
|
||||
@ -8,6 +12,26 @@ class LoadTour extends TourEvent {
|
||||
LoadTour({required this.teamId});
|
||||
}
|
||||
|
||||
class RequestDeliveryDistanceEvent extends TourEvent {
|
||||
Tour tour;
|
||||
List<Payment> payments;
|
||||
|
||||
RequestDeliveryDistanceEvent({required this.tour, required this.payments});
|
||||
}
|
||||
|
||||
class TourUpdated extends TourEvent {
|
||||
Tour tour;
|
||||
List<Payment> payments;
|
||||
|
||||
TourUpdated({required this.tour, required this.payments});
|
||||
}
|
||||
|
||||
class PaymentOptionsUpdated extends TourEvent {
|
||||
List<Payment> options;
|
||||
|
||||
PaymentOptionsUpdated({required this.options});
|
||||
}
|
||||
|
||||
class UpdateTour extends TourEvent {
|
||||
Tour tour;
|
||||
|
||||
@ -24,8 +48,9 @@ class AssignCarEvent extends TourEvent {
|
||||
class IncrementArticleScanAmount extends TourEvent {
|
||||
String internalArticleId;
|
||||
String deliveryId;
|
||||
String carId;
|
||||
|
||||
IncrementArticleScanAmount({required this.internalArticleId, required this.deliveryId});
|
||||
IncrementArticleScanAmount({required this.internalArticleId, required this.deliveryId, required this.carId});
|
||||
}
|
||||
|
||||
class ScanArticleEvent extends TourEvent {
|
||||
@ -52,4 +77,88 @@ class ReactivateDeliveryEvent extends TourEvent {
|
||||
String deliveryId;
|
||||
|
||||
ReactivateDeliveryEvent({required this.deliveryId});
|
||||
}
|
||||
|
||||
class LoadDeliveryEvent extends TourEvent {
|
||||
LoadDeliveryEvent({required this.delivery});
|
||||
|
||||
Delivery delivery;
|
||||
}
|
||||
|
||||
class UnscanArticleEvent extends TourEvent {
|
||||
UnscanArticleEvent({
|
||||
required this.articleId,
|
||||
required this.newAmount,
|
||||
required this.reason,
|
||||
required this.deliveryId
|
||||
});
|
||||
|
||||
String articleId;
|
||||
String deliveryId;
|
||||
String reason;
|
||||
int newAmount;
|
||||
}
|
||||
|
||||
class ResetScanAmountEvent extends TourEvent {
|
||||
ResetScanAmountEvent({required this.articleId, required this.deliveryId});
|
||||
|
||||
String articleId;
|
||||
String deliveryId;
|
||||
}
|
||||
|
||||
class AddDiscountEvent extends TourEvent {
|
||||
AddDiscountEvent({
|
||||
required this.deliveryId,
|
||||
required this.value,
|
||||
required this.reason,
|
||||
});
|
||||
|
||||
String deliveryId;
|
||||
String reason;
|
||||
int value;
|
||||
}
|
||||
|
||||
class RemoveDiscountEvent extends TourEvent {
|
||||
RemoveDiscountEvent({required this.deliveryId});
|
||||
|
||||
String deliveryId;
|
||||
}
|
||||
|
||||
class UpdateDiscountEvent extends TourEvent {
|
||||
UpdateDiscountEvent({
|
||||
required this.deliveryId,
|
||||
required this.value,
|
||||
required this.reason,
|
||||
});
|
||||
|
||||
String deliveryId;
|
||||
String? reason;
|
||||
int? value;
|
||||
}
|
||||
|
||||
class UpdateDeliveryOptionEvent extends TourEvent {
|
||||
UpdateDeliveryOptionEvent({required this.key, required this.value, required this.deliveryId});
|
||||
|
||||
String deliveryId;
|
||||
String key;
|
||||
dynamic value;
|
||||
}
|
||||
|
||||
class UpdateSelectedPaymentMethodEvent extends TourEvent {
|
||||
UpdateSelectedPaymentMethodEvent({required this.payment, required this.deliveryId});
|
||||
|
||||
Payment payment;
|
||||
String deliveryId;
|
||||
}
|
||||
|
||||
class FinishDeliveryEvent extends TourEvent {
|
||||
FinishDeliveryEvent({
|
||||
required this.deliveryId,
|
||||
required this.driverSignature,
|
||||
required this.customerSignature,
|
||||
});
|
||||
|
||||
String deliveryId;
|
||||
Uint8List customerSignature;
|
||||
Uint8List driverSignature;
|
||||
}
|
||||
Reference in New Issue
Block a user