diff --git a/assets/images/new/payment/Apple_Pay.png b/assets/images/new/payment/Apple_Pay.png new file mode 100644 index 00000000..1dc75042 Binary files /dev/null and b/assets/images/new/payment/Apple_Pay.png differ diff --git a/assets/images/new/payment/Mada.png b/assets/images/new/payment/Mada.png new file mode 100644 index 00000000..905a5ba8 Binary files /dev/null and b/assets/images/new/payment/Mada.png differ diff --git a/assets/images/new/payment/Mastercard.png b/assets/images/new/payment/Mastercard.png new file mode 100644 index 00000000..5d8b1fa5 Binary files /dev/null and b/assets/images/new/payment/Mastercard.png differ diff --git a/assets/images/new/payment/installments.png b/assets/images/new/payment/installments.png new file mode 100644 index 00000000..b2b231bf Binary files /dev/null and b/assets/images/new/payment/installments.png differ diff --git a/assets/images/new/payment/visa.png b/assets/images/new/payment/visa.png new file mode 100644 index 00000000..3a6d90dd Binary files /dev/null and b/assets/images/new/payment/visa.png differ diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 608c67f0..987e0fb5 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -894,7 +894,7 @@ const Map localizedValues = { "somethingWentWrongTryLater": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر عن خدمتك يرجى المحاولة لاحقا"}, "TotalAmountPayable": {"en": "Total Amount Payable:", "ar": " إجمالي المبلغ المستحق:"}, "iAcceptTermsConditions": {"en": "I Accept the Terms and Conditions", "ar": "أوافق على الشروط والأحكام"}, - "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, + "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, "RRTDDetails": { "en": "The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.", @@ -1146,7 +1146,7 @@ const Map localizedValues = { "other": {"en": "Other", "ar": "آخر"}, "measure-unit": {"en": "Measure unit", "ar": "وحدة القياس"}, "measure-time": {"en": "Measure time", "ar": "وقت القياس"}, - "update": {"en": "Update", "ar": "تعديل"}, + "update": {"en": "Update", "ar": "تحديث"}, "bloodD-enter-desc": {"en": "Enter the required information, in order to register for Blood Donation Service", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم"}, "viewTermsConditions": {"en": "To view the terms and conditions", "ar": "لعرض الشروط والأحكام"}, "WalkinAppo": {"en": "Hospital Visit Appointment", "ar": "موعد زيارة للمستشفى"}, @@ -1497,4 +1497,7 @@ const Map localizedValues = { "years": {"en": "Years", "ar": "سنوات"}, "respirationBPM": { "en": "bpm", "ar": "نفس" }, "extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"}, + "invoiceDetails": { "en": "Invoice Details", "ar": "تفاصيل الفاتورة" }, + "appoDetails": {"en": "Appointment Details", "ar": "تفاصيل الموعد"}, + "appoPaymentConfirm": {"en": "Are you sure you Want to make payment for this appointment?", "ar": "هل أنت متأكد من أنك تريد سداد هذا الموعد؟"}, }; diff --git a/lib/core/service/AlHabibMedicalService/e_referral_service.dart b/lib/core/service/AlHabibMedicalService/e_referral_service.dart index f00d72ec..b1d716a9 100644 --- a/lib/core/service/AlHabibMedicalService/e_referral_service.dart +++ b/lib/core/service/AlHabibMedicalService/e_referral_service.dart @@ -116,6 +116,9 @@ class EReferralService extends BaseService { SearchEReferralRequestModel searchEReferralRequestModel) async { _allReferral.clear(); hasError = false; + + searchEReferralRequestModel.patientMobileNumber = "966545156035"; + // TODO return this code when the fix the server await baseAppClient.post(GET_E_REFERRALS, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index a9d03fd5..2365d2d1 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -113,6 +113,16 @@ class BaseAppClient { } } + // For RC Services + // if(body.containsKey("patientId")) + // body.remove("PatientID"); + // + // if(body.containsKey("patientOutSa")) + // body.remove("PatientOutSA"); + + // body['PatientID'] = 1018977; + // body['TokenID'] = "@dm!n"; + print("URL : $url"); final jsonBody = json.encode(body); print(jsonBody); diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart index d653cdc3..d7e2d099 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart @@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dial import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; @@ -54,43 +55,23 @@ class _NewEReferralStepOnePageState extends State { super.initState(); } + void showSMSDialog(EReferralViewModel model) { + SMSOTP( + context, + 1, + _selectedCountry['code'] + _mobileTextController.text, + (value) { + submit(model, value); + }, + () => { + Navigator.pop(context), + }, + ).displayDialog(context); + } + @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); - void showSMSDialog(EReferralViewModel model) { - SMSOTP( - context, - 1, - _selectedCountry['code'] + _mobileTextController.text, - (value) { - submit(model, value); - }, - () => { - Navigator.pop(context), - }, - ).displayDialog(context); - // showDialog( - // context: context, - // barrierDismissible: false, - // child: EReferralConfirmSMSDialog( - // phoneNumber: _selectedCountry['code'] + _mobileTextController.text, - // onSucces: () { - // Navigator.of(context).pop(); - // widget.changePageViewIndex(1); - // widget.createEReferralRequestModel.requesterName = - // _nameTextController.text; - // widget.createEReferralRequestModel.requesterContactNo = - // _selectedCountry['code'].toString().substring(1) + - // _mobileTextController.text; - // widget.createEReferralRequestModel.requesterRelationship = - // _selectedRelation.iD; - // }), - // ).then((value) { - // print("dialog dismissed"); - // print(value); - // if (value != null && value) {} - // }); - } return BaseView( onModelReady: (model) => model.getRelationTypes(), @@ -205,6 +186,10 @@ class _NewEReferralStepOnePageState extends State { await model.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel); if (model.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context); + Future.delayed(Duration(seconds: 1), () { + AppToast.showErrorToast(message: model.error); + showSMSDialog(model); + }); } else { GifLoaderDialogUtils.hideDialog(context); Navigator.of(context).pop(); diff --git a/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart b/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart index 85ea80e6..1eaf9875 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart @@ -42,7 +42,7 @@ class _ReferralDetailsState extends State { Container( margin: EdgeInsets.only(bottom: 10.0), child: Text( - TranslationBase.of(context).referralDetails, + TranslationBase.of(context).ereferral, style: TextStyle( letterSpacing: -0.64, color: Colors.black, @@ -116,7 +116,7 @@ class _ReferralDetailsState extends State { ), Expanded( child: _getNormalText( - DateUtil.getMonthDayYearDateFormatted( + DateUtil.getDayMonthYearDateFormatted( DateUtil.convertStringToDateNoTimeZone( widget.referral.referralDate)), isBold: true), diff --git a/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart index 513eb3b2..356e8eb1 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart @@ -172,7 +172,7 @@ class _SearchForReferralsPageState extends State { child: myRichText(TranslationBase.of(context).patientName + ": ", model.allReferral[index].patientName, projectViewModel.isArabic)), myRichText(TranslationBase.of(context).hospital + ": ", model.allReferral[index].preferredBranchName, projectViewModel.isArabic), myRichText(TranslationBase.of(context).referralDate + ": ", - DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(model.allReferral[index].referralDate)), projectViewModel.isArabic), + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(model.allReferral[index].referralDate)), projectViewModel.isArabic), ], ), Icon(projectViewModel.isArabic ? Icons.arrow_back_ios_outlined : Icons.arrow_forward_outlined), diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 2c278f5e..84af56d6 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -175,7 +175,7 @@ class _BookSuccessState extends State { ), height: 45.0, child: RaisedButton( - color: new Color(0xFF60686b), + color: CustomColors.green, textColor: Colors.white, disabledTextColor: Colors.white, disabledColor: new Color(0xFFbcc2c4), @@ -365,10 +365,11 @@ class _BookSuccessState extends State { ), ], ), - Container( - margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0), - child: Image.asset("assets/images/new-design/payment-method.png"), - ), + // Container( + // margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0), + // child: Image.asset("assets/images/new-design/payment-method.png"), + // ), + Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), ], ); } @@ -447,10 +448,7 @@ class _BookSuccessState extends State { fontSize: 12.0, letterSpacing: -0.36, )), - Container( - margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0), - child: Image.asset("assets/images/new-design/payment-method.png"), - ), + Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), Text( TranslationBase.of(context).payNowBookSuccesstext2, overflow: TextOverflow.clip, diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart index 81ba1285..f31aa53e 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-details.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart @@ -262,10 +262,7 @@ class _CovidPaymentDetailsState extends State { letterSpacing: -0.46, ), ), - Container( - margin: EdgeInsets.only(top: 12, bottom: 12), - child: Image.asset("assets/images/new-design/payment_options_invoice_confirmation.png", width: 300), - ), + Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), ], ), ), diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index c47c8d36..c5bcb23b 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -13,6 +13,7 @@ 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/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; @@ -95,9 +96,9 @@ class _CovidPaymentSummaryState extends State { decoration: containerColorRadiusBorderWidth(CustomColors.accentColor, 200, Colors.white, 4), ), Container( - height: 60.0, + height: 100.0, padding: EdgeInsets.all(7.0), - child: widget.selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(widget.selectedPaymentMethod)) : Image.asset(getImagePath(widget.selectedPaymentMethod)), + child: Image.asset(getImagePath(widget.selectedPaymentMethod), width: 100, height: 100), ), mFlex(1), InkWell( @@ -154,17 +155,16 @@ class _CovidPaymentSummaryState extends State { ), ), bottomSheet: Container( - color: Colors.white, - height: MediaQuery.of(context).size.height * 0.1, + color: Theme.of(context).scaffoldBackgroundColor, + margin: EdgeInsets.only(bottom: 5.0), width: double.infinity, padding: EdgeInsets.all(12), - child: SecondaryButton( - textColor: Colors.white, - color: CustomColors.green, - label: TranslationBase.of(context).confirm.toUpperCase(), - onTap: () { + child: DefaultButton( + TranslationBase.of(context).confirm.toUpperCase(), + () { startPaymentProcess(projectViewModel.user); }, + color: CustomColors.green, ), ), ); @@ -335,25 +335,25 @@ class _CovidPaymentSummaryState extends State { String getImagePath(String paymentMethod) { switch (paymentMethod) { case "MADA": - return 'assets/images/new-design/mada.png'; - break; - case "SADAD": - return 'assets/images/new-design/sadad.png'; + return 'assets/images/new/payment/Mada.png'; break; + // case "SADAD": + // return 'assets/images/new-design/sadad.png'; + // break; case "VISA": - return 'assets/images/new-design/visa.png'; + return 'assets/images/new/payment/visa.png'; break; case "MASTERCARD": - return 'assets/images/new-design/mastercard.png'; + return 'assets/images/new/payment/Mastercard.png'; break; case "Installment": - return 'assets/images/new-design/installment.png'; + return 'assets/images/new/payment/installments.png'; break; case "ApplePay": - return 'assets/images/new-design/applepay.svg'; + return 'assets/images/new/payment/Apple_Pay.png'; break; } - return 'assets/images/new-design/mada.png'; + return 'assets/images/new/payment/Mada.png'; } } diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index a143fa15..1a0ec103 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -57,6 +57,8 @@ class _ToDoState extends State { ToDoCountProviderModel toDoProvider; CountdownTimerController controller; + ProjectViewModel projectViewModel; + @override void initState() { widget.patientShareResponse = new PatientShareResponse(); @@ -73,7 +75,7 @@ class _ToDoState extends State { @override Widget build(BuildContext context) { toDoProvider = Provider.of(context); - ProjectViewModel projectViewModel = Provider.of(context); + projectViewModel = Provider.of(context); return AppScaffold( appBarTitle: TranslationBase.of(context).todoList, imagesInfo: imagesInfo, @@ -169,12 +171,12 @@ class _ToDoState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj, - style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: 1.0)), + style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: -0.64)), if (getDoctorSpeciality(widget.appoList[index].doctorSpeciality) != "null\n") Container( margin: EdgeInsets.only(top: 3.0, bottom: 3.0), child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(), - style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)), + style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: -0.64)), ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -267,7 +269,7 @@ class _ToDoState extends State { color: Color(0xff20bc44), ), height: 30.0, - padding: EdgeInsets.only(right: 15), + padding: EdgeInsets.only(right: 10, left: 10), margin: EdgeInsets.symmetric(horizontal: 20), transform: Matrix4.translationValues(0.0, -8.0, 0.0), child: Row( @@ -319,11 +321,11 @@ class _ToDoState extends State { break; case 15: - return widget.languageID == 'ar' ? "assets/images/new-design/pay_online_button_arabic_disabled.png" : "assets/images/new-design/pay_online_button_disabled.png"; + return projectViewModel.isArabic ? "assets/images/new-design/pay_online_button_arabic_disabled.png" : "assets/images/new-design/pay_online_button_disabled.png"; break; case 20: - return widget.languageID == 'ar' ? "assets/images/new-design/pay_online_button_arabic.png" : "assets/images/new-design/pay_online_button.png"; + return projectViewModel.isArabic ? "assets/images/new-design/pay_online_button_arabic.png" : "assets/images/new-design/pay_online_button.png"; break; case 30: diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart index f2a96651..3e7678cc 100644 --- a/lib/pages/ToDoList/payment_method_select.dart +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -60,7 +60,7 @@ class _PaymentMethodState extends State { height: 60.0, width: 60, padding: EdgeInsets.all(7.0), - child: Image.asset("assets/images/new-design/mada.png"), + child: Image.asset("assets/images/new/payment/Mada.png"), ), mWidth(12), Text( @@ -96,7 +96,7 @@ class _PaymentMethodState extends State { height: 60.0, padding: EdgeInsets.all(7.0), width: 60, - child: Image.asset("assets/images/new-design/visa.png"), + child: Image.asset("assets/images/new/payment/visa.png"), ), mWidth(12), Text( @@ -132,7 +132,7 @@ class _PaymentMethodState extends State { height: 60.0, padding: EdgeInsets.all(7.0), width: 60, - child: Image.asset("assets/images/new-design/mastercard.png"), + child: Image.asset("assets/images/new/payment/Mastercard.png"), ), mWidth(12), Text( @@ -168,7 +168,7 @@ class _PaymentMethodState extends State { height: 60.0, padding: EdgeInsets.all(7.0), width: 60, - child: Image.asset("assets/images/new-design/installment.png"), + child: Image.asset("assets/images/new/payment/installments.png"), ), mWidth(12), Text( @@ -205,7 +205,7 @@ class _PaymentMethodState extends State { height: 60.0, padding: EdgeInsets.all(7.0), width: 60, - child: SvgPicture.asset("assets/images/new-design/applepay.svg"), + child: Image.asset("assets/images/new/payment/Apple_Pay.png"), ), mWidth(12), Text( diff --git a/lib/pages/ToDoList/widgets/paymentDialog.dart b/lib/pages/ToDoList/widgets/paymentDialog.dart index 7c461815..c46535b3 100644 --- a/lib/pages/ToDoList/widgets/paymentDialog.dart +++ b/lib/pages/ToDoList/widgets/paymentDialog.dart @@ -1,7 +1,9 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/material.dart'; class PaymentDialog extends StatefulWidget { @@ -21,159 +23,106 @@ class _PaymentDialogState extends State { Widget build(BuildContext context) { return Container( child: Dialog( - shape: - RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), child: Container( height: 550.0, width: 450.0, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.max, - children: [ - Container( - margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0), - child: Text("Invoice Detail", - style: TextStyle( - fontSize: 25.0, - fontWeight: FontWeight.bold, - fontFamily: "Open-Sans-Bold")), - ), - Divider( - color: Colors.grey, - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), - child: Text("Appointment Details", - style: TextStyle( - fontSize: 15.0, - fontWeight: FontWeight.bold, - fontFamily: "Open-Sans-Bold")), - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), - child: Text( - widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, - style: TextStyle( - color: Colors.grey[700], - fontSize: 15.0, - fontWeight: FontWeight.bold, - fontFamily: "Open-Sans-Bold")), - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), - child: Text(getDate(widget.appo.appointmentDate), - style: getTextStyle()), - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), - child: Text(widget.appo.projectName, style: getTextStyle()), - ), - Divider( - color: Colors.grey, - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 5.0), - child: Table( - children: [ - TableRow(children: [ - TableCell( - child: _getNormalText( - TranslationBase.of(context).patientShareToDo)), - TableCell( - child: _getNormalText(widget - .patientShareResponse.patientShare - .toString())), - ]), - TableRow(children: [ - TableCell( - child: _getNormalText( - TranslationBase.of(context).patientTaxToDo)), - TableCell( - child: _getNormalText(widget - .patientShareResponse.patientTaxAmount - .toString())), - ]), - TableRow(children: [ - TableCell( - child: _getNormalText(TranslationBase.of(context) - .patientShareTotalToDo)), - TableCell( - child: _getNormalText(widget - .patientShareResponse.patientShareWithTax - .toString())), - ]), - ], - ), - ), - Container( - alignment: Alignment.center, - margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0), - child: Text("You can pay by following options: ", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.bold, - fontFamily: "Open-Sans")), - ), - Container( - alignment: Alignment.center, - margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 5.0), - child: Image.asset( - "assets/images/new-design/payment_options_invoice_confirmation.png", - width: 300), - ), - Container( - alignment: Alignment.center, - margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 15.0), - child: Text( - "Are You Sure You Want To Make payment for this Appointment?", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 14.0, - color: Colors.red[700], - fontFamily: "Open-Sans")), - ), - Divider( - color: Colors.grey, - ), - Container( - alignment: Alignment.center, - height: 40.0, - child: Flex( - direction: Axis.horizontal, - children: [ - Expanded( - child: InkWell( - onTap: () { - Navigator.pop(context, null); - }, - child: Container( - child: Text("Cancel", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 18.0, color: Colors.red[700])), - ), - ), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.max, children: [ + Container( + margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0), + child: Text(TranslationBase.of(context).invoiceDetails, style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold)), + ), + Divider( + color: Colors.grey, + ), + Container( + margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), + child: Text(TranslationBase.of(context).appoDetails, style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold)), + ), + Container( + margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), + child: Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, style: TextStyle(color: Colors.grey[700], fontSize: 15.0, fontWeight: FontWeight.bold)), + ), + Container( + margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), + child: Text(getDate(widget.appo.appointmentDate), style: getTextStyle()), + ), + Container( + margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), + child: Text(widget.appo.projectName, style: getTextStyle()), + ), + Divider( + color: Colors.grey, + ), + Container( + margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 5.0), + child: Table( + children: [ + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse.patientShare.toString())), + ]), + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse.patientTaxAmount.toString())), + ]), + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse.patientShareWithTax.toString())), + ]), + ], + ), + ), + Divider( + color: Colors.grey, + ), + Container( + margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 5.0), + child: Text(TranslationBase.of(context).YouCanPayByTheFollowingOptions, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)), + ), + Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), + Container( + margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 15.0), + child: Text(TranslationBase.of(context).appoPaymentConfirm, style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor)), + ), + Divider( + color: Colors.grey, + ), + Container( + alignment: Alignment.center, + height: 40.0, + child: Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: InkWell( + onTap: () { + Navigator.pop(context, null); + }, + child: Container( + child: Text(TranslationBase.of(context).cancel, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, color: CustomColors.accentColor)), ), - Expanded( - child: InkWell( - onTap: () { - Navigator.pop(context, widget.patientShareResponse); + ), + ), + Expanded( + child: InkWell( + onTap: () { + Navigator.pop(context, widget.patientShareResponse); // widget.onPaymentMethodSelected(); - }, - child: Container( - child: Text("Ok", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 18.0, - )), - ), - ), + }, + child: Container( + child: Text(TranslationBase.of(context).ok, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18.0, + )), ), - ], + ), ), - ), - ]), + ], + ), + ), + ]), ), ), ); @@ -182,19 +131,12 @@ class _PaymentDialogState extends State { _getNormalText(text) { return Container( margin: EdgeInsets.only(top: 10.0, right: 10.0), - child: Text(text, - textAlign: TextAlign.end, - style: TextStyle( - fontSize: 15, - fontFamily: 'Open-Sans', - letterSpacing: 0.5, - color: Colors.grey[700])), + child: Text(text, style: TextStyle(fontSize: 13, letterSpacing: 0.5, color: Colors.grey[700])), ); } TextStyle getTextStyle() { - return TextStyle( - color: Colors.grey[700], fontSize: 15.0, fontFamily: "Open-Sans-Bold"); + return TextStyle(color: Colors.grey[700], fontSize: 13.0); } // Future navigateToPaymentMethod(context) async { diff --git a/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart b/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart index 30c273ae..a8950e5d 100644 --- a/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart +++ b/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -38,7 +39,7 @@ class _LiveCarePaymentDialogState extends State { child: Container( height: 600.0, margin: EdgeInsets.all(20.0), - width: 450.0, + width: 500.0, child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -81,10 +82,8 @@ class _LiveCarePaymentDialogState extends State { ], ), Container( - alignment: Alignment.center, margin: EdgeInsets.only(bottom: 10.0, top: 10.0), child: Text(widget.clinicName, - textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)), ), @@ -194,21 +193,13 @@ class _LiveCarePaymentDialogState extends State { color: Colors.grey[400], ), Container( - alignment: Alignment.center, margin: EdgeInsets.only(top: 10.0), child: new Text( TranslationBase.of(context).upComingPayOption, - textAlign: TextAlign.center, style: new TextStyle(fontSize: 14.0), ), ), - Container( - alignment: Alignment.center, - margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 5.0), - child: Image.asset( - "assets/images/new-design/payment_options_invoice_confirmation.png", - width: 300), - ), + Container(margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0), child: getPaymentMethods()), Divider( thickness: 1.0, color: Colors.grey[400], @@ -272,10 +263,9 @@ class _LiveCarePaymentDialogState extends State { return Container( margin: EdgeInsets.only(top: 10.0, right: 10.0), child: Text(text, - textAlign: TextAlign.end, + textAlign: TextAlign.start, style: TextStyle( fontSize: 14, - // fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', letterSpacing: 0.5, color: Colors.black)), ); @@ -285,10 +275,9 @@ class _LiveCarePaymentDialogState extends State { return Container( margin: EdgeInsets.only(top: 10.0, right: 10.0, bottom: 10.0), child: Text(text, - textAlign: TextAlign.end, + textAlign: TextAlign.start, style: TextStyle( fontSize: 14, - // fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', letterSpacing: 0.5, fontWeight: FontWeight.bold, color: Colors.black)), diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 87dd7d2b..3e2ba0cf 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -21,6 +21,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/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; @@ -439,7 +440,7 @@ class _clinic_listState extends State { isDataLoaded ? Container( height: MediaQuery.of(context).size.height * 0.7, - child: Column( + child: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length > 0 ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ ListView.builder( @@ -465,7 +466,7 @@ class _clinic_listState extends State { height: 10.0, ), ], - ), + ): getNoDataWidget(context), ) : Container(), isDataLoaded diff --git a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart index e081e32b..fd4f8b26 100644 --- a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart +++ b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart @@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -77,9 +76,11 @@ class PrescriptionOrderOverview extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: Center( - child: Text(prescriptionReportList[index].itemDescription.isNotEmpty - ? prescriptionReportList[index].itemDescription - : prescriptionReportList[index].itemDescriptionN)), + child: Text( + prescriptionReportList[index].itemDescription.isNotEmpty + ? prescriptionReportList[index].itemDescription + : prescriptionReportList[index].itemDescriptionN, + style: TextStyle(fontFamily: prescriptionReportList[index].itemDescription.isNotEmpty ? 'Poppins' : 'Cairo'))), )), ], ), @@ -130,7 +131,16 @@ class PrescriptionOrderOverview extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(prescriptionReportEnhList[index].itemDescription), + Text( + (prescriptionReportList[index].itemDescription.isNotEmpty + ? prescriptionReportList[index].itemDescription + : prescriptionReportList[index].itemDescriptionN ?? ''), + style: TextStyle( + fontFamily: prescriptionReportList[index].itemDescription.isNotEmpty ? 'Poppins' : 'Cairo', + letterSpacing: -0.64, + color: Color(0xff2E303A), + fontSize: 16.0, + fontWeight: FontWeight.w600)), ], ), ), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 0a3177e0..d663881f 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2361,6 +2361,14 @@ class TranslationBase { String get selectSlot => localizedValues["selectSlot"][locale.languageCode]; + String get invoiceDetails => localizedValues["invoiceDetails"][locale.languageCode]; + + String get appoDetails => localizedValues["appoDetails"][locale.languageCode]; + + String get appoPaymentConfirm => localizedValues["appoPaymentConfirm"][locale.languageCode]; + + + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index 0bbad901..e9d70a1f 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -26,6 +26,22 @@ Color getColorFromHex(String hexColor) { return Color(int.parse(hexColor, radix: 16)); } +Widget getPaymentMethods() { + return Container( + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.asset("assets/images/new/payment/Mada.png", width: 50, height: 50), + Image.asset("assets/images/new/payment/visa.png", width: 50, height: 50), + Image.asset("assets/images/new/payment/Mastercard.png", width: 50, height: 50), + Image.asset("assets/images/new/payment/Apple_Pay.png", width: 50, height: 50), + Image.asset("assets/images/new/payment/installments.png", width: 50, height: 50), + ], + ), + ); +} + Widget getNoDataWidget(BuildContext context) { return Container( child: Center( diff --git a/pubspec.yaml b/pubspec.yaml index c5541181..c9de653d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -244,6 +244,7 @@ flutter: - assets/images/new/bottom_nav/ - assets/images/new/services/ - assets/images/new/appointment-rating/ + - assets/images/new/payment/ fonts: - family: WorkSans