Updates & fixes

merge-update-with-lab-changes
haroon amjad 4 years ago
parent 1f19af01c4
commit 6d88607631

@ -31,7 +31,7 @@ const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/'; // const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/';
// RC API URL // RC API URL
const RC_BASE_URL = 'https://livecare.hmg.com/'; const RC_BASE_URL = 'https://rc.hmg.com/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -146,18 +146,18 @@ const INSERT_ER_INERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder'; 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
/// ER RRT /// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation'; const GET_ALL_RC_TRANSPORTATION = 'api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation'; const GET_ALL_TRANSPORTATIONS_RC = 'api/Transportation/getalltransportation';
const GET_ALL_RRT_QUESTIONS = const GET_ALL_RRT_QUESTIONS =
'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
const GET_RRT_SERVICE_PRICE = const GET_RRT_SERVICE_PRICE =
'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice';
const GET_ALL_TRANSPORTATIONS_ORDERS = 'rc/api/Transportation/get'; const GET_ALL_TRANSPORTATIONS_ORDERS = 'api/Transportation/get';
const CANCEL_AMBULANCE_REQUEST = "rc/api/Transportation/update"; const CANCEL_AMBULANCE_REQUEST = "api/Transportation/update";
const INSERT_TRANSPORTATION_ORDER_RC = "rc/api/Transportation/add"; const INSERT_TRANSPORTATION_ORDER_RC = "api/Transportation/add";
///FindUs ///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -606,27 +606,27 @@ const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
// HHC RC SERVICES // HHC RC SERVICES
const HHC_GET_ALL_SERVICES_RC = "rc/api/HHC/getallhhc"; const HHC_GET_ALL_SERVICES_RC = "api/HHC/getallhhc";
const ADD_HHC_ORDER_RC = "rc/api/HHC/add"; const ADD_HHC_ORDER_RC = "api/HHC/add";
const GET_ALL_HHC_ORDERS_RC = 'rc/api/hhc/list'; const GET_ALL_HHC_ORDERS_RC = 'api/hhc/list';
const UPDATE_HHC_ORDER_RC = 'rc/api/hhc/update'; const UPDATE_HHC_ORDER_RC = 'api/hhc/update';
// CMC RC SERVICES // CMC RC SERVICES
const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc'; const GET_ALL_CMC_SERVICES_RC = 'api/cmc/getallcmc';
const ADD_CMC_ORDER_RC = 'rc/api/cmc/add'; const ADD_CMC_ORDER_RC = 'api/cmc/add';
const GET_ALL_CMC_ORDERS_RC = 'rc/api/cmc/list'; const GET_ALL_CMC_ORDERS_RC = 'api/cmc/list';
const UPDATE_CMC_ORDER_RC = 'rc/api/cmc/update'; const UPDATE_CMC_ORDER_RC = 'api/cmc/update';
// RRT RC SERVICES // RRT RC SERVICES
const ADD_RRT_ORDER_RC = "rc/api/rrt/add"; const ADD_RRT_ORDER_RC = "api/rrt/add";
const GET_ALL_RRT_ORDERS_RC = "rc/api/rrt/list"; const GET_ALL_RRT_ORDERS_RC = "api/rrt/list";
const UPDATE_RRT_ORDER_RC = 'rc/api/rrt/update'; const UPDATE_RRT_ORDER_RC = 'api/rrt/update';
// PRESCRIPTION RC SERVICES // PRESCRIPTION RC SERVICES
const ADD_PRESCRIPTION_ORDER_RC = "rc/api/prescription/add"; const ADD_PRESCRIPTION_ORDER_RC = "api/prescription/add";
const GET_ALL_PRESCRIPTION_ORDERS_RC = "rc/api/prescription/list"; const GET_ALL_PRESCRIPTION_ORDERS_RC = "api/prescription/list";
const GET_ALL_PRESCRIPTION_INFO_RC = "rc/api/Prescription/info"; const GET_ALL_PRESCRIPTION_INFO_RC = "api/Prescription/info";
const UPDATE_PRESCRIPTION_ORDER_RC = 'rc/api/prescription/update'; const UPDATE_PRESCRIPTION_ORDER_RC = 'api/prescription/update';
//Pharmacy wishlist //Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/"; const GET_WISHLIST = "shopping_cart_items/";

@ -28,7 +28,7 @@ class PrescriptionDeliveryService extends BaseService {
body['AppointmentNo'] = appointmentNo.toString(); body['AppointmentNo'] = appointmentNo.toString();
// body['CreatedBy'] = createdBy; // body['CreatedBy'] = createdBy;
body['DischargeID'] = dischargeID.toString(); body['DischargeID'] = dischargeID.toString();
body['ProjectID'] = projectID.toString(); body['ProjectID'] = projectID;
await baseAppClient.post(ADD_PRESCRIPTION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(ADD_PRESCRIPTION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -82,6 +82,8 @@ class PharmacyAddressesViewModel extends BaseViewModel {
if (_pharmacyAddressService.hasError) { if (_pharmacyAddressService.hasError) {
setState(ViewState.Idle); setState(ViewState.Idle);
await Future.delayed(Duration(milliseconds: 800));
getAddressesList();
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
await Future.delayed(Duration(milliseconds: 800)); await Future.delayed(Duration(milliseconds: 800));

@ -45,7 +45,7 @@ class PaymentBottomWidget extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
isChecked ? Texts( isChecked ? Texts(
"${TranslationBase.of(context).sar} ${(model.cartResponse.totalAmount - model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount).toStringAsFixed(2)}", "${TranslationBase.of(context).sar} ${model.cartResponse.totalAmount}",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xff929295), color: Color(0xff929295),

@ -34,11 +34,16 @@ class PharmacyAddressesPage extends StatefulWidget {
class _PharmacyAddressesState extends State<PharmacyAddressesPage> { class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
void navigateToAddressPage(BuildContext ctx, PharmacyAddressesViewModel model, AddressInfo address) { void navigateToAddressPage(BuildContext ctx, PharmacyAddressesViewModel model, AddressInfo address) {
Navigator.push( Navigator.push(
ctx, ctx,
FadePage( FadePage(
page: AddAddressPage(address, (pickResult) async { page: AddAddressPage(
await model.addEditAddress(pickResult, address); address,
}))).then((value) async { (pickResult) async {
await model.addEditAddress(pickResult, address);
},
),
),
).then((value) async {
// await model.getAddressesList(); // await model.getAddressesList();
}); });
} }
@ -320,7 +325,7 @@ class _AddressItemWidgetState extends State<AddressItemWidget> {
okText: TranslationBase.of(context).delete, okText: TranslationBase.of(context).delete,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => { okFunction: () => {
ConfirmDialog.closeAlertDialog(context), ConfirmDialog.closeAlertDialog(context),
setState(() { setState(() {
widget.model.deleteAddresses(widget.address).then((_) { widget.model.deleteAddresses(widget.address).then((_) {
AppToast.showSuccessToast( AppToast.showSuccessToast(

@ -162,12 +162,15 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
SizedBox( SizedBox(
width: 30, width: 30,
), ),
Text(projectViewModel.isArabic ? "2833400 " + " -11- 966+": "+966 " + " -11- 2833400", Directionality(
style: TextStyle( textDirection: TextDirection.ltr,
color: Colors.grey[700], child: Text("+966" +"-11-2833400",
fontSize: 16, style: TextStyle(
fontWeight: FontWeight.w600, color: Colors.grey[700],
letterSpacing: -0.68)), fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
),
], ],
), ),
SizedBox( SizedBox(

@ -74,7 +74,7 @@ class PharmacyAddressService extends BaseService {
Future addCustomerAddress(AddressInfo address) async { Future addCustomerAddress(AddressInfo address) async {
await makeCustomerAddress(address, ADD_CUSTOMER_ADDRESS); await makeCustomerAddress(address, ADD_CUSTOMER_ADDRESS);
// if(!hasError) { // if(!hasError) {
selectedAddressIndex = addresses.length +1; // selectedAddressIndex = addresses.length + 1;
// } // }
} }
@ -100,14 +100,14 @@ class PharmacyAddressService extends BaseService {
body["customer"] = customerObject; body["customer"] = customerObject;
await baseAppClient.postPharmacy("$url", onSuccess: (response, statusCode) async { await baseAppClient.postPharmacy("$url", onSuccess: (response, statusCode) async {
addresses.clear(); // addresses.clear();
response['customers'][0]['addresses'].forEach((item) { // response['customers'][0]['addresses'].forEach((item) {
addresses.add(AddressInfo.fromJson(item)); // addresses.add(AddressInfo.fromJson(item));
}); // });
// getAddresses(); // getAddresses();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); },isAllowAny: true, body: body);
} }
} }

@ -162,8 +162,9 @@ class ProductDetailService extends BaseService {
Future getWishlistItems() async { Future getWishlistItems() async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
var custGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
hasError = false; hasError = false;
await baseAppClient.getPharmacy(GET_WISHLIST + customerId + "?shopping_cart_type=2", onSuccess: (dynamic response, int statusCode) { await baseAppClient.getPharmacy(GET_WISHLIST + customerId + "/$custGUID" + "?shopping_cart_type=2", onSuccess: (dynamic response, int statusCode) {
_wishListProducts.clear(); _wishListProducts.clear();
response['shopping_carts'].forEach((item) { response['shopping_carts'].forEach((item) {
_wishListProducts.add(Wishlist.fromJson(item)); _wishListProducts.add(Wishlist.fromJson(item));
@ -176,8 +177,9 @@ class ProductDetailService extends BaseService {
Future deleteItemFromWishlist(itemID, context) async { Future deleteItemFromWishlist(itemID, context) async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
var custGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
hasError = false; hasError = false;
await baseAppClient.getPharmacy(DELETE_WISHLIST + customerId + "+&product_id=" + itemID + "&cart_type=Wishlist", onSuccess: (dynamic response, int statusCode) { await baseAppClient.getPharmacy(DELETE_WISHLIST + customerId + "/$custGUID" + "+&product_id=" + itemID + "&cart_type=Wishlist", onSuccess: (dynamic response, int statusCode) {
_wishListProducts.clear(); _wishListProducts.clear();
response['shopping_carts'].forEach((item) { response['shopping_carts'].forEach((item) {
_wishListProducts.add(Wishlist.fromJson(item)); _wishListProducts.add(Wishlist.fromJson(item));

Loading…
Cancel
Save