From e1e31de8182571431ddfdedbc7ad044b21870543 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 2 Nov 2021 17:55:53 +0300 Subject: [PATCH] Lakum fixes --- lib/config/config.dart | 6 +++--- lib/pages/pharmacies/screens/lakum-main-page.dart | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index f3444d3a..53588ac1 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -15,8 +15,8 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs // const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; @@ -26,7 +26,7 @@ const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; -// RC API URLs +// RC API URL const RC_BASE_URL = 'https://livecare.hmg.com/'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart index 1547b929..c4415852 100644 --- a/lib/pages/pharmacies/screens/lakum-main-page.dart +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -26,11 +26,21 @@ class LakumMainPage extends StatelessWidget { projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getLacumData(), + onModelReady: (model) async { + await model.getLacumData(); + if (model.lacumInformation.yahalaAccountNo == 0 || model.lacumInformation.yahalaAccountNo == null) { + navigateToLakumRegister(context); + } else { + if (model.lacumInformation.status == "Hold") { + Navigator.pushReplacement(context, FadePage(page: LakumActivationVidaPage())); + } + } + }, builder: (_, model, wi) => AppScaffold( appBarTitle: TranslationBase.of(context).lakum, isShowAppBar: true, isPharmacy: true, + showPharmacyCart: false, isShowDecPage: false, backgroundColor: Colors.white, baseViewModel: model,