Commit d24e453e authored by Sai Srinivas's avatar Sai Srinivas
Browse files

19-06-2025 By Sai Srinivas

Finance Module Test cases & Safe Area
parent 4807bee4
......@@ -28,16 +28,25 @@ class Allpaymentrequesitionlistsbymodes extends StatefulWidget {
class _AllpaymentrequesitionlistsbymodesState
extends State<Allpaymentrequesitionlistsbymodes> {
late Commondaterangefilter cf;
@override
void initState() {
// TODO: implement initState
super.initState();
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
cf = Commondaterangefilter();
var provider = Provider.of<Requestionlistprovider>(
context,
listen: false,
);
provider.paymentRequestionListsAPIFunction(context, widget.mode, '', '');
final now = DateTime.now();
final range = DateTimeRange(
start: DateTime(now.year, now.month, now.day),
end: DateTime(now.year, now.month, now.day),
);
final dateRange = cf.getFormattedDateRange(range);
// print(dateRange);
provider.paymentRequestionListsAPIFunction(context, widget.mode, dateRange[0], dateRange[1]);
});
}
......@@ -103,262 +112,261 @@ class _AllpaymentrequesitionlistsbymodesState
),
backgroundColor: AppColors.scaffold_bg_color,
body:
provider.isLoading
? Center(child: CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue)
))
: requestLists.isNotEmpty?SingleChildScrollView(
child: Column(
children: [
ListView.builder(
itemCount: requestLists.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
if (requestLists.isEmpty) {
return SizedBox(
child: Center(
child: Text("No Data Available"),
),
);
}
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius:
BorderRadius.circular(8),
),
child: SvgPicture.asset(
"assets/svg/fin_ic.svg",
),
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
requestLists[index]
.accountName!,
style: TextStyle(
fontFamily:
"JakartaMedium",
fontSize: 14,
color:
AppColors.semi_black,
),
),
Text(
"₹"
"${requestLists[index].amount}",
style: TextStyle(
fontFamily:
"JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
),
),
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5,
vertical: 10,
),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(8),
color: Color(0xFFE3FFE0),
),
child: Center(
child: Text(
requestLists[index].status!,
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: Color(0xFF0D9C00),
),
),
),
),
),
],
),
Divider(
thickness: 0.5,
color: Color(0xFFD7D7D7),
),
...List.generate(4, (j) {
final headings = [
"Requesting Propose",
"Attachment",
"Requested Date",
"Note",
];
SafeArea(child: provider.isLoading
? Center(child: CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue)
))
: requestLists.isNotEmpty?SizedBox(
child: Scrollbar(
thumbVisibility: false,
child: ListView.builder(
itemCount: requestLists.length,
shrinkWrap: true,
physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) {
if (requestLists.isEmpty) {
return SizedBox(
child: Center(
child: Text("No Data Available"),
),
);
}
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius:
BorderRadius.circular(8),
),
child: SvgPicture.asset(
"assets/svg/fin_ic.svg",
),
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
requestLists[index]
.accountName!,
style: TextStyle(
fontFamily:
"JakartaMedium",
fontSize: 14,
color:
AppColors.semi_black,
),
),
Text(
"₹"
"${requestLists[index].amount}",
style: TextStyle(
fontFamily:
"JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
),
),
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5,
vertical: 10,
),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(8),
color: Color(0xFFE3FFE0),
),
child: Center(
child: Text(
requestLists[index].status!,
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: Color(0xFF0D9C00),
),
),
),
),
),
],
),
Divider(
thickness: 0.5,
color: Color(0xFFD7D7D7),
),
...List.generate(4, (j) {
final headings = [
"Requesting Propose",
"Attachment",
"Requested Date",
"Note",
];
final subHeadings = [
requestLists[index].requestingPurpose,
"View",
// requestLists[index].attachmentDirFilePath
requestLists[index].date,
requestLists[index].description,
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap:
j != 1
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(
context,
) => Fileviewer(
fileName:
requestLists[index]
.attachmentViewFileName!,
fileUrl:
requestLists[index]
.attachmentDirFilePath!,
),
),
);
},
child: Text(
subHeadings[j]!,
style: TextStyle(
fontSize: 14,
color:
j == 1
? AppColors
.app_blue
: Color(
0xFF818181,
),
decoration:
j == 1
? TextDecoration
.underline
: TextDecoration
.none,
decorationColor:
j == 1
? AppColors
.app_blue
: AppColors.white,
),
),
),
),
],
),
);
}),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Paymentrequestionlistdetails(
pageName:
widget
.pageTitleName,
mode: widget.mode,
paymentRequestId:
requestLists[index]
.id,
),
),
);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
),
],
),
);
},
),
],
),
):Emptywidget(context),
final subHeadings = [
requestLists[index].requestingPurpose,
"View",
// requestLists[index].attachmentDirFilePath
requestLists[index].date,
requestLists[index].description,
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap:
j != 1
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(
context,
) => Fileviewer(
fileName:
requestLists[index]
.attachmentViewFileName!,
fileUrl:
requestLists[index]
.attachmentDirFilePath!,
),
),
);
},
child: Text(
subHeadings[j]!,
style: TextStyle(
fontSize: 14,
color:
j == 1
? AppColors
.app_blue
: Color(
0xFF818181,
),
decoration:
j == 1
? TextDecoration
.underline
: TextDecoration
.none,
decorationColor:
j == 1
? AppColors
.app_blue
: AppColors.white,
),
),
),
),
],
),
);
}),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Paymentrequestionlistdetails(
pageName:
widget
.pageTitleName,
mode: widget.mode,
paymentRequestId:
requestLists[index]
.id,
),
),
);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
),
],
),
);
},
),
),
):Emptywidget(context),)
),
);
},
......
......@@ -80,7 +80,7 @@ class _FileviewerState extends State<Fileviewer> {
return Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, "File Viewer"),
body: fileWidget(context),
body: SafeArea(child: fileWidget(context)),
);
}
......
......@@ -64,198 +64,181 @@ class _PaymentrequestionlistdetailsState
Widget build(BuildContext context) {
return Consumer<Requesitionlidtdetailsprovider>(
builder: (context, provider, child) {
var payment_det = provider.paymentsDetails;
var req_det = provider.requestsDetails;
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
provider.subHeadings = [
req_det.accountName ?? "-",
req_det.proposedAccount ?? "-",
req_det.branch ?? "-",
req_det.requestingPurpose ?? "-",
req_det.requestMode ?? "-",
req_det.createdEmployee ?? "-",
req_det.attachmentViewFileName ?? "-",
req_det.date ?? "-",
req_det.description ?? "-",
req_det.level1ApprovalRemarks ?? "-",
req_det.level1Employee ?? "-",
req_det.level2ApprovalRemarks ?? "-",
req_det.level2Employee ?? "-",
req_det.createdDatetime ?? "-",
req_det.updatedDatetime ?? "-",
];
});
return WillPopScope(
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, widget.pageName),
backgroundColor: AppColors.scaffold_bg_color,
body: Container(
child: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
body: SafeArea(
child: Container(
child: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
),
child: SvgPicture.asset("assets/svg/fin_ic.svg"),
),
child: SvgPicture.asset("assets/svg/fin_ic.svg"),
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
req_det.accountName ?? "-",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
req_det.accountName==""?"-":req_det.accountName ?? "-",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Text(
"₹${req_det.amount}",
Text(
req_det.amount==""?"-":"₹${req_det.amount}",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
),
),
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5,
vertical: 10,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE3FFE0),
),
child: Center(
child: Text(
req_det.status ?? "-",
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
color: Color(0xFF0D9C00),
),
),
],
),
),
),
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5,
vertical: 10,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE3FFE0),
),
child: Center(
child: Text(
req_det.status ?? "-",
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: Color(0xFF0D9C00),
),
),
),
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(provider.subHeadings.length, (j) {
return Container(
padding: EdgeInsets.symmetric(vertical: 7),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
provider.Headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap: () {
if (provider.Headings[j] == "Attachment") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Fileviewer(
fileName:
req_det
.attachmentViewFileName!,
fileUrl:
req_det
.attachmentDirFilePath!,
),
),
);
} else if (provider.Headings[j] ==
"Requested Account") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Accountslistdetails(
accountID:
provider.requestsDetails.accountId,
),
),
);
}
},
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(provider.subHeadings.length, (j) {
return Container(
padding: EdgeInsets.symmetric(vertical: 7),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
[
"Attachment",
].contains(provider.Headings[j])
? "View"
: "${provider.subHeadings[j]}",
provider.Headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color:
[
"Attachment",
"Requested Account",
].contains(provider.Headings[j])
? AppColors.app_blue
: Color(0xFF818181),
decoration:
[
"Attachment",
"Requested Account",
].contains(provider.Headings[j])
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
[
"Attachment",
"Requested Account",
].contains(provider.Headings[j])
? AppColors.app_blue
: AppColors.white,
color: AppColors.semi_black,
),
),
),
),
],
),
);
}),
],
Expanded(
child: InkResponse(
onTap: () {
if (provider.Headings[j] == "Attachment") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Fileviewer(
fileName:
req_det
.attachmentViewFileName??"",
fileUrl:
req_det
.attachmentDirFilePath??"",
),
),
);
} else if (provider.Headings[j] ==
"Requested Account") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Accountslistdetails(
accountID:
provider.requestsDetails.accountId,
),
),
);
}
},
child: Text(
[
"Attachment",
].contains(provider.Headings[j])
? "View"
: provider.subHeadings[j]==""?"-":provider.subHeadings[j],
style: TextStyle(
fontSize: 14,
color:
[
"Attachment",
"Requested Account",
].contains(provider.Headings[j])
? AppColors.app_blue
: Color(0xFF818181),
decoration:
[
"Attachment",
"Requested Account",
].contains(provider.Headings[j])
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
[
"Attachment",
"Requested Account",
].contains(provider.Headings[j])
? AppColors.app_blue
: AppColors.white,
),
),
),
),
],
),
);
}),
],
),
),
),
),
......
......@@ -51,465 +51,467 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.white,
appBar: appbar(context, "${widget.pageTitleName}"),
body: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(context, "Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<Accounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.receiptAccounts
.map(
(accs) =>
DropdownMenuItem<Accounts>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
body: SafeArea(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(context, "Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<Accounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.receiptAccounts
.map(
(accs) =>
DropdownMenuItem<Accounts>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectreceiptAccounts,
onChanged: (Accounts? value) {
if (value != null) {
if (provider.receiptAccounts.isNotEmpty) {
provider.selectreceiptAccounts = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.receiptAccountId = value.id!;
provider.receiptAccountValue = value.name!;
print(
"hfjkshfg" +
provider.receiptAccountId.toString(),
);
)
.toList(),
value: provider.selectreceiptAccounts,
onChanged: (Accounts? value) {
if (value != null) {
if (provider.receiptAccounts.isNotEmpty) {
provider.selectreceiptAccounts = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.receiptAccountId = value.id!;
provider.receiptAccountValue = value.name!;
print(
"hfjkshfg" +
provider.receiptAccountId.toString(),
);
}
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
),
],
],
),
),
),
errorWidget(context, provider.selectAccountError),
TextWidget(context, "Payment Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<ReceiptAccounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.receiptPaymentAccounts
.map(
(accs) => DropdownMenuItem<
ReceiptAccounts
>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
errorWidget(context, provider.selectAccountError),
TextWidget(context, "Payment Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<ReceiptAccounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.receiptPaymentAccounts
.map(
(accs) => DropdownMenuItem<
ReceiptAccounts
>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectreceiptPaymentAccounts,
onChanged: (ReceiptAccounts? value) {
if (value != null) {
if (provider
.receiptPaymentAccounts
.isNotEmpty) {
provider.selectreceiptPaymentAccounts =
value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.receiptPaymentAccountsID =
value.id!;
provider.receiptPaymentAccountsValue =
value.name!;
print(
"hfjkshfg" +
provider.receiptPaymentAccountsID
.toString(),
);
)
.toList(),
value: provider.selectreceiptPaymentAccounts,
onChanged: (ReceiptAccounts? value) {
if (value != null) {
if (provider
.receiptPaymentAccounts
.isNotEmpty) {
provider.selectreceiptPaymentAccounts =
value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.receiptPaymentAccountsID =
value.id!;
provider.receiptPaymentAccountsValue =
value.name!;
print(
"hfjkshfg" +
provider.receiptPaymentAccountsID
.toString(),
);
}
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
),
],
],
),
),
),
errorWidget(context, provider.selectPaymentAccountError),
textControllerWidget(
context,
provider.amountController,
"Enter Amount",
provider.updateAmount,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.amountError),
///payment date toBE
TextWidget(context, "Receipt Date"),
GestureDetector(
onTap: () {
provider.showDatePickerDialog(context);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(14),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10, 0),
child: TextFormField(
controller: provider.dateController,
keyboardType: TextInputType.text,
enabled: false,
maxLines: 1,
readOnly: true,
onChanged: (value) {
},
decoration: InputDecoration(
hintText: "Enter Date",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14,
errorWidget(context, provider.selectPaymentAccountError),
textControllerWidget(
context,
provider.amountController,
"Enter Amount",
provider.updateAmount,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.amountError),
///payment date toBE
TextWidget(context, "Receipt Date"),
GestureDetector(
onTap: () {
provider.showDatePickerDialog(context);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(14),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10, 0),
child: TextFormField(
controller: provider.dateController,
keyboardType: TextInputType.text,
enabled: false,
maxLines: 1,
readOnly: true,
onChanged: (value) {
},
decoration: InputDecoration(
hintText: "Enter Date",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14,
),
enabledBorder: InputBorder.none,
disabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
),
enabledBorder: InputBorder.none,
disabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
),
),
),
),
),
],
],
),
),
),
errorWidget(context, provider.dateError),
TextWidget(context, "Select Payment Mode"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<PaymentModes>(
isExpanded: true,
hint: Text(
'Select Payment mode',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.receiptPaymentModes
.map(
(paymenents) => DropdownMenuItem<
PaymentModes
>(
value: paymenents,
child: Text(
paymenents.name ?? '',
style: const TextStyle(
fontSize: 14,
errorWidget(context, provider.dateError),
TextWidget(context, "Select Payment Mode"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<PaymentModes>(
isExpanded: true,
hint: Text(
'Select Payment mode',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.receiptPaymentModes
.map(
(paymenents) => DropdownMenuItem<
PaymentModes
>(
value: paymenents,
child: Text(
paymenents.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectreceiptPaymentModes,
onChanged: (PaymentModes? value) {
if (value != null) {
if (provider.receiptPaymentModes.isNotEmpty) {
provider.selectreceiptPaymentModes = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.receiptPaymentModesID = value.id!;
provider.receiptPaymentModesValues =
value.name!;
print(
"hfjkshfg" +
provider.receiptPaymentModesID
.toString(),
);
)
.toList(),
value: provider.selectreceiptPaymentModes,
onChanged: (PaymentModes? value) {
if (value != null) {
if (provider.receiptPaymentModes.isNotEmpty) {
provider.selectreceiptPaymentModes = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.receiptPaymentModesID = value.id!;
provider.receiptPaymentModesValues =
value.name!;
print(
"hfjkshfg" +
provider.receiptPaymentModesID
.toString(),
);
}
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
),
],
),
),
errorWidget(context, provider.paymentModeError),
if ([
"Cheque",
"RTGS",
"IMPS",
"NEFT",
].contains(provider.paymentModeValue)) ...
[
textControllerWidget(
context,
provider.bankNameController,
"Enter Bank Name",
provider.updateBankName,TextInputType.text,false,null
),
errorWidget(context, provider.bankNameError),
textControllerWidget(
context,
provider.bankBranchController,
"Enter Bank Branch",
provider.updateBankBranch,TextInputType.text,false,null
),
errorWidget(context, provider.bankBranchError),
textControllerWidget(
context,
provider.bankAccNumberController,
"Enter Account Number",
provider.updateNumber,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.bankNumberError),
textControllerWidget(
context,
provider.bankIfscController,
"Enter Bank IFSC",
provider.updateIFSC,TextInputType.text,false,null
],
),
),
errorWidget(context, provider.bankIFSCError),
errorWidget(context, provider.paymentModeError),
if ([
"Cheque",
"RTGS",
"IMPS",
"NEFT",
].contains(provider.paymentModeValue)) ...
[
textControllerWidget(
context,
provider.bankNameController,
"Enter Bank Name",
provider.updateBankName,TextInputType.text,false,null
),
errorWidget(context, provider.bankNameError),
textControllerWidget(
context,
provider.bankBranchController,
"Enter Bank Branch",
provider.updateBankBranch,TextInputType.text,false,null
),
errorWidget(context, provider.bankBranchError),
textControllerWidget(
context,
provider.bankAccNumberController,
"Enter Account Number",
provider.updateNumber,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.bankNumberError),
textControllerWidget(
context,
provider.bankIfscController,
"Enter Bank IFSC",
provider.updateIFSC,TextInputType.text,false,null
),
errorWidget(context, provider.bankIFSCError),
textControllerWidget(
context,
provider.bankAcHolderController,
"Enter Bank Account Holder Name",
provider.updateHolder,TextInputType.text,false,null
),
errorWidget(context, provider.bankHolderError),
] else if (provider.paymentModeValue == "UPI") ...
[
textControllerWidget(
context,
provider.amountController,
"Enter UPI ID",
provider.updateUPI,TextInputType.text,false,null
),
errorWidget(context, provider.UPIError),
],
textControllerWidget(
context,
provider.bankAcHolderController,
"Enter Bank Account Holder Name",
provider.updateHolder,TextInputType.text,false,null
provider.paymentReferenceController,
"Enter Payment Reference Number",
provider.updatereference,TextInputType.text,false,null
),
errorWidget(context, provider.bankHolderError),
] else if (provider.paymentModeValue == "UPI") ...
[
errorWidget(context, provider.paymentreferenceError),
textControllerWidget(
context,
provider.amountController,
"Enter UPI ID",
provider.updateUPI,TextInputType.text,false,null
provider.descController,
"Enter Description",
provider.updateDescription,TextInputType.text,false,null
),
errorWidget(context, provider.UPIError),
],
textControllerWidget(
context,
provider.paymentReferenceController,
"Enter Payment Reference Number",
provider.updatereference,TextInputType.text,false,null
),
errorWidget(context, provider.paymentreferenceError),
textControllerWidget(
context,
provider.descController,
"Enter Description",
provider.updateDescription,TextInputType.text,false,null
),
errorWidget(context, provider.descriptionError),
InkResponse(
onTap: () {
_showAttachmentSheet(context);
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: 45,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: AppColors.app_blue,
width: 0.5,
),
),
child: Center(
child: Text(
"File Attachment",
style: TextStyle(
fontFamily: "JakartaMedium",
errorWidget(context, provider.descriptionError),
InkResponse(
onTap: () {
_showAttachmentSheet(context);
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: 45,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: AppColors.app_blue,
width: 0.5,
),
),
child: Center(
child: Text(
"File Attachment",
style: TextStyle(
fontFamily: "JakartaMedium",
color: AppColors.app_blue,
),
),
),
),
),
),
if(provider.imagePicked==1 && provider.imagePath!=null)...[
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("${provider.imagePath}",style: TextStyle(
color: AppColors.semi_black,
fontSize: 11,
fontWeight: FontWeight.w600
),),
InkResponse(
onTap: () {
provider.imagePicked = 0;
provider.imagePath = null;
provider.imageFilePath = null;
},
child: SvgPicture.asset("assets/svg/ic_close.svg",width: 15,height: 15,))
],
),
)
if(provider.imagePicked==1 && provider.imagePath!=null)...[
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("${provider.imagePath}",style: TextStyle(
color: AppColors.semi_black,
fontSize: 11,
fontWeight: FontWeight.w600
),),
InkResponse(
onTap: () {
provider.imagePicked = 0;
provider.imagePath = null;
provider.imageFilePath = null;
},
child: SvgPicture.asset("assets/svg/ic_close.svg",width: 15,height: 15,))
],
),
)
],
],
],
),
),
),
),
......
......@@ -55,478 +55,480 @@ class _DirectpaymentrequesitionlistState
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.white,
appBar: appbar(context, "${widget.pageTitleName}"),
body: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(context, "Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<DirectAccounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.directAccounts
.map(
(accs) =>
DropdownMenuItem<DirectAccounts>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
body: SafeArea(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(context, "Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<DirectAccounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.directAccounts
.map(
(accs) =>
DropdownMenuItem<DirectAccounts>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectDirectAccounts,
onChanged: (DirectAccounts? value) {
if (value != null) {
if (provider.directAccounts.isNotEmpty) {
provider.selectDirectAccounts = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.directAccountId = value.id!;
provider.directAccountValue = value.name!;
print(
"hfjkshfg" +
provider.directAccountId.toString(),
);
)
.toList(),
value: provider.selectDirectAccounts,
onChanged: (DirectAccounts? value) {
if (value != null) {
if (provider.directAccounts.isNotEmpty) {
provider.selectDirectAccounts = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.directAccountId = value.id!;
provider.directAccountValue = value.name!;
print(
"hfjkshfg" +
provider.directAccountId.toString(),
);
}
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 25,
width: 20,
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 25,
width: 20,
),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
),
],
],
),
),
),
errorWidget(context, provider.selectDirectAccountError),
TextWidget(context, "Payment Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<DirectPaymentAccounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.directPaymentAccounts
.map(
(accs) => DropdownMenuItem<
DirectPaymentAccounts
>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
errorWidget(context, provider.selectDirectAccountError),
TextWidget(context, "Payment Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<DirectPaymentAccounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.directPaymentAccounts
.map(
(accs) => DropdownMenuItem<
DirectPaymentAccounts
>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectDirectPaymentAccounts,
onChanged: (DirectPaymentAccounts? value) {
if (value != null) {
if (provider
.directPaymentAccounts
.isNotEmpty) {
provider.selectDirectPaymentAccounts =
value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.directPaymentAccountsID =
value.id!;
provider.directPaymentAccountsValue =
value.name!;
print(
"hfjkshfg" +
provider.directPaymentAccountsID
.toString(),
);
)
.toList(),
value: provider.selectDirectPaymentAccounts,
onChanged: (DirectPaymentAccounts? value) {
if (value != null) {
if (provider
.directPaymentAccounts
.isNotEmpty) {
provider.selectDirectPaymentAccounts =
value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.directPaymentAccountsID =
value.id!;
provider.directPaymentAccountsValue =
value.name!;
print(
"hfjkshfg" +
provider.directPaymentAccountsID
.toString(),
);
}
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 25,
width: 20,
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 25,
width: 20,
),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
),
],
],
),
),
),
errorWidget(
context,
provider.selectDirectPaymentAccountError,
),
textControllerWidget(
context,
provider.amountController,
"Enter Amount",
provider.updateAmount,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.amountError),
///payment date toBE
TextWidget(context, "Enter Date"),
GestureDetector(
onTap: () {
provider.showDatePickerDialog(context);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(14),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(
10.0,
0.0,
10,
0,
errorWidget(
context,
provider.selectDirectPaymentAccountError,
),
textControllerWidget(
context,
provider.amountController,
"Enter Amount",
provider.updateAmount,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.amountError),
///payment date toBE
TextWidget(context, "Enter Date"),
GestureDetector(
onTap: () {
provider.showDatePickerDialog(context);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(14),
),
child: TextFormField(
controller: provider.dateController,
keyboardType: TextInputType.text,
enabled: false,
maxLines: 1,
readOnly: true,
onChanged: (value) {},
decoration: InputDecoration(
hintText: "Enter Date",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14,
child: Padding(
padding: const EdgeInsets.fromLTRB(
10.0,
0.0,
10,
0,
),
child: TextFormField(
controller: provider.dateController,
keyboardType: TextInputType.text,
enabled: false,
maxLines: 1,
readOnly: true,
onChanged: (value) {},
decoration: InputDecoration(
hintText: "Enter Date",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14,
),
enabledBorder: InputBorder.none,
disabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
),
enabledBorder: InputBorder.none,
disabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
),
),
),
),
),
],
],
),
),
),
errorWidget(context, provider.dateError),
TextWidget(context, "Select Payment Mode"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<DirectPaymentModes>(
isExpanded: true,
hint: Text(
'Select Payment mode',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.directPaymentModes
.map(
(paymenents) => DropdownMenuItem<
DirectPaymentModes
>(
value: paymenents,
child: Text(
paymenents.name ?? '',
style: const TextStyle(
fontSize: 14,
errorWidget(context, provider.dateError),
TextWidget(context, "Select Payment Mode"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<DirectPaymentModes>(
isExpanded: true,
hint: Text(
'Select Payment mode',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.directPaymentModes
.map(
(paymenents) => DropdownMenuItem<
DirectPaymentModes
>(
value: paymenents,
child: Text(
paymenents.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectDirectPaymentModes,
onChanged: (DirectPaymentModes? value) {
if (value != null) {
if (provider.directPaymentModes.isNotEmpty) {
provider.selectDirectPaymentModes = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.directPaymentModesID = value.id!;
provider.directPaymentModesValues =
value.name!;
print(
"hfjkshfg" +
provider.directPaymentModesID
.toString(),
);
)
.toList(),
value: provider.selectDirectPaymentModes,
onChanged: (DirectPaymentModes? value) {
if (value != null) {
if (provider.directPaymentModes.isNotEmpty) {
provider.selectDirectPaymentModes = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.directPaymentModesID = value.id!;
provider.directPaymentModesValues =
value.name!;
print(
"hfjkshfg" +
provider.directPaymentModesID
.toString(),
);
}
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 25,
width: 20,
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 25,
width: 20,
),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
),
],
),
),
errorWidget(context, provider.selectDirectPaymentError),
if ([
"Cheque",
"RTGS",
"IMPS",
"NEFT",
].contains(provider.directPaymentModesValues)) ...[
textControllerWidget(
context,
provider.bankNameController,
"Enter Bank Name",
provider.updateBankName,TextInputType.text,false,null
),
errorWidget(context, provider.bankNameError),
textControllerWidget(
context,
provider.bankBranchController,
"Enter Bank Branch",
provider.updateBankBranch,TextInputType.text,false,null
),
errorWidget(context, provider.bankBranchError),
textControllerWidget(
context,
provider.bankAccNumberController,
"Enter Account Number",
provider.updateNumber,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.bankNumberError),
textControllerWidget(
context,
provider.bankIfscController,
"Enter Bank IFSC",
provider.updateIFSC,TextInputType.text,false,null
],
),
),
errorWidget(context, provider.bankIFSCError),
errorWidget(context, provider.selectDirectPaymentError),
if ([
"Cheque",
"RTGS",
"IMPS",
"NEFT",
].contains(provider.directPaymentModesValues)) ...[
textControllerWidget(
context,
provider.bankNameController,
"Enter Bank Name",
provider.updateBankName,TextInputType.text,false,null
),
errorWidget(context, provider.bankNameError),
textControllerWidget(
context,
provider.bankBranchController,
"Enter Bank Branch",
provider.updateBankBranch,TextInputType.text,false,null
),
errorWidget(context, provider.bankBranchError),
textControllerWidget(
context,
provider.bankAccNumberController,
"Enter Account Number",
provider.updateNumber,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.bankNumberError),
textControllerWidget(
context,
provider.bankIfscController,
"Enter Bank IFSC",
provider.updateIFSC,TextInputType.text,false,null
),
errorWidget(context, provider.bankIFSCError),
textControllerWidget(
context,
provider.bankAcHolderController,
"Enter Bank Account Holder Name",
provider.updateHolder,TextInputType.text,false,null
),
errorWidget(context, provider.bankHolderError),
] else if (provider.directPaymentModesValues == "UPI") ...[
textControllerWidget(
context,
provider.amountController,
"Enter UPI ID",
provider.updateUPI,TextInputType.text,false,null
),
errorWidget(context, provider.UPIError),
],
textControllerWidget(
context,
provider.bankAcHolderController,
"Enter Bank Account Holder Name",
provider.updateHolder,TextInputType.text,false,null
provider.paymentReferenceController,
"Enter Payment Reference Number",
provider.updateReference,TextInputType.text,false,null
),
errorWidget(context, provider.bankHolderError),
] else if (provider.directPaymentModesValues == "UPI") ...[
errorWidget(context, provider.paymentreferenceerror),
textControllerWidget(
context,
provider.amountController,
"Enter UPI ID",
provider.updateUPI,TextInputType.text,false,null
provider.descController,
"Enter Description",
provider.updateDescription,TextInputType.text,false,null
),
errorWidget(context, provider.UPIError),
],
textControllerWidget(
context,
provider.paymentReferenceController,
"Enter Payment Reference Number",
provider.updateReference,TextInputType.text,false,null
),
errorWidget(context, provider.paymentreferenceerror),
textControllerWidget(
context,
provider.descController,
"Enter Description",
provider.updateDescription,TextInputType.text,false,null
),
errorWidget(context, provider.descriptionError),
InkResponse(
onTap: () {
_showAttachmentSheet(context);
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: 45,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: AppColors.app_blue,
width: 0.5,
),
),
child: Center(
child: Text(
"File Attachment",
style: TextStyle(
fontFamily: "JakartaMedium",
errorWidget(context, provider.descriptionError),
InkResponse(
onTap: () {
_showAttachmentSheet(context);
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: 45,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: AppColors.app_blue,
width: 0.5,
),
),
child: Center(
child: Text(
"File Attachment",
style: TextStyle(
fontFamily: "JakartaMedium",
color: AppColors.app_blue,
),
),
),
),
),
),
if(provider.imagePicked==1 && provider.imagePath!=null)...[
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("${provider.imagePath}",style: TextStyle(
color: AppColors.semi_black,
fontSize: 11,
fontWeight: FontWeight.w600
),),
InkResponse(
onTap: () {
provider.imagePicked = 0;
provider.imagePath = null;
provider.imageFilePath = null;
},
child: SvgPicture.asset("assets/svg/ic_close.svg",width: 15,height: 15,))
],
),
)
if(provider.imagePicked==1 && provider.imagePath!=null)...[
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("${provider.imagePath}",style: TextStyle(
color: AppColors.semi_black,
fontSize: 11,
fontWeight: FontWeight.w600
),),
InkResponse(
onTap: () {
provider.imagePicked = 0;
provider.imagePath = null;
provider.imageFilePath = null;
},
child: SvgPicture.asset("assets/svg/ic_close.svg",width: 15,height: 15,))
],
),
)
],
],
],
),
),
),
),
......
......@@ -35,102 +35,104 @@ class _FinancedashboardState extends State<Financedashboard> {
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Finance"),
body: Container(
child: SingleChildScrollView(
child: Column(
children: [
ListView.builder(
itemCount: provider.accessiblePagesList.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
Widget? SvgIcon;
switch (provider.accessiblePagesList[index].mode) {
case "apr_lvl1":
SvgIcon = SvgPicture.asset(
"assets/svg/fin_lv1.svg",
);
break;
case "apr_lvl2":
SvgIcon = SvgPicture.asset(
"assets/svg/fin_lv2.svg",
);
break;
default:
SvgIcon = SvgPicture.asset("assets/svg/fin_ic.svg");
break;
}
return InkResponse(
onTap: () async {
var navigate;
if (provider.accessiblePagesList[index].pageName ==
"Payments List") {
navigate = Paymentlistpaymentrequisition(
pageTitleName:
provider
.accessiblePagesList[index]
.pageName!,
body: SafeArea(
child: SizedBox(
child: SingleChildScrollView(
child: Column(
children: [
ListView.builder(
itemCount: provider.accessiblePagesList.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
Widget? SvgIcon;
switch (provider.accessiblePagesList[index].mode) {
case "apr_lvl1":
SvgIcon = SvgPicture.asset(
"assets/svg/fin_lv1.svg",
);
} else if (provider
.accessiblePagesList[index]
.pageName ==
"Payment Receipts List") {
navigate = Paymentreceiptlist(
pageTitleName:
provider
.accessiblePagesList[index]
.pageName!,
break;
case "apr_lvl2":
SvgIcon = SvgPicture.asset(
"assets/svg/fin_lv2.svg",
);
} else {
navigate = Allpaymentrequesitionlistsbymodes(
mode: provider.accessiblePagesList[index].mode!,
pageTitleName:
provider
.accessiblePagesList[index]
.pageName!,
break;
default:
SvgIcon = SvgPicture.asset("assets/svg/fin_ic.svg");
break;
}
return InkResponse(
onTap: () async {
var navigate;
if (provider.accessiblePagesList[index].pageName ==
"Payments List") {
navigate = Paymentlistpaymentrequisition(
pageTitleName:
provider
.accessiblePagesList[index]
.pageName!,
);
} else if (provider
.accessiblePagesList[index]
.pageName ==
"Payment Receipts List") {
navigate = Paymentreceiptlist(
pageTitleName:
provider
.accessiblePagesList[index]
.pageName!,
);
} else {
navigate = Allpaymentrequesitionlistsbymodes(
mode: provider.accessiblePagesList[index].mode!,
pageTitleName:
provider
.accessiblePagesList[index]
.pageName!,
);
}
await Navigator.push(
context,
MaterialPageRoute(builder: (context) => navigate),
);
}
await Navigator.push(
context,
MaterialPageRoute(builder: (context) => navigate),
);
},
child: Container(
margin: EdgeInsets.symmetric(
horizontal: 5,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(14),
),
child: Row(
children: [
Expanded(flex: 1, child: SvgIcon),
Expanded(
flex: 5,
child: Text(
"${provider.accessiblePagesList[index].pageName}",
},
child: Container(
margin: EdgeInsets.symmetric(
horizontal: 5,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(14),
),
child: Row(
children: [
Expanded(flex: 1, child: SvgIcon),
Expanded(
flex: 5,
child: Text(
"${provider.accessiblePagesList[index].pageName}",
),
),
),
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
),
),
),
],
],
),
),
),
);
},
),
],
);
},
),
],
),
),
),
),
......
......@@ -50,149 +50,151 @@ class _PaymentdetailspaymentrequisitionState
resizeToAvoidBottomInset: true,
appBar: appbar(context, widget.pageName),
backgroundColor: AppColors.scaffold_bg_color,
body: Container(
child: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
body: SafeArea(
child: SizedBox(
child: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
),
child: SvgPicture.asset("assets/svg/fin_ic.svg"),
),
child: SvgPicture.asset("assets/svg/fin_ic.svg"),
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
payment_det.accountName ?? "-",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
payment_det.accountName ?? "-",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Text(
"₹${payment_det.amount}",
Text(
"₹${payment_det.amount}",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
),
),
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5,
vertical: 10,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE3FFE0),
),
child: Center(
child: Text(
payment_det.refType??"-",
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
color: Color(0xFF0D9C00),
),
),
],
),
),
),
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5,
vertical: 10,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE3FFE0),
),
child: Center(
child: Text(
payment_det.refType??"-",
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: Color(0xFF0D9C00),
),
),
),
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(provider.subHeadings.length, (j) {
return Container(
padding: EdgeInsets.symmetric(vertical: 7),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
provider.Headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap: () {
if (provider.Headings[j] == "Attachment") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Fileviewer(
fileName:
payment_det
.attachmentViewFileName!,
fileUrl:
payment_det
.attachmentDirFilePath!,
),
),
);
}
},
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(provider.subHeadings.length, (j) {
return Container(
padding: EdgeInsets.symmetric(vertical: 7),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
provider.Headings[j] == "Attachment"
? "View"
: "${provider.subHeadings[j]}",
provider.Headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color:
provider.Headings[j] == "Attachment"
? AppColors.app_blue
: Color(0xFF818181),
decoration:
provider.Headings[j] == "Attachment"
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap: () {
if (provider.Headings[j] == "Attachment") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Fileviewer(
fileName:
payment_det
.attachmentViewFileName!,
fileUrl:
payment_det
.attachmentDirFilePath!,
),
),
);
}
},
child: Text(
provider.Headings[j] == "Attachment"
? AppColors.app_blue
: AppColors.white,
? "View"
:provider.subHeadings[j]==""?"-":provider.subHeadings[j]??"-",
style: TextStyle(
fontSize: 14,
color:
provider.Headings[j] == "Attachment"
? AppColors.app_blue
: Color(0xFF818181),
decoration:
provider.Headings[j] == "Attachment"
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
provider.Headings[j] == "Attachment"
? AppColors.app_blue
: AppColors.white,
),
),
),
),
),
],
),
);
}),
],
],
),
);
}),
],
),
),
),
),
......
......@@ -18,16 +18,23 @@ class Paymentlistpaymentrequisition extends StatefulWidget {
}
class _PaymentlistpaymentrequisitionState extends State<Paymentlistpaymentrequisition> {
late Commondaterangefilter cf;
@override
void initState() {
// TODO: implement initState
super.initState();
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
cf = Commondaterangefilter();
var provider = Provider.of<Paymentrequisitionpaymentslistprovider>(
context,
listen: false,
);
final now = DateTime.now();
final range = DateTimeRange(
start: DateTime(now.year, now.month, now.day),
end: DateTime(now.year, now.month, now.day),
);
final dateRange = cf.getFormattedDateRange(range);
provider.paymentsListAPI(context,'','');
});
}
......@@ -87,232 +94,232 @@ class _PaymentlistpaymentrequisitionState extends State<Paymentlistpaymentrequis
),
),
backgroundColor: AppColors.scaffold_bg_color,
body: provider.isLoading
body: SafeArea(child: provider.isLoading
? Center(child: CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue)
))
:requestLists.isNotEmpty?Container(
child: SingleChildScrollView(
child: Column(
children: [
ListView.builder(
itemCount: requestLists.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
:requestLists.isNotEmpty?SizedBox(
child: Scrollbar(
thumbVisibility: false,
child: ListView.builder(
itemCount: requestLists.length,
shrinkWrap: true,
physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Row(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
),
child: SvgPicture.asset(
"assets/svg/fin_ic.svg",
),
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
requestLists[index].receipientAccount!,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
Text(
"₹${requestLists[index].amount}",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
),
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
),
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5,
vertical: 10,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE3FFE0),
),
child: Center(
child: Text(
requestLists[index].refType!,
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: Color(0xFF0D9C00),
),
),
),
),
child: SvgPicture.asset(
"assets/svg/fin_ic.svg",
),
],
),
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(4, (j) {
final headings = [
"Request Mode",
"Attachment",
"Payment Date",
"Note",
];
final subHeadings = [
requestLists[index].requestMode,
"View",
// requestLists[index].attachmentDirFilePath
requestLists[index].paymentDate,
requestLists[index].description,
];
return Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap:
j != 1
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(
context,
) => Fileviewer(
fileName:
requestLists[index]
.attachmentViewFileName!,
fileUrl:
requestLists[index]
.attachmentDirFilePath!,
),
),
);
},
child: Text(
subHeadings[j]!,
style: TextStyle(
fontSize: 14,
color:
j == 1
? AppColors.app_blue
: Color(0xFF818181),
decoration:
j == 1
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
j == 1
? AppColors.app_blue
: AppColors.white,
),
),
Text(
requestLists[index].receipientAccount!,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
],
),
);
}),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Paymentdetailspaymentrequisition(
pageName: widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
),
);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"View Details",
"${requestLists[index].amount}",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
),
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 5,
vertical: 10,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE3FFE0),
),
child: Center(
child: Text(
requestLists[index].refType!,
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: Color(0xFF0D9C00),
),
),
),
),
),
],
),
);
},
),
],
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(5, (j) {
final headings = [
"To Account",
"Request Mode",
"Attachment",
"Payment Date",
"Note",
];
final subHeadings = [
requestLists[index].payAccount,
requestLists[index].requestMode,
"View",
// requestLists[index].attachmentDirFilePath
requestLists[index].paymentDate,
requestLists[index].description,
];
return Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap:
j != 1
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(
context,
) => Fileviewer(
fileName:
requestLists[index]
.attachmentViewFileName!,
fileUrl:
requestLists[index]
.attachmentDirFilePath!,
),
),
);
},
child: Text(
subHeadings[j]==""?"-": subHeadings[j]??"-",
style: TextStyle(
fontSize: 14,
color:
j == 1
? AppColors.app_blue
: Color(0xFF818181),
decoration:
j == 1
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
j == 1
? AppColors.app_blue
: AppColors.white,
),
),
),
),
],
),
);
}),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Paymentdetailspaymentrequisition(
pageName: widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
),
);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
),
],
),
);
},
),
),
):Emptywidget(context),
):Emptywidget(context),)
),
);
},
......
......@@ -49,126 +49,128 @@ class _PaymentreceiptdetailsState
resizeToAvoidBottomInset: true,
appBar: appbar(context, widget.pageName),
backgroundColor: AppColors.scaffold_bg_color,
body: Container(
child: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
body: SafeArea(
child: Container(
child: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
),
child: SvgPicture.asset("assets/svg/fin_ic.svg"),
),
child: SvgPicture.asset("assets/svg/fin_ic.svg"),
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
payment_det.receipientAccount ?? "-",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
payment_det.receipientAccount ?? "-",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Text(
"₹${payment_det.amount}",
Text(
"₹${payment_det.amount}",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(provider.subHeadings.length, (j) {
return Container(
padding: EdgeInsets.symmetric(vertical: 7),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
provider.Headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
color: AppColors.semi_black,
),
),
],
),
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(provider.subHeadings.length, (j) {
return Container(
padding: EdgeInsets.symmetric(vertical: 7),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
provider.Headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap: () {
if (provider.Headings[j] == "Attachment") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Fileviewer(
fileName:
payment_det
.attachmentViewFileName!,
fileUrl:
payment_det
.attachmentDirFilePath!,
Expanded(
child: InkResponse(
onTap: () {
if (provider.Headings[j] == "Attachment") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Fileviewer(
fileName:
payment_det
.attachmentViewFileName!,
fileUrl:
payment_det
.attachmentDirFilePath!,
),
),
),
);
}
},
child: Text(
provider.Headings[j] == "Attachment"
? "View"
: "${provider.subHeadings[j]}",
style: TextStyle(
fontSize: 14,
color:
provider.Headings[j] == "Attachment"
? AppColors.app_blue
: Color(0xFF818181),
decoration:
);
}
},
child: Text(
provider.Headings[j] == "Attachment"
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
provider.Headings[j] == "Attachment"
? AppColors.app_blue
: AppColors.white,
? "View"
: provider.subHeadings[j]==""?"-":provider.subHeadings[j]??"-",
style: TextStyle(
fontSize: 14,
color:
provider.Headings[j] == "Attachment"
? AppColors.app_blue
: Color(0xFF818181),
decoration:
provider.Headings[j] == "Attachment"
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
provider.Headings[j] == "Attachment"
? AppColors.app_blue
: AppColors.white,
),
),
),
),
),
],
),
);
}),
],
],
),
);
}),
],
),
),
),
),
......
......@@ -89,206 +89,206 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
),
),
backgroundColor: AppColors.scaffold_bg_color,
body: provider.isLoading
body: SafeArea(child: provider.isLoading
? Center(child: CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue)
)):requestLists.isNotEmpty?SingleChildScrollView(
child: Column(
children: [
ListView.builder(
itemCount: requestLists.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
),
child: SvgPicture.asset(
"assets/svg/fin_ic.svg",
),
)):requestLists.isNotEmpty?SizedBox(
child: Scrollbar(
child: ListView.builder(
itemCount: requestLists.length,
shrinkWrap: true,
physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 35,
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color(0xFFFFF3CE),
borderRadius: BorderRadius.circular(8),
),
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
requestLists[index].receipientAccount!,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
Text(
"₹${requestLists[index].amount}",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
child: SvgPicture.asset(
"assets/svg/fin_ic.svg",
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(4, (j) {
final headings = [
"Request Mode",
"Attachment",
"Receipt Date",
"Note",
];
final subHeadings = [
requestLists[index].requestMode,
"View",
// requestLists[index].attachmentDirFilePath
requestLists[index].receiptDate,
requestLists[index].description,
];
return Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
),
SizedBox(width: 10),
Expanded(
flex: 4,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
requestLists[index].receipientAccount!,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: InkResponse(
onTap:
j != 1
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(
context,
) => Fileviewer(
fileName:
requestLists[index]
.attachmentViewFileName!,
fileUrl:
requestLists[index]
.attachmentDirFilePath!,
),
),
);
},
child: Text(
subHeadings[j]!,
style: TextStyle(
fontSize: 14,
color:
j == 1
? AppColors.app_blue
: Color(0xFF818181),
decoration:
j == 1
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
j == 1
? AppColors.app_blue
: AppColors.white,
),
Text(
"₹${requestLists[index].amount}",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
),
],
),
);
}),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Paymentreceiptdetails(
pageName: widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
],
),
);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"View Details",
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(4, (j) {
final headings = [
"Receipt Account",
"Request Mode",
"Attachment",
"Receipt Date",
"Note",
];
final subHeadings = [
requestLists[index].receipientAccount,
requestLists[index].requestMode,
"View",
// requestLists[index].attachmentDirFilePath
requestLists[index].receiptDate,
requestLists[index].description,
];
return Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
color: AppColors.semi_black,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
Expanded(
child: InkResponse(
onTap:
j != 1
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(
context,
) => Fileviewer(
fileName:
requestLists[index]
.attachmentViewFileName!,
fileUrl:
requestLists[index]
.attachmentDirFilePath!,
),
),
);
},
child: Text(
subHeadings[j]==""?"-":subHeadings[j]??"-",
style: TextStyle(
fontSize: 14,
color:
j == 1
? AppColors.app_blue
: Color(0xFF818181),
decoration:
j == 1
? TextDecoration.underline
: TextDecoration.none,
decorationColor:
j == 1
? AppColors.app_blue
: AppColors.white,
),
),
),
],
),
],
),
);
}),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Paymentreceiptdetails(
pageName: widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
),
);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
],
),
);
},
),
],
),
],
),
);
},
),
),
):Emptywidget(context),
):Emptywidget(context),)
),
);
},
......
......@@ -56,128 +56,37 @@ class _SubmitpaymentrequestionlistsbymodeState
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.white,
appBar: appbar(context, "${widget.pageTitleName}"),
body: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(context, "Select Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<Accounts>(
isExpanded: true,
hint: Text(
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.accounts
.map(
(accs) => DropdownMenuItem<Accounts>(
value: accs,
child: Text(
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectedAccount,
onChanged:
(widget.mode == "self" &&
provider.accounts.length == 1)
? null
: (Accounts? value) {
if (value != null) {
if (provider.accounts.isNotEmpty) {
provider.selectedAccount = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.accountId = value.id!;
print(
"hfjkshfg" +
provider.accountId.toString(),
);
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
],
),
),
errorWidget(context, provider.selectAccountError),
if (["self", "admin"].contains(widget.mode)) ...[
TextWidget(context, "Select Requisition Type"),
appBar: appbar2(context, "${widget.pageTitleName}",provider.resetForm,SizedBox(width: 0,)),
body: SafeArea(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(context, "Select Account"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<String>(
child: DropdownButton2<Accounts>(
isExpanded: true,
hint: Text(
'Select Request Type',
'Select Account Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.requestingPurposes
provider.accounts
.map(
(accs) => DropdownMenuItem<String>(
(accs) => DropdownMenuItem<Accounts>(
value: accs,
child: Text(
accs ?? '',
accs.name ?? '',
style: const TextStyle(
fontSize: 14,
),
......@@ -186,19 +95,26 @@ class _SubmitpaymentrequestionlistsbymodeState
),
)
.toList(),
value: provider.selectReqPurpose,
onChanged: (String? value) {
if (value != null) {
provider.selectReqPurpose = value;
print("Selected Complaint Type: ${value},");
print(
"hfjkshfg" +
provider.selectReqPurpose.toString(),
);
}
},
value: provider.selectedAccount,
onChanged:
(widget.mode == "self" &&
provider.accounts.length == 1)
? null
: (Accounts? value) {
if (value != null) {
if (provider.accounts.isNotEmpty) {
provider.selectedAccount = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.accountId = value.id!;
print(
"hfjkshfg" +
provider.accountId.toString(),
);
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
......@@ -212,7 +128,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
......@@ -225,8 +141,9 @@ class _SubmitpaymentrequestionlistsbymodeState
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness:
MaterialStateProperty.all<double>(6),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
......@@ -240,227 +157,312 @@ class _SubmitpaymentrequestionlistsbymodeState
],
),
),
] else ...[
textControllerWidget(
context,
provider.reqPurposeController,
"Enter Request Purpose",
provider.updateReqPupose,TextInputType.text,false,null
),
],
errorWidget(context, provider.reqPurposeError),
textControllerWidget(
context,
provider.descController,
"Enter Description",
provider.updateDescription,TextInputType.text,false,null
),
errorWidget(context, provider.descriptionError),
textControllerWidget(
context,
provider.amountController,
"Enter Amount",
provider.updateAmount,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.amountError),
TextWidget(context, "Select Payment Mode"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<PaymentModes>(
isExpanded: true,
hint: Text(
'Select Payment mode',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.paymentModes
.map(
(paymenents) =>
DropdownMenuItem<PaymentModes>(
value: paymenents,
errorWidget(context, provider.selectAccountError),
if (["self", "admin"].contains(widget.mode)) ...[
TextWidget(context, "Select Requisition Type"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<String>(
isExpanded: true,
hint: Text(
'Select Request Type',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.requestingPurposes
.map(
(accs) => DropdownMenuItem<String>(
value: accs,
child: Text(
paymenents.name ?? '',
accs ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectedPayment,
onChanged: (PaymentModes? value) {
if (value != null) {
if (provider.paymentModes.isNotEmpty) {
provider.selectedPayment = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.paymentModeId = value.id!;
provider.paymentModeValue = value.name!;
print(
"hfjkshfg" +
provider.paymentModeId.toString(),
);
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
)
.toList(),
value: provider.selectReqPurpose,
onChanged: (String? value) {
if (value != null) {
provider.selectReqPurpose = value;
print("Selected Complaint Type: ${value},");
print(
"hfjkshfg" +
provider.selectReqPurpose.toString(),
);
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness:
MaterialStateProperty.all<double>(6),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
],
),
),
errorWidget(context, provider.selectPaymentError),
InkResponse(
onTap: () {
_showAttachmentSheet(context);
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: 45,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: AppColors.app_blue,
width: 0.5,
],
),
),
child: Center(
child: Text(
"File Attachment",
style: TextStyle(
fontFamily: "JakartaMedium",
color: AppColors.app_blue,
),
),
),
),
),
if(provider.imagePicked==1 && provider.imagePath!=null)...[
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("${provider.imagePath}",style: TextStyle(
color: AppColors.semi_black,
fontSize: 11,
fontWeight: FontWeight.w600
),),
InkResponse(
onTap: () {
provider.imagePicked = 0;
provider.imagePath = null;
provider.imageFilePath = null;
},
child: SvgPicture.asset("assets/svg/ic_close.svg",width: 15,height: 15,))
],
] else ...[
textControllerWidget(
context,
provider.reqPurposeController,
"Enter Request Purpose",
provider.updateReqPupose,TextInputType.text,false,null
),
)
],
errorWidget(context, provider.FileError),
if ([
"Cheque",
"RTGS",
"IMPS",
"NEFT",
].contains(provider.paymentModeValue)) ...[
textControllerWidget(
context,
provider.bankNameController,
"Enter Bank Name",
provider.updateBankName,TextInputType.text,false,null
),
errorWidget(context, provider.bankNameError),
textControllerWidget(
context,
provider.bankBranchController,
"Enter Bank Branch",
provider.updateBankBranch,TextInputType.text,false,null
),
errorWidget(context, provider.bankBranchError),
],
errorWidget(context, provider.reqPurposeError),
textControllerWidget(
context,
provider.bankAccNumberController,
"Enter Account Number",
provider.updateNumber,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
provider.descController,
"Enter Description",
provider.updateDescription,TextInputType.text,false,null
),
errorWidget(context, provider.bankNumberError),
errorWidget(context, provider.descriptionError),
textControllerWidget(
context,
provider.bankIfscController,
"Enter Bank IFSC",
provider.updateIFSC,TextInputType.text,false,null
provider.amountController,
"Enter Amount",
provider.updateAmount,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.bankIFSCError),
textControllerWidget(
context,
provider.bankAcHolderController,
"Enter Bank Account Holder Name",
provider.updateHolder,TextInputType.text,false,null
errorWidget(context, provider.amountError),
TextWidget(context, "Select Payment Mode"),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<PaymentModes>(
isExpanded: true,
hint: Text(
'Select Payment mode',
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
items:
provider.paymentModes
.map(
(paymenents) =>
DropdownMenuItem<PaymentModes>(
value: paymenents,
child: Text(
paymenents.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectedPayment,
onChanged: (PaymentModes? value) {
if (value != null) {
if (provider.paymentModes.isNotEmpty) {
provider.selectedPayment = value;
print(
"Selected Complaint Type: ${value.name}, ID: ${value.id}",
);
provider.paymentModeId = value.id!;
provider.paymentModeValue = value.name!;
print(
"hfjkshfg" +
provider.paymentModeId.toString(),
);
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(left: 14, right: 14),
),
),
),
],
),
),
errorWidget(context, provider.bankHolderError),
] else if (provider.paymentModeValue == "UPI") ...[
textControllerWidget(
context,
provider.amountController,
"Enter UPI ID",
provider.updateUPI,TextInputType.text,false,null
errorWidget(context, provider.selectPaymentError),
InkResponse(
onTap: () {
_showAttachmentSheet(context);
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: 45,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: AppColors.app_blue,
width: 0.5,
),
),
child: Center(
child: Text(
"File Attachment",
style: TextStyle(
fontFamily: "JakartaMedium",
color: AppColors.app_blue,
),
),
),
),
),
errorWidget(context, provider.UPIError),
if(provider.imagePicked==1 && provider.imagePath!=null)...[
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("${provider.imagePath}",style: TextStyle(
color: AppColors.semi_black,
fontSize: 11,
fontWeight: FontWeight.w600
),),
InkResponse(
onTap: () {
provider.imagePicked = 0;
provider.imagePath = null;
provider.imageFilePath = null;
},
child: SvgPicture.asset("assets/svg/ic_close.svg",width: 15,height: 15,))
],
),
)
],
errorWidget(context, provider.FileError),
if ([
"Cheque",
"RTGS",
"IMPS",
"NEFT",
].contains(provider.paymentModeValue)) ...[
textControllerWidget(
context,
provider.bankNameController,
"Enter Bank Name",
provider.updateBankName,TextInputType.text,false,null
),
errorWidget(context, provider.bankNameError),
textControllerWidget(
context,
provider.bankBranchController,
"Enter Bank Branch",
provider.updateBankBranch,TextInputType.text,false,null
),
errorWidget(context, provider.bankBranchError),
textControllerWidget(
context,
provider.bankAccNumberController,
"Enter Account Number",
provider.updateNumber,TextInputType.number,false,FilteringTextInputFormatter.digitsOnly
),
errorWidget(context, provider.bankNumberError),
textControllerWidget(
context,
provider.bankIfscController,
"Enter Bank IFSC",
provider.updateIFSC,TextInputType.text,false,null
),
errorWidget(context, provider.bankIFSCError),
textControllerWidget(
context,
provider.bankAcHolderController,
"Enter Bank Account Holder Name",
provider.updateHolder,TextInputType.text,false,null
),
errorWidget(context, provider.bankHolderError),
] else if (provider.paymentModeValue == "UPI") ...[
textControllerWidget(
context,
provider.amountController,
"Enter UPI ID",
provider.updateUPI,TextInputType.text,false,null
),
errorWidget(context, provider.UPIError),
],
],
],
),
),
),
),
......
......@@ -39,93 +39,95 @@ class _ComplainthistoryState extends State<Complainthistory> {
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Complaint History"),
backgroundColor: AppColors.scaffold_bg_color,
body: Container(
child: SingleChildScrollView(
child: Column(
children: [
if(provider.complaintList.isNotEmpty)...[
ListView.builder(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: provider.complaintList.length,
itemBuilder: (context, index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("${ provider.complaintList[index].compRegdate}",style: TextStyle(
color: Color(0xFF818181)
),),
Container(
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
...List.generate(4, (index) {
final headings = [
"Technician Name",
"ID",
"Complaint Type",
"Complaint Status",];
final values = [
provider.complaintList[index].techName,
provider.complaintList[index].compId,
provider.complaintList[index].compType,
provider.complaintList[index].compStatus,
];
return Container(
padding: EdgeInsets.symmetric(horizontal: 15,vertical: 15),
child: Row(
children: [
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("${headings[index]}"),
],
body: SafeArea(
child: Container(
child: SingleChildScrollView(
child: Column(
children: [
if(provider.complaintList.isNotEmpty)...[
ListView.builder(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: provider.complaintList.length,
itemBuilder: (context, index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("${ provider.complaintList[index].compRegdate}",style: TextStyle(
color: Color(0xFF818181)
),),
Container(
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
...List.generate(4, (index) {
final headings = [
"Technician Name",
"ID",
"Complaint Type",
"Complaint Status",];
final values = [
provider.complaintList[index].techName,
provider.complaintList[index].compId,
provider.complaintList[index].compType,
provider.complaintList[index].compStatus,
];
return Container(
padding: EdgeInsets.symmetric(horizontal: 15,vertical: 15),
child: Row(
children: [
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("${headings[index]}"),
],
),
),
),
),
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("${values[index]}",
style: TextStyle(
color: Color(0xFF818181)
),),
],
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("${values[index]}",
style: TextStyle(
color: Color(0xFF818181)
),),
],
),
),
),
),
],
),
);
},),
]
],
),
);
},),
]
),
),
),
],
);
},),
]else...[
Emptywidget(context)
]
],
],
);
},),
]else...[
Emptywidget(context)
]
],
),
),
),
),
......
......@@ -20,68 +20,70 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Gen Tracker"),
body: GridView.builder(
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 10),
itemCount: 4,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
),
itemBuilder: (context, index) {
final names = [
"Generator Details",
"Register Complaint",
"Tag Location",
"Tag Generator",
];
final icons = [
"gent_gen_det",
"gent_reg_comp",
"gent_tag_loc",
"gent_tag_den",
];
return InkResponse(
onTap: () {
switch (names[index]) {
case "Generator Details":
Navigator.push(context,MaterialPageRoute(builder: (context) => Scanentergeneratoridscreen(from: "Generator Details",)));
break;
case "Register Complaint":
Navigator.push(context,MaterialPageRoute(builder: (context) => Scanentergeneratoridscreen(from: "Register Complaint",)));
break;
case "Tag Location":
Navigator.push(context, MaterialPageRoute(builder: (context)=>Scanentergeneratoridscreen(from: "Tag Location",)));
break;
case "Tag Generator":
Navigator.push(context, MaterialPageRoute(builder: (context)=>Scanentergeneratoridscreen(from: "Tag Generator",)));
break;
default:
print("111");
break;
}
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(30),
body: SafeArea(
child: GridView.builder(
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 10),
itemCount: 4,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
),
itemBuilder: (context, index) {
final names = [
"Generator Details",
"Register Complaint",
"Tag Location",
"Tag Generator",
];
final icons = [
"gent_gen_det",
"gent_reg_comp",
"gent_tag_loc",
"gent_tag_den",
];
return InkResponse(
onTap: () {
switch (names[index]) {
case "Generator Details":
Navigator.push(context,MaterialPageRoute(builder: (context) => Scanentergeneratoridscreen(from: "Generator Details",)));
break;
case "Register Complaint":
Navigator.push(context,MaterialPageRoute(builder: (context) => Scanentergeneratoridscreen(from: "Register Complaint",)));
break;
case "Tag Location":
Navigator.push(context, MaterialPageRoute(builder: (context)=>Scanentergeneratoridscreen(from: "Tag Location",)));
break;
case "Tag Generator":
Navigator.push(context, MaterialPageRoute(builder: (context)=>Scanentergeneratoridscreen(from: "Tag Generator",)));
break;
default:
print("111");
break;
}
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(30),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/svg/${icons[index]}.svg",
),
SizedBox(height: 10,),
Text(names[index]),
],
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/svg/${icons[index]}.svg",
),
SizedBox(height: 10,),
Text(names[index]),
],
),
),
);
},
);
},
),
),
),
);
......
......@@ -98,140 +98,80 @@ class _GeneratordetailsState extends State<Generatordetails> {
? appbar2(context, "Generator Details",provider.resetForm, sendwidget)
: appbar(context, "Generator Details"),
backgroundColor: AppColors.scaffold_bg_color,
body: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
child: Text(
"Customer Details",
style: TextStyle(color: Color(0xFF818181),
fontFamily: "JakartaMedium"),
body: SafeArea(
child: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
child: Text(
"Customer Details",
style: TextStyle(color: Color(0xFF818181),
fontFamily: "JakartaMedium"),
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: Column(
children: [
Container(
padding: EdgeInsets.symmetric(
vertical: 3,
horizontal: 0,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
SvgPicture.asset(
"assets/svg/se_block_head.svg",
),
SizedBox(width: 5),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(
width:
MediaQuery.of(
context,
).size.width *
0.75,
child: Text(
"${provider.cname}",
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14
),
),
),
SizedBox(
// height:45,
width:
MediaQuery.of(
context,
).size.width *
0.75,
child: Text(
"${provider.aname}",
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
color: Color(
0xFF818181,
),
),
),
),
],
),
],
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(3, (j) {
final textheads = [
"Mobile Number",
"Contact Person Number",
"Mail ID",
];
final textSubheads = [
"${provider.mob1}",
"${provider.mob2}",
"${provider.mail}",
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 6,
horizontal: 0,
),
child: Row(
children: [
Expanded(
flex:1,
child: SizedBox(
Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: Column(
children: [
Container(
padding: EdgeInsets.symmetric(
vertical: 3,
horizontal: 0,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
SvgPicture.asset(
"assets/svg/se_block_head.svg",
),
SizedBox(width: 5),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(
width:
MediaQuery.of(
context,
).size.width *
0.75,
child: Text(
textheads[j].toString(),
"${provider.cname}",
maxLines: 2,
overflow:
TextOverflow.ellipsis,
TextOverflow.ellipsis,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14
),
),
),
),
SizedBox(width: 5,),
Expanded(
flex: 2,
child: SizedBox(
SizedBox(
// height:45,
width:
MediaQuery.of(
context,
).size.width *
0.75,
child: Text(
textSubheads[j],
"${provider.aname}",
maxLines: 2,
overflow:
TextOverflow.ellipsis,
TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
color: Color(
......@@ -240,96 +180,158 @@ class _GeneratordetailsState extends State<Generatordetails> {
),
),
),
),
],
),
);
}),
),
],
),
),
Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
child: Text(
"Generator Details",
style: TextStyle(color: Color(0xFF818181),
fontFamily: "JakartaMedium"),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
],
),
],
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(3, (j) {
final textheads = [
"Mobile Number",
"Contact Person Number",
"Mail ID",
];
final textSubheads = [
"${provider.mob1}",
"${provider.mob2}",
"${provider.mail}",
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 6,
horizontal: 0,
),
child: Row(
children: [
Expanded(
flex:1,
child: SizedBox(
child: Text(
textheads[j].toString(),
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14
),
),
),
),
SizedBox(width: 5,),
Expanded(
flex: 2,
child: SizedBox(
child: Text(
textSubheads[j],
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
color: Color(
0xFF818181,
),
),
),
),
),
],
),
);
}),
),
],
),
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
child: Text(
"Generator Details",
style: TextStyle(color: Color(0xFF818181),
fontFamily: "JakartaMedium"),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(6, (j) {
final textheads = [
"Gen ID",
"Engine Number",
"Address",
"Product Name",
"Engine Model",
"Date Of Supply",
];
final textSubheads = [
"${provider.genID}",
"${provider.engineNo}",
"${provider.address}",
"${provider.spname}",
"${provider.emodel}",
"${provider.dateOfEngineSale}",
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 6,
horizontal: 0,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
flex:1,
child: Text(textheads[j].toString(),style: TextStyle(
fontSize: 14,
fontFamily: "JakartaMedium"
),),),
SizedBox(width: 5,),
Expanded(
flex:2,
child: SizedBox(
child: Text(
textSubheads[j],
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(6, (j) {
final textheads = [
"Gen ID",
"Engine Number",
"Address",
"Product Name",
"Engine Model",
"Date Of Supply",
];
final textSubheads = [
"${provider.genID}",
"${provider.engineNo}",
"${provider.address}",
"${provider.spname}",
"${provider.emodel}",
"${provider.dateOfEngineSale}",
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 6,
horizontal: 0,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
flex:1,
child: Text(textheads[j].toString(),style: TextStyle(
fontSize: 14,
color: Color(
0xFF818181,
fontFamily: "JakartaMedium"
),),),
SizedBox(width: 5,),
Expanded(
flex:2,
child: SizedBox(
child: Text(
textSubheads[j],
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
color: Color(
0xFF818181,
),
),
),
),
),
),
],
),
);
}),
],
),
);
}),
),
),
),
SizedBox(height: 75),
],
SizedBox(height: 75),
],
),
),
),
),
......
......@@ -29,582 +29,584 @@ class _RegistercomplaintState extends State<Registercomplaint> {
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Register Complaint"),
body: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 5.0),
Container(
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 25),
Container(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Customer Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181)),
),
),
Container(
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
margin: EdgeInsets.symmetric(
horizontal: 10, vertical: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16)
body: SafeArea(
child: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 5.0),
Container(
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 25),
Container(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Customer Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181)),
),
),
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/se_block_head.svg",
),
),
SizedBox(width: 10),
Expanded(
flex: 9,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text("${provider.cname}",style: TextStyle(
fontFamily: "JakartaMedium"
),),
Text(
"${provider.aname}",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF818181),
),
),
// Text("Gen Pvt. Ltd"),
],
Container(
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
margin: EdgeInsets.symmetric(
horizontal: 10, vertical: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16)
),
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/se_block_head.svg",
),
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(2, (j) {
final textheads = ["Product Name", "Engine ID"];
final textSubheads = [
provider.spname,
provider.engineNo,
];
return Container(
padding: EdgeInsets.symmetric(vertical: 3),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(textheads[j].toString(),style: TextStyle(
fontFamily: "JakartaMedium"
),),
],
),
),
),
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
textSubheads[j].toString(),
style: TextStyle(
color: Color(0xFF818181),
),
),
],
SizedBox(width: 10),
Expanded(
flex: 9,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text("${provider.cname}",style: TextStyle(
fontFamily: "JakartaMedium"
),),
Text(
"${provider.aname}",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF818181),
),
),
),
],
// Text("Gen Pvt. Ltd"),
],
),
),
],
),
);
}),
SizedBox(height: 10.0),
],
),
),
Container(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Complaint Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181)),
),
),
Container(
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
margin: EdgeInsets.symmetric(
horizontal: 10, vertical: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Complaint Type",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<ComplaintTypeList>(
isExpanded: true,
hint: const Row(
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(2, (j) {
final textheads = ["Product Name", "Engine ID"];
final textSubheads = [
provider.spname,
provider.engineNo,
];
return Container(
padding: EdgeInsets.symmetric(vertical: 3),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
'Select Complaint Type',
style: TextStyle(
fontSize: 14,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(textheads[j].toString(),style: TextStyle(
fontFamily: "JakartaMedium"
),),
],
),
),
),
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
textSubheads[j].toString(),
style: TextStyle(
color: Color(0xFF818181),
),
),
],
),
overflow: TextOverflow.ellipsis,
),
),
],
),
items:
provider.complaintTypeDropdown
.map(
(complaintType) =>
DropdownMenuItem<
ComplaintTypeList>(
value: complaintType,
],
),
);
}),
SizedBox(height: 10.0),
],
),
),
Container(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Complaint Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181)),
),
),
Container(
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
margin: EdgeInsets.symmetric(
horizontal: 10, vertical: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Complaint Type",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<ComplaintTypeList>(
isExpanded: true,
hint: const Row(
children: [
Expanded(
child: Text(
complaintType.name ?? '',
style: const TextStyle(
'Select Complaint Type',
style: TextStyle(
fontSize: 14,
),
overflow: TextOverflow
.ellipsis,
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectedComplaintType,
onChanged: (ComplaintTypeList? value) {
if (value != null) {
if (provider
.complaintCategorydropdown
.isNotEmpty) {
provider.selectedComplaintType =
value;
print(
"Selected Complaint Type: ${value
.name}, ID: ${value.id}",
);
provider.selectedType =
value?.name;
provider.selectedTypeId =
value?.id;
print(
"hfjkshfg" +
provider.selectedTypeId
.toString(),
);
],
),
items:
provider.complaintTypeDropdown
.map(
(complaintType) =>
DropdownMenuItem<
ComplaintTypeList>(
value: complaintType,
child: Text(
complaintType.name ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow
.ellipsis,
),
),
)
.toList(),
value: provider.selectedComplaintType,
onChanged: (ComplaintTypeList? value) {
if (value != null) {
if (provider
.complaintCategorydropdown
.isNotEmpty) {
provider.selectedComplaintType =
value;
print(
"Selected Complaint Type: ${value
.name}, ID: ${value.id}",
);
provider.selectedType =
value?.name;
provider.selectedTypeId =
value?.id;
print(
"hfjkshfg" +
provider.selectedTypeId
.toString(),
);
}
}
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
),
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
width: 350,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
width: 350,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty
.all<double>(6),
thumbVisibility:
MaterialStateProperty.all<bool>(
true),
),
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty
.all<double>(6),
thumbVisibility:
MaterialStateProperty.all<bool>(
true),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(
left: 14, right: 14),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(
left: 14, right: 14),
),
),
),
],
],
),
),
),
SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Complaint Category",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<
ComplaintCategoryList>(
isExpanded: true,
hint: const Row(
children: [
Expanded(
child: Text(
'Select Complaint Category',
style: TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
],
),
items:
provider.complaintCategorydropdown
.map(
(Category) =>
DropdownMenuItem<
ComplaintCategoryList
>(
value: Category,
SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Complaint Category",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<
ComplaintCategoryList>(
isExpanded: true,
hint: const Row(
children: [
Expanded(
child: Text(
Category.name ?? "",
style: const TextStyle(
'Select Complaint Category',
style: TextStyle(
fontSize: 14,
),
overflow: TextOverflow
.ellipsis,
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectedCategoryType,
onChanged: (
ComplaintCategoryList? value) {
if (provider
.complaintCategorydropdown
.isNotEmpty) {
provider.selectedCategoryType =
value;
provider.selectedCategory =
value?.name;
provider.selectedCategoryId =
value?.id;
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
],
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
items:
provider.complaintCategorydropdown
.map(
(Category) =>
DropdownMenuItem<
ComplaintCategoryList
>(
value: Category,
child: Text(
Category.name ?? "",
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow
.ellipsis,
),
),
)
.toList(),
value: provider.selectedCategoryType,
onChanged: (
ComplaintCategoryList? value) {
if (provider
.complaintCategorydropdown
.isNotEmpty) {
provider.selectedCategoryType =
value;
provider.selectedCategory =
value?.name;
provider.selectedCategoryId =
value?.id;
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
),
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
width: 350,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness:
MaterialStateProperty.all<double>(
6),
thumbVisibility:
MaterialStateProperty.all<bool>(
true),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
width: 350,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness:
MaterialStateProperty.all<double>(
6),
thumbVisibility:
MaterialStateProperty.all<bool>(
true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(
left: 14, right: 14),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(
left: 14, right: 14),
),
),
),
],
],
),
),
),
SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Select Description",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<
ComplaintDescriptionList>(
isExpanded: true,
hint: const Row(
children: [
Expanded(
child: Text(
'Select Description',
style: TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
),
],
),
items:
provider.complaintDescriptionDropdown
.map(
(Description) =>
DropdownMenuItem<
ComplaintDescriptionList
>(
value: Description,
SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Select Description",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline(
child: Row(
children: [
Expanded(
child: DropdownButton2<
ComplaintDescriptionList>(
isExpanded: true,
hint: const Row(
children: [
Expanded(
child: Text(
Description.name ?? "",
style: const TextStyle(
'Select Description',
style: TextStyle(
fontSize: 14,
),
overflow: TextOverflow
.ellipsis,
overflow: TextOverflow.ellipsis,
),
),
)
.toList(),
value: provider.selectedDescriptionType,
onChanged: (
ComplaintDescriptionList? value) {
if (provider
.complaintDescriptionDropdown
.isNotEmpty) {
provider.selectedDescriptionType =
value;
provider.selectedDescription =
value?.name;
provider.selectedDescriptionId =
value?.id;
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
],
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
items:
provider.complaintDescriptionDropdown
.map(
(Description) =>
DropdownMenuItem<
ComplaintDescriptionList
>(
value: Description,
child: Text(
Description.name ?? "",
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow
.ellipsis,
),
),
)
.toList(),
value: provider.selectedDescriptionType,
onChanged: (
ComplaintDescriptionList? value) {
if (provider
.complaintDescriptionDropdown
.isNotEmpty) {
provider.selectedDescriptionType =
value;
provider.selectedDescription =
value?.name;
provider.selectedDescriptionId =
value?.id;
}
},
buttonStyleData: ButtonStyleData(
height: 50,
width: 160,
padding: const EdgeInsets.only(
left: 14,
right: 14,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
),
),
),
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
width: 350,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
iconStyleData: IconStyleData(
icon: SvgPicture.asset("assets/svg/arrow_dropdown.svg",height: 25,width: 20,),
iconSize: 12,
iconEnabledColor: Color(0xFF2D2D2D),
iconDisabledColor: Colors.grey,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty
.all<double>(
6,
dropdownStyleData: DropdownStyleData(
maxHeight: 200,
width: 350,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
14),
color: AppColors.text_field_color,
),
scrollbarTheme: ScrollbarThemeData(
radius: const Radius.circular(15),
thickness: MaterialStateProperty
.all<double>(
6,
),
thumbVisibility:
MaterialStateProperty.all<bool>(
true),
),
thumbVisibility:
MaterialStateProperty.all<bool>(
true),
),
),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(
left: 14, right: 14),
menuItemStyleData: const MenuItemStyleData(
height: 40,
padding: EdgeInsets.only(
left: 14, right: 14),
),
),
),
),
],
],
),
),
),
SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Duration",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius:
BorderRadius.circular(14),
SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Duration",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
child: TextFormField(
controller:
running_hrs,
keyboardType:
TextInputType.text,
decoration: InputDecoration(
hintText:
"Enter Running Number",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14
Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius:
BorderRadius.circular(14),
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
child: TextFormField(
controller:
running_hrs,
keyboardType:
TextInputType.text,
decoration: InputDecoration(
hintText:
"Enter Running Number",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14
),
enabledBorder:
InputBorder.none,
focusedBorder:
InputBorder.none,
),
enabledBorder:
InputBorder.none,
focusedBorder:
InputBorder.none,
),
),
),
),
SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Message",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
Container(
height: 150,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius:
BorderRadius.circular(14),
SizedBox(height: 10.0),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Message",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
child: TextFormField(
maxLines: 6,
controller:
Complaint_Note,
keyboardType:
TextInputType.text,
decoration: InputDecoration(
hintText:
"Enter Message",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14
Container(
height: 150,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius:
BorderRadius.circular(14),
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
child: TextFormField(
maxLines: 6,
controller:
Complaint_Note,
keyboardType:
TextInputType.text,
decoration: InputDecoration(
hintText:
"Enter Message",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14
),
enabledBorder:
InputBorder.none,
focusedBorder:
InputBorder.none,
),
enabledBorder:
InputBorder.none,
focusedBorder:
InputBorder.none,
),
),
),
),
],
],
),
),
),
SizedBox(height: 65.0),
],
SizedBox(height: 65.0),
],
),
),
),
],
],
),
),
),
),
......
......@@ -52,64 +52,66 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "${widget.from}"),
body: Container(
decoration: BoxDecoration(color: Colors.black),
child: Column(
children: [
Spacer(),
SizedBox(
height: 250,
child: QRView(
key: provider.scannerKey,
onQRViewCreated: (p0) {
provider.onQRViewCreated(p0, provider.title, context);
},
formatsAllowed: [BarcodeFormat.qrcode],
cameraFacing: CameraFacing.back,
overlay: QrScannerOverlayShape(
borderColor: AppColors.app_blue,
borderRadius: 20,
borderLength: 60,
borderWidth: 10,
cutOutSize: 250.0,
body: SafeArea(
child: Container(
decoration: BoxDecoration(color: Colors.black),
child: Column(
children: [
Spacer(),
SizedBox(
height: 250,
child: QRView(
key: provider.scannerKey,
onQRViewCreated: (p0) {
provider.onQRViewCreated(p0, provider.title, context);
},
formatsAllowed: [BarcodeFormat.qrcode],
cameraFacing: CameraFacing.back,
overlay: QrScannerOverlayShape(
borderColor: AppColors.app_blue,
borderRadius: 20,
borderLength: 60,
borderWidth: 10,
cutOutSize: 250.0,
),
),
),
),
SizedBox(height: 25),
Text(
"Scan QR",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18,fontFamily: "JakartaMedium", color: Colors.white),
),
Text(
provider.subTitle,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: Colors.white),
),
Spacer(),
Text(
"or",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18,
fontFamily: "JakartaMedium",color: Colors.white),
),
InkResponse(
onTap: () async {
_showgenIdBottomSheet(context);
},
child: Text(
"Tap to Enter Generator ID",
SizedBox(height: 25),
Text(
"Scan QR",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18,fontFamily: "JakartaMedium", color: Colors.white),
),
Text(
provider.subTitle,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: Colors.white),
),
Spacer(),
Text(
"or",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18,
fontFamily: "JakartaMedium",
color: AppColors.app_blue),
fontFamily: "JakartaMedium",color: Colors.white),
),
),
SizedBox(height: 50),
],
InkResponse(
onTap: () async {
_showgenIdBottomSheet(context);
},
child: Text(
"Tap to Enter Generator ID",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18,
fontFamily: "JakartaMedium",
color: AppColors.app_blue),
),
),
SizedBox(height: 50),
],
),
),
),
),
......
......@@ -57,418 +57,420 @@ class _GeneratorPartDetailsScreenState
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Gen Inventory"),
body: Container(
child: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 15, bottom: 15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Container(
padding: EdgeInsets.only(
left: 10,
right: 10,
top: 15,
),
child: Row(
children: [
Expanded(
child: Text(
"${provider.partData.prodName}",
style: TextStyle(
color: AppColors.app_blue,
fontFamily: "JakartaMedium",
body: SafeArea(
child: Container(
child: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 15, bottom: 15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Container(
padding: EdgeInsets.only(
left: 10,
right: 10,
top: 15,
),
child: Row(
children: [
Expanded(
child: Text(
"${provider.partData.prodName}",
style: TextStyle(
color: AppColors.app_blue,
fontFamily: "JakartaMedium",
),
),
),
),
],
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(16),
],
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
RichText(
text: TextSpan(
children: [
TextSpan(
text:
"${provider.partData.remainingQuantity}",
style: TextStyle(
color: AppColors.app_blue,
fontSize: 30,
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(16),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
RichText(
text: TextSpan(
children: [
TextSpan(
text:
"${provider.partData.remainingQuantity}",
style: TextStyle(
color: AppColors.app_blue,
fontSize: 30,
),
),
),
],
],
),
),
),
Text(
"Remaining Quantity",
style: TextStyle(
color: Color(0xFF818181),
Text(
"Remaining Quantity",
style: TextStyle(
color: Color(0xFF818181),
),
),
),
],
],
),
),
),
),
],
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 15,
],
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: InkResponse(
onTap: () {
_showStockIssueBottomSheet(
context,
"Issue",
);
},
child: Container(
height: 45,
decoration: BoxDecoration(
color: Color(0xFFFFEFEF),
border: Border.all(
color: Color(0xFFED3424),
width: 0.5,
),
borderRadius: BorderRadius.circular(12),
),
child: Center(
child: Text(
"- Issue",
style: TextStyle(
Container(
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 15,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: InkResponse(
onTap: () {
_showStockIssueBottomSheet(
context,
"Issue",
);
},
child: Container(
height: 45,
decoration: BoxDecoration(
color: Color(0xFFFFEFEF),
border: Border.all(
color: Color(0xFFED3424),
width: 0.5,
),
borderRadius: BorderRadius.circular(12),
),
child: Center(
child: Text(
"- Issue",
style: TextStyle(
color: Color(0xFFED3424),
),
),
),
),
),
),
),
SizedBox(width: 10),
Expanded(
child: InkResponse(
onTap: () {
_showStockIssueBottomSheet(
context,
"Recieve",
);
},
child: Container(
height: 45,
decoration: BoxDecoration(
color: Color(0xFFE7FFE5),
border: Border.all(
color: Color(0xFF0D9C00),
width: 0.5,
),
borderRadius: BorderRadius.circular(12),
),
child: Center(
child: Text(
"+ Recieve",
style: TextStyle(
SizedBox(width: 10),
Expanded(
child: InkResponse(
onTap: () {
_showStockIssueBottomSheet(
context,
"Recieve",
);
},
child: Container(
height: 45,
decoration: BoxDecoration(
color: Color(0xFFE7FFE5),
border: Border.all(
color: Color(0xFF0D9C00),
width: 0.5,
),
borderRadius: BorderRadius.circular(12),
),
child: Center(
child: Text(
"+ Recieve",
style: TextStyle(
color: Color(0xFF0D9C00),
),
),
),
),
),
),
),
],
],
),
),
),
],
),
),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Product Details",
style: TextStyle(
color: Color(0xFF818181),
fontFamily: "JakartaMedium",
],
),
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Product Details",
style: TextStyle(
color: Color(0xFF818181),
fontFamily: "JakartaMedium",
),
),
),
child: Column(
children: List.generate(3, (index) {
final headings = [
"Product Name",
"Product ID",
"Project",
];
final values = [
provider.partData.prodName,
provider.partData.id,
provider.partData.project,
];
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Text(
"${headings[index]}",
style: TextStyle(
fontFamily: "JakartaMedium",
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: List.generate(3, (index) {
final headings = [
"Product Name",
"Product ID",
"Project",
];
final values = [
provider.partData.prodName,
provider.partData.id,
provider.partData.project,
];
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Text(
"${headings[index]}",
style: TextStyle(
fontFamily: "JakartaMedium",
),
),
),
),
Expanded(
flex: 2,
child: Text(
"${values[index]}",
style: TextStyle(color: Color(0xFF818181)),
Expanded(
flex: 2,
child: Text(
"${values[index]}",
style: TextStyle(color: Color(0xFF818181)),
),
),
),
],
),
);
}),
),
),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Vendor Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181),
],
),
);
}),
),
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Vendor Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181),
),
),
),
child: Column(
children: List.generate(2, (index) {
final headings = ["Vendor 1", "Vendor 2"];
final values = [
provider.partData.vendor1,
provider.partData.vendor2,
];
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Text(
"${headings[index]}",
style: TextStyle(
fontFamily: "JakartaMedium",
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: List.generate(2, (index) {
final headings = ["Vendor 1", "Vendor 2"];
final values = [
provider.partData.vendor1,
provider.partData.vendor2,
];
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Text(
"${headings[index]}",
style: TextStyle(
fontFamily: "JakartaMedium",
),
),
),
),
Expanded(
flex: 2,
child: Text(
"${values[index]}",
style: TextStyle(color: Color(0xFF818181)),
Expanded(
flex: 2,
child: Text(
"${values[index]}",
style: TextStyle(color: Color(0xFF818181)),
),
),
),
],
),
);
}),
),
),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Other Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181),
],
),
);
}),
),
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Other Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181),
),
),
),
child: Column(
children: List.generate(3, (index) {
final headings = ["Sub Group", "Units", "MSL"];
final values = [
provider.partData.subGroup,
provider.partData.units,
provider.partData.msl,
];
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Text(
"${headings[index]}",
style: TextStyle(
fontFamily: "JakartaMedium",
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: List.generate(3, (index) {
final headings = ["Sub Group", "Units", "MSL"];
final values = [
provider.partData.subGroup,
provider.partData.units,
provider.partData.msl,
];
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Text(
"${headings[index]}",
style: TextStyle(
fontFamily: "JakartaMedium",
),
),
),
),
Expanded(
flex: 2,
child: Text(
"${values[index]}",
style: TextStyle(color: Color(0xFF818181)),
Expanded(
flex: 2,
child: Text(
"${values[index]}",
style: TextStyle(color: Color(0xFF818181)),
),
),
),
],
),
);
}),
),
),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Description",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181),
],
),
);
}),
),
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Description",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181),
),
),
),
child: Container(
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: Row(
children: [
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"Description",
style: TextStyle(
fontFamily: "JakartaMedium",
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
child: Row(
children: [
Expanded(
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"Description",
style: TextStyle(
fontFamily: "JakartaMedium",
),
),
),
Text(
"${provider.partData.prodDesc}",
style: TextStyle(
color: Color(0xFF818181),
Text(
"${provider.partData.prodDesc}",
style: TextStyle(
color: Color(0xFF818181),
),
),
),
],
],
),
),
),
),
],
],
),
),
),
),
SizedBox(height: 150),
],
SizedBox(height: 150),
],
),
),
),
),
......
......@@ -41,65 +41,67 @@ class _InventoryScreenState extends State<InventoryScreen> {
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Gen Inventory"),
body: Container(
decoration: BoxDecoration(color: Colors.black),
child: Column(
children: [
Spacer(),
Container(
height: 250,
child: QRView(
key: provider.scannerKey,
onQRViewCreated: (p0) {
provider.onQRViewCreated(p0, "inventory", context);
},
formatsAllowed: [BarcodeFormat.qrcode],
cameraFacing: CameraFacing.back,
overlay: QrScannerOverlayShape(
borderColor: AppColors.app_blue,
borderRadius: 20,
borderLength: 60,
borderWidth: 10,
cutOutSize: 250.0,
body: SafeArea(
child: Container(
decoration: BoxDecoration(color: Colors.black),
child: Column(
children: [
Spacer(),
Container(
height: 250,
child: QRView(
key: provider.scannerKey,
onQRViewCreated: (p0) {
provider.onQRViewCreated(p0, "inventory", context);
},
formatsAllowed: [BarcodeFormat.qrcode],
cameraFacing: CameraFacing.back,
overlay: QrScannerOverlayShape(
borderColor: AppColors.app_blue,
borderRadius: 20,
borderLength: 60,
borderWidth: 10,
cutOutSize: 250.0,
),
),
),
),
SizedBox(height: 25),
Text(
"Scan QR",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18,fontFamily: "JakartaMedium", color: Colors.white),
),
Text(
"to open Inventory",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: Colors.white),
),
Spacer(),
Text(
"or",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18,
fontFamily: "JakartaMedium",color: Colors.white),
),
InkResponse(
onTap: () async {
_showPartIdBottomSheet(context);
},
child: Text(
"Tap To Enter Part ID",
SizedBox(height: 25),
Text(
"Scan QR",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17,
fontFamily: "JakartaMedium",
color: AppColors.app_blue),
style: TextStyle(fontSize: 18,fontFamily: "JakartaMedium", color: Colors.white),
),
),
SizedBox(height: 50),
],
Text(
"to open Inventory",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: Colors.white),
),
Spacer(),
Text(
"or",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18,
fontFamily: "JakartaMedium",color: Colors.white),
),
InkResponse(
onTap: () async {
_showPartIdBottomSheet(context);
},
child: Text(
"Tap To Enter Part ID",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17,
fontFamily: "JakartaMedium",
color: AppColors.app_blue),
),
),
SizedBox(height: 50),
],
),
),
),
),
......
......@@ -27,194 +27,196 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Accounts"),
backgroundColor: AppColors.scaffold_bg_color,
body: Container(
decoration: BoxDecoration(color: Colors.white),
child: Column(
children: [
const SizedBox(height: 10),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Search Account",
style: TextStyle(color: Color(0xFF2d2d2d)),
),
),
SizedBox(height: 5),
Container(
height: 48,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(16),
border:
searchFocusNode.hasFocus
? Border.all(color: AppColors.app_blue, width: 0.5)
: null,
body: SafeArea(
child: Container(
decoration: BoxDecoration(color: Colors.white),
child: Column(
children: [
const SizedBox(height: 10),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Search Account",
style: TextStyle(color: Color(0xFF2d2d2d)),
),
),
// alignment: Alignment.center,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Padding(
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 15, 0),
child: TextField(
controller: _searchController,
keyboardType: TextInputType.text,
focusNode: searchFocusNode,
textCapitalization: TextCapitalization.characters,
style: TextStyle(fontSize: 14),
onChanged: (value) {
if (value.length >= 3) {
provider.AccountSuggestionAPI(context, value);
}
},
onTapOutside: (event) {
// Handle onTapOutside
FocusScope.of(context).unfocus();
},
decoration: InputDecoration(
isDense: true,
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFF818181),
fontSize: 14,
SizedBox(height: 5),
Container(
height: 48,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(16),
border:
searchFocusNode.hasFocus
? Border.all(color: AppColors.app_blue, width: 0.5)
: null,
),
// alignment: Alignment.center,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Padding(
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 15, 0),
child: TextField(
controller: _searchController,
keyboardType: TextInputType.text,
focusNode: searchFocusNode,
textCapitalization: TextCapitalization.characters,
style: TextStyle(fontSize: 14),
onChanged: (value) {
if (value.length >= 3) {
provider.AccountSuggestionAPI(context, value);
}
},
onTapOutside: (event) {
// Handle onTapOutside
FocusScope.of(context).unfocus();
},
decoration: InputDecoration(
isDense: true,
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFF818181),
fontSize: 14,
),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
hintText: 'Enter Account Name',
),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
hintText: 'Enter Account Name',
),
),
),
),
Container(
margin: EdgeInsets.only(top: 5.0, left: 25.0),
alignment: Alignment.topLeft,
child: Text(
"Note: Enter Minimum 3 Characters",
style: TextStyle(fontWeight: FontWeight.w300),
Container(
margin: EdgeInsets.only(top: 5.0, left: 25.0),
alignment: Alignment.topLeft,
child: Text(
"Note: Enter Minimum 3 Characters",
style: TextStyle(fontWeight: FontWeight.w300),
),
),
),
Expanded(
child: SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: Container(
child: ListView.builder(
itemCount: provider.accountList!.length,
padding: const EdgeInsets.all(5),
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
var accountList = provider.accountList;
if (accountList!.length > 0) {
return InkWell(
onTap: () {
// if(actname == "pendingComplaints"&&status=="Open"){
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Paymentdetails(
accountName: "Account",
name: accountList![index].accountName,
genId: "",
referenceID:
accountList![index].accountId,
),
),
);
// }
},
child: SizedBox(
child: Container(
width:
MediaQuery.of(context).size.width * 0.9,
padding: EdgeInsets.fromLTRB(0, 5, 0, 10),
child: Row(
children: [
Expanded(
flex: 1,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
Expanded(
child: SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: Container(
child: ListView.builder(
itemCount: provider.accountList!.length,
padding: const EdgeInsets.all(5),
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
var accountList = provider.accountList;
if (accountList!.length > 0) {
return InkWell(
onTap: () {
// if(actname == "pendingComplaints"&&status=="Open"){
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Paymentdetails(
accountName: "Account",
name: accountList![index].accountName,
genId: "",
referenceID:
accountList![index].accountId,
),
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(
8,
),
);
// }
},
child: SizedBox(
child: Container(
width:
MediaQuery.of(context).size.width * 0.9,
padding: EdgeInsets.fromLTRB(0, 5, 0, 10),
child: Row(
children: [
Expanded(
flex: 1,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(
8,
),
),
child: SvgPicture.asset(
width: 30,
height: 30,
"assets/svg/se_block_head.svg",
),
),
child: SvgPicture.asset(
width: 30,
height: 30,
"assets/svg/se_block_head.svg",
),
),
),
SizedBox(width: 10,),
Expanded(
flex: 5,
child: Text(
"${accountList![index].accountName}",
textAlign: TextAlign.start,
maxLines: 3,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: AppColors.semi_black
SizedBox(width: 10,),
Expanded(
flex: 5,
child: Text(
"${accountList![index].accountName}",
textAlign: TextAlign.start,
maxLines: 3,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: AppColors.semi_black
),
),
),
),
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
),
),
),
],
),
),
),
);
} else {
return Expanded(
child: SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height,
// Set width to fill parent width
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0),
],
),
),
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
),
);
} else {
return Expanded(
child: SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: Container(
child: Align(
alignment: Alignment.center,
child: Text(
"No Data Available",
style: TextStyle(
fontWeight: FontWeight.bold,
overflow: TextOverflow.ellipsis,
width: double.infinity,
height: MediaQuery.of(context).size.height,
// Set width to fill parent width
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0),
),
),
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
child: Container(
child: Align(
alignment: Alignment.center,
child: Text(
"No Data Available",
style: TextStyle(
fontWeight: FontWeight.bold,
overflow: TextOverflow.ellipsis,
),
),
),
),
),
),
),
);
}
},
);
}
},
),
),
),
),
),
],
],
),
),
),
),
......
......@@ -40,89 +40,91 @@ class _FollowupdetailsState extends State<Followupdetails> {
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Follow Up Details"),
backgroundColor: AppColors.scaffold_bg_color,
body: Container(
child: ListView.builder(
itemCount: provider.followUpList.length,
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(9, (j) {
final textheads = [
"Employee Name",
"Date",
"Type",
"In Time",
"Out Time",
"Running Hours",
"FSR File",
"FSR Number",
"Feedback",
];
final textSubheads = [
followups[index].ename??"-",
followups[index].date??"-",
followups[index].type??"-",
followups[index].time??"-",
followups[index].outTime??"-",
followups[index].runningHrs??"-",
followups[index].fsrExt??"-",
followups[index].fsrNo??"-",
followups[index].feedback??"-",
];
return Container(
padding: EdgeInsets.symmetric(vertical: 3),
child: Container(
padding: EdgeInsets.symmetric(
vertical: 3,
horizontal: 0,
),
child: Row(
children: [
Expanded(child: Text(textheads[j].toString())),
Expanded(
child: InkResponse(
onTap: () {
if (textheads[j] == "FSR File") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Fileviewer(
fileName: followups[index].fsrExt!,
fileUrl: "https://erp.gengroup.in/files_genservices/tech_fsr_report/${followups[index].fsrExt!}",
),
),
);
}
},
child: Text(
textSubheads[j]==""?"-":textSubheads[j],
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color:
textheads[j] == "FSR File"
? AppColors.app_blue
: Color(0xFF818181),
body: SafeArea(
child: Container(
child: ListView.builder(
itemCount: provider.followUpList.length,
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(9, (j) {
final textheads = [
"Employee Name",
"Date",
"Type",
"In Time",
"Out Time",
"Running Hours",
"FSR File",
"FSR Number",
"Feedback",
];
final textSubheads = [
followups[index].ename??"-",
followups[index].date??"-",
followups[index].type??"-",
followups[index].time??"-",
followups[index].outTime??"-",
followups[index].runningHrs??"-",
followups[index].fsrExt??"-",
followups[index].fsrNo??"-",
followups[index].feedback??"-",
];
return Container(
padding: EdgeInsets.symmetric(vertical: 3),
child: Container(
padding: EdgeInsets.symmetric(
vertical: 3,
horizontal: 0,
),
child: Row(
children: [
Expanded(child: Text(textheads[j].toString())),
Expanded(
child: InkResponse(
onTap: () {
if (textheads[j] == "FSR File") {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Fileviewer(
fileName: followups[index].fsrExt!,
fileUrl: "https://erp.gengroup.in/files_genservices/tech_fsr_report/${followups[index].fsrExt!}",
),
),
);
}
},
child: Text(
textSubheads[j]==""?"-":textSubheads[j],
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color:
textheads[j] == "FSR File"
? AppColors.app_blue
: Color(0xFF818181),
),
),
),
),
),
],
],
),
),
),
);
}),
),
);
},
);
}),
),
);
},
),
),
),
),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment