resolve merge conflicts.

merge-update-with-lab-changes
Zohaib Iqbal Kambrani 5 years ago
parent dc83b476d6
commit e2bce87e34

@ -1,5 +1 @@
<<<<<<< HEAD
e7c24319209ad9049a87d4c83aeeb7de
=======
59a6c452ee075b50114918f17f1ad8f5
>>>>>>> development
59a6c452ee075b50114918f17f1ad8f5

@ -12,8 +12,8 @@ const EXA_CART_API_BASE_URL = 'https://mdlaboratories.com/exacartapi';
const PACKAGES_CATEGORIES = '/api/categories';
const PACKAGES_PRODUCTS = '/api/products';
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/';
//const BASE_PHARMACY_URL = 'http://swd-pharapp-01:7200/api/';
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -613,20 +613,27 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
}
void checkUserStatus(token) async {
var result = await authService.selectDeviceImei(token);
await setUserValues(result);
void checkUserStatus(token, {isLoader = true}) async {
if (isLoader)
//GifLoaderDialogUtils.showMyDialog(context);
authService
.selectDeviceImei(token)
.then((SelectDeviceIMEIRES value) => setUserValues(value))
.catchError((err) {
//GifLoaderDialogUtils.hideDialog(context);
});
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)});
authService.getDashboard().then((value) => {
setState(() {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
})
});
}
}
// if (await sharedPref.getObject(USER_PROFILE) != null) {
// var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
// if (data != null) {
// authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)});
// authService.getDashboard().then((value) => {
// setState(() {
// notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
// })
// });
// }
// }
}
}

@ -4,7 +4,9 @@ import 'dart:typed_data';
import 'package:badges/badges.dart';
import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/Blood/my_balance_page.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
@ -33,6 +35,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../Constants.dart';
import 'app_shared_preferences.dart';
@ -491,22 +494,24 @@ class Utils {
),
));
}
if (projectViewModel.havePrivilege(32)) {
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
if (projectViewModel.isLogin) {
String patientID = AuthProvider().getAuthenticatedUser().patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
} else {
AlertDialogBox(
context: context,
confirmMessage: "Please login with your account first to use this feature",
okText: "OK",
okFunction: () {
AlertDialogBox.closeAlertDialog(context);
}).showAlertDialog(context);
}
userData().then((userData_){
if (projectViewModel.isLogin && userData_ != null) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
} else {
AlertDialogBox(
context: context,
confirmMessage: "Please login with your account first to use this feature",
okText: "OK",
okFunction: () {
AlertDialogBox.closeAlertDialog(context);
}).showAlertDialog(context);
}
});
},
child: MedicalProfileItem(
title: TranslationBase.of(context).internet,
@ -534,6 +539,11 @@ class Utils {
}
}
Future<AuthenticatedUser> userData() async {
var userData = AuthenticatedUser.fromJson(await AppSharedPreferences().getObject(MAIN_USER));
return userData;
}
// extension function that use in iterations(list.. etc) to iterate items and get index and item it self
extension IndexedIterable<E> on Iterable<E> {
Iterable<T> mapIndexed<T>(T Function(E e, int i) f) {

Loading…
Cancel
Save