merge-requests/341/head
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_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/';
@ -124,7 +124,8 @@ const INSERT_ER_INERT_PRES_ORDER =
/// ER RRT
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
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_ID = 1;
var DEVICE_TOKEN = "";
var IS_VOICE_COMMAND_CLOSED = false;
var IS_VOICE_COMMAND_CLOSED = true;
var IS_TEXT_COMPLETED = false;
var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
@ -353,7 +354,7 @@ const UPLOAD_INSURANCE_CARD =
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS =
"Services/Patients.svc/REST/GetApprovalStatus";
"Services/Patients.svc/REST/GetApprovalStatus_DWH";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";

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

@ -269,6 +269,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
try {
availableBiometrics = await auth.getAvailableBiometrics();
} on PlatformException catch (e) {
AppToast.showErrorToast(message: e.message);
print(e);
}
if (!mounted) return;
@ -397,7 +398,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
stickyAuth: true,
iOSAuthStrings: iosStrings);
} 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) {

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

Loading…
Cancel
Save