fix: order

This commit is contained in:
efrilm 2025-08-05 23:58:16 +07:00
parent d7cd6ce4f2
commit afeccac4aa
2 changed files with 5 additions and 3 deletions

View File

@ -195,7 +195,8 @@ class OrderRemoteDatasource {
// New Api
Future<Either<String, OrderDetailResponseModel>> createOrder(
OrderRequestModel orderModel) async {
OrderRequestModel orderModel,
) async {
final authData = await AuthLocalDataSource().getAuthData();
final url = '${Variables.baseUrl}/api/v1/orders';
@ -274,7 +275,8 @@ class OrderRemoteDatasource {
'page': page,
'limit': limit,
'status': status,
'outlet_id': authData.user?.outletId,
'date_from': "05-08-2025",
'date_to': "05-08-2025",
},
options: Options(
headers: {

View File

@ -54,7 +54,7 @@ class OrderRequestModel {
"customer_name": customerName,
};
if (customerId != null || customerId != "") {
if (customerId != null && customerId != "") {
data["customer_id"] = customerId;
}