Cheque (service & screens) & Account
This commit is contained in:
@@ -143,7 +143,7 @@ class ChequeService {
|
||||
required String tpin,
|
||||
}) async {
|
||||
final response = await _dio.post(
|
||||
'/api/cheque/revoke_stop',
|
||||
'/api/cheque/removeStop',
|
||||
options: Options(
|
||||
validateStatus: (int? status) => true,
|
||||
receiveDataWhenStatusError: true,
|
||||
|
||||
175
lib/features/account_opening/screens/account_opening_screen.dart
Normal file
175
lib/features/account_opening/screens/account_opening_screen.dart
Normal file
@@ -0,0 +1,175 @@
|
||||
import 'package:flutter/material.dart'; // Keep if User model is generic
|
||||
import 'package:kmobile/features/account_opening/screens/fd_screen.dart';
|
||||
import 'package:kmobile/features/account_opening/screens/loan_screen.dart';
|
||||
import 'package:kmobile/features/account_opening/screens/rd_screen.dart';
|
||||
import 'package:kmobile/features/account_opening/screens/td_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
class AccountOpeningScreen extends StatefulWidget {
|
||||
const AccountOpeningScreen({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
State<AccountOpeningScreen> createState() => _AccountOpeningScreenState();
|
||||
}
|
||||
|
||||
class _AccountOpeningScreenState extends State<AccountOpeningScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text(
|
||||
"Account Opening",
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Expanded(
|
||||
child: AccountOpeningCardTile(
|
||||
icon: Symbols.savings,
|
||||
label: "Fixed Deposit (FD)",
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const FdScreen(
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: AccountOpeningCardTile(
|
||||
icon: Symbols.currency_rupee,
|
||||
label: "Term Deposit",
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const TermDepositScreen()
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: AccountOpeningCardTile(
|
||||
icon: Symbols.account_balance,
|
||||
label: AppLocalizations.of(context).recurringDeposit,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const RecurringDepositScreen() ),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: AccountOpeningCardTile(
|
||||
icon: Symbols.credit_card,
|
||||
label: "Request Loan",
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const LoanScreen()
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.07,
|
||||
child: ClipOval(
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200,
|
||||
height: 200,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AccountOpeningCardTile extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final VoidCallback onTap;
|
||||
final bool disable;
|
||||
|
||||
const AccountOpeningCardTile({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.label,
|
||||
required this.onTap,
|
||||
this.disable = false,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
elevation: 4,
|
||||
child: InkWell(
|
||||
onTap:
|
||||
disable ? null : onTap,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 24.0, horizontal: 16.0),
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: 48,
|
||||
color: disable
|
||||
? theme.disabledColor
|
||||
: theme.colorScheme.primary,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
label,
|
||||
textAlign: TextAlign.center,
|
||||
style: theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: disable
|
||||
? theme.disabledColor
|
||||
: theme.colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
244
lib/features/account_opening/screens/fd_screen.dart
Normal file
244
lib/features/account_opening/screens/fd_screen.dart
Normal file
@@ -0,0 +1,244 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/features/account_opening/screens/interest_rates_screen.dart';
|
||||
|
||||
class FdScreen extends StatefulWidget {
|
||||
const FdScreen({super.key});
|
||||
|
||||
@override
|
||||
State<FdScreen> createState() => _FdScreenState();
|
||||
}
|
||||
|
||||
class _FdScreenState extends State<FdScreen> {
|
||||
final TextEditingController _debitAccountController = TextEditingController();
|
||||
final TextEditingController _amountController = TextEditingController();
|
||||
final TextEditingController _yearsController = TextEditingController();
|
||||
final TextEditingController _monthsController = TextEditingController();
|
||||
final TextEditingController _daysController = TextEditingController();
|
||||
|
||||
String _rateOfInterest = "N/A";
|
||||
String _maturityDate = "N/A";
|
||||
String _maturityAmount = "N/A";
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_debitAccountController.dispose();
|
||||
_amountController.dispose();
|
||||
_yearsController.dispose();
|
||||
_monthsController.dispose();
|
||||
_daysController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Fixed Deposit (FD)'),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Explanation Tile
|
||||
Card(
|
||||
margin: const EdgeInsets.only(bottom: 20),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Earn more on your savings with a simple, secure Fixed Deposit.',
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Debit Account Number
|
||||
TextFormField(
|
||||
controller: _debitAccountController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Debit Account Number',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Enter Amount
|
||||
TextFormField(
|
||||
controller: _amountController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Enter Amount',
|
||||
border: OutlineInputBorder(),
|
||||
prefixText: '₹ '
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Duration and Interest Rates Link
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Duration',
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const InterestRatesScreen()),
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
'Interest Rates',
|
||||
style: Theme.of(context).textTheme.titleSmall
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
// Duration TextBoxes
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _yearsController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Years',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _monthsController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Months',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _daysController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Days',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Rate of Interest and Maturity Date Display
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Rate of Interest',
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
_rateOfInterest,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Maturity Date',
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
_maturityDate,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// Maturity Amount Display
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Maturity Amount',
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
_maturityAmount,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
|
||||
// Proceed Button
|
||||
Center(
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
// TODO: Implement proceed logic
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 40, vertical: 15),
|
||||
),
|
||||
child: const Text(
|
||||
'Proceed',
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InterestRatesScreen extends StatelessWidget {
|
||||
const InterestRatesScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Interest Rates'),
|
||||
),
|
||||
body: const Center(
|
||||
child: Text('This page will display a table of interest rates.'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
19
lib/features/account_opening/screens/loan_screen.dart
Normal file
19
lib/features/account_opening/screens/loan_screen.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LoanScreen extends StatelessWidget {
|
||||
const LoanScreen({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("Request Loan"),
|
||||
),
|
||||
body: const Center(
|
||||
child: Text("Loan Account"),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
19
lib/features/account_opening/screens/rd_screen.dart
Normal file
19
lib/features/account_opening/screens/rd_screen.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RecurringDepositScreen extends StatelessWidget {
|
||||
const RecurringDepositScreen({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("Recurring Deposit"),
|
||||
),
|
||||
body: const Center(
|
||||
child: Text("Recurring Deposit"),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
19
lib/features/account_opening/screens/td_screen.dart
Normal file
19
lib/features/account_opening/screens/td_screen.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TermDepositScreen extends StatelessWidget {
|
||||
const TermDepositScreen({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("Term Deposit (TD)"),
|
||||
),
|
||||
body: const Center(
|
||||
child: Text("Term Deposit (TD)"),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/data/models/user.dart';
|
||||
import 'package:kmobile/features/cheque/screens/cheque_enquiry_screen.dart';
|
||||
import 'package:kmobile/features/cheque/screens/positive_pay_screen.dart';
|
||||
import 'package:kmobile/features/cheque/screens/revoke_stop_screen.dart';
|
||||
import 'package:kmobile/features/cheque/screens/stop_cheque_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
@@ -43,8 +44,6 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
|
||||
child: ChequeManagementCardTile(
|
||||
icon: Symbols.payments,
|
||||
label: AppLocalizations.of(context).chequeEnquiryTitle,
|
||||
subtitle:
|
||||
AppLocalizations.of(context).chequeEnquirySubtitle,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
@@ -62,7 +61,6 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
|
||||
child: ChequeManagementCardTile(
|
||||
icon: Symbols.block_sharp,
|
||||
label: AppLocalizations.of(context).stopCheque,
|
||||
subtitle: AppLocalizations.of(context).stopChequeSubtitle,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
@@ -78,9 +76,8 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
|
||||
),
|
||||
Expanded(
|
||||
child: ChequeManagementCardTile(
|
||||
icon: Symbols.block_sharp,
|
||||
label: "Revoke Stop",
|
||||
subtitle: "Revoke your stopped cheques so as to reuse it",
|
||||
icon: Symbols.stop_circle,
|
||||
label: AppLocalizations.of(context).revokeStop,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
@@ -94,6 +91,23 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
|
||||
},
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ChequeManagementCardTile(
|
||||
icon: Symbols.check_circle, // Using check_circle for Positive Pay
|
||||
label: AppLocalizations.of(context).positivePayTitle,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => PositivePayScreen(
|
||||
users: users,
|
||||
selectedIndex: selectedAccountIndex,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -120,7 +134,6 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
|
||||
class ChequeManagementCardTile extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final String? subtitle;
|
||||
final VoidCallback onTap;
|
||||
final bool disable;
|
||||
|
||||
@@ -128,7 +141,6 @@ class ChequeManagementCardTile extends StatelessWidget {
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.label,
|
||||
this.subtitle,
|
||||
required this.onTap,
|
||||
this.disable = false,
|
||||
});
|
||||
@@ -171,19 +183,6 @@ class ChequeManagementCardTile extends StatelessWidget {
|
||||
: theme.colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
if (subtitle != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
subtitle!,
|
||||
textAlign: TextAlign.center,
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
color: disable
|
||||
? theme.disabledColor
|
||||
: theme.colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
162
lib/features/cheque/screens/positive_pay_screen.dart
Normal file
162
lib/features/cheque/screens/positive_pay_screen.dart
Normal file
@@ -0,0 +1,162 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/data/models/user.dart';
|
||||
import 'package:kmobile/l10n/app_localizations.dart';
|
||||
|
||||
class PositivePayScreen extends StatefulWidget {
|
||||
final List<User> users;
|
||||
final int selectedIndex;
|
||||
const PositivePayScreen({
|
||||
super.key,
|
||||
required this.users,
|
||||
required this.selectedIndex,
|
||||
});
|
||||
|
||||
@override
|
||||
State<PositivePayScreen> createState() => _PositivePayScreenState();
|
||||
}
|
||||
|
||||
class _PositivePayScreenState extends State<PositivePayScreen> {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
final _accountNumberController = TextEditingController();
|
||||
final _chequeNumberController = TextEditingController();
|
||||
final _chequeDateController = TextEditingController();
|
||||
final _amountController = TextEditingController();
|
||||
final _payeeController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// Pre-fill the account number if possible
|
||||
if (widget.users.isNotEmpty) {
|
||||
_accountNumberController.text = widget.users[widget.selectedIndex].accountNo!;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_accountNumberController.dispose();
|
||||
_chequeNumberController.dispose();
|
||||
_chequeDateController.dispose();
|
||||
_amountController.dispose();
|
||||
_payeeController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
AppLocalizations.of(context).positivePay, // Will be replaced by localization
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 16.0),
|
||||
TextFormField(
|
||||
controller: _accountNumberController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).accountNumber,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter account number';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16.0),
|
||||
TextFormField(
|
||||
controller: _chequeNumberController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).chequeNumberLabel,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).pleaseEnterChequeNumber;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16.0),
|
||||
TextFormField(
|
||||
controller: _chequeDateController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).chequeIssuedDate,
|
||||
border: const OutlineInputBorder(),
|
||||
suffixIcon: const Icon(Icons.calendar_today),
|
||||
),
|
||||
readOnly: true,
|
||||
onTap: () async {
|
||||
DateTime? pickedDate = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: DateTime.now(),
|
||||
firstDate: DateTime(2000),
|
||||
lastDate: DateTime.now(),
|
||||
);
|
||||
if (pickedDate != null) {
|
||||
// Format the date as you wish
|
||||
String formattedDate = "${pickedDate.day}-${pickedDate.month}-${pickedDate.year}";
|
||||
_chequeDateController.text = formattedDate;
|
||||
}
|
||||
},
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).pleaseSelectChequeIssuedDate;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16.0),
|
||||
TextFormField(
|
||||
controller: _payeeController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).payeeName,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16.0),
|
||||
TextFormField(
|
||||
controller: _amountController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).amountLabel,
|
||||
border: const OutlineInputBorder(),
|
||||
prefixText: '₹ ',
|
||||
),
|
||||
keyboardType: const TextInputType.numberWithOptions(decimal: true),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).pleaseEnterAmount;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 32.0),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
// Process data
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(AppLocalizations.of(context).processingData)),
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Text(AppLocalizations.of(context).proceedButton),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class _RevokeStopMultipleChequesScreenState extends State<RevokeStopMultipleCheq
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context).stopMultipleChequesTitle),
|
||||
title: Text(AppLocalizations.of(context).revokeMultipleStops),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
@@ -188,7 +188,7 @@ class _RevokeStopMultipleChequesScreenState extends State<RevokeStopMultipleCheq
|
||||
readOnly: true,
|
||||
onTap: () => _selectDate(_stopIssueDateController),
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).stopIssueDateHint,
|
||||
labelText: AppLocalizations.of(context).revokeIssueDate,
|
||||
border: const OutlineInputBorder(),
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Icons.calendar_today),
|
||||
@@ -203,7 +203,7 @@ class _RevokeStopMultipleChequesScreenState extends State<RevokeStopMultipleCheq
|
||||
readOnly: true,
|
||||
onTap: () => _selectDate(_stopExpiryDateController),
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).stopExpiryDateHint,
|
||||
labelText: AppLocalizations.of(context).revokeExpiryDate,
|
||||
border: const OutlineInputBorder(),
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Icons.calendar_today),
|
||||
@@ -216,7 +216,8 @@ class _RevokeStopMultipleChequesScreenState extends State<RevokeStopMultipleCheq
|
||||
TextFormField(
|
||||
controller: _stopAmountController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).stopAmountHint,
|
||||
labelText: AppLocalizations.of(context).revokeAmount,
|
||||
prefixText: '₹ ',
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
@@ -237,7 +238,7 @@ class _RevokeStopMultipleChequesScreenState extends State<RevokeStopMultipleCheq
|
||||
});
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).stopCommentHint,
|
||||
labelText: AppLocalizations.of(context).revokeComment,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
@@ -291,8 +292,8 @@ class _RevokeStopMultipleChequesScreenState extends State<RevokeStopMultipleCheq
|
||||
_showResponseDialog('Success', message);
|
||||
} if (status == 'ERROR') {
|
||||
String errMessage = "error";
|
||||
if(code == '0429') {
|
||||
errMessage = 'The selected Cheque is already stopped';
|
||||
if(code == '0172') {
|
||||
errMessage = 'The selected Cheque is not stopped';
|
||||
} else if(code == '0748') {
|
||||
errMessage = 'The selected Cheque is already presented';
|
||||
}
|
||||
@@ -326,7 +327,7 @@ class _RevokeStopMultipleChequesScreenState extends State<RevokeStopMultipleCheq
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Text(AppLocalizations.of(context).stopChequeButton),
|
||||
child: Text(AppLocalizations.of(context).revokeStopButton),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -122,7 +122,7 @@ class _RevokeStopChequeScreenState extends State<RevokeStopChequeScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("Revoke Stop Cheque"),
|
||||
title: Text(AppLocalizations.of(context).revokeStop),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Stack(
|
||||
@@ -206,7 +206,7 @@ class _RevokeStopChequeScreenState extends State<RevokeStopChequeScreen> {
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Revoke Single Stop",
|
||||
AppLocalizations.of(context).revokeSingleStopTitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
@@ -256,7 +256,7 @@ class _RevokeStopChequeScreenState extends State<RevokeStopChequeScreen> {
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Revoke Multiple Stops",
|
||||
AppLocalizations.of(context).revokeMultipleStops,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
|
||||
@@ -89,7 +89,7 @@ class _RevokeStopSingleChequeScreenState extends State<RevokeStopSingleChequeScr
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("Revoke Single Stop")),
|
||||
title: Text(AppLocalizations.of(context).revokeSingleStopTitle)),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Form(
|
||||
@@ -155,7 +155,7 @@ class _RevokeStopSingleChequeScreenState extends State<RevokeStopSingleChequeScr
|
||||
readOnly: true,
|
||||
onTap: () => _selectDate(_stopIssueDateController),
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).stopIssueDateLabel,
|
||||
labelText: AppLocalizations.of(context).revokeIssueDate,
|
||||
border: const OutlineInputBorder(),
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Icons.calendar_today),
|
||||
@@ -170,7 +170,7 @@ class _RevokeStopSingleChequeScreenState extends State<RevokeStopSingleChequeScr
|
||||
readOnly: true,
|
||||
onTap: () => _selectDate(_stopExpiryDateController),
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).stopExpiryDateLabel,
|
||||
labelText: AppLocalizations.of(context).revokeExpiryDate,
|
||||
border: const OutlineInputBorder(),
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Icons.calendar_today),
|
||||
@@ -183,7 +183,7 @@ class _RevokeStopSingleChequeScreenState extends State<RevokeStopSingleChequeScr
|
||||
TextFormField(
|
||||
controller: _stopAmountController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).stopAmountHint,
|
||||
labelText: AppLocalizations.of(context).revokeAmount,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
@@ -204,7 +204,7 @@ class _RevokeStopSingleChequeScreenState extends State<RevokeStopSingleChequeScr
|
||||
});
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).stopCommentHint,
|
||||
labelText: AppLocalizations.of(context).revokeComment,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
@@ -258,8 +258,8 @@ class _RevokeStopSingleChequeScreenState extends State<RevokeStopSingleChequeScr
|
||||
_showResponseDialog('Success', message);
|
||||
} if (status == 'ERROR') {
|
||||
String errMessage = "error";
|
||||
if(code == '0429') {
|
||||
errMessage = 'The selected Cheque is already stopped';
|
||||
if(code == '0172') {
|
||||
errMessage = 'The selected Cheque is not stopped';
|
||||
} else if(code == '0748') {
|
||||
errMessage = 'The selected Cheque is already presented';
|
||||
}
|
||||
@@ -293,7 +293,7 @@ class _RevokeStopSingleChequeScreenState extends State<RevokeStopSingleChequeScr
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Text("Revoke Stop"),
|
||||
child: Text(AppLocalizations.of(context).revokeStopButton),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:kmobile/features/account_opening/screens/account_opening_screen.dart';
|
||||
import 'package:kmobile/features/service/screens/atm_locator_screen.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -43,7 +44,6 @@ class _ServiceScreen extends State<ServiceScreen> {
|
||||
disabled: false,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Expanded(
|
||||
child: ServiceManagementTile(
|
||||
icon: Symbols.question_mark,
|
||||
@@ -57,7 +57,6 @@ class _ServiceScreen extends State<ServiceScreen> {
|
||||
disabled: false,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Expanded(
|
||||
child: ServiceManagementTile(
|
||||
icon: Symbols.location_pin,
|
||||
@@ -71,6 +70,19 @@ class _ServiceScreen extends State<ServiceScreen> {
|
||||
disabled: false,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ServiceManagementTile(
|
||||
icon: Symbols.box,
|
||||
label: "Account Opening",
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const AccountOpeningScreen()));
|
||||
},
|
||||
disabled: false,
|
||||
),
|
||||
),
|
||||
// No Spacer() needed here as Expanded children will fill space
|
||||
],
|
||||
),
|
||||
@@ -122,8 +134,8 @@ class ServiceManagementTile extends StatelessWidget {
|
||||
onTap:
|
||||
disabled ? null : onTap, // Disable InkWell if the tile is disabled
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 24.0, horizontal: 16.0),
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
@@ -148,6 +160,7 @@ class ServiceManagementTile extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,5 +555,42 @@
|
||||
"stopChequeButton": "Stop Cheque",
|
||||
"stopMultipleChequesTitle": "Stop Multiple Cheques",
|
||||
"fromChequeNumberHint": "From Cheque Number *",
|
||||
"toChequeNumberHint": "To Cheque Number *"
|
||||
"toChequeNumberHint": "To Cheque Number *",
|
||||
"failedToFetchChequeStatus": "Failed to fetch cheque status: {error}",
|
||||
"revokeStopSubtitle": "Revoke your stopped cheques so as to reuse it",
|
||||
"positivePaySubtitle": "Prevent unauthorized use of your issued cheque",
|
||||
"positivePayTitle": "Positive Pay",
|
||||
"pleaseEnterAccountNumber": "Please enter account number",
|
||||
"chequeNumber": "Cheque Number",
|
||||
"pleaseEnterChequeNumber": "Please enter cheque number",
|
||||
"chequeIssuedDate": "Cheque Issued Date",
|
||||
"pleaseSelectChequeIssuedDate": "Please select cheque issued date",
|
||||
"payeeName": "Payee Name",
|
||||
"pleaseEnterAmount": "Please enter the amount",
|
||||
"processingData": "Processing Data",
|
||||
"revokeStopCheque": "Revoke Stop Cheque",
|
||||
"currentAccount": "Current Account",
|
||||
"cashCreditAccount": "Cash Credit Account",
|
||||
"revokeSingleStop": "Revoke Single Stop",
|
||||
"noStoppedChequesPresent": "No stopped cheques present",
|
||||
"revokeMultipleStops": "Revoke Multiple Stops",
|
||||
"revokeSingleStopTitle": "Revoke Single Stop",
|
||||
"chequeFound": "Cheque Found",
|
||||
"chequeFixed": "Cheque Fixed",
|
||||
"other": "Other",
|
||||
"revokeIssueDate": "Revoke Issue Date",
|
||||
"revokeExpiryDate": "Revoke Expiry Date",
|
||||
"revokeAmount": "Revoke Amount",
|
||||
"revokeComment": "Revoke Comment",
|
||||
"otherReasons": "Other Reasons :",
|
||||
"revokeStopButton": "Revoke Stop",
|
||||
"invalidTpin": "Invalid TPIN",
|
||||
"incorrectTpinMessage": "The TPIN you entered is incorrect. Please try again.",
|
||||
"chequeAlreadyStopped": "The selected Cheque is already stopped",
|
||||
"chequeAlreadyPresented": "The selected Cheque is already presented",
|
||||
"chequeLost": "Cheque Lost",
|
||||
"chequeStolen": "Cheque Stolen",
|
||||
"chequeMissing": "Cheque Missing",
|
||||
"chequeDamaged": "Cheque Damaged",
|
||||
"close": "Close"
|
||||
}
|
||||
|
||||
@@ -556,5 +556,42 @@
|
||||
"stopChequeButton": "चेक रोकें",
|
||||
"stopMultipleChequesTitle": "एकाधिक चेक रोकें",
|
||||
"fromChequeNumberHint": "चेक नंबर से *",
|
||||
"toChequeNumberHint": "चेक नंबर तक *"
|
||||
"toChequeNumberHint": "चेक नंबर तक *",
|
||||
"failedToFetchChequeStatus": "चेक स्थिति लाने में विफल: {error}",
|
||||
"revokeStopSubtitle": "अपने रोके गए चेकों को फिर से उपयोग करने के लिए निरस्त करें",
|
||||
"positivePaySubtitle": "अनधिकृत उपयोग को रोकने के लिए अपने जारी किए गए चेक का विवरण जमा करें",
|
||||
"positivePayTitle": "सकारात्मक वेतन",
|
||||
"pleaseEnterAccountNumber": "कृपया खाता संख्या दर्ज करें",
|
||||
"chequeNumber": "चेक संख्या",
|
||||
"pleaseEnterChequeNumber": "कृपया चेक संख्या दर्ज करें",
|
||||
"chequeIssuedDate": "चेक जारी करने की तारीख",
|
||||
"pleaseSelectChequeIssuedDate": "कृपया चेक जारी करने की तारीख चुनें",
|
||||
"payeeName": "प्राप्तकर्ता का नाम",
|
||||
"pleaseEnterAmount": "कृपया राशि दर्ज करें",
|
||||
"processingData": "डेटा संसाधित हो रहा है",
|
||||
"revokeStopCheque": "चेक रोको रद्द करें",
|
||||
"currentAccount": "चालू खाता",
|
||||
"cashCreditAccount": "नगद श्रेय खाता",
|
||||
"revokeSingleStop": "एकल रोक रद्द करें",
|
||||
"noStoppedChequesPresent": "कोई रोका हुआ चेक मौजूद नहीं है",
|
||||
"revokeMultipleStops": "कई रोक रद्द करें",
|
||||
"revokeSingleStopTitle": "एकल रोक रद्द करें",
|
||||
"chequeFound": "चेक मिला",
|
||||
"chequeFixed": "चेक ठीक किया गया",
|
||||
"other": "अन्य",
|
||||
"revokeIssueDate": "रोक जारी करने की तारीख रद्द करें",
|
||||
"revokeExpiryDate": "रोक समाप्ति तिथि रद्द करें",
|
||||
"revokeAmount": "राशि रद्द करें",
|
||||
"revokeComment": "टिप्पणी रद्द करें",
|
||||
"otherReasons": "अन्य कारण :",
|
||||
"revokeStopButton": "रोक रद्द करें",
|
||||
"invalidTpin": "अमान्य टीपिन",
|
||||
"incorrectTpinMessage": "आपके द्वारा दर्ज किया गया टीपिन गलत है। कृपया पुनः प्रयास करें।",
|
||||
"chequeAlreadyStopped": "चुना हुआ चेक पहले से ही रोका हुआ है",
|
||||
"chequeAlreadyPresented": "चुना हुआ चेक पहले से ही प्रस्तुत किया जा चुका है",
|
||||
"chequeLost": "चेक खो गया",
|
||||
"chequeStolen": "चेक चोरी हो गया",
|
||||
"chequeMissing": "चेक गायब है",
|
||||
"chequeDamaged": "चेक क्षतिग्रस्त है",
|
||||
"close": "बंद करें"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user