Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
a7dc0d35
Commit
a7dc0d35
authored
Jun 21, 2025
by
Sai Srinivas
Browse files
21-06-2025 By Sai Srinivas
test cases and CRM module Lead list and details
parent
b8ffa919
Changes
33
Show whitespace changes
Inline
Side-by-side
lib/screens/crm/contactDetails.dart
0 → 100644
View file @
a7dc0d35
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/crmProvider/crmLeadDetailsProvider.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/commonWidgets.dart'
;
class
Contactdetails
extends
StatefulWidget
{
const
Contactdetails
({
super
.
key
});
@override
State
<
Contactdetails
>
createState
()
=>
_ContactdetailsState
();
}
class
_ContactdetailsState
extends
State
<
Contactdetails
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
crmLeadDetailsProvider
>(
builder:
(
context
,
provider
,
child
)
{
var
customerDetails
=
provider
.
contactDetails
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Contact Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Contact Details"
),
ListView
.
builder
(
itemCount:
customerDetails
.
length
,
shrinkWrap:
true
,
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:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
customerDetails
[
index
].
name
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
],
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
5
,
(
j
)
{
final
textheads
=
[
"Mobile"
,
"Alternate Mobile"
,
"Telephone Number"
,
"Email"
,
"Designation"
];
final
textSubheads
=
[
customerDetails
[
index
].
mob1
??
"-"
,
customerDetails
[
index
].
mob2
??
"-"
,
customerDetails
[
index
].
tel
??
"-"
,
customerDetails
[
index
].
email
??
"-"
,
customerDetails
[
index
].
designation
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
0
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
2
,
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
),
Expanded
(
flex:
3
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
],
),
);
})],
),
);
}
),
SizedBox
(
height:
75
),
],
),
),
),
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Followup Details"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
),
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
);
}
}
lib/screens/crm/crmDashboard.dart
View file @
a7dc0d35
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/crmProvider/crmDashboardProvider.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/commonWidgets.dart'
;
import
'LeadListByMode.dart'
;
class
CrmdashboardScreen
extends
StatefulWidget
{
const
CrmdashboardScreen
({
super
.
key
});
...
...
@@ -8,8 +15,208 @@ class CrmdashboardScreen extends StatefulWidget {
}
class
_CrmdashboardScreenState
extends
State
<
CrmdashboardScreen
>
{
@override
void
initState
()
{
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
prov
=
Provider
.
of
<
Crmdashboardprovider
>(
context
,
listen:
false
);
prov
.
accessPagesAPIFunction
(
context
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
const
Placeholder
();
return
Consumer
<
Crmdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
gridPages
=
provider
.
accessPages
.
where
((
page
)
=>
![
8
,
9
,
23
,
24
].
contains
(
page
.
id
))
.
toList
();
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"CRM"
),
body:
SafeArea
(
child:
ListView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
itemCount:
gridPages
.
length
,
itemBuilder:
(
context
,
index
)
{
// final icons = ["comm_ic_1", "comm_ic_2"];
Widget
?
SvgIcon
;
if
(
gridPages
[
index
].
pageName
!.
contains
(
"Lead List"
))
{
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
);
}
else
{
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
}
return
InkResponse
(
onTap:
()
{
print
(
gridPages
[
index
].
pageName
!);
if
(
gridPages
[
index
].
pageName
!.
contains
(
"Lead List"
))
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Leadlistbymode
(
mode:
gridPages
[
index
].
mode
,
pageTitleName:
gridPages
[
index
].
pageName
,
),
),
);
}
else
{}
// switch (gridPages[index].pageName!) {
// case "Lead List":
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => Leadlistbymode()),
// );
// break;
// case "Prospect List":
// // Navigator.push(
// // context,
// // MaterialPageRoute(builder: (context) => Accountledger()),
// // );
// break;
//
// default:
// print("111");
// break;
// }
},
child:
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:
[
Expanded
(
flex:
1
,
child:
SvgIcon
),
Expanded
(
flex:
5
,
child:
Text
(
"
${gridPages[index].pageName}
"
,
style:
TextStyle
(
fontSize:
14
),
),
),
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
),
],
),
),
);
},
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkResponse
(
onTap:
()
{
_showPaymentOptionsSheet
(
context
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
Text
(
"Add Leads and Prospect"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
);
},
);
}
Future
<
void
>
_showPaymentOptionsSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
backgroundColor:
Colors
.
white
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Crmdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
accessiblePagesList
=
provider
.
accessPages
.
where
((
page
)
=>
[
8
,
9
].
contains
(
page
.
id
))
.
toList
();
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
10
,
),
child:
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
SizedBox
(
height:
15
),
...
List
.
generate
(
accessiblePagesList
.
length
,
(
index
)
{
print
(
accessiblePagesList
[
index
].
mode
);
return
ListTile
(
onTap:
()
async
{
Navigator
.
pop
(
context
);
var
res
;
},
leading:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
title:
Text
(
"
${accessiblePagesList[index].pageName}
"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
),
),
trailing:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
);
}),
],
),
),
);
},
),
);
},
);
},
);
}
}
lib/screens/crm/productDetails.dart
0 → 100644
View file @
a7dc0d35
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/crmProvider/crmLeadDetailsProvider.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/commonWidgets.dart'
;
class
Productdetails
extends
StatefulWidget
{
const
Productdetails
({
super
.
key
});
@override
State
<
Productdetails
>
createState
()
=>
_ProductdetailsState
();
}
class
_ProductdetailsState
extends
State
<
Productdetails
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
crmLeadDetailsProvider
>(
builder:
(
context
,
provider
,
child
)
{
var
customerDetails
=
provider
.
leadProducts
;
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Product Details"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Product Details"
),
ListView
.
builder
(
itemCount:
customerDetails
.
length
,
shrinkWrap:
true
,
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
(
4
,
(
j
)
{
final
textheads
=
[
"Product Name"
,
"Product Price"
,
"Quantity"
,
"Total Price"
];
final
textSubheads
=
[
customerDetails
[
index
].
productName
??
"-"
,
customerDetails
[
index
].
price
??
"-"
,
customerDetails
[
index
].
qty
??
"-"
,
customerDetails
[
index
].
price
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
0
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
2
,
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
),
Expanded
(
flex:
3
,
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
),
),
],
),
);
}),
),
);
}
),
SizedBox
(
height:
75
),
],
),
),
),
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
child:
Container
(
alignment:
Alignment
.
bottomCenter
,
height:
45
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
14.0
),
),
child:
Center
(
child:
Text
(
"Followup Details"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
),
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
),
);
},
);
}
}
lib/screens/finance/PaymentRequestionListDetails.dart
View file @
a7dc0d35
import
'dart:io'
;
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -46,6 +48,14 @@ class _PaymentrequestionlistdetailsState
FocusNode
amountNode
=
FocusNode
();
FocusNode
paymentModeNode
=
FocusNode
();
FocusNode
bankUpiIDNode
=
FocusNode
();
bool
isLevel1Finalized
=
false
;
bool
isLevel2Finalized
=
false
;
// Final decision on whether to show buttons
bool
shouldShowButtons
=
false
;
@override
void
initState
()
{
...
...
@@ -56,6 +66,7 @@ class _PaymentrequestionlistdetailsState
context
,
listen:
false
,
);
provider
.
checkDropDownReset
();
provider
.
paymentRequesitionDetails
(
context
,
widget
.
paymentRequestId
);
});
}
...
...
@@ -65,11 +76,30 @@ class _PaymentrequestionlistdetailsState
return
Consumer
<
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
var
req_det
=
provider
.
requestsDetails
;
isLevel1Finalized
=
[
"Level 1 Approved"
,
"Level 1 Rejected"
,
"Level 1 approved"
,
"Level 1 rejected"
,
].
contains
(
req_det
.
status
);
isLevel2Finalized
=
[
"Level 2 Approved"
,
"Level 2 Rejected"
,
"Level 2 approved"
,
"Level 2 rejected"
,
].
contains
(
req_det
.
status
);
if
([
"apr_lvl1"
].
contains
(
widget
.
mode
))
{
shouldShowButtons
=
!
isLevel1Finalized
;
}
else
if
([
"apr_lvl2"
].
contains
(
widget
.
mode
))
{
shouldShowButtons
=
!
isLevel2Finalized
&&
[
"Level 1 Approved"
,
"Level 1 approved"
,
].
contains
(
req_det
.
status
);
// Level 1 must be approved
}
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
widget
.
pageName
),
appBar:
appbar
2
(
context
,
widget
.
pageName
,
provider
.
resetAll
,
SizedBox
(
width:
0
,)
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
Container
(
...
...
@@ -95,7 +125,9 @@ class _PaymentrequestionlistdetailsState
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
),
...
...
@@ -106,7 +138,9 @@ class _PaymentrequestionlistdetailsState
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
req_det
.
accountName
==
""
?
"-"
:
req_det
.
accountName
??
"-"
,
req_det
.
accountName
==
""
?
"-"
:
req_det
.
accountName
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -114,7 +148,9 @@ class _PaymentrequestionlistdetailsState
),
),
Text
(
req_det
.
amount
==
""
?
"-"
:
"₹
${req_det.amount}
"
,
req_det
.
amount
==
""
?
"-"
:
"₹
${req_det.amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -171,7 +207,8 @@ class _PaymentrequestionlistdetailsState
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
...
...
@@ -179,10 +216,12 @@ class _PaymentrequestionlistdetailsState
(
context
)
=>
Fileviewer
(
fileName:
req_det
.
attachmentViewFileName
??
""
,
.
attachmentViewFileName
??
""
,
fileUrl:
req_det
.
attachmentDirFilePath
??
""
,
.
attachmentDirFilePath
??
""
,
),
),
);
...
...
@@ -192,9 +231,12 @@ class _PaymentrequestionlistdetailsState
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
(
context
)
=>
Accountslistdetails
(
accountID:
provider
.
requestsDetails
.
accountId
,
provider
.
requestsDetails
.
accountId
,
),
),
);
...
...
@@ -205,7 +247,9 @@ class _PaymentrequestionlistdetailsState
"Attachment"
,
].
contains
(
provider
.
Headings
[
j
])
?
"View"
:
provider
.
subHeadings
[
j
]==
""
?
"-"
:
provider
.
subHeadings
[
j
],
:
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
...
...
@@ -243,8 +287,7 @@ class _PaymentrequestionlistdetailsState
),
),
),
bottomNavigationBar:
([
"admin"
,
"self"
].
contains
(
widget
.
mode
))
floatingActionButton:
([
"admin"
,
"self"
].
contains
(
widget
.
mode
)
||
!
shouldShowButtons
)
?
Container
(
height:
0
)
:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
...
...
@@ -283,15 +326,11 @@ class _PaymentrequestionlistdetailsState
),
),
SizedBox
(
width:
10
),
if
([
"apr_lvl1"
,
"apr_lvl2"
,
].
contains
(
widget
.
mode
))
...[
if
([
"apr_lvl1"
,
"apr_lvl2"
].
contains
(
widget
.
mode
))
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
provider
.
approveRejectPaymentRequestAPIFunction
(
provider
.
approveRejectPaymentRequestAPIFunction
(
context
,
provider
.
requestsDetails
.
id
,
);
...
...
@@ -321,8 +360,7 @@ class _PaymentrequestionlistdetailsState
Expanded
(
child:
InkResponse
(
onTap:
()
{
provider
.
approveRejectPaymentRequestAPIFunction
(
provider
.
approveRejectPaymentRequestAPIFunction
(
context
,
provider
.
requestsDetails
.
id
,
);
...
...
@@ -353,8 +391,131 @@ class _PaymentrequestionlistdetailsState
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
// bottomNavigationBar:
// (["admin", "self"].contains(widget.mode))
// ? Container(height: 0)
// : ([
// "Level 1 Approved",
// "Level 1 Rejected",
// "Level 1 approved",
// "Level 1 rejected",
// "Level 2 Approved",
// "Level 2 Rejected",
// "Level 2 approved",
// "Level 2 rejected",
// ]).contains(req_det.status)
// ? SizedBox(height: 0)
// : Container(
// margin: EdgeInsets.symmetric(horizontal: 10),
// alignment: Alignment.bottomCenter,
// height: 60,
// child: Container(
// margin: EdgeInsets.only(bottom: 10),
// alignment: Alignment.center,
// height: 45,
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Expanded(
// child: InkResponse(
// onTap: () {
// _showLevelRejectionSheet(context);
// },
// child: Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFFFEFEF),
// border: Border.all(
// color: Color(0xFFED3424),
// width: 0.5,
// ),
// ),
// child: Center(
// child: Text(
// "Reject",
// style: TextStyle(
// color: Color(0xFFED3424),
// ),
// ),
// ),
// ),
// ),
// ),
// SizedBox(width: 10),
// if ([
// "apr_lvl1",
// "apr_lvl2",
// ].contains(widget.mode)) ...[
// Expanded(
// child: InkResponse(
// onTap: () {
// provider
// .approveRejectPaymentRequestAPIFunction(
// context,
// provider.requestsDetails.id,
// );
// _showLevelApprovalSheet(context);
// },
// child: Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFE7FFE5),
// border: Border.all(
// color: Color(0xFF0D9C00),
// width: 0.5,
// ),
// ),
// child: Center(
// child: Text(
// "Approve",
// style: TextStyle(
// color: Color(0xFF0D9C00),
// ),
// ),
// ),
// ),
// ),
// ),
// ] else if (widget.mode == "process") ...[
// Expanded(
// child: InkResponse(
// onTap: () {
// provider
// .approveRejectPaymentRequestAPIFunction(
// context,
// provider.requestsDetails.id,
// );
// _showAddPaymentSheet(context);
// },
// child: Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFE7FFE5),
// border: Border.all(
// color: Color(0xFF0D9C00),
// width: 0.5,
// ),
// ),
// child: Center(
// child: Text(
// "Add Payment",
// style: TextStyle(
// color: Color(0xFF0D9C00),
// ),
// ),
// ),
// ),
// ),
// ),
// ],
// ],
// ),
// ),
// ),
),
onWillPop:
()
{
provider
.
resetAll
();
return
onBackPressed
(
context
);
},
);
...
...
@@ -384,11 +545,14 @@ class _PaymentrequestionlistdetailsState
right:
15
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
if
(
widget
.
mode
==
"apr_lvl1"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
...
...
@@ -399,6 +563,18 @@ class _PaymentrequestionlistdetailsState
),
),
),
]
else
if
(
widget
.
mode
==
"apr_lvl2"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Level 2 Approval"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
),
),
),
],
textControllerReadonlyWidget
(
context
,
...
...
@@ -410,13 +586,19 @@ class _PaymentrequestionlistdetailsState
context
,
approvedAmount
,
"Enter Approved Amount"
,
(
p0
)
{},
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
(
p0
)
{},
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
textControllerWidget
(
context
,
remarks
,
"Enter Remarks"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
),
TextWidget
(
context
,
"Proposed Payment Account"
),
DropdownButtonHideUnderline
(
...
...
@@ -426,7 +608,7 @@ class _PaymentrequestionlistdetailsState
child:
DropdownButton2
<
PaymentAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Payment
mode
'
,
'Select Payment
Account
'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
...
...
@@ -468,6 +650,40 @@ class _PaymentrequestionlistdetailsState
}
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
false
;
},
// Optional: clear search text when dropdown closes
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
.
clear
();
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
...
...
@@ -481,7 +697,11 @@ class _PaymentrequestionlistdetailsState
),
),
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
,
...
...
@@ -585,11 +805,12 @@ class _PaymentrequestionlistdetailsState
right:
15
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
child:
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
if
(
widget
.
mode
==
"apr_lvl1"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
...
...
@@ -600,6 +821,18 @@ class _PaymentrequestionlistdetailsState
),
),
),
]
else
if
(
widget
.
mode
==
"apr_lvl2"
)
...[
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"Level 2 Rejection"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
),
),
),
],
textControllerReadonlyWidget
(
context
,
...
...
@@ -612,7 +845,10 @@ class _PaymentrequestionlistdetailsState
context
,
remarks
,
"Enter Remarks"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
),
InkWell
(
onTap:
()
{
...
...
@@ -681,6 +917,7 @@ class _PaymentrequestionlistdetailsState
right:
15
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
child:
SingleChildScrollView
(
child:
Column
(
...
...
@@ -768,7 +1005,11 @@ class _PaymentrequestionlistdetailsState
),
),
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
,
...
...
@@ -808,14 +1049,20 @@ class _PaymentrequestionlistdetailsState
context
,
paymentReferenceNumber
,
"Enter Payment Reference Number"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
),
textControllerWidget
(
context
,
remarks
,
"Enter Remarks"
,
(
p0
)
{},
TextInputType
.
text
,
false
,
null
(
p0
)
{},
TextInputType
.
text
,
false
,
null
,
),
InkResponse
(
...
...
@@ -845,27 +1092,39 @@ class _PaymentrequestionlistdetailsState
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
),),
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
,))
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
)
)
,
],
textControllerReadonlyWidget
(
context
,
...
...
@@ -1070,8 +1329,4 @@ class _PaymentrequestionlistdetailsState
},
);
}
}
lib/screens/finance/addPaymentReceiptList.dart
View file @
a7dc0d35
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
...
...
@@ -32,21 +31,25 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
});
}
@override
void
dispose
()
{
super
.
dispose
();
}
Future
<
bool
>
_onBackPressed
(
BuildContext
context
)
async
{
Navigator
.
pop
(
context
,
true
);
return
true
;
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Paymentreceiptsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
PopScope
(
canPop:
true
,
onPopInvoked:
(
didPop
)
async
{
if
(!
didPop
)
{
provider
.
resetForm
();
await
onBackPressed
(
context
);
}
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
...
...
@@ -70,7 +73,7 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
child:
DropdownButton2
<
Accounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account
Type
'
,
'Select Account'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
...
...
@@ -107,6 +110,40 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
}
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
accountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
accountSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
false
;
},
// Optional: clear search text when dropdown closes
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
accountSearchController
.
clear
();
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
...
...
@@ -158,7 +195,7 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
child:
DropdownButton2
<
ReceiptAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account
Type
'
,
'Select Account'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
...
...
@@ -202,6 +239,40 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
}
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
false
;
},
// Optional: clear search text when dropdown closes
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
.
clear
();
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
...
...
@@ -544,69 +615,65 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
),
),
),
onWillPop:
()
async
{
provider
.
resetForm
();
return
_onBackPressed
(
context
);
},
);
},
);
}
void
_showDialog
(
Widget
child
)
{
showCupertinoModalPopup
<
void
>(
context:
context
,
builder:
(
BuildContext
context
)
=>
Container
(
height:
216
,
padding:
const
EdgeInsets
.
only
(
top:
6.0
),
// The Bottom margin is provided to align the popup above the system
// navigation bar.
margin:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
// Provide a background color for the popup.
color:
CupertinoColors
.
systemBackground
.
resolveFrom
(
context
),
// Use a SafeArea widget to avoid system overlaps.
child:
SafeArea
(
top:
false
,
child:
Column
(
children:
[
Expanded
(
flex:
1
,
child:
SizedBox
(
height:
40
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
// Add a Cancel button (optional)
CupertinoButton
(
child:
Text
(
'Cancel'
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
),
onPressed:
()
{
Navigator
.
pop
(
context
);
},
),
// Add a Done button
CupertinoButton
(
child:
Text
(
'Done'
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
)),
onPressed:
()
{
Navigator
.
pop
(
context
);
// Dismiss the dialog
},
),
],
),
),
),
Expanded
(
flex:
3
,
child:
child
),
],
),
),
),
);
}
//
void _showDialog(Widget child) {
//
showCupertinoModalPopup<void>(
//
context: context,
//
builder: (BuildContext context) => Container(
//
height: 216,
//
padding: const EdgeInsets.only(top: 6.0),
//
// The Bottom margin is provided to align the popup above the system
//
// navigation bar.
//
margin: EdgeInsets.only(
//
bottom: MediaQuery.of(context).viewInsets.bottom,
//
),
//
// Provide a background color for the popup.
//
color: CupertinoColors.systemBackground.resolveFrom(context),
//
// Use a SafeArea widget to avoid system overlaps.
//
child: SafeArea(
//
top: false,
//
child: Column(
//
children: [
//
Expanded(
//
flex: 1,
//
child: SizedBox(
//
height: 40,
//
child: Row(
//
mainAxisAlignment: MainAxisAlignment.spaceBetween,
//
children: [
//
// Add a Cancel button (optional)
//
CupertinoButton(
//
child: Text(
//
'Cancel',
//
style: TextStyle(fontFamily: "JakartaMedium"),
//
),
//
onPressed: () {
//
Navigator.pop(context);
//
},
//
),
//
// Add a Done button
//
CupertinoButton(
//
child: Text('Done',
//
style: TextStyle(fontFamily: "JakartaMedium")),
//
onPressed: () {
//
Navigator.pop(context); // Dismiss the dialog
//
},
//
),
//
],
//
),
//
),
//
),
//
Expanded(flex: 3, child: child),
//
],
//
),
//
),
//
),
//
);
//
}
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
...
...
lib/screens/finance/directPaymentRequesitionList.dart
View file @
a7dc0d35
...
...
@@ -74,7 +74,7 @@ class _DirectpaymentrequesitionlistState
child:
DropdownButton2
<
DirectAccounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account
Type
'
,
'Select Account'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
...
...
@@ -111,6 +111,40 @@ class _DirectpaymentrequesitionlistState
}
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
accountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
accountSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
false
;
},
// Optional: clear search text when dropdown closes
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
accountSearchController
.
clear
();
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
...
...
@@ -157,6 +191,9 @@ class _DirectpaymentrequesitionlistState
],
),
),
errorWidget
(
context
,
provider
.
selectDirectAccountError
),
TextWidget
(
context
,
"Payment Account"
),
DropdownButtonHideUnderline
(
...
...
@@ -210,6 +247,40 @@ class _DirectpaymentrequesitionlistState
}
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
false
;
},
// Optional: clear search text when dropdown closes
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
.
clear
();
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
...
...
lib/screens/finance/submitPaymentRequestionListsByMode.dart
View file @
a7dc0d35
...
...
@@ -76,7 +76,7 @@ class _SubmitpaymentrequestionlistsbymodeState
child:
DropdownButton2
<
Accounts
>(
isExpanded:
true
,
hint:
Text
(
'Select Account
Type
'
,
'Select Account'
,
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
...
...
@@ -86,7 +86,7 @@ class _SubmitpaymentrequestionlistsbymodeState
(
accs
)
=>
DropdownMenuItem
<
Accounts
>(
value:
accs
,
child:
Text
(
accs
.
name
??
''
,
"
${
accs.name
}
"
,
style:
const
TextStyle
(
fontSize:
14
,
),
...
...
@@ -115,6 +115,40 @@ class _SubmitpaymentrequestionlistsbymodeState
}
}
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
accountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
accountSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
false
;
},
// Optional: clear search text when dropdown closes
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
accountSearchController
.
clear
();
}
},
buttonStyleData:
ButtonStyleData
(
height:
50
,
width:
160
,
...
...
@@ -455,7 +489,7 @@ class _SubmitpaymentrequestionlistsbymodeState
]
else
if
(
provider
.
paymentModeValue
==
"UPI"
)
...[
textControllerWidget
(
context
,
provider
.
amount
Controller
,
provider
.
bankUpi
Controller
,
"Enter UPI ID"
,
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
),
...
...
@@ -485,7 +519,7 @@ class _SubmitpaymentrequestionlistsbymodeState
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blu
e
),):
Text
(
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
whit
e
),):
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
...
...
lib/screens/notifierExports.dart
View file @
a7dc0d35
...
...
@@ -40,4 +40,7 @@ export 'package:generp/Notifiers/ordersProvider/addPaymentProvider.dart';
export
'package:generp/Notifiers/ordersProvider/addOrderProvider.dart'
;
export
'package:generp/Notifiers/ordersProvider/editPaymentProvider.dart'
;
export
'package:generp/Notifiers/crmProvider/crmDashboardProvider.dart'
;
export
'package:generp/Notifiers/crmProvider/LeadListProvider.dart'
;
export
'package:generp/Notifiers/crmProvider/crmLeadDetailsProvider.dart'
;
lib/screens/screensExports.dart
View file @
a7dc0d35
...
...
@@ -3,6 +3,7 @@ export 'package:generp/screens/WebERPIOS.dart';
export
"package:generp/screens/WebERPScreen.dart"
;
export
"package:generp/screens/WebWhizzdomScreen.dart"
;
export
'AttendanceScreen.dart'
;
export
'package:generp/screens/finance/financeDashboard.dart'
;
export
'package:generp/screens/genTracker/GenTrackerDashboard.dart'
;
export
'package:generp/screens/genTracker/GeneratorDetails.dart'
;
...
...
@@ -30,6 +31,7 @@ export 'package:generp/screens/finance/paymentListPaymentRequisition.dart';
export
'package:generp/screens/finance/paymentreceiptList.dart'
;
export
'package:generp/screens/finance/submitPaymentRequestionListsByMode.dart'
;
export
'package:generp/screens/order/orderModuleDashboard.dart'
;
export
'package:generp/screens/order/addPayment.dart'
;
export
'package:generp/screens/order/addOrder.dart'
;
export
'package:generp/screens/order/ordersListByModes.dart'
;
...
...
@@ -40,3 +42,5 @@ export 'package:generp/screens/order/orderDetailsFeedbackHistory.dart';
export
'package:generp/screens/order/orderDetailsPaymentHistory.dart'
;
export
'package:generp/screens/order/orderDetailsProductsHistory.dart'
;
export
'package:generp/screens/crm/crmDashboard.dart'
;
lib/screens/serviceEngineer/UpdateComplaints.dart
View file @
a7dc0d35
...
...
@@ -20,7 +20,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Pendingcomplaintsprovider
>(
context
,
listen:
false
);
provider
.
checkDropDownSelected
();
},);
...
...
@@ -95,7 +95,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
overflow:
TextOverflow
.
ellipsis
,
),
)).
toList
(),
value:
provider
.
statusID
!.
isEmpty
?
null
:
provider
.
statusID
,
value:
provider
.
statusID
,
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
provider
.
statusID
=
value
;
...
...
lib/services/api_calling.dart
View file @
a7dc0d35
...
...
@@ -6,6 +6,7 @@ import 'package:generp/Models/commonModels/DistrictsResponse.dart';
import
'package:generp/Models/commonModels/SubLocationsResponse.dart'
;
import
'package:generp/Models/commonModels/commonAccessiblePagesResponse.dart'
;
import
'package:generp/Models/commonModels/commonAddAccountsViewResponse.dart'
;
import
'package:generp/Models/crmModels/AccessiblePagesResponse.dart'
;
import
'package:generp/Models/crmModels/GetDistrictOnStateResponse.dart'
;
import
'package:generp/Models/crmModels/GetSegmentOnTeamResponse.dart'
;
import
'package:generp/Models/crmModels/GetSourceOnReferenceResponse.dart'
;
...
...
@@ -57,6 +58,7 @@ import '../Models/commonModels/commonAccountLedgerFilterResponse.dart';
import
'../Models/commonModels/commonAccountLedgerResponse.dart'
;
import
'../Models/commonModels/commonAccountdetailsResponse.dart'
;
import
'../Models/commonModels/commonAccountlistResponse.dart'
;
import
'../Models/crmModels/LeadDetailsResponse.dart'
;
import
'../Models/financeModels/addPaymentRequestionResponse.dart'
;
import
'../Models/financeModels/addReceiptPaymentResponse.dart'
;
import
'../Models/financeModels/paymentRequesitionListsResponse.dart'
;
...
...
@@ -1266,7 +1268,7 @@ class ApiCalling {
}
}
static
Future
<
addReceiptPayment
Response
?>
addPaymentRequestionSubmitAPI
(
static
Future
<
Common
Response
?>
addPaymentRequestionSubmitAPI
(
emp_id
,
session_id
,
type
,
...
...
@@ -1303,6 +1305,7 @@ class ApiCalling {
var
res
;
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
...
...
@@ -1311,10 +1314,11 @@ class ApiCalling {
"attachment"
,
);
res
=
jsonDecode
(
res
);
return
CommonResponse
.
fromJson
(
res
);
}
else
{
res
=
await
post
(
data
,
addPaymentRequestionSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
return
addReceiptPayment
Response
.
fromJson
(
res
);
return
Common
Response
.
fromJson
(
res
);
}
if
(
res
!=
null
)
{
return
res
;
...
...
@@ -1376,6 +1380,7 @@ class ApiCalling {
"attachment"
,
);
res
=
jsonDecode
(
res
);
return
addDirectPaymentResponse
.
fromJson
(
res
);
}
else
{
res
=
await
post
(
data
,
addDirectPaymentRequestionSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
...
...
@@ -1442,6 +1447,7 @@ class ApiCalling {
"attachment"
,
);
res
=
jsonDecode
(
res
);
return
addReceiptPaymentResponse
.
fromJson
(
res
);
}
else
{
res
=
await
post
(
data
,
addPaymentReceiptSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
...
...
@@ -1524,6 +1530,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
approveRejectPaymentRequestUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
approveRejectPaymentRequestResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -1557,6 +1564,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
approveRejectPaymentRequestSubmitUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
approveRejectPaymentRequestResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -1593,6 +1601,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
approveRejectPaymentRequestSubmitUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
approveRejectPaymentRequestResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -1637,6 +1646,7 @@ class ApiCalling {
"attachment"
,
);
res
=
jsonDecode
(
res
);
return
approveRejectPaymentRequestResponse
.
fromJson
(
res
);
}
else
{
res
=
await
post
(
data
,
approveRejectPaymentRequestSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
...
...
@@ -2232,8 +2242,8 @@ class ApiCalling {
}
else
{
res
=
await
post
(
data
,
ordersAddOrderSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
return
CommonResponse
.
fromJson
(
res
);
}
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
...
...
@@ -2352,8 +2362,8 @@ class ApiCalling {
}
else
{
res
=
await
post
(
data
,
ordersOrderDetailsFeedbackSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
return
CommonResponse
.
fromJson
(
res
);
}
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
...
...
@@ -2499,8 +2509,9 @@ class ApiCalling {
}
else
{
res
=
await
post
(
data
,
ordersAddPaymentSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
return
CommonResponse
.
fromJson
(
res
);
//
return CommonResponse.fromJson(res);
}
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
...
...
@@ -2826,8 +2837,9 @@ class ApiCalling {
}
else
{
res
=
await
post
(
data
,
ordersAddTPCAgentUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
return
CommonResponse
.
fromJson
(
res
);
//
return CommonResponse.fromJson(res);
}
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
...
...
@@ -2942,8 +2954,9 @@ class ApiCalling {
}
else
{
res
=
await
post
(
data
,
ordersApprovePendingTPCIssueListUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
return
CommonResponse
.
fromJson
(
res
);
//
return CommonResponse.fromJson(res);
}
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
...
...
@@ -2951,9 +2964,34 @@ class ApiCalling {
}
///CRM Module
static
Future
<
AccessiblePagesResponse
?>
crmAccessiblePagesAPI
(
empId
,
session
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
};
final
res
=
await
post
(
data
,
crmAccessiblePagesUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
AccessiblePagesResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
LeadListViewResponse
?>
crmLeadListViewAPI
(
empId
,
session
,
mode
session
,
mode
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2964,7 +3002,7 @@ class ApiCalling {
final
res
=
await
post
(
data
,
crmLeadListViewUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
debugPrint
(
"ListView:
${
res.body
}
"
);
return
LeadListViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -3014,7 +3052,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
crmLeadListFilterSubmitUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
print
(
"Filter:
${
data
}
"
);
debugPrint
(
res
.
body
);
return
SubmitLeadListFilterResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -3137,7 +3175,7 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account_id
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadList
SubLocOnDistrict
Url
,
{});
final
res
=
await
post
(
data
,
crmLeadList
ContactPopUp
Url
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
...
...
@@ -3152,6 +3190,34 @@ class ApiCalling {
}
}
static
Future
<
LeadDetailsResponse
?>
crmLeadDetailsAPI
(
empId
,
session
,
lead_id
,
mode
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead_id
).
toString
(),
'mode'
:(
mode
).
toString
()
};
final
res
=
await
post
(
data
,
crmLeadDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
LeadDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
// static Future<CommonResponse?> TpcIssueListApprovalAPI(
// empId,
...
...
lib/services/api_names.dart
View file @
a7dc0d35
...
...
@@ -119,6 +119,7 @@ const ordersApprovePendingTPCIssueListUrl = "${baseUrl_test}update_pending_tpc_i
///Crm Module
const
crmAccessiblePagesUrl
=
"
${baseUrl_test}
sales_executive_crm_accessible_pages"
;
const
crmLeadListViewUrl
=
"
${baseUrl_test}
crm_lead_list_view"
;
const
crmLeadListFilterSubmitUrl
=
"
${baseUrl_test}
submit_crm_lead_list_filter"
;
const
crmLeadListSourceOnReferenceUrl
=
"
${baseUrl_test}
get_source_on_reference"
;
...
...
pubspec.yaml
View file @
a7dc0d35
...
...
@@ -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
# 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.
version
:
1.0.8
5+89
version
:
1.0.8
6+90
environment
:
sdk
:
^3.7.2
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment