fix: order
This commit is contained in:
parent
f0ff078e0e
commit
d7cd6ce4f2
@ -41,18 +41,25 @@ class OrderRequestModel {
|
||||
customerName: json["customer_name"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toMap() => {
|
||||
"outlet_id": outletId,
|
||||
"customer_id": customerId,
|
||||
"table_number": tableNumber,
|
||||
"table_id": tableId,
|
||||
"order_type": orderType,
|
||||
"notes": notes,
|
||||
"order_items": orderItems == null
|
||||
? []
|
||||
: List<dynamic>.from(orderItems!.map((x) => x.toMap())),
|
||||
"customer_name": customerName,
|
||||
};
|
||||
Map<String, dynamic> toMap() {
|
||||
Map<String, dynamic> data = {
|
||||
"outlet_id": outletId,
|
||||
"table_number": tableNumber,
|
||||
"table_id": tableId,
|
||||
"order_type": orderType,
|
||||
"notes": notes,
|
||||
"order_items": orderItems == null
|
||||
? []
|
||||
: List<dynamic>.from(orderItems!.map((x) => x.toMap())),
|
||||
"customer_name": customerName,
|
||||
};
|
||||
|
||||
if (customerId != null || customerId != "") {
|
||||
data["customer_id"] = customerId;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OrderItemRequest {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user