diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 526b9ffe..512a74f7 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -1927,7 +1927,8 @@ "cash": "نقدي", "selectRefundReason": "اختر سبب الاسترداد", "refundReason": "سبب الاسترداد", - "rejectionReason": "سبب الرفض", + "requestRejectionReason": "سبب رفض الطلب", + "procedureRejectionReason": "سبب رفض الإجراء", "done": "تم", "refundReason1": "تم معالجة مريض الشركة كمدفوع ذاتي وإعادة فوترته", "refundReason2": "المريض لا يريد إجراء سريرياً", diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index d74da82a..71894964 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -1919,7 +1919,8 @@ "cash": "Cash", "selectRefundReason": "Select Refund Reason", "refundReason": "Refund Reason", - "rejectionReason": "Rejection Reason", + "requestRejectionReason": "Request Rejection Reason", + "procedureRejectionReason": "Procedure Rejection Reason", "done": "Done", "refundReason1": "Company patient treated as self-paying and re-invoiced", "refundReason2": "Patient does not want a clinical procedure", diff --git a/lib/features/habib_wallet/habib_wallet_view_model.dart b/lib/features/habib_wallet/habib_wallet_view_model.dart index 23805aa3..514bac83 100644 --- a/lib/features/habib_wallet/habib_wallet_view_model.dart +++ b/lib/features/habib_wallet/habib_wallet_view_model.dart @@ -351,8 +351,8 @@ class HabibWalletViewModel extends ChangeNotifier { final request = SubmitRefundRequestModel( projectId: projectId, - isRefundFastTrack: true, - // in case of wallet refund, skip ITG approval + isRefundFastTrack: false, + // in case of wallet refund, skip ITG approval [need ITG Approval] refundType: '2', // wallet withdrawal refundProject: projectName, diff --git a/lib/features/refund_request/models/resp_models/refund_request_list_response_model.dart b/lib/features/refund_request/models/resp_models/refund_request_list_response_model.dart index aeb75f1c..bf8b2ec1 100644 --- a/lib/features/refund_request/models/resp_models/refund_request_list_response_model.dart +++ b/lib/features/refund_request/models/resp_models/refund_request_list_response_model.dart @@ -271,6 +271,7 @@ class RefundInvoiceModel { final String? verificationInitiatedAt; final bool? verified; final String? errorMessage; + final String? rejectReason; final WalletRequestPayload? walletRequestPayload; final InvoiceRequestPayload? invoiceRequestPayload; @@ -289,6 +290,7 @@ class RefundInvoiceModel { this.verificationInitiatedAt, this.verified, this.errorMessage, + this.rejectReason, this.walletRequestPayload, this.invoiceRequestPayload, }); @@ -309,6 +311,7 @@ class RefundInvoiceModel { verificationInitiatedAt: json['VerificationInitiatedAt'] as String?, verified: json['Verified'] as bool?, errorMessage: json['ErrorMessage'] as String?, + rejectReason: json['RejectReason'] as String?, walletRequestPayload: json['WalletRequestPayload'] != null ? WalletRequestPayload.fromJson(json['WalletRequestPayload'] as Map) : null, invoiceRequestPayload: diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 7bed764b..ac2c1ea0 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -2,7 +2,7 @@ // ignore_for_file: constant_identifier_names -abstract class LocaleKeys { +abstract class LocaleKeys { static const english = 'english'; static const arabic = 'arabic'; static const login = 'login'; @@ -1911,7 +1911,8 @@ abstract class LocaleKeys { static const bankTransfer = 'bankTransfer'; static const selectRefundReason = 'selectRefundReason'; static const refundReason = 'refundReason'; - static const rejectionReason = 'rejectionReason'; + static const requestRejectionReason = 'requestRejectionReason'; + static const procedureRejectionReason = 'procedureRejectionReason'; static const refundReason1 = 'refundReason1'; static const refundReason2 = 'refundReason2'; static const refundReason3 = 'refundReason3'; @@ -1952,5 +1953,4 @@ abstract class LocaleKeys { static const packageRefundValidationMessage = 'packageRefundValidationMessage'; static const parkingQR = 'parkingQR'; static const parkingQRDesc = 'parkingQRDesc'; - } diff --git a/lib/presentation/habib_wallet/withdraw_request_create_page.dart b/lib/presentation/habib_wallet/withdraw_request_create_page.dart index 808fdda3..b8ace1a9 100644 --- a/lib/presentation/habib_wallet/withdraw_request_create_page.dart +++ b/lib/presentation/habib_wallet/withdraw_request_create_page.dart @@ -809,7 +809,7 @@ class _WithdrawRequestCreatePageState extends State { Navigator.of(context).push( CustomPageRoute( page: RefundHistoryScreen( - refundType: 1, // 2 for wallet, 1 for invoice + refundType: 2, // 2 for wallet, 1 for invoice ), ), ); diff --git a/lib/presentation/refund_request/refund_request_detail_screen.dart b/lib/presentation/refund_request/refund_request_detail_screen.dart index f67a065a..a163456d 100644 --- a/lib/presentation/refund_request/refund_request_detail_screen.dart +++ b/lib/presentation/refund_request/refund_request_detail_screen.dart @@ -215,6 +215,22 @@ class RefundRequestDetailScreen extends StatelessWidget { SizedBox(height: 16.h), if (invoicePayload.proceduresList != null && invoicePayload.proceduresList!.isNotEmpty) ...invoicePayload.proceduresList!.map((p) => _buildProcedureRow(context, p)), + if (invoice?.rejectReason != null && invoice!.rejectReason!.isNotEmpty) ...[ + SizedBox(height: 16.h), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + "${LocaleKeys.requestRejectionReason.tr(context: context)}:".toText12( + color: AppColors.greyInfoTextColor, + isBold: true, + ), + SizedBox(height: 4.h), + invoice.rejectReason!.toText12( + color: AppColors.greyInfoTextColor, + ), + ], + ), + ], ], if (isWalletType && walletPayload != null) ...[ Row( @@ -233,6 +249,22 @@ class RefundRequestDetailScreen extends StatelessWidget { SizedBox(height: 16.h), if (walletPayload.advancesList != null && walletPayload.advancesList!.isNotEmpty) ...walletPayload.advancesList!.map((a) => _buildAdvanceRow(context, a)), + if (invoice?.rejectReason != null && invoice!.rejectReason!.isNotEmpty) ...[ + SizedBox(height: 16.h), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + "${LocaleKeys.requestRejectionReason.tr(context: context)}:".toText12( + color: AppColors.greyInfoTextColor, + isBold: true, + ), + SizedBox(height: 4.h), + invoice!.rejectReason!.toText12( + color: AppColors.greyInfoTextColor, + ), + ], + ), + ], ], ], ), @@ -283,7 +315,7 @@ class RefundRequestDetailScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox(height: 10.h), - "${LocaleKeys.rejectionReason.tr(context: context)}:".toText10( + "${LocaleKeys.procedureRejectionReason.tr(context: context)}:".toText10( color: AppColors.greyInfoTextColor, isBold: true, ),