From 04413aa7d685fef85a45a05eb5d23f6889b78044 Mon Sep 17 00:00:00 2001 From: Haroon Amjad <> Date: Thu, 27 Feb 2025 08:33:30 +0300 Subject: [PATCH 01/19] lab report updates --- lib/config/config.dart | 5 +++-- lib/core/service/medical/labs_service.dart | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 04f86877..f60b7762 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,13 +21,13 @@ 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:2018/'; - var BASE_URL = 'https://uat.hmgwebservices.com/'; + // var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; -// var BASE_URL = 'https://webservices.hmg.com/'; +var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'http://10.50.100.198:4422/'; @@ -102,6 +102,7 @@ var GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrd var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport'; var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; +var SEND_LAB_RESULT_EMAIL_NEW = 'ReportsAPI/api/reports/labReport'; var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida'; var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo'; diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index c03b29f4..376e09ae 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -230,7 +230,8 @@ class LabsService extends BaseService { _requestSendLabReportEmail.doctorID = patientLabOrder.doctorID; _requestSendLabReportEmail.languageID = 1; - await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { + // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { labReportPDF = response['LabReportsPDFContent']; } From a24582a57858e824cc9f85d0e5f609387ded8a0b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 27 Feb 2025 12:00:17 +0300 Subject: [PATCH 02/19] InPatient check added in Family file switch --- lib/pages/DrawerPages/family/my-family.dart | 39 +++++++++++++++ lib/pages/login/confirm-login.dart | 54 ++++++++++----------- lib/widgets/drawer/app_drawer_widget.dart | 40 +++++++++++++++ 3 files changed, 106 insertions(+), 27 deletions(-) diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index d2c6c383..fa256d11 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -14,6 +14,8 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel. import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as list; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/routes.dart'; @@ -467,6 +469,42 @@ class _MyFamily extends State with TickerProviderStateMixin { }); } + checkIfIsInPatient(BuildContext context) { + bool isAdmitted = false; + bool hasAdmissionRequest = false; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; + ClinicListService service = new ClinicListService(); + service.checkIfInPatientAPI(context).then((res) { + if (res['MessageStatus'] == 1) { + isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; + print("IS ADMITTED: $isAdmitted"); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { + if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + projectViewModel.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); + // projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); + projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']); + projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + projectViewModel.setPatientHasAdmissionRequest(true); + } + } + } else {} + }).catchError((err) { + projectViewModel.setIsPatientAdmitted(false); + projectViewModel.setPatientHasAdmissionRequest(false); + }); + } + loginAfter(result, context) async { var currentLang = await sharedPref.getString(APP_LANGUAGE); Provider.of(AppGlobal.context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true); @@ -501,6 +539,7 @@ class _MyFamily extends State with TickerProviderStateMixin { try { // await appointmentRateViewModel.getIsLastAppointmentRatedList(); + checkIfIsInPatient(context); await getToDoCount(); if (appointmentRateViewModel.isHaveAppointmentNotRate) { Navigator.pushAndRemoveUntil( diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index b02674c7..7c26928d 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -709,37 +709,37 @@ class _ConfirmLogin extends State { } checkIfUserAgreedBefore(CheckActivationCode result) { - this.authService.checkIfUserAgreed().then((result) { - if (result['IsPatientAlreadyAgreed']) { - goToHome(); - } else { - this.authService.getUserAgreementContent().then((result) { - GifLoaderDialogUtils.hideDialog(AppGlobal.context); - Navigator.pushAndRemoveUntil( - context, - FadePage( - page: UserLoginAgreementPage( - userAgreementText: result['UserAgreementContent'], - authenticatedUserObject: authenticatedUserObject, - appointmentRateViewModel: appointmentRateViewModel, - selectedOption: selectedOption, - ), - ), - (r) => false); - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); - print(err); - }); - } - }).catchError((err) { - GifLoaderDialogUtils.hideDialog(context); - print(err); - }); + // this.authService.checkIfUserAgreed().then((result) { + // if (result['IsPatientAlreadyAgreed']) { + // goToHome(); + // } else { + // this.authService.getUserAgreementContent().then((result) { + // GifLoaderDialogUtils.hideDialog(AppGlobal.context); + // Navigator.pushAndRemoveUntil( + // context, + // FadePage( + // page: UserLoginAgreementPage( + // userAgreementText: result['UserAgreementContent'], + // authenticatedUserObject: authenticatedUserObject, + // appointmentRateViewModel: appointmentRateViewModel, + // selectedOption: selectedOption, + // ), + // ), + // (r) => false); + // }).catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + // print(err); + // }); + // } + // }).catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + // print(err); + // }); // if (result.isNeedUserAgreement == true) { // // move to agreement page. // } else { - // goToHome(); + goToHome(); // } } diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index f82047a5..a4dfe9aa 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -15,6 +15,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; @@ -700,6 +702,42 @@ class _AppDrawerState extends State { }); } + checkIfIsInPatient(BuildContext context) { + bool isAdmitted = false; + bool hasAdmissionRequest = false; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; + ClinicListService service = new ClinicListService(); + service.checkIfInPatientAPI(context).then((res) { + if (res['MessageStatus'] == 1) { + isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; + print("IS ADMITTED: $isAdmitted"); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { + if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); + projectProvider?.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + projectProvider?.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + projectProvider?.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); + // projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); + projectProvider?.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']); + projectProvider?.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + projectProvider?.setPatientHasAdmissionRequest(true); + } + } + } else {} + }).catchError((err) { + projectProvider?.setIsPatientAdmitted(false); + projectProvider?.setPatientHasAdmissionRequest(false); + }); + } + loginAfter(result, context, isMainUser) async { Utils.hideProgressDialog(); String APNSToken = ""; @@ -741,6 +779,8 @@ class _AppDrawerState extends State { await this.sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL); + checkIfIsInPatient(context); + appointmentRateViewModel .getIsLastAppointmentRatedList(languageID) .then((value) => { From 744e3978d3f7b522c1100ae8a0c3cd906e3ce487 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 27 Feb 2025 12:30:39 +0300 Subject: [PATCH 03/19] user agreement service privilege added --- lib/pages/login/confirm-login.dart | 58 ++++++++++--------- .../login/user-login-agreement-page.dart | 48 ++++++++++++++- 2 files changed, 78 insertions(+), 28 deletions(-) diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 7c26928d..ee4208f4 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -709,37 +709,41 @@ class _ConfirmLogin extends State { } checkIfUserAgreedBefore(CheckActivationCode result) { - // this.authService.checkIfUserAgreed().then((result) { - // if (result['IsPatientAlreadyAgreed']) { - // goToHome(); - // } else { - // this.authService.getUserAgreementContent().then((result) { - // GifLoaderDialogUtils.hideDialog(AppGlobal.context); - // Navigator.pushAndRemoveUntil( - // context, - // FadePage( - // page: UserLoginAgreementPage( - // userAgreementText: result['UserAgreementContent'], - // authenticatedUserObject: authenticatedUserObject, - // appointmentRateViewModel: appointmentRateViewModel, - // selectedOption: selectedOption, - // ), - // ), - // (r) => false); - // }).catchError((err) { - // GifLoaderDialogUtils.hideDialog(context); - // print(err); - // }); - // } - // }).catchError((err) { - // GifLoaderDialogUtils.hideDialog(context); - // print(err); - // }); + if (projectViewModel.havePrivilege(109)) { + this.authService.checkIfUserAgreed().then((result) { + if (result['IsPatientAlreadyAgreed']) { + goToHome(); + } else { + this.authService.getUserAgreementContent().then((result) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: UserLoginAgreementPage( + userAgreementText: result['UserAgreementContent'], + authenticatedUserObject: authenticatedUserObject, + appointmentRateViewModel: appointmentRateViewModel, + selectedOption: selectedOption, + ), + ), + (r) => false); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } else { + goToHome(); + } // if (result.isNeedUserAgreement == true) { // // move to agreement page. // } else { - goToHome(); + // goToHome(); // } } diff --git a/lib/pages/login/user-login-agreement-page.dart b/lib/pages/login/user-login-agreement-page.dart index a8df31fe..c21fa273 100644 --- a/lib/pages/login/user-login-agreement-page.dart +++ b/lib/pages/login/user-login-agreement-page.dart @@ -3,6 +3,8 @@ import 'package:diplomaticquarterapp/core/viewModels/TermsConditionsViewModel.da import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; @@ -13,6 +15,7 @@ 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_new.dart'; +import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -51,6 +54,7 @@ class _UserLoginAgreementPageState extends State { NavigationDelegate( onProgress: (int progress) { // Update loading bar. + print("Progress: $progress"); }, onPageStarted: (String url) {}, onPageFinished: (String url) { @@ -82,7 +86,15 @@ class _UserLoginAgreementPageState extends State { showNewAppBar: true, isShowDecPage: false, appBarTitle: TranslationBase.of(context).userAgreement, - body: WebViewWidget(controller: _controller), + body: isPageLoaded + ? WebViewWidget(controller: _controller) + : Container( + child: Center( + child: GifLoaderContainer( + barrierDismissible: false, + ), + ), + ), // Padding( // padding: const EdgeInsets.all(8.0), // child: SingleChildScrollView(child: WebViewWidget(controller: _controller) @@ -193,6 +205,39 @@ class _UserLoginAgreementPageState extends State { }); } + checkIfIsInPatient() { + bool isAdmitted = false; + bool hasAdmissionRequest = false; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; + ClinicListService service = new ClinicListService(); + service.checkIfInPatientAPI(context).then((res) { + if (res['MessageStatus'] == 1) { + isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; + print("IS ADMITTED: $isAdmitted"); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { + if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + projectViewModel.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); + // projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); + projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']); + projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + projectViewModel.setPatientHasAdmissionRequest(true); + } + } + } else {} + }); + } + goToHome() async { widget.authenticatedUserObject.isLogin = true; widget.appointmentRateViewModel.isLogin = true; @@ -202,6 +247,7 @@ class _UserLoginAgreementPageState extends State { // GifLoaderDialogUtils.hideDialog(context); getToDoCount(); + checkIfIsInPatient(); widget.appointmentRateViewModel .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) .then((value) => { From f74a3301da1705781aa99eb9f522d8e43eced457 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 27 Feb 2025 16:41:09 +0300 Subject: [PATCH 04/19] SAR new symbol integrated --- assets/fonts/sar-Regular.otf | Bin 0 -> 1760 bytes assets/fonts/saudi_riyal.eot | Bin 0 -> 2068 bytes assets/fonts/saudi_riyal.ttf | Bin 0 -> 1888 bytes assets/fonts/saudi_riyal.woff | Bin 0 -> 1968 bytes assets/fonts/saudi_riyal.woff2 | Bin 0 -> 760 bytes lib/config/config.dart | 6 +- lib/config/localized_values.dart | 1 + lib/core/service/client/base_app_client.dart | 2 +- .../ancillaryOrdersDetails.dart | 77 +++--- lib/pages/BookAppointment/BookSuccess.dart | 30 ++- .../BillAmount.dart | 9 +- .../PickupLocation.dart | 13 +- .../SelectTransportationMethod.dart | 33 ++- .../AmbulanceRequestIndexPages/Summary.dart | 16 +- .../EROnlineCheckInPaymentDetails.dart | 11 +- .../rapid-response-team/rrt-request-page.dart | 64 +++-- .../inpatient_pending_advance_payment.dart | 21 +- .../livecare/live_care_payment_page.dart | 93 ++++++-- .../medical/balance/confirm_payment_page.dart | 67 +++--- .../medical/balance/my_balance_page.dart | 64 +++-- .../my_invoices/invoice_detail_page.dart | 12 +- lib/uitl/translations_delegate_base.dart | 225 +++++++++++++++++- lib/uitl/utils.dart | 44 +++- pubspec.yaml | 7 +- 24 files changed, 608 insertions(+), 187 deletions(-) create mode 100644 assets/fonts/sar-Regular.otf create mode 100644 assets/fonts/saudi_riyal.eot create mode 100644 assets/fonts/saudi_riyal.ttf create mode 100644 assets/fonts/saudi_riyal.woff create mode 100644 assets/fonts/saudi_riyal.woff2 diff --git a/assets/fonts/sar-Regular.otf b/assets/fonts/sar-Regular.otf new file mode 100644 index 0000000000000000000000000000000000000000..e906f6545359367c1c84c1e014576da536e63b16 GIT binary patch literal 1760 zcmZvcO=uKL5XY-$WIZ5;oM7@}Rns*4|MLZcK3VId~hTWHquK(_udFiKinC@TwtGlXtYBufr z_O(-#&X7&1U9GLD(%KP0V&@y_U^7+wzKh8 zz6^eVXG<4^VA5U={)A^uS7Bf%+ySECB&KBdKsKK{O%Ci=uxkq0pd6*z ziI;WbuzQjJUGK^M0n~-zjABX=DpOC}-r1)|65Hp=R>z1w&RxIbua(c0vhyY|1KTD` zsTepDjDO#QI7(MTMKT9!LLHdNwpNHy3LyU#>nZH3yo&eKB>Z^($^S(;h(SB4g)*EA zH6RLSvO|G${vq0IodBy`NJ6z93kqsQ=@!McrRyP=HhOy;T0wt!9KeqC9tX9`F+)bo zu)z_7qXt(Q95Z;C!Eu9=MxE8VPX8?ks`K8fz`Jkr*rE`%du(HWr^gOe(E*PG*q`+{ zh_BH<8-nJ?3>zFVIBIZ}!7+oE85}n_Y1CP*>$FKY5#51W_!M(rn7J>^w(biv_l24J z!pwbP=DsjCqn-=8ER4O2Y zE6*wul?i=9J22_ryKnru3UUMqA*z;2Qs%Bw9hF?Gw8}2kJMy9%jJwWEU=_}vO{n>D zwZvjYYU-opj5O37sZZd~;8=)4LO6+2gIGd}tKu3t7V1vZVbLW9 z7XFlOU}m|L(p}gpWmrlmdR4lH?^>957sm89=c`u#P5ax*F)e)4LR{XssJ1Dmx{2%D zE7}ki3+teaPTzh$Hi;yq!WWnqGQ;}^JHoQ~!at%muGQgW@wr~h4c%;)x2bjb((t)6 z2%r;4xuYC}I&`w<)Zgc!E^gTbbM&9v&&H-ymen8lY!S67cVs)(n<(P0Dxx^|n%$*2 ztdFLq9#7wgEWb5tx!5r7xeqA!BQDX8>KrBxrSLQzn#MZuSXZ<0SisihQJ5nqB}&5JKSsTsdJdm~-lns@Io=X~eq zJ@@xOFL2%j1T=Iufono)UOv&Om%i<`a)0CIKW#u3P1smQ1s)a6pSvIB;q6 zsR^jbVxF3S5gr<-!$KZ8Oh%R`WuZ|P(1+KcqkQDl>DhPDm zD$Mtcvw*=E?5@^YD~Y#>VC*NE_8W_~HY@(1EQh$OX0I$EgBK~kMcJy`HK*^vrzy%` zu#b0^8qF5#W;4su9*re|UDyZV+pRi!VMr^R9HsC**QQQMv`MQ#LQxI<*h5)E96QJj z&Py-99+*fXMn6MoHQIIkh`2^Av=1~nTUXm$Y+y>nDL>wX9BxM|1CNBh7OtVJ^QTQ# zxYeu($dSo^l(sh4Bd<}`QKdf1nb%pJ;K=h_dXHNnK?P9|MRz!jO3mY z=Onp9>6hP0gqazRPa4KKG4X1)Frt-7#2HEQ3wyIu!&+XP-Z?(B`O|>-JUu=nHm~lB zjF*bpsSz=)_wRTqmNLD8ughGkC#;3k-`u#rvXDOX8~-0Jua-_y>%d9lr^ zq}@{Yipxr`BPk9lY!JVzaEy3Z;U40%3dh;|uL>tHjA!K8 zFyv{T$A=0Fp1Y*N8dBnl!aA~IPGN)ihQcx8F@<}GU4`R3*P99_upbAT_HxBr2)tF> z?|$pgHR>(Pb?Q!Fx15S~Vbwai*f`c`)N`CjdE>WW@kMZmul6=5ASq$wJXOTnp^FHRD(9O2w|^h+Jczvd%j}(`(eNd~UM)8@KJ$ aZR>E-ahH8N=zLVSjgtE)O^bwJb&V;T45*?0b-W&i%V^L`EhaMOUhR$U-Ink zGWkwGn;`G^g0+`!UC=iu@21aJE!TFYzkdByK)*@*(=95@ca1ZE!5Hjrwd2*?n?x}7 zlgtL4C0m;pcPR&yceU-+Wfbu&q1|=|Z+?=e`~}Z=d%4q%SvQy2ly=Boa@d7^ z5P=qo>} z)Ixh-lecxb$Hg7Yh%Dv%myqo~u$sVap|2*tB+!M6*xSo1Vu#Oh> zCEmQw>I6Hl!iA3j5#rk-xtAnqhMwM2dZc=hY$P|5kCG3QtI3t*z0pDDxc}@lP!R#a zOa*CYrC_BR&^VB~|6g?MC|TF9v$q`PfXQlJm?M+Vh(>)%60_b&S&`}|izZn?6iw;V z7)hCQtK2YwBxx<-t>pRY4WZ9 z<1M8AvpYYoE*1{`iGkiIY;1h|nta_JSDkZq<;$jvG3j>+Bb`kB`oF%8{MJxO|E;iI z@WW{@ld|P7%n99t8V+FrFW@vBg!lnJ(ay7x$Gl4Vu+&5N<)3=?qNA|jd~QvU22)&A zdL0Aepuz_6I|^rr#}w`(KBI7!r~jdF4r6#i&W0hU`4m1-Sa9wJ6xNUzmlW1f5(^3& z#8(y05Kk)HN9-w_znoWp(`?Aj}izZm&zc7QHytngxdEOMlMtWgdYI$>;iZs^j!DHS6e7=UAr`mU)pKUSbRj9{&hJ?uZdFxkKGK##=awC3+p>mcHd{R;^O2TZh|` z9a?ii%XS>wDH8=&KF%+AQ{ z#3U3ST6`!-(Y6o$0n$PXt@NRNDDpc1_{E@f1sXJ&v$IbPmTjekIfQ^5wJeXE$_~`!$)^l!MzWAo~6*2 zi56Pc8E|)DpJ&-2ZhY@rZEy;&+a{&g^;g~o7bEsZmRn2eTGO#?B5fQoudz)0bm845 zNO1G8Ut!Td)=oBC@iI8hKgE*!00o5$9QQNq7g>~9@t|cbV_)qKY$KH-y%AU~2iybf z{UJ-w&9C!k!ZzyAFFlS^f%sl>$hC`vZ^Z#B*TC>#kMKR$N>7to@Ud55MQ2v1kH%pu zl%?&^8t!)+eqE$fH)Rl~NmhYhRS$?uU`hE*`4t&1cC@%plOhXy^ANq8EymMC_k_Bd ztkSd!0mC(I3?l`6B9;;OI$BMmMo>o+e2IF&cY!mgLJoO&<%r^YB6*l3X@(B(N}f_) zBx}iyH6{7l{H2nX<;Y7)*dL3uW(G1aO zB`@@W(bq-2HpY`)tEZ|6`sJbyRS-p;W9kE`;?N3WYExp5sMQBXm2Yx+RZL(ShTOf% z)3Eu1IK|U7SbzPCN$AC)Y+2JziHUbg)nR2ClQ_XsWo~C_a!9F&W4&X8>wor(?+Rms zV*TQ-)VWkEO%97GwQu{InY`}x|1yoYdd6EY|Ly(Xm*)!m{-N$pE3B=3^&Y=&N6V9Q zkK-QFfi>xONg6s7`1*goj{HVbv43M3<7bUdCh5&lKRR@rsC;m8(I1cN*-4?q0{ywsK?>>Ooa9yN7JDVufIpHr13V;g7w}1mv)KJ_iE}hW zFL7^Z+|9@7bBP7|u3KV-^5VS2DwRY-Vh#AR#2MgGiMxPZiL>bIb%}HID(!7si?%lx zc`KGrZL(+)7vs?!TH2!(*nT4nV#9R;C$eJ4Hcqb?2N%LaVHlXW$PkwplR+;22m(li z6*068?ljgLbdVMhbqK<-<`tt_uGWnGt;hj&0Hv zEU!`-QUlsgtu%cAJcIw1CbqKi literal 0 HcmV?d00001 diff --git a/assets/fonts/saudi_riyal.woff2 b/assets/fonts/saudi_riyal.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..f80724774e4284b186080cd9b1497e7d51975212 GIT binary patch literal 760 zcmV4EC)p!V+IiwoZrZP9>&gy zDS0+N1fwV4#g(a!)_w$EcF%vGnZ5e}MgS2CUtr~8B*#J_{`*g-K8xsqWG(ERU_WDC z?lL>PCKaneb44Y7;+p!24OES9@6yuXd=OfQH_5 zdOlcM{lFtl;KeuG5GPMY#C)p(;Qm9dz27Ny9B$Ild|~wuJ(j=KwGTQbW6azqK4}*% zmNaj_H+hh0)-|(hN+q59y*5 z9{S2}S~WchHsb{)2_>47t8f6PaBse;jcLAn|W0i6ljqqbS$&cUzdsUQrr`kyTcqVE_PLrcRIm literal 0 HcmV?d00001 diff --git a/lib/config/config.dart b/lib/config/config.dart index f60b7762..d5c4e413 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,13 +21,13 @@ 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:2018/'; - // var BASE_URL = 'https://uat.hmgwebservices.com/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; -var BASE_URL = 'https://webservices.hmg.com/'; +// var BASE_URL = 'https://webservices.hmg.com/'; // var BASE_URL = 'http://10.50.100.198:4422/'; @@ -353,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 17.4; +var VERSION_ID = 17.5; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 7bfb0397..8dd0eb47 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -586,6 +586,7 @@ const Map localizedValues = { "items": {"en": "item(s)", "ar": "عنصر"}, "checkOut": {"en": "CHECK OUT", "ar": "الدفع"}, "sar": {"en": "SAR", "ar": " ر.س "}, + // "sar": {"en": "", "ar": " "}, "aed": {"en": "AED", "ar": "درهم"}, "payOnline": {"en": "PAY ONLINE", "ar": "اتمام عملية الدفع "}, "cancelOrder": {"en": "CANCEL ORDER", "ar": "الغاء الطلب "}, diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 8faf93bd..9097d2fd 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -187,7 +187,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 5185584; //4609100 + // body['PatientID'] = 4769527; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 33a7cbd6..02f8ebe7 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -30,6 +30,7 @@ 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:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; class AnicllaryOrdersDetails extends StatefulWidget { @@ -151,7 +152,8 @@ class _AnicllaryOrdersState extends State with SingleTic width: MediaQuery.of(context).size.width * 0.75, child: getPaymentMethods(), ), - _amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue() + " " + TranslationBase.of(context).sar, isBold: true, isTotal: true), + _amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue(), isBold: true, isTotal: true), + // _amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue(), isBold: true, isTotal: true), SizedBox(height: 12), DefaultButton( TranslationBase.of(context).payNow.toUpperCase(), @@ -177,15 +179,14 @@ class _AnicllaryOrdersState extends State with SingleTic return Text( text, style: TextStyle( - fontSize: isBold - ? isTotal - ? 16 - : 12 - : 11, - letterSpacing: -0.5, - color: isBold ? Color(0xff2E303A) : Color(0xff575757), - fontWeight: isTotal ? FontWeight.bold : FontWeight.w600, - ), + fontSize: isBold + ? isTotal + ? 16 + : 12 + : 11, + letterSpacing: -0.5, + color: isBold ? Color(0xff2E303A) : Color(0xff575757), + fontWeight: isTotal ? FontWeight.bold : FontWeight.w600), ); } @@ -197,7 +198,13 @@ class _AnicllaryOrdersState extends State with SingleTic child: _getNormalText(title), ), Expanded( - child: _getNormalText(value, isBold: isBold, isTotal: isTotal), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + _getNormalText(value, isBold: isBold, isTotal: isTotal), + ], + ), ), ]), ); @@ -572,9 +579,9 @@ class _AnicllaryOrdersState extends State with SingleTic }); }), Utils.tableColumnValue('${value.procedureName}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${value.patientShare.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${value.patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${value.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value.patientShare.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value.patientTaxAmount.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value.patientShareWithTax.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), ]), ); return tableRow; @@ -660,27 +667,27 @@ class _AnicllaryOrdersState extends State with SingleTic service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { if (res["MessageStatus"] == 1) { await context.read().initiateApplePayWithPayfort( - customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, - // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, - customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", - orderDescription: "Ancillary Order Payment", - orderAmount: double.parse(getTotalValue()), - merchantReference: transID, - payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, - currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", - onFailed: (failureResult) async { - GifLoaderDialogUtils.hideDialog(context); - log("failureResult: ${failureResult.message.toString()}"); - AppToast.showErrorToast(message: failureResult.message.toString()); - }, - onSuccess: (successResult) async { - log("Payfort: ${successResult.responseMessage}"); - await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); - checkPaymentStatus(AppoitmentAllHistoryResultList()); - }, - projectId: widget.projectID, - serviceTypeEnum: ServiceTypeEnum.ancillaryOrder, - ); + customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", + orderDescription: "Ancillary Order Payment", + orderAmount: double.parse(getTotalValue()), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); + checkPaymentStatus(AppoitmentAllHistoryResultList()); + }, + projectId: widget.projectID, + serviceTypeEnum: ServiceTypeEnum.ancillaryOrder, + ); } else { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: "An error occurred while processing your request"); diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index f4df725b..6bdc612c 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -31,6 +31,7 @@ import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.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'; import '../../config/shared_pref_kay.dart'; @@ -41,6 +42,7 @@ class BookSuccess extends StatefulWidget { DoctorList docObject; late MyInAppBrowser browser; + // final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser()); String appoDateFormatted; @@ -123,8 +125,8 @@ class _BookSuccessState extends State { ), TableRow( children: [ - TableCell(child: _getHeadingText("SR " + widget.patientShareResponse.patientShare.toString())), - TableCell(child: _getHeadingText("SR " + widget.patientShareResponse.patientShareWithTax.toString())), + TableCell(child: _getHeadingText(widget.patientShareResponse.patientShare.toString())), + TableCell(child: _getHeadingText(widget.patientShareResponse.patientShareWithTax.toString())), ], ), ], @@ -1094,15 +1096,21 @@ class _BookSuccessState extends State { _getHeadingText(text) { return Container( padding: EdgeInsets.only(bottom: 10.0, left: 20, right: 20), - child: Text( - text, - textAlign: TextAlign.start, - style: TextStyle( - fontSize: 16.0, - letterSpacing: -0.64, - color: Colors.white, - fontWeight: FontWeight.w600, - ), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white), + mWidth(6), + Text( + text, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.64, + color: Colors.white, + fontWeight: FontWeight.w600, + ), + ), + ], ), ); } diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart index 6d6c846b..0371fd24 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart @@ -8,6 +8,7 @@ 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'; class BillAmount extends StatefulWidget { final Function changeCurrentTab; @@ -98,7 +99,13 @@ class _BillAmountState extends State { child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo), ), Expanded( - child: _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}', isBold: true, isTotal: true), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}', isBold: true, isTotal: true), + ], + ), ) ], ), diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart index 7dec3944..093789f3 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -22,6 +22,7 @@ import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMa import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; import '../AvailableAppointmentsPage.dart'; @@ -519,9 +520,15 @@ class _PickupLocationState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), - Text( - TranslationBase.of(context).sar + (widget.patientER_RC.transportationDetails!.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), - style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + (widget.patientER_RC.transportationDetails!.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), + style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + ), + ], ), ], ) diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart index d994d31b..23bd8b18 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart @@ -11,6 +11,7 @@ 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:provider/provider.dart'; enum Direction { ToHospital, FromHospital } @@ -123,13 +124,19 @@ class _SelectTransportationMethodState extends State ), Expanded( flex: 1, - child: Text( - TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}', - style: TextStyle( - fontSize: 12.0, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}', + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], ), ) ], @@ -325,9 +332,15 @@ class _SelectTransportationMethodState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), - Text( - TranslationBase.of(context).sar + (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'), - style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'), + style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + ), + ], ), ], ) diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart index b9533089..10be1e11 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart @@ -9,6 +9,7 @@ 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:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -18,14 +19,14 @@ class Summary extends StatefulWidget { final PatientER_RC patientER_RC; final AmRequestViewModel amRequestViewModel; final TabController tabController; - Summary({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel, required this.tabController}); + + Summary({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel, required this.tabController}); @override _SummaryState createState() => _SummaryState(); } class _SummaryState extends State { - @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -129,12 +130,17 @@ class _SummaryState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), - Text( - TranslationBase.of(context).sar + + Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( (widget.patientER_RC.transportationDetails!.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), - style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + ), + ], ), ], ) diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart index 69da5dfc..53fd0f34 100644 --- a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart @@ -27,6 +27,7 @@ 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:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; class EROnlineCheckInPaymentDetails extends StatefulWidget { @@ -278,7 +279,7 @@ class _EROnlineCheckInPaymentDetailsState extends State { ), ), Expanded( - child: Text( - '$amount ${TranslationBase.of(context).sar}', - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 12, height: 12), + mWidth(6), + Text( + amount, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], ), ), ], @@ -231,13 +240,19 @@ class RRTRequestPageState extends State { ), ), Expanded( - child: Text( - '$vat ${TranslationBase.of(context).sar}', - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 12, height: 12), + mWidth(6), + Text( + vat, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], ), ), ], @@ -259,13 +274,20 @@ class RRTRequestPageState extends State { ), ), Expanded( - child: Text( - '$total ${TranslationBase.of(context).sar}', - style: TextStyle( - fontSize: 14, - letterSpacing: -0.48, - fontWeight: FontWeight.bold, - ), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 14, height: 14), + mWidth(6), + Text( + total, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.48, + fontWeight: FontWeight.bold, + color: CustomColors.black + ), + ), + ], ), ), ], diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart index 170895f8..9df2c92f 100644 --- a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; import 'package:share_plus/share_plus.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -166,13 +167,19 @@ class _InPatientPendingAdvancePaymentState extends State { ), ), Expanded( - child: Text( - widget.getERAppointmentFeesList.amount! + " " + widget.getERAppointmentFeesList.currency!, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), + child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") + ? Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + widget.getERAppointmentFeesList.amount!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ) + : Text( + widget.getERAppointmentFeesList.amount! + " " + widget.getERAppointmentFeesList.currency!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), ), ], ), @@ -161,14 +176,29 @@ class _LiveCarePatmentPageState extends State { ), ), Expanded( - child: Text( - widget.getERAppointmentFeesList.tax! + " " + widget.getERAppointmentFeesList.currency!, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), + child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") + ? Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + widget.getERAppointmentFeesList.tax!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ) + : Text( + widget.getERAppointmentFeesList.tax! + " " + widget.getERAppointmentFeesList.currency!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), ), ], ), @@ -189,14 +219,29 @@ class _LiveCarePatmentPageState extends State { ), ), Expanded( - child: Text( - widget.getERAppointmentFeesList.total! + " " + widget.getERAppointmentFeesList.currency!, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), + child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") + ? Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + widget.getERAppointmentFeesList.total!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ) + : Text( + widget.getERAppointmentFeesList.total! + " " + widget.getERAppointmentFeesList.currency!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), ), ], ), diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index 0c0f354c..ca46b5cb 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -25,6 +25,7 @@ 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/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -149,16 +150,20 @@ class _ConfirmPaymentPageState extends State { ) : Image.asset(getImagePath(widget.selectedPaymentMethod!)), ), - Text( - widget.advanceModel!.hospitalsModel!.projectOutSA! - ? '${widget.advanceModel!.amount} ' + TranslationBase.of(context).aed - : '${widget.advanceModel!.amount} ' + TranslationBase.of(context).sar, - // '${widget.advanceModel.amount} ' + TranslationBase.of(context).sar, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w900, - letterSpacing: -0.48, - ), + Row( + children: [ + widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20), + mWidth(6), + Text( + widget.advanceModel!.hospitalsModel!.projectOutSA! ? '${widget.advanceModel!.amount} ' + TranslationBase.of(context).aed : '${widget.advanceModel!.amount}', + // '${widget.advanceModel.amount} ' + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w900, + letterSpacing: -0.48, + ), + ), + ], ) ], ), @@ -320,27 +325,27 @@ class _ConfirmPaymentPageState extends State { service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { if (res["MessageStatus"] == 1) { await context.read().initiateApplePayWithPayfort( - customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!, - // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, - customerEmail: "CustID_${widget.advanceModel!.fileNumber!}@HMG.com", - orderDescription: "Advance Payment", - orderAmount: double.parse(widget.advanceModel!.amount!), - merchantReference: transID, - payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, - currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", - onFailed: (failureResult) async { - GifLoaderDialogUtils.hideDialog(context); - log("failureResult: ${failureResult.message.toString()}"); - AppToast.showErrorToast(message: failureResult.message.toString()); - }, - onSuccess: (successResult) async { - log("Payfort: ${successResult.responseMessage}"); - await context.read().addPayfortApplePayResponse(num.parse(widget.advanceModel!.fileNumber!), result: successResult); - checkPaymentStatus(AppoitmentAllHistoryResultList()); - }, - projectId: widget.advanceModel!.hospitalsModel!.iD, - serviceTypeEnum: ServiceTypeEnum.advancePayment, - ); + customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${widget.advanceModel!.fileNumber!}@HMG.com", + orderDescription: "Advance Payment", + orderAmount: double.parse(widget.advanceModel!.amount!), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(num.parse(widget.advanceModel!.fileNumber!), result: successResult); + checkPaymentStatus(AppoitmentAllHistoryResultList()); + }, + projectId: widget.advanceModel!.hospitalsModel!.iD, + serviceTypeEnum: ServiceTypeEnum.advancePayment, + ); } else { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: "An error occurred while processing your request"); diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 459b7250..25f22797 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -5,6 +5,7 @@ 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/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -17,7 +18,7 @@ import 'package:provider/provider.dart'; import 'advance_payment_page.dart'; class MyBalancePage extends StatelessWidget { - List imagesInfo =[]; + List imagesInfo = []; late ProjectViewModel projectViewModel; @@ -95,18 +96,31 @@ class MyBalancePage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, mainAxisSize: MainAxisSize.min, children: [ - Text( - double.parse(model.totalAdvanceBalanceAmount?.toString() ?? "0").toStringAsFixed(2), - style: TextStyle( - fontSize: 24, - fontWeight: FontWeight.bold, - letterSpacing: -1.44, - height: 24 / 23, - color: Colors.white, - ), + Row( + children: [ + projectViewModel.user!.outSA == 1 + ? Container() + : SvgPicture.asset( + "assets/images/new/Saudi_Riyal_Symbol.svg", + width: 22, + height: 22, + color: Colors.white, + ), + mWidth(6), + Text( + double.parse(model.totalAdvanceBalanceAmount?.toString() ?? "0").toStringAsFixed(2), + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + letterSpacing: -1.44, + height: 24 / 23, + color: Colors.white, + ), + ), + ], ), Text( - projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : TranslationBase.of(context).sar, + projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : "", style: TextStyle( fontSize: 16, fontWeight: FontWeight.bold, @@ -156,14 +170,26 @@ class MyBalancePage extends StatelessWidget { ), ), ), - Text( - amount.toStringAsFixed(2) + " " + (projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : TranslationBase.of(context).sar), - style: TextStyle( - fontSize: 16, - letterSpacing: -0.64, - fontWeight: amount > 0 ? FontWeight.bold : FontWeight.w500, - color: Color(0xff2E303A), - ), + Row( + children: [ + projectViewModel.user!.outSA == 1 + ? Container() + : Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + ], + ), + mWidth(6), + Text( + amount.toStringAsFixed(2) + " " + (projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : ""), + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: amount > 0 ? FontWeight.bold : FontWeight.w500, + color: Color(0xff2E303A), + ), + ), + ], ), ], ), diff --git a/lib/pages/medical/my_invoices/invoice_detail_page.dart b/lib/pages/medical/my_invoices/invoice_detail_page.dart index c4cfe3e2..767354e2 100644 --- a/lib/pages/medical/my_invoices/invoice_detail_page.dart +++ b/lib/pages/medical/my_invoices/invoice_detail_page.dart @@ -151,7 +151,7 @@ class _InvoiceDetailState extends State { child: _getNormalText(TranslationBase.of(context).discount), ), Expanded( - child: _getNormalText(this.totalDiscount.toString() + " " + TranslationBase.of(context).sar, isBold: true), + child: _getNormalText(this.totalDiscount.toString(), isBold: true), ) ], ), @@ -169,7 +169,7 @@ class _InvoiceDetailState extends State { "%): "), ), Expanded( - child: _getNormalText(num.tryParse(this.totalVAT.toString())!.toStringAsFixed(2) + " " + TranslationBase.of(context).sar, isBold: true), + child: _getNormalText(num.tryParse(this.totalVAT.toString())!.toStringAsFixed(2), isBold: true), ) ], ), @@ -184,7 +184,7 @@ class _InvoiceDetailState extends State { child: _getNormalText(TranslationBase.of(context).total), ), Expanded( - child: _getNormalText(this.subTotal.toString() + " " + TranslationBase.of(context).sar, isBold: true), + child: _getNormalText(this.subTotal.toString(), isBold: true), ) ], ), @@ -199,7 +199,7 @@ class _InvoiceDetailState extends State { child: _getNormalText(TranslationBase.of(context).paid), ), Expanded( - child: _getNormalText(this.grandTotal.toString() + " " + TranslationBase.of(context).sar, isBold: true), + child: _getNormalText(this.grandTotal.toString(), isBold: true), ) ], ), @@ -283,9 +283,9 @@ class _InvoiceDetailState extends State { isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel), Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].quantity}', isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString() + " " + TranslationBase.of(context).sar}', + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString()}', isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString() + " " + TranslationBase.of(context).sar}', + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString()}', isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel), ]), ); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 3ce068fb..99b113f7 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -62,6 +62,7 @@ class TranslationBase { String get hospitalName => localizedValues['hospitalName'][locale.languageCode]; String get doctorName => localizedValues['doctorName'][locale.languageCode]; + String get NoClinicFound => localizedValues['NoClinicFound'][locale.languageCode]; String get nearestAppo => localizedValues['nearestAppo'][locale.languageCode]; @@ -1136,6 +1137,7 @@ class TranslationBase { String get myPrescription => localizedValues['myPrescription'][locale.languageCode]; String get quantity => localizedValues['quantity'][locale.languageCode]; + String get productQuantity => localizedValues['productQuantity'][locale.languageCode]; String get conditionsHMG => localizedValues['conditionsHMG'][locale.languageCode]; @@ -1483,6 +1485,7 @@ class TranslationBase { String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode]; String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode]; + String get orderHistory => localizedValues['orderHistory'][locale.languageCode]; String get offerAndPackagesDetails => localizedValues['offerAndPackagesDetails'][locale.languageCode]; @@ -1854,6 +1857,7 @@ class TranslationBase { String get needPrescription => localizedValues['needPrescription'][locale.languageCode]; String get outOfStockMsg => localizedValues['outOfStockMsg'][locale.languageCode]; + String get productOutOfStock => localizedValues['productOutOfStock'][locale.languageCode]; String get noArabicLetters => localizedValues['noArabicLetters'][locale.languageCode]; @@ -2816,235 +2820,454 @@ class TranslationBase { String get submitReview => localizedValues["submitReview"][locale.languageCode]; String get Protein => localizedValues["Protein"][locale.languageCode]; + String get Cals => localizedValues["Cals"][locale.languageCode]; + String get gramsPerDay => localizedValues["gramsPerDay"][locale.languageCode]; + String get gr => localizedValues["gr"][locale.languageCode]; + String get gramsPerMeal => localizedValues["gramsPerMeal"][locale.languageCode]; String get cancelReminder => localizedValues["CancelReminder"][locale.languageCode]; String get reminderCancelSuccess => localizedValues["reminderCancelSuccess"][locale.languageCode]; + String get syncSuccess => localizedValues["syncSuccess"][locale.languageCode]; + String get useLakumPoints => localizedValues["useLakumPoints"][locale.languageCode]; + String get points => localizedValues["points"][locale.languageCode]; + String get availableBalance => localizedValues["availableBalance"][locale.languageCode]; + String get ordersDashboard => localizedValues["ordersDashboard"][locale.languageCode]; + String get requestedDateLiveCare => localizedValues["requestedDateLiveCare"][locale.languageCode]; + String get yourTurn => localizedValues["yourTurn"][locale.languageCode]; + String get patients => localizedValues["patients"][locale.languageCode]; + String get group => localizedValues["group"][locale.languageCode]; + String get ancillaryOrdersPaymentConfirm => localizedValues["ancillaryOrdersPaymentConfirm"][locale.languageCode]; + String get covidTestTodo => localizedValues["covidTestTodo"][locale.languageCode]; + String get successRegister => localizedValues["successRegister"][locale.languageCode]; + String get pharmacyLiveCare => localizedValues["pharmacyLiveCare"][locale.languageCode]; + String get ancillaryOrderPaymentSuccess => localizedValues["ancillaryOrderPaymentSuccess"][locale.languageCode]; + String get connectTitle => localizedValues["connectTitle"][locale.languageCode]; + String get connectSubtitle => localizedValues["connectSubtitle"][locale.languageCode]; + String get declineLbl => localizedValues["declineLbl"][locale.languageCode]; + String get covidConsent => localizedValues["covidConsent"][locale.languageCode]; + String get covidConsentHeader => localizedValues["covidConsentHeader"][locale.languageCode]; + String get drawOverAppsPermission => localizedValues["drawOverAppsPermission"][locale.languageCode]; + String get selectTamaraPlan => localizedValues["selectTamaraPlan"][locale.languageCode]; + String get installments => localizedValues["installments"][locale.languageCode]; + String get cameraPermissionDialog => localizedValues["cameraPermissionDialog"][locale.languageCode]; + String get galleryPermission => localizedValues["galleryPermission"][locale.languageCode]; + String get locationPermissionDialog => localizedValues["locationPermissionDialog"][locale.languageCode]; + String get calendarPermission => localizedValues["calendarPermission"][locale.languageCode]; + String get recordAudioPermission => localizedValues["recordAudioPermission"][locale.languageCode]; + String get wifiPermission => localizedValues["wifiPermission"][locale.languageCode]; + String get physicalActivityPermission => localizedValues["physicalActivityPermission"][locale.languageCode]; + String get bluetoothPermission => localizedValues["bluetoothPermission"][locale.languageCode]; + String get privacyPolicy => localizedValues["privacyPolicy"][locale.languageCode]; + 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]; + String get deleteAccount => localizedValues["deleteAccount"][locale.languageCode]; + String get deactivateAccount => localizedValues["deactivateAccount"][locale.languageCode]; + String get accountDeactivated => localizedValues["accountDeactivated"][locale.languageCode]; + String get accountDeactivatedMsg => localizedValues["accountDeactivatedMsg"][locale.languageCode]; + String get updateInsuranceManually => localizedValues["updateInsuranceManually"][locale.languageCode]; + String get enterInsuranceDetails => localizedValues["enterInsuranceDetails"][locale.languageCode]; + String get cardHolderName => localizedValues["cardHolderName"][locale.languageCode]; + String get membershipNo => localizedValues["membershipNo"][locale.languageCode]; + String get insurancePolicyNo => localizedValues["policyNo"][locale.languageCode]; + String get insuranceClassName => localizedValues["insuranceClassName"][locale.languageCode]; + String get NFCNotSupported => localizedValues["NFCNotSupported"][locale.languageCode]; + String get paymentOnly => localizedValues["paymentOnly"][locale.languageCode]; + String get pendingOnly => localizedValues["pendingOnly"][locale.languageCode]; + String get insuranceRequestSubmit => localizedValues["insuranceRequestSubmit"][locale.languageCode]; + String get enterWorkplaceName => localizedValues["enter-workplace-name"][locale.languageCode]; + String get workplaceName => localizedValues["workplaceName"][locale.languageCode]; + String get needApproval => localizedValues["needApproval"][locale.languageCode]; + String get callLiveCareSupport => localizedValues["callLiveCareSupport"][locale.languageCode]; + String get pendingActivation => localizedValues["pendingActivation"][locale.languageCode]; + String get awaitingApproval => localizedValues["awaitingApproval"][locale.languageCode]; + String get liveCareSupportContact => localizedValues["liveCareSupportContact"][locale.languageCode]; + String get scanNFC => localizedValues["scanNFC"][locale.languageCode]; + String get pharmaLiveCare => localizedValues["pharmaLiveCare"][locale.languageCode]; + String get pharmaLiveCare1 => localizedValues["pharmaLiveCare1"][locale.languageCode]; + String get pharmaLiveCareDesc1 => localizedValues["pharmaLiveCareDesc1"][locale.languageCode]; + String get wherePharmaLiveCare => localizedValues["wherePharmaLiveCare"][locale.languageCode]; + String get pharmaLiveCareDesc2 => localizedValues["pharmaLiveCareDesc2"][locale.languageCode]; + String get howPharmaLiveCare => localizedValues["howPharmaLiveCare"][locale.languageCode]; + String get pharmaLiveCareDesc3 => localizedValues["pharmaLiveCareDesc3"][locale.languageCode]; + String get pharmaLiveCareScanQR => localizedValues["pharmaLiveCareScanQR"][locale.languageCode]; + String get pharmaLiveCareScanQR1 => localizedValues["pharmaLiveCareScanQR1"][locale.languageCode]; + String get pharmaLiveCareMakePayment => localizedValues["pharmaLiveCareMakePayment"][locale.languageCode]; + String get pharmaLiveCareMakePayment1 => localizedValues["pharmaLiveCareMakePayment1"][locale.languageCode]; + String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode]; + String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode]; + String get emergencyServicesSubtitle => localizedValues["emergencyServicesSubtitle"][locale.languageCode]; + String get rateDoctorResponse => localizedValues["rateDoctorResponse"][locale.languageCode]; + String get comments => localizedValues["comments"][locale.languageCode]; + String get rateDoctorResponseHeading => localizedValues["rateDoctorResponseHeading"][locale.languageCode]; + String get updateInsuranceManuallyDialog => localizedValues["updateInsuranceManuallyDialog"][locale.languageCode]; + String get viewReport => localizedValues["viewReport"][locale.languageCode]; + String get sickLeaveAdmittedPatient => localizedValues["sickLeaveAdmittedPatient"][locale.languageCode]; + String get InPatient => localizedValues["InPatient"][locale.languageCode]; + String get inPatientServices => localizedValues["InPatientServices"][locale.languageCode]; + String get InPatientServicesHeader => localizedValues["InPatientServicesHeader"][locale.languageCode]; + String get admissionGeneral => localizedValues["admissionGeneral"][locale.languageCode]; + String get consent => localizedValues["consent"][locale.languageCode]; + String get generalInstructionsTitle => localizedValues["generalInstructionsTitle"][locale.languageCode]; + String get generalInstructionsSubTitle => localizedValues["generalInstructionsSubTitle"][locale.languageCode]; + String get medicalInstructionsTitle => localizedValues["medicalInstructionsTitle"][locale.languageCode]; + String get medicalInstructionsSubTitle => localizedValues["medicalInstructionsSubTitle"][locale.languageCode]; + String get mealPlanTitle => localizedValues["mealPlanTitle"][locale.languageCode]; + String get mealPlanSubTitle => localizedValues["mealPlanSubTitle"][locale.languageCode]; + String get birthNotificationTitle => localizedValues["birthNotificationTitle"][locale.languageCode]; + String get birthNotificationSubTitle => localizedValues["birthNotificationSubTitle"][locale.languageCode]; + String get admissionNoticeTitle => localizedValues["admissionNoticeTitle"][locale.languageCode]; + String get admissionNoticeSubTitle => localizedValues["admissionNoticeSubTitle"][locale.languageCode]; + String get mothersMRN => localizedValues["mothersMRN"][locale.languageCode]; + String get mothersName => localizedValues["mothersName"][locale.languageCode]; + String get fathersNameEN => localizedValues["fathersNameEN"][locale.languageCode]; + String get fathersNameAR => localizedValues["fathersNameAR"][locale.languageCode]; + String get babysNameEN => localizedValues["babysNameEN"][locale.languageCode]; + String get babysNameAR => localizedValues["babysNameAR"][locale.languageCode]; + String get contactNumber => localizedValues["contactNumber"][locale.languageCode]; + String get scanID => localizedValues["scanID"][locale.languageCode]; + String get birthNotificationNotes1 => localizedValues["birthNotificationNotes1"][locale.languageCode]; + String get birthNotificationNotes2 => localizedValues["birthNotificationNotes2"][locale.languageCode]; + String get birthNotificationNotes3 => localizedValues["birthNotificationNotes3"][locale.languageCode]; + String get placeOrder => localizedValues["placeOrder"][locale.languageCode]; + String get isFasting => localizedValues["isFasting"][locale.languageCode]; + String get noGeneralInstructions => localizedValues["noGeneralInstructions"][locale.languageCode]; + String get noMedicalInstructions => localizedValues["noMedicalInstructions"][locale.languageCode]; + String get medicalInstructions => localizedValues["medicalInstructions"][locale.languageCode]; + String get generalInstructions => localizedValues["generalInstructions"][locale.languageCode]; + String get copyLink => localizedValues["copyLink"][locale.languageCode]; + String get copyLinkTxt => localizedValues["copyLinkTxt"][locale.languageCode]; + String get paymentLinkCopied => localizedValues["paymentLinkCopied"][locale.languageCode]; + String get proErrorMessage => localizedValues["proErrorMessage"][locale.languageCode]; + String get admissionNo => localizedValues["admissionNo"][locale.languageCode]; + String get admissionReqNo => localizedValues["admissionReqNo"][locale.languageCode]; + String get dischargeDate => localizedValues["dischargeDate"][locale.languageCode]; + String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode]; + String get onlyAdmitted => localizedValues["onlyAdmitted"][locale.languageCode]; + String get assistYou => localizedValues["assistYou"][locale.languageCode]; + String get receive => localizedValues["receive"][locale.languageCode]; + String get PRO => localizedValues["PRO"][locale.languageCode]; + String get patientRelationOffice => localizedValues["patientRelationOffice"][locale.languageCode]; + String get roomNo => localizedValues["roomNo"][locale.languageCode]; + String get generalConsent => localizedValues["generalConsent"][locale.languageCode]; + String get generalConsent1 => localizedValues["generalConsent1"][locale.languageCode]; + String get hospitalRules => localizedValues["hospitalRules"][locale.languageCode]; + String get generalConsent2 => localizedValues["generalConsent2"][locale.languageCode]; + String get communicationConsent => localizedValues["communicationConsent"][locale.languageCode]; + String get generalConsent3 => localizedValues["generalConsent3"][locale.languageCode]; + String get releaseConsent => localizedValues["releaseConsent"][locale.languageCode]; + String get generalConsent4 => localizedValues["generalConsent4"][locale.languageCode]; + String get generalConsent5 => localizedValues["generalConsent5"][locale.languageCode]; + String get valuables => localizedValues["valuables"][locale.languageCode]; + String get generalConsent6 => localizedValues["generalConsent6"][locale.languageCode]; + String get financialConsent => localizedValues["financialConsent"][locale.languageCode]; + String get generalConsent7 => localizedValues["generalConsent7"][locale.languageCode]; + String get dataSharingConsent => localizedValues["dataSharingConsent"][locale.languageCode]; + String get generalConsent8 => localizedValues["generalConsent8"][locale.languageCode]; + String get permissionLeaveConsent => localizedValues["permissionLeaveConsent"][locale.languageCode]; + String get generalConsent9 => localizedValues["generalConsent9"][locale.languageCode]; + String get observeConsent => localizedValues["observeConsent"][locale.languageCode]; + String get generalConsent10 => localizedValues["generalConsent10"][locale.languageCode]; + String get noGuaranteeConsent => localizedValues["noGuaranteeConsent"][locale.languageCode]; + String get generalConsent11 => localizedValues["generalConsent11"][locale.languageCode]; + String get disputeConsent => localizedValues["disputeConsent"][locale.languageCode]; + String get generalConsent12 => localizedValues["generalConsent12"][locale.languageCode]; + String get patientsRightsConsent => localizedValues["patientsRightsConsent"][locale.languageCode]; + String get generalConsent13 => localizedValues["generalConsent13"][locale.languageCode]; + String get acknowledgementConsent => localizedValues["acknowledgementConsent"][locale.languageCode]; + String get generalConsent14 => localizedValues["generalConsent14"][locale.languageCode]; + String get invalidEligibility => localizedValues["invalidEligibility"][locale.languageCode]; + String get invalidInsurance => localizedValues["invalidInsurance"][locale.languageCode]; + String get continueCash => localizedValues["continueCash"][locale.languageCode]; + String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode]; + String get downloadReport => localizedValues["downloadReport"][locale.languageCode]; + String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode]; + String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode]; + String get validInsurance => localizedValues["validInsurance"][locale.languageCode]; + String get contactRRT => localizedValues["contactRRT"][locale.languageCode]; + String get checkInViaLocation => localizedValues["checkInViaLocation"][locale.languageCode]; + String get locationCheckInError => localizedValues["locationCheckInError"][locale.languageCode]; + String get upcoming => localizedValues["upcoming"][locale.languageCode]; + String get noUpcomingAppointment => localizedValues["noUpcomingAppointment"][locale.languageCode]; + String get locationTimeoutError => localizedValues["locationTimeoutError"][locale.languageCode]; + String get loadMore => localizedValues["loadMore"][locale.languageCode]; + String get selectHospitalBloodDonation => localizedValues["selectHospitalBloodDonation"][locale.languageCode]; + String get wecare => localizedValues["wecare"][locale.languageCode]; + String get myinstructions => localizedValues["myinstructions"][locale.languageCode]; + String get clinicLocation => localizedValues["clinicLocation"][locale.languageCode]; + String get waitingAppointment => localizedValues["waitingAppointment"][locale.languageCode]; + String get whatWaitingAppointment => localizedValues["whatWaitingAppointment"][locale.languageCode]; + String get waitingAppointmentText1 => localizedValues["waitingAppointmentText1"][locale.languageCode]; + String get waitingAppointmentText2 => localizedValues["waitingAppointmentText2"][locale.languageCode]; + String get waitingAppointmentText3 => localizedValues["waitingAppointmentText3"][locale.languageCode]; + String get waitingAppointmentVerificationMethod => localizedValues["waitingAppointmentVerificationMethod"][locale.languageCode]; + String get howToUseVerificationMethod => localizedValues["howToUseVerificationMethod"][locale.languageCode]; + String get addToWaitingList => localizedValues["addToWaitingList"][locale.languageCode]; + String get searchClinic => localizedValues["searchClinic"][locale.languageCode]; + String get enterMobileNumber => localizedValues["enterMobileNumber"][locale.languageCode]; + String get videoCall => localizedValues["videoCall"][locale.languageCode]; + String get audioCall => localizedValues["audioCall"][locale.languageCode]; + String get phoneCall => localizedValues["phoneCall"][locale.languageCode]; + String get selectCallType => localizedValues["selectCallType"][locale.languageCode]; + String get selectedCallType => localizedValues["selectedCallType"][locale.languageCode]; + String get selectBranch => localizedValues["selectBranch"][locale.languageCode]; + String get searchByBranch => localizedValues["searchByBranch"][locale.languageCode]; + String get existingPackage => localizedValues["existingPackage"][locale.languageCode]; + String get continueOrbookNew => localizedValues["continueOrbookNew"][locale.languageCode]; + String get newAppointment => localizedValues["newAppointment"][locale.languageCode]; + String get proceedPackage => localizedValues["proceedPackage"][locale.languageCode]; + String get hospitalNavigationTitle => localizedValues["hospitalNavigationTitle"][locale.languageCode]; + String get hospitalNavigationSubtitle => localizedValues["hospitalNavigationSubtitle"][locale.languageCode]; + String get workplaceNameAr => localizedValues["workplaceNameAr"][locale.languageCode]; + String get occupationNameEn => localizedValues["occupationNameEn"][locale.languageCode]; + String get occupationNameAr => localizedValues["occupationNameAr"][locale.languageCode]; + String get continueAgreeTerms => localizedValues["continueAgreeTerms"][locale.languageCode]; + String get agreeText => localizedValues["agreeText"][locale.languageCode]; + String get ERCheckInSuccess => localizedValues["ERCheckInSuccess"][locale.languageCode]; + String get generalConsentTitle => localizedValues["generalConsentTitle"][locale.languageCode]; + String get generalConsentSubTitle => localizedValues["generalConsentSubTitle"][locale.languageCode]; + String get incorrectNationalId => localizedValues["incorrectNationalId"][locale.languageCode]; + String get resultStatus => localizedValues["resultStatus"][locale.languageCode]; + String get labResultFlag => localizedValues["labResultFlag"][locale.languageCode]; + String get selectOccupation => localizedValues["selectOccupation"][locale.languageCode]; + String get selectOccupationError => localizedValues["selectOccupationError"][locale.languageCode]; String get whatIsOnlineCheckIn => localizedValues["whatIsOnlineCheckIn"][locale.languageCode]; + String get EROnlineCheckInDesc1 => localizedValues["EROnlineCheckInDesc1"][locale.languageCode]; + String get EROnlineCheckInHow => localizedValues["EROnlineCheckInHow"][locale.languageCode]; + String get EROnlineCheckInTapOn => localizedValues["EROnlineCheckInTapOn"][locale.languageCode]; + String get EROnlineCheckInTapOnCheckIn => localizedValues["EROnlineCheckInTapOnCheckIn"][locale.languageCode]; + String get EROnlineCheckInHoldPhone => localizedValues["EROnlineCheckInHoldPhone"][locale.languageCode]; + String get EROnlineCheckInHoldPhoneInstruction => localizedValues["EROnlineCheckInHoldPhoneInstruction"][locale.languageCode]; + String get EROnlineCheckInWaitTurn => localizedValues["EROnlineCheckInWaitTurn"][locale.languageCode]; + String get EROnlineCheckInWaitTurnInstruction => localizedValues["EROnlineCheckInWaitTurnInstruction"][locale.languageCode]; String get download => localizedValues["download"][locale.languageCode]; - String get share => localizedValues["share"][locale.languageCode]; + String get share => localizedValues["share"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 2dc03b03..77059a65 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -41,6 +41,7 @@ import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.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/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart'; @@ -824,18 +825,25 @@ class Utils { ); } - static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, bool isHighLow = false, required ProjectViewModel mProjectViewModel}) { + static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, bool isHighLow = false, bool isCurrency = false, required ProjectViewModel mProjectViewModel}) { ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context); return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ SizedBox(height: 12), - Text( - isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text, - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: isHighLow ? CustomColors.accentColor : Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + Row( + children: [ + Expanded( + child: Text( + isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: isHighLow ? CustomColors.accentColor : Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + ), + isCurrency ? getSaudiRiyalSymbol() : Container(), + ], ), SizedBox(height: 12), if (!isLast) @@ -963,6 +971,10 @@ class Utils { return projectDetailListModel; } + static Widget getSaudiRiyalSymbol({double fontSize = 16}) { + return Text(" SAR ", style: TextStyle(fontFamily: "SaudiRiyal", fontSize: fontSize)); + } + //static String generateSignature() {} } @@ -1032,6 +1044,26 @@ extension StringExtension on String { } } +extension TextToRichTextWithIcon on Text { + RichText toRichTextWithIcon() { + // Create the base TextSpan with the text data and style from the Text widget + return RichText( + text: TextSpan( + style: this.style, // Inherit the text style + children: [ + WidgetSpan( + child: Text(" SAR ", style: TextStyle(fontFamily: "SaudiRiyal")), + ), + TextSpan( + text: this.data, // Add the original text + style: this.style, // Inherit the text style + ), + ], + ), + ); + } +} + /* userBoard.asMap().map((i, element) => MapEntry(i, Stack( GestureDetector(onTap: () { diff --git a/pubspec.yaml b/pubspec.yaml index 5bad9780..73244f62 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.080+4050080 +version: 4.6.002+1 environment: sdk: ">=3.0.0 <3.13.0" @@ -278,6 +278,11 @@ flutter: fonts: - asset: assets/app_icons/fonts/DQIcons.ttf + - family: SaudiRiyal + fonts: +# - asset: assets/fonts/saudi_riyal.ttf + - asset: assets/fonts/sar-Regular.otf + - family: Poppins fonts: - asset: assets/fonts/poppins/Poppins-Black.ttf From 7d33ace5c9b251ed65dafa57ccf953509440899b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 27 Feb 2025 16:42:13 +0300 Subject: [PATCH 05/19] images added --- assets/images/new/Indoor_nav_appo.svg | 9 +++++++++ assets/images/new/NFC_Hold.svg | 3 +++ assets/images/new/Saudi_Riyal_Symbol.svg | 12 ++++++++++++ assets/images/new/hourglass.svg | 3 +++ assets/images/new/indoor_nav_home.svg | 11 +++++++++++ assets/images/new/tap.svg | 3 +++ assets/images/new/waitingAppo.svg | 6 ++++++ 7 files changed, 47 insertions(+) create mode 100644 assets/images/new/Indoor_nav_appo.svg create mode 100644 assets/images/new/NFC_Hold.svg create mode 100644 assets/images/new/Saudi_Riyal_Symbol.svg create mode 100644 assets/images/new/hourglass.svg create mode 100644 assets/images/new/indoor_nav_home.svg create mode 100644 assets/images/new/tap.svg create mode 100644 assets/images/new/waitingAppo.svg diff --git a/assets/images/new/Indoor_nav_appo.svg b/assets/images/new/Indoor_nav_appo.svg new file mode 100644 index 00000000..81bf654d --- /dev/null +++ b/assets/images/new/Indoor_nav_appo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/new/NFC_Hold.svg b/assets/images/new/NFC_Hold.svg new file mode 100644 index 00000000..fbfa19ea --- /dev/null +++ b/assets/images/new/NFC_Hold.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/new/Saudi_Riyal_Symbol.svg b/assets/images/new/Saudi_Riyal_Symbol.svg new file mode 100644 index 00000000..d57d83a1 --- /dev/null +++ b/assets/images/new/Saudi_Riyal_Symbol.svg @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/assets/images/new/hourglass.svg b/assets/images/new/hourglass.svg new file mode 100644 index 00000000..564ff289 --- /dev/null +++ b/assets/images/new/hourglass.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/new/indoor_nav_home.svg b/assets/images/new/indoor_nav_home.svg new file mode 100644 index 00000000..bfe32eec --- /dev/null +++ b/assets/images/new/indoor_nav_home.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/images/new/tap.svg b/assets/images/new/tap.svg new file mode 100644 index 00000000..cf73ddde --- /dev/null +++ b/assets/images/new/tap.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/new/waitingAppo.svg b/assets/images/new/waitingAppo.svg new file mode 100644 index 00000000..c9bd0096 --- /dev/null +++ b/assets/images/new/waitingAppo.svg @@ -0,0 +1,6 @@ + + + + + + From 2c5be020e9880b51ce72ceb7226967a81f81b3b3 Mon Sep 17 00:00:00 2001 From: Haroon Amjad <> Date: Sat, 1 Mar 2025 08:21:23 +0300 Subject: [PATCH 06/19] LanguageID added in Lab Report Email API --- lib/core/service/medical/labs_service.dart | 4 ++-- lib/core/viewModels/medical/labs_view_model.dart | 4 ++-- lib/pages/medical/labs/laboratory_result_page.dart | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 376e09ae..89ca56cc 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -209,7 +209,7 @@ class LabsService extends BaseService { RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail(); - Future sendLabReportEmail({PatientLabOrders? patientLabOrder, AuthenticatedUser? userObj, bool isVidaPlus = false, bool isDownload = false}) async { + Future sendLabReportEmail({PatientLabOrders? patientLabOrder, AuthenticatedUser? userObj, bool isVidaPlus = false, bool isDownload = false, int languageID = 1}) async { _requestSendLabReportEmail.projectID = patientLabOrder!.projectID; _requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo; _requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0"; @@ -228,7 +228,7 @@ class LabsService extends BaseService { _requestSendLabReportEmail.orderNo = patientLabOrder.orderNo; _requestSendLabReportEmail.isDownload = isDownload; _requestSendLabReportEmail.doctorID = patientLabOrder.doctorID; - _requestSendLabReportEmail.languageID = 1; + _requestSendLabReportEmail.languageID = languageID; // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart index fa67438d..525a084e 100644 --- a/lib/core/viewModels/medical/labs_view_model.dart +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -150,8 +150,8 @@ class LabsViewModel extends BaseViewModel { } } - sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false}) async { - await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload); + sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false, int languageID = 1}) async { + await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload, languageID: languageID); if (_labsService.hasError) { error = _labsService.error!; } else { diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 855836e3..2b506b6a 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -64,6 +64,7 @@ class _LaboratoryResultPageState extends State { patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, + languageID: projectViewModel.isArabic ? 1 : 2, isVidaPlus: Utils.isVidaPlusProject( projectViewModel, int.parse(widget.patientLabOrders!.projectID!), From 1080a59106253017426ba8add54687bd6e99a734 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 2 Mar 2025 12:42:31 +0300 Subject: [PATCH 07/19] Lab report download enabled --- lib/config/config.dart | 2 +- lib/core/service/medical/labs_service.dart | 4 +-- .../viewModels/medical/labs_view_model.dart | 32 ++++++++++++++----- .../medical/labs/laboratory_result_page.dart | 9 +----- .../LabResult/laboratory_result_widget.dart | 4 +++ lib/widgets/new_design/doctor_header.dart | 9 ++++-- 6 files changed, 39 insertions(+), 21 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index d5c4e413..3c272d82 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -353,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 17.5; +var VERSION_ID = 17.6; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 89ca56cc..9b3904be 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -125,7 +125,7 @@ class LabsService extends BaseService { } Future updateWorkplaceName(String workplaceName, String workplaceNameAR, String occupation, String occupationAR, int requestNumber, String setupID, int projectID) async { - // Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async { + // Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async { hasError = false; Map body = Map(); @@ -233,7 +233,7 @@ class LabsService extends BaseService { // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { - labReportPDF = response['LabReportsPDFContent']; + labReportPDF = response['PdfContent']; } }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart index 525a084e..ea45a312 100644 --- a/lib/core/viewModels/medical/labs_view_model.dart +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -1,3 +1,7 @@ +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; + import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart'; @@ -9,6 +13,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:open_filex/open_filex.dart'; +import 'package:path_provider/path_provider.dart'; import '../../../locator.dart'; import '../base_view_model.dart'; @@ -76,13 +82,7 @@ class LabsViewModel extends BaseViewModel { getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? invoiceType, String? orderNo, String? setupID, bool? isVidaPlus}) async { setState(ViewState.Busy); - await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, - invoiceType: invoiceType, - orderNo: orderNo, - projectID: projectID, - clinicID: clinicID, - setupID: setupID, - isVidaPlus: isVidaPlus); + await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, invoiceType: invoiceType, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID, isVidaPlus: isVidaPlus); if (_labsService.hasError) { error = _labsService.error!; setState(ViewState.Error); @@ -109,7 +109,7 @@ class LabsViewModel extends BaseViewModel { // }) // .toList(); // if (value.isEmpty) - labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList!.add(element); + labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList!.add(element); } else { labResultLists.add(LabResultList(filterName: element.testCode, lab: element)); } @@ -156,9 +156,25 @@ class LabsViewModel extends BaseViewModel { error = _labsService.error!; } else { if (isDownload) { + if (labReportPDF.isNotEmpty) { + String path = await _createFileFromString(labReportPDF, "pdf"); + try { + OpenFilex.open(path); + } catch (ex) { + AppToast.showErrorToast(message: "Cannot open file."); + } + } } else { AppToast.showSuccessToast(message: mes!); } } } + + Future _createFileFromString(String encodedStr, String ext) async { + Uint8List bytes = base64.decode(encodedStr); + String dir = (await getApplicationDocumentsDirectory()).path; + File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext); + await file.writeAsBytes(bytes); + return file.path; + } } diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 2b506b6a..8441492e 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -65,6 +65,7 @@ class _LaboratoryResultPageState extends State { mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, languageID: projectViewModel.isArabic ? 1 : 2, + isDownload: true, isVidaPlus: Utils.isVidaPlusProject( projectViewModel, int.parse(widget.patientLabOrders!.projectID!), @@ -119,14 +120,6 @@ class _LaboratoryResultPageState extends State { ); } - Future _createFileFromString(String encodedStr, String ext) async { - Uint8List bytes = base64.decode(encodedStr); - String dir = (await getApplicationDocumentsDirectory()).path; - File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext); - await file.writeAsBytes(bytes); - return file.path; - } - String getSpecialResults(LabsViewModel model) { String labResults = ""; model.patientLabSpecialResult.forEach((element) { diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart index 6ad54a8f..c492ee55 100644 --- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart +++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart @@ -67,6 +67,10 @@ class _LaboratoryResultWidgetState extends State { widget.patientLabOrder!.actualDoctorRate!, widget.patientLabOrder!.noOfPatientsRate!, projectViewModel.user.emailAddress!), + buttonTitle: TranslationBase.of(context).downloadReport, + buttonIcon: "assets/images/new/download_1.svg", + showConfirmMessageDialog: false, + isDownload: true, onTap: widget.onTap!, ), SizedBox(height: 10), diff --git a/lib/widgets/new_design/doctor_header.dart b/lib/widgets/new_design/doctor_header.dart index e3495561..11dd6724 100644 --- a/lib/widgets/new_design/doctor_header.dart +++ b/lib/widgets/new_design/doctor_header.dart @@ -25,6 +25,7 @@ class DoctorHeader extends StatelessWidget { final String? buttonIcon; final bool isNeedToShowButton; final bool isShowName; + final bool isDownload; DoctorHeader( {Key? key, @@ -35,6 +36,7 @@ class DoctorHeader extends StatelessWidget { this.isShowName = false, this.buttonIcon, this.showConfirmMessageDialog = true, + this.isDownload = false, this.onRatingAndReviewTap}) : super(key: key); @@ -107,7 +109,9 @@ class DoctorHeader extends StatelessWidget { if (headerModel.nationalityFlagURL != null) Padding( padding: const EdgeInsets.only(top: 8.0), - child: headerModel.nationalityFlagURL.isNotEmpty && headerModel.nationalityFlagURL != null && headerModel.nationalityFlagURL != 'null'? Image.network(headerModel.nationalityFlagURL, height: 20) : SizedBox(), + child: headerModel.nationalityFlagURL.isNotEmpty && headerModel.nationalityFlagURL != null && headerModel.nationalityFlagURL != 'null' + ? Image.network(headerModel.nationalityFlagURL, height: 20) + : SizedBox(), ), ], ) @@ -178,7 +182,8 @@ class DoctorHeader extends StatelessWidget { child: Container( padding: EdgeInsets.only(top: 10, bottom: 10, right: 15, left: 15), decoration: BoxDecoration( - color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))), + color: isDownload ? CustomColors.green : CustomColors.accentColor, + borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))), child: Row( mainAxisSize: MainAxisSize.min, children: [ From b445d1d59ec2fd8ae6d37cb5141e99c977086ccf Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 2 Mar 2025 13:01:55 +0300 Subject: [PATCH 08/19] image added --- assets/images/new/download_1.svg | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 assets/images/new/download_1.svg diff --git a/assets/images/new/download_1.svg b/assets/images/new/download_1.svg new file mode 100644 index 00000000..6bf54066 --- /dev/null +++ b/assets/images/new/download_1.svg @@ -0,0 +1,5 @@ + + + From 3bf1e3fceb93290444baba4adaf16f8a663fa942 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 3 Mar 2025 11:39:31 +0300 Subject: [PATCH 09/19] Ask Dr error toast issue resolved --- lib/pages/medical/ask_doctor/ask_doctor_page.dart | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages/medical/ask_doctor/ask_doctor_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_page.dart index 09db7ba5..036bc328 100644 --- a/lib/pages/medical/ask_doctor/ask_doctor_page.dart +++ b/lib/pages/medical/ask_doctor/ask_doctor_page.dart @@ -118,11 +118,11 @@ class AskDoctorPage extends StatelessWidget { isAvailable = true; } else { isAvailable = false; - AppToast.showErrorToast(message: res['endUserMessage']); + AppToast.showErrorToast(message: res['endUserMessage'], localContext: context); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - if (err != null) AppToast.showErrorToast(message: err.toString()); + if (err != null) AppToast.showErrorToast(message: err.toString(), localContext: context); print(err); }); diff --git a/pubspec.yaml b/pubspec.yaml index 73244f62..e27ef5b0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.002+1 +version: 4.6.083+4050083 environment: sdk: ">=3.0.0 <3.13.0" From 2c746bf783c5f1289bb8919c6c508ceaa9ea3d2c Mon Sep 17 00:00:00 2001 From: sultan khan Date: Tue, 4 Mar 2025 11:18:29 +0300 Subject: [PATCH 10/19] next day appointments change. --- .../components/DocAvailableAppointments.dart | 151 ++++++++++++++++-- 1 file changed, 141 insertions(+), 10 deletions(-) diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 6e12c68e..45db7f8b 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -45,16 +45,17 @@ class _DocAvailableAppointmentsState extends State wit AppSharedPreferences sharedPref = new AppSharedPreferences(); var selectedDate = ""; + var selectedNextDate = ""; dynamic selectedDateJSON; dynamic jsonFreeSlots; - + final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); List docFreeSlots = []; List dayEvents = []; - + List nextDayEvents = []; int selectedButtonIndex = 0; - + int selectedNextDayButtonIndex = -1; dynamic freeSlotsResponse; - + String nextDayAppointmentDate =""; late ScrollController _scrollController; var language; @@ -115,9 +116,11 @@ class _DocAvailableAppointmentsState extends State wit final DateFormat formatter = DateFormat('yyyy-MM-dd'); setState(() { this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, language); + this.selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day.add(Duration(days: 1)), language); + _calendarController.selectedDate = day; openTimeSlotsPickerForDate(day, docFreeSlots); DocAvailableAppointments.selectedDate = formatter.format(day); - _calendarController.selectedDate = day; + nextDayAppointmentDate = formatter.format(day.add(Duration(days: 1))); print(_calendarController.selectedDate); }); } @@ -139,9 +142,12 @@ class _DocAvailableAppointmentsState extends State wit child: Text(selectedDate, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), ), DocAvailableAppointments.areSlotsAvailable - ? Container( + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Container( height: 40, - child: ListView.builder( + child: + ListView.builder( controller: _scrollController, scrollDirection: Axis.horizontal, itemCount: dayEvents.length, @@ -152,7 +158,30 @@ class _DocAvailableAppointmentsState extends State wit ); }, ), - ) + ), + SizedBox(height: 20,), + nextDayEvents.isNotEmpty ? Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom:20), + child: Text(selectedNextDate, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black))) :SizedBox(), + Container( + height: 40, + padding: EdgeInsets.only(left: 0, right: 0), + child: + ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: nextDayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == nextDayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: index == selectedNextDayButtonIndex ? getSelectedNextDayButton(index) : getNormalNextDayButton(index), + ); + }, + ), + ) + ],) + + : Center( child: Padding( padding: const EdgeInsets.only(left: 12.0, right: 12.0), @@ -225,21 +254,34 @@ class _DocAvailableAppointmentsState extends State wit Map timeSlot = {"isoTime": dayEvents[i].isoTime, "start": dayEvents[i].start.toString(), "end": dayEvents[i].end.toString(), "vidaDate": dayEvents[i].vidaDate}; timeList.add(timeSlot); } - + filterNextDayAppo(freeSlots, timeList.last); AppSharedPreferences sharedPref = new AppSharedPreferences(); sharedPref.setString('selectedLogSlots', json.encode(timeList)); DocAvailableAppointments.selectedTime = dayEvents[selectedButtonIndex].isoTime; } else DocAvailableAppointments.areSlotsAvailable = false; }); + } + filterNextDayAppo(List freeSlots, Map listList){ + DateTime dateStart = DateTime.parse(listList['end']).add(Duration(hours: 6)); + DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); + nextDayEvents = []; + DateTime? previousDate = _calendarController.selectedDate != null ? _calendarController.selectedDate : _calendarController.displayDate; + // if(DateUtils.isSameDay(dateStart, previousDate!.add(Duration(days:1)) )) { + + freeSlots.forEach((v) { + if (v.start == dateStartObj && v.end!.isBefore(dateStart) ) nextDayEvents.add(v); + }); + print(nextDayEvents); + // } + } Future> _getJSONSlots() async { Map _eventsParsed; List slotsList = []; DateTime date; final DateFormat formatter = DateFormat('HH:mm'); - final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); for (var i = 0; i < freeSlotsResponse.length; i++) { date = (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(freeSlotsResponse[i]) @@ -259,6 +301,16 @@ class _DocAvailableAppointmentsState extends State wit ), ), ); + nextDayAppointmentDate = dateFormatter.format( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days:1)) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ).add(Duration(days:1)), + ); DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(freeSlotsResponse[0]) : DateUtil.convertStringToDateSaudiTimezone( @@ -277,6 +329,16 @@ class _DocAvailableAppointmentsState extends State wit ), ), language); + selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days:1)) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ).add(Duration(days:1)), + language); selectedDateJSON = freeSlotsResponse[0]; }); openTimeSlotsPickerForDate( @@ -319,9 +381,21 @@ class _DocAvailableAppointmentsState extends State wit DocAvailableAppointments.selectedAppoDateTime = timeslot.end; setState(() { + selectedButtonIndex = index; + selectedNextDayButtonIndex =-1; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; print(DocAvailableAppointments.selectedTime); + DocAvailableAppointments.selectedDate = dateFormatter.format( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ), + ); }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); }, @@ -342,12 +416,69 @@ class _DocAvailableAppointmentsState extends State wit setState(() { selectedButtonIndex = index; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = dateFormatter.format( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ), + ); print(DocAvailableAppointments.selectedTime); }); }, child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), ); } + Widget getNormalNextDayButton(int index) { + return CustomTextButton( + backgroundColor: Colors.white, + elevation: 0, + side: BorderSide( + color: Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + final timeslot = nextDayEvents[index]; + DocAvailableAppointments.selectedAppoDateTime = timeslot.end; + + setState(() { + selectedButtonIndex = -1; + selectedNextDayButtonIndex =index; + DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = nextDayAppointmentDate; + print(DocAvailableAppointments.selectedTime); + }); + projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); + }, + child: Text(nextDayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Color(0xFF60686b))), + ); + } + + Widget getSelectedNextDayButton(int index) { + return CustomTextButton( + backgroundColor: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, + elevation: 0, + side: BorderSide( + color: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + setState(() { + selectedButtonIndex =-1; + selectedNextDayButtonIndex = index; + DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = nextDayAppointmentDate; + print(DocAvailableAppointments.selectedTime); + }); + }, + child: Text(nextDayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), + ); + } getDoctorFreeSlots(context, DoctorList docObject) { print(DocAvailableAppointments.initialSlotDuration); From b93d373c6fcb9626375e937848d00b304b5ab2b7 Mon Sep 17 00:00:00 2001 From: sultan khan Date: Tue, 4 Mar 2025 11:40:30 +0300 Subject: [PATCH 11/19] next appointment updated. --- .../components/DocAvailableAppointments.dart | 44 ++++--------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 45db7f8b..15eedec1 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -55,7 +55,7 @@ class _DocAvailableAppointmentsState extends State wit int selectedButtonIndex = 0; int selectedNextDayButtonIndex = -1; dynamic freeSlotsResponse; - String nextDayAppointmentDate =""; + // String nextDayAppointmentDate =""; late ScrollController _scrollController; var language; @@ -120,7 +120,7 @@ class _DocAvailableAppointmentsState extends State wit _calendarController.selectedDate = day; openTimeSlotsPickerForDate(day, docFreeSlots); DocAvailableAppointments.selectedDate = formatter.format(day); - nextDayAppointmentDate = formatter.format(day.add(Duration(days: 1))); + selectedNextDayButtonIndex =-1; print(_calendarController.selectedDate); }); } @@ -268,7 +268,7 @@ class _DocAvailableAppointmentsState extends State wit DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); nextDayEvents = []; - DateTime? previousDate = _calendarController.selectedDate != null ? _calendarController.selectedDate : _calendarController.displayDate; + // DateTime? previousDate = _calendarController.selectedDate != null ? _calendarController.selectedDate : _calendarController.displayDate; // if(DateUtils.isSameDay(dateStart, previousDate!.add(Duration(days:1)) )) { freeSlots.forEach((v) { @@ -301,16 +301,7 @@ class _DocAvailableAppointmentsState extends State wit ), ), ); - nextDayAppointmentDate = dateFormatter.format( - (isLiveCareSchedule != null && isLiveCareSchedule) - ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days:1)) - : DateUtil.convertStringToDateSaudiTimezone( - freeSlotsResponse[0], - int.parse( - widget.doctor.projectID.toString(), - ), - ).add(Duration(days:1)), - ); + DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(freeSlotsResponse[0]) : DateUtil.convertStringToDateSaudiTimezone( @@ -386,16 +377,8 @@ class _DocAvailableAppointmentsState extends State wit selectedNextDayButtonIndex =-1; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; print(DocAvailableAppointments.selectedTime); - DocAvailableAppointments.selectedDate = dateFormatter.format( - (isLiveCareSchedule != null && isLiveCareSchedule) - ? DateUtil.convertStringToDate(freeSlotsResponse[0]) - : DateUtil.convertStringToDateSaudiTimezone( - freeSlotsResponse[0], - int.parse( - widget.doctor.projectID.toString(), - ), - ), - ); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!); + }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); }, @@ -416,16 +399,7 @@ class _DocAvailableAppointmentsState extends State wit setState(() { selectedButtonIndex = index; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; - DocAvailableAppointments.selectedDate = dateFormatter.format( - (isLiveCareSchedule != null && isLiveCareSchedule) - ? DateUtil.convertStringToDate(freeSlotsResponse[0]) - : DateUtil.convertStringToDateSaudiTimezone( - freeSlotsResponse[0], - int.parse( - widget.doctor.projectID.toString(), - ), - ), - ); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!); print(DocAvailableAppointments.selectedTime); }); }, @@ -449,7 +423,7 @@ class _DocAvailableAppointmentsState extends State wit selectedButtonIndex = -1; selectedNextDayButtonIndex =index; DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; - DocAvailableAppointments.selectedDate = nextDayAppointmentDate; + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days:1))); print(DocAvailableAppointments.selectedTime); }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); @@ -472,7 +446,7 @@ class _DocAvailableAppointmentsState extends State wit selectedButtonIndex =-1; selectedNextDayButtonIndex = index; DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; - DocAvailableAppointments.selectedDate = nextDayAppointmentDate; + DocAvailableAppointments.selectedDate =dateFormatter.format(_calendarController.selectedDate!.add(Duration(days:1))); print(DocAvailableAppointments.selectedTime); }); }, From e66e42edda9f721db8f6b545bba0a95e272df4d8 Mon Sep 17 00:00:00 2001 From: sultan khan Date: Tue, 4 Mar 2025 13:11:43 +0300 Subject: [PATCH 12/19] next day appointment updates --- .../components/DocAvailableAppointments.dart | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 15eedec1..e08d9397 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -264,18 +264,16 @@ class _DocAvailableAppointmentsState extends State wit } filterNextDayAppo(List freeSlots, Map listList){ - DateTime dateStart = DateTime.parse(listList['end']).add(Duration(hours: 6)); + DateTime dateStart = DateTime.parse(listList['end']).add(Duration(days: 1)); DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); nextDayEvents = []; - // DateTime? previousDate = _calendarController.selectedDate != null ? _calendarController.selectedDate : _calendarController.displayDate; - // if(DateUtils.isSameDay(dateStart, previousDate!.add(Duration(days:1)) )) { - + DateTime beforeHour = new DateTime(dateStart.year, dateStart.month, dateStart.day, 6, 0, 0, 0, 0); freeSlots.forEach((v) { - if (v.start == dateStartObj && v.end!.isBefore(dateStart) ) nextDayEvents.add(v); + if (v.start == dateStartObj && v.end!.isBefore(beforeHour) ) nextDayEvents.add(v); }); - print(nextDayEvents); - // } + // print(nextDayEvents); + } Future> _getJSONSlots() async { Map _eventsParsed; From 8b74c9df61c311bd66c484a274efdf36eeb6cc6f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 4 Mar 2025 13:35:17 +0300 Subject: [PATCH 13/19] updates --- lib/core/service/client/base_app_client.dart | 2 +- lib/core/service/medical/labs_service.dart | 2 +- .../medical/ask_doctor/ask_doctor_page.dart | 19 ++++++++++++------- .../LabResult/laboratory_result_widget.dart | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 9097d2fd..d083c422 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -187,7 +187,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 4769527; //4609100 + // body['PatientID'] = 2007395; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 9b3904be..28e922f2 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -231,7 +231,7 @@ class LabsService extends BaseService { _requestSendLabReportEmail.languageID = languageID; // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { - await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { labReportPDF = response['PdfContent']; } diff --git a/lib/pages/medical/ask_doctor/ask_doctor_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_page.dart index 036bc328..96cd9944 100644 --- a/lib/pages/medical/ask_doctor/ask_doctor_page.dart +++ b/lib/pages/medical/ask_doctor/ask_doctor_page.dart @@ -108,17 +108,22 @@ class AskDoctorPage extends StatelessWidget { ); } - Future checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) { + Future checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) async { + AskDoctorService askDocservice = new AskDoctorService(); bool isAvailable = false; GifLoaderDialogUtils.showMyDialog(context); - service.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) { + await askDocservice.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) { GifLoaderDialogUtils.hideDialog(context); - print(res['IsDoctorAvailable']); - if (res['IsDoctorAvailable']) { - isAvailable = true; + if (res != null) { + print(res['IsDoctorAvailable']); + if (res['IsDoctorAvailable']) { + isAvailable = true; + } else { + isAvailable = false; + AppToast.showErrorToast(message: res['endUserMessage'], localContext: context); + } } else { - isAvailable = false; - AppToast.showErrorToast(message: res['endUserMessage'], localContext: context); + isAvailable = true; } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart index c492ee55..68f88910 100644 --- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart +++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart @@ -67,7 +67,7 @@ class _LaboratoryResultWidgetState extends State { widget.patientLabOrder!.actualDoctorRate!, widget.patientLabOrder!.noOfPatientsRate!, projectViewModel.user.emailAddress!), - buttonTitle: TranslationBase.of(context).downloadReport, + buttonTitle: TranslationBase.of(context).download, buttonIcon: "assets/images/new/download_1.svg", showConfirmMessageDialog: false, isDownload: true, From 889828d4d493b4a9a42fa5ef68da25f2a7002e24 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 5 Mar 2025 11:31:54 +0300 Subject: [PATCH 14/19] Lab report download VIDA Plus implementation --- lib/core/service/medical/labs_service.dart | 2 +- .../components/DocAvailableAppointments.dart | 141 ++++++++++-------- 2 files changed, 77 insertions(+), 66 deletions(-) diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 28e922f2..3f83a493 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -233,7 +233,7 @@ class LabsService extends BaseService { // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { if (isDownload) { - labReportPDF = response['PdfContent']; + labReportPDF = isVidaPlus ? response['LabReportsPDFContent'] : response['PdfContent']; } }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index e08d9397..67a795da 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -9,6 +9,7 @@ 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/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:flutter/cupertino.dart'; @@ -55,6 +56,7 @@ class _DocAvailableAppointmentsState extends State wit int selectedButtonIndex = 0; int selectedNextDayButtonIndex = -1; dynamic freeSlotsResponse; + // String nextDayAppointmentDate =""; late ScrollController _scrollController; @@ -120,7 +122,7 @@ class _DocAvailableAppointmentsState extends State wit _calendarController.selectedDate = day; openTimeSlotsPickerForDate(day, docFreeSlots); DocAvailableAppointments.selectedDate = formatter.format(day); - selectedNextDayButtonIndex =-1; + selectedNextDayButtonIndex = -1; print(_calendarController.selectedDate); }); } @@ -143,45 +145,51 @@ class _DocAvailableAppointmentsState extends State wit ), DocAvailableAppointments.areSlotsAvailable ? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ Container( - height: 40, - child: - ListView.builder( - controller: _scrollController, - scrollDirection: Axis.horizontal, - itemCount: dayEvents.length, - itemBuilder: (context, index) { - return Container( - margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), - child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index), - ); - }, - ), - ), - SizedBox(height: 20,), - nextDayEvents.isNotEmpty ? Container( - padding: EdgeInsets.only(left: 20, right: 20, bottom:20), - child: Text(selectedNextDate, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black))) :SizedBox(), - Container( - height: 40, - padding: EdgeInsets.only(left: 0, right: 0), - child: - ListView.builder( - controller: _scrollController, - scrollDirection: Axis.horizontal, - itemCount: nextDayEvents.length, - itemBuilder: (context, index) { - return Container( - margin: EdgeInsets.only(right: (index == nextDayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), - child: index == selectedNextDayButtonIndex ? getSelectedNextDayButton(index) : getNormalNextDayButton(index), - ); - }, - ), - ) - ],) - - + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + height: 40, + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: dayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index), + ); + }, + ), + ), + SizedBox( + height: 20, + ), + nextDayEvents.isNotEmpty && projectViewModel.havePrivilege(110) + ? Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: Text( + selectedNextDate, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black), + ), + ) + : SizedBox(), + Container( + height: 40, + padding: EdgeInsets.only(left: 0, right: 0), + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: nextDayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == nextDayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: index == selectedNextDayButtonIndex ? getSelectedNextDayButton(index) : getNormalNextDayButton(index), + ); + }, + ), + ) + ], + ) : Center( child: Padding( padding: const EdgeInsets.only(left: 12.0, right: 12.0), @@ -261,20 +269,24 @@ class _DocAvailableAppointmentsState extends State wit } else DocAvailableAppointments.areSlotsAvailable = false; }); - } - filterNextDayAppo(List freeSlots, Map listList){ - DateTime dateStart = DateTime.parse(listList['end']).add(Duration(days: 1)); + + filterNextDayAppo(List freeSlots, Map listList) { + DateTime dateStart = DateTime.parse(listList['end']).add(Duration(days: 1)); DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); - nextDayEvents = []; - DateTime beforeHour = new DateTime(dateStart.year, dateStart.month, dateStart.day, 6, 0, 0, 0, 0); + nextDayEvents = []; + DateTime beforeHour = new DateTime(dateStart.year, dateStart.month, dateStart.day, 6, 0, 0, 0, 0); + if (projectViewModel.havePrivilege(110)) { freeSlots.forEach((v) { - if (v.start == dateStartObj && v.end!.isBefore(beforeHour) ) nextDayEvents.add(v); + if (v.start == dateStartObj && v.end!.isBefore(beforeHour)) nextDayEvents.add(v); }); - // print(nextDayEvents); - + } else { + nextDayEvents = []; + } + // print(nextDayEvents); } + Future> _getJSONSlots() async { Map _eventsParsed; List slotsList = []; @@ -299,7 +311,7 @@ class _DocAvailableAppointmentsState extends State wit ), ), ); - + DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule) ? DateUtil.convertStringToDate(freeSlotsResponse[0]) : DateUtil.convertStringToDateSaudiTimezone( @@ -318,15 +330,15 @@ class _DocAvailableAppointmentsState extends State wit ), ), language); - selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted( + selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted( (isLiveCareSchedule != null && isLiveCareSchedule) - ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days:1)) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days: 1)) : DateUtil.convertStringToDateSaudiTimezone( - freeSlotsResponse[0], - int.parse( - widget.doctor.projectID.toString(), - ), - ).add(Duration(days:1)), + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ).add(Duration(days: 1)), language); selectedDateJSON = freeSlotsResponse[0]; }); @@ -370,13 +382,11 @@ class _DocAvailableAppointmentsState extends State wit DocAvailableAppointments.selectedAppoDateTime = timeslot.end; setState(() { - selectedButtonIndex = index; - selectedNextDayButtonIndex =-1; + selectedNextDayButtonIndex = -1; DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; print(DocAvailableAppointments.selectedTime); DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!); - }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); }, @@ -404,6 +414,7 @@ class _DocAvailableAppointmentsState extends State wit child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), ); } + Widget getNormalNextDayButton(int index) { return CustomTextButton( backgroundColor: Colors.white, @@ -412,16 +423,16 @@ class _DocAvailableAppointmentsState extends State wit color: Colors.black, //Color of the border style: BorderStyle.solid, //Style of the border width: 1.5 //width of the border - ), + ), onPressed: () { final timeslot = nextDayEvents[index]; DocAvailableAppointments.selectedAppoDateTime = timeslot.end; setState(() { selectedButtonIndex = -1; - selectedNextDayButtonIndex =index; + selectedNextDayButtonIndex = index; DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; - DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days:1))); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days: 1))); print(DocAvailableAppointments.selectedTime); }); projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); @@ -438,13 +449,13 @@ class _DocAvailableAppointmentsState extends State wit color: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, //Color of the border style: BorderStyle.solid, //Style of the border width: 1.5 //width of the border - ), + ), onPressed: () { setState(() { - selectedButtonIndex =-1; + selectedButtonIndex = -1; selectedNextDayButtonIndex = index; DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; - DocAvailableAppointments.selectedDate =dateFormatter.format(_calendarController.selectedDate!.add(Duration(days:1))); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days: 1))); print(DocAvailableAppointments.selectedTime); }); }, From 0706d9f5f9117c1a23f2e72e0a09e2687c62efda Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 5 Mar 2025 15:09:26 +0300 Subject: [PATCH 15/19] App update sent to Stores VersionID 17.7 --- ios/Runner.xcodeproj/project.pbxproj | 12 ++++++------ lib/config/config.dart | 14 +++++++------- pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 318f2f08..63df2a6d 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -583,7 +583,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -601,7 +601,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.999; + MARKETING_VERSION = 4.6.004; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -735,7 +735,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -753,7 +753,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.999; + MARKETING_VERSION = 4.6.004; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -779,7 +779,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -797,7 +797,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.5.999; + MARKETING_VERSION = 4.6.004; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/lib/config/config.dart b/lib/config/config.dart index 3c272d82..b02876fb 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -21,8 +21,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:2018/'; - 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/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; @@ -353,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 17.6; +var VERSION_ID = 17.7; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -700,10 +700,10 @@ var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDo //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; -// var payFortEnvironment = FortEnvironment.production; -// var applePayMerchantId = "merchant.com.hmgwebservices"; -var payFortEnvironment = FortEnvironment.test; -var applePayMerchantId = "merchant.com.hmgwebservices.uat"; +var payFortEnvironment = FortEnvironment.production; +var applePayMerchantId = "merchant.com.hmgwebservices"; +// var payFortEnvironment = FortEnvironment.test; +// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; class AppGlobal { static var context; diff --git a/pubspec.yaml b/pubspec.yaml index e27ef5b0..4ece3714 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.083+4050083 +version: 4.6.004+1 environment: sdk: ">=3.0.0 <3.13.0" From 7ed401fb1cd7c14119852a7cf2d7d94f2516d19a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 6 Mar 2025 14:31:04 +0300 Subject: [PATCH 16/19] Riyal symbol update & sent to stores VersionID 17.8 --- lib/config/config.dart | 2 +- .../ancillaryOrdersDetails.dart | 4 ++- lib/pages/BookAppointment/BookSuccess.dart | 4 ++- .../PickupLocation.dart | 11 ++++-- .../SelectTransportationMethod.dart | 8 +++-- .../AmbulanceRequestIndexPages/Summary.dart | 4 ++- .../EROnlineCheckInPaymentDetails.dart | 7 ++-- .../rapid-response-team/rrt-place-order.dart | 22 ++++++++---- .../rapid-response-team/rrt-request-page.dart | 19 +++++----- .../livecare/live_care_payment_page.dart | 12 +++++-- .../medical/balance/confirm_payment_page.dart | 4 ++- .../medical/balance/my_balance_page.dart | 35 ++++++++++++------- pubspec.yaml | 2 +- 13 files changed, 89 insertions(+), 45 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index b02876fb..5790d43b 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -353,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 17.7; +var VERSION_ID = 17.8; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 02f8ebe7..61d621cd 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -200,9 +200,11 @@ class _AnicllaryOrdersState extends State with SingleTic Expanded( child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), _getNormalText(value, isBold: isBold, isTotal: isTotal), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ), diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 6bdc612c..61b0f9d9 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -1098,7 +1098,7 @@ class _BookSuccessState extends State { padding: EdgeInsets.only(bottom: 10.0, left: 20, right: 20), child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white), mWidth(6), Text( text, @@ -1110,6 +1110,8 @@ class _BookSuccessState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white) : Container(), ], ), ); diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart index 093789f3..d0beeab7 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -49,7 +49,8 @@ class _PickupLocationState extends State { // double _longitude; AppoitmentAllHistoryResultList? myAppointment; HospitalsModel? _selectedHospital; - LocationDetails? _result ; + LocationDetails? _result; + LocationUtils? locationUtils; late ProjectViewModel projectViewModel; @@ -522,12 +523,16 @@ class _PickupLocationState extends State { Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( - (widget.patientER_RC.transportationDetails!.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), + (widget.patientER_RC.transportationDetails!.tripType == 1 + ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' + : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ], diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart index 23bd8b18..1dac66a0 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart @@ -126,7 +126,7 @@ class _SelectTransportationMethodState extends State flex: 1, child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}', @@ -136,6 +136,8 @@ class _SelectTransportationMethodState extends State fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ) @@ -334,12 +336,14 @@ class _SelectTransportationMethodState extends State Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'), style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ], diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart index 10be1e11..86442ce6 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart @@ -132,7 +132,7 @@ class _SummaryState extends State { Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( (widget.patientER_RC.transportationDetails!.tripType == 1 @@ -140,6 +140,8 @@ class _SummaryState extends State { : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ], diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart index 53fd0f34..1eeb5d9f 100644 --- a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart @@ -279,8 +279,7 @@ class _EROnlineCheckInPaymentDetailsState extends State { Expanded( child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 12, height: 12), + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( amount, @@ -218,6 +218,8 @@ class RRTRequestPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ), @@ -242,7 +244,7 @@ class RRTRequestPageState extends State { Expanded( child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 12, height: 12), + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( vat, @@ -252,6 +254,8 @@ class RRTRequestPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ), @@ -276,17 +280,14 @@ class RRTRequestPageState extends State { Expanded( child: Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 14, height: 14), + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 14, height: 14), mWidth(6), Text( total, - style: TextStyle( - fontSize: 14, - letterSpacing: -0.48, - fontWeight: FontWeight.bold, - color: CustomColors.black - ), + style: TextStyle(fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold, color: CustomColors.black), ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ), diff --git a/lib/pages/livecare/live_care_payment_page.dart b/lib/pages/livecare/live_care_payment_page.dart index c9e1f889..79c5db55 100644 --- a/lib/pages/livecare/live_care_payment_page.dart +++ b/lib/pages/livecare/live_care_payment_page.dart @@ -136,7 +136,7 @@ class _LiveCarePatmentPageState extends State { child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") ? Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( widget.getERAppointmentFeesList.amount!, @@ -146,6 +146,8 @@ class _LiveCarePatmentPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ) : Text( @@ -179,7 +181,7 @@ class _LiveCarePatmentPageState extends State { child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") ? Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( widget.getERAppointmentFeesList.tax!, @@ -189,6 +191,8 @@ class _LiveCarePatmentPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ) : Text( @@ -222,7 +226,7 @@ class _LiveCarePatmentPageState extends State { child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") ? Row( children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( widget.getERAppointmentFeesList.total!, @@ -232,6 +236,8 @@ class _LiveCarePatmentPageState extends State { fontWeight: FontWeight.w600, ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ) : Text( diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index ca46b5cb..70ff4821 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -152,7 +152,7 @@ class _ConfirmPaymentPageState extends State { ), Row( children: [ - widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20), + widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20), mWidth(6), Text( widget.advanceModel!.hospitalsModel!.projectOutSA! ? '${widget.advanceModel!.amount} ' + TranslationBase.of(context).aed : '${widget.advanceModel!.amount}', @@ -163,6 +163,8 @@ class _ConfirmPaymentPageState extends State { letterSpacing: -0.48, ), ), + mWidth(6), + widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20) : Container(), ], ) ], diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 25f22797..dc664cf8 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -100,12 +100,14 @@ class MyBalancePage extends StatelessWidget { children: [ projectViewModel.user!.outSA == 1 ? Container() - : SvgPicture.asset( - "assets/images/new/Saudi_Riyal_Symbol.svg", - width: 22, - height: 22, - color: Colors.white, - ), + : projectViewModel.isArabic + ? Container() + : SvgPicture.asset( + "assets/images/new/Saudi_Riyal_Symbol.svg", + width: 22, + height: 22, + color: Colors.white, + ), mWidth(6), Text( double.parse(model.totalAdvanceBalanceAmount?.toString() ?? "0").toStringAsFixed(2), @@ -113,10 +115,19 @@ class MyBalancePage extends StatelessWidget { fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: -1.44, - height: 24 / 23, + height: 24 / 21, color: Colors.white, ), ), + mWidth(6), + projectViewModel.isArabic + ? SvgPicture.asset( + "assets/images/new/Saudi_Riyal_Symbol.svg", + width: 22, + height: 22, + color: Colors.white, + ) + : Container(), ], ), Text( @@ -174,11 +185,9 @@ class MyBalancePage extends StatelessWidget { children: [ projectViewModel.user!.outSA == 1 ? Container() - : Row( - children: [ - SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), - ], - ), + : projectViewModel.isArabic + ? Container() + : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), mWidth(6), Text( amount.toStringAsFixed(2) + " " + (projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : ""), @@ -189,6 +198,8 @@ class MyBalancePage extends StatelessWidget { color: Color(0xff2E303A), ), ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), ], ), ], diff --git a/pubspec.yaml b/pubspec.yaml index 4ece3714..965a0d56 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.004+1 +version: 4.6.005+1 environment: sdk: ">=3.0.0 <3.13.0" From c2785c5f68204898bb1fe1a928eab021edb66014 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 12 Mar 2025 15:22:23 +0300 Subject: [PATCH 17/19] Updates & fixes --- .../components/SearchByClinic.dart | 2 +- lib/pages/landing/landing_page.dart | 2 +- .../clinic_services/get_clinic_service.dart | 2 +- lib/uitl/location_util.dart | 18 ++++++++++++------ .../bottom_navigation_item.dart | 8 +++++--- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 158f2c49..cab8e507 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -70,7 +70,7 @@ class _SearchByClinicState extends State { @override void initState() { - locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); checkPVM(); super.initState(); diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 05d90571..b58921a6 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -663,7 +663,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { setState(() { if (value != null) { notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); - model.setState(model.count, 0, true, notificationCount); + model.setState(model.count, model.ancillaryCount, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); // FlutterAppIconBadge.updateBadge(int.parse(notificationCount)); } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index e1bda009..4737756c 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -429,7 +429,7 @@ class ClinicListService extends BaseService { localRes = response; }, onFailure: (String error, int statusCode) { throw error; - }, body: request); + }, body: request, isAllowAny: true); return Future.value(localRes); } diff --git a/lib/uitl/location_util.dart b/lib/uitl/location_util.dart index 90119490..17ccd145 100644 --- a/lib/uitl/location_util.dart +++ b/lib/uitl/location_util.dart @@ -18,11 +18,12 @@ class LocationUtils { AppSharedPreferences sharedPref = new AppSharedPreferences(); bool isShowConfirmDialog; + bool isShowLocationTimeoutDialog; BuildContext context; bool isHuawei; final GeolocatorPlatform _geolocatorPlatform = GeolocatorPlatform.instance; - LocationUtils({required this.isShowConfirmDialog, required this.context, this.isHuawei = false}); + LocationUtils({required this.isShowConfirmDialog, required this.context, this.isHuawei = false, this.isShowLocationTimeoutDialog = true}); void getCurrentLocation({Function(LatLng)? callBack}) async { if (Platform.isAndroid && isHuawei) { @@ -32,12 +33,15 @@ class LocationUtils { if (value) { await Geolocator.checkPermission().then((permission) async { if (permission == LocationPermission.always || permission == LocationPermission.whileInUse) { - Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.best, timeLimit: Duration(seconds: 5)).then((value) { + Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 5)).then((value) { setLocation(value); if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); }).catchError((err) { print(err); - if (isShowConfirmDialog) showLocationTimeOutDialog(failureCallBack: (){}); + if (isShowConfirmDialog && isShowLocationTimeoutDialog) + showLocationTimeOutDialog(failureCallBack: () { + Geolocator.openAppSettings(); + }); }); } @@ -51,7 +55,7 @@ class LocationUtils { if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); }); } else { - if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: (){}); + if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {}); } }); } else { @@ -59,7 +63,7 @@ class LocationUtils { getCurrentLocation(callBack: callBack); } else { setZeroLocation(); - if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: (){}); + if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {}); } } } @@ -130,7 +134,9 @@ class LocationUtils { accuracy: 1.0, heading: 0.0, speed: 0.0, - speedAccuracy: 1, altitudeAccuracy: 0.0, headingAccuracy: 0.0, + speedAccuracy: 1, + altitudeAccuracy: 0.0, + headingAccuracy: 0.0, // altitudeAccuracy: 0.0, // headingAccuracy: 0.0, // altitudeAccuracy: 0, diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index 00d3700b..22c27384 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -20,13 +20,15 @@ class BottomNavigationItem extends StatelessWidget { final String? name; final bool? isDisabled; + late ToDoCountProviderModel toDoProvider; + AuthenticatedUserObject authenticatedUserObject = locator(); BottomNavigationItem({this.icon, this.activeIcon, this.changeIndex, this.index, this.currentIndex, this.name, this.isDisabled = false}); @override Widget build(BuildContext context) { - var model = Provider.of(context); + toDoProvider = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context); return Expanded( child: SizedBox( @@ -72,7 +74,7 @@ class BottomNavigationItem extends StatelessWidget { ), ], ) - : (authenticatedUserObject.isLogin && model.isShowBadge) + : (authenticatedUserObject.isLogin && toDoProvider.isShowBadge) ? Stack( alignment: AlignmentDirectional.center, children: [ @@ -120,7 +122,7 @@ class BottomNavigationItem extends StatelessWidget { // borderRadius: BorderRadius.circular(8), badgeContent: Container( padding: EdgeInsets.all(2.0), - child: Text((model.count! + model.ancillaryCount!).toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)), + child: Text((toDoProvider.count! + toDoProvider.ancillaryCount!).toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)), ), ), ), From 91b9e792c69ccc7ae5fce19b0181fe54e7e3bf9b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 12 Mar 2025 15:36:56 +0300 Subject: [PATCH 18/19] updates --- android/build.gradle | 1 + pubspec.yaml | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 69a65d6a..1849765a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -37,6 +37,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.1.3' +// classpath 'com.android.tools.build:gradle:8.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.8' // classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' diff --git a/pubspec.yaml b/pubspec.yaml index 965a0d56..cececbe0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.6.005+1 +version: 4.6.085+4050085 environment: sdk: ">=3.0.0 <3.13.0" @@ -60,7 +60,9 @@ dependencies: local_auth: ^2.1.7 localstorage: ^4.0.0+1 maps_launcher: ^2.0.1 - url_launcher: ^6.0.15 +# url_launcher: ^6.0.15 + url_launcher: ^6.3.1 + url_launcher_ios: ^6.3.2 shared_preferences: ^2.0.0 # flutter_flexible_toast: ^0.1.4 fluttertoast: ^8.0.8 @@ -97,7 +99,7 @@ dependencies: # Qr code Scanner TODO fix it location: ^5.0.3 - barcode_scan2: ^4.2.2 + barcode_scan2: 4.3.2 # Rating Stars flutter_rating_bar: ^4.0.1 @@ -187,6 +189,7 @@ dependencies: firebase_crashlytics: ^3.0.0 cloudflare_turnstile: ^2.0.1 + device_info_plus: ^10.1.2 # vital_sign_camera: # path: ./packages/vital_sign_camera From 21fda7987ab689f0223430b968818feed97a8470 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 16 Mar 2025 12:20:15 +0300 Subject: [PATCH 19/19] Updates & fixes, App uploaded to Stores VersionID 17.9 --- lib/config/config.dart | 2 +- .../ancillary-orders/ancillaryOrdersDetails.dart | 3 ++- lib/pages/MyAppointments/AppointmentDetails.dart | 2 +- lib/pages/livecare/widgets/clinic_list.dart | 4 ++-- lib/services/payfort_services/payfort_view_model.dart | 4 +++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 5790d43b..25c4bf73 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -353,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 17.8; +var VERSION_ID = 17.9; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 61d621cd..464786df 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -328,7 +328,8 @@ class _AnicllaryOrdersState extends State with SingleTic ), mWidth(3), Text( - _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString(), + // _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString(), + _ancillaryProcLists[0].ancillaryOrderProcDetailsList!.isNotEmpty ? _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString() : "0", style: TextStyle( fontWeight: FontWeight.w600, fontSize: 12, diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 2744c56f..4a3334cd 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -214,7 +214,7 @@ class _AppointmentDetailsState extends State with SingleTick return SizedBox(); } else { List list = []; - if (widget.parentIndex == 0 && _tabController!.index == 0) { + if (widget.parentIndex == 0 && _tabController!.index == 0 && widget.appo.patientStatusType != 43) { list.add( Expanded( child: DefaultButton( diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index b0a5df48..c4b825dc 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -501,12 +501,12 @@ class _clinic_listState extends State { ); } else { GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: "An error occurred while processing your request"); + AppToast.showErrorToast(message: "An error occurred while processing your request", localContext: context); } }).catchError((err) { print(err); GifLoaderDialogUtils.hideDialog(localContext!); - AppToast.showErrorToast(message: err); + AppToast.showErrorToast(message: err, localContext: context); }); } catch (ex) { print(ex.toString()); diff --git a/lib/services/payfort_services/payfort_view_model.dart b/lib/services/payfort_services/payfort_view_model.dart index 29a79f14..2ba62fc2 100644 --- a/lib/services/payfort_services/payfort_view_model.dart +++ b/lib/services/payfort_services/payfort_view_model.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; import 'package:diplomaticquarterapp/services/payfort_services/payfort_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:flutter/cupertino.dart'; @@ -77,7 +78,8 @@ class PayfortViewModel extends ChangeNotifier { ); GifLoaderDialogUtils.hideDialog(AppGlobal.context); } catch (e) { - Utils.showErrorToast(e.toString()); + // Utils.showErrorToast(e.toString()); + AppToast.showErrorToast(message: e.toString(), localContext: AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context); throw e; }