fix bugs pharmacy

merge-update-with-lab-changes
mosazaid 4 years ago
parent e97354e574
commit a2e60e7584

@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; 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_AUTORZIE_CUSTOMER = "AutorizeCustomer";
const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer";
const PHARMACY_GET_COUNTRY = "countries"; 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_BANNER = "promotionbanners";
const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer";
const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts";

@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/uitl/utils.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;
String errorMsg = ''; String errorMsg = '';
String url = ""; String url = "";
@ -114,6 +113,7 @@ class PharmacyModuleService extends BaseService {
} }
Future getTopManufacturerList() async { Future getTopManufacturerList() async {
hasError = false;
Map<String, String> queryParams = {'page': '1', 'limit': '8'}; Map<String, String> queryParams = {'page': '1', 'limit': '8'};
try { try {
await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER, await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER,

@ -45,8 +45,6 @@ class PrescriptionService extends BaseService {
_prescriptionsList.add(Prescriptions.fromJson(prescriptions)); _prescriptionsList.add(Prescriptions.fromJson(prescriptions));
}); });
print(_prescriptionsList.length); print(_prescriptionsList.length);
print("response is -------------"+response);
print(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -74,6 +74,7 @@ class PharmacyModuleViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future generatePharmacyToken() async { Future generatePharmacyToken() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _pharmacyService.generatePharmacyToken(); await _pharmacyService.generatePharmacyToken();

@ -66,8 +66,8 @@ class _Login extends State<Login> {
super.initState(); super.initState();
if(BASE_URL.contains("uat.")){ if(BASE_URL.contains("uat.")){
nationalIDorFile.text = "1231755"; nationalIDorFile.text = "2001273";
mobileNumberController.text = mobileNo = "537503378"; mobileNumberController.text = mobileNo = "0555416043";
} }
} }

Loading…
Cancel
Save