From f50bfda330c50fac3076df1ffec0d89b4676ae93 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 12 Jun 2022 11:42:46 +0300 Subject: [PATCH 01/20] updates --- lib/analytics/flows/login_registration.dart | 7 +++++++ lib/analytics/google-analytics.dart | 2 +- lib/pages/BookAppointment/BookSuccess.dart | 2 +- lib/pages/ToDoList/ToDo.dart | 2 +- lib/pages/livecare/widgets/clinic_list.dart | 2 +- lib/pages/login/login.dart | 2 +- lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/analytics/flows/login_registration.dart b/lib/analytics/flows/login_registration.dart index 3a2894a4..aee26a5e 100644 --- a/lib/analytics/flows/login_registration.dart +++ b/lib/analytics/flows/login_registration.dart @@ -112,6 +112,13 @@ class LoginRegistration{ }); } + login_fail({@required String method, error}){ + logger('login_unsuccessful', parameters: { + 'login_method' : method, + 'error': error + }); + } + // R013 recover_file_number(){ logger('recover_file_number'); diff --git a/lib/analytics/google-analytics.dart b/lib/analytics/google-analytics.dart index 081bd29e..a8252051 100644 --- a/lib/analytics/google-analytics.dart +++ b/lib/analytics/google-analytics.dart @@ -27,7 +27,7 @@ typedef GALogger = Function(String name, {Map parameters}); var _analytics = FirebaseAnalytics(); _logger(String name, {Map parameters}) async { - return; + // return; if (name != null && name.isNotEmpty) { if (name.contains(' ')) name = name.replaceAll(' ', '_'); diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 693f98e9..f32dba0a 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -538,7 +538,7 @@ class _BookSuccessState extends State { setState(() {}); }))).then((value) { if (value != null) { - projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value, payment_type: 'appointment'); + projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment'); openPayment(value, authUser, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); } }); diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 5dacf8db..6bca1ad9 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -959,7 +959,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { if (value != null) { final appType = appo.isLiveCareAppointment ? 'livecare' : 'regular'; - projectViewModel.analytics.appointment.payment_method(appointment_type: appType, clinic: appo.clinicName, payment_method: value, payment_type: 'appointment'); + projectViewModel.analytics.appointment.payment_method(appointment_type: appType, clinic: appo.clinicName, payment_method: value[0], payment_type: 'appointment'); openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); } }); diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 1b2b4384..248fda75 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -290,7 +290,7 @@ class _clinic_listState extends State { }))).then((value) { print(value); if (value != null) { - projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value, payment_type: 'appointment'); + projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment'); openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo); } }); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 84a16f15..4a6efc5a 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -282,6 +282,7 @@ class _Login extends State { }, cancelFunction: () => {}); dialog.showAlertDialog(context); + projectViewModel.analytics.loginRegistration.login_fail(method: this.loginType == 1 ? "national id" : "file number", error: err.toString()); }); } @@ -381,6 +382,5 @@ class _Login extends State { // setState(() { // nationalIDorFile.text = voipToken; // }); - } } diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart index d6e0a071..4ca87644 100644 --- a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart +++ b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart @@ -404,7 +404,7 @@ class Signaling { 'to': session.remote_user?.id, 'from': session.local_user.id, 'candidate': { - 'sdpMLineIndex': candidate.sdpMlineIndex, + 'sdpMLineIndex': candidate.sdpMLineIndex, 'sdpMid': candidate.sdpMid, 'candidate': candidate.candidate, }, From 1523fd5ade09c047a26b4e64b8e2af41f27adb06 Mon Sep 17 00:00:00 2001 From: Zohaib Iqbal Kambrani <> Date: Sun, 12 Jun 2022 16:26:05 +0300 Subject: [PATCH 02/20] Analytics for login registration --- lib/analytics/flows/login_registration.dart | 57 +++++++++++++------ lib/pages/login/confirm-login.dart | 15 +++-- lib/pages/login/login-type.dart | 2 + lib/pages/login/login.dart | 3 +- lib/pages/login/register.dart | 3 + .../webrtc/signaling.dart | 2 +- 6 files changed, 58 insertions(+), 24 deletions(-) diff --git a/lib/analytics/flows/login_registration.dart b/lib/analytics/flows/login_registration.dart index aee26a5e..4134e9fd 100644 --- a/lib/analytics/flows/login_registration.dart +++ b/lib/analytics/flows/login_registration.dart @@ -3,6 +3,8 @@ import 'package:flutter/cupertino.dart'; import '../google-analytics.dart'; class LoginRegistration{ + static int loginMethod; + static int verificationMethod; final GALogger logger; LoginRegistration(this.logger); @@ -66,20 +68,29 @@ class LoginRegistration{ } // R011:login_verify_otp | R009:registration_verification_option - verify_otp_method({@required int method, bool forRegistration = false}){ - var verification_method = ''; - if(method == 1) verification_method = 'sms'; - if(method == 2) verification_method = 'fingerprint'; - if(method == 3) verification_method = 'face id'; - if(method == 4) verification_method = 'whatsapp'; - + verify_otp_method({bool forRegistration = false}){ if(forRegistration == false) logger("login_verify_otp", parameters: { - 'login_method' : verification_method + 'login_method' : _getLoginMethod(), + 'verification_method' : _getVerificationMethod(), }); else logger("registration_verification_option", parameters: { - 'verification_method' : verification_method + 'verification_method' : _getVerificationMethod() + }); + } + + // R011:login_verify_otp | R009:registration_verification_option + login_verfication({bool forRegistration = false}){ + if(forRegistration == false) + logger("login_verfication", parameters: { + 'login_method' : _getLoginMethod(), + 'verification_method' : _getVerificationMethod(), + }); + else + logger("login_varification_register", parameters: { + 'login_method' : _getLoginMethod(), + 'verification_method' : _getVerificationMethod(), }); } @@ -94,14 +105,9 @@ class LoginRegistration{ } // R012.1, R014.1 - login_successful({@required int method}){ - var verification_method = ''; - if(method == 1) verification_method = 'sms'; - if(method == 2) verification_method = 'fingerprint'; - if(method == 3) verification_method = 'face id'; - if(method == 4) verification_method = 'whatsapp'; + login_successful(){ logger('login_successful', parameters: { - 'login_method' : verification_method + 'login_method' : _getVerificationMethod() }); } @@ -112,9 +118,9 @@ class LoginRegistration{ }); } - login_fail({@required String method, error}){ + login_fail({error}){ logger('login_unsuccessful', parameters: { - 'login_method' : method, + 'login_method' : loginMethod, 'error': error }); } @@ -128,4 +134,19 @@ class LoginRegistration{ login_with_other_account(){ logger('login_with_other_account'); } + + + _getLoginMethod(){ + if(loginMethod == 1) return 'national id'; + if(loginMethod == 2) return 'file number'; + return 'otp'; + } + + String _getVerificationMethod(){ + if(verificationMethod == 1) return 'sms'; + if(verificationMethod == 2) return 'fingerprint'; + if(verificationMethod == 3) return 'face id'; + if(verificationMethod == 4) return 'whatsapp'; + return "unknown"; + } } \ No newline at end of file diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index bde675ad..b4cd9659 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; @@ -308,6 +309,9 @@ class _ConfirmLogin extends State { this.selectedOption = fingrePrintBefore != null ? fingrePrintBefore : type; login_method = type; + LoginRegistration.verificationMethod = type; + projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration); + switch (type) { case 1: this.loginWithSMS(type); @@ -579,11 +583,12 @@ class _ConfirmLogin extends State { else { // Navigator.of(context).pop(), - projectViewModel.analytics.errorTracking.log('otp_verification_at_confirm_login', error: result), GifLoaderDialogUtils.hideDialog(context), Future.delayed(Duration(seconds: 1), () { AppToast.showErrorToast(message: result); }), + projectViewModel.analytics.loginRegistration.login_fail(error: result), + projectViewModel.analytics.errorTracking.log('otp_verification_at_confirm_login', error: result), } }) .catchError((err) { @@ -609,7 +614,7 @@ class _ConfirmLogin extends State { } else { - projectViewModel.analytics.loginRegistration.login_successful(method: login_method), + projectViewModel.analytics.loginRegistration.login_successful(), sharedPref.remove(FAMILY_FILE), result.list.isFamily = false, userData = result.list, @@ -629,10 +634,12 @@ class _ConfirmLogin extends State { // Navigator.of(context).pop(), GifLoaderDialogUtils.hideDialog(context), Future.delayed(Duration(seconds: 1), () { - projectViewModel.analytics.errorTracking.log('otp_verification_at_confirm_login', error: result); AppToast.showErrorToast(message: result); startSMSService(tempType); }), + + projectViewModel.analytics.loginRegistration.login_fail(error: result), + projectViewModel.analytics.errorTracking.log('otp_verification_at_confirm_login', error: result) } }) .catchError((err) { @@ -728,8 +735,8 @@ class _ConfirmLogin extends State { isMoreOption = true; }); } else { - projectViewModel.analytics.loginRegistration.verify_otp_method(method: _flag, forRegistration: widget.fromRegistration); authenticateUser(_flag, isActive: _loginIndex); + projectViewModel.analytics.loginRegistration.verify_otp_method(forRegistration: widget.fromRegistration); } }, child: Container( diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart index af461044..8c584f7b 100644 --- a/lib/pages/login/login-type.dart +++ b/lib/pages/login/login-type.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/locator.dart'; @@ -241,6 +242,7 @@ class LoginType extends StatelessWidget { onTap: () { LoginType.loginType = _flag; locator().loginRegistration.login_start(method: type); + LoginRegistration.loginMethod = _flag; Navigator.of(_context).push(FadePage(page: Login())); }, child: Container( diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 4a6efc5a..b504c77d 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -30,6 +30,7 @@ import 'package:flutter/rendering.dart'; import 'package:provider/provider.dart'; class Login extends StatefulWidget { + @override _Login createState() => _Login(); } @@ -282,7 +283,7 @@ class _Login extends State { }, cancelFunction: () => {}); dialog.showAlertDialog(context); - projectViewModel.analytics.loginRegistration.login_fail(method: this.loginType == 1 ? "national id" : "file number", error: err.toString()); + projectViewModel.analytics.loginRegistration.login_fail(error: err.toString()); }); } diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index 9e771f14..688a9fb3 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -1,6 +1,8 @@ +import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; @@ -341,6 +343,7 @@ class _Register extends State { okFunction: () { AlertDialogBox.closeAlertDialog(context); sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest); + LoginRegistration.loginMethod = 1; // 1=NationalID, by default from Registration Navigator.of(context).push(FadePage(page: Login())); }, cancelFunction: () {}) diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart index 4ca87644..d6e0a071 100644 --- a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart +++ b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart @@ -404,7 +404,7 @@ class Signaling { 'to': session.remote_user?.id, 'from': session.local_user.id, 'candidate': { - 'sdpMLineIndex': candidate.sdpMLineIndex, + 'sdpMLineIndex': candidate.sdpMlineIndex, 'sdpMid': candidate.sdpMid, 'candidate': candidate.candidate, }, From 1c6a62776c3ba73b28559e60fc1a9e9d5d5b01de Mon Sep 17 00:00:00 2001 From: Zohaib Iqbal Kambrani <> Date: Sun, 12 Jun 2022 16:49:37 +0300 Subject: [PATCH 03/20] Analytics statements align to bottom of block --- lib/pages/BookAppointment/BookConfirm.dart | 9 ++-- lib/pages/BookAppointment/BookSuccess.dart | 8 ++-- lib/pages/BookAppointment/DoctorProfile.dart | 4 +- .../BookAppointment/book_reminder_page.dart | 4 +- .../components/DocAvailableAppointments.dart | 2 +- .../components/SearchByClinic.dart | 2 +- .../components/SearchByDoctor.dart | 2 +- .../widgets/reminder_dialog.dart | 2 +- .../MyAppointments/AppointmentDetails.dart | 4 +- lib/pages/MyAppointments/SchedulePage.dart | 2 +- .../widgets/AppointmentActions.dart | 24 +++++------ lib/pages/ToDoList/ToDo.dart | 13 +++--- .../fragments/home_page_fragment2.dart | 4 +- lib/pages/landing/landing_page.dart | 7 ++-- lib/pages/landing/widgets/services_view.dart | 42 +++++++++---------- .../livecare/live_care_payment_page.dart | 2 +- lib/pages/livecare/livecare_type_select.dart | 4 +- lib/pages/livecare/widgets/clinic_card.dart | 4 +- lib/pages/livecare/widgets/clinic_list.dart | 6 +-- lib/pages/login/confirm-login.dart | 4 +- lib/pages/login/forgot-password.dart | 2 +- lib/pages/login/login-type.dart | 6 +-- lib/pages/login/register.dart | 2 +- lib/pages/login/welcome.dart | 4 +- .../medical/balance/advance_payment_page.dart | 5 +-- .../medical/balance/confirm_payment_page.dart | 2 +- .../medical/balance/my_balance_page.dart | 2 +- lib/pages/paymentService/payment_service.dart | 6 +-- lib/widgets/drawer/app_drawer_widget.dart | 8 ++-- 29 files changed, 94 insertions(+), 92 deletions(-) diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 706a51d9..49404c6d 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -271,19 +271,18 @@ class _BookConfirmState extends State { insertAppointment(context, DoctorList docObject, int initialSlotDuration) { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; - projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); GifLoaderDialogUtils.showMyDialog(context); AppoitmentAllHistoryResultList appo; widget.service.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, null, null, null, projectViewModel).then((res) { if (res['MessageStatus'] == 1) { - projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); Future.delayed(new Duration(milliseconds: 500), () { getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject); getToDoCount(); }); + projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); } else { GifLoaderDialogUtils.hideDialog(context); appo = new AppoitmentAllHistoryResultList(); @@ -312,17 +311,16 @@ class _BookConfirmState extends State { AppToast.showErrorToast(message: err); print(err); }); + projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); } insertLiveCareScheduledAppointment(context, DoctorList docObject) { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; - projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor); GifLoaderDialogUtils.showMyDialog(context); AppoitmentAllHistoryResultList appo; widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) { if (res['MessageStatus'] == 1) { - projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); print(res['AppointmentNo']); @@ -330,6 +328,7 @@ class _BookConfirmState extends State { getLiveCareAppointmentPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject); getToDoCount(); }); + projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor); } else { GifLoaderDialogUtils.hideDialog(context); appo = new AppoitmentAllHistoryResultList(); @@ -358,6 +357,8 @@ class _BookConfirmState extends State { AppToast.showErrorToast(message: err); print(err); }); + + projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor); } getToDoCount() { diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index f32dba0a..5132f118 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -198,8 +198,8 @@ class _BookSuccessState extends State { disabledTextColor: Colors.white, disabledColor: new Color(0xFFbcc2c4), onPressed: () { - projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true); startPaymentProcess(); + projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true); }, child: Text(TranslationBase.of(context).payNow.toUpperCase(), style: TextStyle(fontSize: 18.0)), ), @@ -220,8 +220,8 @@ class _BookSuccessState extends State { disabledTextColor: Colors.white, disabledColor: new Color(0xFFbcc2c4), onPressed: () { - projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false); navigateToHome(context); + projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false); }, child: Text(TranslationBase.of(context).payLater.toUpperCase(), style: TextStyle(fontSize: 18.0)), ), @@ -538,8 +538,8 @@ class _BookSuccessState extends State { setState(() {}); }))).then((value) { if (value != null) { - projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment'); openPayment(value, authUser, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment'); } }); } @@ -604,9 +604,9 @@ class _BookSuccessState extends State { String amount = res['Amount']; String payment_method = res['PaymentMethod']; final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; + createAdvancePayment(res, appo); projectViewModel.analytics.appointment.payment_success( appointment_type: 'regular', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref); - createAdvancePayment(res, appo); } else { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: res['Response_Message']); diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index eea41c4d..9b0bdae3 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -127,7 +127,6 @@ class _DoctorProfileState extends State with TickerProviderStateM showConfirmMessageDialog: false, isNeedToShowButton: !widget.isLiveCareAppointment, onTap: () { - projectViewModel.analytics.appointment.book_appointment_schedule(appointment_type: 'regular', doctor: widget.doctor); Navigator.push( context, FadePage( @@ -142,6 +141,7 @@ class _DoctorProfileState extends State with TickerProviderStateM this.doctorSchedule = value; }); }); + projectViewModel.analytics.appointment.book_appointment_schedule(appointment_type: 'regular', doctor: widget.doctor); }, onRatingAndReviewTap: () { getDoctorRatingsDetails(); @@ -497,8 +497,8 @@ class _DoctorProfileState extends State with TickerProviderStateM if (DocAvailableAppointments.areSlotsAvailable) { if (await sharedPref.getObject(USER_PROFILE) != null) { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; - projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); navigateToBookConfirm(context); + projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); } else { ConfirmDialog dialog = new ConfirmDialog( context: context, diff --git a/lib/pages/BookAppointment/book_reminder_page.dart b/lib/pages/BookAppointment/book_reminder_page.dart index 8085976c..e7971423 100644 --- a/lib/pages/BookAppointment/book_reminder_page.dart +++ b/lib/pages/BookAppointment/book_reminder_page.dart @@ -175,8 +175,8 @@ class _BookReminderPageState extends State { disabledTextColor: Colors.white, disabledColor: new Color(0xFFEAEAEA), onPressed: () { - projectViewModel.analytics.appointment.appointment_reminder(false); navigateToBookSuccess(context); + projectViewModel.analytics.appointment.appointment_reminder(false); }, child: Text(TranslationBase.of(context).no, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)), ), @@ -197,7 +197,6 @@ class _BookReminderPageState extends State { disabledTextColor: Colors.white, disabledColor: CustomColors.green, onPressed: () async { - projectViewModel.analytics.appointment.appointment_reminder(true); print(widget.patientShareResponse.appointmentNo); showReminderDialog( context, @@ -211,6 +210,7 @@ class _BookReminderPageState extends State { navigateToBookSuccess(context); }, ); + projectViewModel.analytics.appointment.appointment_reminder(true); }, child: Text(TranslationBase.of(context).yes, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)), ), diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index d7d78d89..89a2a587 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -262,13 +262,13 @@ class _DocAvailableAppointmentsState extends State wit onPressed: () { final timeslot = dayEvents[index]; DocAvailableAppointments.selectedAppoDateTime = timeslot.end; - projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); setState(() { selectedButtonIndex = index; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; print(DocAvailableAppointments.selectedTime); }); + projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); }, child: Text(dayEvents[index].isoTime, style: TextStyle(fontSize: 12.0)), ); diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 1b8641a0..8c11386a 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -230,7 +230,6 @@ class _SearchByClinicState extends State { onTap: () { showClickListDialog(context, clinicsList, onSelection: (ListClinicCentralized clincs) { selectedClinic = clincs; - projectViewModel.analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription); Navigator.pop(context); setState(() { dropdownTitle = clincs.clinicDescription; @@ -244,6 +243,7 @@ class _SearchByClinicState extends State { } else { } }); + projectViewModel.analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription); }); }, child: Container( diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index 836bae7d..05e0ddc1 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -147,8 +147,8 @@ class _SearchByDoctorState extends State { } _searchDoctor(BuildContext context) { - projectViewModel.analytics.appointment.book_appointment_doctor_search(query: doctorNameController.text); getDoctorsList(context); + projectViewModel.analytics.appointment.book_appointment_doctor_search(query: doctorNameController.text); } navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) { diff --git a/lib/pages/BookAppointment/widgets/reminder_dialog.dart b/lib/pages/BookAppointment/widgets/reminder_dialog.dart index 89ce6699..d3ae44ab 100644 --- a/lib/pages/BookAppointment/widgets/reminder_dialog.dart +++ b/lib/pages/BookAppointment/widgets/reminder_dialog.dart @@ -77,7 +77,6 @@ Future _showReminderDialog(BuildContext context, DateTime dateTime, String text = "2 hours"; } - locator().appointment.appointment_reminder_time(reminde_before: text); if (onMultiDateSuccess == null) { CalendarUtils calendarUtils = await CalendarUtils.getInstance(); calendarUtils @@ -92,6 +91,7 @@ Future _showReminderDialog(BuildContext context, DateTime dateTime, String } else { onMultiDateSuccess(i); } + locator().appointment.appointment_reminder_time(reminde_before: text); }, ), ); diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index d4a1d367..f235c8b1 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -572,9 +572,9 @@ class _AppointmentDetailsState extends State with SingleTick service.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, widget.appo.projectID, widget.appo.isLiveCareAppointment, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { - projectViewModel.analytics.appointment.appointment_details_confirm(appointment: widget.appo); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); Navigator.of(context).pop(); + projectViewModel.analytics.appointment.appointment_details_confirm(appointment: widget.appo); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } @@ -605,7 +605,6 @@ class _AppointmentDetailsState extends State with SingleTick GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service.cancelAppointment(widget.appo, context).then((res) { - projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo); GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { checkIfHasReminder(); @@ -615,6 +614,7 @@ class _AppointmentDetailsState extends State with SingleTick } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } + projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); diff --git a/lib/pages/MyAppointments/SchedulePage.dart b/lib/pages/MyAppointments/SchedulePage.dart index 17cae84e..c84f4760 100644 --- a/lib/pages/MyAppointments/SchedulePage.dart +++ b/lib/pages/MyAppointments/SchedulePage.dart @@ -98,8 +98,8 @@ class _SchedulePageState extends State { itemBuilder: (context, index2) => InkWell( onTap: () { final weekDay = weeks[index][index2]['DayName']; - projectViewModel.analytics.appointment.book_appointment_date_selection(appointment_type: 'regular', day: weekDay, doctor: doctorList); openBookAppointment(weeks[index][index2]); + projectViewModel.analytics.appointment.book_appointment_date_selection(appointment_type: 'regular', day: weekDay, doctor: doctorList); }, child: Row( children: [ diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 34192260..7d9a82ae 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -98,18 +98,17 @@ class _AppointmentActionsState extends State { _handleButtonClicks(AppoDetailsButton, ToDoCountProviderModel model) { switch (AppoDetailsButton.caller) { case "openReschedule": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'reschedule appointment'); widget.tabController.animateTo((widget.tabController.index + 1) % 2); setState(() { widget.enableFooterButton(); }); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'reschedule appointment'); break; case "navigateToProject": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'hospital location'); openMap(double.parse(widget.appo.latitude), double.parse(widget.appo.longitude)); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'hospital location'); break; case "addReminder": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'add reminder'); showReminderDialog( context, DateUtil.convertStringToDate(widget.appo.appointmentDate), @@ -121,45 +120,46 @@ class _AppointmentActionsState extends State { AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); }, ); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'add reminder'); break; case "goToTodoList": // Navigator.of(context).pop(); - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'todo list'); navigateToToDoPage(context, model); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'todo list'); break; case "askDoc": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'ask doctor'); askYourDoc(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'ask doctor'); break; case "radiology": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'radiology'); openAppointmentRadiology(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'radiology'); break; case "labResult": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'lab result'); openAppointmentLabResults(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'lab result'); break; case "prescriptions": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'prescriptions'); openPrescriptionReport(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'prescriptions'); break; case "Survey": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey'); rateAppointment(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey'); break; case "Insurance": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance'); navigateToInsuranceApprovals(widget.appo.appointmentNo); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance'); break; case "VitalSigns": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'vital sign'); navigateToVitalSigns(widget.appo.appointmentNo, widget.appo.projectID); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'vital sign'); break; case "insertComplaint": - locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'raise complaint'); navigateToInsertComplaint(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'raise complaint'); break; } } diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 6bca1ad9..657829a8 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -640,11 +640,11 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { } Future navigateToAppointmentDetails(context, AppoitmentAllHistoryResultList appo) async { - projectViewModel.analytics.todoList.to_do_list_more_details(appo); GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'todo list'; Navigator.push(context, FadePage(page: AppointmentDetails(appo: appo, parentIndex: appo.patientStatusType == 42 ? 1 : 0))).then((value) { getPatientAppointmentHistory(); }); + projectViewModel.analytics.todoList.to_do_list_more_details(appo); } getOBGyneOrdersList() { @@ -798,8 +798,8 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { DoctorsListService service = new DoctorsListService(); service.generateAppointmentQR(patientShareResponse, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - projectViewModel.analytics.todoList.to_do_list_check_in(appo); navigateToQR(context, res['AppointmentQR'], patientShareResponse, appo); + projectViewModel.analytics.todoList.to_do_list_check_in(appo); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); @@ -813,7 +813,6 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { } openPaymentDialog(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) { - projectViewModel.analytics.todoList.to_do_list_pay_now(appo); showGeneralDialog( barrierColor: Colors.black.withOpacity(0.5), transitionBuilder: (context, a1, a2, widget) { @@ -833,12 +832,14 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { pageBuilder: (context, animation1, animation2) {}) .then((value) { if (value != null) { - projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo); navigateToPaymentMethod(context, value, appo); + projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo); } else { projectViewModel.analytics.todoList.to_do_list_cancel_payment_details(appo); } }); + + projectViewModel.analytics.todoList.to_do_list_pay_now(appo); } openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) { @@ -959,8 +960,8 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { if (value != null) { final appType = appo.isLiveCareAppointment ? 'livecare' : 'regular'; - projectViewModel.analytics.appointment.payment_method(appointment_type: appType, clinic: appo.clinicName, payment_method: value[0], payment_type: 'appointment'); openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + projectViewModel.analytics.appointment.payment_method(appointment_type: appType, clinic: appo.clinicName, payment_method: value[0], payment_type: 'appointment'); } }); } @@ -971,13 +972,13 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { service.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { - projectViewModel.analytics.todoList.to_do_list_confirm_appointment(appo); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); if (appo.isLiveCareAppointment) { insertLiveCareVIDARequest(appo); } else { getPatientAppointmentHistory(); } + projectViewModel.analytics.todoList.to_do_list_confirm_appointment(appo); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 6828b56f..1be3f6af 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -242,8 +242,8 @@ class _HomePageFragment2State extends State { ), FlatButton( onPressed: () { - projectViewModel.analytics.hmgServices.viewAll(); Navigator.push(context, FadePage(page: AllHabibMedicalSevicePage2())); + projectViewModel.analytics.hmgServices.viewAll(); }, child: Text( TranslationBase.of(context).viewAllServices, @@ -289,10 +289,10 @@ class _HomePageFragment2State extends State { flex: 1, child: InkWell( onTap: () { - projectViewModel.analytics.offerPackages.log(); AuthenticatedUser user = projectViewModel.user; if(projectViewModel.havePrivilege(82) || bypassPrivilageCheck) Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user))); + projectViewModel.analytics.offerPackages.log(); }, child: Stack( children: [ diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 2389e92c..f6450f36 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -170,7 +170,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { } changeCurrentTab(int tab) { - projectViewModel.analytics.bottomTabNavigation.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin); if (!projectViewModel.isLogin) { if (tab == 3) { List imagesInfo = []; @@ -246,6 +245,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { // currentTab = tab; } }); + + projectViewModel.analytics.bottomTabNavigation.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin); } getToDoCount() { @@ -653,8 +654,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { ? FloatingButton( elevation: true, onTap: () { - projectViewModel.analytics.appointment.book_appointment(); changeCurrentTab(2); + projectViewModel.analytics.appointment.book_appointment(); }, ) : null); @@ -685,7 +686,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value)); if (authenticatedUserObject.isLogin) { var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); - projectViewModel.analytics.setUser(data); if (data != null) { authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {}); authService.getDashboard().then((value) => { @@ -699,6 +699,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { }), }); } + projectViewModel.analytics.setUser(data); } else { projectViewModel.analytics.setUser(null); } diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index 9903835f..4f6af3f0 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -60,102 +60,102 @@ class ServicesView extends StatelessWidget { LiveCareHome.isLiveCareTypeSelected = false; }); } else if (index == 1) { - locator().hmgServices.logServiceName('covid-test drive-thru'); showCovidDialog(context); + locator().hmgServices.logServiceName('covid-test drive-thru'); } else if (index == 2) { - locator().hmgServices.logServiceName('online payments'); Navigator.push(context, FadePage(page: PaymentService())); + locator().hmgServices.logServiceName('online payments'); } else if (index == 3) { - locator().hmgServices.logServiceName('home health care'); Navigator.push(context, FadePage(page: HomeHealthCarePage())); + locator().hmgServices.logServiceName('home health care'); } else if (index == 4) { - locator().hmgServices.logServiceName('comprehensive medical checkup'); Navigator.push(context, FadePage(page: CMCPage())); + locator().hmgServices.logServiceName('comprehensive medical checkup'); } else if (index == 5) { - locator().hmgServices.logServiceName('emergency service'); Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + locator().hmgServices.logServiceName('emergency service'); } else if (index == 6) { - locator().hmgServices.logServiceName('e-referral service'); Navigator.push(context, FadePage(page: EReferralPage())); + locator().hmgServices.logServiceName('e-referral service'); } else if (index == 7) { - locator().hmgServices.logServiceName('water consumption'); Navigator.push(context, FadePage(page: H2OPage())); + locator().hmgServices.logServiceName('water consumption'); } else if (index == 8) { - locator().hmgServices.logServiceName('find us reach us'); Navigator.push(context, FadePage(page: ContactUsPage())); + locator().hmgServices.logServiceName('find us reach us'); } else if (index == 9) { - locator().hmgServices.logServiceName('my medical details'); Navigator.push( context, FadePage( page: MedicalProfilePageNew(), ), ); + locator().hmgServices.logServiceName('my medical details'); } else if (index == 10) { - locator().hmgServices.logServiceName('book appointment'); Navigator.push( context, FadePage( page: Search(), ), ); + locator().hmgServices.logServiceName('book appointment'); } else if (index == 11) { - locator().hmgServices.logServiceName('al habib pharmacy'); getPharmacyToken(context); + locator().hmgServices.logServiceName('al habib pharmacy'); } else if (index == 12) { - locator().hmgServices.logServiceName('update insurance'); Navigator.push( context, FadePage( page: InsuranceUpdate(), ), ); + locator().hmgServices.logServiceName('update insurance'); } else if (index == 13) { - locator().hmgServices.logServiceName('my family files'); Navigator.push( context, FadePage( page: MyFamily(), ), ); + locator().hmgServices.logServiceName('my family files'); } else if (index == 14) { - locator().hmgServices.logServiceName('my child vaccines'); Navigator.push( context, FadePage(page: ChildInitialPage()), ); + locator().hmgServices.logServiceName('my child vaccines'); } else if (index == 15) { // Navigator.pop(context); - locator().hmgServices.logServiceName('todo list'); LandingPage.shared.switchToDoFromHMGServices(); + locator().hmgServices.logServiceName('todo list'); } else if (index == 16) { - locator().hmgServices.logServiceName('blood donation'); Navigator.push( context, FadePage(page: BloodDonationPage()), ); + locator().hmgServices.logServiceName('blood donation'); } else if (index == 17) { - locator().hmgServices.logServiceName('health calculator'); Navigator.push( context, FadePage( page: (HealthCalculators()), ), ); + locator().hmgServices.logServiceName('health calculator'); } else if (index == 18) { - locator().hmgServices.logServiceName('heath converters'); Navigator.push( context, FadePage( page: HealthConverter(), ), ); + locator().hmgServices.logServiceName('heath converters'); } else if (index == 19) { - locator().hmgServices.logServiceName('smart watches'); Navigator.push( context, FadePage(page: SmartWatchInstructions()), ); + locator().hmgServices.logServiceName('smart watches'); } else if (index == 20) { locator().hmgServices.logServiceName('car parcking service'); Navigator.push( @@ -165,10 +165,9 @@ class ServicesView extends StatelessWidget { ), ); } else if (index == 21) { - locator().hmgServices.logServiceName('virtual tour'); launch("https://hmgwebservices.com/vt_mobile/html/index.html"); + locator().hmgServices.logServiceName('virtual tour'); } else if (index == 22) { - locator().hmgServices.logServiceName('latest news'); Navigator.of(context).push( MaterialPageRoute( builder: (BuildContext context) => MyWebView( @@ -177,6 +176,7 @@ class ServicesView extends StatelessWidget { ), ), ); + locator().hmgServices.logServiceName('latest news'); } }, child: Container( diff --git a/lib/pages/livecare/live_care_payment_page.dart b/lib/pages/livecare/live_care_payment_page.dart index 4ae09885..3bd667d3 100644 --- a/lib/pages/livecare/live_care_payment_page.dart +++ b/lib/pages/livecare/live_care_payment_page.dart @@ -294,8 +294,8 @@ class _LiveCarePatmentPageState extends State { return false; }); } else { - projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName); Navigator.pop(context, true); + projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName); } } else { openPermissionsDialog(); diff --git a/lib/pages/livecare/livecare_type_select.dart b/lib/pages/livecare/livecare_type_select.dart index 4c350123..4c8fadce 100644 --- a/lib/pages/livecare/livecare_type_select.dart +++ b/lib/pages/livecare/livecare_type_select.dart @@ -114,11 +114,11 @@ class _LiveCareTypeSelectState extends State { return InkWell( onTap: () { if (_loginIndex == 1) { - projectViewModel.analytics.liveCare.livecare_immediate_consultation(); Navigator.pop(context, "immediate"); + projectViewModel.analytics.liveCare.livecare_immediate_consultation(); } else { - projectViewModel.analytics.liveCare.livecare_schedule_video_call(); Navigator.pop(context, "schedule"); + projectViewModel.analytics.liveCare.livecare_schedule_video_call(); } }, child: Container( diff --git a/lib/pages/livecare/widgets/clinic_card.dart b/lib/pages/livecare/widgets/clinic_card.dart index 99fa8610..d6fb745a 100644 --- a/lib/pages/livecare/widgets/clinic_card.dart +++ b/lib/pages/livecare/widgets/clinic_card.dart @@ -164,8 +164,6 @@ class _State extends State { getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) { - locator().liveCare.livecare_clinic_schedule(clinic: patientERGetClinicsList.serviceName); - LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); service.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context).then((res) { @@ -207,5 +205,7 @@ class _State extends State { GifLoaderDialogUtils.hideDialog(context); print(err); }); + + locator().liveCare.livecare_clinic_schedule(clinic: patientERGetClinicsList.serviceName); } } diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 248fda75..7e759853 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -106,7 +106,6 @@ class _clinic_listState extends State { } void startLiveCare() { - projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName); bool isError = false; LiveCareService service = new LiveCareService(); @@ -128,6 +127,7 @@ class _clinic_listState extends State { isError = true; AppToast.showErrorToast(message: err); }); + projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName); } showLiveCareCancelDialog(String msg, res) { @@ -290,8 +290,8 @@ class _clinic_listState extends State { }))).then((value) { print(value); if (value != null) { - projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment'); openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo); + projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment'); } }); } @@ -603,7 +603,6 @@ class _clinic_listState extends State { } void startScheduleLiveCare() { - projectViewModel.analytics.liveCare.livecare_schedule_video_call_clinic(clinic: selectedClinicName); List doctorsList = []; LiveCareService service = new LiveCareService(); @@ -642,6 +641,7 @@ class _clinic_listState extends State { AppToast.showErrorToast(message: err); print(err); }); + projectViewModel.analytics.liveCare.livecare_schedule_video_call_clinic(clinic: selectedClinicName); } Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index b4cd9659..0e79e4c8 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -275,8 +275,8 @@ class _ConfirmLogin extends State { DefaultButton( TranslationBase.of(context).useAnotherAccount, () { - projectViewModel.analytics.loginRegistration.login_with_other_account(); Navigator.of(context).pushNamed(LOGIN_TYPE); + projectViewModel.analytics.loginRegistration.login_with_other_account(); }, ), ], @@ -614,7 +614,6 @@ class _ConfirmLogin extends State { } else { - projectViewModel.analytics.loginRegistration.login_successful(), sharedPref.remove(FAMILY_FILE), result.list.isFamily = false, userData = result.list, @@ -627,6 +626,7 @@ class _ConfirmLogin extends State { sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), sharedPref.setString(TOKEN, result.authenticationTokenID), checkIfUserAgreedBefore(result), + projectViewModel.analytics.loginRegistration.login_successful(), } } else diff --git a/lib/pages/login/forgot-password.dart b/lib/pages/login/forgot-password.dart index 94ce51e5..051313cc 100644 --- a/lib/pages/login/forgot-password.dart +++ b/lib/pages/login/forgot-password.dart @@ -74,8 +74,8 @@ class _ForgotPassword extends State { width: double.infinity, child: FlatButton( onPressed: () { - locator().loginRegistration.recover_file_number(); sendPatientIDBySMS(); + locator().loginRegistration.recover_file_number(); }, child: Text( TranslationBase.of(context).submit, diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart index 8c584f7b..61756ac8 100644 --- a/lib/pages/login/login-type.dart +++ b/lib/pages/login/login-type.dart @@ -64,8 +64,8 @@ class LoginType extends StatelessWidget { text: TranslationBase.of(context).forgotPassword, style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12), recognizer: TapGestureRecognizer()..onTap = () { - locator().loginRegistration.forget_file_number(); Navigator.of(context).push(FadePage(page: ForgotPassword())); + locator().loginRegistration.forget_file_number(); }, ), ), @@ -77,8 +77,8 @@ class LoginType extends StatelessWidget { width: double.infinity, child: FlatButton( onPressed: () { - locator().loginRegistration.register_now(); Navigator.of(context).push(FadePage(page: RegisterNew())); + locator().loginRegistration.register_now(); }, child: Text( TranslationBase.of(context).registerNow, @@ -241,9 +241,9 @@ class LoginType extends StatelessWidget { return InkWell( onTap: () { LoginType.loginType = _flag; - locator().loginRegistration.login_start(method: type); LoginRegistration.loginMethod = _flag; Navigator.of(_context).push(FadePage(page: Login())); + locator().loginRegistration.login_start(method: type); }, child: Container( padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28), diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index 688a9fb3..090f60fb 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -167,8 +167,8 @@ class _Register extends State { child: Padding( padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).next, (){ - locator().loginRegistration.registration_enter_details(); startRegistration(); + locator().loginRegistration.registration_enter_details(); }, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))), ), ], diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart index b4845915..8b9e282f 100644 --- a/lib/pages/login/welcome.dart +++ b/lib/pages/login/welcome.dart @@ -81,8 +81,8 @@ class _WelcomeLogin extends State { child: DefaultButton( TranslationBase.of(context).no, () => { - locator().loginRegistration.visited_alhabib_group(false), Navigator.of(context).push(FadePage(page: RegisterNew())), + locator().loginRegistration.visited_alhabib_group(false), }, color: CustomColors.accentColor, textColor: Colors.white, @@ -93,8 +93,8 @@ class _WelcomeLogin extends State { child: DefaultButton( TranslationBase.of(context).yes, () => { - locator().loginRegistration.visited_alhabib_group(true), Navigator.of(context).push(FadePage(page: LoginType())), + locator().loginRegistration.visited_alhabib_group(true), }, color: CustomColors.green, ), diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index 520dfcef..ae45b3dc 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -316,7 +316,6 @@ class _AdvancePaymentPageState extends State { GifLoaderDialogUtils.showMyDialog(context); - projectViewModel.analytics.advancePayments.wallet_payment_details(); model.getPatientInfoByPatientIDAndMobileNumber(advanceModel).then((value) { GifLoaderDialogUtils.hideDialog(context); if (model.state != ViewState.Error && model.state != ViewState.ErrorLocal) { @@ -332,8 +331,6 @@ class _AdvancePaymentPageState extends State { ), ).then( (value) { - projectViewModel.analytics.advancePayments.payment_method(method: value[0].toString().toLowerCase(), type: 'wallet'); - Navigator.push( context, FadePage( @@ -346,10 +343,12 @@ class _AdvancePaymentPageState extends State { ), ), ); + projectViewModel.analytics.advancePayments.payment_method(method: value[0].toString().toLowerCase(), type: 'wallet'); }, ); } }); + projectViewModel.analytics.advancePayments.wallet_payment_details(); }, color: Color(0xffD02127), textColor: Colors.white, diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index fcb893a2..4d3c7718 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -209,7 +209,6 @@ class _ConfirmPaymentPageState extends State { child: DefaultButton( TranslationBase.of(context).confirm.toUpperCase(), () { - projectViewModel.analytics.advancePayments.payment_confirm(method: widget.selectedPaymentMethod.toLowerCase(), type: 'wallet'); if (widget.advanceModel.fileNumber == projectViewModel.user.patientID.toString()) { openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null); @@ -220,6 +219,7 @@ class _ConfirmPaymentPageState extends State { if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model); }); } + projectViewModel.analytics.advancePayments.payment_confirm(method: widget.selectedPaymentMethod.toLowerCase(), type: 'wallet'); // startApplePay(); // if() diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 70b81b02..a7a6d5d7 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -178,8 +178,8 @@ class MyBalancePage extends StatelessWidget { DefaultButton( TranslationBase.of(context).createAdvancedPayment, () { - projectViewModel.analytics.advancePayments.wallet_recharge(service_type: 'alhabib wallet'); Navigator.push(context, FadePage(page: AdvancePaymentPage())); + projectViewModel.analytics.advancePayments.wallet_recharge(service_type: 'alhabib wallet'); }, ).insideContainer, ], diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index 83dc69bc..da21d7f9 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -59,8 +59,8 @@ class PaymentService extends StatelessWidget { medical.add( InkWell( onTap: () { - projectViewModel.analytics.advancePayments.payment_services(service_type: 'payment service'); Navigator.push(context, FadePage(page: AdvancePaymentPage())); + projectViewModel.analytics.advancePayments.payment_services(service_type: 'payment service'); }, child: MedicalProfileItem( title: TranslationBase.of(context).payment, @@ -76,8 +76,8 @@ class PaymentService extends StatelessWidget { medical.add( InkWell( onTap: () { - projectViewModel.analytics.advancePayments.payment_services(service_type: 'online check-in appointment'); navigateToToDoPage(context); + projectViewModel.analytics.advancePayments.payment_services(service_type: 'online check-in appointment'); }, child: MedicalProfileItem( title: TranslationBase.of(context).onlineCheckIn, @@ -93,8 +93,8 @@ class PaymentService extends StatelessWidget { medical.add( InkWell( onTap: () { - projectViewModel.analytics.advancePayments.payment_services(service_type: 'alhabib wallet'); Navigator.push(context, FadePage(page: MyBalancePage())); + projectViewModel.analytics.advancePayments.payment_services(service_type: 'alhabib wallet'); }, child: MedicalProfileItem( title: TranslationBase.of(context).hmg, diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 72a8dbed..f95241ed 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -404,8 +404,8 @@ class _AppDrawerState extends State { InkWell( child: DrawerItem(TranslationBase.of(context).rateApp, Icons.star, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider), onTap: () { - locator().hamburgerMenu.logMenuItemClick('rate our app'); openAppReviewDialog(); + locator().hamburgerMenu.logMenuItemClick('rate our app'); // if (Platform.isIOS) { // launch("https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978"); // } else { @@ -453,9 +453,9 @@ class _AppDrawerState extends State { InkWell( onTap: () { Navigator.push(context, FadePage(page: CallPage())); - locator().hamburgerMenu.logMenuItemClick('cloud solution logo tap'); GifLoaderDialogUtils.showMyDialog(context); HMGNetworkConnectivity(context).start(); + locator().hamburgerMenu.logMenuItemClick('cloud solution logo tap'); }, child: Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -551,11 +551,9 @@ class _AppDrawerState extends State { } login() async { - locator().hamburgerMenu.logMenuItemClick('login'); var data = await sharedPref.getObject(IMEI_USER_DATA); sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); - locator().loginRegistration.login_register_initiate(); if (data != null) { Navigator.of(context).pushNamed(CONFIRM_LOGIN); } else { @@ -577,6 +575,8 @@ class _AppDrawerState extends State { ); }); } + locator().loginRegistration.login_register_initiate(); + locator().hamburgerMenu.logMenuItemClick('login'); } Future getFamilyFiles() async { From 27c6837f253e3620c3824d3c65387ab736d7c628 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 12 Jun 2022 17:01:24 +0300 Subject: [PATCH 04/20] updates & fixes --- lib/config/config.dart | 6 + lib/config/localized_values.dart | 54 +++-- lib/config/shared_pref_kay.dart | 1 + lib/core/model/er/ErPatientShareModel.dart | 6 +- .../prescriptions/prescription_report.dart | 2 +- .../prescription_report_enh.dart | 2 +- .../service/ancillary_orders_service.dart | 5 + lib/core/service/client/base_app_client.dart | 6 +- lib/core/service/er/EdOnlineServices.dart | 61 ++---- .../medical/prescriptions_view_model.dart | 2 + .../ancillaryOrdersDetails.dart | 50 ++++- lib/pages/Blood/confirm_payment_page.dart | 73 ++----- .../covid-drivethru-location.dart | 110 +++++----- .../ErService/EdOnline/DdServicesPage.dart | 31 +-- .../ErService/EdOnline/EdOnlineNotesPage.dart | 48 +++-- .../EdOnlineSelectedHospitalPage.dart | 190 ++++++++++++------ .../EdOnline/EdPaymentInformationPage.dart | 169 +++++++++++----- lib/pages/ErService/ErOptions.dart | 5 +- .../prescription_items_page.dart | 7 +- .../appointment_services/GetDoctorsList.dart | 93 ++++++++- lib/widgets/in_app_browser/InAppBrowser.dart | 8 +- 21 files changed, 581 insertions(+), 348 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index ac610ee9..c8a48ef8 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -318,6 +318,12 @@ var CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; var HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; +var ER_CREATE_ADVANCE_PAYMENT = + "services/Doctors.svc/REST/ER_CreateAdvancePaymentForClinic"; + +var ER_INSERT_ADVANCE_PAYMENT = + "services/Doctors.svc/REST/ER_InsertEROnlinePaymentDetails"; + var ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index b0c7213f..8223bee6 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -88,7 +88,7 @@ const Map localizedValues = { 'instruction': {'en': 'Instructions', 'ar': 'تعليمات'}, 'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'}, 'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'}, - 'agreeTo': {'en': 'I agree the', 'ar': 'أوافق على'}, + 'agreeTo': {'en': 'I agree to the', 'ar': 'أوافق على'}, 'termsConditoins': {'en': 'Terms and Conditions', 'ar': 'الأحكام والشروط'}, 'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'}, 'changePayment': {'en': 'Change Payment Method', 'ar': 'تغيير آلية الدفع'}, @@ -1385,9 +1385,9 @@ const Map localizedValues = { "ancillary-orders": {"en": "Ancillary Orders", "ar": "الطلبات الاضافية"}, "onlineCheckInAgreement": { "en": - "The online check-in is for non-life threatening situationCall the red crescent (number) or go to the nearest emergency department if there are: signs of stroke or heart attack history of seizure or syncope there is limb or life threatening injury picture of severe injuries​", + "The online check-in is for non-life threatening situation. Call the red crescent (number) or go to the nearest emergency department if there are: \n\nsigns of stroke or heart attack \nhistory of seizure or syncope \nthere is limb or life threatening injury \npicture of severe injuries", "ar": - "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" + "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" }, "MRN": {"en": "MRN", "ar": "رقم الملف الطبي"}, "appointment-date": {"en": "Appointment Date", "ar": "تاريخ الموعد"}, @@ -1803,17 +1803,45 @@ const Map localizedValues = { "تتيح لك ميزة اختبار كوفيد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": "الرجاء السماح لتطبيق مجموعة الحبيب الطبية للظهورعلى سطح الشاشة عند استلام الاتصال من الطبيب لخدمة اللايف كير"}, - "cameraPermissionDialog": { "en": "Dr. Al Habib app needs to access Camera to enable virtual consultation between patient & doctor, attach images and scan QR for parking service.", "ar": "يحتاج تطبيق دكتور الحبيب الى صلاحية الوصول إلى الكاميرا لخدمة الاستشارة الافتراضية بين المريض والطبيب وإرفاق الصور ومسح رمز الاستجابة السريع لخدمة مواقف السيارات." }, - "galleryPermission": { "en": "Dr. Al Habib app needs to access Read & write external storage to upload images & documents in the E-Referral module and renew and update the insurance cards.", "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول إلى معرض الصور وذلك لتحميل الصور والمستندات لخدمة الإحالة الإلكترونية وكذلك لخدمة تجديد بطاقات التأمين وتحديثها." }, - "locationPermissionDialog": { "en": "Dr. Al Habib app collects location data to show the nearest HMG hospitals and ER Locations and provides health care services to your location and Health weather indicators service and the medication delivery.", "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الموقع لإظهار أقرب مستشفيات المجموعة، مواقع الطوارئ، تقديم خدمات الرعاية الصحية إلى موقعك، خدمة مؤشرات الطقس الصحية وكذلك خدمة توصيل الأدوية." }, - "calendarPermission": { "en": "Dr. Al Habib app collects calendar data to modify and set reminders for Appointments", "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى التقويم وذلك لاضافة تذكيرات بالمواعيد في التقويم." }, - "recordAudioPermission": { "en": "Dr. Al Habib app needs audio permission to enable voice command features.", "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الصوت لتفعيل خدمة الأوامر الصوتية." }, - "wifiPermission": { "en": "Dr. Al Habib app needs to access WiFi state permission to connect to the HMG WiFi network from within the app when you visit the hospital.", "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى الواي فاي للاتصال بشبكة الواي فاي في المجموعة عند زيارة المستشفى." }, - "physicalActivityPermission": { "en": "Dr. Al Habib app collects physical activity data to read heart rate, steps & distance from your smartwatch & send it to your doctor.", "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى بيانات النشاط البدني لقراءة معدل ضربات القلب والخطوات والمسافة من ساعتك الذكية وتحميلها على ملفك الطبي حتى يتمكن الطبيب من الاطلاع عليها." }, - "bluetoothPermission": { "en": "Dr. Al Habib app needs to access Bluetooth permission to connect blood pressure & blood sugar devices with the app to analyze the data", "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": "الرجاء السماح لتطبيق مجموعة الحبيب الطبية للظهورعلى سطح الشاشة عند استلام الاتصال من الطبيب لخدمة اللايف كير" + }, + "cameraPermissionDialog": { + "en": "Dr. Al Habib app needs to access Camera to enable virtual consultation between patient & doctor, attach images and scan QR for parking service.", + "ar": "يحتاج تطبيق دكتور الحبيب الى صلاحية الوصول إلى الكاميرا لخدمة الاستشارة الافتراضية بين المريض والطبيب وإرفاق الصور ومسح رمز الاستجابة السريع لخدمة مواقف السيارات." + }, + "galleryPermission": { + "en": "Dr. Al Habib app needs to access Read & write external storage to upload images & documents in the E-Referral module and renew and update the insurance cards.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول إلى معرض الصور وذلك لتحميل الصور والمستندات لخدمة الإحالة الإلكترونية وكذلك لخدمة تجديد بطاقات التأمين وتحديثها." + }, + "locationPermissionDialog": { + "en": + "Dr. Al Habib app collects location data to show the nearest HMG hospitals and ER Locations and provides health care services to your location and Health weather indicators service and the medication delivery.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الموقع لإظهار أقرب مستشفيات المجموعة، مواقع الطوارئ، تقديم خدمات الرعاية الصحية إلى موقعك، خدمة مؤشرات الطقس الصحية وكذلك خدمة توصيل الأدوية." + }, + "calendarPermission": { + "en": "Dr. Al Habib app collects calendar data to modify and set reminders for Appointments", + "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى التقويم وذلك لاضافة تذكيرات بالمواعيد في التقويم." + }, + "recordAudioPermission": { + "en": "Dr. Al Habib app needs audio permission to enable voice command features.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الصوت لتفعيل خدمة الأوامر الصوتية." + }, + "wifiPermission": { + "en": "Dr. Al Habib app needs to access WiFi state permission to connect to the HMG WiFi network from within the app when you visit the hospital.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى الواي فاي للاتصال بشبكة الواي فاي في المجموعة عند زيارة المستشفى." + }, + "physicalActivityPermission": { + "en": "Dr. Al Habib app collects physical activity data to read heart rate, steps & distance from your smartwatch & send it to your doctor.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى بيانات النشاط البدني لقراءة معدل ضربات القلب والخطوات والمسافة من ساعتك الذكية وتحميلها على ملفك الطبي حتى يتمكن الطبيب من الاطلاع عليها." + }, + "bluetoothPermission": { + "en": "Dr. Al Habib app needs to access Bluetooth permission to connect blood pressure & blood sugar devices with the app to analyze the data", + "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى البلوتوث لربط أجهزة ضغط الدم وسكر الدم بالتطبيق لتحليل البيانات وتحميلها على ملفك الطبي حتى يتمكن الطبيب من الاطلاع عليها." + }, "privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"}, "termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"}, "prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."}, - "liveCarePermissions": {"en": "LiveCare required Camera & Microphone permissions, Please allow these to proceed.", "ar": "هذه العيادة لا تدعم خدمة إعادة التعبئة والتسليم."}, + "liveCarePermissions": {"en": "LiveCare requires Camera & Microphone permissions, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون ، يرجى السماح لها بالمتابعة."}, }; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index d5fb7e3b..8ae7e20b 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -7,6 +7,7 @@ const REGISTER_DATA_FOR_REGISTER = 'register-data-for-register'; const LOGIN_TOKEN_ID = 'register-data-for-register'; const REGISTER_DATA_FOR_LOGIIN = 'register-data-for-login'; const LAST_LOGIN = 'last-login'; +const ER_CHECKIN_RISK_SCORE = 'er-checkin-risk-score'; const ONLY_SMS = 'only-sms'; const AUTH_DATA = 'auth-data'; const IMEI_USER_DATA = 'imei-user-data'; diff --git a/lib/core/model/er/ErPatientShareModel.dart b/lib/core/model/er/ErPatientShareModel.dart index 4c6a4165..09e54de9 100644 --- a/lib/core/model/er/ErPatientShareModel.dart +++ b/lib/core/model/er/ErPatientShareModel.dart @@ -10,9 +10,9 @@ class ErPatientShareModel { dynamic insurancePolicyNo; String message; dynamic patientCardID; - double patientShare; - double patientShareWithTax; - double patientTaxAmount; + num patientShare; + num patientShareWithTax; + num patientTaxAmount; int policyId; String policyName; String procedureName; diff --git a/lib/core/model/prescriptions/prescription_report.dart b/lib/core/model/prescriptions/prescription_report.dart index c521bede..3eb30825 100644 --- a/lib/core/model/prescriptions/prescription_report.dart +++ b/lib/core/model/prescriptions/prescription_report.dart @@ -7,7 +7,7 @@ class PrescriptionReport { String companyName; int days; String doctorName; - var doseDailyQuantity; + num doseDailyQuantity; String frequency; int frequencyNumber; String image; diff --git a/lib/core/model/prescriptions/prescription_report_enh.dart b/lib/core/model/prescriptions/prescription_report_enh.dart index 01a34c47..a43c56b2 100644 --- a/lib/core/model/prescriptions/prescription_report_enh.dart +++ b/lib/core/model/prescriptions/prescription_report_enh.dart @@ -5,7 +5,7 @@ class PrescriptionReportEnh { Null companyName; int days; String doctorName; - int doseDailyQuantity; + num doseDailyQuantity; String frequency; int frequencyNumber; Null image; diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart index c068ad3e..36cac50e 100644 --- a/lib/core/service/ancillary_orders_service.dart +++ b/lib/core/service/ancillary_orders_service.dart @@ -10,6 +10,11 @@ class AncillaryOrdersService extends BaseService { List get ancillaryProcLists => _ancillaryProcLists; + String _insuranceCompanyName = ""; + String get insuranceCompanyName => _insuranceCompanyName; + String _insurancePolicyNumber = ""; + String get insurancePolicyNumber => _insurancePolicyNumber; + Future getOrders() async { Map body = Map(); diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 50370b52..cc570bd1 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -132,7 +132,7 @@ class BaseAppClient { // body['IdentificationNo'] = 2076117163; // body['MobileNo'] = "966503109207"; - // body['PatientID'] = 50121262; //3844083 + // body['PatientID'] = 1018977; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 @@ -141,11 +141,11 @@ class BaseAppClient { body.removeWhere((key, value) => key == null || value == null); - if (BASE_URL == "https://uat.hmgwebservices.com/") { + // if (BASE_URL == "https://uat.hmgwebservices.com/") { print("URL : $url"); final jsonBody = json.encode(body); print(jsonBody); - } + // } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); diff --git a/lib/core/service/er/EdOnlineServices.dart b/lib/core/service/er/EdOnlineServices.dart index 2df92d8a..12585e4c 100644 --- a/lib/core/service/er/EdOnlineServices.dart +++ b/lib/core/service/er/EdOnlineServices.dart @@ -1,19 +1,21 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/er/ErPatientShareModel.dart'; import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/cupertino.dart'; class EdOnlineServices extends BaseService { List triageQuestionsModelList = List(); ErPatientShareModel erPatientShareModel; Future getQuestions() async { - hasError =false; + hasError = false; triageQuestionsModelList.clear(); Map body = Map(); body['ProjectID'] = 15; - await baseAppClient.post(ER_GET_VISUAL_TRIAGE_QUESTIONS, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(ER_GET_VISUAL_TRIAGE_QUESTIONS, onSuccess: (dynamic response, int statusCode) { triageQuestionsModelList.clear(); response['ER_TriageQuestionsList'].forEach((questions) { triageQuestionsModelList.add(TriageQuestionsModel.fromJson(questions)); @@ -24,26 +26,19 @@ class EdOnlineServices extends BaseService { }, body: body); } - Future getPatientPaymentInformation({var id}) async { - hasError =false; - await baseAppClient.post(ER_GetPatientPaymentInformationForERClinic, - onSuccess: (dynamic response, int statusCode) { - erPatientShareModel = - ErPatientShareModel.fromJson(response['ER_PatientShare']); + hasError = false; + await baseAppClient.post(ER_GetPatientPaymentInformationForERClinic, onSuccess: (dynamic response, int statusCode) { + erPatientShareModel = ErPatientShareModel.fromJson(response['ER_PatientShare']); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: Map.from({"ProjectID":15,"ClinicID":10})); + }, body: Map.from({"ProjectID": 15, "ClinicID": 10})); } - Future saveQuestionsInformation( - {String notes, - String chiefComplaint, - int projectId, - DateTime selectedTime, - List selectedQuestions}) async { - hasError =false; + Future saveQuestionsInformation({String notes, String chiefComplaint, int projectId, DateTime selectedTime, List selectedQuestions}) async { + AppSharedPreferences sharedPref = AppSharedPreferences(); + hasError = false; Map body = Map(); List checklist = List(); @@ -53,27 +48,15 @@ class EdOnlineServices extends BaseService { if (user.age > 14) { selectedQuestions.forEach((element) { - int score = int.parse(element.adultPoints); + int score = int.parse((element.adultPoints != "" ? element.adultPoints : "0")); riskScore += score; - checklist.add(Map.from({ - "IsSelected": 1, - "ParameterCode": element.parameterCode, - "ParameterGroup": element.parameterGroup, - "ParameterType": element.parameterType, - "Score": score - })); + checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score})); }); } else { selectedQuestions.forEach((element) { int score = int.parse(element.pediaPoints); riskScore += score; - checklist.add(Map.from({ - "IsSelected": 1, - "ParameterCode": element.parameterCode, - "ParameterGroup": element.parameterGroup, - "ParameterType": element.parameterType, - "Score": score - })); + checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score})); }); } @@ -81,16 +64,16 @@ class EdOnlineServices extends BaseService { "Notes": notes, "ChiefComplaint": chiefComplaint, "PatientId": user.patientID, - "ProjectId": 15, + "ProjectId": projectId, "RiskScore": riskScore, "checklist": checklist.map((e) => e).toList() }; - await baseAppClient.post(ER_SAVE_TRIAGE_INFORMATION, - onSuccess: (dynamic response, int statusCode) {}, - onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + sharedPref.setInt(ER_CHECKIN_RISK_SCORE, riskScore); + + await baseAppClient.post(ER_SAVE_TRIAGE_INFORMATION, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); } } diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart index dd1030c6..98a5b1b7 100644 --- a/lib/core/viewModels/medical/prescriptions_view_model.dart +++ b/lib/core/viewModels/medical/prescriptions_view_model.dart @@ -24,6 +24,8 @@ class PrescriptionsViewModel extends BaseViewModel { List get prescriptionReportList => _prescriptionsService.prescriptionReportList; + + List get prescriptionReportListINP => _prescriptionsService.prescriptionReportListINP; List get prescriptionsList => _prescriptionsService.prescriptionsList; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 5354ff35..1871e1ee 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -280,6 +280,52 @@ class _AnicllaryOrdersState extends State with SingleTic ), ], ), + mWidth(3), + Row( + children: [ + Text( + TranslationBase.of(context).insuranceCompany + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + model.ancillaryListsDetails[0].companyName.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + mWidth(3), + Row( + children: [ + Text( + TranslationBase.of(context).policyNo + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + model.ancillaryListsDetails[0].insurancePolicyNo.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), ], ), ), @@ -504,7 +550,7 @@ class _AnicllaryOrdersState extends State with SingleTic DoctorsListService service = new DoctorsListService(); service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, AppGlobal.context).then((res) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); - showAlertDialog(res['AncillaryOrderInvoiceList'][0]['InvoiceNo']); + showAlertDialog(res['AncillaryOrderInvoiceList'][0]['InvoiceNo'], widget.projectID); }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: err); @@ -512,7 +558,7 @@ class _AnicllaryOrdersState extends State with SingleTic }); } - showAlertDialog(dynamic invoiceNo) { + showAlertDialog(dynamic invoiceNo, dynamic projectID) { AlertDialogBox( context: context, confirmMessage: TranslationBase.of(context).ancillaryOrderPaymentSuccess + invoiceNo.toString(), diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart index 51142817..15056bd0 100644 --- a/lib/pages/Blood/confirm_payment_page.dart +++ b/lib/pages/Blood/confirm_payment_page.dart @@ -32,11 +32,7 @@ class ConfirmPaymentPage extends StatelessWidget { AuthenticatedUser authenticatedUser; AppSharedPreferences sharedPref = AppSharedPreferences(); - ConfirmPaymentPage( - {this.advanceModel, - this.patientInfoAndMobileNumber, - this.selectedPaymentMethod, - this.authenticatedUser}); + ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser}); @override Widget build(BuildContext context) { @@ -51,11 +47,9 @@ class ConfirmPaymentPage extends StatelessWidget { print("dialog dismissed"); print(value); if (value != null && value) { - AppoitmentAllHistoryResultList appo = - new AppoitmentAllHistoryResultList(); + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); appo.projectID = patientInfoAndMobileNumber.projectID; - openPayment(selectedPaymentMethod, authenticatedUser, - double.parse(advanceModel.amount), appo); + openPayment(selectedPaymentMethod, authenticatedUser, double.parse(advanceModel.amount), appo); } }); } @@ -161,14 +155,9 @@ class ConfirmPaymentPage extends StatelessWidget { disabled: model.state == ViewState.Busy, onTap: () { GifLoaderDialogUtils.showMyDialog(context); - model - .sendActivationCodeForAdvancePayment( - patientID: int.parse(advanceModel.fileNumber), - projectID: advanceModel.hospitalsModel.iD) - .then((value) { + model.sendActivationCodeForAdvancePayment(patientID: int.parse(advanceModel.fileNumber), projectID: advanceModel.hospitalsModel.iD).then((value) { GifLoaderDialogUtils.hideDialog(context); - if (model.state != ViewState.ErrorLocal && - model.state != ViewState.Error) showSMSDialog(); + if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(); }); }, ), @@ -202,29 +191,11 @@ class ConfirmPaymentPage extends StatelessWidget { return 'assets/images/new-design/mada.png'; } - openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, - double amount, AppoitmentAllHistoryResultList appo) { - browser = new MyInAppBrowser( - onExitCallback: onBrowserExit, - appo: appo, - onLoadStartCallback: onBrowserLoadStart); + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); - browser.openPaymentBrowser( - amount, - "Advance Payment", - Utils.getAdvancePaymentTransID( - authenticatedUser.projectID, authenticatedUser.patientID), - appo.projectID.toString(), - authenticatedUser.emailAddress, - paymentMethod, - authenticatedUser.patientType, - authenticatedUser.firstName, - authenticatedUser.patientID, - authenticatedUser, - browser, - false, - "3", - ""); + browser.openPaymentBrowser(amount, "Advance Payment", Utils.getAdvancePaymentTransID(authenticatedUser.projectID, authenticatedUser.patientID), appo.projectID.toString(), + authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", ""); } onBrowserLoadStart(String url) { @@ -256,12 +227,7 @@ class ConfirmPaymentPage extends StatelessWidget { checkPaymentStatus(AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - service - .checkPaymentStatus( - Utils.getAppointmentTransID( - appo.projectID, appo.clinicID, appo.appointmentNo), - AppGlobal.context) - .then((res) { + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), AppGlobal.context).then((res) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); print("Printing Payment Status Reponse!!!!"); print(res); @@ -282,17 +248,10 @@ class ConfirmPaymentPage extends StatelessWidget { DoctorsListService service = new DoctorsListService(); String paymentReference = res['Fort_id'].toString(); GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - service - .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], - res['Fort_id'], res['PaymentMethod'], AppGlobal.context) - .then((res) { + service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); - addAdvancedNumberRequest( - res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), - paymentReference, - appo.appointmentNo.toString(), - appo); + addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString(), appo); }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: err); @@ -300,14 +259,10 @@ class ConfirmPaymentPage extends StatelessWidget { }); } - addAdvancedNumberRequest(String advanceNumber, String paymentReference, - String appointmentID, AppoitmentAllHistoryResultList appo) { + addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - service - .addAdvancedNumberRequest( - advanceNumber, paymentReference, appointmentID, AppGlobal.context) - .then((res) { + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); print(res); navigateToHome(AppGlobal.context); diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart index e1ddad8e..85e913e8 100644 --- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart +++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart @@ -86,69 +86,63 @@ class _CovidDrivethruLocationState extends State { margin: EdgeInsets.only(top: 6.0), child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 14.0, color: Colors.black, letterSpacing: -0.56)), ), - InkWell( - onTap: () { - // dropdownKey.currentState; - // openDropdown(clinicDropdownKey); - }, - child: Container( - width: double.infinity, - decoration: containerRadius(Colors.white, 12), - margin: EdgeInsets.only(top: 12), - padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), - child: Row( - children: [ - Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - TranslationBase.of(context).selectLocation, - style: TextStyle( - fontSize: 11, - letterSpacing: -0.44, - fontWeight: FontWeight.w600, - ), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(top: 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, ), - Container( - height: 20, - child: DropdownButtonHideUnderline( - child: DropdownButton( - onTap: () { - print("Clicked"); - }, - key: locationDropdownKey, - hint: new Text( - TranslationBase.of(context).selectAddress, - ), - value: selectedProject, - iconSize: 0, - isExpanded: true, - style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), - items: projectsList.map((DriveThroughTestingCenterModel item) { - return new DropdownMenuItem( - value: item, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [Text(item.projectName), getCovidTestTypeImage(item)], - ), - ); - }).toList(), - onChanged: (newValue) { - setState(() { - selectedProject = newValue; - setProjectLocation(newValue); - }); - }, + ), + Container( + height: 20, + child: DropdownButtonHideUnderline( + child: DropdownButton( + onTap: () { + print("Clicked"); + }, + key: locationDropdownKey, + hint: new Text( + TranslationBase.of(context).selectAddress, ), + value: selectedProject, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + items: projectsList.map((DriveThroughTestingCenterModel item) { + return new DropdownMenuItem( + value: item, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [Text(item.projectName), getCovidTestTypeImage(item)], + ), + ); + }).toList(), + onChanged: (newValue) { + setState(() { + selectedProject = newValue; + setProjectLocation(newValue); + }); + }, ), ), - ], - ), + ), + ], ), - Icon(Icons.keyboard_arrow_down), - ], - ), + ), + Icon(Icons.keyboard_arrow_down), + ], ), ), ], diff --git a/lib/pages/ErService/EdOnline/DdServicesPage.dart b/lib/pages/ErService/EdOnline/DdServicesPage.dart index dc2e8d78..3780fd08 100644 --- a/lib/pages/ErService/EdOnline/DdServicesPage.dart +++ b/lib/pages/ErService/EdOnline/DdServicesPage.dart @@ -42,37 +42,10 @@ class _DdServicesPageState extends State { ProjectViewModel projectViewModel = Provider.of(context); return AppScaffold( appBarTitle: 'ED Online', + showNewAppBarTitle: true, isShowDecPage: true, isShowAppBar: true, - // appBarTitle: AppBar( - // elevation: 0, - // textTheme: TextTheme( - // headline6: TextStyle( - // color: Theme.of(context).textTheme.headline1.color, - // fontWeight: FontWeight.bold), - // ), - // title: Text( - // 'ED Online', - // style: TextStyle( - // fontWeight: FontWeight.bold, - // color: Theme.of(context).textTheme.headline1.color, - // fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), - // // bold: true, - // // color: Colors.white, - // ), - // leading: Builder( - // builder: (BuildContext context) { - // return IconButton( - // icon: Icon(Icons.arrow_back), - // color: Theme.of(context).textTheme.headline1.color, - // onPressed: () { - // showConfirmMessage(context); - // }, - // ); - // }, - // ), - // centerTitle: true, - // ), + showNewAppBar: true, body: PageView( physics: NeverScrollableScrollPhysics(), controller: pageController, diff --git a/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart b/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart index fd0c8e9a..95ef8026 100644 --- a/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart +++ b/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart @@ -20,17 +20,15 @@ class EdOnlineNotesPage extends StatefulWidget { final List selectedQuestions; final Function changePageViewIndex; TriageInformationRequest triageInformationRequest; - EdOnlineNotesPage( - {Key key, this.selectedQuestions, this.changePageViewIndex,this.triageInformationRequest}) - ; + + EdOnlineNotesPage({Key key, this.selectedQuestions, this.changePageViewIndex, this.triageInformationRequest}); @override _EdOnlineNotesPageState createState() => _EdOnlineNotesPageState(); } class _EdOnlineNotesPageState extends State { - TextEditingController _chiefComplaintsTextController = - TextEditingController(); + TextEditingController _chiefComplaintsTextController = TextEditingController(); TextEditingController _noteTextController = TextEditingController(); DateTime selectedTime; final _formKey = GlobalKey(); @@ -83,13 +81,11 @@ class _EdOnlineNotesPageState extends State { padding: EdgeInsets.all(12), width: double.infinity, // height: 65, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts(selectedTime == null ?TranslationBase.of(context).errorExpectedArrivalTime:TranslationBase.of(context).expectedArrivalTime), + Texts(selectedTime == null ? TranslationBase.of(context).errorExpectedArrivalTime : TranslationBase.of(context).expectedArrivalTime), Texts(getDate(context)), ], ), @@ -116,7 +112,7 @@ class _EdOnlineNotesPageState extends State { children: [ Expanded( child: Container( - margin: EdgeInsets.only(left: 5,right: 5), + margin: EdgeInsets.only(left: 5, right: 5), child: SecondaryButton( textColor: Colors.white, color: Theme.of(context).primaryColor, @@ -125,10 +121,12 @@ class _EdOnlineNotesPageState extends State { ), ), ), - SizedBox(width: 10,), + SizedBox( + width: 10, + ), Expanded( child: Container( - margin: EdgeInsets.only(left: 5,right: 5), + margin: EdgeInsets.only(left: 5, right: 5), child: SecondaryButton( textColor: Colors.white, color: Theme.of(context).primaryColor, @@ -137,21 +135,21 @@ class _EdOnlineNotesPageState extends State { onTap: () async { if (_formKey.currentState.validate()) { GifLoaderDialogUtils.showMyDialog(context); - model.saveQuestionsInformation( - chiefComplaint: - _chiefComplaintsTextController.text.toString(), - notes: _noteTextController.text.toString(), - selectedQuestions: widget.selectedQuestions, - projectId: widget.triageInformationRequest.projectID,selectedTime: selectedTime).then((value) { + model + .saveQuestionsInformation( + chiefComplaint: _chiefComplaintsTextController.text.toString(), + notes: _noteTextController.text.toString(), + selectedQuestions: widget.selectedQuestions, + projectId: widget.triageInformationRequest.projectID, + selectedTime: selectedTime) + .then((value) { GifLoaderDialogUtils.hideDialog(context); - if(model.state == ViewState.ErrorLocal) + if (model.state == ViewState.ErrorLocal) AppToast.showErrorToast(message: model.error); - else - { - widget.changePageViewIndex(4); - } - - }).catchError((onError){ + else { + widget.changePageViewIndex(4); + } + }).catchError((onError) { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: onError.toString()); }); diff --git a/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart index b8498e7c..7f5272b0 100644 --- a/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart +++ b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart @@ -1,32 +1,38 @@ import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - -import '../../../Constants.dart'; - +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; class EdOnlineSelectedHospitalPage extends StatefulWidget { final Function changePageViewIndex; TriageInformationRequest triageInformationRequest; - EdOnlineSelectedHospitalPage( - {Key key, this.changePageViewIndex,this.triageInformationRequest}) - : super(key: key); + EdOnlineSelectedHospitalPage({Key key, this.changePageViewIndex, this.triageInformationRequest}) : super(key: key); @override - _EdOnlineSelectedHospitalPageState createState() => - _EdOnlineSelectedHospitalPageState(); + _EdOnlineSelectedHospitalPageState createState() => _EdOnlineSelectedHospitalPageState(); } -class _EdOnlineSelectedHospitalPageState - extends State { +class _EdOnlineSelectedHospitalPageState extends State { + HospitalsModel selectedProject; + final GlobalKey locationDropdownKey = GlobalKey(); + ProjectViewModel projectViewModel; + int _selected = 0; + @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getHospitals(), builder: (_, model, w) => AppScaffold( @@ -35,67 +41,139 @@ class _EdOnlineSelectedHospitalPageState physics: BouncingScrollPhysics(), child: Column( children: [ - ...List.generate( - model.hospitals.length, - (index) => Column( - crossAxisAlignment: CrossAxisAlignment.start, + Container( + margin: EdgeInsets.all(12.0), + child: Text(TranslationBase.of(context).onlineCheckInAgreement, style: TextStyle(fontSize: 14.0, color: Colors.black, letterSpacing: -0.56)), + ), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.all(12.0), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( children: [ - SizedBox( - height: 2, - ), - Row( - children: [ - Expanded( - flex: 1, - child: InkWell( - onTap: () { - setState(() { - widget.triageInformationRequest.selectedHospital = model.hospitals[index]; - widget.triageInformationRequest.projectID = model.hospitals[index].iD; - }); - }, - child: ListTile( - title: Text(model.hospitals[index].name + - ' ${model.hospitals[index].distanceInKilometers} ' + - TranslationBase.of(context).km), - leading: Radio( - value: model.hospitals[index], - groupValue: widget.triageInformationRequest.selectedHospital, - activeColor: secondaryColor, - onChanged: (value) { + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 20, + child: DropdownButtonHideUnderline( + child: DropdownButton( + onTap: () { + print("Clicked"); + }, + key: locationDropdownKey, + hint: new Text( + TranslationBase.of(context).selectHospital, + ), + value: selectedProject, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + items: model.hospitals.map((HospitalsModel item) { + return new DropdownMenuItem( + value: item, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [Text(item.name + " - " + item.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_)], + ), + ); + }).toList(), + onChanged: (newValue) { setState(() { - widget.triageInformationRequest.selectedHospital = model.hospitals[index]; - widget.triageInformationRequest.projectID = model.hospitals[index].iD; + selectedProject = newValue; + widget.triageInformationRequest.selectedHospital = selectedProject; }); }, ), ), ), - ) - ], + ], + ), ), - SizedBox( - height: 5.0, + Icon(Icons.keyboard_arrow_down), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Radio( + value: 1, + groupValue: _selected, + onChanged: onRadioChanged, + ), + Text( + TranslationBase.of(context).agreeTo, + style: new TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: CustomColors.textColor, + ), + ), + mWidth(4), + InkWell( + onTap: () { + launch("https://hmg.com/en/Pages/Privacy.aspx"); + }, + child: Text( + TranslationBase.of(context).termsConditoins, + style: new TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: CustomColors.accentColor, + ), + ), ), ], ), - ) + ), + DefaultButton( + TranslationBase.of(context).payNow.toUpperCase(), + (){}, + // selectedProcList.length > 0 && getTotalValue() != "0.00" + // ? () { + // makePayment(); + // } + // : null, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), ], ), ), - bottomSheet: Container( - height: 76, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: SecondaryButton( - // textColor: Colors.white, - color: Theme.of(context).primaryColor, - label: TranslationBase.of(context).next.toUpperCase(), - disabled: widget.triageInformationRequest.selectedHospital==null, - onTap: () => widget.changePageViewIndex(1)), - ), - ), + // bottomSheet: + // Container( + // height: 76, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: SecondaryButton( + // // textColor: Colors.white, + // color: Theme.of(context).primaryColor, + // label: TranslationBase.of(context).next.toUpperCase(), + // disabled: (widget.triageInformationRequest.selectedHospital == null || _selected == 0), + // onTap: () => widget.changePageViewIndex(1)), + // ), + // ), ), ); } + + void onRadioChanged(int value) { + setState(() { + _selected = value; + }); + } } diff --git a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart index c510196b..0f4e54b2 100644 --- a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart +++ b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart @@ -1,27 +1,42 @@ +import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class EdPaymentInformationPage extends StatefulWidget { final HospitalsModel selectedHospital; const EdPaymentInformationPage({Key key, this.selectedHospital}) : super(key: key); + @override - _EdPaymentInformationPageState createState() => - _EdPaymentInformationPageState(); + _EdPaymentInformationPageState createState() => _EdPaymentInformationPageState(); } class _EdPaymentInformationPageState extends State { + MyInAppBrowser browser; + ProjectViewModel projectViewModel; + String transID = ""; + @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getPatientPaymentInformation(), builder: (_, model, w) => AppScaffold( @@ -31,55 +46,33 @@ class _EdPaymentInformationPageState extends State { child: Column( children: [ Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.0), - color: Colors.white), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(10.0), color: Colors.white), margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0), padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0), child: Column( children: [ Container( alignment: Alignment.center, - margin: - EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), - child: Text(TranslationBase.of(context).testFee, - style: TextStyle( - color: Colors.black, - fontSize: 22.0, - fontWeight: FontWeight.bold)), - ), - if(model.erPatientShareModel!=null) - Table( - children: [ - TableRow(children: [ - TableCell( - child: - Texts(TranslationBase.of(context).testFee)), - TableCell( - child: Texts(model - .erPatientShareModel.patientShare - .toStringAsFixed(2))), - ]), - TableRow(children: [ - TableCell( - child: Texts( - TranslationBase.of(context).patientTaxToDo)), - TableCell( - child: Texts(model - .erPatientShareModel.patientTaxAmount - .toStringAsFixed(2))), - ]), - TableRow(children: [ - TableCell( - child: Texts(TranslationBase.of(context) - .patientShareTotalToDo)), - TableCell( - child: Texts(model - .erPatientShareModel.patientShareWithTax - .toStringAsFixed(2))), - ]), - ], + margin: EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), + child: Text(TranslationBase.of(context).testFee, style: TextStyle(color: Colors.black, fontSize: 22.0, fontWeight: FontWeight.bold)), ), + if (model.erPatientShareModel != null) + Table( + children: [ + TableRow(children: [ + TableCell(child: Texts(TranslationBase.of(context).testFee)), + TableCell(child: Texts(model.erPatientShareModel.patientShare.toStringAsFixed(2))), + ]), + TableRow(children: [ + TableCell(child: Texts(TranslationBase.of(context).patientTaxToDo)), + TableCell(child: Texts(model.erPatientShareModel.patientTaxAmount.toStringAsFixed(2))), + ]), + TableRow(children: [ + TableCell(child: Texts(TranslationBase.of(context).patientShareTotalToDo)), + TableCell(child: Texts(model.erPatientShareModel.patientShareWithTax.toStringAsFixed(2))), + ]), + ], + ), ], ), ), @@ -94,9 +87,19 @@ class _EdPaymentInformationPageState extends State { color: Theme.of(context).primaryColor, label: TranslationBase.of(context).next.toUpperCase(), onTap: () { - Navigator.push(context, FadePage(page: PaymentMethod())).then( + Navigator.push(context, FadePage(page: PaymentMethod( + onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) { + setState(() {}); + }, + ))).then( (value) { //TODO Haroun call API here + print(value); + if (value != null) { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.selectedHospital.iD; + openPayment(value[0], projectViewModel.user, model.erPatientShareModel.patientShareWithTax, appo); + } }, ); }, @@ -107,6 +110,82 @@ class _EdPaymentInformationPageState extends State { ); } + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); + transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID); + browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), + authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", ""); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (isPaymentMade) checkPaymentStatus(appo); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.checkPaymentStatus(transID, AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + print("Printing Payment Status Reponse!!!!"); + print(res); + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + ER_createAdvancePayment(res, appo); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + ER_createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.ER_createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + ER_InsertEROnlinePaymentDetails(res, appo); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + ER_InsertEROnlinePaymentDetails(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.ER_InsertEROnlinePaymentDetails(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } } diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart index 88b21b11..00424a35 100644 --- a/lib/pages/ErService/ErOptions.dart +++ b/lib/pages/ErService/ErOptions.dart @@ -9,6 +9,7 @@ import 'package:provider/provider.dart'; import '../../uitl/translations_delegate_base.dart'; import 'AmbulanceReq.dart'; +import 'EdOnline/DdServicesPage.dart'; import 'NearestEr.dart'; class ErOptions extends StatefulWidget { @@ -86,14 +87,14 @@ class _ErOptionsState extends State { ), InkWell( onTap: () { - // Navigator.push(context, FadePage(page: DdServicesPage())); + Navigator.push(context, FadePage(page: DdServicesPage())); }, child: MedicalProfileItem( title: "ED", imagePath: 'assets/images/new-design/AM.PNG', subTitle: TranslationBase.of(context).service, isPngImage: true, - isEnable: false, + isEnable: true, ), ), ], diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 6e817f8c..66102cf4 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; @@ -40,7 +41,7 @@ class PrescriptionItemsPage extends StatelessWidget { baseViewModel: model, showNewAppBar: true, showNewAppBarTitle: true, - body: Column( + body: model.state != ViewState.Busy ? Column( children: [ Expanded( child: SingleChildScrollView( @@ -56,7 +57,7 @@ class PrescriptionItemsPage extends StatelessWidget { "", prescriptions.name, DateUtil.convertStringToDate(prescriptions.appointmentDate), - DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions.appointmentDate)), + DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.prescriptionReportEnhList[0].orderDate)), prescriptions.nationalityFlagURL, prescriptions.doctorRate, prescriptions.actualDoctorRate, @@ -406,7 +407,7 @@ class PrescriptionItemsPage extends StatelessWidget { ), ), ], - ), + ) : Container(), ), ); } diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 7003f376..9c167be4 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -364,7 +364,7 @@ class DoctorsListService extends BaseService { "PatientType": authUser.patientType }; - if(clinicID == 253) { + if (clinicID == 253) { List procedureID = projectViewModel.selectedBodyPartList.map((element) => element.id.toString()).toList(); request["GeneralProcedureList"] = procedureID; request["InitialSlotDuration"] = projectViewModel.laserSelectionDuration; @@ -480,10 +480,7 @@ class DoctorsListService extends BaseService { var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); authUser = data; } - request = { - "ProjectID": projectID, - "AppointmentNo": appoID - }; + request = {"ProjectID": projectID, "AppointmentNo": appoID}; dynamic localRes; @@ -1378,6 +1375,92 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } + Future ER_createAdvancePayment(AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Request req = appGlobal.getPublicRequest(); + + request = { + "VersionID": req.VersionID, + "Channel": req.Channel, + "LanguageID": languageID == 'ar' ? 1 : 2, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "PatientTypeID": authUser.patientType, + "ERAdvanceAmount": { + "AppointmentID": paymentReference, + "ProjectId": projectID, + "PatientId": authUser.patientID, + "ClinicId": 10, + "DepositorName": authUser.firstName + " " + authUser.lastName, + "MemberId": authUser.patientID, + "NationalityID": authUser.nationalityID, + "PaymentAmount": payedAmount, + "PaymentDate": DateUtil.convertDateToString(DateTime.now()), + "PaymentMethodName": paymentMethodName, + "PaymentReferenceNumber": paymentReference, + "SourceType": 2 + } + }; + dynamic localRes; + await baseAppClient.post(ER_CREATE_ADVANCE_PAYMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future ER_InsertEROnlinePaymentDetails(AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Request req = appGlobal.getPublicRequest(); + + request = { + "VersionID": req.VersionID, + "Channel": req.Channel, + "LanguageID": languageID == 'ar' ? 1 : 2, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "PatientTypeID": authUser.patientType, + "EROnlineCheckinPaymentDetails": { + "CheckinDate": DateUtil.convertDateToString(DateTime.now()), + "ExpectedArrivalTime": DateUtil.convertDateToString(DateTime.now()), + "AppointmentID": paymentReference, + "ProjectId": projectID, + "PatientId": authUser.patientID, + "ClinicId": 10, + "FormId": 15, + "DepositorName": authUser.firstName + " " + authUser.lastName, + "MemberId": authUser.patientID, + "NationalityID": authUser.nationalityID, + "PaymentAmount": payedAmount, + "PaymentDate": DateUtil.convertDateToString(DateTime.now()), + "PaymentMethodName": paymentMethodName, + "PaymentReferenceNumber": paymentReference, + "TriageScore": await sharedPref.getInt(ER_CHECKIN_RISK_SCORE) + } + }; + dynamic localRes; + await baseAppClient.post(ER_INSERT_ADVANCE_PAYMENT, onSuccess: (response, statusCode) async { + localRes = response; + sharedPref.remove(ER_CHECKIN_RISK_SCORE); + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + Future getPatientHealthDataStats(int medCategoryId, int medCategoryStsId, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index b258a7ff..a21028f8 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -33,13 +33,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='; From f9a733884d04c477dfe899933a8d471b31dd8607 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 12 Jun 2022 17:06:59 +0300 Subject: [PATCH 05/20] Calendar fixes --- lib/config/config.dart | 2 +- lib/core/service/client/base_app_client.dart | 4 ++-- lib/uitl/CalendarUtils.dart | 2 +- lib/widgets/in_app_browser/InAppBrowser.dart | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index c8a48ef8..b15f49a7 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -405,7 +405,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 8.3; +var VERSION_ID = 8.4; var SETUP_ID = '91877'; var LANGUAGE = 2; var PATIENT_OUT_SA = 0; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index cc570bd1..a9ed89a6 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -141,11 +141,11 @@ class BaseAppClient { body.removeWhere((key, value) => key == null || value == null); - // if (BASE_URL == "https://uat.hmgwebservices.com/") { + if (BASE_URL == "https://uat.hmgwebservices.com/") { print("URL : $url"); final jsonBody = json.encode(body); print(jsonBody); - // } + } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); diff --git a/lib/uitl/CalendarUtils.dart b/lib/uitl/CalendarUtils.dart index ae943617..22c6e959 100644 --- a/lib/uitl/CalendarUtils.dart +++ b/lib/uitl/CalendarUtils.dart @@ -63,7 +63,7 @@ class CalendarUtils { TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime, _currentLocation); print("eventId " + eventId); - Event event = Event(writableCalendars.id, recurrenceRule: recurrenceRule, start: scheduleDateTimeUTZ, end: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description); + Event event = Event(writableCalendars.id, start: scheduleDateTimeUTZ, end: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description); deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) { print("catchError " + e.toString()); }).whenComplete(() { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index a21028f8..b258a7ff 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -33,13 +33,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='; From 8b7a6e76891e08a95a422054212f46f511c3409e Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 14 Jun 2022 13:09:20 +0300 Subject: [PATCH 06/20] ED Online Check-In --- lib/core/service/client/base_app_client.dart | 4 +- lib/main.dart | 5 +- .../new_Home_health_care_step_one_page.dart | 2 - lib/pages/Blood/user_agreement_page.dart | 1 + .../ErService/EdOnline/DdServicesPage.dart | 1 + .../EdOnline/EdOnlineQuestionsPage.dart | 206 ++++++++++++------ .../EdOnlineSelectedHospitalPage.dart | 39 ++-- .../EdOnline/EdPaymentInformationPage.dart | 180 +++++++++------ .../webrtc/signaling.dart | 2 +- .../appointment_services/GetDoctorsList.dart | 2 - lib/splashPage.dart | 1 + lib/uitl/date_uitl.dart | 2 +- lib/uitl/push-notification-handler.dart | 8 +- lib/widgets/in_app_browser/InAppBrowser.dart | 10 +- 14 files changed, 292 insertions(+), 171 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index a9ed89a6..cc570bd1 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -141,11 +141,11 @@ class BaseAppClient { body.removeWhere((key, value) => key == null || value == null); - if (BASE_URL == "https://uat.hmgwebservices.com/") { + // if (BASE_URL == "https://uat.hmgwebservices.com/") { print("URL : $url"); final jsonBody = json.encode(body); print(jsonBody); - } + // } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); diff --git a/lib/main.dart b/lib/main.dart index 0be89cc5..6840d87d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -57,9 +57,12 @@ class _MyApp extends State { final GlobalKey navigatorKey = GlobalKey(); - Future checkForUpdate() async { // todo need to verify 'imp' + checkForUpdate() { // todo need to verify 'imp' InAppUpdate.checkForUpdate().then((info) { + print("checkForUpdate!!!"); + print(info.toString()); if (info.immediateUpdateAllowed) { + print("Immediate Allowed!!!"); InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); } }).catchError((e) { diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index f8e377b7..7984cbbf 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -70,8 +70,6 @@ class _NewHomeHealthCareStepOnePageState extends State { EdOnlineQuestionsPage( changePageViewIndex: _changePageViewIndex, selectedQuestions: selectedQuestions, + selectedHospital: triageInformationRequest.selectedHospital, ), EdOnlineNotesPage( changePageViewIndex: _changePageViewIndex, diff --git a/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart b/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart index e3eb1c4c..c825917a 100644 --- a/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart +++ b/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart @@ -1,10 +1,13 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -15,16 +18,13 @@ class EdOnlineQuestionsPage extends StatefulWidget { final Function changePageViewIndex; List selectedQuestions; - EdOnlineQuestionsPage({Key key, this.selectedHospital,this.selectedQuestions, this.changePageViewIndex}); - + EdOnlineQuestionsPage({Key key, this.selectedHospital, this.selectedQuestions, this.changePageViewIndex}); @override _EdOnlineQuestionsPageState createState() => _EdOnlineQuestionsPageState(); } class _EdOnlineQuestionsPageState extends State { - - @override Widget build(BuildContext context) { return BaseView( @@ -37,90 +37,160 @@ class _EdOnlineQuestionsPageState extends State { children: [ ...List.generate( model.triageQuestionsModelList.length, - (index) => - InkWell( - onTap: (){ - setState(() { - if (widget.selectedQuestions - .contains(model.triageQuestionsModelList[index])) { - widget.selectedQuestions - .remove(model.triageQuestionsModelList[index]); - } else { - widget.selectedQuestions - .add(model.triageQuestionsModelList[index]); - } - }); - }, - child: Row( - children: [ - Checkbox( - value: widget.selectedQuestions.contains(model.triageQuestionsModelList[index]), - activeColor: Colors.red[800], - onChanged: (bool newValue) { - setState(() { - if (widget.selectedQuestions - .contains(model.triageQuestionsModelList[index])) { - widget.selectedQuestions - .remove(model.triageQuestionsModelList[index]); - } else { - widget.selectedQuestions - .add(model.triageQuestionsModelList[index]); - } - }); - }), - Expanded( - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Texts( - model.triageQuestionsModelList[index].question, - fontSize: 15, - ), - ), + (index) => InkWell( + onTap: () { + setState(() { + if (widget.selectedQuestions.contains(model.triageQuestionsModelList[index])) { + widget.selectedQuestions.remove(model.triageQuestionsModelList[index]); + } else { + widget.selectedQuestions.add(model.triageQuestionsModelList[index]); + } + }); + }, + child: Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Row( + children: [ + Checkbox( + value: widget.selectedQuestions.contains(model.triageQuestionsModelList[index]), + activeColor: Color(0xffD02127), + tristate: false, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + onChanged: (bool newValue) { + setState(() { + if (widget.selectedQuestions.contains(model.triageQuestionsModelList[index])) { + widget.selectedQuestions.remove(model.triageQuestionsModelList[index]); + } else { + widget.selectedQuestions.add(model.triageQuestionsModelList[index]); + } + }); + }), + SizedBox(width: 6), + Expanded( + child: Text( + model.triageQuestionsModelList[index].question, + overflow: TextOverflow.clip, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), ), - ], - ), + ), + ], ), - + ), + ), ), - SizedBox(height: 80,) + SizedBox( + height: 120, + ) ], ), ), - bottomSheet: Padding( - padding: const EdgeInsets.all(8.0), + bottomSheet: Container( + color: CustomColors.appBackgroudGreyColor, child: Container( - height: 56, + color: CustomColors.appBackgroudGreyColor, + margin: EdgeInsets.all(14), + height: 45.0, child: Row( - children: [ + mainAxisAlignment: MainAxisAlignment.end, + children: [ Expanded( - child: Container( - margin: EdgeInsets.only(left: 5,right: 5), - child: SecondaryButton( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: RaisedButton( + color: new Color(0xffc5272d), textColor: Colors.white, - color: Theme.of(context).primaryColor, - label: TranslationBase.of(context).back.toUpperCase(), - onTap: () => widget.changePageViewIndex(1), + elevation: 0, + disabledTextColor: Colors.white, + disabledColor: new Color(0xFFbcc2c4), + onPressed: () { + widget.changePageViewIndex(0); + }, + child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 16.0)), ), ), ), - SizedBox(width: 10,), + mWidth(7), Expanded( - child: Container( - margin: EdgeInsets.only(left: 5,right: 5), - child: SecondaryButton( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: RaisedButton( + color: CustomColors.green, textColor: Colors.white, - color: Theme.of(context).primaryColor, - label: TranslationBase.of(context).next.toUpperCase(), - disabled: widget.selectedQuestions.isEmpty, - onTap: () => widget.changePageViewIndex(3), + elevation: 0, + disabledTextColor: Colors.white, + disabledColor: new Color(0xFFbcc2c4), + onPressed: widget.selectedQuestions.isEmpty + ? null + : () { + GifLoaderDialogUtils.showMyDialog(context); + model + .saveQuestionsInformation( + chiefComplaint: "", notes: "", selectedQuestions: widget.selectedQuestions, projectId: widget.selectedHospital.iD, selectedTime: DateTime.now()) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) + AppToast.showErrorToast(message: model.error); + else { + widget.changePageViewIndex(4); + } + }).catchError((onError) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: onError.toString()); + }); + // widget.changePageViewIndex(4); + }, + child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 16.0)), ), ), ), - ], ), ), ), + // Padding( + // padding: const EdgeInsets.all(8.0), + // child: Container( + // height: 56, + // child: Row( + // children: [ + // Expanded( + // child: Container( + // margin: EdgeInsets.only(left: 5, right: 5), + // child: SecondaryButton( + // textColor: Colors.white, + // color: Theme.of(context).primaryColor, + // label: TranslationBase.of(context).back.toUpperCase(), + // onTap: () => widget.changePageViewIndex(1), + // ), + // ), + // ), + // SizedBox( + // width: 10, + // ), + // Expanded( + // child: Container( + // margin: EdgeInsets.only(left: 5, right: 5), + // child: SecondaryButton( + // textColor: Colors.white, + // color: Theme.of(context).primaryColor, + // label: TranslationBase.of(context).next.toUpperCase(), + // disabled: widget.selectedQuestions.isEmpty, + // onTap: () => widget.changePageViewIndex(3), + // ), + // ), + // ), + // ], + // ), + // ), + // ), ), ); } diff --git a/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart index 7f5272b0..76eace88 100644 --- a/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart +++ b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart @@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -140,33 +139,23 @@ class _EdOnlineSelectedHospitalPageState extends State 0 && getTotalValue() != "0.00" - // ? () { - // makePayment(); - // } - // : null, - color: CustomColors.green, - disabledColor: CustomColors.grey2, - ), ], ), ), - // bottomSheet: - // Container( - // height: 76, - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: SecondaryButton( - // // textColor: Colors.white, - // color: Theme.of(context).primaryColor, - // label: TranslationBase.of(context).next.toUpperCase(), - // disabled: (widget.triageInformationRequest.selectedHospital == null || _selected == 0), - // onTap: () => widget.changePageViewIndex(1)), - // ), - // ), + bottomSheet: Container( + color: CustomColors.appBackgroudGreyColor, + padding: EdgeInsets.all(12.0), + child: DefaultButton( + TranslationBase.of(context).next, + (widget.triageInformationRequest.selectedHospital == null || _selected == 0) + ? null + : () { + widget.changePageViewIndex(2); + }, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + ), ), ); } diff --git a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart index 0f4e54b2..86236ba2 100644 --- a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart +++ b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart @@ -7,12 +7,13 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -38,7 +39,7 @@ class _EdPaymentInformationPageState extends State { Widget build(BuildContext context) { projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getPatientPaymentInformation(), + onModelReady: (model) async => await model.getPatientPaymentInformation(), builder: (_, model, w) => AppScaffold( baseViewModel: model, body: SingleChildScrollView( @@ -46,75 +47,129 @@ class _EdPaymentInformationPageState extends State { child: Column( children: [ Container( - decoration: BoxDecoration(borderRadius: BorderRadius.circular(10.0), color: Colors.white), - margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0), - padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0), - child: Column( - children: [ - Container( - alignment: Alignment.center, - margin: EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), - child: Text(TranslationBase.of(context).testFee, style: TextStyle(color: Colors.black, fontSize: 22.0, fontWeight: FontWeight.bold)), - ), - if (model.erPatientShareModel != null) - Table( - children: [ - TableRow(children: [ - TableCell(child: Texts(TranslationBase.of(context).testFee)), - TableCell(child: Texts(model.erPatientShareModel.patientShare.toStringAsFixed(2))), - ]), - TableRow(children: [ - TableCell(child: Texts(TranslationBase.of(context).patientTaxToDo)), - TableCell(child: Texts(model.erPatientShareModel.patientTaxAmount.toStringAsFixed(2))), - ]), - TableRow(children: [ - TableCell(child: Texts(TranslationBase.of(context).patientShareTotalToDo)), - TableCell(child: Texts(model.erPatientShareModel.patientShareWithTax.toStringAsFixed(2))), - ]), - ], + decoration: cardRadius(12), + margin: EdgeInsets.fromLTRB(12.0, 30.0, 12.0, 5.0), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).payment, + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + )), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientShareToDo), + ), + Expanded( + child: _getNormalText(model.erPatientShareModel.patientShare.toStringAsFixed(2) ?? "0", isBold: true), + ) + ], + ), ), - ], + mDivider(Colors.grey[200]), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 3, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientTaxToDo), + ), + Expanded( + child: _getNormalText(model.erPatientShareModel.patientTaxAmount.toStringAsFixed(2) ?? "0", isBold: true), + ) + ], + ), + ), + mDivider(Colors.grey[200]), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 3, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo), + ), + Expanded( + child: _getNormalText(model.erPatientShareModel.patientShareWithTax.toStringAsFixed(2) ?? "0", isBold: true), + ) + ], + ), + ), + ], + ), + ), + ), + mHeight(50.0), + Text( + TranslationBase.of(context).payOptions, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, ), ), + Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), ], ), ), bottomSheet: Container( - height: 76, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: SecondaryButton( - color: Theme.of(context).primaryColor, - label: TranslationBase.of(context).next.toUpperCase(), - onTap: () { - Navigator.push(context, FadePage(page: PaymentMethod( - onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) { - setState(() {}); - }, - ))).then( - (value) { - //TODO Haroun call API here - print(value); - if (value != null) { - AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); - appo.projectID = widget.selectedHospital.iD; - openPayment(value[0], projectViewModel.user, model.erPatientShareModel.patientShareWithTax, appo); - } - }, - ); - }, - ), + color: CustomColors.appBackgroudGreyColor, + padding: EdgeInsets.all(12.0), + child: DefaultButton( + TranslationBase.of(context).payNow.toUpperCase(), + () { + Navigator.push(context, FadePage(page: PaymentMethod( + onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) { + setState(() {}); + }, + ))).then( + (value) { + //TODO Haroun call API here + print(value); + if (value != null) { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.selectedHospital.iD; + openPayment(value[0], projectViewModel.user, model.erPatientShareModel.patientShareWithTax, appo); + } + }, + ); + }, + color: CustomColors.green, + disabledColor: CustomColors.grey2, ), ), ), ); } + _getNormalText(text, {bool isBold = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold ? 12 : 10, + letterSpacing: -0.5, + color: isBold ? Colors.black : Colors.grey[700], + fontWeight: FontWeight.w600, + ), + ); + } + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID); - browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), - authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", ""); + browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, + authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", ""); } onBrowserLoadStart(String url) { @@ -163,13 +218,12 @@ class _EdPaymentInformationPageState extends State { }); } - ER_createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + ER_createAdvancePayment(payment_res, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); - String paymentReference = res['Fort_id'].toString(); GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - service.ER_createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) { + service.ER_createAdvancePayment(appo, appo.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], AppGlobal.context).then((res) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); - ER_InsertEROnlinePaymentDetails(res, appo); + ER_InsertEROnlinePaymentDetails(payment_res, appo); }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: err); @@ -177,11 +231,13 @@ class _EdPaymentInformationPageState extends State { }); } - ER_InsertEROnlinePaymentDetails(res, AppoitmentAllHistoryResultList appo) { + ER_InsertEROnlinePaymentDetails(payment_res, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - service.ER_InsertEROnlinePaymentDetails(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) { + service.ER_InsertEROnlinePaymentDetails(appo, appo.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], AppGlobal.context).then((res) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showSuccessToast(message: TranslationBase.of(context).success); + Navigator.of(context).pop(); }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: err); diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart index d6e0a071..4ca87644 100644 --- a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart +++ b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart @@ -404,7 +404,7 @@ class Signaling { 'to': session.remote_user?.id, 'from': session.local_user.id, 'candidate': { - 'sdpMLineIndex': candidate.sdpMlineIndex, + 'sdpMLineIndex': candidate.sdpMLineIndex, 'sdpMid': candidate.sdpMid, 'candidate': candidate.candidate, }, diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 9c167be4..59924807 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -1393,7 +1393,6 @@ class DoctorsListService extends BaseService { "PatientOutSA": authUser.outSA, "PatientTypeID": authUser.patientType, "ERAdvanceAmount": { - "AppointmentID": paymentReference, "ProjectId": projectID, "PatientId": authUser.patientID, "ClinicId": 10, @@ -1436,7 +1435,6 @@ class DoctorsListService extends BaseService { "EROnlineCheckinPaymentDetails": { "CheckinDate": DateUtil.convertDateToString(DateTime.now()), "ExpectedArrivalTime": DateUtil.convertDateToString(DateTime.now()), - "AppointmentID": paymentReference, "ProjectId": projectID, "PatientId": authUser.patientID, "ClinicId": 10, diff --git a/lib/splashPage.dart b/lib/splashPage.dart index a8a8d029..325acce2 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -44,6 +44,7 @@ class _SplashScreenState extends State { AppSharedPreferences().getAll().then((value){ + debugPrint("ALL SHARED PREFERENCES!!!!!"); debugPrint(jsonEncode(value)); }); } diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index 1c9db2f5..dd336844 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -53,7 +53,7 @@ class DateUtil { static String convertDateToString(DateTime date) { const start = "/Date("; - const end = "+0300)"; + const end = "+0300)/"; int milliseconds = date.millisecondsSinceEpoch; return start + "$milliseconds" + end; diff --git a/lib/uitl/push-notification-handler.dart b/lib/uitl/push-notification-handler.dart index b448bff4..5fff8ef7 100644 --- a/lib/uitl/push-notification-handler.dart +++ b/lib/uitl/push-notification-handler.dart @@ -271,8 +271,6 @@ class PushNotificationHandler { FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async { print("Firebase onMessageOpenedApp!!!"); - // Utils.showPermissionConsentDialog(context, "onMessageOpenedApp", (){}); - // newMessage(message); if (Platform.isIOS) await Future.delayed(Duration(milliseconds: 3000)).then((value) { newMessage(message); @@ -282,9 +280,15 @@ class PushNotificationHandler { }); FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) { + print("Push Notification onTokenRefresh: " + fcm_token); onToken(fcm_token); }); + FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String token){ + print("Push Notification getToken: " + token); + onToken(token); + }); + FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); } } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index b258a7ff..e6acc895 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -33,13 +33,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='; @@ -162,7 +162,7 @@ class MyInAppBrowser extends InAppBrowser { applePayInsertRequest.customerEmail = emailId; applePayInsertRequest.customerID = authenticatedUser.patientID; applePayInsertRequest.customerName = authenticatedUser.firstName; - applePayInsertRequest.deviceToken = await sharedPref.getString(PUSH_TOKEN); + applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0; applePayInsertRequest.projectID = projId; applePayInsertRequest.serviceID = servID; From 3396b4253b8a6ed4fd40392ed85ad331f8e67d92 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 19 Jun 2022 10:57:52 +0300 Subject: [PATCH 07/20] Updates & fixes --- lib/analytics/flows/appointments.dart | 7 ++ lib/config/config.dart | 4 +- lib/config/localized_values.dart | 3 + lib/core/service/client/base_app_client.dart | 6 +- .../components/DocAvailableAppointments.dart | 4 +- lib/pages/ErService/ErOptions.dart | 4 +- .../MyAppointments/AppointmentDetails.dart | 3 +- .../fragments/home_page_fragment2.dart | 12 ++-- lib/pages/login/confirm-login.dart | 3 +- .../medical/balance/confirm_payment_page.dart | 2 +- .../screens/lacum-activitaion-vida-page.dart | 64 +++++++++---------- lib/uitl/translations_delegate_base.dart | 3 + lib/widgets/in_app_browser/InAppBrowser.dart | 14 ++-- lib/widgets/others/app_scaffold_widget.dart | 3 + pubspec.yaml | 4 +- 15 files changed, 75 insertions(+), 61 deletions(-) diff --git a/lib/analytics/flows/appointments.dart b/lib/analytics/flows/appointments.dart index 50a02c76..720fbb52 100644 --- a/lib/analytics/flows/appointments.dart +++ b/lib/analytics/flows/appointments.dart @@ -264,4 +264,11 @@ class Appointment{ }); } + appointment_cancel(){ + logger('cancel_appointment', parameters: { + 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, + }); + } + + } \ No newline at end of file diff --git a/lib/config/config.dart b/lib/config/config.dart index b15f49a7..02ca3db1 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,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/'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 8223bee6..14d8a6cb 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1844,4 +1844,7 @@ const Map localizedValues = { "termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"}, "prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."}, "liveCarePermissions": {"en": "LiveCare requires Camera & Microphone permissions, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون ، يرجى السماح لها بالمتابعة."}, + "lakumUnhold": { "en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل" }, + "lakumDiscontinue": { "en": "The account is closed", "ar": "الحساب مغلق" }, + "lakumSuccess": { "en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح" }, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index cc570bd1..55684afe 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -142,9 +142,9 @@ class BaseAppClient { body.removeWhere((key, value) => key == null || value == null); // if (BASE_URL == "https://uat.hmgwebservices.com/") { - print("URL : $url"); - final jsonBody = json.encode(body); - print(jsonBody); + debugPrint("URL : $url"); + final jsonBody = json.encode(body); + debugPrint(jsonBody); // } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 89a2a587..67ef388b 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -81,8 +81,8 @@ class _DocAvailableAppointmentsState extends State wit WidgetsBinding.instance.addPostFrameCallback((_) async { getCurrentLanguage(); - - if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) + bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT); + if (isLiveCareSchedule != null && isLiveCareSchedule) getDoctorScheduledFreeSlots(context, widget.doctor); else { getDoctorFreeSlots(context, widget.doctor); diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart index 00424a35..40bcc1af 100644 --- a/lib/pages/ErService/ErOptions.dart +++ b/lib/pages/ErService/ErOptions.dart @@ -87,14 +87,14 @@ class _ErOptionsState extends State { ), InkWell( onTap: () { - Navigator.push(context, FadePage(page: DdServicesPage())); + if (projectViewModel.havePrivilege(81)) Navigator.push(context, FadePage(page: DdServicesPage())); }, child: MedicalProfileItem( title: "ED", imagePath: 'assets/images/new-design/AM.PNG', subTitle: TranslationBase.of(context).service, isPngImage: true, - isEnable: true, + isEnable: projectViewModel.havePrivilege(81), ), ), ], diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index f235c8b1..885013b5 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -614,7 +614,8 @@ class _AppointmentDetailsState extends State with SingleTick } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } - projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo); + // projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo); + projectViewModel.analytics.appointment.appointment_cancel(); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 1be3f6af..dd12a5cd 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:math' as math; import 'package:auto_size_text/auto_size_text.dart'; @@ -16,7 +15,6 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medic import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart'; -import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesPage.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/packages_offers_tab_pager.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -25,9 +23,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; -import 'package:pay/pay.dart'; class HomePageFragment2 extends StatefulWidget { DashboardViewModel model; @@ -104,7 +100,6 @@ class _HomePageFragment2State extends State { onLoginClick: () { widget.onLoginClick(); projectViewModel.analytics.loginRegistration.login_register_initiate(); - // navigateTo(context, CallHomePage()); }, ), // height: MediaQuery.of(context).size.width / 2.6, @@ -242,6 +237,10 @@ class _HomePageFragment2State extends State { ), FlatButton( onPressed: () { + // AppSharedPreferences().getAll().then((value){ + // debugPrint("ALL SHARED PREFERENCES!!!!!"); + // debugPrint(jsonEncode(value)); + // }); Navigator.push(context, FadePage(page: AllHabibMedicalSevicePage2())); projectViewModel.analytics.hmgServices.viewAll(); }, @@ -290,8 +289,7 @@ class _HomePageFragment2State extends State { child: InkWell( onTap: () { AuthenticatedUser user = projectViewModel.user; - if(projectViewModel.havePrivilege(82) || bypassPrivilageCheck) - Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user))); + if (projectViewModel.havePrivilege(82) || bypassPrivilageCheck) Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(user))); projectViewModel.analytics.offerPackages.log(); }, child: Stack( diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 0e79e4c8..80680df8 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -310,7 +310,8 @@ class _ConfirmLogin extends State { login_method = type; LoginRegistration.verificationMethod = type; - projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration); + if(!widget.fromRegistration) + projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration); switch (type) { case 1: diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 4d3c7718..bf2b2e29 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -209,7 +209,7 @@ class _ConfirmPaymentPageState extends State { child: DefaultButton( TranslationBase.of(context).confirm.toUpperCase(), () { - + // startApplePay(); if (widget.advanceModel.fileNumber == projectViewModel.user.patientID.toString()) { openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null); } else { diff --git a/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart b/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart index bcd367ff..ec20d414 100644 --- a/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart +++ b/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart @@ -2,20 +2,18 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'lacum-registration-page.dart'; - class LakumActivationVidaPage extends StatelessWidget { ProjectViewModel projectViewModel; - TextEditingController _identificationNumberController = - new TextEditingController(); + TextEditingController _identificationNumberController = new TextEditingController(); @override Widget build(BuildContext context) { @@ -50,10 +48,7 @@ class LakumActivationVidaPage extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: TextField( controller: _identificationNumberController, - decoration: new InputDecoration( - hintText: TranslationBase.of(context) - .enterIdentificationNumber, - ), + decoration: new InputDecoration(hintText: TranslationBase.of(context).enterIdentificationNumber, focusColor: CustomColors.green), keyboardType: TextInputType.number, style: TextStyle( fontSize: 16, @@ -67,39 +62,38 @@ class LakumActivationVidaPage extends StatelessWidget { margin: EdgeInsets.only(top: 4), child: BorderedButton( TranslationBase.of(context).accountActivation, - backgroundColor: - _identificationNumberController.text != null && - _identificationNumberController.text != "" - ? Color(0xff60686b) - : Color(0xffb0b4b5), + // backgroundColor: _identificationNumberController.text != null && _identificationNumberController.text != "" ? CustomColors.green : Color(0xffb0b4b5), textColor: Colors.white, + backgroundColor: CustomColors.green, + borderColor: CustomColors.green, fontSize: 16, hPadding: 8, vPadding: 12, - handler: _identificationNumberController.text != null || - _identificationNumberController.text != "" + handler: _identificationNumberController.text != null || _identificationNumberController.text != "" ? () { - model - .checkLacumAccountActivation( - _identificationNumberController.text) - .then((_) => { - if (model.state == ViewState.Idle) - { - Navigator.push( - context, - FadePage( - page: LakumRegistrationPage( - _identificationNumberController - .text))) - .then((status) => { - if (status == 200) - {model.makeAccountActivate(projectViewModel.user.patientIdentificationNo)} - // back to previous page - }) - } + model.checkLacumAccountActivation(_identificationNumberController.text).then((_) { + if (model.state == ViewState.Idle) { + if (model.lacumInformation.status != "Hold") { + AppToast.showErrorToast(message: TranslationBase.of(context).lakumUnhold); + if (model.lacumInformation.status != "Discontinue") { + AppToast.showErrorToast(message: TranslationBase.of(context).lakumDiscontinue); + } + } else { + if (model.lacumInformation.status == "Hold") { + model.makeAccountActivate(projectViewModel.user.patientIdentificationNo).then((value) { + AppToast.showSuccessToast(message: TranslationBase.of(context).lakumSuccess); + Navigator.of(context).pop(); }); + } + } + // Navigator.push(context, FadePage(page: LakumRegistrationPage(_identificationNumberController.text))).then((status) => { + // if (status == 200) {model.makeAccountActivate(projectViewModel.user.patientIdentificationNo)} + // // back to previous page + // }) + } + }); } - : () {}, + : null, ), ), ], diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 7b44b24a..d279b564 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2853,6 +2853,9 @@ class TranslationBase { String get termsConditions => localizedValues["termsConditions"][locale.languageCode]; String get liveCarePermissions => localizedValues["liveCarePermissions"][locale.languageCode]; String get prescriptionDeliveryError => localizedValues["prescriptionDeliveryError"][locale.languageCode]; + String get lakumUnhold => localizedValues["lakumUnhold"][locale.languageCode]; + String get lakumDiscontinue => localizedValues["lakumDiscontinue"][locale.languageCode]; + String get lakumSuccess => localizedValues["lakumSuccess"][locale.languageCode]; } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index e6acc895..7b0b0161 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -20,7 +20,11 @@ import 'package:flutter_inappwebview/flutter_inappwebview.dart'; enum _PAYMENT_TYPE { PACKAGES, PHARMACY, PATIENT } var _InAppBrowserOptions = InAppBrowserClassOptions( - inAppWebViewGroupOptions: InAppWebViewGroupOptions(crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true)), + inAppWebViewGroupOptions: InAppWebViewGroupOptions( + crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true), + ios: IOSInAppWebViewOptions( + applePayAPIEnabled: true, + )), crossPlatform: InAppBrowserOptions(hideUrlBar: true), ios: IOSInAppBrowserOptions( hideToolbarBottom: false, @@ -31,7 +35,7 @@ class MyInAppBrowser extends InAppBrowser { _PAYMENT_TYPE paymentType; // 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 APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT @@ -187,8 +191,8 @@ class MyInAppBrowser extends InAppBrowser { service.applePayInsertRequest(applePayInsertRequest, context).then((res) { if (context != null) GifLoaderDialogUtils.hideDialog(context); String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; - safariBrowser.open(url: Uri.parse(url)); - // this.browser.openUrl(url: url, options: _InAppBrowserOptions); + // safariBrowser.open(url: Uri.parse(url)); + this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(url)), options: _InAppBrowserOptions); }).catchError((err) { print(err); if (context != null) GifLoaderDialogUtils.hideDialog(context); @@ -220,7 +224,7 @@ class MyInAppBrowser extends InAppBrowser { if (order.customValuesXml.contains("ApplePay")) { safariBrowser.open(url: Uri.parse(value)); } else { - this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value))); + this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value)), options: _InAppBrowserOptions); } }); } diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index a39b9d6a..6865ece5 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -2,6 +2,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:badges/badges.dart'; import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; @@ -16,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/pr import 'package:diplomaticquarterapp/pages/search_products_page.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; @@ -404,6 +406,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget { else IconButton( onPressed: () { + AppSharedPreferences().remove(IS_LIVECARE_APPOINTMENT); Navigator.pushAndRemoveUntil( context, MaterialPageRoute(builder: (context) => LandingPage()), diff --git a/pubspec.yaml b/pubspec.yaml index 0165c607..0d80cd42 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.4.94+404094 +version: 4.4.95+404095 environment: sdk: ">=2.7.0 <3.0.0" @@ -202,7 +202,7 @@ dependencies: sms_otp_auto_verify: ^2.1.0 flutter_ios_voip_kit: ^0.0.5 - payfort_plugin: ^0.3.1 +# payfort_plugin: ^0.3.1 dependency_overrides: provider : ^5.0.0 From 5c32e488d082090da46718c424495f130245a94f Mon Sep 17 00:00:00 2001 From: Zohaib Iqbal Kambrani <> Date: Sun, 19 Jun 2022 11:12:19 +0300 Subject: [PATCH 08/20] no message --- lib/analytics/flows/advance_payments.dart | 6 ++--- lib/analytics/flows/appointments.dart | 22 +++++++++---------- .../medical/balance/confirm_payment_page.dart | 6 +++++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/lib/analytics/flows/advance_payments.dart b/lib/analytics/flows/advance_payments.dart index db52eb59..37f18068 100644 --- a/lib/analytics/flows/advance_payments.dart +++ b/lib/analytics/flows/advance_payments.dart @@ -67,10 +67,10 @@ class AdvancePayments{ } // R046 - payment_success({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ + payment_success({@required String hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ logger('payment_success', parameters: { - 'appointment_type' : appointment_type, - 'clinic_type_online' : clinic, + // 'appointment_type' : appointment_type, + // 'clinic_type_online' : clinic, 'payment_method' : payment_method, 'payment_type' : payment_type, 'hospital_name' : hospital, diff --git a/lib/analytics/flows/appointments.dart b/lib/analytics/flows/appointments.dart index 50a02c76..41bcbd69 100644 --- a/lib/analytics/flows/appointments.dart +++ b/lib/analytics/flows/appointments.dart @@ -181,17 +181,17 @@ class Appointment{ } // R049.1 // should be for appointment flow - appointment_actions(AppoitmentAllHistoryResultList appointment, String action){ - logger('to_do_list_pay_now', parameters: { - 'action_type' : action, - 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, - 'appointment_type' : appointment.appointmentType, - 'clinic_type_online' : appointment.clinicName, - 'hospital_name' : appointment.projectName, - 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, - 'payment_type' : 'appointment', - }); - } + // appointment_actions(AppoitmentAllHistoryResultList appointment, String action){ + // logger('to_do_list_pay_now', parameters: { + // 'action_type' : action, + // 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, + // 'appointment_type' : appointment.appointmentType, + // 'clinic_type_online' : appointment.clinicName, + // 'hospital_name' : appointment.projectName, + // 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + // 'payment_type' : 'appointment', + // }); + // } // R027 appointment_reminder(bool value){ diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 4d3c7718..a8515478 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -406,7 +406,13 @@ class _ConfirmPaymentPageState extends State { service.checkPaymentStatus(transID, AppGlobal.context).then((res) { String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { + String txn_ref = res['Merchant_Reference']; + String amount = res['Amount']; + String payment_method = res['PaymentMethod']; + final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; createAdvancePayment(res, appo); + projectViewModel.analytics.advancePayments.payment_success( + payment_type: 'wallet', payment_method: payment_method, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref, hospital: widget.advanceModel.hospitalsModel.name); } else { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: res['Response_Message']); From 29c6841888e7b09a7990e34250a0bc76e2216f38 Mon Sep 17 00:00:00 2001 From: Zohaib Iqbal Kambrani <> Date: Sun, 19 Jun 2022 11:27:22 +0300 Subject: [PATCH 09/20] Analytics --- lib/analytics/flows/appointments.dart | 73 ++++++++++++++------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/lib/analytics/flows/appointments.dart b/lib/analytics/flows/appointments.dart index 788ae28f..c405bc6a 100644 --- a/lib/analytics/flows/appointments.dart +++ b/lib/analytics/flows/appointments.dart @@ -41,8 +41,8 @@ class Appointment{ // R018.1 book_appointment_select_clinic({@required String appointment_type, clinic}){ - // appointment_type: regular | livecare - // clinic_type : $clinic_type + // appointment_type: regular | livecare + // clinic_type : $clinic_type logger('book_appointment_select_clinic', parameters: { 'appointment_type' : appointment_type, 'clinic_type' : clinic @@ -101,15 +101,15 @@ class Appointment{ // R023 book_appointment_date_selection({@required String appointment_type, @required day, @required DoctorList doctor}){ logger('book_appointment_date_selection', parameters: { - 'appointment_type' : appointment_type, - 'clinic_type' : doctor.clinicName, - 'hospital_name' : doctor.projectName, - 'treatment_type' : GAnalytics.TREATMENT_TYPE ?? '', - 'doctor_name' : doctor.name, - 'doctor_nationality' : doctor.nationalityName, - 'doctor_gender' : doctor.genderDescription, - 'appointment_day' : day - }); + 'appointment_type' : appointment_type, + 'clinic_type' : doctor.clinicName, + 'hospital_name' : doctor.projectName, + 'treatment_type' : GAnalytics.TREATMENT_TYPE ?? '', + 'doctor_name' : doctor.name, + 'doctor_nationality' : doctor.nationalityName, + 'doctor_gender' : doctor.genderDescription, + 'appointment_day' : day + }); } // R024.1 @@ -181,17 +181,17 @@ class Appointment{ } // R049.1 // should be for appointment flow - // appointment_actions(AppoitmentAllHistoryResultList appointment, String action){ - // logger('to_do_list_pay_now', parameters: { - // 'action_type' : action, - // 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, - // 'appointment_type' : appointment.appointmentType, - // 'clinic_type_online' : appointment.clinicName, - // 'hospital_name' : appointment.projectName, - // 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, - // 'payment_type' : 'appointment', - // }); - // } + appointment_actions(AppoitmentAllHistoryResultList appointment, String action){ + logger('appointment_actions', parameters: { + 'action_type' : action, + 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, + 'appointment_type' : appointment.appointmentType, + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } // R027 appointment_reminder(bool value){ @@ -232,14 +232,16 @@ class Appointment{ // R036 payment_success({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ - // appointment_type - // clinic_type_online - // payment_method - // payment_type: 'appointment' - // hospital_name - // transaction_number - // transaction_amount - // transaction_currency + logger('payment_success', parameters: { + 'appointment_type' : appointment_type, + 'payment_method' : payment_method, + 'payment_type' : payment_type, + 'hospital_name' : hospital, + 'clinic_type_online' : clinic, + 'transaction_number' : txn_number, + 'transaction_amount' : txn_amount, + 'transaction_currency' : txn_currency, + }); } @@ -260,15 +262,14 @@ class Appointment{ // R053 // Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment}){ - logger('appointment_details_cancel', parameters: { - }); - } - - appointment_cancel(){ logger('cancel_appointment', parameters: { 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, + 'appointment_type' : appointment.appointmentType, + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', }); } - } \ No newline at end of file From 4cbccd8efbd8ed92b345dd2caf866d5d3546ff00 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 19 Jun 2022 12:29:03 +0300 Subject: [PATCH 10/20] analytics events update --- lib/analytics/flows/advance_payments.dart | 14 ++++++++++++-- lib/analytics/flows/appointments.dart | 16 ++++++++++++++-- lib/pages/BookAppointment/BookSuccess.dart | 19 +++++++++++++++---- .../MyAppointments/AppointmentDetails.dart | 3 +-- .../medical/balance/confirm_payment_page.dart | 18 +++++++++++++----- 5 files changed, 55 insertions(+), 15 deletions(-) diff --git a/lib/analytics/flows/advance_payments.dart b/lib/analytics/flows/advance_payments.dart index 37f18068..22a7bce5 100644 --- a/lib/analytics/flows/advance_payments.dart +++ b/lib/analytics/flows/advance_payments.dart @@ -69,8 +69,6 @@ class AdvancePayments{ // R046 payment_success({@required String hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ logger('payment_success', parameters: { - // 'appointment_type' : appointment_type, - // 'clinic_type_online' : clinic, 'payment_method' : payment_method, 'payment_type' : payment_type, 'hospital_name' : hospital, @@ -79,4 +77,16 @@ class AdvancePayments{ 'transaction_currency' : txn_currency }); } + + payment_fail({@required String hospital, payment_method, payment_type, txn_amount, txn_currency, error_type}){ + logger('payment_fail', parameters: { + 'payment_method' : payment_method, + 'payment_type' : payment_type, + 'hospital_name' : hospital, + 'transaction_amount' : txn_amount, + 'transaction_currency' : txn_currency, + 'error_type' : error_type + }); + } + } \ No newline at end of file diff --git a/lib/analytics/flows/appointments.dart b/lib/analytics/flows/appointments.dart index c405bc6a..72ce8177 100644 --- a/lib/analytics/flows/appointments.dart +++ b/lib/analytics/flows/appointments.dart @@ -244,6 +244,19 @@ class Appointment{ }); } + payment_fail({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_amount, txn_currency, error_type}){ + logger('payment_fail', parameters: { + 'appointment_type' : appointment_type, + 'payment_method' : payment_method, + 'payment_type' : payment_type, + 'hospital_name' : hospital, + 'clinic_type_online' : clinic, + 'transaction_amount' : txn_amount, + 'transaction_currency' : txn_currency, + 'error_type' : error_type + }); + } + // Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document appointment_detail_action({@required AppoitmentAllHistoryResultList appointment, @required String action}){ @@ -267,8 +280,7 @@ class Appointment{ 'appointment_type' : appointment.appointmentType, 'clinic_type_online' : appointment.clinicName, 'hospital_name' : appointment.projectName, - 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, - 'payment_type' : 'appointment', + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName }); } diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 5132f118..a5f37d12 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -595,21 +595,32 @@ class _BookSuccessState extends State { } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String txn_ref; + String amount; + String payment_method; + final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) { String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { - String txn_ref = res['Merchant_Reference']; - String amount = res['Amount']; - String payment_method = res['PaymentMethod']; - final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; + txn_ref = res['Merchant_Reference']; + amount = res['Amount']; + payment_method = res['PaymentMethod']; createAdvancePayment(res, appo); projectViewModel.analytics.appointment.payment_success( appointment_type: 'regular', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref); } else { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: res['Response_Message']); + projectViewModel.analytics.appointment.payment_fail( + appointment_type: 'regular', + payment_method: payment_method, + clinic: appo.clinicName, + hospital: appo.projectName, + txn_amount: "$amount", + txn_currency: currency, + error_type: res['Response_Message']); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 885013b5..f235c8b1 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -614,8 +614,7 @@ class _AppointmentDetailsState extends State with SingleTick } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } - // projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo); - projectViewModel.analytics.appointment.appointment_cancel(); + projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index f361d166..5579b97f 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -397,25 +397,33 @@ class _ConfirmPaymentPageState extends State { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) checkPaymentStatus(appo); + // if (isPaymentMade) + checkPaymentStatus(appo); } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String txn_ref; + String amount; + String payment_method; + final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(AppGlobal.context); DoctorsListService service = new DoctorsListService(); service.checkPaymentStatus(transID, AppGlobal.context).then((res) { String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { - String txn_ref = res['Merchant_Reference']; - String amount = res['Amount']; - String payment_method = res['PaymentMethod']; - final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; + txn_ref = res['Merchant_Reference']; + amount = res['Amount'].toString(); + payment_method = res['PaymentMethod']; createAdvancePayment(res, appo); projectViewModel.analytics.advancePayments.payment_success( payment_type: 'wallet', payment_method: payment_method, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref, hospital: widget.advanceModel.hospitalsModel.name); } else { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: res['Response_Message']); + amount = widget.advanceModel.amount; + payment_method = widget.selectedPaymentMethod; + projectViewModel.analytics.advancePayments.payment_fail( + payment_type: 'wallet', payment_method: payment_method, txn_amount: "$amount", txn_currency: currency, hospital: widget.advanceModel.hospitalsModel.name, error_type: res['Response_Message']); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); From 7051b3ed63cc3c3fca4349cf93d311cb95b17f5f Mon Sep 17 00:00:00 2001 From: Zohaib Iqbal Kambrani <> Date: Tue, 21 Jun 2022 18:51:44 +0300 Subject: [PATCH 11/20] Analtyics at registration and liveacare payment fail --- ios/Podfile.lock | 12 ++++++++++ lib/analytics/flows/live_care.dart | 18 ++++++++------- lib/analytics/flows/login_registration.dart | 11 ++++++--- lib/config/config.dart | 4 ++-- lib/pages/livecare/widgets/clinic_list.dart | 13 +++++++++++ lib/pages/login/confirm-login.dart | 2 +- lib/pages/login/register-info.dart | 23 +++++++------------ .../webrtc/signaling.dart | 2 +- lib/widgets/in_app_browser/InAppBrowser.dart | 8 +++---- 9 files changed, 59 insertions(+), 34 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2d3d257b..21716fd1 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -111,6 +111,8 @@ PODS: - GoogleUtilities/UserDefaults (~> 7.6) - nanopb (~> 2.30908.0) - Flutter (1.0.0) + - flutter_app_icon_badge (0.0.1): + - Flutter - flutter_hms_gms_availability (0.0.1): - Flutter - flutter_inappwebview (0.0.1): @@ -120,6 +122,8 @@ PODS: - flutter_inappwebview/Core (0.0.1): - Flutter - OrderedSet (~> 5.0) + - flutter_ios_voip_kit (0.0.1): + - Flutter - flutter_local_notifications (0.0.1): - Flutter - flutter_native_timezone (0.0.1): @@ -279,8 +283,10 @@ DEPENDENCIES: - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - Flutter (from `Flutter`) + - flutter_app_icon_badge (from `.symlinks/plugins/flutter_app_icon_badge/ios`) - flutter_hms_gms_availability (from `.symlinks/plugins/flutter_hms_gms_availability/ios`) - flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`) + - flutter_ios_voip_kit (from `.symlinks/plugins/flutter_ios_voip_kit/ios`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_native_timezone (from `.symlinks/plugins/flutter_native_timezone/ios`) - flutter_nfc_kit (from `.symlinks/plugins/flutter_nfc_kit/ios`) @@ -370,10 +376,14 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_messaging/ios" Flutter: :path: Flutter + flutter_app_icon_badge: + :path: ".symlinks/plugins/flutter_app_icon_badge/ios" flutter_hms_gms_availability: :path: ".symlinks/plugins/flutter_hms_gms_availability/ios" flutter_inappwebview: :path: ".symlinks/plugins/flutter_inappwebview/ios" + flutter_ios_voip_kit: + :path: ".symlinks/plugins/flutter_ios_voip_kit/ios" flutter_local_notifications: :path: ".symlinks/plugins/flutter_local_notifications/ios" flutter_native_timezone: @@ -463,8 +473,10 @@ SPEC CHECKSUMS: FirebaseInstallations: 830327b45345ffc859eaa9c17bcd5ae893fd5425 FirebaseMessaging: 82c4a48638f53f7b184f3cc9f6cd2cbe533ab316 Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + flutter_app_icon_badge: 844847adbd7a1c6f325d6b41b942428981b839cc flutter_hms_gms_availability: babc50b18670e99780270bc18d9b17d0a07cd77e flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721 + flutter_ios_voip_kit: a3b4c5bd0cfda5069b5605a6d1dc60ecf99c6299 flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 flutter_native_timezone: 5f05b2de06c9776b4cc70e1839f03de178394d22 flutter_nfc_kit: 965c98c3fa68f5609f1cc89abb968fe1b8ffdbaa diff --git a/lib/analytics/flows/live_care.dart b/lib/analytics/flows/live_care.dart index 6d2f0c81..d85d82d8 100644 --- a/lib/analytics/flows/live_care.dart +++ b/lib/analytics/flows/live_care.dart @@ -89,13 +89,15 @@ class LiveCare{ } // R037 - livecare_immediate_consultation_payment_failed({@required String appointment_type, clinic, hospital, payment_method, payment_type, error_code, error_message}){ - // appointment_type - // clinic_type_online - // payment_method - // payment_type - // hospital_name - // error_code - // error_message + livecare_immediate_consultation_payment_failed({@required String appointment_type, clinic, payment_method, payment_type, txn_amount, txn_currency, error_message}){ + logger('livecare_immediate_consult_payment_fail', parameters: { + 'payment_method' : payment_method, + 'appointment_type' : appointment_type, + 'payment_type' : payment_type, + 'clinic_type_online' : clinic, + 'transaction_amount' : txn_amount, + 'transaction_currency' : txn_currency, + 'error_type' : error_message + }); } } \ No newline at end of file diff --git a/lib/analytics/flows/login_registration.dart b/lib/analytics/flows/login_registration.dart index 4134e9fd..200fe1bb 100644 --- a/lib/analytics/flows/login_registration.dart +++ b/lib/analytics/flows/login_registration.dart @@ -53,10 +53,15 @@ class LoginRegistration{ } // R010:registration_confirmation - registration_confirmation({@required String by}){ + registration_confirmation(){ // verification_method: by - logger('registration_confirmation', parameters: { - 'verification_method' : by + logger('registration_confirmation'); + } + + registration_fail({@required String errorType}){ + // verification_method: by + logger('registration_fail', parameters: { + 'error_type' : errorType }); } diff --git a/lib/config/config.dart b/lib/config/config.dart index 02ca3db1..b15f49a7 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,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/'; diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 7e759853..2d8e504c 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -73,6 +73,9 @@ class _clinic_listState extends State { ProjectViewModel projectViewModel; + String selectedPaymentMethod = ""; + String amount = ""; + @override void initState() { liveCareClinicsListResponse = new LiveCareClinicsListResponse(); @@ -299,6 +302,9 @@ class _clinic_listState extends State { openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); + selectedPaymentMethod = paymentMethod[0]; + this.amount = amount.toString(); + browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod[0], authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID, "", "", "", "", paymentMethod[1]); } @@ -330,15 +336,22 @@ class _clinic_listState extends State { } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String amount; + String payment_method; + final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(context); service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) { GifLoaderDialogUtils.hideDialog(context); String paymentInfo = res['Response_Message']; + amount = res['Amount'].toString(); + payment_method = res['PaymentMethod']; if (paymentInfo == 'Success') { addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo)); } else { AppToast.showErrorToast(message: res['Response_Message']); + projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed( + appointment_type: 'livecare', payment_type: 'appointment', payment_method: selectedPaymentMethod, txn_amount: this.amount, txn_currency: currency, error_message: res['Response_Message']); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 80680df8..3ac7e536 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -310,7 +310,7 @@ class _ConfirmLogin extends State { login_method = type; LoginRegistration.verificationMethod = type; - if(!widget.fromRegistration) + // if(!widget.fromRegistration) projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration); switch (type) { diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index a38514a3..5caba584 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -1,7 +1,4 @@ import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/locator.dart'; -import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; @@ -280,7 +277,8 @@ class _RegisterInfo extends State { children: [ Expanded( child: Padding( - padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () { + padding: EdgeInsets.all(10), + child: DefaultButton(TranslationBase.of(context).cancel, () { Navigator.of(context).pop(); locator().loginRegistration.registration_cancel(step: page == 1 ? 'personal info' : 'other details'); }, textColor: Colors.white, color: Color(0xffD02127))), @@ -288,17 +286,10 @@ class _RegisterInfo extends State { Expanded( child: Padding( padding: EdgeInsets.all(10), - child: DefaultButton( - page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, - (){ - nextPage(); - page == 1 - ? locator().loginRegistration.registration_personal_info() - : locator().loginRegistration.registration_patient_info(); - - }, - textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey) - ), + child: DefaultButton(page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, () { + nextPage(); + page == 1 ? locator().loginRegistration.registration_personal_info() : locator().loginRegistration.registration_patient_info(); + }, textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey)), ), ], ))); @@ -356,6 +347,7 @@ class _RegisterInfo extends State { sharedPref.setString(TOKEN, result.authenticationTokenID), AppToast.showSuccessToast(message: TranslationBase.of(context).successRegister), checkIfUserAgreedBefore(result), + projectViewModel.analytics.loginRegistration.registration_confirmation() } }) .catchError((err) { @@ -368,6 +360,7 @@ class _RegisterInfo extends State { okFunction: () => {ConfirmDialog.closeAlertDialog(context)}, cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); dialog.showAlertDialog(context); + projectViewModel.analytics.loginRegistration.registration_fail(errorType: err); }); } diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart index 4ca87644..d6e0a071 100644 --- a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart +++ b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart @@ -404,7 +404,7 @@ class Signaling { 'to': session.remote_user?.id, 'from': session.local_user.id, 'candidate': { - 'sdpMLineIndex': candidate.sdpMLineIndex, + 'sdpMLineIndex': candidate.sdpMlineIndex, 'sdpMid': candidate.sdpMid, 'candidate': candidate.candidate, }, diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 7b0b0161..062dfce8 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -37,13 +37,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/PayFortWebLive/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='; From 7018696328c45dd422f08d45ed53b5a2a94c66a8 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 22 Jun 2022 10:19:07 +0300 Subject: [PATCH 12/20] E-Cens sign off --- lib/analytics/flows/appointments.dart | 4 ++-- lib/config/config.dart | 4 ++-- lib/pages/BookAppointment/BookSuccess.dart | 7 ++++--- .../MyAppointments/AppointmentDetails.dart | 2 +- lib/pages/ToDoList/ToDo.dart | 17 +++++++++++++++++ lib/pages/login/confirm-login.dart | 6 ++++-- .../prescriptions/prescription_items_page.dart | 2 +- lib/widgets/in_app_browser/InAppBrowser.dart | 8 ++++---- pubspec.yaml | 2 -- 9 files changed, 35 insertions(+), 17 deletions(-) diff --git a/lib/analytics/flows/appointments.dart b/lib/analytics/flows/appointments.dart index 72ce8177..65fd415d 100644 --- a/lib/analytics/flows/appointments.dart +++ b/lib/analytics/flows/appointments.dart @@ -274,10 +274,10 @@ class Appointment{ // R053 // Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document - appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment}){ + appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment, appointment_type}){ logger('cancel_appointment', parameters: { 'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, - 'appointment_type' : appointment.appointmentType, + 'appointment_type' : appointment_type, 'clinic_type_online' : appointment.clinicName, 'hospital_name' : appointment.projectName, 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName diff --git a/lib/config/config.dart b/lib/config/config.dart index 02ca3db1..b15f49a7 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,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/'; diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index a5f37d12..d10f9c74 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -46,6 +46,7 @@ class _BookSuccessState extends State { AuthenticatedUser authUser; ProjectViewModel projectViewModel; + String selectedPaymentMethod = ""; @override initState() { @@ -546,7 +547,7 @@ class _BookSuccessState extends State { openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); - + selectedPaymentMethod = paymentMethod[0]; widget.browser.openPaymentBrowser( amount, "Appointment check in", @@ -615,10 +616,10 @@ class _BookSuccessState extends State { AppToast.showErrorToast(message: res['Response_Message']); projectViewModel.analytics.appointment.payment_fail( appointment_type: 'regular', - payment_method: payment_method, + payment_method: selectedPaymentMethod, clinic: appo.clinicName, hospital: appo.projectName, - txn_amount: "$amount", + txn_amount: widget.patientShareResponse.patientShareWithTax.toString(), txn_currency: currency, error_type: res['Response_Message']); } diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index f235c8b1..596b875e 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -614,7 +614,7 @@ class _AppointmentDetailsState extends State with SingleTick } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } - projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo); + projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo, appointment_type: widget.appo.isLiveCareAppointment ? "livecare" : "regular"); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 657829a8..6231d790 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -895,15 +895,32 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String txn_ref; + String amount; + String payment_method; + final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) { GifLoaderDialogUtils.hideDialog(context); String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { + txn_ref = res['Merchant_Reference']; + amount = res['Amount']; + payment_method = res['PaymentMethod']; createAdvancePayment(res, appo); + projectViewModel.analytics.appointment.payment_success( + appointment_type: 'regular', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref); } else { AppToast.showErrorToast(message: res['Response_Message']); + projectViewModel.analytics.appointment.payment_fail( + appointment_type: 'regular', + payment_method: payment_method, + clinic: appo.clinicName, + hospital: appo.projectName, + txn_amount: "$amount", + txn_currency: currency, + error_type: res['Response_Message']); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 80680df8..2006a900 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -42,6 +42,7 @@ import 'package:provider/provider.dart'; class ConfirmLogin extends StatefulWidget { final Function changePageViewIndex; final fromRegistration; + const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false}) : super(key: key); @override @@ -301,6 +302,7 @@ class _ConfirmLogin extends State { } int login_method = 0; + authenticateUser(int type, {int isActive}) { GifLoaderDialogUtils.showMyDialog(context); if (type == 2 || type == 3) { @@ -310,8 +312,8 @@ class _ConfirmLogin extends State { login_method = type; LoginRegistration.verificationMethod = type; - if(!widget.fromRegistration) - projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration); + // if(!widget.fromRegistration) + projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration); switch (type) { case 1: diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index 66102cf4..601e0a86 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -57,7 +57,7 @@ class PrescriptionItemsPage extends StatelessWidget { "", prescriptions.name, DateUtil.convertStringToDate(prescriptions.appointmentDate), - DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.prescriptionReportEnhList[0].orderDate)), + DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate : model.prescriptionReportListINP[0].orderDate)), prescriptions.nationalityFlagURL, prescriptions.doctorRate, prescriptions.actualDoctorRate, diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 7b0b0161..062dfce8 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -37,13 +37,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/PayFortWebLive/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='; diff --git a/pubspec.yaml b/pubspec.yaml index 0d80cd42..7c01f6d8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -202,8 +202,6 @@ dependencies: sms_otp_auto_verify: ^2.1.0 flutter_ios_voip_kit: ^0.0.5 -# payfort_plugin: ^0.3.1 - dependency_overrides: provider : ^5.0.0 permission_handler : ^6.0.1+1 From eb3f5b5cb557503920b40f3c4df6fdcd21a891a1 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 27 Jun 2022 15:01:20 +0300 Subject: [PATCH 13/20] Updates & fixes --- android/app/proguard-rules.pro | 2 + lib/config/config.dart | 2 +- .../request_send_rad_report_email.dart | 3 ++ .../service/medical/radiology_service.dart | 1 + lib/core/viewModels/project_view_model.dart | 2 +- .../NewCMC/new_cmc_step_tow_page.dart | 3 +- .../new_Home_health_care_step_tow_page.dart | 5 +- .../ancillaryOrdersDetails.dart | 2 +- lib/pages/Blood/confirm_payment_page.dart | 2 +- lib/pages/BookAppointment/BookConfirm.dart | 6 ++- lib/pages/BookAppointment/BookSuccess.dart | 6 +-- lib/pages/BookAppointment/DoctorProfile.dart | 2 +- .../components/LaserClinic.dart | 2 + .../covid-payment-summary.dart | 21 +++------ .../notification_details_page.dart | 47 ++++++++++++++++--- .../EdOnline/EdPaymentInformationPage.dart | 2 +- .../MyAppointments/AppointmentDetails.dart | 2 + lib/pages/ToDoList/ToDo.dart | 4 +- lib/pages/appUpdatePage/app_update_page.dart | 6 +-- lib/pages/livecare/widgets/clinic_list.dart | 6 +-- .../medical/balance/confirm_payment_page.dart | 1 - .../cart-page/payment_bottom_widget.dart | 11 ++--- .../webrtc/signaling.dart | 2 +- .../appointment_services/GetDoctorsList.dart | 11 +++-- lib/splashPage.dart | 8 ++-- lib/uitl/CalendarUtils.dart | 5 +- lib/uitl/push-notification-handler.dart | 6 ++- pubspec.yaml | 5 +- 28 files changed, 112 insertions(+), 63 deletions(-) diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 4a6fbc03..67361ef5 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -6,6 +6,8 @@ -keep class com.ejada.** { *; } -keep class org.webrtc.** { *; } +-keep class com.builttoroam.devicecalendar.** { *; } + -ignorewarnings -keepattributes *Annotation* -keepattributes Exceptions diff --git a/lib/config/config.dart b/lib/config/config.dart index b15f49a7..fde4f255 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -405,7 +405,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 8.4; +var VERSION_ID = 8.5; var SETUP_ID = '91877'; var LANGUAGE = 2; var PATIENT_OUT_SA = 0; diff --git a/lib/core/model/radiology/request_send_rad_report_email.dart b/lib/core/model/radiology/request_send_rad_report_email.dart index 6d68653d..a461156e 100644 --- a/lib/core/model/radiology/request_send_rad_report_email.dart +++ b/lib/core/model/radiology/request_send_rad_report_email.dart @@ -25,6 +25,7 @@ class RequestSendRadReportEmail { String to; String tokenID; double versionID; + int invoiceLineItemNo; RequestSendRadReportEmail( {this.channel, @@ -81,6 +82,7 @@ class RequestSendRadReportEmail { to = json['To']; tokenID = json['TokenID']; versionID = json['VersionID']; + invoiceLineItemNo = json['InvoiceLineItemNo']; } Map toJson() { @@ -111,6 +113,7 @@ class RequestSendRadReportEmail { data['To'] = this.to; data['TokenID'] = this.tokenID; data['VersionID'] = this.versionID; + data['InvoiceLineItemNo'] = this.invoiceLineItemNo; return data; } } diff --git a/lib/core/service/medical/radiology_service.dart b/lib/core/service/medical/radiology_service.dart index fceedf56..2147f31d 100644 --- a/lib/core/service/medical/radiology_service.dart +++ b/lib/core/service/medical/radiology_service.dart @@ -58,6 +58,7 @@ class RadiologyService extends BaseService { _requestSendRadReportEmail.projectID = finalRadiology.projectID; _requestSendRadReportEmail.clinicName = finalRadiology.clinicDescription; _requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo; + _requestSendRadReportEmail.invoiceLineItemNo = finalRadiology.invoiceLineItemNo; _requestSendRadReportEmail.setupID = finalRadiology.setupID; _requestSendRadReportEmail.doctorName = finalRadiology.doctorName; _requestSendRadReportEmail.orderDate = diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index dd3d3a62..89ed969d 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -32,6 +32,7 @@ class ProjectViewModel extends BaseViewModel { String error = ''; dynamic searchvalue; bool isLogin = false; + int laserSelectionDuration; dynamic get searchValue => searchvalue; @@ -49,7 +50,6 @@ class ProjectViewModel extends BaseViewModel { isLoginChild ? privilegeChildUser : privilegeChildUser; List selectedBodyPartList = []; - int laserSelectionDuration = 0; StreamSubscription subscription; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart index ae3be830..87d55b72 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart @@ -213,17 +213,16 @@ class _NewCMCStepTowPageState extends State { longitude: longitude, onPick: () { isNeedToUpdate = true; - print("onPickonPick1"); }, ); }, )); if (isNeedToUpdate) { - print("onPickonPick2"); _selectedAddress = new AddressInfo(); _selectedAddress.address1 = widget.model.addressesList.last.address1; showCurrentLocation = false; setLatitudeAndLongitude(); + setState(() {}); } }, child: Padding( diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart index d771f2b5..d89d9227 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart @@ -197,9 +197,10 @@ class _NewHomeHealthCareStepTowPageState extends State with SingleTic onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) checkPaymentStatus(appo); + checkPaymentStatus(appo); } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart index 15056bd0..28e46bdb 100644 --- a/lib/pages/Blood/confirm_payment_page.dart +++ b/lib/pages/Blood/confirm_payment_page.dart @@ -221,7 +221,7 @@ class ConfirmPaymentPage extends StatelessWidget { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) checkPaymentStatus(appo); + checkPaymentStatus(appo); } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 49404c6d..5be23b26 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -65,7 +65,7 @@ class _BookConfirmState extends State { @override Widget build(BuildContext context) { toDoProvider = Provider.of(context); - projectViewModel = Provider.of(context); + projectViewModel = Provider.of(context); return AppScaffold( appBarTitle: widget.doctor.doctorTitle + " " + widget.doctor.name, isShowDecPage: false, @@ -376,12 +376,16 @@ class _BookConfirmState extends State { getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { widget.service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) { + projectViewModel.selectedBodyPartList.clear(); + projectViewModel.laserSelectionDuration = 0; print(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res); navigateToBookSuccess(context, docObject, widget.patientShareResponse); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); // AppToast.showErrorToast(message: err); + projectViewModel.selectedBodyPartList.clear(); + projectViewModel.laserSelectionDuration = 0; navigateToHome(context); print(err); }); diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index d10f9c74..04bda097 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -592,12 +592,12 @@ class _BookSuccessState extends State { } onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { - if (isPaymentMade) checkPaymentStatus(appo); + checkPaymentStatus(appo); } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { String txn_ref; - String amount; + num amount; String payment_method; final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(context); @@ -625,7 +625,7 @@ class _BookSuccessState extends State { } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: err); + AppToast.showErrorToast(message: err.toString()); print(err); }); } diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index 9b0bdae3..a99bf39a 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -495,7 +495,7 @@ class _DoctorProfileState extends State with TickerProviderStateM void goToBookConfirm() async { if (DocAvailableAppointments.areSlotsAvailable) { - if (await sharedPref.getObject(USER_PROFILE) != null) { + if (projectViewModel.isLogin) { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; navigateToBookConfirm(context); projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); diff --git a/lib/pages/BookAppointment/components/LaserClinic.dart b/lib/pages/BookAppointment/components/LaserClinic.dart index 8522a915..04db5bed 100644 --- a/lib/pages/BookAppointment/components/LaserClinic.dart +++ b/lib/pages/BookAppointment/components/LaserClinic.dart @@ -239,6 +239,7 @@ class _LaserClinicState extends State with SingleTickerProviderStat result = LinkedHashSet.from(arr).toList(); numAll = result.length; + projectViewModel.laserSelectionDuration = _duration; navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); @@ -264,6 +265,7 @@ class _LaserClinicState extends State with SingleTickerProviderStat int duration = 0; if (_isFullBody) { _duration = int.parse(fullBody.timeDuration); + projectViewModel.laserSelectionDuration = duration; return _duration; } diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index 3c8c95b9..f934c932 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -14,13 +14,11 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; class CovidPaymentSummary extends StatefulWidget { @@ -229,8 +227,7 @@ class _CovidPaymentSummaryState extends State { widget.patientShareResponse.appointmentNo, widget.patientShareResponse.clinicID, widget.patientShareResponse.doctorID, - widget.selectedInstallmentPlan - ); + widget.selectedInstallmentPlan); } onBrowserLoadStart(String url) { @@ -256,16 +253,7 @@ class _CovidPaymentSummaryState extends State { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) { - checkPaymentStatus(appo); - } else { - print("onBrowserExit Payment Not made"); - Navigator.pushAndRemoveUntil( - context, - MaterialPageRoute(builder: (context) => LandingPage()), - (Route route) => false, - ); - } + checkPaymentStatus(appo); } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { @@ -280,6 +268,11 @@ class _CovidPaymentSummaryState extends State { } else { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: res['Response_Message']); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart index 4c5144ef..1365d77a 100644 --- a/lib/pages/DrawerPages/notifications/notification_details_page.dart +++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart @@ -4,12 +4,32 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:flutter/material.dart'; +import 'package:youtube_player_flutter/youtube_player_flutter.dart'; -class NotificationsDetailsPage extends StatelessWidget { +class NotificationsDetailsPage extends StatefulWidget { final GetNotificationsResponseModel notification; NotificationsDetailsPage({this.notification}); + @override + State createState() => _NotificationsDetailsPageState(); +} + +class _NotificationsDetailsPageState extends State { + YoutubePlayerController _controller; + + @override + void initState() { + _controller = YoutubePlayerController( + initialVideoId: getVideoURL(), + flags: YoutubePlayerFlags( + autoPlay: true, + mute: true, + ), + ); + super.initState(); + } + getDateForm(String date) { DateTime d = DateUtil.convertStringToDate(date); String monthName = DateUtil.getMonth(d.month).toString(); @@ -27,6 +47,13 @@ class NotificationsDetailsPage extends StatelessWidget { return monthName + ',${d.day},${d.year}, $hour'; } + String getVideoURL() { + String videoId; + videoId = YoutubePlayer.convertUrlToId(widget.notification.videoURL); + print(videoId); // BBAyRBTfsOU + return videoId; + } + @override Widget build(BuildContext context) { return AppScaffold( @@ -40,9 +67,9 @@ class NotificationsDetailsPage extends StatelessWidget { padding: EdgeInsets.all(21), children: [ Text( - DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(notification.createdOn)) + + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.notification.createdOn)) + " " + - DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(notification.createdOn), false), + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(widget.notification.createdOn), false), style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, @@ -50,10 +77,18 @@ class NotificationsDetailsPage extends StatelessWidget { letterSpacing: -0.64, ), ), - if (notification.messageTypeData.length != 0) + if (widget.notification.notificationType == "2") + Padding( + padding: const EdgeInsets.only(top: 18), + child: YoutubePlayer( + controller: _controller, + showVideoProgressIndicator: true, + ), + ), + if (widget.notification.messageTypeData.length != 0 && widget.notification.notificationType != "2") Padding( padding: const EdgeInsets.only(top: 18), - child: Image.network(notification.messageTypeData, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent loadingProgress) { + child: Image.network(widget.notification.messageTypeData, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent loadingProgress) { if (loadingProgress == null) return child; return Center( child: SizedBox( @@ -66,7 +101,7 @@ class NotificationsDetailsPage extends StatelessWidget { ), SizedBox(height: 18), Text( - notification.message.trim(), + widget.notification.message.trim(), style: TextStyle( fontSize: 12, fontWeight: FontWeight.w600, diff --git a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart index 86236ba2..d64e3c6c 100644 --- a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart +++ b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart @@ -195,7 +195,7 @@ class _EdPaymentInformationPageState extends State { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) checkPaymentStatus(appo); + checkPaymentStatus(appo); } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 596b875e..232bffc1 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -153,6 +153,7 @@ class _AppointmentDetailsState extends State with SingleTick if (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || + widget.appo.clinicID == 253 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) { @@ -170,6 +171,7 @@ class _AppointmentDetailsState extends State with SingleTick widget.appo.clinicID == 23 || widget.appo.clinicID == 47 || widget.appo.clinicID == 265 || + widget.appo.clinicID == 253 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment ? Tab( diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 6231d790..421948b6 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -891,12 +891,12 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) checkPaymentStatus(appo); + checkPaymentStatus(appo); } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { String txn_ref; - String amount; + num amount; String payment_method; final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed'; GifLoaderDialogUtils.showMyDialog(context); diff --git a/lib/pages/appUpdatePage/app_update_page.dart b/lib/pages/appUpdatePage/app_update_page.dart index 1296ac38..06ef0a38 100644 --- a/lib/pages/appUpdatePage/app_update_page.dart +++ b/lib/pages/appUpdatePage/app_update_page.dart @@ -7,7 +7,7 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:url_launcher/url_launcher.dart'; class AppUpdatePage extends StatefulWidget { - String appUpdateText; + final String appUpdateText; AppUpdatePage({@required this.appUpdateText}); @@ -59,9 +59,9 @@ class _AppUpdatePageState extends State { textAlign: TextAlign.center, style: TextStyle( color: Colors.grey[600], - fontSize: 16.0, + fontSize: 14.0, height: 1.5, - fontWeight: FontWeight.bold))), + fontWeight: FontWeight.w600))), Container( margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), child: ButtonTheme( diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 2d8e504c..ecd7b8b9 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -109,7 +109,6 @@ class _clinic_listState extends State { } void startLiveCare() { - bool isError = false; LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); @@ -332,7 +331,7 @@ class _clinic_listState extends State { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) checkPaymentStatus(appo); + checkPaymentStatus(appo); } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { @@ -397,7 +396,7 @@ class _clinic_listState extends State { liveCareOfflineClinicsListResponse.add(clinic); } }); - if(liveCareClinicIDs != null) { + if (liveCareClinicIDs != null) { selectedClinicID = int.parse(liveCareClinicIDs.split("-")[2]); selectedClinicName = liveCareClinicIDs.split("-")[0]; } else { @@ -616,7 +615,6 @@ class _clinic_listState extends State { } void startScheduleLiveCare() { - List doctorsList = []; LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 5579b97f..1dd94400 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -397,7 +397,6 @@ class _ConfirmPaymentPageState extends State { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - // if (isPaymentMade) checkPaymentStatus(appo); } diff --git a/lib/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart b/lib/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart index d74bfa87..0d68b329 100644 --- a/lib/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart +++ b/lib/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart @@ -163,14 +163,13 @@ class PaymentBottomWidget extends StatelessWidget { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); - if (isPaymentMade) { AppToast.showSuccessToast(message: "شكراً\nPayment status for your order is Paid"); // Navigator.pop(context); // Navigator.pop(context); - } else { - AppToast.showErrorToast(message: "Transaction Failed!\Your transaction is field to some reason please try again or contact to the administration"); - // Navigator.pop(context); - // Navigator.pop(context); - } + // } else { + // AppToast.showErrorToast(message: "Transaction Failed!\Your transaction is field to some reason please try again or contact to the administration"); + // // Navigator.pop(context); + // // Navigator.pop(context); + // } } } diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart index d6e0a071..4ca87644 100644 --- a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart +++ b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart @@ -404,7 +404,7 @@ class Signaling { 'to': session.remote_user?.id, 'from': session.local_user.id, 'candidate': { - 'sdpMLineIndex': candidate.sdpMlineIndex, + 'sdpMLineIndex': candidate.sdpMLineIndex, 'sdpMid': candidate.sdpMid, 'candidate': candidate.candidate, }, diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 59924807..8e77019a 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -367,15 +367,17 @@ class DoctorsListService extends BaseService { if (clinicID == 253) { List procedureID = projectViewModel.selectedBodyPartList.map((element) => element.id.toString()).toList(); request["GeneralProcedureList"] = procedureID; - request["InitialSlotDuration"] = projectViewModel.laserSelectionDuration; + if (procedureID.length == 1 && procedureID[0] == "1") { + request["InitialSlotDuration"] = 90; + } else { + request["InitialSlotDuration"] = projectViewModel.laserSelectionDuration; + } } dynamic localRes; await baseAppClient.post(INSERT_SPECIFIC_APPOINTMENT, onSuccess: (response, statusCode) async { localRes = response; - projectViewModel.selectedBodyPartList.clear(); - projectViewModel.laserSelectionDuration = 0; }, onFailure: (String error, int statusCode) { throw error; }, body: request); @@ -1415,7 +1417,8 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } - Future ER_InsertEROnlinePaymentDetails(AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, BuildContext context) async { + Future ER_InsertEROnlinePaymentDetails( + AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); diff --git a/lib/splashPage.dart b/lib/splashPage.dart index 325acce2..040a4c1a 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -93,10 +93,10 @@ class _SplashScreenState extends State { SizedBox( height: 7, ), - Text( - "Version 1.1.0", - style: TextStyle(fontSize: 10, fontWeight: FontWeight.w400, color: Color(0xff3989898), letterSpacing: 0, height: 12 / 10), - ), + // Text( + // "Version 1.1.0", + // style: TextStyle(fontSize: 10, fontWeight: FontWeight.w400, color: Color(0xff3989898), letterSpacing: 0, height: 12 / 10), + // ), SizedBox( height: 18, ) diff --git a/lib/uitl/CalendarUtils.dart b/lib/uitl/CalendarUtils.dart index 22c6e959..b79ea3ef 100644 --- a/lib/uitl/CalendarUtils.dart +++ b/lib/uitl/CalendarUtils.dart @@ -62,7 +62,10 @@ class CalendarUtils { TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime, _currentLocation); - print("eventId " + eventId); + print("eventId: " + eventId); + print("writableCalendars-name: " + writableCalendars.name); + print("writableCalendars-Id: " + writableCalendars.id); + print("writableCalendarsToString: " + writableCalendars.toString()); Event event = Event(writableCalendars.id, start: scheduleDateTimeUTZ, end: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description); deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) { print("catchError " + e.toString()); diff --git a/lib/uitl/push-notification-handler.dart b/lib/uitl/push-notification-handler.dart index 5fff8ef7..a1ff5ea3 100644 --- a/lib/uitl/push-notification-handler.dart +++ b/lib/uitl/push-notification-handler.dart @@ -284,7 +284,7 @@ class PushNotificationHandler { onToken(fcm_token); }); - FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String token){ + FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String token) { print("Push Notification getToken: " + token); onToken(token); }); @@ -310,6 +310,10 @@ class PushNotificationHandler { notification.createdOn = DateUtil.convertDateToString(DateTime.now()); notification.messageTypeData = remoteMessage.data['picture']; notification.message = remoteMessage.data['message']; + notification.notificationType = remoteMessage.data["NotificationType"].toString(); + if (remoteMessage.data["NotificationType"] == "2") { + notification.videoURL = remoteMessage.data["VideoUrl"]; + } await NavigationService.navigateToPage(NotificationsDetailsPage( notification: notification, diff --git a/pubspec.yaml b/pubspec.yaml index 7c01f6d8..37345cbc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.4.95+404095 +version: 4.4.97+404097 environment: sdk: ">=2.7.0 <3.0.0" @@ -135,7 +135,7 @@ dependencies: flutter_local_notifications: ^9.1.4 #device_calendar - device_calendar: ^4.0.1 + device_calendar: ^4.2.0 #Handle Geolocation geolocator: ^7.7.1 @@ -183,6 +183,7 @@ dependencies: syncfusion_flutter_sliders: ^19.3.55 searchable_dropdown: ^1.1.3 dropdown_search: 0.4.9 + youtube_player_flutter: ^8.0.0 # Dep by Zohaib shimmer: ^2.0.0 From b641f5b6a38e61a6bcfc99182ef405b169909c6f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 27 Jun 2022 15:34:20 +0300 Subject: [PATCH 14/20] Laser Male back image added --- assets/images/new/body_parts/male/back.png | Bin 0 -> 29671 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 assets/images/new/body_parts/male/back.png diff --git a/assets/images/new/body_parts/male/back.png b/assets/images/new/body_parts/male/back.png new file mode 100644 index 0000000000000000000000000000000000000000..224147ec17bdd125435b1e315002a33f59db01e0 GIT binary patch literal 29671 zcmXtEThQPd+}-`)?(R;I1a}GUuE7&r0zm^L*yFqRzNwm; zA5%3wHPhXD_u8wYRh4DYkcp8206>$MlTrr&5aoX-7y$qP+|XL++Xc=|LS6&>cKCzM zqX2*ske3qI@HRT{L4?w3d$1X3Zixtt=5OV9*DOzc!NwNX3y#7DV}db1ab+PQJdsQd zj(}iiKXHhmUy_7gala$J!IU6;0#j$vnuNj0t!J-s_*i3Lt#I0MK3&m1D!3%mWip7AfjQp_sHUFeV$+GQEhM6#2%;px|FOLtn2KH1T{tDJ zx$G2|h`O1L=EgkLZ;W)D+u%%wj^yrsZxba}T~WO^2wQBg_dYupJ)xRcM06pDC-+c0 zD^?7f0Z0;ao$fRe67(Zak}M{{VQ=>(=ZRx(vPsF`3h+x|k#$zisgO4td=Br)R>Bzj z+<{Bps1h<=;h0Ez;x8euyT(q3MA7!{+}=UN#nSS&-#*7oU;Cmorp!S4ux$Jk#@Z%+ zjc0VgpgR)+f_7)xX#I)0!xJ!YdHr^R*oWjH__OX^wzcb3dAz$c3@ixblRzuVBmp?RHgat zWj}WBWFyF~zk0DO?03JXfQ};ZxowW^QgI9-=&u-j{UFEIA`l+LZ^O<6vfPg!~j>?M2i+8)b)K@ zNBqYITtU}@>fhOZa@u+^wXW39?_~bzh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-k0X%5PG4y?o615Z^5a?P0-s{lYgNu4#wW-~1ZEdt07dRe$QWLf~ysIse7c^*jS zgy`pitk0#YtgNhWXl_p_SO-VP2{<|?OWpXiZ4O8eb|9m5w0HOXxgv)?Xe82^ot5L; zQ&X3G61ivHLSpUDAhGslx Date: Tue, 28 Jun 2022 16:32:27 +0300 Subject: [PATCH 15/20] Updates --- lib/config/config.dart | 2 +- .../prescriptions/prescription_report.dart | 2 +- .../prescription_report_enh.dart | 2 +- lib/core/service/client/base_app_client.dart | 7 +- lib/pages/ToDoList/payment_method_select.dart | 99 ++++++++++--------- lib/pages/appUpdatePage/app_update_page.dart | 13 ++- .../medical/balance/confirm_payment_page.dart | 29 +++++- lib/widgets/in_app_browser/InAppBrowser.dart | 11 ++- pubspec.yaml | 2 +- 9 files changed, 105 insertions(+), 62 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index fde4f255..c09f2cd2 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -405,7 +405,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 8.5; +var VERSION_ID = 8.6; var SETUP_ID = '91877'; var LANGUAGE = 2; var PATIENT_OUT_SA = 0; diff --git a/lib/core/model/prescriptions/prescription_report.dart b/lib/core/model/prescriptions/prescription_report.dart index 3eb30825..adad640e 100644 --- a/lib/core/model/prescriptions/prescription_report.dart +++ b/lib/core/model/prescriptions/prescription_report.dart @@ -23,7 +23,7 @@ class PrescriptionReport { String patientName; String phoneOffice1; String prescriptionQR; - int prescriptionTimes; + num prescriptionTimes; String productImage; String productImageBase64; String productImageString; diff --git a/lib/core/model/prescriptions/prescription_report_enh.dart b/lib/core/model/prescriptions/prescription_report_enh.dart index a43c56b2..a07a30c4 100644 --- a/lib/core/model/prescriptions/prescription_report_enh.dart +++ b/lib/core/model/prescriptions/prescription_report_enh.dart @@ -22,7 +22,7 @@ class PrescriptionReportEnh { String patientName; String phoneOffice1; Null prescriptionQR; - int prescriptionTimes; + num prescriptionTimes; Null productImage; Null productImageBase64; String productImageString; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 55684afe..d4ca669a 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; @@ -410,7 +409,11 @@ class BaseAppClient { } Future navigateToAppUpdate(context, String text) async { - Navigator.pushReplacement(context, FadePage(page: AppUpdatePage(appUpdateText: text))); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)), + (Route route) => false, + ); } get(String endPoint, diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart index 46cad3aa..3c1e8745 100644 --- a/lib/pages/ToDoList/payment_method_select.dart +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -199,55 +199,55 @@ class _PaymentMethodState extends State { ), ), if (projectViewModel.havePrivilege(90)) - // Container( - // width: double.infinity, - // child: InkWell( - // onTap: () { - // updateSelectedPaymentMethod("TAMARA"); - // }, - // child: Card( - // elevation: 0.0, - // margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), - // color: Colors.white, - // shape: RoundedRectangleBorder( - // borderRadius: BorderRadius.circular(10), - // side: selectedPaymentMethod == "TAMARA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), - // ), - // child: Padding( - // padding: const EdgeInsets.all(12.0), - // child: Row( - // children: [ - // Container( - // width: 24, - // height: 24, - // decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), - // ), - // mWidth(12), - // Container( - // height: 60.0, - // padding: EdgeInsets.all(0.0), - // width: 60, - // child: Image.asset("assets/images/new/payment/tamara.png"), - // ), - // mFlex(1), - // if (selectedPaymentMethod == "TAMARA") - // Container( - // decoration: containerRadius(CustomColors.green, 200), - // padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), - // child: Text( - // TranslationBase.of(context).paymentSelected, - // style: TextStyle( - // color: Colors.white, - // fontSize: 11, - // ), - // ), - // ), - // ], - // ), - // ), - // ), - // ), - // ), + Container( + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("TAMARA"); + }, + child: Card( + elevation: 0.0, + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: selectedPaymentMethod == "TAMARA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + width: 24, + height: 24, + decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(12), + Container( + height: 60.0, + padding: EdgeInsets.all(0.0), + width: 60, + child: Image.asset("assets/images/new/payment/tamara.png"), + ), + mFlex(1), + if (selectedPaymentMethod == "TAMARA") + Container( + decoration: containerRadius(CustomColors.green, 200), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + child: Text( + TranslationBase.of(context).paymentSelected, + style: TextStyle( + color: Colors.white, + fontSize: 11, + ), + ), + ), + ], + ), + ), + ), + ), + ), if (widget.isShowInstallments && projectViewModel.havePrivilege(91)) Container( width: double.infinity, @@ -382,6 +382,7 @@ class _PaymentMethodState extends State { ], ), ), + if(tamaraInstallmentDetails != null) Column( children: [ ...List.generate( diff --git a/lib/pages/appUpdatePage/app_update_page.dart b/lib/pages/appUpdatePage/app_update_page.dart index 06ef0a38..7ef1b6ff 100644 --- a/lib/pages/appUpdatePage/app_update_page.dart +++ b/lib/pages/appUpdatePage/app_update_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:in_app_update/in_app_update.dart'; import 'package:url_launcher/url_launcher.dart'; class AppUpdatePage extends StatefulWidget { @@ -93,7 +94,17 @@ class _AppUpdatePageState extends State { openAppUpdateLink() { if (Platform.isAndroid) { - _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); + // _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); + InAppUpdate.checkForUpdate().then((info) { + print("checkForUpdate!!!"); + print(info.toString()); + if (info.immediateUpdateAllowed) { + print("Immediate Allowed!!!"); + InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); + } + }).catchError((e) { + print(e.toString()); + }); } if (Platform.isIOS) { _launchURL("https://itunes.apple.com/app/id733503978"); diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 1dd94400..a3300122 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -51,6 +51,8 @@ class _ConfirmPaymentPageState extends State { String transID = ""; + String tamaraPaymentStatus; + String tamaraOrderID; Pay _payClient; @override @@ -378,6 +380,14 @@ class _ConfirmPaymentPageState extends State { print("onBrowserLoadStart"); print(url); + if (widget.selectedPaymentMethod == "TAMARA") { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']; + tamaraOrderID = uri.queryParameters['orderId']; + print(tamaraPaymentStatus); + print(tamaraOrderID); + } + MyInAppBrowser.successURLS.forEach((element) { if (url.contains(element)) { if (browser.isOpened()) browser.close(); @@ -397,7 +407,19 @@ class _ConfirmPaymentPageState extends State { onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { print("onBrowserExit Called!!!!"); + if (widget.selectedPaymentMethod == "TAMARA" && tamaraPaymentStatus != null && tamaraPaymentStatus == "approved") { + var res = { + "Amount": double.parse(widget.advanceModel.amount), + "ErrorMessage": null, + "Fort_id": tamaraOrderID, + "Merchant_Reference": "5058637919318707883366", + "PaymentMethod": "TAMARA", + "Response_Message": "Success" + }; + createAdvancePayment(res, appo); + } else { checkPaymentStatus(appo); + } } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { @@ -422,7 +444,12 @@ class _ConfirmPaymentPageState extends State { amount = widget.advanceModel.amount; payment_method = widget.selectedPaymentMethod; projectViewModel.analytics.advancePayments.payment_fail( - payment_type: 'wallet', payment_method: payment_method, txn_amount: "$amount", txn_currency: currency, hospital: widget.advanceModel.hospitalsModel.name, error_type: res['Response_Message']); + payment_type: 'wallet', + payment_method: payment_method, + txn_amount: "$amount", + txn_currency: currency, + hospital: widget.advanceModel.hospitalsModel.name, + error_type: res['Response_Message']); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 062dfce8..57985daf 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -21,14 +21,15 @@ enum _PAYMENT_TYPE { PACKAGES, PHARMACY, PATIENT } var _InAppBrowserOptions = InAppBrowserClassOptions( inAppWebViewGroupOptions: InAppWebViewGroupOptions( - crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true), + crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), ios: IOSInAppWebViewOptions( applePayAPIEnabled: true, )), - crossPlatform: InAppBrowserOptions(hideUrlBar: true), + crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black), ios: IOSInAppBrowserOptions( - hideToolbarBottom: false, + hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, + presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN )); class MyInAppBrowser extends InAppBrowser { @@ -55,9 +56,9 @@ class MyInAppBrowser extends InAppBrowser { static String PACKAGES_PAYMENT_SUCCESS_URL = '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentSuccess'; static String PACKAGES_PAYMENT_FAIL_URL = '$EXA_CART_API_BASE_URL/Checkout/MobilePaymentFailed'; - static List successURLS = ['success', 'PayFortResponse', 'PayFortSucess', 'mobilepaymentcomplete', 'orderdetails']; + static List successURLS = ['success', 'PayFortResponse', 'PayFortSucess', 'mobilepaymentcomplete', 'orderdetails', 'redirectToApplePay']; - static List errorURLS = ['PayfortCancel', 'errorpage', 'Failed', 'orderdetails']; + static List errorURLS = ['PayfortCancel', 'errorpage', 'Failed', 'orderdetails', 'redirectToApplePay']; final Function onExitCallback; final Function onLoadStartCallback; diff --git a/pubspec.yaml b/pubspec.yaml index 37345cbc..72c5fbb5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.4.97+404097 +version: 4.4.98+404098 environment: sdk: ">=2.7.0 <3.0.0" From 11529c65c5a4b0baafcb040c09bdcf635e5de3fe Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 29 Jun 2022 15:27:14 +0300 Subject: [PATCH 16/20] updates --- lib/config/config.dart | 3 +++ lib/config/shared_pref_kay.dart | 1 + .../LiveCare/ApplePayInsertRequest.dart | 4 ++++ .../notification_details_page.dart | 12 +++++++----- lib/pages/landing/landing_page.dart | 19 +++++++++++++------ .../livecare_services/livecare_provider.dart | 17 ++++++++++++++++- lib/splashPage.dart | 4 ++-- lib/uitl/push-notification-handler.dart | 1 + lib/widgets/in_app_browser/InAppBrowser.dart | 11 ++++------- pubspec.yaml | 2 +- 10 files changed, 52 insertions(+), 22 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index c09f2cd2..60336685 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -727,6 +727,9 @@ var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamara/Home/GetInstallments'; +var GET_ONESIGNAL_VOIP_TOKEN = + 'https://onesignal.com/api/v1/players'; + class AppGlobal { static var context; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 8ae7e20b..9e5c4f27 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -3,6 +3,7 @@ const APP_LANGUAGE = 'language'; const USER_PROFILE = 'user-profile'; const PUSH_TOKEN = 'push-token'; const APNS_TOKEN = 'apns-token'; +const ONESIGNAL_APNS_TOKEN = 'onesignal-apns-token'; const REGISTER_DATA_FOR_REGISTER = 'register-data-for-register'; const LOGIN_TOKEN_ID = 'register-data-for-register'; const REGISTER_DATA_FOR_LOGIIN = 'register-data-for-login'; diff --git a/lib/models/LiveCare/ApplePayInsertRequest.dart b/lib/models/LiveCare/ApplePayInsertRequest.dart index ab1bd2cc..fa001124 100644 --- a/lib/models/LiveCare/ApplePayInsertRequest.dart +++ b/lib/models/LiveCare/ApplePayInsertRequest.dart @@ -6,6 +6,7 @@ class ApplePayInsertRequest { int customerID; String customerName; String deviceToken; + String voipToken; int doctorID; String projectID; String serviceID; @@ -43,6 +44,7 @@ class ApplePayInsertRequest { this.customerID, this.customerName, this.deviceToken, + this.voipToken, this.doctorID, this.projectID, this.serviceID, @@ -80,6 +82,7 @@ class ApplePayInsertRequest { customerID = json['CustomerID']; customerName = json['CustomerName']; deviceToken = json['DeviceToken']; + voipToken = json['VoipToken']; doctorID = json['DoctorID']; projectID = json['ProjectID']; serviceID = json['Service_ID']; @@ -119,6 +122,7 @@ class ApplePayInsertRequest { data['CustomerID'] = this.customerID; data['CustomerName'] = this.customerName; data['DeviceToken'] = this.deviceToken; + data['VoipToken'] = this.voipToken; data['DoctorID'] = this.doctorID; data['ProjectID'] = this.projectID; data['Service_ID'] = this.serviceID; diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart index 1365d77a..ad4815d9 100644 --- a/lib/pages/DrawerPages/notifications/notification_details_page.dart +++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart @@ -24,7 +24,7 @@ class _NotificationsDetailsPageState extends State { initialVideoId: getVideoURL(), flags: YoutubePlayerFlags( autoPlay: true, - mute: true, + mute: false, ), ); super.initState(); @@ -48,10 +48,12 @@ class _NotificationsDetailsPageState extends State { } String getVideoURL() { - String videoId; - videoId = YoutubePlayer.convertUrlToId(widget.notification.videoURL); - print(videoId); // BBAyRBTfsOU - return videoId; + if (widget.notification.videoURL != null && widget.notification.notificationType == "2") { + String videoId; + videoId = YoutubePlayer.convertUrlToId(widget.notification.videoURL); + print(videoId); // BBAyRBTfsOU + return videoId; + } } @override diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index f6450f36..64685b1b 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -17,10 +17,10 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; -import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; @@ -40,7 +40,6 @@ import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_app_icon_badge/flutter_app_icon_badge.dart'; -import 'package:flutter_ios_voip_kit/call_state_type.dart'; import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -449,8 +448,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { } } - - dummyCall() async { final json = { "callerID": "s1", @@ -459,7 +456,6 @@ class _LandingPageState extends State with WidgetsBindingObserver { "notfID": "123", "notification_foreground": "true", "count": "1", - "message": "Doctor is calling ", "AppointmentNo": "123", "title": "Rayyan Hospital", @@ -473,7 +469,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { "appointmenttime": "09:00", "type": "video", "session_id": - "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk", + "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk", "identity": "Haroon1", "name": "SmallDailyStandup", "videoUrl": "video", @@ -703,6 +699,17 @@ class _LandingPageState extends State with WidgetsBindingObserver { } else { projectViewModel.analytics.setUser(null); } + String voipToken = await sharedPref.getString(APNS_TOKEN); + getOneSignalVOIPToken(voipToken); + } + + getOneSignalVOIPToken(String voipToken) { + LiveCareService service = new LiveCareService(); + service.getOneSignalVOIPToken(voipToken, context).then((res) { + AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, res['id']); + }).catchError((err) { + print(err); + }); } void showUserConsent() { diff --git a/lib/services/livecare_services/livecare_provider.dart b/lib/services/livecare_services/livecare_provider.dart index b30960b4..f9851ff7 100644 --- a/lib/services/livecare_services/livecare_provider.dart +++ b/lib/services/livecare_services/livecare_provider.dart @@ -201,7 +201,7 @@ class LiveCareService extends BaseService { Map request; String deviceToken; - String voipToken = await sharedPref.getString(APNS_TOKEN); + String voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); getDeviceToken().then((value) { print(value); deviceToken = value; @@ -314,4 +314,19 @@ class LiveCareService extends BaseService { return Future.value(localRes); } + Future getOneSignalVOIPToken(String voipToken, BuildContext context) async { + Map request; + + // request = {"app_id": "eb8e49e5-dec7-4ed2-8d6a-4df8cb301406", "identifier": voipToken, "device_type": 0, "test_type": 0}; + request = { "app_id": "eb8e49e5-dec7-4ed2-8d6a-4df8cb301406", "identifier": voipToken, "device_type": 0 }; + + dynamic localRes; + + await baseAppClient.post(GET_ONESIGNAL_VOIP_TOKEN, isExternal: true, isAllowAny: true, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } } diff --git a/lib/splashPage.dart b/lib/splashPage.dart index 040a4c1a..b5dc28bb 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -44,8 +44,8 @@ class _SplashScreenState extends State { AppSharedPreferences().getAll().then((value){ - debugPrint("ALL SHARED PREFERENCES!!!!!"); - debugPrint(jsonEncode(value)); + // debugPrint("ALL SHARED PREFERENCES!!!!!"); + // debugPrint(jsonEncode(value)); }); } diff --git a/lib/uitl/push-notification-handler.dart b/lib/uitl/push-notification-handler.dart index a1ff5ea3..a8b06051 100644 --- a/lib/uitl/push-notification-handler.dart +++ b/lib/uitl/push-notification-handler.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notificatio import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/uitl/app-permissions.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 57985daf..6e89bb01 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -26,11 +26,7 @@ var _InAppBrowserOptions = InAppBrowserClassOptions( applePayAPIEnabled: true, )), crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black), - ios: IOSInAppBrowserOptions( - hideToolbarBottom: true, - toolbarBottomBackgroundColor: Colors.white, - presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN - )); + ios: IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN)); class MyInAppBrowser extends InAppBrowser { _PAYMENT_TYPE paymentType; @@ -168,6 +164,7 @@ class MyInAppBrowser extends InAppBrowser { applePayInsertRequest.customerID = authenticatedUser.patientID; applePayInsertRequest.customerName = authenticatedUser.firstName; applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0; applePayInsertRequest.projectID = projId; applePayInsertRequest.serviceID = servID; @@ -254,8 +251,8 @@ class MyInAppBrowser extends InAppBrowser { form = form.replaceFirst('PATIENT_OUT_SA', authUser.outSA == 0 ? false.toString() : true.toString()); form = form.replaceFirst('PATIENT_TYPE_ID', patientData == null ? patientType.toString() : "1"); - // form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN) + "," + await sharedPref.getString(APNS_TOKEN)); - form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN)); + form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getString(PUSH_TOKEN) + "," + await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)); + // form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN)); form = form.replaceFirst('LATITUDE_VALUE', this.lat.toString()); form = form.replaceFirst('LONGITUDE_VALUE', this.long.toString()); diff --git a/pubspec.yaml b/pubspec.yaml index 72c5fbb5..6bc27e53 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.4.98+404098 +version: 4.4.99+404099 environment: sdk: ">=2.7.0 <3.0.0" From ca43849d9d431efe26a2a09b1835e913d9490c04 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 27 Jul 2022 14:24:23 +0300 Subject: [PATCH 17/20] CMC Updates --- lib/config/localized_values.dart | 1 + .../cmc_insert_pres_order_request_model.dart | 4 + .../AlHabibMedicalService/cmc_service.dart | 2 + lib/core/service/client/base_app_client.dart | 6 +- .../NewCMC/new_cmc_page.dart | 2 +- .../NewCMC/new_cmc_step_one_page.dart | 28 +- .../NewCMC/new_cmc_step_three_page.dart | 286 ++++++++++++++---- .../orders_log_details_page.dart | 2 +- lib/pages/BookAppointment/BookSuccess.dart | 4 +- .../components/SearchByClinic.dart | 47 +-- .../covid-dirvethru-questions.dart | 1 + lib/pages/ErService/ErOptions.dart | 1 + lib/pages/ToDoList/ToDo.dart | 2 +- lib/pages/landing/landing_page.dart | 7 +- lib/pages/settings/profile_setting.dart | 23 +- .../appointment_services/GetDoctorsList.dart | 3 +- lib/uitl/translations_delegate_base.dart | 1 + lib/widgets/in_app_browser/InAppBrowser.dart | 8 +- 18 files changed, 310 insertions(+), 118 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 14d8a6cb..7c8831eb 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1847,4 +1847,5 @@ const Map localizedValues = { "lakumUnhold": { "en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل" }, "lakumDiscontinue": { "en": "The account is closed", "ar": "الحساب مغلق" }, "lakumSuccess": { "en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح" }, + "deleteAccount": { "en": "Delete my account", "ar": "الحساب احذف" }, }; diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart index 7c621f35..9de08856 100644 --- a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart @@ -16,6 +16,7 @@ class CMCInsertPresOrderRequestModel { double longitude; int createdBy; int orderServiceID; + int projectID; List patientERCMCInsertServicesList; CMCInsertPresOrderRequestModel( @@ -36,6 +37,7 @@ class CMCInsertPresOrderRequestModel { this.longitude, this.createdBy, this.orderServiceID, + this.projectID, this.patientERCMCInsertServicesList}); CMCInsertPresOrderRequestModel.fromJson(Map json) { @@ -56,6 +58,7 @@ class CMCInsertPresOrderRequestModel { longitude = json['Longitude']; createdBy = json['CreatedBy']; orderServiceID = json['OrderServiceID']; + projectID = json['ProjectId']; if (json['PatientER_CMC_InsertServicesList'] != null) { patientERCMCInsertServicesList = new List(); @@ -84,6 +87,7 @@ class CMCInsertPresOrderRequestModel { data['longitude'] = this.longitude; // data['CreatedBy'] = this.createdBy; data['OrderServiceID'] = this.orderServiceID; + data['ProjectID'] = this.projectID; if (this.patientERCMCInsertServicesList != null) { data['procedures'] = this.patientERCMCInsertServicesList.map((v) => v.toJson()).toList(); diff --git a/lib/core/service/AlHabibMedicalService/cmc_service.dart b/lib/core/service/AlHabibMedicalService/cmc_service.dart index c6c2d82f..e1bb4154 100644 --- a/lib/core/service/AlHabibMedicalService/cmc_service.dart +++ b/lib/core/service/AlHabibMedicalService/cmc_service.dart @@ -133,6 +133,8 @@ class CMCService extends BaseService { Future insertCMCOrderRC({CMCInsertPresOrderRequestModel order}) async { hasError = false; String reqId = ""; + order.latitude = 0.0; + order.longitude = 0.0; await baseAppClient.post(ADD_CMC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { isOrderUpdated = true; reqId = response['response'].toString(); diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index d4ca669a..e9f4904f 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -129,9 +129,9 @@ class BaseAppClient { } } - // body['IdentificationNo'] = 2076117163; - // body['MobileNo'] = "966503109207"; - // body['PatientID'] = 1018977; //3844083 + // body['IdentificationNo'] = 1098574195; + // body['MobileNo'] = "966565001080"; + // body['PatientID'] = 1454600; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart index b6dfde7a..9efe2342 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart @@ -181,7 +181,7 @@ class _NewCMCPageState extends State with TickerProviderStateMixin { Expanded( child: Text( // !projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(), - widget.model.pendingOrder.projectName.trim().toString(), + widget.model.pendingOrder.projectName != null ? widget.model.pendingOrder.projectName.trim().toString() : "", style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), ), ), diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart index e6eefefe..0b6f49dd 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -161,19 +162,26 @@ class _NewCMCStepOnePageState extends State { widget.cMCInsertPresOrderRequestModel.patientOutSA = projectViewModel.user.outSA; widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList]; - await widget.model.getCustomerInfo(); + navigateTo( + context, + NewCMCStepThreePage( + cmcInsertPresOrderRequestModel: widget.cMCInsertPresOrderRequestModel, + model: widget.model, + ), + ); + // await widget.model.getCustomerInfo(); if (widget.model.state == ViewState.ErrorLocal) { Utils.showErrorToast(); } else { - navigateTo( - context, - NewCMCStepTowPage( - longitude: widget.longitude, - latitude: widget.latitude, - cmcInsertPresOrderRequestModel: widget.cMCInsertPresOrderRequestModel, - model: widget.model, - ), - ); + // navigateTo( + // context, + // NewCMCStepTowPage( + // longitude: widget.longitude, + // latitude: widget.latitude, + // cmcInsertPresOrderRequestModel: widget.cMCInsertPresOrderRequestModel, + // model: widget.model, + // ), + // ); } } }, diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart index cc83abdb..ec020f49 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart @@ -3,19 +3,24 @@ import 'dart:async'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:maps_launcher/maps_launcher.dart'; import 'package:provider/provider.dart'; class NewCMCStepThreePage extends StatefulWidget { @@ -31,6 +36,12 @@ class NewCMCStepThreePage extends StatefulWidget { class _NewCMCStepThreePageState extends State { Completer _controller = Completer(); + String projectDropdownValue; + List projectsList = []; + HospitalsModel selectedHospital; + final GlobalKey projectDropdownKey = GlobalKey(); + bool isLocationSelected = false; + static CameraPosition _kGooglePlex = CameraPosition( target: LatLng(37.42796133580664, -122.085749655962), zoom: 14.4746, @@ -53,6 +64,11 @@ class _NewCMCStepThreePageState extends State { zoom: 14.4746, ); } + WidgetsBinding.instance.addPostFrameCallback((_) { + // if (projectViewModel.isLogin) { + getProjectsList(); + // } + }); super.initState(); } @@ -100,53 +116,136 @@ class _NewCMCStepThreePageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - TranslationBase.of(context).orderDetails + " : ", - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.bold, - letterSpacing: -0.46, - color: CustomColors.grey, + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(top: 12), + padding: EdgeInsets.only(left: 0, right: 0, top: 0, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + key: projectDropdownKey, + hint: new Text(TranslationBase.of(context).selectHospital), + value: selectedHospital, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), + items: projectsList.map((item) { + return new DropdownMenuItem( + value: item, + child: new Text(item.name), + ); + }).toList(), + onChanged: (newValue) async { + setState(() { + selectedHospital = newValue; + projectDropdownValue = newValue.mainProjectID.toString(); + isLocationSelected = true; + widget.cmcInsertPresOrderRequestModel.projectID = newValue.mainProjectID; + // getDoctorsList(context); + }); + }, + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], ), ), SizedBox( height: 6, ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - height: 200, - decoration: containerColorRadiusBorder(Colors.white, 12, Colors.grey), - clipBehavior: Clip.antiAlias, - child: Container( - decoration: cardRadius(12), - clipBehavior: Clip.antiAlias, - margin: const EdgeInsets.all(0), - // child: GoogleMap( - // mapType: MapType.normal, - // markers: markers, - // initialCameraPosition: _kGooglePlex, - // onMapCreated: (GoogleMapController controller) { - // _controller.complete(controller); - // }, - // ), - child: Image.network( - "https://maps.googleapis.com/maps/api/staticmap?center=" + - widget.cmcInsertPresOrderRequestModel.latitude.toString() + - "," + - widget.cmcInsertPresOrderRequestModel.longitude.toString() + - "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" + - widget.cmcInsertPresOrderRequestModel.latitude.toString() + - "," + - widget.cmcInsertPresOrderRequestModel.longitude.toString() + - "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8", - width: double.infinity, - height: double.infinity, - fit: BoxFit.cover, - ), - ), - ), - ), + isLocationSelected + ? Padding( + padding: const EdgeInsets.all(8.0), + child: Stack( + children: [ + Container( + height: 200, + decoration: containerColorRadiusBorder(Colors.white, 12, Colors.grey), + clipBehavior: Clip.antiAlias, + child: Container( + decoration: cardRadius(12), + clipBehavior: Clip.antiAlias, + margin: const EdgeInsets.all(0), + child: Image.network( + "https://maps.googleapis.com/maps/api/staticmap?center=" + + selectedHospital.latitude.toString() + + "," + + selectedHospital.longitude.toString() + + "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" + + selectedHospital.latitude.toString() + + "," + + selectedHospital.longitude.toString() + + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8", + width: double.infinity, + height: double.infinity, + fit: BoxFit.cover, + ), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + InkWell( + onTap: () { + getDirections(); + }, + child: Container( + decoration: cardRadius(1000), + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6), + child: Row( + children: [ + Padding( + padding: const EdgeInsets.all(3.0), + child: SvgPicture.asset( + "assets/images/new/direction.svg", + width: 13, + height: 13, + ), + ), + mWidth(6), + Text( + TranslationBase.of(context).getDirections, + style: TextStyle( + color: Colors.black, + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ), + ), + ), + ], + ), + ], + ), + ) + : Container(), SizedBox( height: 12, ), @@ -196,32 +295,89 @@ class _NewCMCStepThreePageState extends State { children: [ Container( width: MediaQuery.of(context).size.width * 0.9, - child: SecondaryButton( - label: TranslationBase.of(context).confirm, - color: CustomColors.green, - onTap: () async { - GifLoaderDialogUtils.showMyDialog(context); - String requestId = await widget.model.insertCMCOrderRC(order: widget.cmcInsertPresOrderRequestModel); - GifLoaderDialogUtils.hideDialog(context); - if (widget.model.state != ViewState.ErrorLocal) { - //show scuccess dialog - showCMCConfirmDialog( - context, - requestId, - onClick: () { - Navigator.pop(context); - Navigator.pop(context); - }, - ); - } else { - AppToast.showErrorToast(message: widget.model.error); - } - }, - textColor: Theme.of(context).backgroundColor), + child: DefaultButton( + TranslationBase.of(context).confirm, + !isLocationSelected + ? null + : () async { + GifLoaderDialogUtils.showMyDialog(context); + String requestId = await widget.model.insertCMCOrderRC(order: widget.cmcInsertPresOrderRequestModel); + GifLoaderDialogUtils.hideDialog(context); + if (widget.model.state != ViewState.ErrorLocal) { + showCMCConfirmDialog( + context, + requestId, + onClick: () { + Navigator.pop(context); + Navigator.pop(context); + }, + ); + } else { + AppToast.showErrorToast(message: widget.model.error); + } + }, + color: CustomColors.green, + disabledColor: CustomColors.grey, + ), + // SecondaryButton( + // label: TranslationBase.of(context).confirm, + // color: CustomColors.green, + // onTap: () async { + // if(isLocationSelected) { + // GifLoaderDialogUtils.showMyDialog(context); + // String requestId = await widget.model.insertCMCOrderRC(order: widget.cmcInsertPresOrderRequestModel); + // GifLoaderDialogUtils.hideDialog(context); + // if (widget.model.state != ViewState.ErrorLocal) { + // showCMCConfirmDialog( + // context, + // requestId, + // onClick: () { + // Navigator.pop(context); + // Navigator.pop(context); + // }, + // ); + // } else { + // AppToast.showErrorToast(message: widget.model.error); + // } + // } else { + // Utils.showErrorToast("Please select hospital from the dropdown menu to continue"); + // } + // }, + // textColor: Theme.of(context).backgroundColor), ), ], ), ), ); } + + getDirections() { + if (isLocationSelected) { + MapsLauncher.launchCoordinates(double.parse(selectedHospital.latitude), double.parse(selectedHospital.longitude), selectedHospital.name); + } else { + Utils.showErrorToast("Please select address from the dropdown menu to get directions"); + } + } + + getProjectsList() { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + List projectsListLocal = []; + service.getProjectsList(context).then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + res['ListProject'].forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + }); + } + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } } diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart index 78c1d140..39de5bf7 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart @@ -134,7 +134,7 @@ class OrdersLogDetailsPage extends StatelessWidget { Expanded( child: Text( // !projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(), - order.projectName.trim().toString(), + order.projectName != null ? order.projectName.trim().toString() : "", style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), ), ), diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 04bda097..de9b9c70 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -265,6 +265,7 @@ class _BookSuccessState extends State { appo.serviceID = widget.patientShareResponse.serviceID; appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; appo.doctorID = widget.patientShareResponse.doctorID; + appo.appointmentDate = widget.patientShareResponse.appointmentDate; if (appo.isLiveCareAppointment) insertLiveCareVIDARequest(appo); else @@ -425,6 +426,7 @@ class _BookSuccessState extends State { appo.serviceID = widget.patientShareResponse.serviceID; appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; appo.doctorID = widget.patientShareResponse.doctorID; + appo.appointmentDate = widget.patientShareResponse.appointmentDate; insertLiveCareVIDARequest(appo, isMoveHome: false); }).catchError((err) { // GifLoaderDialogUtils.hideDialog(context); @@ -458,7 +460,7 @@ class _BookSuccessState extends State { insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo, {bool isMoveHome = true}) { DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(context); - service.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, context).then((res) { + service.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { if (isMoveHome) navigateToHome(context); diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 8c11386a..0c7a9546 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -23,7 +23,6 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; import 'LaserClinic.dart'; @@ -219,6 +218,7 @@ class _SearchByClinicState extends State { dropdownValue = result.clinicID.toString(); setState(() { if (!isDentalSelectedAndSupported()) { + dropdownValue = ""; projectDropdownValue = ""; getDoctorsList(context); } else {} @@ -237,11 +237,10 @@ class _SearchByClinicState extends State { clincs.clinicID.toString() + "-" + clincs.isLiveCareClinicAndOnline.toString() + "-" + clincs.liveCareClinicID.toString() + "-" + clincs.liveCareServiceID.toString(); if (dropdownValue == "253-false-0-0") { Navigator.push(context, FadePage(page: LaserClinic())); - } else if (!isDentalSelectedAndSupported() && !nearestAppo) { + } else if (!isDentalSelectedAndSupported()) { projectDropdownValue = ""; getDoctorsList(context); - } else { - } + } else {} }); projectViewModel.analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription); }); @@ -325,7 +324,7 @@ class _SearchByClinicState extends State { child: new Text(item.name), ); }).toList(), - onChanged: (newValue) async{ + onChanged: (newValue) async { setState(() { selectedHospital = newValue; projectDropdownValue = newValue.mainProjectID.toString(); @@ -494,29 +493,32 @@ class _SearchByClinicState extends State { getProjectsList() { ClinicListService service = new ClinicListService(); List projectsListLocal = []; - service.getProjectsList(context).then((res) { - if (res['MessageStatus'] == 1) { - setState(() { - res['ListProject'].forEach((v) { - projectsListLocal.add(new HospitalsModel.fromJson(v)); - }); - projectsList = projectsListLocal; + service + .getProjectsList(context) + .then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + res['ListProject'].forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + }); + filterClinic(); + isProjectLoaded = true; + } else { + isProjectLoaded = false; + } + }) + .catchError((err) {}) + .catchError((err) { + print(err); }); - filterClinic(); - isProjectLoaded = true; - } else { - isProjectLoaded = false; - } - }).catchError((err) { - }).catchError((err) { - print(err); - }); } // TODO Mosa_REMARk to come back later getDoctorsList(BuildContext context) { SearchInfo searchInfo = new SearchInfo(); - if (dropdownValue.split("-")[0] == "17") { + if (dropdownValue != null) if (dropdownValue.split("-")[0] == "17") { searchInfo.ProjectID = int.parse(projectDropdownValue); searchInfo.ClinicID = int.parse(dropdownValue.split("-")[0]); searchInfo.hospital = selectedHospital; @@ -633,6 +635,7 @@ class _SearchByClinicState extends State { .then((value) { setState(() { dropdownValue = null; + dropdownTitle = ""; }); getProjectsList(); }); diff --git a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart index 0dc23227..ef4bf39a 100644 --- a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart +++ b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart @@ -273,6 +273,7 @@ class CovidDirveThruQuestionsState extends State { all = all && (element["ans"] == 1 || element["ans"] == 0); }); if (all) if (qa[0]["ans"] == 1) { + sharedPref.setObject(COVID_QA_LIST, qa); openPassportUpdatePage(); } else { sharedPref.setObject(COVID_QA_LIST, qa); diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart index 40bcc1af..e733ca89 100644 --- a/lib/pages/ErService/ErOptions.dart +++ b/lib/pages/ErService/ErOptions.dart @@ -88,6 +88,7 @@ class _ErOptionsState extends State { InkWell( onTap: () { if (projectViewModel.havePrivilege(81)) Navigator.push(context, FadePage(page: DdServicesPage())); + // Navigator.push(context, FadePage(page: DdServicesPage())); }, child: MedicalProfileItem( title: "ED", diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 421948b6..96da5d1f 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -1008,7 +1008,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) { GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); - service.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, context).then((res) { + service.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 64685b1b..834bf465 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; @@ -699,8 +700,10 @@ class _LandingPageState extends State with WidgetsBindingObserver { } else { projectViewModel.analytics.setUser(null); } - String voipToken = await sharedPref.getString(APNS_TOKEN); - getOneSignalVOIPToken(voipToken); + if (Platform.isIOS) { + String voipToken = await sharedPref.getString(APNS_TOKEN); + getOneSignalVOIPToken(voipToken); + } } getOneSignalVOIPToken(String voipToken) { diff --git a/lib/pages/settings/profile_setting.dart b/lib/pages/settings/profile_setting.dart index 8769b00a..7cfc3acb 100644 --- a/lib/pages/settings/profile_setting.dart +++ b/lib/pages/settings/profile_setting.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -31,16 +30,13 @@ class _ProfileSettings extends State with TickerProviderStateMi @override void initState() { - super.initState(); } Widget build(BuildContext context) { projectProvider = Provider.of(context); return BaseView( - onModelReady: (model) => { - getSettings() - }, + onModelReady: (model) => {getSettings()}, builder: (_, model, wi) => Container( child: model.user != null ? Column( @@ -217,6 +213,14 @@ class _ProfileSettings extends State with TickerProviderStateMi inputWidget(TranslationBase.of(context).emergencyName, "", emergencyContactName), mHeight(8), inputWidget(TranslationBase.of(context).emergencyContact, "", emergencyContact), + mHeight(10), + InkWell( + onTap: () {}, + child: Text( + TranslationBase.of(context).deleteAccount, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.64, color: Color(0xffD02127), decoration: TextDecoration.underline), + ), + ), mHeight(8), ], ), @@ -248,6 +252,10 @@ class _ProfileSettings extends State with TickerProviderStateMi ); } + deactivateAccount() { + + } + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) { return Container( padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), @@ -333,8 +341,9 @@ class _ProfileSettings extends State with TickerProviderStateMi getSettings() { // GifLoaderDialogUtils.showMyDialog(AppGlobal.context); authService.getSettings().then((result) => { - // GifLoaderDialogUtils.hideDialog(AppGlobal.context), - setValue(result["PateintInfoForUpdateList"][0])}); + // GifLoaderDialogUtils.hideDialog(AppGlobal.context), + setValue(result["PateintInfoForUpdateList"][0]) + }); } setValue(value) { diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 8e77019a..e694a148 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -707,7 +707,7 @@ class DoctorsListService extends BaseService { return Future.value(localRes); } - Future insertVIDARequest(int appoNo, int clinicID, int projectID, int serviceID, int docID, BuildContext context) async { + Future insertVIDARequest(int appoNo, int clinicID, int projectID, int serviceID, int docID, String appoDate, BuildContext context) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -727,6 +727,7 @@ class DoctorsListService extends BaseService { request = { "AppointmentNo": appoNo, + "AppointmentDate": appoDate, "ClinicID": clinicID, "ProjectID": projectID, "ServiceID": serviceID, diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index d279b564..e7faf572 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2856,6 +2856,7 @@ class TranslationBase { String get lakumUnhold => localizedValues["lakumUnhold"][locale.languageCode]; String get lakumDiscontinue => localizedValues["lakumDiscontinue"][locale.languageCode]; String get lakumSuccess => localizedValues["lakumSuccess"][locale.languageCode]; + String get deleteAccount => localizedValues["deleteAccount"][locale.languageCode]; } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 6e89bb01..7d6b31ab 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -34,13 +34,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/PayFortWebLive/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='; From 3896f02d13ec3d4edfa187b9beda7e9fa366ea06 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 1 Aug 2022 15:06:16 +0300 Subject: [PATCH 18/20] Timezone Updates --- .../NewCMC/new_cmc_page.dart | 40 +++--- lib/pages/BookAppointment/BookConfirm.dart | 7 +- .../components/DocAvailableAppointments.dart | 33 +++-- lib/pages/MyAppointments/MyAppointments.dart | 1 + lib/pages/ToDoList/ToDo.dart | 23 ++- .../medical/balance/confirm_payment_page.dart | 3 +- lib/uitl/date_uitl.dart | 131 +++++++----------- lib/widgets/in_app_browser/InAppBrowser.dart | 15 +- 8 files changed, 124 insertions(+), 129 deletions(-) diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart index 9efe2342..d67f8a8e 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart @@ -1,11 +1,9 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -90,23 +88,23 @@ class _NewCMCPageState extends State with TickerProviderStateMixin { showDialog( context: context, builder: (cxt) => ConfirmWithMessageDialog( - message: TranslationBase.of(context).cancelOrderMsg, - onTap: () async { - UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3); - Future.delayed(new Duration(milliseconds: 300)).then((value) async { - GifLoaderDialogUtils.showMyDialog(_context); - await model.updateCmcPresOrder(updatePresOrderRequestModel); - if (model.state == ViewState.ErrorLocal) { - Utils.showErrorToast(model.error); - GifLoaderDialogUtils.hideDialog(_context); - } else { - AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); - await model.getCmcAllPresOrders(); - GifLoaderDialogUtils.hideDialog(_context); - } - }); - }, - )); + message: TranslationBase.of(context).cancelOrderMsg, + onTap: () async { + UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3); + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + GifLoaderDialogUtils.showMyDialog(_context); + await model.updateCmcPresOrder(updatePresOrderRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + GifLoaderDialogUtils.hideDialog(_context); + } else { + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + await model.getCmcAllPresOrders(); + GifLoaderDialogUtils.hideDialog(_context); + } + }); + }, + )); } int status = widget.model.pendingOrder != null ? widget.model.pendingOrder.statusId : 0; @@ -140,7 +138,6 @@ class _NewCMCPageState extends State with TickerProviderStateMixin { margin: EdgeInsets.zero, clipBehavior: Clip.antiAlias, child: Container( - // decoration: containerColorRadiusLeft(Colors.white, 12), margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), decoration: BoxDecoration( @@ -180,8 +177,7 @@ class _NewCMCPageState extends State with TickerProviderStateMixin { ), Expanded( child: Text( - // !projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(), - widget.model.pendingOrder.projectName != null ? widget.model.pendingOrder.projectName.trim().toString() : "", + widget.model.pendingOrder.projectName != null ? widget.model.pendingOrder.projectName.trim().toString() : "", style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), ), ), diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index 5be23b26..4e6fe0d6 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -274,7 +274,9 @@ class _BookConfirmState extends State { GifLoaderDialogUtils.showMyDialog(context); AppoitmentAllHistoryResultList appo; - widget.service.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, null, null, null, projectViewModel).then((res) { + widget.service + .insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, null, null, null, projectViewModel) + .then((res) { if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); @@ -316,7 +318,8 @@ class _BookConfirmState extends State { insertLiveCareScheduledAppointment(context, DoctorList docObject) { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; - + widget.selectedDate = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[0]; + widget.selectedTime = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[1].substring(0, 5); GifLoaderDialogUtils.showMyDialog(context); AppoitmentAllHistoryResultList appo; widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) { diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 67ef388b..46f8a6ce 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -13,7 +13,6 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; -import 'package:jiffy/jiffy.dart'; import 'package:provider/provider.dart'; import 'package:syncfusion_flutter_calendar/calendar.dart'; @@ -57,6 +56,7 @@ class _DocAvailableAppointmentsState extends State wit ScrollController _scrollController; var language; + bool isLiveCareSchedule; @override void didUpdateWidget(covariant DocAvailableAppointments oldWidget) { @@ -81,7 +81,7 @@ class _DocAvailableAppointmentsState extends State wit WidgetsBinding.instance.addPostFrameCallback((_) async { getCurrentLanguage(); - bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT); + isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT); if (isLiveCareSchedule != null && isLiveCareSchedule) getDoctorScheduledFreeSlots(context, widget.doctor); else { @@ -233,23 +233,32 @@ class _DocAvailableAppointmentsState extends State wit final DateFormat formatter = DateFormat('HH:mm'); final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); for (var i = 0; i < freeSlotsResponse.length; i++) { - if ((widget.doctor.projectID == 2 && DateTime.now().timeZoneName == "+04") || widget.doctor.projectID == 3 && DateTime.now().timeZoneName == "+04") { - date = Jiffy(DateUtil.convertStringToDate(freeSlotsResponse[i])).subtract(hours: 1).dateTime; - } else { - date = DateUtil.convertStringToDate(freeSlotsResponse[i]); - } + date = (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[i]) + : DateUtil.convertStringToDateSaudiTimezone(freeSlotsResponse[i], widget.doctor.projectID); slotsList.add(FreeSlot(date, ['slot'])); docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date)); } _eventsParsed = Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event); setState(() { - DocAvailableAppointments.selectedDate = dateFormatter.format(DateUtil.convertStringToDate(freeSlotsResponse[0])); - DocAvailableAppointments.selectedAppoDateTime = DateUtil.convertStringToDate(freeSlotsResponse[0]); - selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(DateUtil.convertStringToDate(freeSlotsResponse[0]), language); + DocAvailableAppointments.selectedDate = dateFormatter.format((isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone(freeSlotsResponse[0], widget.doctor.projectID)); + DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone(freeSlotsResponse[0], widget.doctor.projectID); + selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone(freeSlotsResponse[0], widget.doctor.projectID), + language); selectedDateJSON = freeSlotsResponse[0]; }); - openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots); - _calendarController.selectedDate = DateUtil.convertStringToDate(selectedDateJSON); + openTimeSlotsPickerForDate( + (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(selectedDateJSON) : DateUtil.convertStringToDateSaudiTimezone(selectedDateJSON, widget.doctor.projectID), + docFreeSlots); + _calendarController.selectedDate = + (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(selectedDateJSON) : DateUtil.convertStringToDateSaudiTimezone(selectedDateJSON, widget.doctor.projectID); _calendarController.displayDate = _calendarController.selectedDate; return _eventsParsed; } diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index b65c5235..e0eb15a0 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -378,6 +378,7 @@ class _MyAppointmentsState extends State with SingleTickerProvid date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate), isSortByClinic: _isSortByClinic, rating: _appointmentResult.actualDoctorRate + 0.0, + // appointmentTime: _appointmentResult.isLiveCareAppointment ? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5) : _appointmentResult.startTime.substring(0, 5), appointmentTime: _appointmentResult.startTime.substring(0, 5), remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED) ? _appointmentResult.remaniningHoursTocanPay diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 96da5d1f..1b842624 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -214,7 +214,8 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { borderRadius: BorderRadius.circular(6), ), child: Text( - getNextActionText(widget.appoList[index].nextAction), textAlign: TextAlign.center, + getNextActionText(widget.appoList[index].nextAction), + textAlign: TextAlign.center, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), ), ), @@ -246,8 +247,24 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { mainAxisSize: MainAxisSize.min, children: [ MyRichText(TranslationBase.of(context).clinic + ": ", widget.appoList[index].clinicName, projectViewModel.isArabic), - MyRichText(TranslationBase.of(context).appointmentDate + ": ", - DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.appoList[index].appointmentDate)) + " " + widget.appoList[index].startTime.substring(0, 5), projectViewModel.isArabic), + // MyRichText(TranslationBase.of(context).appointmentDate + ": ", + // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.appoList[index].appointmentDate)) + " " + widget.appoList[index].startTime.substring(0, 5), projectViewModel.isArabic), + + // Timezone changes + widget.appoList[index].isLiveCareAppointment + ? MyRichText( + TranslationBase.of(context).appointmentDate + ": ", + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.appoList[index].appointmentDate)) + + " " + + DateUtil.convertStringToDate(widget.appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5), + projectViewModel.isArabic) + : MyRichText( + TranslationBase.of(context).appointmentDate + ": ", + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.appoList[index].appointmentDate)) + + " " + + widget.appoList[index].startTime.substring(0, 5), + projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).branch, widget.appoList[index].projectName, projectViewModel.isArabic), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index a3300122..4dbf6b8f 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -211,9 +211,8 @@ class _ConfirmPaymentPageState extends State { child: DefaultButton( TranslationBase.of(context).confirm.toUpperCase(), () { - // startApplePay(); if (widget.advanceModel.fileNumber == projectViewModel.user.patientID.toString()) { - openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null); + openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null); } else { GifLoaderDialogUtils.showMyDialog(context); model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) { diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index dd336844..cac6a07d 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -10,11 +10,34 @@ class DateUtil { const end = "+0300)"; final startIndex = date.indexOf(start); final endIndex = date.indexOf(end, startIndex + start.length); + return DateTime.fromMillisecondsSinceEpoch(int.parse( + date.substring(startIndex + start.length, endIndex), + )); + } else + return DateTime.now(); + } + + static DateTime convertStringToDateSaudiTimezone(String date, int projectId) { + if (date != null) { + const start = "/Date("; + const end = "+0300)"; + final startIndex = date.indexOf(start); + final endIndex = date.indexOf(end, startIndex + start.length); + // if (projectId == 2 || projectId == 3) { + // return DateTime.fromMillisecondsSinceEpoch( + // int.parse( + // date.substring(startIndex + start.length, endIndex), + // ), + // isUtc: true) + // .add(Duration(hours: 4)); + // } else { return DateTime.fromMillisecondsSinceEpoch( - int.parse( - date.substring(startIndex + start.length, endIndex), - ) - ); + int.parse( + date.substring(startIndex + start.length, endIndex), + ), + isUtc: true) + .add(Duration(hours: 3)); + // } } else return DateTime.now(); } @@ -88,22 +111,16 @@ class DateUtil { static String convertDateMSToJsonDate(utc) { var dt = new DateTime.fromMicrosecondsSinceEpoch(utc); - return "/Date(" + - (dt.millisecondsSinceEpoch * 1000).toString() + - '+0300' + - ")/"; + return "/Date(" + (dt.millisecondsSinceEpoch * 1000).toString() + '+0300' + ")/"; } /// check Date /// [dateString] String we want to convert static String checkDate(DateTime checkedTime) { DateTime currentTime = DateTime.now(); - if ((currentTime.year == checkedTime.year) && - (currentTime.month == checkedTime.month) && - (currentTime.day == checkedTime.day)) { + if ((currentTime.year == checkedTime.year) && (currentTime.month == checkedTime.month) && (currentTime.day == checkedTime.day)) { return "Today"; - } else if ((currentTime.year == checkedTime.year) && - (currentTime.month == checkedTime.month)) { + } else if ((currentTime.year == checkedTime.year) && (currentTime.month == checkedTime.month)) { if ((currentTime.day - checkedTime.day) == 1) { return "YESTERDAY"; } else if ((currentTime.day - checkedTime.day) == -1) { @@ -121,16 +138,11 @@ class DateUtil { static String getDateFormatted(String date) { DateTime dateObj = DateUtil.convertStringToDate(date); - return DateUtil.getWeekDay(dateObj.weekday) + - ", " + - dateObj.day.toString() + - " " + - DateUtil.getMonth(dateObj.month) + - " " + - dateObj.year.toString(); + return DateUtil.getWeekDay(dateObj.weekday) + ", " + dateObj.day.toString() + " " + DateUtil.getMonth(dateObj.month) + " " + dateObj.year.toString(); } - static String getISODateFormat(DateTime dateTime){ // 2020-04-30T00:00:00.000 + static String getISODateFormat(DateTime dateTime) { + // 2020-04-30T00:00:00.000 return dateTime.toIso8601String(); } @@ -304,6 +316,7 @@ class DateUtil { else return ""; } + /// get data formatted like Apr 26,2020 /// [dateTime] convert DateTime to data formatted Arabic static String getMonthDayYearDateFormattedAr(DateTime dateTime) { @@ -315,62 +328,30 @@ class DateUtil { /// get data formatted like Thursday, Apr 26,2020 /// [dateTime] convert DateTime to date formatted - static String getWeekDayMonthDayYearDateFormatted( - DateTime dateTime, String lang) { + static String getWeekDayMonthDayYearDateFormatted(DateTime dateTime, String lang) { if (dateTime != null) return lang == 'en' - ? getWeekDayEnglish(dateTime.weekday) + - ", " + - getMonth(dateTime.month) + - " " + - dateTime.day.toString() + - " " + - dateTime.year.toString() - : getWeekDayArabic(dateTime.weekday) + - ", " + - dateTime.day.toString() + - " " + - getMonthArabic(dateTime.month) + - " " + - dateTime.year.toString(); + ? getWeekDayEnglish(dateTime.weekday) + ", " + getMonth(dateTime.month) + " " + dateTime.day.toString() + " " + dateTime.year.toString() + : getWeekDayArabic(dateTime.weekday) + ", " + dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString(); else return ""; } - static String getMonthDayYearLangDateFormatted( - DateTime dateTime, String lang) { + static String getMonthDayYearLangDateFormatted(DateTime dateTime, String lang) { if (dateTime != null) return lang == 'en' - ? getMonth(dateTime.month) + - " " + - dateTime.day.toString() + - " " + - dateTime.year.toString() - : dateTime.day.toString() + - " " + - getMonthArabic(dateTime.month) + - " " + - dateTime.year.toString(); + ? getMonth(dateTime.month) + " " + dateTime.day.toString() + " " + dateTime.year.toString() + : dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString(); else return ""; } /// get data formatted like 26/4/2020 - static String getDayMonthYearLangDateFormatted( - DateTime dateTime, String lang) { + static String getDayMonthYearLangDateFormatted(DateTime dateTime, String lang) { if (dateTime != null) return lang == 'en' - ? dateTime.day.toString() + - " " + - getMonth(dateTime.month) + - - " " + - dateTime.year.toString() - : dateTime.day.toString() + - " " + - getMonthArabic(dateTime.month) + - " " + - dateTime.year.toString(); + ? dateTime.day.toString() + " " + getMonth(dateTime.month) + " " + dateTime.year.toString() + : dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString(); else return ""; } @@ -386,11 +367,7 @@ class DateUtil { /// [dateTime] convert DateTime to data formatted static String getDayMonthYearDateFormatted(DateTime dateTime) { if (dateTime != null) - return dateTime.day.toString() + - "/" + - dateTime.month.toString() + - "/" + - dateTime.year.toString(); + return dateTime.day.toString() + "/" + dateTime.month.toString() + "/" + dateTime.year.toString(); else return ""; } @@ -422,13 +399,7 @@ class DateUtil { /// [dateTime] convert DateTime to data formatted static String getDayMonthYearHourMinuteDateFormatted(DateTime dateTime) { if (dateTime != null) - return dateTime.day.toString() + - "/" + - dateTime.month.toString() + - "/" + - dateTime.year.toString() + - " " + - DateFormat('HH:mm').format(dateTime); + return dateTime.day.toString() + "/" + dateTime.month.toString() + "/" + dateTime.year.toString() + " " + DateFormat('HH:mm').format(dateTime); else return ""; } @@ -452,18 +423,12 @@ class DateUtil { return ""; } - static String getFormattedDate(DateTime dateTime, String formattedString){ - return DateFormat(formattedString) - .format(dateTime); + static String getFormattedDate(DateTime dateTime, String formattedString) { + return DateFormat(formattedString).format(dateTime); } static convertISODateToJsonDate(String isoDate) { - return "/Date(" + - DateFormat('mm-dd-yyy') - .parse(isoDate) - .millisecondsSinceEpoch - .toString() + - ")/"; + return "/Date(" + DateFormat('mm-dd-yyy').parse(isoDate).millisecondsSinceEpoch.toString() + ")/"; } static String getDay(DayOfWeek dayOfWeek) { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 7d6b31ab..bb7eb4c1 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'dart:io'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; @@ -34,13 +35,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/PayFortWebLive/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='; @@ -251,7 +252,11 @@ class MyInAppBrowser extends InAppBrowser { form = form.replaceFirst('PATIENT_OUT_SA', authUser.outSA == 0 ? false.toString() : true.toString()); form = form.replaceFirst('PATIENT_TYPE_ID', patientData == null ? patientType.toString() : "1"); - form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getString(PUSH_TOKEN) + "," + await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)); + Platform.isIOS + ? form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getString(PUSH_TOKEN) + "," + await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)) + : form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN)); + + // form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getString(PUSH_TOKEN) + "," + await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)); // form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN)); form = form.replaceFirst('LATITUDE_VALUE', this.lat.toString()); form = form.replaceFirst('LONGITUDE_VALUE', this.long.toString()); From b756bf8caffd7a66470dfa8dd93be76144598c1a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 7 Aug 2022 17:05:10 +0300 Subject: [PATCH 19/20] Updates --- lib/core/service/client/base_app_client.dart | 12 ++++++------ .../appointment_services/GetDoctorsList.dart | 9 ++++++--- .../livecare_services/livecare_provider.dart | 2 +- lib/widgets/in_app_browser/InAppBrowser.dart | 6 +++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index e9f4904f..f874cf17 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -131,7 +131,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1098574195; // body['MobileNo'] = "966565001080"; - // body['PatientID'] = 1454600; //3844083 + // body['PatientID'] = 3235660; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 @@ -140,11 +140,11 @@ class BaseAppClient { body.removeWhere((key, value) => key == null || value == null); - // if (BASE_URL == "https://uat.hmgwebservices.com/") { - debugPrint("URL : $url"); - final jsonBody = json.encode(body); - debugPrint(jsonBody); - // } + if (BASE_URL == "https://uat.hmgwebservices.com/") { + debugPrint("URL : $url"); + final jsonBody = json.encode(body); + debugPrint(jsonBody); + } if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index e694a148..76c7becb 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -747,7 +747,8 @@ class DoctorsListService extends BaseService { "DeviceTypeID": req.DeviceTypeID, "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, - "PatientType": authUser.patientType + "PatientType": authUser.patientType, + "VoipToken": await sharedPref.getString(ONESIGNAL_APNS_TOKEN), }; dynamic localRes; @@ -985,11 +986,13 @@ class DoctorsListService extends BaseService { "DeviceTypeID": req.DeviceTypeID, "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, - "PatientType": authUser.patientType + "PatientType": authUser.patientType, + "DeviceToken": await sharedPref.getString(PUSH_TOKEN), + "VoipToken": await sharedPref.getString(ONESIGNAL_APNS_TOKEN), }; // request.DeviceToken = this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); - // request.Latitude = this.cs.sharedService.getSharedData('userLat', false); + // request.Latitude = this.cs.szharedService.getSharedData('userLat', false); // request.Longitude = this.cs.sharedService.getSharedData('userLong', false); // request.ServiceID = apptData.ServiceID; // request.ProjectID = apptData.ProjectID; diff --git a/lib/services/livecare_services/livecare_provider.dart b/lib/services/livecare_services/livecare_provider.dart index f9851ff7..dee399ed 100644 --- a/lib/services/livecare_services/livecare_provider.dart +++ b/lib/services/livecare_services/livecare_provider.dart @@ -317,7 +317,7 @@ class LiveCareService extends BaseService { Future getOneSignalVOIPToken(String voipToken, BuildContext context) async { Map request; - // request = {"app_id": "eb8e49e5-dec7-4ed2-8d6a-4df8cb301406", "identifier": voipToken, "device_type": 0, "test_type": 0}; + // request = {"app_id": "eb8e49e5-dec7-4ed2-8d6a-4df8cb301406", "identifier": voipToken, "device_type": 0, "test_type": 1}; request = { "app_id": "eb8e49e5-dec7-4ed2-8d6a-4df8cb301406", "identifier": voipToken, "device_type": 0 }; dynamic localRes; diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index bb7eb4c1..e5b2cc16 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -162,15 +162,15 @@ class MyInAppBrowser extends InAppBrowser { applePayInsertRequest.clinicID = (clinicID != null && clinicID != "") ? clinicID : 0; applePayInsertRequest.currency = authenticatedUser.outSA == 1 ? "AED" : "SAR"; applePayInsertRequest.customerEmail = emailId; - applePayInsertRequest.customerID = authenticatedUser.patientID; - applePayInsertRequest.customerName = authenticatedUser.firstName; + applePayInsertRequest.customerID = num.parse(patientID); + applePayInsertRequest.customerName = patientName; applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0; applePayInsertRequest.projectID = projId; applePayInsertRequest.serviceID = servID; applePayInsertRequest.channelID = 3; - applePayInsertRequest.patientID = authenticatedUser.patientID; + applePayInsertRequest.patientID = num.parse(patientID); applePayInsertRequest.patientTypeID = authenticatedUser.patientType; applePayInsertRequest.patientOutSA = authenticatedUser.outSA; applePayInsertRequest.appointmentDate = (appoDate != null && appoDate != "") ? appoDate : null; From 2ba744c3a6a5f7c0f49955b7cee8f0117785bbdc Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 9 Aug 2022 12:10:59 +0300 Subject: [PATCH 20/20] Timezone fixes & Activate/Deactivate file changes --- lib/config/localized_values.dart | 4 +- .../MyAppointments/AppointmentDetails.dart | 2 +- lib/pages/MyAppointments/MyAppointments.dart | 4 +- lib/pages/livecare/widgets/clinic_list.dart | 70 +++++++++---------- lib/pages/settings/profile_setting.dart | 40 ++++++++--- .../authentication/auth_provider.dart | 48 +++++++++---- lib/uitl/gif_loader_dialog_utils.dart | 2 +- lib/uitl/translations_delegate_base.dart | 2 + lib/widgets/Loader/gif_loader_container.dart | 21 +++--- 9 files changed, 122 insertions(+), 71 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 7c8831eb..6bd1019b 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1847,5 +1847,7 @@ const Map localizedValues = { "lakumUnhold": { "en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل" }, "lakumDiscontinue": { "en": "The account is closed", "ar": "الحساب مغلق" }, "lakumSuccess": { "en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح" }, - "deleteAccount": { "en": "Delete my account", "ar": "الحساب احذف" }, + "deleteAccount": { "en": "Deactivate my account", "ar": "الحساب احذف" }, + "deactivateAccount": { "en": "Are you sure you want to deactivate your account?", "ar": "هل أنت متأكد أنك تريد إلغاء تنشيط حسابك؟" }, + "accountDeactivated": { "en": "Your account has been deactivated successfully", "ar": "تم إلغاء تنشيط حسابك بنجاح" }, }; diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 232bffc1..25bb4b6f 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -105,7 +105,7 @@ class _AppointmentDetailsState extends State with SingleTick "", widget.appo.projectName, DateUtil.convertStringToDate(widget.appo.appointmentDate), - widget.appo.startTime.substring(0, 5), + widget.appo.isLiveCareAppointment ? DateUtil.convertStringToDate(widget.appo.appointmentDate).toString().split(" ")[1].substring(0, 5) : widget.appo.startTime.substring(0, 5), null, widget.appo.doctorRate, widget.appo.actualDoctorRate, diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index e0eb15a0..cccff881 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -378,8 +378,8 @@ class _MyAppointmentsState extends State with SingleTickerProvid date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate), isSortByClinic: _isSortByClinic, rating: _appointmentResult.actualDoctorRate + 0.0, - // appointmentTime: _appointmentResult.isLiveCareAppointment ? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5) : _appointmentResult.startTime.substring(0, 5), - appointmentTime: _appointmentResult.startTime.substring(0, 5), + appointmentTime: _appointmentResult.isLiveCareAppointment ? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5) : _appointmentResult.startTime.substring(0, 5), + // appointmentTime: _appointmentResult.startTime.substring(0, 5), remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED) ? _appointmentResult.remaniningHoursTocanPay : null diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index ecd7b8b9..7f74a9fd 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -237,41 +237,41 @@ class _clinic_listState extends State { dialog.showAlertDialog(context); } - showLiveCareInfoDialog(GetERAppointmentFeesList getERAppointmentFeesList) async { - if (await this.sharedPref.getObject(USER_PROFILE) != null) { - var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); - setState(() { - authUser = data; - }); - } - - showGeneralDialog( - barrierColor: Colors.black.withOpacity(0.5), - transitionBuilder: (context, a1, a2, widget) { - final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; - return Transform( - transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), - child: Opacity( - opacity: a1.value, - child: LiveCareInfoDialog(), - ), - ); - }, - transitionDuration: Duration(milliseconds: 500), - barrierDismissible: true, - barrierLabel: '', - context: context, - pageBuilder: (context, animation1, animation2) {}) - .then((value) { - if (value) { - if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { - addNewCallForPatientER(authUser.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString()); - } else { - navigateToPaymentMethod(getERAppointmentFeesList, context); - } - } - }); - } + // showLiveCareInfoDialog(GetERAppointmentFeesList getERAppointmentFeesList) async { + // if (await this.sharedPref.getObject(USER_PROFILE) != null) { + // var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + // setState(() { + // authUser = data; + // }); + // } + // + // showGeneralDialog( + // barrierColor: Colors.black.withOpacity(0.5), + // transitionBuilder: (context, a1, a2, widget) { + // final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + // return Transform( + // transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + // child: Opacity( + // opacity: a1.value, + // child: LiveCareInfoDialog(), + // ), + // ); + // }, + // transitionDuration: Duration(milliseconds: 500), + // barrierDismissible: true, + // barrierLabel: '', + // context: context, + // pageBuilder: (context, animation1, animation2) {}) + // .then((value) { + // if (value) { + // if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { + // addNewCallForPatientER(authUser.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString()); + // } else { + // navigateToPaymentMethod(getERAppointmentFeesList, context); + // } + // } + // }); + // } Future navigateToPaymentMethod(GetERAppointmentFeesList getERAppointmentFeesList, context) async { AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); diff --git a/lib/pages/settings/profile_setting.dart b/lib/pages/settings/profile_setting.dart index 7cfc3acb..51c43443 100644 --- a/lib/pages/settings/profile_setting.dart +++ b/lib/pages/settings/profile_setting.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -215,7 +216,9 @@ class _ProfileSettings extends State with TickerProviderStateMi inputWidget(TranslationBase.of(context).emergencyContact, "", emergencyContact), mHeight(10), InkWell( - onTap: () {}, + onTap: () { + deactivateAccount(); + }, child: Text( TranslationBase.of(context).deleteAccount, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.64, color: Color(0xffD02127), decoration: TextDecoration.underline), @@ -252,10 +255,6 @@ class _ProfileSettings extends State with TickerProviderStateMi ); } - deactivateAccount() { - - } - Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) { return Container( padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), @@ -338,12 +337,33 @@ class _ProfileSettings extends State with TickerProviderStateMi ); } + deactivateAccount() { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).deactivateAccount, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () { + Navigator.of(context).pop(); + callDeactivateAccountAPI(); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + callDeactivateAccountAPI() { + GifLoaderDialogUtils.showMyDialog(context); + Map request = {}; + request["IsActive"] = false; + authService.deactivateAccount(request).then((result) { + AppToast.showSuccessToast(message: TranslationBase.of(context).accountDeactivated); + GifLoaderDialogUtils.hideDialog(context); + + }); + } + getSettings() { - // GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - authService.getSettings().then((result) => { - // GifLoaderDialogUtils.hideDialog(AppGlobal.context), - setValue(result["PateintInfoForUpdateList"][0]) - }); + authService.getSettings().then((result) => {setValue(result["PateintInfoForUpdateList"][0])}); } setValue(value) { diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index dc3a5813..ce49243c 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -2,6 +2,8 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request_register.dart'; @@ -14,9 +16,12 @@ import 'package:diplomaticquarterapp/models/Authentication/register_user_requet. import 'package:diplomaticquarterapp/models/Authentication/registered_authenticated_user_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Request.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; + import '../../locator.dart'; // SharedPreferences sharedPref = new SharedPreferences(); @@ -47,6 +52,8 @@ const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard'; const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate'; const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo'; +const DEACTIVATE_ACCOUNT = 'Services/Patients.svc/REST/PatientAppleActivation_InsertUpdate'; + class AuthProvider with ChangeNotifier { bool isLogin = false; bool isLoading = true; @@ -468,12 +475,6 @@ class AuthProvider with ChangeNotifier { Future getDashboard() async { Map request = {}; - // request['VersionID'] = VERSION_ID; - // request['Channel'] = CHANNEL; - // request['IPAdress'] = IP_ADDRESS; - // request['generalid'] = GENERAL_ID; - // request['LanguageID'] = LANGUAGE_ID; - // request['DeviceTypeID'] = DeviceTypeID; dynamic localRes; try { @@ -495,16 +496,14 @@ class AuthProvider with ChangeNotifier { dynamic localRes; try { await new BaseAppClient().post(PROFILE_SETTING, onSuccess: (dynamic response, int statusCode) { - localRes = response; //CheckActivationCode.fromJson(); + localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; return Future.value(error); - // throw error; }, body: {}); return Future.value(localRes); } catch (error) { throw error; - //return Future.value(error); } } @@ -512,16 +511,41 @@ class AuthProvider with ChangeNotifier { dynamic localRes; try { await new BaseAppClient().post(SAVE_SETTING, onSuccess: (dynamic response, int statusCode) { - localRes = response; //CheckActivationCode.fromJson(); + localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; return Future.value(error); - // throw error; }, body: request); return Future.value(localRes); } catch (error) { throw error; - //return Future.value(error); } } + + Future deactivateAccount(request) async { + dynamic localRes; + try { + await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + logout(); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + logout() async { + await sharedPref.remove(LOGIN_TOKEN_ID); + await sharedPref.remove(PHARMACY_CUSTOMER_ID); + await authenticatedUserObject.getUser(); + Provider.of(AppGlobal.context, listen: false).isLogin = false; + var model = Provider.of(AppGlobal.context, listen: false); + model.setState(0, false, null); + Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); + } + } diff --git a/lib/uitl/gif_loader_dialog_utils.dart b/lib/uitl/gif_loader_dialog_utils.dart index eae84e38..458c59b8 100644 --- a/lib/uitl/gif_loader_dialog_utils.dart +++ b/lib/uitl/gif_loader_dialog_utils.dart @@ -4,7 +4,7 @@ import '../widgets/Loader/gif_loader_container.dart'; class GifLoaderDialogUtils { static showMyDialog(BuildContext context) { - showDialog(context: context, builder: (cxt) => GifLoaderContainer()); + showDialog(context: context, barrierDismissible: false, builder: (cxt) => GifLoaderContainer()); } static hideDialog(BuildContext context) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index e7faf572..1b9475ed 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2857,6 +2857,8 @@ class TranslationBase { String get lakumDiscontinue => localizedValues["lakumDiscontinue"][locale.languageCode]; String get lakumSuccess => localizedValues["lakumSuccess"][locale.languageCode]; String get deleteAccount => localizedValues["deleteAccount"][locale.languageCode]; + String get deactivateAccount => localizedValues["deactivateAccount"][locale.languageCode]; + String get accountDeactivated => localizedValues["accountDeactivated"][locale.languageCode]; } diff --git a/lib/widgets/Loader/gif_loader_container.dart b/lib/widgets/Loader/gif_loader_container.dart index 75083d1a..4c2c40cf 100644 --- a/lib/widgets/Loader/gif_loader_container.dart +++ b/lib/widgets/Loader/gif_loader_container.dart @@ -29,14 +29,17 @@ class _GifLoaderContainerState extends State with TickerProv @override Widget build(BuildContext context) { - return Center( - //progress-loading.gif - child: Container( - // margin: EdgeInsets.only(bottom: 40), - child: GifImage( - controller: controller1, - image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), - ), - )); + return WillPopScope( + onWillPop: () async => false, + child: Center( + //progress-loading.gif + child: Container( + // margin: EdgeInsets.only(bottom: 40), + child: GifImage( + controller: controller1, + image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), + ), + )), + ); } }