fix: ui refund and sales page
This commit is contained in:
@@ -113,6 +113,7 @@ class Order {
|
||||
final DateTime? createdAt;
|
||||
final DateTime? updatedAt;
|
||||
final List<OrderItem>? orderItems;
|
||||
final bool? isRefund;
|
||||
|
||||
Order({
|
||||
this.id,
|
||||
@@ -131,6 +132,7 @@ class Order {
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.orderItems,
|
||||
this.isRefund,
|
||||
});
|
||||
|
||||
factory Order.fromMap(Map<String, dynamic> json) => Order(
|
||||
@@ -147,6 +149,7 @@ class Order {
|
||||
totalAmount: json["total_amount"],
|
||||
notes: json["notes"],
|
||||
metadata: json["metadata"] ?? {},
|
||||
isRefund: json["is_refund"],
|
||||
createdAt: json["created_at"] == null
|
||||
? null
|
||||
: DateTime.parse(json["created_at"]),
|
||||
@@ -175,6 +178,7 @@ class Order {
|
||||
"metadata": metadata,
|
||||
"created_at": createdAt?.toIso8601String(),
|
||||
"updated_at": updatedAt?.toIso8601String(),
|
||||
"is_refund": isRefund,
|
||||
"order_items": orderItems == null
|
||||
? []
|
||||
: List<dynamic>.from(orderItems!.map((x) => x.toMap())),
|
||||
|
||||
Reference in New Issue
Block a user