Enquiry_screen ui changed
This commit is contained in:
@@ -17,17 +17,13 @@ class AccountInfoScreen extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AccountInfoScreen extends State<AccountInfoScreen> {
|
class _AccountInfoScreen extends State<AccountInfoScreen> {
|
||||||
|
|
||||||
late User selectedUser;
|
late User selectedUser;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
selectedUser = widget.users[widget.selectedIndex];
|
selectedUser = widget.users[widget.selectedIndex];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String getFullAccountType(String? accountType) {
|
String getFullAccountType(String? accountType) {
|
||||||
@@ -51,245 +47,130 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
final users = widget.users;
|
final users = widget.users;
|
||||||
|
|
||||||
int selectedIndex = widget.selectedIndex;
|
int selectedIndex = widget.selectedIndex;
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
|
||||||
title: Text(AppLocalizations.of(context)
|
title: Text(AppLocalizations.of(context)
|
||||||
|
|
||||||
.accountInfo
|
.accountInfo
|
||||||
|
|
||||||
.replaceFirst(RegExp('\n'), '')),
|
.replaceFirst(RegExp('\n'), '')),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
body: Stack(
|
body: Stack(
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
Card(
|
Card(
|
||||||
|
|
||||||
elevation: 4,
|
elevation: 4,
|
||||||
|
|
||||||
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
|
|
||||||
AppLocalizations.of(context).accountNumber,
|
AppLocalizations.of(context).accountNumber,
|
||||||
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
|
||||||
fontWeight: FontWeight.bold, fontSize: 18),
|
fontWeight: FontWeight.bold, fontSize: 18),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
DropdownButton<User>(
|
DropdownButton<User>(
|
||||||
|
|
||||||
value: selectedUser,
|
value: selectedUser,
|
||||||
|
|
||||||
onChanged: (User? newUser) {
|
onChanged: (User? newUser) {
|
||||||
|
|
||||||
if (newUser != null) {
|
if (newUser != null) {
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
||||||
selectedUser = newUser;
|
selectedUser = newUser;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
items: widget.users.map((user) {
|
items: widget.users.map((user) {
|
||||||
|
|
||||||
return DropdownMenuItem<User>(
|
return DropdownMenuItem<User>(
|
||||||
|
|
||||||
value: user,
|
value: user,
|
||||||
|
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
||||||
user.accountNo.toString(),
|
user.accountNo.toString(),
|
||||||
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
|
||||||
fontSize: 20, fontWeight: FontWeight.bold),
|
fontSize: 20, fontWeight: FontWeight.bold),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}).toList(),
|
}).toList(),
|
||||||
|
|
||||||
isExpanded: true,
|
isExpanded: true,
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
||||||
child: Card(
|
child: Card(
|
||||||
|
|
||||||
elevation: 4,
|
elevation: 4,
|
||||||
|
|
||||||
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
|
||||||
child: ListView(
|
child: ListView(
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
InfoRow(
|
InfoRow(
|
||||||
|
|
||||||
title: AppLocalizations.of(context).customerNumber,
|
title: AppLocalizations.of(context).customerNumber,
|
||||||
|
|
||||||
value: selectedUser.cifNumber ?? 'N/A',
|
value: selectedUser.cifNumber ?? 'N/A',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
InfoRow(
|
InfoRow(
|
||||||
|
|
||||||
title: AppLocalizations.of(context).accountType,
|
title: AppLocalizations.of(context).accountType,
|
||||||
|
|
||||||
value: getFullAccountType(selectedUser.accountType),
|
value: getFullAccountType(selectedUser.accountType),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
InfoRow(
|
InfoRow(
|
||||||
|
|
||||||
title: AppLocalizations.of(context).productName,
|
title: AppLocalizations.of(context).productName,
|
||||||
|
|
||||||
value: selectedUser.productType ?? 'N/A',
|
value: selectedUser.productType ?? 'N/A',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
InfoRow(
|
InfoRow(
|
||||||
|
|
||||||
title: AppLocalizations.of(context).accountStatus,
|
title: AppLocalizations.of(context).accountStatus,
|
||||||
|
|
||||||
value: 'OPEN',
|
value: 'OPEN',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
InfoRow(
|
InfoRow(
|
||||||
|
|
||||||
title:
|
title:
|
||||||
|
|
||||||
AppLocalizations.of(context).availableBalance,
|
AppLocalizations.of(context).availableBalance,
|
||||||
|
|
||||||
value: selectedUser.availableBalance ?? 'N/A',
|
value: selectedUser.availableBalance ?? 'N/A',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
InfoRow(
|
InfoRow(
|
||||||
|
|
||||||
title: AppLocalizations.of(context).currentBalance,
|
title: AppLocalizations.of(context).currentBalance,
|
||||||
|
|
||||||
value: selectedUser.currentBalance ?? 'N/A',
|
value: selectedUser.currentBalance ?? 'N/A',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
if (users[selectedIndex].approvedAmount != null)
|
if (users[selectedIndex].approvedAmount != null)
|
||||||
|
|
||||||
InfoRow(
|
InfoRow(
|
||||||
|
|
||||||
title:
|
title:
|
||||||
|
|
||||||
AppLocalizations.of(context).approvedAmount,
|
AppLocalizations.of(context).approvedAmount,
|
||||||
|
|
||||||
value: selectedUser.approvedAmount ?? 'N/A',
|
value: selectedUser.approvedAmount ?? 'N/A',
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
IgnorePointer(
|
IgnorePointer(
|
||||||
|
|
||||||
child: Center(
|
child: Center(
|
||||||
|
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
|
|
||||||
opacity: 0.07, // Reduced opacity
|
opacity: 0.07, // Reduced opacity
|
||||||
|
|
||||||
child: ClipOval(
|
child: ClipOval(
|
||||||
|
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
|
|
||||||
'assets/images/logo.png',
|
'assets/images/logo.png',
|
||||||
|
|
||||||
width: 200, // Adjust size as needed
|
width: 200, // Adjust size as needed
|
||||||
|
|
||||||
height: 200, // Adjust size as needed
|
height: 200, // Adjust size as needed
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfoRow extends StatelessWidget {
|
class InfoRow extends StatelessWidget {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
|||||||
try {
|
try {
|
||||||
final repo = getIt<TransactionRepository>();
|
final repo = getIt<TransactionRepository>();
|
||||||
final txs = await repo.fetchTransactions(
|
final txs = await repo.fetchTransactions(
|
||||||
selectedUser.accountNo?? '',
|
selectedUser.accountNo ?? '',
|
||||||
fromDate: fromDate,
|
fromDate: fromDate,
|
||||||
toDate: toDate,
|
toDate: toDate,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -53,27 +53,54 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildContactItem(String role, String email, String phone) {
|
Widget _buildContactItem(String role, String email, String phone) {
|
||||||
return Column(
|
return Card(
|
||||||
|
elevation: 4,
|
||||||
|
margin: const EdgeInsets.symmetric(vertical: 8),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(role,
|
Text(role,
|
||||||
style: TextStyle(color: Theme.of(context).colorScheme.onSurface)),
|
style: TextStyle(
|
||||||
const SizedBox(height: 4),
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
|
fontSize: 15,
|
||||||
|
fontWeight: FontWeight.bold)),
|
||||||
|
const SizedBox(height: 8),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => _launchEmailAddress(email),
|
onTap: () => _launchEmailAddress(email),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.email),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
child: Text(email,
|
child: Text(email,
|
||||||
style: TextStyle(color: Theme.of(context).colorScheme.primary)),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () => _launchPhoneNumber(phone),
|
|
||||||
child: Text(phone,
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).colorScheme.primary,
|
||||||
.colorScheme
|
fontSize: 14)),
|
||||||
.primary)), // Changed color for visibility
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () => _launchPhoneNumber(phone),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.phone),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Text(phone,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
fontSize: 14)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,58 +118,60 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 20),
|
Card(
|
||||||
GestureDetector(
|
elevation: 4,
|
||||||
|
child: InkWell(
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
_launchUrl("https://kccbhp.bank.in/complaint-form/"),
|
_launchUrl("https://kccbhp.bank.in/complaint-form/"),
|
||||||
child: Row(mainAxisSize: MainAxisSize.min, children: [
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Complaint Form",
|
"Complaint Form",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 15,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
decoration: TextDecoration
|
|
||||||
.underline, // Added underline for link clarity
|
|
||||||
decorationColor:
|
|
||||||
Theme.of(context).colorScheme.primary,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
|
||||||
Icon(
|
Icon(
|
||||||
Icons.open_in_new,
|
Icons.open_in_new,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
size: 16.0,
|
size: 16.0,
|
||||||
),
|
),
|
||||||
])),
|
],
|
||||||
const SizedBox(height: 40),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Divider(height: 32),
|
||||||
Text(
|
Text(
|
||||||
AppLocalizations.of(context).keyContacts,
|
AppLocalizations.of(context).keyContacts,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 15,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
// horizontal line
|
|
||||||
),
|
),
|
||||||
Divider(color: Theme.of(context).colorScheme.outline),
|
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
Expanded(
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
_buildContactItem(
|
_buildContactItem(
|
||||||
AppLocalizations.of(context).chairman,
|
AppLocalizations.of(context).chairman,
|
||||||
"chairman@kccb.in",
|
"chairman@kccb.in",
|
||||||
"01892-222677",
|
"01892-222677",
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
|
||||||
_buildContactItem(
|
_buildContactItem(
|
||||||
AppLocalizations.of(context).managingDirector,
|
AppLocalizations.of(context).managingDirector,
|
||||||
"md@kccb.in",
|
"md@kccb.in",
|
||||||
"01892-224969",
|
"01892-224969",
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
|
||||||
_buildContactItem(
|
_buildContactItem(
|
||||||
AppLocalizations.of(context).gmWest,
|
AppLocalizations.of(context).gmWest,
|
||||||
"gmw@kccb.in",
|
"gmw@kccb.in",
|
||||||
"01892-223280",
|
"01892-223280",
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
|
||||||
_buildContactItem(
|
_buildContactItem(
|
||||||
AppLocalizations.of(context).gmNorth,
|
AppLocalizations.of(context).gmNorth,
|
||||||
"gmn@kccb.in",
|
"gmn@kccb.in",
|
||||||
@@ -151,6 +180,9 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
IgnorePointer(
|
IgnorePointer(
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
|
|||||||
Reference in New Issue
Block a user