Commit 7959ada6 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

01-08-2025 By Sai Srinivas

Finance Module and CRM issues
parent 14d01f4d
...@@ -883,7 +883,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -883,7 +883,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
Expanded( Expanded(
flex: 4, flex: 4,
child: Text( child: Text(
"Find Nearby Generators", "Find Nearby Leads",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: AppColors.app_blue, color: AppColors.app_blue,
...@@ -1108,10 +1108,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -1108,10 +1108,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
), ),
floatingActionButtonLocation: floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat, FloatingActionButtonLocation.centerFloat,
floatingActionButton:(provider.accessPages floatingActionButton:provider.accessPages.any((element) => [8,9].contains(element.id),)? InkResponse(
.where((page) => [8, 9].contains(page.id))
.toList()
.contains([8, 9]))? InkResponse(
onTap: () async { onTap: () async {
// if (provider.accessPages // if (provider.accessPages
// .where((page) => [8, 9].contains(page.id)) // .where((page) => [8, 9].contains(page.id))
......
...@@ -14,7 +14,8 @@ import 'package:provider/provider.dart'; ...@@ -14,7 +14,8 @@ import 'package:provider/provider.dart';
class Followupupdatescreen extends StatefulWidget { class Followupupdatescreen extends StatefulWidget {
final leadID; final leadID;
final mode; final mode;
const Followupupdatescreen({super.key,required this.leadID, this.mode}); final from;
const Followupupdatescreen({super.key,required this.leadID, this.mode, this.from});
@override @override
State<Followupupdatescreen> createState() => _FollowupupdatescreenState(); State<Followupupdatescreen> createState() => _FollowupupdatescreenState();
...@@ -34,7 +35,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> { ...@@ -34,7 +35,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
setState(() => _source = event); setState(() => _source = event);
}); });
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
final provider = Provider.of<followUpUpdateProvider>(context); final provider = Provider.of<followUpUpdateProvider>(context,listen: false);
provider.getCurrentLocation(context); provider.getCurrentLocation(context);
}); });
} }
...@@ -115,7 +116,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> { ...@@ -115,7 +116,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
child: Column( child: Column(
children: [ children: [
Container( Container(
padding: EdgeInsets.only(left: 10), padding: EdgeInsets.only(left: 10,top: 10),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Text( child: Text(
"Follow up Details", "Follow up Details",
...@@ -520,6 +521,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> { ...@@ -520,6 +521,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
], ],
), ),
), ),
SizedBox(height: 25),
] else if(provider.nextAppointmentStatus == ] else if(provider.nextAppointmentStatus ==
"Next Appointment") "Next Appointment")
...[ ...[
...@@ -692,7 +694,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> { ...@@ -692,7 +694,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
], ],
), ),
), ),
SizedBox(height: 25),
], ],
SizedBox(height: 150), SizedBox(height: 150),
], ],
...@@ -705,6 +707,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> { ...@@ -705,6 +707,7 @@ class _FollowupupdatescreenState extends State<Followupupdatescreen> {
provider.submitLoading = true; provider.submitLoading = true;
provider.crmAddFollowUpAPIFunction( provider.crmAddFollowUpAPIFunction(
context, context,
widget.from,
provider.nextAppointmentStatus, provider.nextAppointmentStatus,
provider.selectOrderStatus, provider.selectOrderStatus,
widget.leadID, widget.leadID,
......
...@@ -676,21 +676,11 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> { ...@@ -676,21 +676,11 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children:provider.buttonsLoading?[ children:provider.buttonsLoading?[
CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation(AppColors.app_blue),
),
SizedBox(width:25),
SvgPicture.asset("assets/svg/crm/vertical_line_ic.svg"),
SizedBox(width:25), SizedBox(width:25),
CircularProgressIndicator.adaptive( CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation(AppColors.app_blue), valueColor: AlwaysStoppedAnimation(AppColors.app_blue),
), ),
SizedBox(width:25), SizedBox(width:25),
SvgPicture.asset("assets/svg/crm/vertical_line_ic.svg"),
SizedBox(width:25),
CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation(AppColors.app_blue),
)
]: [ ]: [
Expanded( Expanded(
child: InkResponse( child: InkResponse(
......
...@@ -282,6 +282,7 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> { ...@@ -282,6 +282,7 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
context, context,
MaterialPageRoute(builder: (context) => Followupupdatescreen( MaterialPageRoute(builder: (context) => Followupupdatescreen(
leadID: task.leadid, leadID: task.leadid,
from:"Pending Tasks"
)), )),
); );
}, },
......
...@@ -121,13 +121,13 @@ class _AllpaymentrequesitionlistsbymodesState ...@@ -121,13 +121,13 @@ class _AllpaymentrequesitionlistsbymodesState
case 'Requested': case 'Requested':
return "R"; return "R";
case 'Level 1 Approved': case 'Level 1 Approved':
return "A"; return "L1A";
case 'Level 1 Rejected': case 'Level 1 Rejected':
return "R"; return "L1R";
case 'Level 2 Approved': case 'Level 2 Approved':
return "A"; return "L2A";
case 'Level 2 Rejected': case 'Level 2 Rejected':
return "R"; return "L2R";
case 'Processed': case 'Processed':
return "P"; return "P";
case 'Payment Rejected': case 'Payment Rejected':
...@@ -137,6 +137,28 @@ class _AllpaymentrequesitionlistsbymodesState ...@@ -137,6 +137,28 @@ class _AllpaymentrequesitionlistsbymodesState
return text; return text;
} }
double getSize(value){
var text = "A";
switch (value){
case 'Requested':
return 18.0;
case 'Level 1 Approved':
return 14.0;
case 'Level 1 Rejected':
return 14.0;
case 'Level 2 Approved':
return 14.0;
case 'Level 2 Rejected':
return 14.0;
case 'Processed':
return 18.0;
case 'Payment Rejected':
return 18.0;
}
return 18.0;
}
@override @override
void dispose() { void dispose() {
// TODO: implement dispose // TODO: implement dispose
...@@ -315,7 +337,7 @@ class _AllpaymentrequesitionlistsbymodesState ...@@ -315,7 +337,7 @@ class _AllpaymentrequesitionlistsbymodesState
getText(requestLists[index].status), getText(requestLists[index].status),
style: TextStyle( style: TextStyle(
color: getTextColor(requestLists[index].status), color: getTextColor(requestLists[index].status),
fontSize: 18, fontSize: getSize(requestLists[index].status),
fontFamily: "JakartaBold" fontFamily: "JakartaBold"
), ),
), ),
......
...@@ -79,8 +79,8 @@ class _FileviewerState extends State<Fileviewer> { ...@@ -79,8 +79,8 @@ class _FileviewerState extends State<Fileviewer> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar(context, "File Viewer"), appBar: appbarNew(context, "File Viewer",0xFFFFFFFF),
body: SafeArea(child: fileWidget(context)), body: SafeArea(child: Center(child: fileWidget(context))),
); );
} }
......
import 'dart:io'; import 'dart:io';
import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:dotted_line/dotted_line.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:generp/Utils/app_colors.dart'; import 'package:generp/Utils/app_colors.dart';
import 'package:generp/Utils/commonWidgets.dart'; import 'package:generp/Utils/commonWidgets.dart';
import 'package:generp/screens/commom/accountsListDetails.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../Notifiers/financeProvider/paymentReceiptsProvider.dart'; import '../../Notifiers/financeProvider/paymentReceiptsProvider.dart';
import '../../Utils/commonServices.dart'; import '../../Utils/commonServices.dart';
...@@ -41,6 +43,7 @@ class _PaymentreceiptdetailsState extends State<Paymentreceiptdetails> { ...@@ -41,6 +43,7 @@ class _PaymentreceiptdetailsState extends State<Paymentreceiptdetails> {
context, context,
listen: false, listen: false,
); );
provider.showMoreDetails = false;
provider.paymentsListDetailsAPI(context, widget.paymentRequestId); provider.paymentsListDetailsAPI(context, widget.paymentRequestId);
}); });
} }
...@@ -80,6 +83,272 @@ class _PaymentreceiptdetailsState extends State<Paymentreceiptdetails> { ...@@ -80,6 +83,272 @@ class _PaymentreceiptdetailsState extends State<Paymentreceiptdetails> {
} }
Widget _scaffold(BuildContext context) { Widget _scaffold(BuildContext context) {
return Consumer<Paymentreceiptsprovider>(
builder: (context, provider, child) {
var payment_det = provider.receiptDetails;
final headings1 = ["Payment Mode", "Receipt Date"];
final subHeadings1 = [
payment_det.requestMode ?? "-",
payment_det.receiptDate ?? "-",
];
final headings2 = [
"Bank Name",
"Account Holder Name",
"Account Number",
"Branch",
"IFSC",
"UPI ID",
];
final subHeadings2 = [
payment_det.bankName ?? "-",
payment_det.bankAccountHolderName ?? "-",
payment_det.bankAccountNumber ?? "-",
payment_det.bankBranchName ?? "-",
payment_det.bankIfscCode ?? "-",
payment_det.bankUpiId ?? "-",
];
final headings3 = ["Note", "Created Employee"];
final subHeadings3 = [
payment_det.description ?? "-",
payment_det.createdEmployee ?? "-",
];
final sections = [
{
"title": "Receipt Details",
"headings": headings1,
"subHeadings": subHeadings1,
},
if (provider.showMoreDetails) ...[
{
"title": "Bank Details",
"headings": headings2,
"subHeadings": subHeadings2,
},
{
"title": "Other Details",
"headings": headings3,
"subHeadings": subHeadings3,
},
],
];
return Scaffold(
resizeToAvoidBottomInset: true,
//widget.pageName
appBar: appbarNew(context, "Payment Receipt Details", 0xFFFFFFFF),
backgroundColor: AppColors.scaffold_bg_color,
body: SingleChildScrollView(
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
),
elevation: 2,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
),
// 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: 45,
width: 45,
padding: EdgeInsets.all(7.5),
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
shape: BoxShape.circle,
// borderRadius: BorderRadius.circular(8),
),
child: SvgPicture.asset("assets/svg/fin_ic.svg"),
),
),
SizedBox(width: 10),
Expanded(
flex: 8,
child: SizedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkResponse(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Accountslistdetails(
accountID: provider.receiptDetails.accountId,
),
),
);
},
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 6,
),
child: Text(
payment_det.receipientAccount ?? "-",
style: TextStyle(
decoration: TextDecoration.underline,
decorationColor: AppColors.grey_thick,
decorationStyle:
TextDecorationStyle.dotted,
height: 1.5,
fontFamily: "JakartaRegular",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
),
Text(
"₹${payment_det.amount}",
style: TextStyle(
fontFamily: "JakartaRegular",
fontSize: 14,
color: AppColors.grey_semi,
),
),
],
),
),
),
],
),
Column(
children: List.generate(sections.length, (sectionIndex) {
final section = sections[sectionIndex];
final title = section["title"] as String;
final headings = section["headings"] as List<String>;
final subHeadings =
section["subHeadings"] as List<String>;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(vertical: 4),
child: Row(
children: [
Expanded(
flex: 3,
child: Text(
title,
style: TextStyle(
fontSize: 14,
fontFamily: "JakartaSemiBold",
),
),
),
Expanded(
flex: 6,
child: DottedLine(
dashGapLength: 4,
dashGapColor: Colors.white,
dashColor: AppColors.grey_semi,
dashLength: 2,
lineThickness: 0.5,
),
),
],
),
),
Column(
children: List.generate(headings.length, (j) {
return Container(
padding: EdgeInsets.symmetric(vertical: 7),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
headings[j],
style: TextStyle(
fontFamily: "JakartaRegular",
fontSize: 14,
color: AppColors.semi_black,
),
),
),
Expanded(
child: Text(
subHeadings[j].isEmpty
? "-"
: subHeadings[j],
style: TextStyle(
fontSize: 14,
color: Color(0xFF818181),
),
),
),
],
),
);
}),
),
],
);
}),
),
InkResponse(
onTap: () async {
provider.showMoreDetails = !provider.showMoreDetails;
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
provider.showMoreDetails
? "Hide Details"
: "View Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
Transform.flip(
flipY: provider.showMoreDetails ? true : false,
child: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
height: 25,
width: 20,
color: AppColors.app_blue,
),
),
],
),
),
),
],
),
),
),
),
);
},
);
}
Widget _scaffold1(BuildContext context) {
return Consumer<Paymentreceiptsprovider>( return Consumer<Paymentreceiptsprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
var payment_det = provider.receiptDetails; var payment_det = provider.receiptDetails;
......
...@@ -354,13 +354,7 @@ class _SplashState extends State<Splash> { ...@@ -354,13 +354,7 @@ 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,
......
This diff is collapsed.
This diff is collapsed.
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