Commit 14d01f4d authored by Sai Srinivas's avatar Sai Srinivas
Browse files

31-07-2025 By Sai Srinivas

Finance Module
parent 29665037
...@@ -95,7 +95,7 @@ class _PaymentlistpaymentrequisitionState ...@@ -95,7 +95,7 @@ class _PaymentlistpaymentrequisitionState
final requestLists = provider.paymentsList; final requestLists = provider.paymentsList;
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar2( appBar: appbar2New(
context, context,
widget.pageTitleName, widget.pageTitleName,
provider.resetForm, provider.resetForm,
...@@ -140,6 +140,7 @@ class _PaymentlistpaymentrequisitionState ...@@ -140,6 +140,7 @@ class _PaymentlistpaymentrequisitionState
), ),
], ],
), ),
0xFFFFFFFF
), ),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: body:
...@@ -161,241 +162,117 @@ class _PaymentlistpaymentrequisitionState ...@@ -161,241 +162,117 @@ class _PaymentlistpaymentrequisitionState
shrinkWrap: true, shrinkWrap: true,
physics: AlwaysScrollableScrollPhysics(), physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return InkResponse(
padding: EdgeInsets.symmetric( onTap: () async {
horizontal: 10, var res = await Navigator.push(
vertical: 10, context,
), MaterialPageRoute(
margin: EdgeInsets.symmetric( builder:
horizontal: 10, (context) =>
vertical: 10, Paymentdetailspaymentrequisition(
), pageName:
decoration: BoxDecoration( widget.pageTitleName,
color: Colors.white, paymentRequestId:
borderRadius: BorderRadius.circular(16), requestLists[index].id,
),
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]
.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,
),
),
],
),
), ),
), settings: RouteSettings(
// Expanded( name:
// flex: 2, "Paymentdetailspaymentrequisition",
// 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 = [ if (routeSettingName ==
"To Account", "Paymentdetailspaymentrequisition") {
"Attachment", print("pld");
"Request Mode",
"Payment Date", provider.paymentsListAPI(context, '', '');
"Note", }
]; },
child: Container(
final subHeadings = [ padding: EdgeInsets.symmetric(
requestLists[index].payAccount, horizontal: 10,
"View", vertical: 10,
requestLists[index].requestMode, ),
margin: EdgeInsets.symmetric(
// requestLists[index].attachmentDirFilePath horizontal: 10,
requestLists[index].paymentDate, vertical: 5,
requestLists[index].description, ),
]; decoration: BoxDecoration(
if (headings[j] == "Attachment" && color: Colors.white,
requestLists[index] borderRadius: BorderRadius.circular(16),
.attachmentViewFileName == ),
"") { child: Column(
return SizedBox.shrink(); children: [
} Row(
return Container( children: [
padding: EdgeInsets.symmetric(vertical: 5), Expanded(
child: Row( flex: 1,
crossAxisAlignment: child: Container(
CrossAxisAlignment.start, height: 50,
children: [ width: 50,
Expanded( padding: EdgeInsets.all(3.0),
child: Text( decoration: BoxDecoration(
headings[j], color: AppColors.requested_bg_color,
style: TextStyle( shape: BoxShape.circle
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.semi_black,
),
), ),
), child: SvgPicture.asset(
Expanded( "assets/svg/finance/rupee_ic.svg",
child: InkResponse( fit: BoxFit.scaleDown,
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,
),
),
), ),
), ),
], ),
), SizedBox(width: 10),
); Expanded(
}), flex: 4,
InkResponse( child: SizedBox(
onTap: () async { child: Column(
var res = await Navigator.push( crossAxisAlignment:
context, CrossAxisAlignment.start,
MaterialPageRoute( children: [
builder: Text(
(context) => requestLists[index]
Paymentdetailspaymentrequisition( .receipientAccount!,
pageName: maxLines: 1,
widget.pageTitleName, overflow: TextOverflow.ellipsis,
paymentRequestId: style: TextStyle(
requestLists[index].id, fontFamily: "JakartaRegular",
fontSize: 14,
color: AppColors.semi_black,
), ),
settings: RouteSettings( ),
name: Text(
"Paymentdetailspaymentrequisition", "${requestLists[index].paymentDate}",
style: TextStyle(
fontFamily: "JakartaRegular",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
), ),
), ),
); SizedBox(width: 10),
if (routeSettingName == Expanded(
"Paymentdetailspaymentrequisition") { flex: 3,
print("pld"); child: Text(
"₹${requestLists[index].amount}",
provider.paymentsListAPI(context, '', ''); maxLines: 1,
} textAlign: TextAlign.right,
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 14, fontSize: 14,
color: AppColors.app_blue, color: AppColors.app_blue,
), ),
), ),
SizedBox(width: 5), ),
SvgPicture.asset(
"assets/svg/next_button.svg", ],
),
],
),
), ),
),
],
],
),
), ),
); );
}, },
......
...@@ -79,7 +79,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -79,7 +79,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
final requestLists = provider.receiptsList; final requestLists = provider.receiptsList;
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar2( appBar: appbar2New(
context, context,
widget.pageTitleName, widget.pageTitleName,
provider.resetForm, provider.resetForm,
...@@ -124,6 +124,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -124,6 +124,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
), ),
], ],
), ),
0xFFFFFFFF
), ),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: body:
...@@ -143,216 +144,113 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -143,216 +144,113 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
shrinkWrap: true, shrinkWrap: true,
physics: AlwaysScrollableScrollPhysics(), physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return InkResponse(
padding: EdgeInsets.symmetric( onTap: () async {
horizontal: 10, var res = await Navigator.push(
vertical: 10, context,
), MaterialPageRoute(
margin: EdgeInsets.symmetric( builder:
horizontal: 10, (context) => Paymentreceiptdetails(
vertical: 10, pageName: widget.pageTitleName,
), paymentRequestId:
decoration: BoxDecoration( requestLists[index].id,
color: Colors.white, ),
borderRadius: BorderRadius.circular(16), settings: RouteSettings(
), name: "Paymentreceiptdetails",
child: Column( ),
children: [ ),
Row( );
children: [ if (routeSettingName ==
Expanded( "Paymentreceiptdetails") {
flex: 1, debugPrint("prd");
child: Container( provider.paymentsListAPI(context, '', '');
height: 50, }
width: 35, // if (res == true) {
padding: EdgeInsets.all(8.0), // provider.paymentsListAPI(context, '', '');
decoration: BoxDecoration( // }
color: Color(0xFFFFF3CE), },
borderRadius: BorderRadius.circular( child: Container(
8, padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
Row(
children: [
Expanded(
flex: 1,
child: Container(
height: 50,
width: 50,
padding: EdgeInsets.all(3.0),
decoration: BoxDecoration(
color: AppColors.requested_bg_color,
shape: BoxShape.circle
),
child: SvgPicture.asset(
"assets/svg/finance/rupee_ic.svg",
fit: BoxFit.scaleDown,
), ),
),
child: SvgPicture.asset(
"assets/svg/fin_ic.svg",
), ),
), ),
), SizedBox(width: 10),
SizedBox(width: 10), Expanded(
Expanded( flex: 4,
flex: 4, child: SizedBox(
child: SizedBox( child: Column(
child: Column( crossAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: [
children: [ Text(
Text( requestLists[index]
requestLists[index] .receipientAccount!,
.receipientAccount!, maxLines: 1,
style: TextStyle( overflow: TextOverflow.ellipsis,
fontFamily: "JakartaMedium", style: TextStyle(
fontSize: 14, fontFamily: "JakartaRegular",
color: AppColors.semi_black, fontSize: 14,
), color: AppColors.semi_black,
), ),
Text(
"₹${requestLists[index].amount}",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
), ),
), Text(
], "${requestLists[index].receiptDate}",
), style: TextStyle(
), fontFamily: "JakartaRegular",
), fontSize: 14,
], color: AppColors.grey_semi,
), ),
Divider(
thickness: 0.5,
color: Color(0xFFD7D7D7),
),
...List.generate(5, (j) {
final headings = [
"Receipt Account",
"Attachment",
"Request Mode",
"Receipt Date",
"Note",
];
final subHeadings = [
requestLists[index].receipientAccount,
"View",
requestLists[index].requestMode,
// requestLists[index].attachmentDirFilePath
requestLists[index].receiptDate,
requestLists[index].description,
];
if (headings[j] == "Attachment" &&
requestLists[index]
.attachmentViewFileName ==
"") {
return SizedBox.shrink();
}
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 {
var res = await Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Paymentreceiptdetails(
pageName: widget.pageTitleName,
paymentRequestId:
requestLists[index].id,
),
settings: RouteSettings(
name: "Paymentreceiptdetails",
),
), ),
); SizedBox(width: 10),
if (routeSettingName == Expanded(
"Paymentreceiptdetails") { flex: 3,
debugPrint("prd"); child: Text(
provider.paymentsListAPI(context, '', ''); "₹${requestLists[index].amount}",
} textAlign: TextAlign.right,
// if (res == true) { maxLines: 1,
// provider.paymentsListAPI(context, '', '');
// }
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"View Details",
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 14, fontSize: 14,
color: AppColors.app_blue, color: AppColors.app_blue,
), ),
), ),
SizedBox(width: 5), ),
SvgPicture.asset( ],
"assets/svg/next_button.svg",
),
],
),
), ),
), ],
], ),
), ),
); );
}, },
......
...@@ -225,6 +225,10 @@ class _SplashState extends State<Splash> { ...@@ -225,6 +225,10 @@ class _SplashState extends State<Splash> {
); );
spalshProvider.initPackageInfo(); spalshProvider.initPackageInfo();
spalshProvider.handleVersionCheck(context); spalshProvider.handleVersionCheck(context);
if (connection == 'Online') {
print("camer here");
spalshProvider.handleVersionCheck(context);
}
}); });
} }
...@@ -350,6 +354,13 @@ class _SplashState extends State<Splash> { ...@@ -350,6 +354,13 @@ class _SplashState extends State<Splash> {
default: default:
connection = 'Offline'; connection = 'Offline';
} }
if (connection == 'Online') {
print("camer here");
Provider.of<SplashVersionNotifier>(
context,
listen: false,
).handleVersionCheck(context);
}
return (connection == 'Online') return (connection == 'Online')
? SafeArea( ? SafeArea(
top: false, top: false,
......
...@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev ...@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.94+98 version: 1.0.95+99
environment: environment:
sdk: ^3.7.2 sdk: ^3.7.2
......
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