diff --git a/lib/config/config.dart b/lib/config/config.dart index 40cd68bb..b35e4b3d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; -// 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/'; @@ -505,7 +505,8 @@ const GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime"; const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; const PHARMACY_GET_COUNTRY = "countries"; -const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; +// const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; +const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/getorcreateCustomer"; const GET_PHARMACY_BANNER = "promotionbanners"; const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index 7fa095ca..72bc56c7 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart'; class PharmacyModuleService extends BaseService { final AppSharedPreferences sharedPref = AppSharedPreferences(); bool isFinished = true; - bool hasError = false; String errorMsg = ''; String url = ""; @@ -114,6 +113,7 @@ class PharmacyModuleService extends BaseService { } Future getTopManufacturerList() async { + hasError = false; Map queryParams = {'page': '1', 'limit': '8'}; try { await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER, diff --git a/lib/core/service/parmacyModule/prescription_service.dart b/lib/core/service/parmacyModule/prescription_service.dart index c2312890..d81c125d 100644 --- a/lib/core/service/parmacyModule/prescription_service.dart +++ b/lib/core/service/parmacyModule/prescription_service.dart @@ -45,8 +45,6 @@ class PrescriptionService extends BaseService { _prescriptionsList.add(Prescriptions.fromJson(prescriptions)); }); print(_prescriptionsList.length); - print("response is -------------"+response); - print(response); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart index 07a3781d..ecf3e37f 100644 --- a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -74,6 +74,7 @@ class PharmacyModuleViewModel extends BaseViewModel { setState(ViewState.Idle); } } + Future generatePharmacyToken() async { setState(ViewState.Busy); await _pharmacyService.generatePharmacyToken(); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 230e5984..448238fd 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -66,8 +66,8 @@ class _Login extends State { super.initState(); if(BASE_URL.contains("uat.")){ - nationalIDorFile.text = "1231755"; - mobileNumberController.text = mobileNo = "537503378"; + nationalIDorFile.text = "2001273"; + mobileNumberController.text = mobileNo = "0555416043"; } }