Beneficiary Localization Chamges
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:kmobile/api/services/neft_service.dart';
|
||||
import 'package:kmobile/api/services/rtgs_service.dart';
|
||||
import 'package:kmobile/data/models/neft_transaction.dart';
|
||||
@@ -83,7 +84,6 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
|
||||
final String accountNo = accountNumberController.text.trim();
|
||||
final String ifsc = ifscController.text.trim();
|
||||
// TODO: Replace with actual remitter name
|
||||
// ignore: prefer_const_declarations
|
||||
final String remitter = "Unknown";
|
||||
|
||||
@@ -141,8 +141,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
if (!_isBeneficiaryValidated) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Please validate beneficiary details first.')),
|
||||
SnackBar(
|
||||
content: Text(AppLocalizations.of(context).plsValidateBeneficiary)),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -155,13 +155,12 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('Invalid Amount for RTGS'),
|
||||
content: const Text(
|
||||
'RTGS transactions require a minimum amount of 200,000. Please enter a higher amount or select NEFT as the transaction mode.'),
|
||||
title: Text(AppLocalizations.of(context).invalidRtgs),
|
||||
content: Text(AppLocalizations.of(context).invalidRtgsPopUp),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(ctx).pop(),
|
||||
child: const Text('OK'),
|
||||
child: Text(AppLocalizations.of(context).ok),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -346,7 +345,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).accountNumberRequired;
|
||||
} else if (value.length < 7 || value.length > 20) {
|
||||
return 'Account number must be between 7 and 20 digits';
|
||||
return AppLocalizations.of(context).accno7to20;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -385,6 +384,10 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
maxLength: 11,
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(11),
|
||||
],
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).ifscCode,
|
||||
border: const OutlineInputBorder(),
|
||||
@@ -520,7 +523,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
} else {
|
||||
setState(() {
|
||||
_validationError =
|
||||
'Account numbers do not match.';
|
||||
AppLocalizations.of(context).accountMismatch;
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -531,7 +534,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2),
|
||||
)
|
||||
: const Text('Validate Beneficiary'),
|
||||
: Text(AppLocalizations.of(context).validateBeneficiary),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@@ -212,7 +212,7 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
} else {
|
||||
setState(() {
|
||||
_validationError =
|
||||
'Please enter a valid and matching account number.';
|
||||
AppLocalizations.of(context).accountMismatch;
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -222,7 +222,7 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
)
|
||||
: const Text('Validate Beneficiary'),
|
||||
: Text(AppLocalizations.of(context).validateBeneficiary),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -234,7 +234,7 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
const Icon(Icons.check_circle, color: Colors.green),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Beneficiary: $_beneficiaryName',
|
||||
'${AppLocalizations.of(context).beneficiaryName}: $_beneficiaryName',
|
||||
style: const TextStyle(
|
||||
color: Colors.green, fontWeight: FontWeight.bold),
|
||||
),
|
||||
@@ -338,7 +338,7 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
if (!_isBeneficiaryValidated) {
|
||||
setState(() {
|
||||
_validationError =
|
||||
'Please validate beneficiary before proceeding.';
|
||||
AppLocalizations.of(context).validateBeneficiaryproceeding;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user