diff --git a/lib/config/config.dart b/lib/config/config.dart index afd3cbe5..b1caf315 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -408,7 +408,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 = 9.5; +var VERSION_ID = 9.6; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -729,7 +729,7 @@ var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental"; var GET_TAMARA_PLAN = - 'https://mdlaboratories.com/tamara/Home/GetInstallments'; + 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 73595711..665464d7 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1385,9 +1385,9 @@ const Map localizedValues = { "ancillary-orders": {"en": "Ancillary Orders", "ar": "الطلبات الاضافية"}, "onlineCheckInAgreement": { "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", + "The online check-in is for non-life threatening situation. Call the red crescent (997) 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": - "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات التي لا تهدد الحياة يجب الاتصال بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" + "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات التي لا تهدد الحياة يجب الاتصال بالهلال الأحمر (997) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" }, "MRN": {"en": "MRN", "ar": "رقم الملف الطبي"}, "appointment-date": {"en": "Appointment Date", "ar": "تاريخ الموعد"}, diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index f7d0068d..b2b36383 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -454,7 +454,8 @@ class BaseAppClient { url += '?' + queryString; } - // print("URL : $url"); + debugPrint("URL : $url"); + // print("Body : ${json.encode(body)}"); if (await Utils.checkConnection()) { final response = await http.get( diff --git a/lib/models/tamara_request_model.dart b/lib/models/tamara_request_model.dart index 7b2ac2ea..82938cb3 100644 --- a/lib/models/tamara_request_model.dart +++ b/lib/models/tamara_request_model.dart @@ -21,30 +21,34 @@ class TamaraRequestModel { String longitude; String latitude; String appointmentNo; + var serviceID; + var liveServiceID; TamaraRequestModel( {this.merchantReference, - this.merchantIdentifier, - this.clientRequestID, - this.amount, - this.currency, - this.language, - this.commandType, - this.signature, - this.customerEmail, - this.orderDescription, - this.isInstallment, - this.projectID, - this.accessCode, - this.sHARequestPhase, - this.sHAResponsePhase, - this.customerName, - this.fileNumber, - this.patientOutSA, - this.deviceToken, - this.longitude, - this.latitude, - this.appointmentNo}); + this.merchantIdentifier, + this.clientRequestID, + this.amount, + this.currency, + this.language, + this.commandType, + this.signature, + this.customerEmail, + this.orderDescription, + this.isInstallment, + this.projectID, + this.accessCode, + this.sHARequestPhase, + this.sHAResponsePhase, + this.customerName, + this.fileNumber, + this.patientOutSA, + this.deviceToken, + this.longitude, + this.latitude, + this.appointmentNo, + this.serviceID, + this.liveServiceID}); TamaraRequestModel.fromJson(Map json) { merchantReference = json['Merchant_Reference']; @@ -69,6 +73,8 @@ class TamaraRequestModel { longitude = json['Longitude']; latitude = json['Latitude']; appointmentNo = json['AppointmentNo']; + serviceID = json['Service_ID']; + liveServiceID = json['Live_ServiceID']; } Map toJson() { @@ -95,6 +101,8 @@ class TamaraRequestModel { data['Longitude'] = this.longitude; data['Latitude'] = this.latitude; data['AppointmentNo'] = this.appointmentNo; + data['Service_ID'] = this.serviceID; + data['Live_ServiceID'] = this.liveServiceID; return data; } } diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 34c3ebc9..68c13f5a 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -147,6 +147,8 @@ class _BookSuccessState extends State { case 50: return _getConfirmAppoButtons(); break; + case 90: + return _getQRButtons(); } } @@ -339,6 +341,9 @@ class _BookSuccessState extends State { case 50: return _getConfirmAppo(); break; + case 90: + return _getQRAppo(); + } } @@ -362,6 +367,9 @@ class _BookSuccessState extends State { case 50: return 'Confirm LiveCare'; break; + case 90: + return 'QR Code'; + break; } } @@ -428,6 +436,7 @@ class _BookSuccessState extends State { setOnlineCheckInForAppointment() { DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); service.setOnlineCheckInForAppointment(widget.patientShareResponse.appointmentNo.toString(), widget.patientShareResponse.projectID, context).then((res) { AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); appo.clinicID = widget.docObject.clinicID; @@ -438,8 +447,9 @@ class _BookSuccessState extends State { appo.doctorID = widget.patientShareResponse.doctorID; appo.appointmentDate = widget.patientShareResponse.appointmentDate; insertLiveCareVIDARequest(appo, isMoveHome: false); + GifLoaderDialogUtils.hideDialog(context); }).catchError((err) { - // GifLoaderDialogUtils.hideDialog(context); + GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: err); print(err); }); @@ -587,7 +597,7 @@ class _BookSuccessState extends State { authenticatedUser, widget.browser, widget.patientShareResponse.isLiveCareAppointment, - widget.patientShareResponse.serviceID.toString(), + "2", "", widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo, diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart index 0968beb0..d85f4505 100644 --- a/lib/pages/BookAppointment/QRCode.dart +++ b/lib/pages/BookAppointment/QRCode.dart @@ -45,7 +45,7 @@ class _QRCodeState extends State { void initState() { // TODO: implement initState - _bytes = base64.decode(widget.appoQR.split(',').last); + // _bytes = base64.decode(widget.appoQR.split(',').last); widget.authUser = new AuthenticatedUser(); FlutterNfcKit.nfcAvailability.then((value) { @@ -194,16 +194,16 @@ class _QRCodeState extends State { ], ), ), - Container( - margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0), - alignment: Alignment.bottomCenter, - child: Column( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()}) - ], - ), - ), + // Container( + // margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0), + // alignment: Alignment.bottomCenter, + // child: Column( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()}) + // ], + // ), + // ), ], ), ), diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 85e473e8..f1ab1422 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -807,7 +807,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { } getAppoQR(context, AppoitmentAllHistoryResultList appo) { - GifLoaderDialogUtils.showMyDialog(context); + // GifLoaderDialogUtils.showMyDialog(context); PatientShareResponse patientShareResponse = new PatientShareResponse(); patientShareResponse.doctorNameObj = appo.doctorNameObj; @@ -819,15 +819,15 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { patientShareResponse.projectID = appo.projectID; patientShareResponse.isFollowup = appo.isFollowup; - DoctorsListService service = new DoctorsListService(); - service.generateAppointmentQR(patientShareResponse, context).then((res) { - GifLoaderDialogUtils.hideDialog(context); - navigateToQR(context, res['AppointmentQR'], patientShareResponse, appo); + // DoctorsListService service = new DoctorsListService(); + // service.generateAppointmentQR(patientShareResponse, context).then((res) { + // GifLoaderDialogUtils.hideDialog(context); + navigateToQR(context, "", patientShareResponse, appo); projectViewModel.analytics.todoList.to_do_list_check_in(appo); - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); - print(err); - }); + // }).catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + // print(err); + // }); } Future navigateToQR(context, String appoQR, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appintment) async { diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index 090f60fb..bdb2b623 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -228,7 +228,7 @@ class _Register extends State { TextField( enabled: isEnable, scrollPadding: EdgeInsets.zero, - keyboardType: isNumber ? TextInputType.number : TextInputType.datetime, + keyboardType: isNumber ? TextInputType.numberWithOptions(signed: true) : TextInputType.datetime, controller: _controller, onChanged: (value) => {validateForm()}, style: TextStyle( diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 9af10ac3..18e40dad 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -28,7 +28,8 @@ var _InAppBrowserOptions = InAppBrowserClassOptions( applePayAPIEnabled: true, )), crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black), - ios: IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN)); + android: AndroidInAppBrowserOptions(), + ios: IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN)); class MyInAppBrowser extends InAppBrowser { _PAYMENT_TYPE paymentType; @@ -223,6 +224,8 @@ class MyInAppBrowser extends InAppBrowser { tamaraRequestModel.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); tamaraRequestModel.latitude = this.lat.toString(); tamaraRequestModel.longitude = this.long.toString(); + tamaraRequestModel.serviceID = servID; + tamaraRequestModel.liveServiceID = LiveServID; service.tamaraInsertRequest(tamaraRequestModel, context).then((res) { if (context != null) GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/widgets/nfc/nfc_reader_sheet.dart b/lib/widgets/nfc/nfc_reader_sheet.dart index 07d87e93..347317ac 100644 --- a/lib/widgets/nfc/nfc_reader_sheet.dart +++ b/lib/widgets/nfc/nfc_reader_sheet.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -6,7 +8,7 @@ void showNfcReader(BuildContext context, {Function onNcfScan, VoidCallback onCan showModalBottomSheet( context: context, enableDrag: false, - isDismissible: false, + isDismissible: true, shape: RoundedRectangleBorder( borderRadius: BorderRadius.only(topLeft: Radius.circular(12), topRight: Radius.circular(12)), ), @@ -57,8 +59,9 @@ class _NfcLayoutState extends State { @override Widget build(BuildContext context) { + // return SizedBox(); (mainWidget == null && !_reading) ? mainWidget = scanNfc() : mainWidget = doneNfc(); - return AnimatedSwitcher(duration: Duration(milliseconds: 500), child: mainWidget); + return Platform.isAndroid ? AnimatedSwitcher(duration: Duration(milliseconds: 500), child: mainWidget) : SizedBox.shrink(); } Widget scanNfc() { diff --git a/pubspec.yaml b/pubspec.yaml index 7f90640d..a5afdb28 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.001+4050001 +version: 4.5.004+4050004 environment: sdk: ">=2.7.0 <3.0.0"