fixed orders

merge-update-with-lab-changes
Fatimah Alshammari 5 years ago
parent c0920e7099
commit 52fa0f6f89

@ -390,6 +390,7 @@ const TRANSFER_YAHALA_LOYALITY_POINTS =
"Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS = const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
"Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
// Home Health Care // Home Health Care
const HHC_GET_ALL_SERVICES = const HHC_GET_ALL_SERVICES =

@ -660,6 +660,7 @@ const Map localizedValues = {
"cancelledOrder": {"en": " CANCELLED", "ar": "ملغي"}, "cancelledOrder": {"en": " CANCELLED", "ar": "ملغي"},
"compare": {"en": " Compare", "ar": "مقارنه"}, "compare": {"en": " Compare", "ar": "مقارنه"},
"medicationsRefill": {"en": " Medication Refill", "ar": "طلب أعادة صرف"}, "medicationsRefill": {"en": " Medication Refill", "ar": "طلب أعادة صرف"},
"recommended": {"en": " Recommended For You", "ar": "موصى لك"},
"myPrescription": {"en": " My Prescriptions", "ar": "وصفاتي"}, "myPrescription": {"en": " My Prescriptions", "ar": "وصفاتي"},
"quantity": {"en": " QTY ", "ar": "الكمية"}, "quantity": {"en": " QTY ", "ar": "الكمية"},
"backMyAccount": { "backMyAccount": {

@ -0,0 +1,157 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class Prescriptions {
String setupID;
int projectID;
int patientID;
int appointmentNo;
String appointmentDate;
String doctorName;
String clinicDescription;
String name;
int episodeID;
int actualDoctorRate;
int admission;
int clinicID;
String companyName;
String despensedStatus;
DateTime dischargeDate;
int dischargeNo;
int doctorID;
String doctorImageURL;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
bool isInOutPatient;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
bool isInsurancePatient;
String nationalityFlagURL;
int noOfPatientsRate;
String qR;
List<String> speciality;
Prescriptions(
{this.setupID,
this.projectID,
this.patientID,
this.appointmentNo,
this.appointmentDate,
this.doctorName,
this.clinicDescription,
this.name,
this.episodeID,
this.actualDoctorRate,
this.admission,
this.clinicID,
this.companyName,
this.despensedStatus,
this.dischargeDate,
this.dischargeNo,
this.doctorID,
this.doctorImageURL,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isInOutPatient,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.isInsurancePatient,
this.nationalityFlagURL,
this.noOfPatientsRate,
this.qR,
this.speciality});
Prescriptions.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
appointmentNo = json['AppointmentNo'];
appointmentDate = json['AppointmentDate'];
doctorName = json['DoctorName'];
clinicDescription = json['ClinicDescription'];
name = json['Name'];
episodeID = json['EpisodeID'];
actualDoctorRate = json['ActualDoctorRate'];
admission = json['Admission'];
clinicID = json['ClinicID'];
companyName = json['CompanyName'];
despensedStatus = json['Despensed_Status'];
dischargeDate = DateUtil.convertStringToDate(json['DischargeDate']);
dischargeNo = json['DischargeNo'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatient = json['IsInOutPatient'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
isInsurancePatient = json['IsInsurancePatient'];
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR'];
// speciality = json['Speciality'].cast<String>();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentDate'] = this.appointmentDate;
data['DoctorName'] = this.doctorName;
data['ClinicDescription'] = this.clinicDescription;
data['Name'] = this.name;
data['EpisodeID'] = this.episodeID;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['Admission'] = this.admission;
data['ClinicID'] = this.clinicID;
data['CompanyName'] = this.companyName;
data['Despensed_Status'] = this.despensedStatus;
data['DischargeDate'] = this.dischargeDate;
data['DischargeNo'] = this.dischargeNo;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatient'] = this.isInOutPatient;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['IsInsurancePatient'] = this.isInsurancePatient;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
return data;
}
}
//class PrescriptionsList {
// String filterName = "";
// List<Prescriptions> prescriptionsList = List();
//
// PrescriptionsList({this.filterName, Prescriptions prescriptions}) {
// prescriptionsList.add(prescriptions);
// }
//}

@ -31,6 +31,7 @@ class OrderModel {
this.taxRates, this.taxRates,
this.orderTax, this.orderTax,
this.orderDiscount, this.orderDiscount,
this.productCount,
this.orderTotal, this.orderTotal,
this.refundedAmount, this.refundedAmount,
this.rewardPointsWereAdded, this.rewardPointsWereAdded,
@ -95,6 +96,7 @@ class OrderModel {
String taxRates; String taxRates;
double orderTax; double orderTax;
dynamic orderDiscount; dynamic orderDiscount;
dynamic productCount;
double orderTotal; double orderTotal;
dynamic refundedAmount; dynamic refundedAmount;
dynamic rewardPointsWereAdded; dynamic rewardPointsWereAdded;
@ -159,6 +161,7 @@ class OrderModel {
taxRates: json["tax_rates"], taxRates: json["tax_rates"],
orderTax: json["order_tax"].toDouble(), orderTax: json["order_tax"].toDouble(),
orderDiscount: json["order_discount"], orderDiscount: json["order_discount"],
productCount: json["product_count"],
orderTotal: json["order_total"].toDouble(), orderTotal: json["order_total"].toDouble(),
refundedAmount: json["refunded_amount"], refundedAmount: json["refunded_amount"],
rewardPointsWereAdded: json["reward_points_were_added"], rewardPointsWereAdded: json["reward_points_were_added"],

@ -0,0 +1,68 @@
class OrdersModel {
List<Orders> orders;
OrdersModel({this.orders});
OrdersModel.fromJson(Map<String, dynamic> json) {
if (json['orders'] != null) {
orders = new List<Orders>();
json['orders'].forEach((v) {
orders.add(new Orders.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.orders != null) {
data['orders'] = this.orders.map((v) => v.toJson()).toList();
}
return data;
}
}
class Orders {
String id;
int productCount;
double orderTotal;
String createdOnUtc;
int orderStatusId;
String orderStatus;
String orderStatusn;
Orders(
{this.id,
this.productCount,
this.orderTotal,
this.createdOnUtc,
this.orderStatusId,
this.orderStatus,
this.orderStatusn});
Orders.fromJson(Map<String, dynamic> json) {
try {
id = json['id'];
productCount = json['product_count'];
orderTotal = json['order_total'];
createdOnUtc = json['created_on_utc'];
orderStatusId = json['order_status_id'];
orderStatus = json['order_status'];
orderStatusn = json['order_statusn'];
}catch(e){
print(e);
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['product_count'] = this.productCount;
data['order_total'] = this.orderTotal;
data['created_on_utc'] = this.createdOnUtc;
data['order_status_id'] = this.orderStatusId;
data['order_status'] = this.orderStatus;
data['order_statusn'] = this.orderStatusn;
return data;
}
}

@ -6,17 +6,21 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
class PharmacyModuleService extends BaseService { class PharmacyModuleService extends BaseService {
final AppSharedPreferences sharedPref = AppSharedPreferences(); final AppSharedPreferences sharedPref = AppSharedPreferences();
bool isFinished = true; bool isFinished = true;
bool hasError = false; bool hasError = false;
String errorMsg = ''; String errorMsg = '';
String url ="";
List<PharmacyImageObject> bannerItems = List(); List<PharmacyImageObject> bannerItems = List();
List<Manufacturer> manufacturerList = List(); List<Manufacturer> manufacturerList = List();
List<PharmacyProduct> bestSellerProducts = List(); List<PharmacyProduct> bestSellerProducts = List();
List<PharmacyProduct> lastVisitedProducts = List(); List<PharmacyProduct> lastVisitedProducts = List();
Future makeVerifyCustomer(dynamic data) async { Future makeVerifyCustomer(dynamic data) async {
Map<String, String> queryParams = {'FileNumber': data['PatientID'].toString()}; Map<String, String> queryParams = {'FileNumber': data['PatientID'].toString()};
hasError = false; hasError = false;
@ -148,4 +152,5 @@ class PharmacyModuleService extends BaseService {
} }
} }
} }
} }

@ -0,0 +1,53 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart';
class PrescriptionService extends BaseService {
final AppSharedPreferences sharedPref = AppSharedPreferences();
bool isFinished = true;
bool hasError = false;
String errorMsg = '';
String url = "";
List<Prescriptions> _prescriptionsList = List();
List<Prescriptions> get prescriptionsList => _prescriptionsList;
Future getPrescription() async {
hasError = false;
url = PRESCRIPTION;
print("Print PRESCRIPTION url" + url);
await baseAppClient.getPharmacy(url,
onSuccess: (dynamic response, int statusCode) {
_prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((item) {
_prescriptionsList.add(Prescriptions.fromJson(item));
});
print(_prescriptionsList.length);
print(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
}
// Future getPrescription() async {
// hasError = false;
// Map<String, dynamic> body = Map();
// body['isDentalAllowedBackend'] = false;
// await baseAppClient.post(PRESCRIPTION,
// onSuccess: (dynamic response, int statusCode) {
// prescriptionsList.clear();
// response['PatientPrescriptionList'].forEach((prescriptions) {
// prescriptionsList.add(Prescriptions.fromJson(prescriptions));
// });
// }, onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: body);
// }
}

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/services/pharmacy_services/cancelOrder_serv
import 'package:diplomaticquarterapp/services/pharmacy_services/orderDetails_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/orderDetails_service.dart';
import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../locator.dart'; import '../../../locator.dart';
@ -18,7 +19,7 @@ import '../base_view_model.dart';
class OrderModelViewModel extends BaseViewModel { class OrderModelViewModel extends BaseViewModel {
OrderService _orderService = locator<OrderService>(); OrderService _orderService = locator<OrderService>();
List<OrderModel> get order => _orderService.orderList; List<Orders> get orders => _orderService.orderList;
OrderDetailsService _orderDetailsService = locator<OrderDetailsService>(); OrderDetailsService _orderDetailsService = locator<OrderDetailsService>();

@ -3,7 +3,11 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart';
//import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart';
//import 'package:diplomaticquarterapp/core/service/medical/prescriptions_service.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../../locator.dart'; import '../../../locator.dart';
@ -11,6 +15,8 @@ import '../../../locator.dart';
class PharmacyModuleViewModel extends BaseViewModel { class PharmacyModuleViewModel extends BaseViewModel {
PharmacyModuleService _pharmacyService = locator<PharmacyModuleService>(); PharmacyModuleService _pharmacyService = locator<PharmacyModuleService>();
PrescriptionService _prescriptionService = locator<PrescriptionService>();
List<PharmacyImageObject> get bannerList => _pharmacyService.bannerItems; List<PharmacyImageObject> get bannerList => _pharmacyService.bannerItems;
List<Manufacturer> get manufacturerList => _pharmacyService.manufacturerList; List<Manufacturer> get manufacturerList => _pharmacyService.manufacturerList;
@ -21,6 +27,11 @@ class PharmacyModuleViewModel extends BaseViewModel {
List<PharmacyProduct> get lastVisitedProducts => List<PharmacyProduct> get lastVisitedProducts =>
_pharmacyService.lastVisitedProducts; _pharmacyService.lastVisitedProducts;
List<Prescriptions> get prescriptionsList =>
_prescriptionService.prescriptionsList;
// List<PharmacyProduct> get pharmacyPrescriptionsList => PharmacyProduct.pharmacyPrescriptionsList ;
Future getPharmacyHomeData() async { Future getPharmacyHomeData() async {
setState(ViewState.Busy); setState(ViewState.Busy);
var data = await sharedPref.getObject(USER_PROFILE); var data = await sharedPref.getObject(USER_PROFILE);
@ -92,6 +103,17 @@ class PharmacyModuleViewModel extends BaseViewModel {
} }
} }
/////////////RecommendedProducts
// _getRecommendedProducts() async {
// await _pharmacyService.getRecommendedProducts();
// if (_pharmacyService.hasError) {
// error = _pharmacyService.error;
// setState(ViewState.Error);
// } else {
// setState(ViewState.Idle);
// }
// }
Future<bool> checkUserIsActivated() async { Future<bool> checkUserIsActivated() async {
if (authenticatedUserObject.isLogin) { if (authenticatedUserObject.isLogin) {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
@ -105,4 +127,17 @@ class PharmacyModuleViewModel extends BaseViewModel {
return false; return false;
} }
} }
getPrescription() async {
print("Print PRESCRIPTION url");
setState(ViewState.Busy);
await _prescriptionService.getPrescription();
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart';
import 'package:diplomaticquarterapp/core/service/qr_service.dart'; import 'package:diplomaticquarterapp/core/service/qr_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
@ -192,6 +193,10 @@ void setupLocator() {
locator.registerLazySingleton(() => CustomerAddressesService()); locator.registerLazySingleton(() => CustomerAddressesService());
locator.registerLazySingleton(() => TermsConditionService()); locator.registerLazySingleton(() => TermsConditionService());
locator.registerLazySingleton(() => CancelOrderService()); locator.registerLazySingleton(() => CancelOrderService());
locator.registerLazySingleton(() => PrescriptionService());
/// View Model /// View Model
locator.registerFactory(() => HospitalViewModel()); locator.registerFactory(() => HospitalViewModel());

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/offers_categorise_page.dart'; import 'package:diplomaticquarterapp/pages/offers_categorise_page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart';
@ -14,10 +15,21 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:rating_bar/rating_bar.dart';
import 'lacum-activitaion-vida-page.dart'; import 'lacum-activitaion-vida-page.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
class PharmacyPage extends StatelessWidget { class PharmacyPage extends StatelessWidget {
@override
void initState() {
// print("model prescription " + model.prescriptionsList.length);
// cancelOrderDetail(order)
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PharmacyModuleViewModel>( return BaseView<PharmacyModuleViewModel>(
@ -37,6 +49,219 @@ class PharmacyPage extends StatelessWidget {
children: <Widget>[ children: <Widget>[
BannerPager(model), BannerPager(model),
GridViewButtons(model), GridViewButtons(model),
Container(
margin: EdgeInsets.fromLTRB(10, 10, 10, 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context).myPrescription,
bold: true,
),
BorderedButton(
TranslationBase.of(context).viewAll,
hasBorder: true,
borderColor: Colors.green,
textColor: Colors.green,
vPadding: 6,
hPadding: 4,
handler: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => HomePrescriptionsPage()));
},
),
],
),
),
// model.getPrescription(),
Container(
padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 24.0),
height: MediaQuery.of(context).size.height * 0.30,
// width: 200.0,
// height: MediaQuery.of(context).size.height / 4 + 20,
margin: EdgeInsets.only(left: 10),
// model.getPrescription();
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
physics: ScrollPhysics(),
// physics: NeverScrollableScrollPhysics(),
// itemCount: 4,
itemCount: model.prescriptionsList.length,
itemBuilder: (context, index){
return
Container(
// width: 160.0,
height: MediaQuery.of(context).size.height * 0.6,
padding: EdgeInsets.only(bottom: 5.0, left: 5.0),
margin: EdgeInsets.only(right: 10.0),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey,
style: BorderStyle.solid,
width: 1.0,
),
color: Colors.white,
borderRadius: BorderRadius.circular(10.0)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Column(
children: [
Container(
padding:EdgeInsets.only(top:10.0, left:10.0, right:3.0, bottom:15.0,),
child: Image.network(
model.prescriptionsList[index].doctorImageURL,
width: 60,
height: 60,
),
),]
),
Column(
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.only(left: 1),
padding: EdgeInsets.only(left: 15.0, right: 15.0),
decoration: BoxDecoration(
border: Border.all(
color: Colors.green,
style: BorderStyle.solid,
width: 4.0,
),
color: Colors.green,
borderRadius: BorderRadius.circular(30.0)
),
child:Text(model.prescriptionsList[index].isInOutPatientDescription.toString(),
style: TextStyle(
color: Colors.white,
fontSize: 15.0,
// fontWeight: FontWeight.bold,
),
)
),
Row(
children: <Widget>[
Image.asset(
'assets/images/Icon-awesome-calendar.png',
width: 30,
height: 30,
),
Text(model.prescriptionsList[index].appointmentDate.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
// fontWeight: FontWeight.bold,
),
)
]
),
],
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5),
child: Row(
children: <Widget>[
Text(model.prescriptionsList[index].doctorTitle.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
),),
Text(model.prescriptionsList[index].doctorName.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
),),
] ),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5),
child: Text(model.prescriptionsList[index].clinicDescription.toString(),
style: TextStyle(
color: Colors.green,
fontSize: 15.0,
// fontWeight: FontWeight.bold,
),),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5),
child: Align(
alignment: Alignment.topLeft,
child: RatingBar.readOnly(
// initialRating: productRate,
size: 15.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
)
]
),
]
),
);
}
),
),
Container(
margin: EdgeInsets.fromLTRB(10, 10, 10, 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context).recommended,
bold: true,
),
BorderedButton(
TranslationBase.of(context).viewAll,
hasBorder: true,
borderColor: Colors.green,
textColor: Colors.green,
vPadding: 6,
hPadding: 4,
handler: () {},
),
],
),
),
Container(
height: MediaQuery.of(context).size.height / 4 + 20,
child: ListView.builder(
itemBuilder: (ctx, i) =>
ProductTileItem(model.bestSellerProduct[i]),
scrollDirection: Axis.horizontal,
itemCount: model.bestSellerProduct.length,
),
),
Container( Container(
margin: EdgeInsets.fromLTRB(10, 0, 10, 0), margin: EdgeInsets.fromLTRB(10, 0, 10, 0),
child: Row( child: Row(
@ -147,62 +372,62 @@ class GridViewButtons extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final gridHeight = (MediaQuery.of(context).size.width * 0.3) * 1.8; final gridHeight = (MediaQuery.of(context).size.width * 0.3) * 1.8;
return Container( return Container(
child: SizedBox( // child: SizedBox(
height: gridHeight, // height: gridHeight,
child: GridView.count( // child: GridView.count(
childAspectRatio: 2.2, // childAspectRatio: 2.2,
crossAxisSpacing: 10, // crossAxisSpacing: 10,
mainAxisSpacing: 10, // mainAxisSpacing: 10,
controller: new ScrollController(keepScrollOffset: false), // controller: new ScrollController(keepScrollOffset: false),
shrinkWrap: true, // shrinkWrap: true,
padding: const EdgeInsets.all(4.0), // padding: const EdgeInsets.all(4.0),
crossAxisCount: 2, // crossAxisCount: 2,
children: [ // children: [
DashboardItem( // DashboardItem(
imageName: 'pharmacy_module/bg_1.png', // imageName: 'pharmacy_module/bg_1.png',
hasColorFilter: false, // hasColorFilter: false,
opacity: 0.8, // opacity: 0.8,
child: GridViewCard( // child: GridViewCard(
TranslationBase.of(context).offersAndPromotions, // TranslationBase.of(context).offersAndPromotions,
'assets/images/pharmacy_module/offer_icon.png', () { // 'assets/images/pharmacy_module/offer_icon.png', () {
Navigator.push(context, FadePage(page: OffersCategorisePage())); // Navigator.push(context, FadePage(page: OffersCategorisePage()));
}), // }),
), // ),
DashboardItem( // DashboardItem(
imageName: 'pharmacy_module/bg_2.png', // imageName: 'pharmacy_module/bg_2.png',
opacity: 0, // opacity: 0,
hasColorFilter: false, // hasColorFilter: false,
child: GridViewCard(TranslationBase.of(context).medicationRefill, // child: GridViewCard(TranslationBase.of(context).medicationRefill,
'assets/images/pharmacy_module/medication_icon.png', () { // 'assets/images/pharmacy_module/medication_icon.png', () {
model.checkUserIsActivated().then((isActivated) { // model.checkUserIsActivated().then((isActivated) {
if (isActivated) { // if (isActivated) {
Navigator.push(context, FadePage(page: LakumMainPage())); // Navigator.push(context, FadePage(page: LakumMainPage()));
} else { // } else {
Navigator.push( // Navigator.push(
context, FadePage(page: LakumActivationVidaPage())); // context, FadePage(page: LakumActivationVidaPage()));
} // }
}); // });
}), // }),
), // ),
DashboardItem( // DashboardItem(
imageName: 'pharmacy_module/bg_3.png', // imageName: 'pharmacy_module/bg_3.png',
opacity: 0, // opacity: 0,
hasColorFilter: false, // hasColorFilter: false,
child: GridViewCard(TranslationBase.of(context).myPrescriptions, // child: GridViewCard(TranslationBase.of(context).myPrescriptions,
'assets/images/pharmacy_module/prescription_icon.png', () {}), // 'assets/images/pharmacy_module/prescription_icon.png', () {}),
), // ),
DashboardItem( // DashboardItem(
imageName: 'pharmacy_module/bg_4.png', // imageName: 'pharmacy_module/bg_4.png',
opacity: 0, // opacity: 0,
hasColorFilter: false, // hasColorFilter: false,
child: GridViewCard( // child: GridViewCard(
TranslationBase.of(context).searchAndScanMedication, // TranslationBase.of(context).searchAndScanMedication,
'assets/images/pharmacy_module/search_scan_icon.png', // 'assets/images/pharmacy_module/search_scan_icon.png',
() {}), // () {}),
), // ),
], // ],
), // ),
), // ),
); );
} }
} }

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart';
import 'package:diplomaticquarterapp/pages/pharmacy/order/OrderDetails.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/OrderDetails.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -31,11 +32,11 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
String customerId = ""; String customerId = "";
String order =""; String order ="";
List <OrderModel> orderList = [] ; List <Orders> orderList = [] ;
List <OrderModel> deliveredOrderList = [] ; List <Orders> deliveredOrderList = [] ;
List <OrderModel> processingOrderList = []; List <Orders> processingOrderList = [];
List <OrderModel> cancelledOrderList = []; List <Orders> cancelledOrderList = [];
List <OrderModel> pendingOrderList = []; List <Orders> pendingOrderList = [];
TabController _tabController; TabController _tabController;
// AppSharedPreferences sharedPref = AppSharedPreferences(); // AppSharedPreferences sharedPref = AppSharedPreferences();
@ -66,6 +67,8 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
child: Column( child: Column(
children: [ children: [
TabBar( TabBar(
labelPadding:
EdgeInsets.only(left: 3.0, right: 3.0),
tabs: [ tabs: [
Tab(text: TranslationBase.of(context).delivered), Tab(text: TranslationBase.of(context).delivered),
Tab(text: TranslationBase.of(context).processing), Tab(text: TranslationBase.of(context).processing),
@ -103,16 +106,16 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
Widget getDeliveredOrder(OrderModelViewModel model){ Widget getDeliveredOrder(OrderModelViewModel model){
for(int i=0 ; i< model.order.length; i++){ for(int i=0 ; i< model.orders.length; i++){
if( model.order[i].orderStatusId == 30 || model.order[i].orderStatusId == 997 if( model.orders[i].orderStatusId == 30 || model.orders[i].orderStatusId == 997
|| model.order[i].orderStatusId == 994 || model.orders[i].orderStatusId == 994
){ ){
deliveredOrderList.add(model.order[i]); deliveredOrderList.add(model.orders[i]);
} }
} }
return Container( return Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
child: model.order.length != 0 child: model.orders.length != 0
? SingleChildScrollView( ? SingleChildScrollView(
child: Column( child: Column(
children:<Widget> [ children:<Widget> [
@ -175,10 +178,10 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
Container( Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
child: InkWell( child: InkWell(
onTap: () { // onTap: () {
Navigator.push(context, // Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel:deliveredOrderList[index]))); // MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel: deliveredOrderList[index]),));
}, // },
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -260,7 +263,7 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
Row( Row(
children: [ children: [
Container( Container(
child: Text(deliveredOrderList[index].orderItems.length.toString(), child: Text(deliveredOrderList[index].productCount.toString(),
style: TextStyle(fontSize: 14.0, style: TextStyle(fontSize: 14.0,
), ),
), ),
@ -317,15 +320,15 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
} }
Widget getProcessingOrder(OrderModelViewModel model){ Widget getProcessingOrder(OrderModelViewModel model){
for(int i=0 ; i< model.order.length; i++){ for(int i=0 ; i< model.orders.length; i++){
if( model.order[i].orderStatusId == 20 || model.order[i].orderStatusId == 995 || if( model.orders[i].orderStatusId == 20 || model.orders[i].orderStatusId == 995 ||
model.order[i].orderStatusId == 998 || model.order[i].orderStatusId == 999){ model.orders[i].orderStatusId == 998 || model.orders[i].orderStatusId == 999){
processingOrderList.add(model.order[i]); processingOrderList.add(model.orders[i]);
} }
} }
return Container( return Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
child: model.order.length != 0 child: model.orders.length != 0
? SingleChildScrollView( ? SingleChildScrollView(
child: Column( child: Column(
children:<Widget> [ children:<Widget> [
@ -389,9 +392,10 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, // Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel:processingOrderList[index]))); // MaterialPageRoute(builder: (context) => OrderDetailsPage(Orders:processingOrderList[index])));
}, //
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -473,7 +477,7 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
Row( Row(
children: [ children: [
Container( Container(
child: Text(processingOrderList[index].orderItems.length.toString(), child: Text(processingOrderList[index].productCount.toString(),
style: TextStyle(fontSize: 14.0, style: TextStyle(fontSize: 14.0,
), ),
), ),
@ -709,13 +713,13 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
} }
Widget getPendingOrder(OrderModelViewModel model){ Widget getPendingOrder(OrderModelViewModel model){
for(int i=0 ; i< model.order.length; i++){ for(int i=0 ; i< model.orders.length; i++){
if( model.order[i].orderStatusId == 10){ if( model.orders[i].orderStatusId == 10){
pendingOrderList.add(model.order[i]); pendingOrderList.add(model.orders[i]);
} }
} }
return Container( return Container(
child: model.order.length != 0 child: model.orders.length != 0
? SingleChildScrollView( ? SingleChildScrollView(
child: Column( child: Column(
children:<Widget> [ children:<Widget> [
@ -780,9 +784,10 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
margin: EdgeInsets.all( 8.0), margin: EdgeInsets.all( 8.0),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, // Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel:pendingOrderList[index]))); // MaterialPageRoute(builder: (context) => OrderDetailsPage(Orders:pendingOrderList[index])));
}, //
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -864,7 +869,7 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
Row( Row(
children: [ children: [
Container( Container(
child: Text(pendingOrderList[index].orderItems.length.toString(), child: Text(pendingOrderList[index].productCount.toString(),
style: TextStyle(fontSize: 14.0, style: TextStyle(fontSize: 14.0,
), ),
), ),
@ -924,14 +929,14 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
} }
Widget getCancelledOrder(OrderModelViewModel model){ Widget getCancelledOrder(OrderModelViewModel model){
for(int i=0 ; i< model.order.length; i++){ for(int i=0 ; i< model.orders.length; i++){
if( model.order[i].orderStatusId == 40 || model.order[i].orderStatusId == 996 if( model.orders[i].orderStatusId == 40 || model.orders[i].orderStatus == 996
|| model.order[i].orderStatusId == 200){ || model.orders[i].orderStatusId == 200){
cancelledOrderList.add(model.order[i]); cancelledOrderList.add(model.orders[i]);
} }
} }
return Container( return Container(
child: model.order.length != 0 child: model.orders.length != 0
? SingleChildScrollView( ? SingleChildScrollView(
child: Column( child: Column(
children:<Widget> [ children:<Widget> [
@ -996,8 +1001,9 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, // Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel:cancelledOrderList[index]))); // MaterialPageRoute(builder: (context) => OrderDetailsPage(orderModel: cancelledOrderList[index])));
//
}, },
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
@ -1080,7 +1086,7 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
Row( Row(
children: [ children: [
Container( Container(
child: Text(cancelledOrderList[index].orderItems.length.toString(), child: Text(cancelledOrderList[index].productCount.toString(),
style: TextStyle(fontSize: 14.0, style: TextStyle(fontSize: 14.0,
), ),
), ),

@ -328,6 +328,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
totalPrice: "${(widget.orderModel.orderItems[index].product.price totalPrice: "${(widget.orderModel.orderItems[index].product.price
* widget.orderModel.orderItems[index].quantity).toStringAsFixed(2)}", * widget.orderModel.orderItems[index].quantity).toStringAsFixed(2)}",
qyt: widget.orderModel.orderItems[index].quantity.toString(), qyt: widget.orderModel.orderItems[index].quantity.toString(),
isOrderDetails:true,
imgs: widget.orderModel.orderItems[index].product.images != null && imgs: widget.orderModel.orderItems[index].product.images != null &&
widget.orderModel.orderItems[index].product.images.length != 0 widget.orderModel.orderItems[index].product.images.length != 0
? widget.orderModel.orderItems[index].product.images [0].src.toString() ? widget.orderModel.orderItems[index].product.images [0].src.toString()

@ -5,6 +5,8 @@ import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/login/welcome.dart'; import 'package:diplomaticquarterapp/pages/login/welcome.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/compare.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/my_reviews.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-terms-conditions-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-terms-conditions-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart';
@ -237,6 +239,12 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MyReviewsPage()));
},
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SvgPicture.asset( SvgPicture.asset(
@ -328,7 +336,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => MyFamily())); builder: (context) => ComparePage()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[

@ -24,6 +24,7 @@ class OrderDetailsService extends BaseService{
Future getOrderDetails(orderId) async { Future getOrderDetails(orderId) async {
print("step 2" + orderId); print("step 2" + orderId);
print("this is what i need"+GET_ORDER_DETAILS + orderId);
hasError = false; hasError = false;
await baseAppClient.getPharmacy(GET_ORDER_DETAILS+orderId, await baseAppClient.getPharmacy(GET_ORDER_DETAILS+orderId,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart';
class OrderService extends BaseService{ class OrderService extends BaseService{
@ -14,21 +14,23 @@ class OrderService extends BaseService{
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider(); AuthProvider authProvider = new AuthProvider();
List<OrderModel> _orderList = List(); List<Orders> _orderList = List();
List<OrderModel> get orderList => _orderList; List<Orders> get orderList => _orderList;
String url =""; String url ="";
Future getOrder(customerId, pageId) async { Future getOrder(customerId, pageId) async {
hasError = false; hasError = false;
// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368"; // url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368";
url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$pageId&limit=200&customer_id=$customerId"; // url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$pageId&limit=200&customer_id=$customerId";
url =GET_ORDER+"customer=1&fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc,product_count&page=$pageId&limit=200&customer_id=$customerId";
print(url); print(url);
await baseAppClient.getPharmacy(url, await baseAppClient.getPharmacy(url,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_orderList.clear(); _orderList.clear();
response['orders'].forEach((item) { response['orders'].forEach((item) {
_orderList.add(OrderModel.fromJson(item)); _orderList.add(Orders.fromJson(item));
}); });
print(_orderList.length); print(_orderList.length);
print(response); print(response);
@ -39,25 +41,27 @@ class OrderService extends BaseService{
} }
Future getProductReview(orderId) async { // Future getProductReview(orderId) async {
print("step 1"); // print("step 1");
hasError = false; // hasError = false;
url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368"; // url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368";
// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$page_id&limit=200&customer_id=$custmerId"; //// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$page_id&limit=200&customer_id=$custmerId";
print(url); // print(url);
await baseAppClient.getPharmacy(url, // await baseAppClient.getPharmacy(url,
onSuccess: (dynamic response, int statusCode) { // onSuccess: (dynamic response, int statusCode) {
_orderList.clear(); // _orderList.clear();
response['orders'].forEach((item) { // response['orders'].forEach((item) {
_orderList.add(OrderModel.fromJson(item)); // _orderList.add(OrderModel.fromJson(item));
}); // });
print(_orderList.length); // print(_orderList.length);
print(response); // print(response);
}, onFailure: (String error, int statusCode) { // }, onFailure: (String error, int statusCode) {
hasError = true; // hasError = true;
super.error = error; // super.error = error;
}); // });
} // }
// Future<Map> getOrder(BuildContext context ) async { // Future<Map> getOrder(BuildContext context ) async {
// //
// if (await this.sharedPref.getObject(USER_PROFILE) != null) { // if (await this.sharedPref.getObject(USER_PROFILE) != null) {

@ -792,6 +792,7 @@ class TranslationBase {
String get recentlyViewed => String get recentlyViewed =>
localizedValues['recentlyViewed'][locale.languageCode]; localizedValues['recentlyViewed'][locale.languageCode];
String get bestSellers => localizedValues['bestSellers'][locale.languageCode]; String get bestSellers => localizedValues['bestSellers'][locale.languageCode];
String get recommended => localizedValues['recommended'][locale.languageCode];
String get deleteAllItems => String get deleteAllItems =>
localizedValues['deleteAllItems'][locale.languageCode]; localizedValues['deleteAllItems'][locale.languageCode];
String get selectAddress => String get selectAddress =>

Loading…
Cancel
Save