merge-update-with-lab-changes
Sultan Khan 5 years ago
parent d88e3faa6b
commit 7c398ba40d

@ -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/';
@ -124,7 +124,8 @@ const INSERT_ER_INERT_PRES_ORDER =
/// ER RRT /// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation'; const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; const GET_ALL_RRT_QUESTIONS =
'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
///FindUs ///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -333,7 +334,7 @@ const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 1; const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 1; const PATIENT_TYPE_ID = 1;
var DEVICE_TOKEN = ""; var DEVICE_TOKEN = "";
var IS_VOICE_COMMAND_CLOSED = false; var IS_VOICE_COMMAND_CLOSED = true;
var IS_TEXT_COMPLETED = false; var IS_TEXT_COMPLETED = false;
var DeviceTypeID = Platform.isIOS ? 1 : 2; var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
@ -353,7 +354,7 @@ const UPLOAD_INSURANCE_CARD =
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS = const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus"; "Services/Patients.svc/REST/GetApprovalStatus_DWH";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";

@ -59,7 +59,7 @@ class LandingPage extends StatefulWidget {
@override @override
_LandingPageState createState() => state = _LandingPageState(); _LandingPageState createState() => state = _LandingPageState();
switchToDoFromHMGServices(){ switchToDoFromHMGServices() {
state.changeCurrentTab(4); state.changeCurrentTab(4);
} }
} }
@ -99,7 +99,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
changeCurrentTab(int tab) { changeCurrentTab(int tab) {
setState(() { setState(() {
if(currentTab > 0 && tab == 2) if (currentTab > 0 && tab == 2)
pageController.jumpToPage(0); pageController.jumpToPage(0);
else if (tab != 0) else if (tab != 0)
pageController.jumpToPage(tab); pageController.jumpToPage(tab);
@ -111,8 +111,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}); });
} }
@override @override
void didChangeAppLifecycleState(AppLifecycleState state) { void didChangeAppLifecycleState(AppLifecycleState state) {
super.didChangeAppLifecycleState(state); super.didChangeAppLifecycleState(state);
@ -164,9 +162,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
//setState(() {
AppGlobal.context = context; AppGlobal.context = context;
// });
_requestIOSPermissions(); _requestIOSPermissions();
pageController = PageController(keepPage: true); pageController = PageController(keepPage: true);
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
@ -196,6 +194,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (token != null && DEVICE_TOKEN == "") { if (token != null && DEVICE_TOKEN == "") {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
checkUserStatus(token); checkUserStatus(token);
if (projectViewModel.isLogin)
this.getNotificationCount(DEVICE_TOKEN);
} }
}); });
if (results[Permission.location].isGranted) ; if (results[Permission.location].isGranted) ;
@ -420,7 +420,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
authService authService
.selectDeviceImei(DEVICE_TOKEN) .selectDeviceImei(DEVICE_TOKEN)
.then((SelectDeviceIMEIRES value) { .then((SelectDeviceIMEIRES value) {
this.getNotificationCount(DEVICE_TOKEN);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (value != null) { if (value != null) {
setUserValues(value); setUserValues(value);
@ -444,23 +443,27 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var data = var data =
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
authService // authService
.registeredAuthenticatedUser(data, token, 0, 0) // .registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {print(res)}); // .then((res) => {print(res)});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
setState(() { if (value != null)
notificationCount = value['List_PatientDashboard'][0] {
['UnreadPatientNotificationCount'] > setState(() {
99 notificationCount = value['List_PatientDashboard'][0]
? '99+' ['UnreadPatientNotificationCount'] >
: value['List_PatientDashboard'][0] 99
['UnreadPatientNotificationCount'] ? '99+'
.toString(); : value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); .toString();
})
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
}
}); });
familyFileProvider.getSharedRecordByStatus();
// familyFileProvider.getSharedRecordByStatus();
} }
} }
} }
@ -576,7 +579,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
changeIndex: changeCurrentTab, changeIndex: changeCurrentTab,
index: currentTab, index: currentTab,
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked , floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: floatingActionButton:
(projectViewModel.havePrivilege(34) && currentTab == 0) (projectViewModel.havePrivilege(34) && currentTab == 0)
? FloatingButton( ? FloatingButton(

@ -269,6 +269,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
try { try {
availableBiometrics = await auth.getAvailableBiometrics(); availableBiometrics = await auth.getAvailableBiometrics();
} on PlatformException catch (e) { } on PlatformException catch (e) {
AppToast.showErrorToast(message: e.message);
print(e); print(e);
} }
if (!mounted) return; if (!mounted) return;
@ -397,7 +398,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
stickyAuth: true, stickyAuth: true,
iOSAuthStrings: iosStrings); iOSAuthStrings: iosStrings);
} on PlatformException catch (e) { } on PlatformException catch (e) {
AppToast.showErrorToast(message: e.toString()); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: 'Please enable your Touch or Face ID');
} }
if (authenticated == true) { if (authenticated == true) {

@ -22,7 +22,9 @@ class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex; final ValueChanged<int> changeIndex;
final int index; final int index;
final bool showHomeIcon; final bool showHomeIcon;
BottomNavBar({Key key, this.changeIndex, this.index, this.showHomeIcon = false}) : super(key: key); BottomNavBar(
{Key key, this.changeIndex, this.index, this.showHomeIcon = false})
: super(key: key);
@override @override
_BottomNavBarState createState() => _BottomNavBarState(); _BottomNavBarState createState() => _BottomNavBarState();
@ -75,7 +77,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
Expanded( Expanded(
child: (widget.showHomeIcon) child: (widget.showHomeIcon)
? SizedBox( ? SizedBox(
child: BottomNavigationItem( child: BottomNavigationItem(
icon: Icons.home_outlined, icon: Icons.home_outlined,
activeIcon: Icons.home_outlined, activeIcon: Icons.home_outlined,
changeIndex: _changeIndex, changeIndex: _changeIndex,
@ -83,7 +85,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
currentIndex: 2, currentIndex: 2,
name: TranslationBase.of(context).home, name: TranslationBase.of(context).home,
), ),
) )
: SizedBox( : SizedBox(
height: 50, height: 50,
child: Column( child: Column(
@ -104,15 +106,16 @@ class _BottomNavBarState extends State<BottomNavBar> {
currentIndex: 0, currentIndex: 0,
name: TranslationBase.of(context).home, name: TranslationBase.of(context).home,
), ),
// BottomNavigationItem( // BottomNavigationItem(
// icon: EvaIcons.calendar, // icon: EvaIcons.calendar,
// activeIcon: EvaIcons.calendar, // activeIcon: EvaIcons.calendar,
// changeIndex: _changeIndex, // changeIndex: _changeIndex,
// index: _index, // index: _index,
// currentIndex: 2, // currentIndex: 2,
// name: TranslationBase.of(context).bookAppo, // name: TranslationBase.of(context).bookAppo,
// ), // ),
if (/*widget.index == 0 && */projectViewModel.havePrivilege(34)) if (/*widget.index == 0 && */ projectViewModel
.havePrivilege(34))
BottomNavigationItem( BottomNavigationItem(
icon: EvaIcons.calendar, icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar, activeIcon: EvaIcons.calendar,

Loading…
Cancel
Save