feat: update order detail

This commit is contained in:
efrilm
2025-08-08 10:29:17 +07:00
parent 3a07d2e7cc
commit e19d788f47
7 changed files with 401 additions and 225 deletions
@@ -129,6 +129,7 @@ class Order {
final List<Payment>? payments;
final int? totalPaid;
final int? paymentCount;
final String? splitType;
Order({
this.id,
@@ -156,6 +157,7 @@ class Order {
this.payments,
this.totalPaid,
this.paymentCount,
this.splitType,
});
factory Order.fromMap(Map<String, dynamic> map) {
@@ -190,6 +192,7 @@ class Order {
: List<Payment>.from(map['payments'].map((x) => Payment.fromMap(x))),
totalPaid: map['total_paid'],
paymentCount: map['payment_count'],
splitType: map['split_type'] ?? "",
);
}
@@ -220,6 +223,7 @@ class Order {
'payments': payments?.map((x) => x.toMap()).toList(),
'total_paid': totalPaid,
'payment_count': paymentCount,
'split_type': splitType,
};
}
}