From f2061de166a35fcd1e737100e68c1acbfcdda547 Mon Sep 17 00:00:00 2001 From: faizatflutter Date: Sun, 14 Jun 2026 16:18:58 +0300 Subject: [PATCH] added text changes --- assets/langs/ar-SA.json | 3 +- assets/langs/en-US.json | 3 +- lib/generated/locale_keys.g.dart | 1 + .../withdraw_request_create_page.dart | 53 ++++++++------- .../refund_request_create_page.dart | 66 ++++++++++--------- 5 files changed, 67 insertions(+), 59 deletions(-) diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 04b5d9c3..09080c4f 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -1907,5 +1907,6 @@ "refundCannotBeProcessedPatientAdmitted": "لا يمكن معالجة الاسترداد أثناء إقامة المريض", "cashRefundLimitExceeded": "يمكنك فقط التقدم بطلب استرداد نقدي إذا كان المبلغ أقل من 5000. لمزيد من المعلومات يرجى زيارتنا.", "cashRefundInstructions": "بمجرد الموافقة على الطلب، يرجى زيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد. عند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.", - "cashRefundApprovalInstructions": "بمجرد الموافقة على الطلب،\nيرجى زيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد.\nعند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح." + "cashRefundApprovalInstructions": "بمجرد الموافقة على الطلب،\nيرجى زيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد.\nعند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.", + "packageRefundValidationMessage": "طلب استرداد الباقة الخاص بك يتطلب التحقق بسبب استخدام الباقة والفواتير الفرعية ذات الصلة. سنقوم بمراجعة ومعالجة الطلب ضمن اتفاقية مستوى الخدمة المعتمدة بعد تأكيد الأهلية." } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 69c74a1b..7c745297 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -1898,7 +1898,8 @@ "refundCannotBeProcessedPatientAdmitted": "Refund cannot be processed while the patient is admitted", "cashRefundLimitExceeded": "You can only apply for cash refund if the amount is less than 5000. For more information please visit us.", "cashRefundInstructions": "Once the request is approved, Please visit HMG Hospital or HMG Primary Care cashier to receive cash. At the cashier counter, you will receive an OTP on your registered mobile number. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.", - "cashRefundApprovalInstructions": "Once the request is approved,\nPlease visit HMG Hospital or HMG Primary Care cashier to receive cash.\nAt the cashier counter, you will receive an OTP on your registered mobile number. Provide the OTP to the cashier for validation. Cash will be released only after successful validation." + "cashRefundApprovalInstructions": "Once the request is approved,\nPlease visit HMG Hospital or HMG Primary Care cashier to receive cash.\nAt the cashier counter, you will receive an OTP on your registered mobile number. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.", + "packageRefundValidationMessage": "Your package refund request required validation because of package use and related child invoices. We will review the process the request within the approved SLA after confirming eligibility." } diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 751ccb40..59535414 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1892,5 +1892,6 @@ abstract class LocaleKeys { static const cashRefundLimitExceeded = 'cashRefundLimitExceeded'; static const cashRefundInstructions = 'cashRefundInstructions'; static const cashRefundApprovalInstructions = 'cashRefundApprovalInstructions'; + static const packageRefundValidationMessage = 'packageRefundValidationMessage'; } diff --git a/lib/presentation/habib_wallet/withdraw_request_create_page.dart b/lib/presentation/habib_wallet/withdraw_request_create_page.dart index 8161cbd8..04abda32 100644 --- a/lib/presentation/habib_wallet/withdraw_request_create_page.dart +++ b/lib/presentation/habib_wallet/withdraw_request_create_page.dart @@ -256,6 +256,9 @@ class _WithdrawRequestCreatePageState extends State { physics: const NeverScrollableScrollPhysics(), itemBuilder: (context, index) { final type = paymentOptions[index]; + final isCashOption = type == RefundTabType.cash; + final isCashSelected = vm.selectedWithdrawMethod == RefundTabType.cash; + return Column( children: [ RadioListTileWidget( @@ -266,6 +269,29 @@ class _WithdrawRequestCreatePageState extends State { if (value != null) vm.setSelectedWithdrawMethod(value); }, ), + // Show cash instructions inside cash tile when selected + if (isCashOption && isCashSelected) ...[ + Padding( + padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 16.h), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Utils.buildSvgWithAssets( + icon: AppAssets.alertSquare, + height: 24.h, + width: 24.h, + iconColor: AppColors.textColor, + ), + SizedBox(width: 12.w), + Expanded( + child: LocaleKeys.cashRefundApprovalInstructions.tr(context: context).toText12( + color: AppColors.greyInfoTextColor, + ), + ), + ], + ), + ), + ], if (index != paymentOptions.length - 1) Divider(color: AppColors.bottomNAVBorder, height: 1, thickness: 1).paddingSymmetrical(16.w, 0.w), ], @@ -296,33 +322,6 @@ class _WithdrawRequestCreatePageState extends State { ), ), ], - if (vm.selectedWithdrawMethod == RefundTabType.cash) ...[ - SizedBox(height: 16.h), - Container( - padding: EdgeInsets.all(16.h), - decoration: BoxDecoration( - color: AppColors.whiteColor, - borderRadius: BorderRadius.circular(24.r), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Utils.buildSvgWithAssets( - icon: AppAssets.alertSquare, - height: 24.h, - width: 24.h, - iconColor: AppColors.textColor, - ), - SizedBox(width: 12.w), - Expanded( - child: LocaleKeys.cashRefundApprovalInstructions.tr(context: context).toText12( - color: AppColors.greyInfoTextColor, - ), - ), - ], - ), - ), - ], ], ); } diff --git a/lib/presentation/refund_request/refund_request_create_page.dart b/lib/presentation/refund_request/refund_request_create_page.dart index 32b96d6b..5c27a908 100644 --- a/lib/presentation/refund_request/refund_request_create_page.dart +++ b/lib/presentation/refund_request/refund_request_create_page.dart @@ -264,6 +264,9 @@ class _RefundRequestCreatePageState extends State { physics: const NeverScrollableScrollPhysics(), itemBuilder: (context, index) { final type = paymentOptions[index]; + final isCashOption = type == RefundTabType.cash; + final isCashSelected = vm.selectedPaymentMethod == RefundTabType.cash; + return Column( children: [ RadioListTileWidget( @@ -274,6 +277,29 @@ class _RefundRequestCreatePageState extends State { if (value != null) vm.setPaymentMethod(value); }, ), + // Show cash instructions inside cash tile when selected + if (isCashOption && isCashSelected) ...[ + Padding( + padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 16.h), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Utils.buildSvgWithAssets( + icon: AppAssets.alertSquare, + height: 24.h, + width: 24.h, + iconColor: AppColors.textColor, + ), + SizedBox(width: 12.w), + Expanded( + child: LocaleKeys.cashRefundApprovalInstructions.tr(context: context).toText12( + color: AppColors.greyInfoTextColor, + ), + ), + ], + ), + ), + ], if (index != paymentOptions.length - 1) Divider(color: AppColors.bottomNAVBorder, height: 1, thickness: 1).paddingSymmetrical(16.w, 0.w), ], @@ -304,33 +330,6 @@ class _RefundRequestCreatePageState extends State { ), ), ], - if (vm.selectedPaymentMethod == RefundTabType.cash) ...[ - SizedBox(height: 16.h), - Container( - padding: EdgeInsets.all(16.h), - decoration: BoxDecoration( - color: AppColors.whiteColor, - borderRadius: BorderRadius.circular(24.r), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Utils.buildSvgWithAssets( - icon: AppAssets.alertSquare, - height: 24.h, - width: 24.h, - iconColor: AppColors.textColor, - ), - SizedBox(width: 12.w), - Expanded( - child: LocaleKeys.cashRefundApprovalInstructions.tr(context: context).toText12( - color: AppColors.greyInfoTextColor, - ), - ), - ], - ), - ), - ], if (vm.selectedPaymentMethod == RefundTabType.invoices) ...[ SizedBox(height: 16.h), _buildBankInputDetails(vm), @@ -844,6 +843,7 @@ class _RefundRequestCreatePageState extends State { void _showSuccessBottomSheet(String refNo, String refundDestination) { // refundDestination: '1' = HMG Wallet, '2' = Bank Transfer, '3' = Cash final isCashRefund = refundDestination == '3'; + final isPackageInvoice = widget.invoice.isPackageInvoice == true; showCommonBottomSheetWithoutHeight( context, @@ -865,9 +865,15 @@ class _RefundRequestCreatePageState extends State { ], ).paddingSymmetrical(24.w, 0), ], - if (isCashRefund) ...[ - SizedBox(height: 16.h), - LocaleKeys.cashRefundApprovalInstructions.tr(context: context).toText14(color: AppColors.textColor), + if (isCashRefund || isPackageInvoice) ...[ + if (isCashRefund) ...[ + SizedBox(height: 16.h), + LocaleKeys.cashRefundApprovalInstructions.tr(context: context).toText14(color: AppColors.textColor), + ], + if (isPackageInvoice) ...[ + SizedBox(height: 16.h), + LocaleKeys.packageRefundValidationMessage.tr(context: context).toText14(color: AppColors.textColor), + ], ], SizedBox(height: 24.h), Row(