diff --git a/ios/Podfile b/ios/Podfile index da082adc..ebcf3c8c 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -39,5 +39,11 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + target.build_configurations.each do |build_configuration| + build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' + if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle' + build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF' + end + end end -end +end \ No newline at end of file diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index cc3716ac..0876df31 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -182,7 +182,7 @@ const Map localizedValues = { 'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'}, 'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, - 'scanQRHospital': {'en': 'Scan above QR Code to Check-In on the Machine in Hospital', 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'}, + 'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وافحصها عبر NFC لتسجيل الوصول'}, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"}, "EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"}, @@ -313,7 +313,7 @@ const Map localizedValues = { }, "appointments": {"en": "Appointments", "ar": "مواعيد"}, "all2": {"en": "All", "ar": "الكل"}, - "checkinOption": {"en": "Check-In Options", "ar": "تحقق في الخيارات"}, + "checkinOption": {"en": "Check-In", "ar": "لتسجيل الحضور"}, "readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"}, "showMyPark": {"en": "Show My Park", "ar": "عرض الموقف"}, "clearMyData": {"en": "Clear My Data", "ar": "امسح البيانات"}, @@ -1387,7 +1387,7 @@ const Map localizedValues = { "en": "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": "تاريخ الموعد"}, diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index b03c9673..0ac2442d 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -481,7 +481,7 @@ class _AnicllaryOrdersState extends State with SingleTic )); } - openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String selectedInstallmentPlan]) { + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String selectedInstallmentPlan]) { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.authenticatedUserObject.user.patientID); diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart index 28e46bdb..e5845194 100644 --- a/lib/pages/Blood/confirm_payment_page.dart +++ b/lib/pages/Blood/confirm_payment_page.dart @@ -191,7 +191,7 @@ class ConfirmPaymentPage extends StatelessWidget { return 'assets/images/new-design/mada.png'; } - openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num 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(), diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 35a43f6e..34c3ebc9 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -23,6 +23,7 @@ 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_inappwebview/flutter_inappwebview.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import 'QRCode.dart'; @@ -569,7 +570,7 @@ class _BookSuccessState extends State { }); } - openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { + openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); selectedPaymentMethod = paymentMethod[0]; selectedInstallments = paymentMethod[1]; @@ -586,7 +587,7 @@ class _BookSuccessState extends State { authenticatedUser, widget.browser, widget.patientShareResponse.isLiveCareAppointment, - "2", + widget.patientShareResponse.serviceID.toString(), "", widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo, diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart index 517042df..0968beb0 100644 --- a/lib/pages/BookAppointment/QRCode.dart +++ b/lib/pages/BookAppointment/QRCode.dart @@ -3,7 +3,6 @@ import 'dart:typed_data'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; @@ -22,6 +21,7 @@ import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class QRCode extends StatefulWidget { PatientShareResponse patientShareResponse; @@ -52,6 +52,20 @@ class _QRCodeState extends State { _supportsNFC = (value == NFCAvailability.available); }); + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + Future.delayed(const Duration(milliseconds: 500), () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId); + locator().todoList.to_do_list_nfc(widget.appointment); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + locator().todoList.to_do_list_nfc_cancel(widget.appointment); + }); + }); + }); + super.initState(); } @@ -75,47 +89,47 @@ class _QRCodeState extends State { child: Row( children: [ Expanded( - flex: 1, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - InkWell( - child: Container( - margin: EdgeInsets.only(top: 30.0), - alignment: Alignment.center, - padding: EdgeInsets.all(8), - decoration: BoxDecoration( - border: Border.all(color: Colors.black), - borderRadius: BorderRadius.circular(10), - ), - child: Image.asset("assets/images/nfc/ic_nfc.png"), - ), - onTap: () { - showNfcReader(context, onNcfScan: (String nfcId) { - Future.delayed(const Duration(milliseconds: 100), () { - sendNfcCheckInRequest(nfcId); - locator().todoList.to_do_list_nfc(widget.appointment); - }); - }, onCancel: (){ - Navigator.of(context).pop(); - locator().todoList.to_do_list_nfc_cancel(widget.appointment); - }); - }, - ), - ], + flex: 1, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + InkWell( + child: Container( + margin: EdgeInsets.only(top: 30.0), + alignment: Alignment.center, + padding: EdgeInsets.all(8), + decoration: BoxDecoration( + border: Border.all(color: Colors.black), + borderRadius: BorderRadius.circular(10), + ), + child: SvgPicture.asset("assets/images/nfc/contactless.svg"), ), + onTap: () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId); + locator().todoList.to_do_list_nfc(widget.appointment); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + locator().todoList.to_do_list_nfc_cancel(widget.appointment); + }); + }, ), - Expanded( - flex: 1, - child: Container( - margin: EdgeInsets.only(top: 30.0), - alignment: Alignment.center, - child: Image.memory( - _bytes, - ), + ], ), ), + // Expanded( + // flex: 1, + // child: Container( + // margin: EdgeInsets.only(top: 30.0), + // alignment: Alignment.center, + // child: Image.memory( + // _bytes, + // ), + // ), + // ), ], ), ), @@ -126,22 +140,16 @@ class _QRCodeState extends State { thickness: 0.8, ), ), - Container( - child: Row( - children: [ - Container( - margin: EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0), - child: Image.asset("assets/images/new-design/device_icon.png", width: MediaQuery.of(context).size.width / 3.4, height: MediaQuery.of(context).size.width / 3.4), - ), - Expanded( - child: Container( - width: double.infinity, - margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), - child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)), - ), + Row( + children: [ + Expanded( + child: Container( + width: double.infinity, + margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), + child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)), ), - ], - ), + ), + ], ), Container( margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index 3a669cca..08ec442a 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -214,7 +214,7 @@ class _CovidPaymentSummaryState extends State { openPayment(widget.selectedPaymentMethod, authenticatedUser, double.parse(widget.patientShareResponse.patientShareWithTax.toString()), widget.patientShareResponse, appo); } - openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); widget.browser.openPaymentBrowser( diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart index 244ce647..fd47a95a 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -81,7 +81,7 @@ class _PickupLocationState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (widget.patientER_RC.transportationDetails.direction == 1) + if (widget.patientER_RC.transportationDetails.direction == 0) Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -346,7 +346,7 @@ class _PickupLocationState extends State { ), ], ), - if (widget.patientER_RC.transportationDetails.direction == 0) + if (widget.patientER_RC.transportationDetails.direction == 1) Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -501,12 +501,12 @@ class _PickupLocationState extends State { else setState(() { widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0; - if (widget.patientER_RC.transportationDetails.direction == 0) { // From Hospital + if (widget.patientER_RC.transportationDetails.direction == 0) { // To Hospital widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6); widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6); widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude; widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude; - } else { // To Hospital + } else { // From Hospital widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude; widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude; widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6); @@ -518,20 +518,22 @@ class _PickupLocationState extends State { // widget.patientER.longitude = // widget.patientER.pickupLocationLongitude; - widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER.direction == 0 ? _result.formattedAddress : _selectedHospital.name; + widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _result.formattedAddress : _selectedHospital.name; // widget.patientER_RC.crea = // widget.amRequestViewModel.user.patientID; - widget.patientER_RC.patientOutSA = widget.amRequestViewModel.user.outSA == 0 ? true : false; - widget.patientER_RC.patientOutSa = widget.amRequestViewModel.user.outSA; + + // widget.patientER_RC.patientOutSA = widget.amRequestViewModel.user.outSA == 0 ? false : true; + // widget.patientER_RC.patientOutSa = widget.amRequestViewModel.user.outSA; widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo; widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now()); - widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER.direction == 0 ? _selectedHospital.name : _result.formattedAddress; + widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _selectedHospital.name : _result.formattedAddress; widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID; widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID; widget.patientER_RC.transportationDetails.requesterIsOutSA = false; // widget.patientER.lineItemNo = 0; widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber; + widget.patientER_RC.transportationDetails.requesterFileNo = widget.amRequestViewModel.user.patientID; if (_haveAppointment == HaveAppointment.YES) { widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString(); diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart index e3c8ccf2..1cd6c6c4 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart @@ -336,7 +336,7 @@ class _SelectTransportationMethodState extends State // widget.changeCurrentTab(1); // widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); - widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 1 : 0; + widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 0 : 1; widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1; widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.iD.toString(); diff --git a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart index 0a334066..6b313a47 100644 --- a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart +++ b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart @@ -164,7 +164,7 @@ class _EdPaymentInformationPageState extends State { ); } - openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num 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, diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart index e733ca89..46a44613 100644 --- a/lib/pages/ErService/ErOptions.dart +++ b/lib/pages/ErService/ErOptions.dart @@ -53,13 +53,14 @@ class _ErOptionsState extends State { children: [ InkWell( onTap: () { - Navigator.push(context, FadePage(page: AmbulanceReq())); + if (projectViewModel.havePrivilege(63)) Navigator.push(context, FadePage(page: AmbulanceReq())); }, child: MedicalProfileItem( title: TranslationBase.of(context).ambulancerequest, imagePath: 'assets/images/new-design/AM.PNG', subTitle: TranslationBase.of(context).requestA, isPngImage: true, + isEnable: projectViewModel.havePrivilege(63), ), ), InkWell( diff --git a/lib/pages/ErService/OrderLogPage.dart b/lib/pages/ErService/OrderLogPage.dart index e98b41c0..a4d95acd 100644 --- a/lib/pages/ErService/OrderLogPage.dart +++ b/lib/pages/ErService/OrderLogPage.dart @@ -51,6 +51,7 @@ class OrderLogPage extends StatelessWidget { child: amRequestViewModel.patientAmbulanceRequestOrdersList.length > 0 ? ListView.builder( padding: EdgeInsets.all(21), + reverse: true, itemCount: amRequestViewModel.patientAmbulanceRequestOrdersList.length, itemBuilder: (context, index) { AmbulanceRequestOrdersModel order = amRequestViewModel.patientAmbulanceRequestOrdersList[index]; diff --git a/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart index 1062eaf3..96174828 100644 --- a/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart +++ b/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart @@ -30,19 +30,19 @@ class BookedButtonsAllowCheckIn { { "title": TranslationBase.of(AppGlobal.context).add, "subtitle": TranslationBase.of(AppGlobal.context).reminder, - "icon": "assets/images/new-design/reminder_icon.png", + "icon": "reminder_icon.png", "caller": "addReminder", }, { "title": TranslationBase.of(AppGlobal.context).hospital, "subtitle": TranslationBase.of(AppGlobal.context).location, - "icon": "assets/images/new-design/location_icon.png", + "icon": "location_icon.png", "caller": "navigateToProject", }, { "title": TranslationBase.of(AppGlobal.context).online, "subtitle": TranslationBase.of(AppGlobal.context).payment, - "icon": "assets/images/new-design/check-in.png", + "icon": "check-in.png", "caller": "goToTodoList", } ]; diff --git a/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart index 1f9f2d8a..ed97a418 100644 --- a/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart +++ b/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart @@ -24,7 +24,7 @@ class ConfirmedButtonsAllowCheckIn { { "title": TranslationBase.of(AppGlobal.context).add, "subtitle": TranslationBase.of(AppGlobal.context).reminder, - "icon": "assets/images/new-design/reminder_icon.png", + "icon": "reminder_icon.svg", "caller": "addReminder", }, { diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 7d9a82ae..35f88bed 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -64,9 +64,6 @@ class _AppointmentActionsState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); ToDoCountProviderModel model = Provider.of(context); - var size = MediaQuery.of(context).size; - final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2; - final double itemWidth = size.width / 2; return GridView.builder( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 13, mainAxisSpacing: 9), diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index e88cafcf..85e473e8 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -866,7 +866,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { projectViewModel.analytics.todoList.to_do_list_pay_now(appo); } - openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) { + openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) { widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); widget.browser.openPaymentBrowser( diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 1ef7cba8..ec73b242 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -672,6 +672,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { getOneSignalVOIPToken(String voipToken) { LiveCareService service = new LiveCareService(); service.getOneSignalVOIPToken(voipToken, context).then((res) { + print("OneSignalID: $res"); AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, res['id']); }).catchError((err) { print(err); diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 34b4bb57..b4d79d49 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -24,7 +24,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:pay/pay.dart'; +// import 'package:pay/pay.dart'; import 'package:provider/provider.dart'; import 'new_text_Field.dart'; @@ -52,13 +52,13 @@ class _ConfirmPaymentPageState extends State { String tamaraPaymentStatus; String tamaraOrderID; - Pay _payClient; + // Pay _payClient; @override void initState() { - _payClient = Pay.withAssets([ - 'applepay.json', - ]); + // _payClient = Pay.withAssets([ + // 'applepay.json', + // ]); super.initState(); } @@ -236,29 +236,29 @@ class _ConfirmPaymentPageState extends State { ); } - startApplePay() { - ApplePayResponse applePayResponse; - var _paymentItems = [ - PaymentItem( - label: 'Total', - amount: widget.advanceModel.amount, - status: PaymentItemStatus.final_price, - ) - ]; - - _payClient.userCanPay(PayProvider.apple_pay).then((value) async { - print(value); - final result = await _payClient.showPaymentSelector( - provider: PayProvider.apple_pay, - paymentItems: _paymentItems, - ); - print(result); - applePayResponse = ApplePayResponse.fromJson(result); - callPayfortApplePayAPI(applePayResponse); - }).catchError((err) { - print(err); - }); - } + // startApplePay() { + // ApplePayResponse applePayResponse; + // var _paymentItems = [ + // PaymentItem( + // label: 'Total', + // amount: widget.advanceModel.amount, + // status: PaymentItemStatus.final_price, + // ) + // ]; + // + // _payClient.userCanPay(PayProvider.apple_pay).then((value) async { + // print(value); + // final result = await _payClient.showPaymentSelector( + // provider: PayProvider.apple_pay, + // paymentItems: _paymentItems, + // ); + // print(result); + // applePayResponse = ApplePayResponse.fromJson(result); + // callPayfortApplePayAPI(applePayResponse); + // }).catchError((err) { + // print(err); + // }); + // } callPayfortApplePayAPI(ApplePayResponse applePayResponse) async { DoctorsListService service = new DoctorsListService(); @@ -347,7 +347,7 @@ class _ConfirmPaymentPageState extends State { return 'assets/images/new-design/mada.png'; } - openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber)); diff --git a/lib/pages/webRTC/OpenTok/OpenTok.dart b/lib/pages/webRTC/OpenTok/OpenTok.dart index 6c70170f..cf46ea15 100644 --- a/lib/pages/webRTC/OpenTok/OpenTok.dart +++ b/lib/pages/webRTC/OpenTok/OpenTok.dart @@ -3,30 +3,27 @@ import 'dart:async'; import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart'; import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart'; import 'OpenTokPlatformBridge.dart'; - -class OpenTokConnectCallPage extends StatefulWidget{ +class OpenTokConnectCallPage extends StatefulWidget { final String sessionId; final String token; final String apiKey; + OpenTokConnectCallPage({@required this.sessionId, @required this.token, @required this.apiKey}); - + @override State createState() => OpenTokState(); - } -class OpenTokState extends State{ +class OpenTokState extends State { OpenTokPlatformBridge openTokPlatform; OpenTokSDKState sdkState = OpenTokSDKState.LOGGED_OUT; @@ -37,17 +34,15 @@ class OpenTokState extends State{ var audioMute = false; var videoMute = false; - final voIPKit = FlutterIOSVoIPKit.instance; - initOpenTok(){ + initOpenTok() { openTokPlatform = OpenTokPlatformBridge.init( apiKey: widget.apiKey, sessionID: widget.sessionId, token: widget.token, onStateChange: (state) { setState(() => sdkState = state); - } - ); + }); } @override @@ -63,30 +58,33 @@ class OpenTokState extends State{ appBar: AppBar( backgroundColor: Colors.transparent, actions: [ - TextButton(onPressed: (){ - initOpenTok(); - }, child: Icon(Icons.connect_without_contact_outlined, color: Colors.green,)) + TextButton( + onPressed: () { + initOpenTok(); + }, + child: Icon( + Icons.connect_without_contact_outlined, + color: Colors.green, + )) ], ), body: Stack( fit: StackFit.expand, children: [ - if(sdkState == OpenTokSDKState.LOGGED_IN) - ...platformVideoViews(), - - - if(sdkState == OpenTokSDKState.LOGGED_OUT) - Center(child: Text("Logged Out"),), - - if(sdkState == OpenTokSDKState.ERROR) - Center(child: Text("Error opening session"),), - - if(sdkState == OpenTokSDKState.WAIT) - Center(child: CircularProgressIndicator(),), - - if(sdkState == OpenTokSDKState.ON_CALL) - Container(), - + if (sdkState == OpenTokSDKState.LOGGED_IN) ...platformVideoViews(), + if (sdkState == OpenTokSDKState.LOGGED_OUT) + Center( + child: Text("Logged Out"), + ), + if (sdkState == OpenTokSDKState.ERROR) + Center( + child: Text("Error opening session"), + ), + if (sdkState == OpenTokSDKState.WAIT) + Center( + child: CircularProgressIndicator(), + ), + if (sdkState == OpenTokSDKState.ON_CALL) Container(), ConferenceButtonBar( audioEnabled: _audioButton.stream, videoEnabled: _videoButton.stream, @@ -106,20 +104,17 @@ class OpenTokState extends State{ } bool remoteVideoOnFull = true; - List platformVideoViews(){ - return [ - SizedBox( - width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, - child: remoteVideoOnFull ? remotePlatformVideoView() : localPlatformVideoView() - ), + List platformVideoViews() { + return [ + SizedBox(width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, child: remoteVideoOnFull ? remotePlatformVideoView() : localPlatformVideoView()), DraggablePublisher( - onButtonBarHeight: ((double)async*{}(50)), - onButtonBarVisible: ((bool)async*{}(true)), + onButtonBarHeight: ((double) async* {}(50)), + onButtonBarVisible: ((bool) async* {}(true)), availableScreenSize: MediaQuery.of(context).size, child: InkWell( child: (remoteVideoOnFull ? localPlatformVideoView() : remotePlatformVideoView()), - onTap: (){ + onTap: () { print(''); }, ), @@ -127,93 +122,87 @@ class OpenTokState extends State{ ]; } - Widget localPlatformVideoView(){ + Widget localPlatformVideoView() { return PlatformViewLink( - viewType: 'local-video-container', // custom platform-view-type - surfaceFactory: - (BuildContext context, PlatformViewController controller) { - return AndroidViewSurface( - controller: controller, - gestureRecognizers: const >{}, - hitTestBehavior: PlatformViewHitTestBehavior.opaque, - ); - }, - - onCreatePlatformView: (PlatformViewCreationParams params) { - return PlatformViewsService.initSurfaceAndroidView( - id: params.id, - viewType: 'local-video-container', - // custom platform-view-type, - layoutDirection: TextDirection.ltr, - creationParams: {}, - creationParamsCodec: StandardMessageCodec(), - ) - ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) - ..create(); - }, - ); + viewType: 'local-video-container', // custom platform-view-type + surfaceFactory: (BuildContext context, PlatformViewController controller) { + return AndroidViewSurface( + controller: controller, + gestureRecognizers: const >{}, + hitTestBehavior: PlatformViewHitTestBehavior.opaque, + ); + }, + + onCreatePlatformView: (PlatformViewCreationParams params) { + return PlatformViewsService.initSurfaceAndroidView( + id: params.id, + viewType: 'local-video-container', + // custom platform-view-type, + layoutDirection: TextDirection.ltr, + creationParams: {}, + creationParamsCodec: StandardMessageCodec(), + ) + ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) + ..create(); + }, + ); } - Widget remotePlatformVideoView(){ + Widget remotePlatformVideoView() { return PlatformViewLink( - viewType: 'remote-video-container', // custom platform-view-type - surfaceFactory: - (BuildContext context, PlatformViewController controller) { - return AndroidViewSurface( - controller: controller, - gestureRecognizers: const >{}, - hitTestBehavior: PlatformViewHitTestBehavior.opaque, - ); - }, - onCreatePlatformView: (PlatformViewCreationParams params) { - return PlatformViewsService.initSurfaceAndroidView( - id: params.id, - viewType: 'remote-video-container', - // custom platform-view-type, - layoutDirection: TextDirection.ltr, - creationParams: {}, - creationParamsCodec: StandardMessageCodec(), - ) - ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) - ..create(); - }, - ); + viewType: 'remote-video-container', // custom platform-view-type + surfaceFactory: (BuildContext context, PlatformViewController controller) { + return AndroidViewSurface( + controller: controller, + gestureRecognizers: const >{}, + hitTestBehavior: PlatformViewHitTestBehavior.opaque, + ); + }, + onCreatePlatformView: (PlatformViewCreationParams params) { + return PlatformViewsService.initSurfaceAndroidView( + id: params.id, + viewType: 'remote-video-container', + // custom platform-view-type, + layoutDirection: TextDirection.ltr, + creationParams: {}, + creationParamsCodec: StandardMessageCodec(), + ) + ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) + ..create(); + }, + ); } - - _onAudioEnable() async{ + _onAudioEnable() async { await openTokPlatform.toggleAudio(); _audioButton.add(!audioMute); } - _onVideoEnabled() async{ + _onVideoEnabled() async { await openTokPlatform.toggleVideo(); _videoButton.add(!videoMute); } - _onSwitchCamera() async{ + _onSwitchCamera() async { await openTokPlatform.swapCamera(); } Future _onHangup() async { print('onHangup'); await openTokPlatform.hangupCall(); - voIPKit.endCall(); endCallAPI(); Navigator.of(context).pop(); } void endCallAPI() { LiveCareService service = new LiveCareService(); - service.endCallAPI(widget.sessionId, 2, context).then((res) { - }).catchError((err) { + service.endCallAPI(widget.sessionId, 2, context).then((res) {}).catchError((err) { print(err); }); } void _onShowBar() { - setState(() { - }); + setState(() {}); _onButtonBarVisibleStreamController.add(true); } @@ -227,5 +216,4 @@ class OpenTokState extends State{ }); _onButtonBarVisibleStreamController.add(false); } - -} \ No newline at end of file +} diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 9af10ac3..7fb56aaa 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -36,13 +36,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/lib/widgets/nfc/nfc_reader_sheet.dart b/lib/widgets/nfc/nfc_reader_sheet.dart index 43f1f05e..d2119417 100644 --- a/lib/widgets/nfc/nfc_reader_sheet.dart +++ b/lib/widgets/nfc/nfc_reader_sheet.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; +import 'package:flutter_svg/flutter_svg.dart'; void showNfcReader(BuildContext context, {Function onNcfScan, VoidCallback onCancel}) { showModalBottomSheet( @@ -40,7 +41,7 @@ class _NfcLayoutState extends State { } void readNFC() async { - FlutterNfcKit.poll(timeout: Duration(seconds: 10), androidPlatformSound: false, iosMultipleTagMessage: "Multiple tags found!").then((value) async { + FlutterNfcKit.poll(timeout: Duration(seconds: 10), androidPlatformSound: true, androidCheckNDEF: false, iosMultipleTagMessage: "Multiple tags found!").then((value) async { setState(() { _reading = true; mainWidget = doneNfc(); @@ -79,8 +80,8 @@ class _NfcLayoutState extends State { SizedBox( height: 30, ), - Image.asset( - "assets/images/nfc/ic_nfc.png", + SvgPicture.asset( + "assets/images/nfc/contactless.svg", height: MediaQuery.of(context).size.width / 3, ), SizedBox( diff --git a/lib/widgets/pickupLocation/PickupLocationFromMap.dart b/lib/widgets/pickupLocation/PickupLocationFromMap.dart index 26f01a16..e5639f5c 100644 --- a/lib/widgets/pickupLocation/PickupLocationFromMap.dart +++ b/lib/widgets/pickupLocation/PickupLocationFromMap.dart @@ -11,7 +11,6 @@ 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_hms_gms_availability/flutter_hms_gms_availability.dart'; import 'package:geocoding/geocoding.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart'; @@ -161,8 +160,8 @@ class _PickupLocationFromMapState extends State { TranslationBase.of(context).next, () { LocationDetails locationDetails = new LocationDetails(); - locationDetails.lat = latitude; - locationDetails.long = longitude; + locationDetails.lat = selectedPlace.geometry.location.lat; + locationDetails.long = selectedPlace.geometry.location.lng; locationDetails.formattedAddress = selectedPlace.formattedAddress; widget.onPick(locationDetails); Navigator.of(context).pop(); diff --git a/pubspec.yaml b/pubspec.yaml index 8267817e..d341984b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.4.998+4040998 +version: 4.4.999+4040999 environment: sdk: ">=2.7.0 <3.0.0" @@ -15,7 +15,8 @@ dependencies: sdk: flutter intl: ^0.17.0 # web view - webview_flutter: ^2.3.1 +# webview_flutter: ^2.3.1 + # http client http: ^0.13.4 connectivity: ^3.0.6 @@ -43,9 +44,6 @@ dependencies: # Flutter Html View flutter_html: ^2.2.1 - #Apple Pay - pay: ^1.0.8 - # Pagnation pull_to_refresh: ^2.0.0 @@ -70,7 +68,7 @@ dependencies: cupertino_icons: ^1.0.0 # Image Attachments - image_picker: ^0.8.4+4 + image_picker: ^0.8.5+3 #GIF image flutter_gifimage: ^1.0.1 @@ -91,7 +89,7 @@ dependencies: google_maps_flutter: ^2.1.1 # Huawei - huawei_map: ^6.0.1+304 + huawei_map: 6.0.1+304 huawei_push: ^5.3.0+304 # Qr code Scanner TODO fix it @@ -115,7 +113,7 @@ dependencies: manage_calendar_events: ^2.0.1 #InAppBrowser - flutter_inappwebview: ^5.3.2 +# flutter_inappwebview: ^5.3.2 #Circular progress bar for reverse timer circular_countdown_timer: ^0.2.0 @@ -146,7 +144,7 @@ dependencies: jiffy: ^4.1.0 #Flutter WebRTC - flutter_webrtc: ^0.8.0 + flutter_webrtc: ^0.9.7 screen_brightness: ^0.1.2 @@ -210,6 +208,9 @@ dependency_overrides: permission_handler : ^6.0.1+1 flutter_svg: ^1.0.0 firebase_messaging_platform_interface: 3.1.6 + flutter_inappwebview: + git: + url: https://github.com/CodeEagle/flutter_inappwebview dev_dependencies: