From 6d502a0c81e34af90b1b2d8c982311d540bdbbc9 Mon Sep 17 00:00:00 2001 From: Nilanjan Chakrabarti Date: Wed, 27 Aug 2025 17:17:47 +0530 Subject: [PATCH] Available Balance in Account Statement --- .../screens/account_statement_screen.dart | 25 +++++++----- .../dashboard/screens/dashboard_screen.dart | 4 +- lib/l10n/app_en.arb | 38 ++++++++++++++++++- lib/l10n/app_hi.arb | 37 +++++++++++++++++- 4 files changed, 90 insertions(+), 14 deletions(-) diff --git a/lib/features/accounts/screens/account_statement_screen.dart b/lib/features/accounts/screens/account_statement_screen.dart index 9c8cc68..24a3f79 100644 --- a/lib/features/accounts/screens/account_statement_screen.dart +++ b/lib/features/accounts/screens/account_statement_screen.dart @@ -10,7 +10,8 @@ import 'transaction_details_screen.dart'; class AccountStatementScreen extends StatefulWidget { final String accountNo; - const AccountStatementScreen({super.key, required this.accountNo}); + final String balance; + const AccountStatementScreen({super.key, required this.accountNo, required this.balance,}); @override State createState() => _AccountStatementScreen(); @@ -150,20 +151,26 @@ class _AccountStatementScreen extends State { Text( "${AppLocalizations.of(context).accountNumber}: ", style: const TextStyle( - fontSize: 19, + fontSize: 17, fontWeight: FontWeight.bold, ), ), - Text(widget.accountNo, style: const TextStyle(fontSize: 17)), + Text(widget.accountNo, style: const TextStyle(fontSize: 17)), + ], + ), + const SizedBox(height: 15), + Row( + children: [ + Text( + "${AppLocalizations.of(context).availableBalance}: ", + style: const TextStyle( + fontSize: 17, + ), + ), + Text(widget.balance, style: const TextStyle(fontSize: 17)), ], ), const SizedBox(height: 15), - // Text( - // AppLocalizations.of(context).availableBalance, - // style: const TextStyle(fontSize: 17), - // ), - // const SizedBox(height: 15), - // Text(widget.accountNo, style: const TextStyle(fontSize: 17)), Text( AppLocalizations.of(context).filters, style: const TextStyle(fontSize: 17), diff --git a/lib/features/dashboard/screens/dashboard_screen.dart b/lib/features/dashboard/screens/dashboard_screen.dart index ad2672e..1105b69 100644 --- a/lib/features/dashboard/screens/dashboard_screen.dart +++ b/lib/features/dashboard/screens/dashboard_screen.dart @@ -523,8 +523,8 @@ class _DashboardScreenState extends State { MaterialPageRoute( builder: (context) => AccountStatementScreen( - accountNo: users[selectedAccountIndex] - .accountNo!, + accountNo: users[selectedAccountIndex].accountNo!, + balance: users[selectedAccountIndex].availableBalance!, ))); }), _buildQuickLink(Symbols.checkbook, diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 354b11e..cb42659 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -250,6 +250,40 @@ "findnearbybranched": "Find nearby branches", "searchbranch": "Search Branch", "searchbranchby": "Search by Branch Name / Code / IFSC", - "branchsearchsoon": "Branch search coming soon..." + "branchsearchsoon": "Branch search coming soon...", + "loginFailed": "Login failed", +"invalidCredentials": "Invalid credentials", +"networkErrorDuringLogin": "Network error during login", +"unexpectedErrorDuringLogin": "Unexpected error during login", +"tokenRefreshFailed": "Token refresh failed", +"failedToRefreshToken": "Failed to refresh token", +"failedToCheckTpinStatus": "Failed to check TPIN status", +"networkErrorDuringTpinCheck": "Network error during TPIN check", +"unexpectedErrorDuringTpinCheck": "Unexpected error during TPIN check", +"failedToSetTpin": "Failed to set TPIN", +"networkErrorDuringTpinSetup": "Network error during TPIN setup", +"unexpectedErrorDuringTpinSetup": "Unexpected error during TPIN setup", +"failedToValidateBeneficiary": "Failed to validate beneficiary", +"networkError": "Network error", +"unexpectedError": "Unexpected error: ", +"invalidIfscCode": "INVALID IFSC CODE", +"invalidBeneficiaryDetails": "Invalid Beneficiary Details", +"failedToFetchBeneficiaries": "Failed to fetch beneficiaries", +"failedToDeleteBeneficiary": "Failed to delete beneficiary", +"impsTransactionFailedWithStatusCode": "IMPS transaction failed with status code: ", +"anUnexpectedErrorOccurred": "An unexpected error occurred: ", +"neftTransactionFailedWithStatusCode": "NEFT transaction failed with status code: ", +"unknownError": "Unknown error", +"failedToProcessQuickPayWithinBank": "Failed to process quick pay within bank: ", +"rtgsTransactionFailedWithStatusCode": "RTGS transaction failed with status code: ", +"failedToLoadCustomerDetails": "Failed to load customer details", +"routeNotFound": "Route not found!", +"pleaseValidateBeneficiaryDetailsFirst": "Please validate beneficiary details first.", +"beneficiaryAlreadyExists": "Beneficiary already exists", +"pleaseEnterAValidAndMatchingAccountNumber": "Please enter a valid and matching account number.", +"beneficiaryDeletedSuccessfully": "Beneficiary deleted successfully", +"areYouSureYouWantToDeleteThisBeneficiary": "Are you sure you want to delete this beneficiary?", +"yourAccountDoesNotHaveSufficientBalance": "Your account does not have sufficient balance", +"green": "Green", +"orange": "Orange" } - diff --git a/lib/l10n/app_hi.arb b/lib/l10n/app_hi.arb index 13308be..e59c241 100644 --- a/lib/l10n/app_hi.arb +++ b/lib/l10n/app_hi.arb @@ -250,5 +250,40 @@ "findnearbybranched": "आस-पास की शाखाएँ खोजें", "searchbranch": "शाखा खोजें", "searchbranchby": "शाखा खोजें नाम / बैंक कोड / आईएफएससी द्वारा", - "branchsearchsoon": "शाखा खोज सुविधा जल्द ही आ रही है..." + "branchsearchsoon": "शाखा खोज सुविधा जल्द ही आ रही है...", + "loginFailed": "लॉगिन विफल", +"invalidCredentials": "अवैध प्रत्यय पत्र", +"networkErrorDuringLogin": "लॉगिन के दौरान नेटवर्क त्रुटि", +"unexpectedErrorDuringLogin": "लॉगिन के दौरान अप्रत्याशित त्रुटि", +"tokenRefreshFailed": "टोकन ताज़ा विफल रहा", +"failedToRefreshToken": "टोकन रीफ़्रेश करने में विफल", +"failedToCheckTpinStatus": "टी-पिन स्थिति की जाँच करने में विफल", +"networkErrorDuringTpinCheck": "टी-पिन जाँच के दौरान नेटवर्क त्रुटि", +"unexpectedErrorDuringTpinCheck": "TPIN जाँच के दौरान अप्रत्याशित त्रुटि", +"failedToSetTpin": "Tpin सेट करने में विफल", +"networkErrorDuringTpinSetup": "Tpin सेटअप के दौरान नेटवर्क त्रुटि", +"unexpectedErrorDuringTpinSetup": "TPIN सेटअप के दौरान अप्रत्याशित त्रुटि", +"failedToValidateBeneficiary": "लाभार्थी को सत्यापित करने में विफल", + "networkError": "नेटवर्क त्रुटि", + "unexpectedError": "अप्रत्याशित त्रुटि:", + "invalidIfscCode": "अमान्य IFSC कोड", + "invalidBeneficiaryDetails": "अमान्य लाभार्थी विवरण", + "failedToFetchBeneficiaries": "लाभार्थियों को प्राप्त करने में विफल", + "failedToDeleteBeneficiary": "लाभार्थी को हटाने में विफल", + "impsTransactionFailedWithStatusCode": "IMPS लेन-देन स्थिति कोड के साथ विफल:", + "anUnexpectedErrorOccurred": "एक अप्रत्याशित त्रुटि हुई:", + "neftTransactionFailedWithStatusCode": "NEFT लेन-देन स्थिति कोड के साथ विफल:", + "unknownError": "अज्ञात त्रुटि", + "failedToProcessQuickPayWithinBank": "बैंक के भीतर क्विक पे संसाधित करने में विफल:", + "rtgsTransactionFailedWithStatusCode": "RTGS लेन-देन स्थिति कोड के साथ विफल:", + "failedToLoadCustomerDetails": "ग्राहक विवरण लोड करने में विफल", + "routeNotFound": "रूट नहीं मिला!", + "pleaseValidateBeneficiaryDetailsFirst": "कृपया पहले लाभार्थी विवरण सत्यापित करें।", + "beneficiaryAlreadyExists": "लाभार्थी पहले से मौजूद है", + "pleaseEnterAValidAndMatchingAccountNumber": "कृपया एक मान्य और मिलान करने वाला खाता संख्या दर्ज करें।", + "beneficiaryDeletedSuccessfully": "लाभार्थी सफलतापूर्वक हटाया गया।", + "areYouSureYouWantToDeleteThisBeneficiary": "क्या आप वाकई इस लाभार्थी को हटाना चाहते हैं?", + "yourAccountDoesNotHaveSufficientBalance": "आपके खाते में पर्याप्त शेष राशि नहीं है", + "green": "हरा", + "orange": "नारंगी" }