Merge branch 'development_v2.5' into sikander_family_profile_switch

# Conflicts:
#	lib/pages/DrawerPages/family/my-family.dart
#	lib/widgets/drawer/app_drawer_widget.dart
merge-update-with-lab-changes
Sikander Saleem 4 years ago
commit 27d0d80017

@ -19,8 +19,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:3334/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -364,6 +364,9 @@ var CANCEL_LIVECARE_REQUEST =
var SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
var CHANGE_PATIENT_ER_SESSION =
'Services/DoctorApplication.svc/REST/ChangePatientERSession';
var APPLE_PAY_INSERT_REQUEST =
'Services/PayFort_Serv.svc/REST/PayFort_ApplePayRequestData_Insert';

@ -636,8 +636,8 @@ const Map localizedValues = {
"beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"},
"accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"},
"lakumTransfer": {"en": "Lakum Transfer", "ar": "تحويل نقاط لكم"},
"acceptLbl": {"en": "Accept", "ar": "موافقة"},
"declineLbl": {"en": "Decline", "ar": "انخفاض"},
"acceptLbl": {"en": "Accept", "ar": "موافق"},
"declineLbl": {"en": "Decline", "ar": "رفض"},
"select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
"i-am-a": {"en": "I am a ...", "ar": "أنا ..."},
"select-age": {"en": "Select Your Age", "ar": "حدد العمر"},
@ -1654,8 +1654,8 @@ const Map localizedValues = {
"android-instructions-3": { "en": "Make sure that your Smart Watch is connected with the WearOS app & your watch apps.", "ar": "تأكد من أن ساعتك الذكية متصلة بتطبيق WearOS وتطبيقات ساعتك." },
"android-instructions-4": { "en": "Make sure that your smart watch apps are linked/associated with Google Fit App.", "ar": "تأكد من أن تطبيقات ساعتك الذكية مرتبطة / مرتبطة بتطبيق Google Fit." }, "android-instructions-5": { "en": "Make sure that data like heart rate, steps, distance etc. are being shown on your watch app & on Google Fit app & both are in sync.", "ar": "تأكد من عرض بيانات مثل معدل ضربات القلب والخطوات والمسافة وما إلى ذلك على تطبيق الساعة وعلى تطبيق Google Fit وكلاهما في حالة مزامنة." },
"tamaraInstPlan" : { "en": "Select the tamara installment plan", "ar": "حدد خطة تقسيط تمارة" },
"onlineTag": {"en": "Online", "ar": "متصل"},
"offlineTag": {"en": "Offline", "ar": "غير متصل"},
"onlineTag": {"en": "Online", "ar": "مفتوح"},
"offlineTag": {"en": "Offline", "ar": "مغلق"},
"viewDocList": {"en": "View List of Doctors", "ar": "عرض قائمة الأطباء"},
"bodyFatTitle": {"en": "Body Fat", "ar": " الدهون في الجسم"},
"cholesTitle": {"en": "Blood Cholesterol", "ar": " الكولسترول في الدم"},
@ -1758,5 +1758,7 @@ const Map localizedValues = {
"ancillaryOrderPaymentSuccess": {"en": "Your payment for selected orders has been made successfully.", "ar": "تم سداد دفعتك للطلبات المحددة بنجاح."},
"connectTitle": {"en": "Connect", "ar": "تواصل"},
"connectSubtitle": {"en": "With us", "ar": "معنا"},
"covidConsent": {"en": "Covid-19 Test feature allows you to book an appointment for the Covid-19 Lab test within HMG branches, where a swab sample will be collected & processed. Once the result has been processed, we shall notify you via SMS on your registered mobile number & the test result will also be available in the Lab Results section of this app. Please note that this result is only available to you & not publicly available to anyone else. \nPlease accept to confirm & proceed.", "ar": "تتيح لك ميزة اختبار كوفيد19 حجز موعد في احد فروع مجموعة الحبيب الطبية ، حيث سيتم اخذ عينة المسحة ومعالجتها. بمجرد معالجة النتيجة ، سنخطرك عبر رسالة نصية قصيرة على رقم هاتفك المحمول المسجل وستكون نتيجة الاختبار متاحة أيضًا على التطبيق في قسم نتائج المختبر. يرجى ملاحظة أن هذه النتيجة متاحة لك فقط وليست متاحة للجمهور او اي شخص آخر. الرجاء الموافقة للتأكيد والمتابعة."},
"covidConsent": {"en": "Covid-19 Test feature allows you to book an appointment for the Covid-19 Lab test within HMG branches, where a swab sample will be collected & processed. Once the result has been processed, we shall notify you via SMS on your registered mobile number & the test result will also be available in the Lab Results section of this app. Please note that this result is only available to you & not publicly available to anyone else. Also we are using below permissions:\n\n GPS Location to show the nearest hospitals & ER Locations from your location.\n Bluetooth permission to connect blood pressure & blood sugar devices with the app to analyze the data.\n Camera permission to enable virtual consultation between patient & doctor.\n Calendar permission to set reminders for Virtual & Normal Appointments.\n Audio permission to access voice command features.\n Wifi state permission to connect to HMG Wifi when you visit the hospital.\n Read & write external storage to upload images & documents in E-Referral function.\n\n Please accept to confirm & proceed.", "ar": "تتيح لك ميزة اختبار كوفيد19 حجز موعد في احد فروع مجموعة الحبيب الطبية ، حيث سيتم اخذ عينة المسحة ومعالجتها. بمجرد معالجة النتيجة ، سنخطرك عبر رسالة نصية قصيرة على رقم هاتفك المحمول المسجل وستكون نتيجة الاختبار متاحة أيضًا على التطبيق في قسم نتائج المختبر. يرجى ملاحظة أن هذه النتيجة متاحة لك فقط وليست متاحة للجمهور او اي شخص آخر. الرجاء الموافقة للتأكيد والمتابعة."},
"covidConsentHeader": {"en": "User Consent", "ar": "موافقة المستخدم"},
"drawOverAppsPermission": {"en": "Please allow the Al-Habib Medical Group application to appear on the top of the screen when receiving the call from the doctor for LiveCare service.", "ar": "الرجاء السماح لتطبيق مجموعة الحبيب الطبية للظهورعلى سطح الشاشة عند استلام الاتصال من الطبيب لخدمة اللايف كير"},
};

@ -38,3 +38,4 @@ const DOCTOR_SCHEDULE_DATE_SEL = 'DOCTOR_SCHEDULE_DATE_SEL';
const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL';
const CLINICS_LIST = 'CLINICS_LIST';
const COVID_QA_LIST = 'COVID_QA_LIST';
const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN';

@ -13,7 +13,10 @@ class AuthenticatedUserObject {
getUser({bool getUser = false}) async {
if (getUser) {
var userData = await sharedPref.getObject(USER_PROFILE);
var userData;
await sharedPref.getObject(USER_PROFILE).then((value) {
userData = value;
});
if (userData != null) user = AuthenticatedUser.fromJson(userData);
} else if (user == null) {
var userData = await sharedPref.getObject(USER_PROFILE);

@ -246,9 +246,19 @@ class _BookSuccessState extends State<BookSuccess> {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
if (appo.isLiveCareAppointment)
insertLiveCareVIDARequest(appo);
else
navigateToHome(context);
},
child: Text(TranslationBase.of(context).confirmLater, style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).confirmLater, style: TextStyle(fontSize: 16.0)),
),
),
),
@ -276,8 +286,7 @@ class _BookSuccessState extends State<BookSuccess> {
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
child: Text(widget.patientShareResponse.isLiveCareAppointment ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm,
style: TextStyle(fontSize: 18.0)),
child: Text(widget.patientShareResponse.isLiveCareAppointment ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm, style: TextStyle(fontSize: 16.0)),
),
),
),
@ -395,7 +404,6 @@ class _BookSuccessState extends State<BookSuccess> {
}
confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context).then((res) {
@ -603,7 +611,7 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString());
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString(), appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
@ -611,11 +619,14 @@ class _BookSuccessState extends State<BookSuccess> {
});
}
addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID) {
addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {
print(res);
getAppoQR(context);
if (appo.isLiveCareAppointment) {
insertLiveCareVIDARequest(appo);
} else {
getAppoQR(context);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);

@ -293,7 +293,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
List getQuestionsFromJson() {
var questionsJson = """
[{"id":1,"questionEN":"Is the test intended for travel?","questionAR":"هل تجري التحليل بغرض السفر؟","ans":2},{"id":2,"questionEN":"Coming from outside KSA within last 2 weeks?","questionAR":"هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟","ans":2},{"id":3,"questionEN":"Do you currently have fever?","questionAR":"هل تعاني حاليا من حرارة؟","ans":2},{"id":4,"questionEN":"Did you have fever in last 2 weeks?","questionAR":"هل عانيت من حرارة في الأسبوعين الماضيين؟","ans":2},{"id":5,"questionEN":"Do you have a sore throat?","questionAR":"هل لديك التهاب في الحلق؟","ans":2},{"id":6,"questionEN":"Do you have a runny nose?","questionAR":"هل لديك سيلان بالأنف؟"},{"id":7,"questionEN":"Do you have a cough?","questionAR":"هل لديك سعال؟","ans":2},{"id":8,"questionEN":"Do you have shortness of breath?","questionAR":"هل تعانين من ضيق في التنفس؟","ans":2},{"id":9,"questionEN":"Do you have nausea?","questionAR":"هل تعانين من غثيان؟","ans":2},{"id":10,"questionEN":"Do you have vomiting?","questionAR":"هل تعاني من القيء؟","ans":2},{"id":11,"questionEN":"Do you have a headache?","questionAR":"هل تعاني من صداع في الرأس؟","ans":2},{"id":12,"questionEN":"Do you have muscle pain?","questionAR":"هل تعانين من آلام عضلية؟","ans":2},{"id":13,"questionEN":"Do you have joint pain?","questionAR":"هل تعانين من آلام المفاصل؟","ans":2},{"id":14,"questionEN":"Do you have diarrhea?","questionAR":"هل لديك اسهال؟","ans":2}]""";
[{ "id": 1, "questionEN": "Is the test intended for travel?", "questionAR": "هل تجري التحليل بغرض السفر؟", "ans": 2 }, { "id": 2, "questionEN": "Coming from outside KSA within last 2 weeks?", "questionAR": "هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟", "ans": 2 }, { "id": 3, "questionEN": "Do you currently have fever?", "questionAR": "هل تعاني حاليا من حرارة؟", "ans": 2 }, { "id": 4, "questionEN": "Did you have fever in last 2 weeks?", "questionAR": "هل عانيت من حرارة في الأسبوعين الماضيين؟", "ans": 2 }, { "id": 5, "questionEN": "Do you have a sore throat?", "questionAR": "هل لديك التهاب في الحلق؟", "ans": 2 }, { "id": 6, "questionEN": "Do you have a runny nose?", "questionAR": "هل لديك سيلان بالأنف؟" }, { "id": 7, "questionEN": "Do you have a cough?", "questionAR": "هل لديك سعال؟", "ans": 2 }, { "id": 8, "questionEN": "Do you have shortness of breath?", "questionAR": "هل تعاني من ضيق في التنفس؟", "ans": 2 }, { "id": 9, "questionEN": "Do you have nausea?", "questionAR": "هل تعاني من غثيان؟", "ans": 2 }, { "id": 10, "questionEN": "Do you have vomiting?", "questionAR": "هل تعاني من القيء؟", "ans": 2 }, { "id": 11, "questionEN": "Do you have a headache?", "questionAR": "هل تعاني من صداع في الرأس؟", "ans": 2 }, { "id": 12, "questionEN": "Do you have muscle pain?", "questionAR": "هل تعانين من آلام عضلية؟", "ans": 2 }, { "id": 13, "questionEN": "Do you have joint pain?", "questionAR": "هل تعاني من آلام المفاصل؟", "ans": 2 }, { "id": 14, "questionEN": "Do you have diarrhea?", "questionAR": "هل لديك اسهال؟", "ans": 2 } ]""";
var map = json.decode(questionsJson) as List;
return map;
}

@ -491,8 +491,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
await this.sharedPref.setString(TOKEN, result.authenticationTokenID);
_vitalSignService.heightCm = "";
_vitalSignService.weightKg = "";
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).user = result.list;
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).setUser(result.list);
Provider.of<ProjectViewModel>(context, listen: false).user = result.list;
Provider.of<ProjectViewModel>(context, listen: false).setUser(result.list);
try {
// await appointmentRateViewModel.getIsLastAppointmentRatedList();

@ -291,7 +291,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
onTap: () {
projectViewModel.analytics.offerPackages.log();
AuthenticatedUser user = projectViewModel.user;
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user)));
if(projectViewModel.havePrivilege(82))
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user)));
},
child: Stack(
children: [
@ -438,18 +439,18 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
],
),
),
// projectViewModel.havePrivilege(82)
// ? Container()
// : Container(
// width: double.infinity,
// height: double.infinity,
// clipBehavior: Clip.antiAlias,
// decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)),
// child: Icon(
// Icons.lock_outline,
// size: 40,
// ),
// )
projectViewModel.havePrivilege(82)
? Container()
: Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
],
),
),

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart';
@ -34,9 +35,11 @@ import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -97,10 +100,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void _requestIOSPermissions() {
flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(
alert: true,
badge: true,
sound: true,
);
alert: true,
badge: true,
sound: true,
);
}
bool isPageNavigated = false;
@ -114,7 +117,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
DateTime now = DateTime.now();
if (currentBackPressTime == null || now.difference(currentBackPressTime) > Duration(seconds: 2)) {
currentBackPressTime = now;
AppToast.showToast(message: TranslationBase.of(context).pressAgain);
AppToast.showToast(message: TranslationBase
.of(context)
.pressAgain);
return Future.value(false);
}
return Future.value(true);
@ -141,13 +146,18 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
Navigator.push(
context,
MaterialPageRoute(
builder: (cxt) => NotAutPage(
title: TranslationBase.of(context).myFamilyFiles,
description: TranslationBase.of(context).familyInfo,
infoList: [],
imagesInfo: imagesInfo,
icon: "assets/images/new/bottom_nav/family_files.svg",
),
builder: (cxt) =>
NotAutPage(
title: TranslationBase
.of(context)
.myFamilyFiles,
description: TranslationBase
.of(context)
.familyInfo,
infoList: [],
imagesInfo: imagesInfo,
icon: "assets/images/new/bottom_nav/family_files.svg",
),
),
);
return;
@ -160,13 +170,18 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
Navigator.push(
context,
MaterialPageRoute(
builder: (cxt) => NotAutPage(
title: TranslationBase.of(context).todoList,
description: TranslationBase.of(context).infoTodo,
infoList: [],
imagesInfo: imagesInfo,
icon: "assets/images/new/bottom_nav/todo.svg",
),
builder: (cxt) =>
NotAutPage(
title: TranslationBase
.of(context)
.todoList,
description: TranslationBase
.of(context)
.infoTodo,
infoList: [],
imagesInfo: imagesInfo,
icon: "assets/images/new/bottom_nav/todo.svg",
),
),
);
return;
@ -187,8 +202,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// if (tab == 4 && projectViewModel.isLogin && model.count == 0) {
// AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo);
// } else {
pageController.jumpToPage(tab);
currentTab = tab;
pageController.jumpToPage(tab);
currentTab = tab;
// }
} else {
pageController.jumpToPage(tab);
@ -274,7 +289,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// if (results[Permission.accessMediaLocation].isGranted) ;
// if (results[Permission.calendar].isGranted) ;
});
}
Future<Map<Permission, PermissionStatus>> requestPermissions() async {
@ -363,17 +377,18 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (await sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService.getDashboard().then((value) => {
if (value != null)
{
setState(() {
notificationCount =
value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
}
});
authService.getDashboard().then((value) =>
{
if (value != null)
{
setState(() {
notificationCount =
value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
}
});
}
}
}
@ -386,90 +401,102 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return Scaffold(
appBar: currentTab == 0
? PreferredSize(
preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0),
child: AppBar(
elevation: 0,
backgroundColor: CustomColors.backgroudGreyColor,
textTheme: TextTheme(
headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold),
),
title: Text(
getText(currentTab).toUpperCase(),
style: TextStyle(
fontWeight: FontWeight.bold,
color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// bold: true,
),
leading: Builder(
builder: (BuildContext context) {
return new Stack(
children: <Widget>[
currentTab == 0
? IconButton(
icon: SvgPicture.asset("assets/images/new/menu.svg"),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () => Scaffold.of(context).openDrawer(),
)
: IconButton(
icon: Icon(Icons.arrow_back),
onPressed: () {
setState(() {
currentTab = 0;
});
pageController.jumpToPage(0);
},
),
projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: CustomColors.accentColor,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
model.notificationsCount.toString(),
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
),
textAlign: TextAlign.center,
),
),
)
: SizedBox()
],
);
},
),
actions: [
// IconButton(
// //iconSize: 70,
// icon: Icon(
// projectViewModel.isLogin ? Icons.settings : Icons.login,
// color: Theme.of(context).textTheme.headline1.color,
// ),
// onPressed: () {
// if (projectViewModel.isLogin)
// Navigator.of(context).pushNamed(
// SETTINGS,
// );
// else
// login();
// }, //do something,
// )
preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0),
child: AppBar(
elevation: 0,
backgroundColor: CustomColors.backgroudGreyColor,
textTheme: TextTheme(
headline6: TextStyle(color: Theme
.of(context)
.textTheme
.headline1
.color, fontWeight: FontWeight.bold),
),
title: Text(
getText(currentTab).toUpperCase(),
style: TextStyle(
fontWeight: FontWeight.bold,
color: currentTab == 0 ? CustomColors.backgroudGreyColor : Theme
.of(context)
.textTheme
.headline1
.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// bold: true,
),
leading: Builder(
builder: (BuildContext context) {
return new Stack(
children: <Widget>[
currentTab == 0
? IconButton(
icon: SvgPicture.asset("assets/images/new/menu.svg"),
color: Theme
.of(context)
.textTheme
.headline1
.color,
onPressed: () => Scaffold.of(context).openDrawer(),
)
: IconButton(
icon: Icon(Icons.arrow_back),
onPressed: () {
setState(() {
currentTab = 0;
});
pageController.jumpToPage(0);
},
),
projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: CustomColors.accentColor,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
model.notificationsCount.toString(),
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
),
textAlign: TextAlign.center,
),
),
)
: SizedBox()
],
centerTitle: true,
),
)
);
},
),
actions: [
// IconButton(
// //iconSize: 70,
// icon: Icon(
// projectViewModel.isLogin ? Icons.settings : Icons.login,
// color: Theme.of(context).textTheme.headline1.color,
// ),
// onPressed: () {
// if (projectViewModel.isLogin)
// Navigator.of(context).pushNamed(
// SETTINGS,
// );
// else
// login();
// }, //do something,
// )
],
centerTitle: true,
),
)
: null,
drawer: SafeArea(child: AppDrawer()),
extendBody: false,
@ -479,8 +506,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
onPageChanged: (idx){
},
onPageChanged: (idx) {},
children: [
HomePage2(
goToMyProfile: () {
@ -526,12 +552,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: (projectViewModel.havePrivilege(34) && currentTab == 0)
? FloatingButton(
elevation: true,
onTap: () {
projectViewModel.analytics.appointment.book_appointment();
changeCurrentTab(2);
},
)
elevation: true,
onTap: () {
projectViewModel.analytics.appointment.book_appointment();
changeCurrentTab(2);
},
)
: null);
}
@ -542,17 +568,29 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
getText(currentTab) {
switch (currentTab) {
case 0:
return TranslationBase.of(context).home;
return TranslationBase
.of(context)
.home;
case 1:
return TranslationBase.of(context).medicalProfile;
return TranslationBase
.of(context)
.medicalProfile;
case 2:
return TranslationBase.of(context).bookAppo;
return TranslationBase
.of(context)
.bookAppo;
case 5:
return TranslationBase.of(context).bookAppo;
return TranslationBase
.of(context)
.bookAppo;
case 3:
return TranslationBase.of(context).services;
return TranslationBase
.of(context)
.services;
case 4:
return TranslationBase.of(context).bookAppo;
return TranslationBase
.of(context)
.bookAppo;
}
}
@ -563,18 +601,46 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
projectViewModel.analytics.setUser(data);
if (data != null) {
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
authService.getDashboard().then((value) => {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}
}),
});
authService.getDashboard().then((value) =>
{
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}
}),
});
}
sharedPref.getString(IS_COVID_CONSENT_SHOWN).then((value) {
print(value);
if (value == null)
showUserConsent();
});
} else {
projectViewModel.analytics.setUser(null);
}
}
void showUserConsent() {
sharedPref.setString(IS_COVID_CONSENT_SHOWN, "true");
showDialog(
context: context,
builder: (cxt) =>
CovidConsentDialog(
okTitle: TranslationBase
.of(context)
.acceptLbl,
title: TranslationBase
.of(context)
.covidConsentHeader,
message: TranslationBase
.of(context)
.covidConsent,
onTap: () async {
// Navigator.push(context, FadePage(page: CovidDrivethruLocation()));
},
));
}
}

@ -282,7 +282,7 @@ class ServicesView extends StatelessWidget {
context: context,
builder: (cxt) => CovidConsentDialog(
okTitle: TranslationBase.of(context).acceptLbl,
title: "User Consent",
title: TranslationBase.of(context).covidConsentHeader,
message: TranslationBase.of(context).covidConsent,
onTap: () async {
Navigator.push(context, FadePage(page: CovidDrivethruLocation()));

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/video-call-web-page.dart';
import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart';
import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -42,10 +43,10 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
isCameraReady = false;
WidgetsBinding.instance.addPostFrameCallback((_) => _runAnimation());
print(widget.incomingCallData.doctorname);
print(widget.incomingCallData.clinicname);
print(widget.incomingCallData.speciality);
//
// print(widget.incomingCallData.doctorname);
// print(widget.incomingCallData.clinicname);
// print(widget.incomingCallData.speciality);
super.initState();
}
@ -235,6 +236,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
// backToHome();
// final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
await _controller.dispose();
changeCallStatusAPI(4);
await Navigator.of(context).pushReplacement(
MaterialPageRoute(
// fullscreenDialog: true,
@ -262,10 +264,19 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
}
}
void changeCallStatusAPI(int sessionStatus) {
LiveCareService service = new LiveCareService();
service.endCallAPI(widget.incomingCallData.sessionId, sessionStatus, context).then((res) {
}).catchError((err) {
print(err);
});
}
void backToHome() async {
// final connected = await signaling.declineCall(widget.incomingCallData.callerID, widget.incomingCallData.receiverID);
LandingPage.isOpenCallPage = false;
player.stop();
changeCallStatusAPI(3);
Navigator.of(context).pop();
}

@ -218,7 +218,7 @@ class _clinic_listState extends State<ClinicList> {
Future drawOverAppsMessageDialog(BuildContext context) async {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: "Please select 'Dr. Alhabib' from the list and allow draw over app permission to use live care.",
confirmMessage: TranslationBase.of(context).drawOverAppsPermission,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () async {

@ -61,12 +61,12 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
Navigator.pop(context, true);
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber.projectID;
if (widget.selectedPaymentMethod == "ApplePay") {
startApplePay();
} else {
// if (widget.selectedPaymentMethod == "ApplePay") {
// startApplePay();
// } else {
projectViewModel.analytics.advancePayments.payment_otp_confirmation(method: widget.selectedPaymentMethod.toLowerCase(), type: 'wallet');
openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null);
}
// }
});
}
@ -209,13 +209,13 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(model);
});
startApplePay();
// startApplePay();
// if()
// GifLoaderDialogUtils.showMyDialog(context);
// model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) {
// GifLoaderDialogUtils.hideDialog(context);
// if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model);
// });
GifLoaderDialogUtils.showMyDialog(context);
model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model);
});
},
),
),

@ -102,7 +102,7 @@ class _MyInvoicesState extends State<MyInvoices> {
doctor.decimalDoctorRate = listDentalAppointments.decimalDoctorRate;
doctor.doctorID = listDentalAppointments.doctorID;
myInvoicesService.getDentalAppointmentInvoice(listDentalAppointments.projectID, listDentalAppointments.appointmentNo, context).then((res) {
myInvoicesService.getDentalAppointmentInvoice(listDentalAppointments.projectID, listDentalAppointments.appointmentNo, listDentalAppointments.invoiceNo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
if (res['MessageStatus'] == 1) {

@ -2,6 +2,8 @@ import 'dart:async';
import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart';
import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
@ -194,9 +196,18 @@ class OpenTokState extends State<OpenTokConnectCallPage>{
Future<void> _onHangup() async {
print('onHangup');
await openTokPlatform.hangupCall();
endCallAPI();
Navigator.of(context).pop();
}
void endCallAPI() {
LiveCareService service = new LiveCareService();
service.endCallAPI(widget.sessionId, 2, context).then((res) {
}).catchError((err) {
print(err);
});
}
void _onShowBar() {
setState(() {
});

@ -216,7 +216,7 @@ class LiveCareService extends BaseService {
"ClientRequestID": clientRequestID,
"DeviceToken": deviceToken,
"VoipToken": "",
"IsFlutter": true,
// "IsFlutter": true,
"Latitude": await this.sharedPref.getDouble(USER_LAT),
"Longitude": await this.sharedPref.getDouble(USER_LONG),
"DeviceType": Platform.isIOS ? 'iOS' : 'Android',
@ -293,4 +293,24 @@ class LiveCareService extends BaseService {
}, body: request);
return Future.value(localRes);
}
Future<Map> endCallAPI(String sessionID, int sessionStatus, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
request = {"Open_SessionID": sessionID, "SessionStatus": sessionStatus, "SessionEndedBy": "Patient"};
dynamic localRes;
await baseAppClient.post(CHANGE_PATIENT_ER_SESSION, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -47,7 +47,7 @@ class MyInvoicesService extends BaseService {
return Future.value(localRes);
}
Future<Map> getDentalAppointmentInvoice(int projectID, int appoNo, context) async {
Future<Map> getDentalAppointmentInvoice(int projectID, int appoNo, int invoiceNo, context) async {
Map<String, dynamic> request;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
@ -64,6 +64,7 @@ class MyInvoicesService extends BaseService {
"PatientID": authUser.patientID,
"License": true,
"AppointmentNo": appoNo,
"InvoiceNo": invoiceNo,
"IsRegistered": true,
"ProjectID": projectID,
"PatientTypeID": authUser.patientIdentificationType,

@ -24,7 +24,7 @@ class AppPermission{
static Future _drawOverAppsMessageDialog(BuildContext context) async {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: "Please select 'Dr. Alh'abib' from the list and allow draw over app permission to use live care.",
confirmMessage: TranslationBase.of(context).drawOverAppsPermission,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () async {

@ -110,7 +110,7 @@ class AppSharedPreferences {
/// Get Object [key] the key was saved
Future getObject(String key) async {
try {
final SharedPreferences prefs = await _prefs;
final SharedPreferences prefs = await _prefs;
await prefs.reload();
var string = prefs.getString(key);
if (string == null) {

@ -2833,6 +2833,8 @@ class TranslationBase {
String get connectSubtitle => localizedValues["connectSubtitle"][locale.languageCode];
String get declineLbl => localizedValues["declineLbl"][locale.languageCode];
String get covidConsent => localizedValues["covidConsent"][locale.languageCode];
String get covidConsentHeader => localizedValues["covidConsentHeader"][locale.languageCode];
String get drawOverAppsPermission => localizedValues["drawOverAppsPermission"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -31,7 +31,7 @@ class CovidConsentDialog extends StatelessWidget {
padding: const EdgeInsets.only(top: 16.0),
child: Text(
title ?? TranslationBase.of(context).confirm,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96),
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96),
),
),
),
@ -48,7 +48,7 @@ class CovidConsentDialog extends StatelessWidget {
),
Text(
message,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48),
),
SizedBox(height: 28),
Row(

@ -31,13 +31,13 @@ class MyInAppBrowser extends InAppBrowser {
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';

@ -2,7 +2,7 @@ name: diplomaticquarterapp
description: A new Flutter application.
version: 4.3.5+1
version: 4.4.0+1
environment:
sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save