Commit 379460f6 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

04-07-2025 By Sai Srinivas

Test cases and Order Module, Crm Module.
parent 2ccf19cc
...@@ -112,7 +112,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -112,7 +112,7 @@ class _MyHomePageState extends State<MyHomePage> {
final names = [ final names = [
"Attendance", "Attendance",
"Finance", "Finance",
// "CRM", "CRM",
"Orders", "Orders",
"ERP", "ERP",
"Service Engineer", "Service Engineer",
...@@ -125,7 +125,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -125,7 +125,7 @@ class _MyHomePageState extends State<MyHomePage> {
final icons = [ final icons = [
"assets/svg/home_icons_1.svg", "assets/svg/home_icons_1.svg",
"assets/svg/home_icons_10.svg", "assets/svg/home_icons_10.svg",
// "assets/svg/home_icons_12.svg", "assets/svg/home_icons_12.svg",
"assets/svg/home_icons_11.svg", "assets/svg/home_icons_11.svg",
"assets/svg/home_icons_2.svg", "assets/svg/home_icons_2.svg",
"assets/svg/home_icons_4.svg", "assets/svg/home_icons_4.svg",
...@@ -138,7 +138,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -138,7 +138,7 @@ class _MyHomePageState extends State<MyHomePage> {
final requiredRoles = [ final requiredRoles = [
"430", "430",
"430", "430",
// "430", "430",
"430", "430",
"431", "431",
"433", "433",
...@@ -635,6 +635,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -635,6 +635,7 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
SizedBox(height: 15), SizedBox(height: 15),
Container( Container(
padding: EdgeInsets.symmetric(horizontal: 5,vertical: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
gradient: LinearGradient( gradient: LinearGradient(
...@@ -671,6 +672,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -671,6 +672,7 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
Text( Text(
"${profile.employeeName}", "${profile.employeeName}",
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: AppColors.app_blue, color: AppColors.app_blue,
fontFamily: "JakartaSemiBold", fontFamily: "JakartaSemiBold",
...@@ -679,6 +681,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -679,6 +681,7 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
Text( Text(
"${profile.employeeEmail}", "${profile.employeeEmail}",
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: AppColors.semi_black, color: AppColors.semi_black,
fontSize: 14, fontSize: 14,
......
This diff is collapsed.
...@@ -4,6 +4,7 @@ import 'package:generp/Notifiers/commonProvider/accountDetailsProvider.dart'; ...@@ -4,6 +4,7 @@ import 'package:generp/Notifiers/commonProvider/accountDetailsProvider.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/transactionDetails.dart'; import 'package:generp/screens/commom/transactionDetails.dart';
import 'package:generp/screens/finance/submitPaymentRequestionListsByMode.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../Models/commonModels/commonAccountdetailsResponse.dart'; import '../../Models/commonModels/commonAccountdetailsResponse.dart';
...@@ -11,7 +12,7 @@ import '../../Models/commonModels/commonAccountdetailsResponse.dart'; ...@@ -11,7 +12,7 @@ import '../../Models/commonModels/commonAccountdetailsResponse.dart';
class Accountslistdetails extends StatefulWidget { class Accountslistdetails extends StatefulWidget {
final accountID; final accountID;
const Accountslistdetails({super.key,required this.accountID}); const Accountslistdetails({super.key, required this.accountID});
@override @override
State<Accountslistdetails> createState() => _AccountslistdetailsState(); State<Accountslistdetails> createState() => _AccountslistdetailsState();
...@@ -33,7 +34,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -33,7 +34,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
return Consumer<Accountdetailsprovider>( return Consumer<Accountdetailsprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
final groupedData = provider.groupByDate(provider.ledgerList); final groupedData = provider.groupByDate(provider.ledgerList);
// Calculate total credit, debit, and balance // Calculate total credit, debit, and balance
double totalCredit = 0; double totalCredit = 0;
double totalDebit = 0; double totalDebit = 0;
double overallBalance = 0; double overallBalance = 0;
...@@ -48,24 +49,28 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -48,24 +49,28 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
return WillPopScope( return WillPopScope(
child: Scaffold( child: Scaffold(
appBar: appbar2(context, "Account Details",provider.resetValues,Container( appBar: appbar2(
padding: EdgeInsets.symmetric(horizontal: 5,vertical: 5), context,
decoration: BoxDecoration( "Account Details",
provider.resetValues,
color: Color(0xFFE6F6FF), Container(
borderRadius: BorderRadius.circular(8), padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5),
decoration: BoxDecoration(
), color: Color(0xFFE6F6FF),
child: Row( borderRadius: BorderRadius.circular(8),
children: [ ),
SvgPicture.asset("assets/svg/fin_ic.svg",height: 12,), child: Row(
SizedBox(width: 5,), children: [
Text(overallBalance.toString()??"-",style: TextStyle( SvgPicture.asset("assets/svg/fin_ic.svg", height: 12),
fontSize: 12, SizedBox(width: 5),
),) Text(
], overallBalance.toString() ?? "-",
style: TextStyle(fontSize: 12),
),
],
),
), ),
)), ),
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: SafeArea( body: SafeArea(
...@@ -77,7 +82,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -77,7 +82,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(16) borderRadius: BorderRadius.circular(16),
), ),
child: Row( child: Row(
children: [ children: [
...@@ -96,8 +101,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -96,8 +101,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
), ),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
...@@ -106,12 +110,10 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -106,12 +110,10 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
text: "${totalCredit}", text: "${totalCredit}",
style: TextStyle( style: TextStyle(
color: Color(0xFFED3424), color: Color(0xFFED3424),
fontFamily: fontFamily: "JakartaRegular",
"JakartaRegular",
fontSize: 25, fontSize: 25,
), ),
), ),
], ],
), ),
), ),
...@@ -140,8 +142,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -140,8 +142,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
), ),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
...@@ -150,12 +151,10 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -150,12 +151,10 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
text: "${totalDebit}", text: "${totalDebit}",
style: TextStyle( style: TextStyle(
color: Color(0xFFED3424), color: Color(0xFFED3424),
fontFamily: fontFamily: "JakartaRegular",
"JakartaRegular",
fontSize: 25, fontSize: 25,
), ),
), ),
], ],
), ),
), ),
...@@ -172,14 +171,14 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -172,14 +171,14 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
], ],
), ),
), ),
Text( // Text(
"Account Details", // "Account Details",
style: TextStyle( // style: TextStyle(
fontSize: 16, // fontSize: 16,
color: AppColors.grey_thick, // color: AppColors.grey_thick,
fontFamily: "JakartaMedium", // fontFamily: "JakartaMedium",
), // ),
), // ),
Container( Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
...@@ -220,7 +219,8 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -220,7 +219,8 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
provider.accountDetails.bankIfscCode ?? "-", provider.accountDetails.bankIfscCode ?? "-",
provider.accountDetails.bankAccountHolderName ?? provider.accountDetails.bankAccountHolderName ??
"-", "-",
provider.accountDetails.bankAccountNumber ?? "-", provider.accountDetails.bankAccountNumber ??
"-",
provider.accountDetails.bankUpiId ?? "-", provider.accountDetails.bankUpiId ?? "-",
provider.accountDetails.state ?? "-", provider.accountDetails.state ?? "-",
provider.accountDetails.district ?? "-", provider.accountDetails.district ?? "-",
...@@ -244,7 +244,9 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -244,7 +244,9 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
SizedBox(width: 15), SizedBox(width: 15),
Expanded( Expanded(
child: Text( child: Text(
subHeadings[j]==""?"-": subHeadings[j] ?? "-", subHeadings[j] == ""
? "-"
: subHeadings[j] ?? "-",
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 14, fontSize: 14,
...@@ -285,11 +287,9 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -285,11 +287,9 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
), ),
), ),
...items.map((item) { ...items.map((item) {
double running_balance = 0; double running_balance = 0;
int currentIndex = provider.ledgerList.indexOf( int currentIndex = provider.ledgerList
item, .indexOf(item);
);
for (var i = 0; i <= currentIndex; i++) { for (var i = 0; i <= currentIndex; i++) {
var ledgerItem = provider.ledgerList[i]; var ledgerItem = provider.ledgerList[i];
double credit = double credit =
...@@ -310,9 +310,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -310,9 +310,7 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
horizontal: 10, horizontal: 10,
vertical: 10, vertical: 10,
), ),
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(vertical: 5),
vertical: 5,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
...@@ -352,8 +350,9 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -352,8 +350,9 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
children: [ children: [
Text( Text(
item.description ?? "-", item.description ?? "-",
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow:
TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontFamily: fontFamily:
"JakartaMedium", "JakartaMedium",
...@@ -371,13 +370,14 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -371,13 +370,14 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
child: RichText( child: RichText(
maxLines: 1, maxLines: 1,
textAlign: TextAlign.right, textAlign: TextAlign.right,
overflow: TextOverflow.ellipsis, overflow:
TextOverflow.ellipsis,
text: TextSpan( text: TextSpan(
children: [ children: [
TextSpan( TextSpan(
text: text:
item.type == "Credit" item.type ==
"Credit"
? "-" ? "-"
: "+", : "+",
style: TextStyle( style: TextStyle(
...@@ -414,18 +414,24 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -414,18 +414,24 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
), ),
Row( Row(
children: [ children: [
Expanded(child: Text("Balance",style: TextStyle(
fontSize: 13,
color: Color(0xFF2d2d2d)
),)),
Expanded( Expanded(
child: Text( child: Text(
textAlign:TextAlign.right, "Balance",
"${running_balance.toString()}" ?? style: TextStyle(
"-",style: TextStyle( fontSize: 13,
color: Color(0xFF818181), color: Color(0xFF2d2d2d),
fontSize: 13 ),
), ),
),
Expanded(
child: Text(
textAlign: TextAlign.right,
"${running_balance.toString()}" ??
"-",
style: TextStyle(
color: Color(0xFF818181),
fontSize: 13,
),
), ),
), ),
], ],
...@@ -436,19 +442,23 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -436,19 +442,23 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => Transactiondetails( (context) =>
paymentID: item.refId, Transactiondetails(
type: item.type, paymentID: item.refId,
), type: item.type,
),
), ),
); );
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 5), padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
MainAxisAlignment.start,
children: [ children: [
Text( Text(
"View Details", "View Details",
...@@ -475,6 +485,50 @@ class _AccountslistdetailsState extends State<Accountslistdetails> { ...@@ -475,6 +485,50 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
); );
}, },
), ),
if(["Vendor","Customer"].contains(provider.accountDetails.type))...[
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) =>
Submitpaymentrequestionlistsbymode(
mode: "other",
pageTitleName:
"Add Payment Request (Other)",
accountId:provider.accountDetails.id!
),
),
);
},
child: Container(
alignment: Alignment.center,
height: 45,
margin: EdgeInsets.only(
left: 5.0,
right: 5.0,
top: 5.0,
bottom: 5.0,
),
decoration: BoxDecoration(
color: AppColors.app_blue, //1487C9
borderRadius: BorderRadius.circular(15.0),
),
child: Center(
child: Text(
"Add Payment Request (Other)",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontFamily: "JakartaMedium",
fontSize: 15,
),
),
),
),
),
]
], ],
), ),
), ),
......
...@@ -331,7 +331,8 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{ ...@@ -331,7 +331,8 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{
); );
if (provider.selectedDistricts != if (provider.selectedDistricts !=
null) { null) {
provider.selectedDistricts = null; provider.states.clear();
// provider.selectedDistricts = null;
provider.selectedDistrictId = provider.selectedDistrictId =
null; null;
provider.selectedDistrictValue = provider.selectedDistrictValue =
...@@ -451,8 +452,8 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{ ...@@ -451,8 +452,8 @@ class _AddcommonpaymentState extends State<Addcommonpayment>{
); );
if (provider.selectedSubLocations != if (provider.selectedSubLocations !=
null) { null) {
provider.selectedSubLocations = // provider.selectedSubLocations =
null; // null;
provider.selectedSubLocID = null; provider.selectedSubLocID = null;
provider.selectedSubLocValue = provider.selectedSubLocValue =
null; null;
......
...@@ -55,6 +55,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -55,6 +55,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
"Account Created By", "Account Created By",
"Address", "Address",
"Lead Status", "Lead Status",
"Last Followup Date"
]; ];
...@@ -64,6 +65,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -64,6 +65,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
provider.accountDetails!.owner??"-", provider.accountDetails!.owner??"-",
provider.leadDetails!.address??"-", provider.leadDetails!.address??"-",
provider.leadDetails!.status??"-", provider.leadDetails!.status??"-",
provider.followupDetails.first!.fdate??"-",
]; ];
...@@ -161,6 +163,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -161,6 +163,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
), ),
), ),
SizedBox(width: 10), SizedBox(width: 10),
if(provider.showEditButton=="1")
Expanded( Expanded(
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
......
...@@ -798,7 +798,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -798,7 +798,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
.districtsList .districtsList
.isNotEmpty) { .isNotEmpty) {
provider.districtsList.clear(); provider.districtsList.clear();
provider.selectedDistricts = null; // provider.selectedDistricts = null;
provider.selectedDistrictId = null; provider.selectedDistrictId = null;
provider.selectedDistrictValue = ""; provider.selectedDistrictValue = "";
} }
...@@ -862,8 +862,8 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -862,8 +862,8 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
.subLocationsList .subLocationsList
.isNotEmpty) { .isNotEmpty) {
provider.subLocationsList.clear(); provider.subLocationsList.clear();
provider.selectedSubLocations = // provider.selectedSubLocations =
null; // null;
provider.selectedSubLocationId = provider.selectedSubLocationId =
null; null;
provider.selectedSubLocationValue = provider.selectedSubLocationValue =
......
...@@ -227,7 +227,9 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -227,7 +227,9 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
), ),
), ),
), ),
SizedBox(width: 5),
if(provider.showTransferAccount=="1")...[
SizedBox(width: 5),
Expanded( Expanded(
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
...@@ -242,11 +244,12 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -242,11 +244,12 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
width: 30, width: 30,
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/svg/crm_transfer_ic.svg", "assets/svg/transfer_ac.svg",
), ),
), ),
), ),
), ),
],
SizedBox(width: 5), SizedBox(width: 5),
Expanded( Expanded(
flex: 1, flex: 1,
......
...@@ -55,14 +55,14 @@ class _QuotationDetailsState extends State<QuotationDetails> { ...@@ -55,14 +55,14 @@ class _QuotationDetailsState extends State<QuotationDetails> {
children: [ children: [
...List.generate(5, (j) { ...List.generate(5, (j) {
final textheads = [ final textheads = [
"Id", "Description",
"Employee Name", "Employee Name",
"Quotation", "Quotation",
"Info", "Info",
"Date", "Date",
]; ];
final textSubheads = [ final textSubheads = [
quotationDetails[index].id ?? "-", quotationDetails[index].subject ?? "-",
quotationDetails[index].employee ?? "-", quotationDetails[index].employee ?? "-",
"View File", "View File",
// quotationDetails[index].finTime ?? "-", // quotationDetails[index].finTime ?? "-",
......
...@@ -35,9 +35,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -35,9 +35,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
return Consumer<Crmdashboardprovider>( return Consumer<Crmdashboardprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
final gridPages = final gridPages =
provider.accessPages provider.accessPages
.where((page) => ![8, 9, 23, 24, 51, 50].contains(page.id)) .where((page) => ![8, 9, 23, 24, 51, 50].contains(page.id))
.toList(); .toList();
return WillPopScope( return WillPopScope(
onWillPop: () => onBackPressed(context), onWillPop: () => onBackPressed(context),
...@@ -84,7 +84,10 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -84,7 +84,10 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(14), borderRadius: BorderRadius.circular(14),
border: focusNode.hasFocus?Border.all(color: AppColors.app_blue):null border:
focusNode.hasFocus
? Border.all(color: AppColors.app_blue)
: null,
), ),
child: Row( child: Row(
children: [ children: [
...@@ -96,22 +99,26 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -96,22 +99,26 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
controller: provider.searchController, controller: provider.searchController,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
maxLines: 1, maxLines: 1,
onChanged: (value) {}, onChanged: (value) {},
focusNode: focusNode, focusNode: focusNode,
onTapUpOutside: (event) { onTapUpOutside: (event) {
focusNode.requestFocus(); focusNode.unfocus();
}, },
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
onEditingComplete: () { onEditingComplete: () {
Navigator.push(context, MaterialPageRoute( Navigator.push(
builder: (context) => Universalsearchscreen( context,
text: provider.searchController.text MaterialPageRoute(
builder:
(context) => Universalsearchscreen(
text: provider.searchController.text,
),
settings: RouteSettings(name: 'SearchScreen'),
), ),
settings: RouteSettings(name: 'SearchScreen'), );
));
}, },
enabled: true,
decoration: InputDecoration( decoration: InputDecoration(
counterText: "", counterText: "",
hintText: "Search", hintText: "Search",
...@@ -128,7 +135,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -128,7 +135,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
), ),
), ),
), ),
SvgPicture.asset("assets/svg/search_ic.svg") SvgPicture.asset("assets/svg/search_ic.svg"),
], ],
), ),
), ),
...@@ -141,8 +148,10 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -141,8 +148,10 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
), ),
body: SafeArea( body: SafeArea(
child: SingleChildScrollView( child: SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: Column( child: Column(
children: [ children: [
if(provider.allLeads.length>0)...[
Container( Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
...@@ -156,10 +165,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -156,10 +165,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
), ),
height: MediaQuery height: MediaQuery.of(context).size.height * 0.28,
.of(context)
.size
.height * 0.28,
child: GridView.builder( child: GridView.builder(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 0, horizontal: 0,
...@@ -216,22 +222,21 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -216,22 +222,21 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) => Leadlistbymode(
Leadlistbymode(
pageTitleName: pageTitleName:
provider provider
.allLeads[jndex] .allLeads[jndex]
.filter! .filter!
.pageName!, .pageName!,
mode: mode:
provider provider
.allLeads[jndex] .allLeads[jndex]
.filter! .filter!
.mode, .mode,
filter: filter:
provider provider
.allLeads[jndex] .allLeads[jndex]
.filter!, .filter!,
), ),
), ),
); );
...@@ -267,6 +272,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -267,6 +272,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
}, },
), ),
), ),
],
ListView.builder( ListView.builder(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
...@@ -301,26 +307,24 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -301,26 +307,24 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) => Leadlistbymode(
Leadlistbymode(
mode: gridPages[index].mode, mode: gridPages[index].mode,
pageTitleName: pageTitleName:
gridPages[index].pageName, gridPages[index].pageName,
), ),
), ),
); );
} else if (gridPages[index].pageName!.contains( } else if (gridPages[index].pageName!.contains(
"Prospect List", "Account List",
)) { )) {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => (context) => ProspectListByMode(
ProspectListByMode(
mode: gridPages[index].mode, mode: gridPages[index].mode,
pageTitleName: pageTitleName:
gridPages[index].pageName, gridPages[index].pageName,
), ),
), ),
); );
...@@ -403,43 +407,97 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -403,43 +407,97 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
), ),
), ),
), ),
ListView.builder( Container(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, width: double.infinity,
padding: EdgeInsets.symmetric( height: MediaQuery.of(context).size.height*0.34,
vertical: 10, child: ListView.builder(
horizontal: 10,
physics: AlwaysScrollableScrollPhysics(),
shrinkWrap: true,
scrollDirection: Axis.horizontal,
padding: EdgeInsets.symmetric(
vertical: 10,
horizontal: 10,
),
itemCount: provider.pendingTasksLists.length,
itemBuilder: (context, index) {
final headings = [
"Lead Name",
"Mobile Number",
"Appointment Date",
"Appointment Type",
"Note",
"Status",
];
final subHeadings = [
provider.pendingTasksLists[index].aname??"-",
provider.pendingTasksLists[index].conmob??"-",
provider.pendingTasksLists[index].appdate??"-",
provider.pendingTasksLists[index].atype??"-",
provider.pendingTasksLists[index].anote??"-",
provider.pendingTasksLists[index].lstatus??"-",
];
return Container(
height: MediaQuery.of(context).size.height*0.3,
width: MediaQuery.of(context).size.width*0.6,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(14),
),
margin: EdgeInsets.symmetric(
horizontal: 5,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
...List.generate(headings.length, (j) {
return Container(
padding: EdgeInsets.symmetric(
vertical: 6,
horizontal: 0,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
"${headings[j]}",
style: TextStyle(fontSize: 14),
),
),
Expanded(
child: Text(
"${subHeadings[j]}",
style: TextStyle(
color: AppColors.grey_semi,
fontSize: 14,
),
),
),
],
),
);
},)
],
),
);
},
), ),
itemCount: provider.pendingTasksLists.length,
itemBuilder: (context, index) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(14),
),
margin: EdgeInsets.symmetric(
horizontal: 5,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
child: Row(
children: [
Text(provider.pendingTasksLists[index].aname!),
],
),
);
},
), ),
], ],
SizedBox(height: 150,),
], ],
), ),
), ),
), ),
floatingActionButtonLocation: floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat, FloatingActionButtonLocation.centerFloat,
floatingActionButton: InkResponse( floatingActionButton: InkResponse(
onTap: () { onTap: () {
_showPaymentOptionsSheet(context); _showPaymentOptionsSheet(context);
...@@ -485,9 +543,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -485,9 +543,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
child: Consumer<Crmdashboardprovider>( child: Consumer<Crmdashboardprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
final accessiblePagesList = final accessiblePagesList =
provider.accessPages provider.accessPages
.where((page) => [8, 9].contains(page.id)) .where((page) => [8, 9].contains(page.id))
.toList(); .toList();
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: 15, bottom: 15,
...@@ -496,10 +554,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -496,10 +554,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
top: 10, top: 10,
), ),
padding: EdgeInsets.only( padding: EdgeInsets.only(
bottom: MediaQuery bottom: MediaQuery.of(context).viewInsets.bottom,
.of(context)
.viewInsets
.bottom,
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
......
import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:generp/Utils/dropdownTheme.dart'; import 'package:generp/Utils/dropdownTheme.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
...@@ -339,210 +340,196 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> { ...@@ -339,210 +340,196 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
floatingActionButtonLocation: floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat, FloatingActionButtonLocation.centerFloat,
bottomNavigationBar: SizedBox( bottomNavigationBar: Material(
child: Row( elevation: 10,
mainAxisAlignment: MainAxisAlignment.center, shadowColor: Colors.black54,
children: [ child: Container(
Expanded( decoration: BoxDecoration(
child: InkResponse( color: Colors.white,
onTap: boxShadow: [
provider.submitLoading BoxShadow(
? null color: Colors.black26,
: () { blurRadius: 10,
//genquotedown offset: Offset(0, -2),
final insertedData = provider.getFormData(); ),
provider ],
.crmLeadDetailsGenerateQuoteSubmitAPIFunction( ),
context, child: Row(
widget.leadId, mainAxisAlignment: MainAxisAlignment.center,
insertedData, children: [
"genquotedown", Expanded(
); child: InkResponse(
}, onTap:
child: Container(
height: 45,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: AppColors.app_blue,
borderRadius: BorderRadius.circular(15),
),
child:
provider.submitLoading provider.submitLoading
? CircularProgressIndicator.adaptive( ? null
valueColor: AlwaysStoppedAnimation<Color>( : () {
AppColors.app_blue, //genquotedown
), final insertedData = provider.getFormData();
) provider
: const Text( .crmLeadDetailsGenerateQuoteSubmitAPIFunction(
"Download Quotation", context,
style: TextStyle( widget.leadId,
fontSize: 15, insertedData,
fontFamily: "JakartaMedium", "genquotedown",
color: Colors.white, );
), },
), child: Container(
height: 45,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
// color: AppColors.app_blue,
borderRadius: BorderRadius.circular(10),
),
child:
provider.submitLoading
? CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue,
),
)
: SvgPicture.asset("assets/svg/download_quote.svg"),
),
), ),
), ),
), SizedBox(width: 10),
SizedBox(width: 10), Expanded(
Expanded( child: InkResponse(
child: InkResponse( onTap:
onTap:
provider.submitLoading
? null
: () {
//genquotemail,
final insertedData = provider.getFormData();
provider
.crmLeadDetailsGenerateQuoteSubmitAPIFunction(
context,
widget.leadId,
insertedData,
"genquotemail",
);
},
child: Container(
height: 45,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: AppColors.app_blue,
borderRadius: BorderRadius.circular(15),
),
child:
provider.submitLoading provider.submitLoading
? CircularProgressIndicator.adaptive( ? null
valueColor: AlwaysStoppedAnimation<Color>( : () {
AppColors.app_blue, //genquotemail,
), final insertedData = provider.getFormData();
) provider
: const Text( .crmLeadDetailsGenerateQuoteSubmitAPIFunction(
"Mail Quotation", context,
style: TextStyle( widget.leadId,
fontSize: 15, insertedData,
fontFamily: "JakartaMedium", "genquotemail",
color: Colors.white, );
), },
), child: Container(
height: 45,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
// color: AppColors.app_blue,
borderRadius: BorderRadius.circular(10),
),
child:
provider.submitLoading
? CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue,
),
)
: SvgPicture.asset("assets/svg/mail_quote.svg")
),
), ),
), ),
), SizedBox(width: 10),
SizedBox(width: 10), Expanded(
Expanded( child: InkResponse(
child: InkResponse( onTap:
onTap:
provider.submitLoading
? null
: () {
//genquotewhatsapp,
final insertedData = provider.getFormData();
provider
.crmLeadDetailsGenerateQuoteSubmitAPIFunction(
context,
widget.leadId,
insertedData,
"genquotewhatsapp",
);
},
child: Container(
height: 45,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: AppColors.app_blue,
borderRadius: BorderRadius.circular(15),
),
child:
provider.submitLoading provider.submitLoading
? CircularProgressIndicator.adaptive( ? null
valueColor: AlwaysStoppedAnimation<Color>( : () {
AppColors.app_blue, //genquotewhatsapp,
), final insertedData = provider.getFormData();
) provider
: const Text( .crmLeadDetailsGenerateQuoteSubmitAPIFunction(
"Whatsapp Quotation", context,
style: TextStyle( widget.leadId,
fontSize: 15, insertedData,
fontFamily: "JakartaMedium", "genquotewhatsapp",
color: Colors.white, );
), },
), child: Container(
height: 45,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
// color: AppColors.app_blue,
borderRadius: BorderRadius.circular(10),
),
child:
provider.submitLoading
? CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue,
),
)
: SvgPicture.asset("assets/svg/whatsapp_quote.svg")
),
), ),
), ),
), SizedBox(width: 10),
SizedBox(width: 10), Expanded(
Expanded( child: InkResponse(
child: InkResponse( onTap:
onTap:
provider.submitLoading
? null
: () {
//genquotewhatsappbymynum,
final insertedData = provider.getFormData();
provider
.crmLeadDetailsGenerateQuoteSubmitAPIFunction(
context,
widget.leadId,
insertedData,
"genquotewhatsappbymynum",
);
},
child: Container(
height: 45,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: AppColors.app_blue,
borderRadius: BorderRadius.circular(15),
),
child:
provider.submitLoading provider.submitLoading
? CircularProgressIndicator.adaptive( ? null
valueColor: AlwaysStoppedAnimation<Color>( : () {
AppColors.app_blue, //genquotewhatsappbymynum,
), final insertedData = provider.getFormData();
) provider
: const Text( .crmLeadDetailsGenerateQuoteSubmitAPIFunction(
"Whatsapp Quotation By My Number", context,
style: TextStyle( widget.leadId,
fontSize: 15, insertedData,
fontFamily: "JakartaMedium", "genquotewhatsappbymynum",
color: Colors.white, );
), },
), child: Container(
height: 45,
alignment: Alignment.center,
margin: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
// color: AppColors.app_blue,
borderRadius: BorderRadius.circular(10),
),
child:
provider.submitLoading
? CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.app_blue,
),
)
:SvgPicture.asset("assets/svg/whatsapp_quote_self.svg")
),
), ),
), ),
), ],
], ),
), ),
), ),
), ),
......
...@@ -135,31 +135,47 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> { ...@@ -135,31 +135,47 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
), ),
itemCount: provider.leadsList.length, itemCount: provider.leadsList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return InkResponse(
decoration: BoxDecoration( onTap: () {
color: Colors.white, Navigator.pushAndRemoveUntil(
borderRadius: BorderRadius.circular(14), context,
), MaterialPageRoute(
builder: (context) => ProspectDetailsByMode(
margin: EdgeInsets.only( pageTitleName: "Lead Details",
bottom: 5, mode: "Executive",
left: 5, leadId: provider.leadsList[index].lid,
right: 5, ),
top: 5, settings: RouteSettings(name: 'ProspectDetails'),
),
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: ListTile(
title: Text(
provider.leadsList[index].aname!,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
), ),
(Route<dynamic> route) => route.settings.name == 'CrmdashboardScreen',
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(14),
), ),
trailing: SvgPicture.asset(
"assets/svg/arrow_right_new.svg", margin: EdgeInsets.only(
bottom: 5,
left: 5,
right: 5,
top: 5,
),
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: ListTile(
title: Text(
provider.leadsList[index].aname!,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
),
),
trailing: SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
),
), ),
), ),
); );
......
...@@ -67,12 +67,12 @@ class _AllpaymentrequesitionlistsbymodesState ...@@ -67,12 +67,12 @@ class _AllpaymentrequesitionlistsbymodesState
provider.resetForm, provider.resetForm,
Row( Row(
children: [ children: [
InkResponse( // InkResponse(
onTap: () { // onTap: () {
_showOptionsSheet(context); // _showOptionsSheet(context);
}, // },
child: SvgPicture.asset("assets/svg/ic_download.svg",), // child: SvgPicture.asset("assets/svg/ic_download.svg",),
), // ),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
......
...@@ -76,8 +76,8 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> { ...@@ -76,8 +76,8 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
style: TextStyle(fontSize: 14), style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
items: items:[
provider.receiptAccounts ...provider.receiptAccounts
.map( .map(
(accs) => (accs) =>
DropdownMenuItem<Accounts>( DropdownMenuItem<Accounts>(
...@@ -92,6 +92,7 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> { ...@@ -92,6 +92,7 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
), ),
) )
.toList(), .toList(),
],
value: provider.selectreceiptAccounts, value: provider.selectreceiptAccounts,
onChanged: (Accounts? value) { onChanged: (Accounts? value) {
if (value != null) { if (value != null) {
......
...@@ -166,6 +166,7 @@ class _FinancedashboardState extends State<Financedashboard> { ...@@ -166,6 +166,7 @@ class _FinancedashboardState extends State<Financedashboard> {
); );
}, },
), ),
SizedBox(height: 150,)
], ],
), ),
), ),
......
...@@ -56,12 +56,12 @@ late Commondaterangefilter cf; ...@@ -56,12 +56,12 @@ late Commondaterangefilter cf;
provider.resetForm, provider.resetForm,
Row( Row(
children: [ children: [
InkResponse( // InkResponse(
onTap: () { // onTap: () {
_showOptionsSheet(context); // _showOptionsSheet(context);
}, // },
child: SvgPicture.asset("assets/svg/ic_download.svg",), // child: SvgPicture.asset("assets/svg/ic_download.svg",),
), // ),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
var cf = Commondaterangefilter(); var cf = Commondaterangefilter();
......
...@@ -51,12 +51,12 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> { ...@@ -51,12 +51,12 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
provider.resetForm, provider.resetForm,
Row( Row(
children: [ children: [
InkResponse( // InkResponse(
onTap: () { // onTap: () {
_showOptionsSheet(context); // _showOptionsSheet(context);
}, // },
child: SvgPicture.asset("assets/svg/ic_download.svg",), // child: SvgPicture.asset("assets/svg/ic_download.svg",),
), // ),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
var cf = Commondaterangefilter(); var cf = Commondaterangefilter();
......
...@@ -15,11 +15,12 @@ import '../../Models/financeModels/addPaymentRequestionResponse.dart'; ...@@ -15,11 +15,12 @@ import '../../Models/financeModels/addPaymentRequestionResponse.dart';
class Submitpaymentrequestionlistsbymode extends StatefulWidget { class Submitpaymentrequestionlistsbymode extends StatefulWidget {
final String mode; final String mode;
final String pageTitleName; final String pageTitleName;
final accountId;
const Submitpaymentrequestionlistsbymode({ const Submitpaymentrequestionlistsbymode({
super.key, super.key,
required this.mode, required this.mode,
required this.pageTitleName, required this.pageTitleName, this.accountId,
}); });
@override @override
...@@ -41,7 +42,39 @@ class _SubmitpaymentrequestionlistsbymodeState ...@@ -41,7 +42,39 @@ class _SubmitpaymentrequestionlistsbymodeState
context, context,
listen: false, listen: false,
); );
print("widget.accountId ${widget.accountId}");
provider.addPaymentRequestionViewAPI(context, widget.mode); provider.addPaymentRequestionViewAPI(context, widget.mode);
Future.delayed(Duration(milliseconds: 500),() {
if (widget.mode == "self" && provider.accounts.length == 1) {
provider.selectedAccount = provider.accounts.first;
provider.accountId = provider.accounts.first.id!;
}
else if(widget.mode=="other" && provider.accounts != null) {
if (widget.accountId != null) {
provider.selectedAccount =
provider.accounts.firstWhereOrNull(
(element) => element.id ==
widget.accountId,
);
print("sdsd,al;,al${provider.selectedAccount!.id}");
print("sdsd,al;,al${provider.selectedAccount!.name}");
provider.accountId =
provider.accounts
.firstWhere(
(e) => e.id == widget.accountId,
)!
.id!;
provider.accountValue =
provider.accounts
.firstWhere(
(e) => e.id == widget.accountId,
)!
.name!;
}
}
},);
}); });
} }
...@@ -86,12 +119,7 @@ class _SubmitpaymentrequestionlistsbymodeState ...@@ -86,12 +119,7 @@ class _SubmitpaymentrequestionlistsbymodeState
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<Requestionlistprovider>( return Consumer<Requestionlistprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
if (widget.mode == "self" && provider.accounts.length == 1) {
provider.selectedAccount = provider.accounts.first;
provider.accountId = provider.accounts.first.id!;
}
});
return WillPopScope( return WillPopScope(
child: Scaffold( child: Scaffold(
...@@ -668,7 +696,7 @@ class _SubmitpaymentrequestionlistsbymodeState ...@@ -668,7 +696,7 @@ class _SubmitpaymentrequestionlistsbymodeState
child: Container( child: Container(
height: 45, height: 45,
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5), padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.app_blue, color: AppColors.app_blue,
......
...@@ -8,7 +8,8 @@ import '../../Utils/commonWidgets.dart'; ...@@ -8,7 +8,8 @@ import '../../Utils/commonWidgets.dart';
class Complainthistory extends StatefulWidget { class Complainthistory extends StatefulWidget {
final genHashID; final genHashID;
const Complainthistory({super.key,required this.genHashID});
const Complainthistory({super.key, required this.genHashID});
@override @override
State<Complainthistory> createState() => _ComplainthistoryState(); State<Complainthistory> createState() => _ComplainthistoryState();
...@@ -24,8 +25,15 @@ class _ComplainthistoryState extends State<Complainthistory> { ...@@ -24,8 +25,15 @@ class _ComplainthistoryState extends State<Complainthistory> {
context, context,
listen: false, listen: false,
); );
var homeProvider = Provider.of<HomescreenNotifier>(context,listen: false); var homeProvider = Provider.of<HomescreenNotifier>(
details.LoadgeneratorComplaintHistoryApifunction(homeProvider,context, widget.genHashID); context,
listen: false,
);
details.LoadgeneratorComplaintHistoryApifunction(
homeProvider,
context,
widget.genHashID,
);
}); });
} }
...@@ -33,7 +41,6 @@ class _ComplainthistoryState extends State<Complainthistory> { ...@@ -33,7 +41,6 @@ class _ComplainthistoryState extends State<Complainthistory> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<Generatordetailsprovider>( return Consumer<Generatordetailsprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
return WillPopScope( return WillPopScope(
onWillPop: () => onBackPressed(context), onWillPop: () => onBackPressed(context),
child: Scaffold( child: Scaffold(
...@@ -44,98 +51,101 @@ class _ComplainthistoryState extends State<Complainthistory> { ...@@ -44,98 +51,101 @@ class _ComplainthistoryState extends State<Complainthistory> {
child: Container( child: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
if(provider.complaintList.isNotEmpty)...[ if (provider.complaintList.isNotEmpty) ...[
ListView.builder( ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemCount: provider.complaintList.length, itemCount: provider.complaintList.length,
itemBuilder: (context, index) { itemBuilder: (context, l) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.only(left: 5.0), padding: const EdgeInsets.only(left: 8.0,top: 5.0),
child: Text("${ provider.complaintList[index].compRegdate}",style: TextStyle( child: Text(
color: Color(0xFF818181) "${provider.complaintList[l].compRegdate}",
),), style: TextStyle(
), fontSize:14,
Container( color: Color(0xFF818181)),
margin: EdgeInsets.symmetric(horizontal: 10,vertical: 5), ),
decoration: BoxDecoration( ),
color: Colors.white, Container(
borderRadius: BorderRadius.circular(16), margin: EdgeInsets.symmetric(
horizontal: 10,
), vertical: 5,
child: Column( ),
children: [ decoration: BoxDecoration(
color: Colors.white,
...List.generate(4, (index) { borderRadius: BorderRadius.circular(16),
final headings = [ ),
"Technician Name", child: Column(
"ID", children: [
"Complaint Type", ...List.generate(4, (jndex) {
"Complaint Status",]; final headings = [
"Technician Name",
final values = [ "Complaint Type",
provider.complaintList[index].techName, "Complaint Status",
provider.complaintList[index].compId, "Complaint Created By",
provider.complaintList[index].compType, ];
provider.complaintList[index].compStatus,
final values = [
]; provider.complaintList[l].techName,
return Container( provider.complaintList[l].compType,
provider.complaintList[l].compStatus,
padding: EdgeInsets.symmetric(horizontal: 15,vertical: 6), provider.complaintList[l].createdBy,
child: Row( ];
children: [ return Container(
Expanded( padding: EdgeInsets.symmetric(
child: SizedBox( horizontal: 15,
child: Column( vertical: 6,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text("${headings[index]}"),
],
),
),
), ),
Expanded( child: Row(
child: SizedBox( crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Expanded(
mainAxisAlignment: MainAxisAlignment.start, child: SizedBox(
children: [ child: Text(
Text("${values[index]}", "${headings[jndex]}",
style: TextStyle( style: TextStyle(
color: Color(0xFF818181) fontSize: 14
),), ),
),
], ),
), ),
), Expanded(
child: SizedBox(
child: Text(
"${values[jndex]}",
style: TextStyle(
fontSize:14,
color: Color(
0xFF818181,
),
),
),
),
),
],
), ),
], );
), }),
); ],
},), ),
] ),
), ],
), );
], },
); ),
},), ] else ...[
]else...[ Emptywidget(context),
Emptywidget(context) ],
]
], ],
), ),
), ),
), ),
), ),
), ),
); );
}, },
......
...@@ -396,6 +396,293 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -396,6 +396,293 @@ class _GeneratordetailsState extends State<Generatordetails> {
}), }),
), ),
), ),
if (provider.contactsList.isNotEmpty) ...[
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
child: Text(
"Customer Contact Details",
style: TextStyle(
color: Color(0xFF818181),
fontFamily: "JakartaMedium",
),
),
),
ListView.builder(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: provider.contactsList.length,
itemBuilder: (context, l) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
...List.generate(4, (jndex) {
final headings = [
"Alternate Mobile Number",
"Designation",
"Contact Type",
"Mail ID",
];
final values = [
provider.contactsList[l].mob2,
provider.contactsList[l].designation,
provider.contactsList[l].type,
provider.contactsList[l].mail,
];
return Container(
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 6,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: SizedBox(
child: Text(
"${headings[jndex]}",
style: TextStyle(
fontSize: 14
),
),
),
),
Expanded(
child: SizedBox(
child: Text(
values[jndex]==""?"-": "${values[jndex]}",
style: TextStyle(
fontSize:14,
color: Color(
0xFF818181,
),
),
),
),
),
],
),
);
}),
],
),
),
],
);
},
),
],
if (provider.scheduleList.isNotEmpty) ...[
Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
child: Text(
"Schedule Details",
style: TextStyle(
color: Color(0xFF818181),
fontFamily: "JakartaMedium",
),
),
),
ListView.builder(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: provider.showMoreScheduleList?provider.scheduleList.length:1,
itemBuilder: (context, l) {
final headings1 = [
"Employee Name",
"Schedule Manager Name",
"Due Date",
];
final values1 = [
provider.scheduleList[l].name,
provider.scheduleList[l].scheduleManagerName,
provider.scheduleList[l].dueDate,
];
final headings2 = [
"Complaint Type",
"Complaint Category",
"Service Schedule ID",
"Complaint Description",
"Complaint ID",
"Status",
"Feedback Status",
];
final values2 = [
provider.scheduleList[l].complaintType,
provider.scheduleList[l].complaintCategory,
provider.scheduleList[l].serviceScheduleId,
provider.scheduleList[l].complaintDescription,
provider.scheduleList[l].complaintId,
provider.scheduleList[l].feedbackStatus,
provider.scheduleList[l].status,
provider.scheduleList[l].feedbackStatus,
];
var headings = [
...headings1
];
var values = [
...values1
];
if(provider.showMoreScheduleDetails){
headings = [...headings1,...headings2];
values = [...values1,...values2];
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
child: Column(
children: [
...List.generate(headings.length, (jndex) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 6,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: SizedBox(
child: Text(
"${headings[jndex]}",
style: TextStyle(
fontSize: 14
),
),
),
),
Expanded(
child: SizedBox(
child: Text(
values[jndex]==""?"-": "${values[jndex]}",
style: TextStyle(
fontSize:14,
color: Color(
0xFF818181,
),
),
),
),
),
],
),
);
}),
InkResponse(
onTap: () async {
provider.showMoreScheduleDetails = !provider.showMoreScheduleDetails;
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
provider.showMoreScheduleDetails?"- Show Less": "+ More Details",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
],
),
),
),
],
),
),
],
);
},
),
if(provider.scheduleList.length>1)...[
InkResponse(
onTap: () async {
provider.showMoreScheduleList = !provider.showMoreScheduleList;
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
provider.showMoreScheduleList?" Show Less": " Show More",
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14,
color: AppColors.app_blue,
),
),
Transform.rotate(
angle: provider.showMoreScheduleList?180 * 3.14159 / 180:0 * 3.14159 / 180,
child: SvgPicture.asset(
"assets/svg/arrow_dropdown.svg",
color: AppColors.app_blue,
width: 25,
),
),
],
),
),
),
]
],
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
...@@ -409,7 +696,7 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -409,7 +696,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
); );
}, },
child: Container( child: Container(
alignment: Alignment.bottomCenter,
height: 45, height: 45,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
...@@ -428,18 +715,18 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -428,18 +715,18 @@ class _GeneratordetailsState extends State<Generatordetails> {
// color: AppColors.app_blue, // color: AppColors.app_blue,
// borderRadius: BorderRadius.circular(15.0), // borderRadius: BorderRadius.circular(15.0),
// ), // ),
child: Center( child: Row(
child: Row( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, children: [
children: [ SvgPicture.asset(
SvgPicture.asset( "assets/svg/gent_tag_loc.svg",
"assets/svg/gent_tag_loc.svg", width: 20,
width: 20, ),
), SizedBox(width: 10),
SizedBox(width: 10), Expanded(
Text( flex:4,
child: Text(
"Tag Location", "Tag Location",
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 15, fontSize: 15,
...@@ -448,8 +735,12 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -448,8 +735,12 @@ class _GeneratordetailsState extends State<Generatordetails> {
color: AppColors.app_blue, color: AppColors.app_blue,
), ),
), ),
], ),
), SizedBox(width: 10),
SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
),
],
), ),
), ),
), ),
...@@ -473,7 +764,7 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -473,7 +764,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
// ); // );
}, },
child: Container( child: Container(
alignment: Alignment.bottomCenter,
height: 45, height: 45,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
...@@ -492,18 +783,18 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -492,18 +783,18 @@ class _GeneratordetailsState extends State<Generatordetails> {
// color: AppColors.app_blue, // color: AppColors.app_blue,
// borderRadius: BorderRadius.circular(15.0), // borderRadius: BorderRadius.circular(15.0),
// ), // ),
child: Center( child: Row(
child: Row(
mainAxisAlignment: MainAxisAlignment.start, children: [
children: [ SvgPicture.asset(
SvgPicture.asset( "assets/svg/gent_reg_comp.svg",
"assets/svg/gent_reg_comp.svg", width: 20,
width: 20, ),
), SizedBox(width: 10),
SizedBox(width: 10), Expanded(
Text( flex:4,
child: Text(
"Register Complaint", "Register Complaint",
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 15, fontSize: 15,
...@@ -512,8 +803,13 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -512,8 +803,13 @@ class _GeneratordetailsState extends State<Generatordetails> {
color: AppColors.app_blue, color: AppColors.app_blue,
), ),
), ),
], ),
),
SizedBox(width: 10),
SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
),
],
), ),
), ),
), ),
......
...@@ -60,12 +60,12 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> { ...@@ -60,12 +60,12 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
provider.resetAll, provider.resetAll,
Row( Row(
children: [ children: [
InkResponse( // InkResponse(
onTap: () { // onTap: () {
_showOptionsSheet(context); // _showOptionsSheet(context);
}, // },
child: SvgPicture.asset("assets/svg/ic_download.svg"), // child: SvgPicture.asset("assets/svg/ic_download.svg"),
), // ),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
......
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