Implemented settings, new scan, enhanced UI/UX
This commit is contained in:
@ -135,7 +135,7 @@ class DeliveryOption {
|
||||
if (value.isEmpty) {
|
||||
return false;
|
||||
} else {
|
||||
return bool.parse(value);
|
||||
return value == "0" ? false : true;
|
||||
}
|
||||
} else {
|
||||
if (value.isEmpty) {
|
||||
@ -161,7 +161,7 @@ class DeliveryOption {
|
||||
}
|
||||
}
|
||||
|
||||
class Delivery {
|
||||
class Delivery implements Comparable<Delivery> {
|
||||
Delivery({
|
||||
required this.customer,
|
||||
required this.id,
|
||||
@ -208,6 +208,11 @@ class Delivery {
|
||||
Payment payment;
|
||||
List<DeliveryOption> options;
|
||||
|
||||
@override
|
||||
int compareTo(Delivery other) {
|
||||
return customer.name.compareTo(other.customer.name);
|
||||
}
|
||||
|
||||
Delivery copyWith({
|
||||
Customer? customer,
|
||||
String? id,
|
||||
|
||||
@ -45,6 +45,22 @@ class Tour {
|
||||
.toList()
|
||||
.length;
|
||||
}
|
||||
|
||||
Tour copyWith({
|
||||
DateTime? date,
|
||||
String? discountArticleNumber,
|
||||
Driver? driver,
|
||||
List<Delivery>? deliveries,
|
||||
List<Payment>? paymentMethods,
|
||||
}) {
|
||||
return Tour(
|
||||
date: date ?? this.date,
|
||||
discountArticleNumber: discountArticleNumber ?? this.discountArticleNumber,
|
||||
driver: driver ?? this.driver,
|
||||
deliveries: deliveries ?? this.deliveries,
|
||||
paymentMethods: paymentMethods ?? this.paymentMethods,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Driver {
|
||||
|
||||
Reference in New Issue
Block a user