From eb3f5b5cb557503920b40f3c4df6fdcd21a891a1 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 27 Jun 2022 15:01:20 +0300 Subject: [PATCH] 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