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
b9d7c024
Commit
b9d7c024
authored
Jun 23, 2025
by
Sai Srinivas
Browse files
sai srinivas
finance module updated
parent
a92809e3
Changes
11
Hide whitespace changes
Inline
Side-by-side
lib/Models/TechniciansPendingComplaintsResponse.dart
View file @
b9d7c024
...
@@ -3,8 +3,11 @@ class TechnicianPendingComplaintsResponse {
...
@@ -3,8 +3,11 @@ class TechnicianPendingComplaintsResponse {
int
?
error
;
int
?
error
;
int
?
sessionExists
;
int
?
sessionExists
;
TechnicianPendingComplaintsResponse
(
TechnicianPendingComplaintsResponse
({
{
this
.
list
,
this
.
error
,
this
.
sessionExists
});
this
.
list
,
this
.
error
,
this
.
sessionExists
,
});
TechnicianPendingComplaintsResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
TechnicianPendingComplaintsResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'list'
]
!=
null
)
{
if
(
json
[
'list'
]
!=
null
)
{
...
@@ -39,19 +42,21 @@ class TP_List {
...
@@ -39,19 +42,21 @@ class TP_List {
String
?
compRegDatetime
;
String
?
compRegDatetime
;
String
?
mobileNo
;
String
?
mobileNo
;
String
?
contactName
;
String
?
contactName
;
String
?
engineNo
;
TP_List
(
TP_List
({
{
this
.
genId
,
this
.
genId
,
this
.
address
,
this
.
address
,
this
.
loc
,
this
.
loc
,
this
.
complaintId
,
this
.
complaintId
,
this
.
companyName
,
this
.
companyName
,
this
.
productName
,
this
.
productName
,
this
.
complaintCategory
,
this
.
complaintCategory
,
this
.
compRegDatetime
,
this
.
compRegDatetime
,
this
.
mobileNo
,
this
.
mobileNo
,
this
.
contactName
,
this
.
contactName
,
});
this
.
engineNo
,
});
TP_List
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
TP_List
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
genId
=
json
[
'gen_id'
];
genId
=
json
[
'gen_id'
];
...
@@ -64,6 +69,7 @@ class TP_List {
...
@@ -64,6 +69,7 @@ class TP_List {
compRegDatetime
=
json
[
'comp_reg_datetime'
];
compRegDatetime
=
json
[
'comp_reg_datetime'
];
mobileNo
=
json
[
'mobile_no'
];
mobileNo
=
json
[
'mobile_no'
];
contactName
=
json
[
'contact_name'
];
contactName
=
json
[
'contact_name'
];
engineNo
=
json
[
'engine_number'
];
}
}
Map
<
String
,
dynamic
>
toJson
()
{
Map
<
String
,
dynamic
>
toJson
()
{
...
@@ -78,6 +84,7 @@ class TP_List {
...
@@ -78,6 +84,7 @@ class TP_List {
data
[
'comp_reg_datetime'
]
=
this
.
compRegDatetime
;
data
[
'comp_reg_datetime'
]
=
this
.
compRegDatetime
;
data
[
'mobile_no'
]
=
this
.
mobileNo
;
data
[
'mobile_no'
]
=
this
.
mobileNo
;
data
[
'contact_name'
]
=
this
.
contactName
;
data
[
'contact_name'
]
=
this
.
contactName
;
data
[
'engine_number'
]
=
this
.
engineNo
;
return
data
;
return
data
;
}
}
}
}
lib/Utils/commonWidgets.dart
View file @
b9d7c024
...
@@ -18,7 +18,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
...
@@ -18,7 +18,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
),
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
),
),
),
InkResponse
(
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
Text
(
child:
Text
(
title
,
title
,
style:
TextStyle
(
style:
TextStyle
(
...
@@ -40,7 +40,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
...
@@ -40,7 +40,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
);
);
}
}
PreferredSizeWidget
appbar2
(
BuildContext
context
,
title
,
reset
,
widget
)
{
PreferredSizeWidget
appbar2
(
BuildContext
context
,
title
,
reset
,
widget
)
{
return
AppBar
(
return
AppBar
(
automaticallyImplyLeading:
false
,
automaticallyImplyLeading:
false
,
elevation:
2.0
,
elevation:
2.0
,
...
@@ -50,14 +50,14 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
...
@@ -50,14 +50,14 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
InkResponse
(
InkResponse
(
onTap:
(){
onTap:
()
{
reset
();
reset
();
Navigator
.
pop
(
context
,
true
);
Navigator
.
pop
(
context
,
true
);
},
},
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
),
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
),
),
),
Expanded
(
Expanded
(
flex:
4
,
flex:
4
,
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
reset
();
reset
();
...
@@ -77,7 +77,7 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
...
@@ -77,7 +77,7 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
),
),
),
),
Spacer
(),
Spacer
(),
widget
widget
,
],
],
),
),
),
),
...
@@ -94,11 +94,10 @@ Future<bool> onBackPressed(BuildContext context) async {
...
@@ -94,11 +94,10 @@ Future<bool> onBackPressed(BuildContext context) async {
return
true
;
return
true
;
}
}
Widget
Emptywidget
(
BuildContext
context
){
Widget
Emptywidget
(
BuildContext
context
)
{
return
SizedBox
(
return
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.8
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.8
,
child:
Center
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
child:
Text
(
"No Data Available"
)),
);
);
}
}
...
@@ -117,14 +116,14 @@ Widget errorWidget(context, text) {
...
@@ -117,14 +116,14 @@ Widget errorWidget(context, text) {
}
}
Widget
textControllerWidget
(
Widget
textControllerWidget
(
context
,
context
,
controller
,
controller
,
hintText
,
hintText
,
Function
(
String
)?
onChanged
,
Function
(
String
)?
onChanged
,
inputtype
,
inputtype
,
readonly
,
readonly
,
inputFormatters
,
inputFormatters
,
)
{
)
{
return
Column
(
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
...
@@ -149,9 +148,9 @@ Widget textControllerWidget(
...
@@ -149,9 +148,9 @@ Widget textControllerWidget(
onChanged:
onChanged
,
onChanged:
onChanged
,
inputFormatters:
inputFormatters:
inputFormatters
!=
null
inputFormatters
!=
null
?
[
FilteringTextInputFormatter
.
digitsOnly
]
?
[
FilteringTextInputFormatter
.
digitsOnly
]
:
[],
:
[],
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
hintText
,
hintText:
hintText
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
...
@@ -169,12 +168,13 @@ Widget textControllerWidget(
...
@@ -169,12 +168,13 @@ Widget textControllerWidget(
],
],
);
);
}
}
Widget
textControllerReadonlyWidget
(
Widget
textControllerReadonlyWidget
(
context
,
context
,
controller
,
controller
,
hintText
,
hintText
,
Function
(
String
)?
onChanged
,
Function
(
String
)?
onChanged
,
)
{
)
{
return
Column
(
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
...
@@ -215,14 +215,15 @@ Widget textControllerReadonlyWidget(
...
@@ -215,14 +215,15 @@ Widget textControllerReadonlyWidget(
],
],
);
);
}
}
class
MyNavigatorObserver
extends
NavigatorObserver
{
class
MyNavigatorObserver
extends
NavigatorObserver
{
@override
@override
void
didPush
(
Route
route
,
Route
?
previousRoute
)
{
void
didPush
(
Route
route
,
Route
?
previousRoute
)
{
super
.
didPush
(
route
,
previousRoute
);
super
.
didPush
(
route
,
previousRoute
);
// Called when a route has been pushed onto the navigator.
// Called when a route has been pushed onto the navigator.
didPushed
=
"true"
;
didPushed
=
"true"
;
//
print('Route pushed: ${route.settings.name}');
print
(
'Route pushed:
${route.settings.name}
'
);
//
print('didPushed$didPushed');
print
(
'didPushed
$didPushed
'
);
}
}
@override
@override
...
@@ -230,7 +231,7 @@ class MyNavigatorObserver extends NavigatorObserver {
...
@@ -230,7 +231,7 @@ class MyNavigatorObserver extends NavigatorObserver {
super
.
didPop
(
route
,
previousRoute
);
super
.
didPop
(
route
,
previousRoute
);
didPopped
=
"true"
;
didPopped
=
"true"
;
// Called when a route has been popped off the navigator.
// Called when a route has been popped off the navigator.
//
print('Route popped: ${route.settings.name}');
print
(
'Route popped:
${route.settings.name}
'
);
//
print('didPopped${didPopped}');
print
(
'didPopped
${didPopped}
'
);
}
}
}
}
\ No newline at end of file
lib/main.dart
View file @
b9d7c024
...
@@ -57,7 +57,6 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
...
@@ -57,7 +57,6 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
void
main
(
)
async
{
void
main
(
)
async
{
WidgetsFlutterBinding
.
ensureInitialized
();
WidgetsFlutterBinding
.
ensureInitialized
();
if
(
Platform
.
isAndroid
)
{
if
(
Platform
.
isAndroid
)
{
await
Firebase
.
initializeApp
(
await
Firebase
.
initializeApp
(
options:
FirebaseOptions
(
options:
FirebaseOptions
(
...
@@ -186,25 +185,28 @@ class MyApp extends StatelessWidget {
...
@@ -186,25 +185,28 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentdetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentdetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Generatordetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Generatordetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Nearbygeneratorsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Nearbygeneratorsprovider
()),
///finance
///finance
ChangeNotifierProvider
(
create:
(
_
)
=>
Dashboardprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Dashboardprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Requestionlistprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Requestionlistprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Requesitionlidtdetailsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Requesitionlidtdetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentrequisitionpaymentslistprovider
(),),
ChangeNotifierProvider
(
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentreceiptsprovider
(),),
create:
(
_
)
=>
Paymentrequisitionpaymentslistprovider
(),
ChangeNotifierProvider
(
create:
(
_
)
=>
Commonpagesprovider
(),),
),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountslistprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentreceiptsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountdetailsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Commonpagesprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountledgerprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountslistprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Pagesdashboardprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountdetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountledgerprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Tpcagentsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Pagesdashboardprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addpaymentprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addorderprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Tpcagentsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Editpaymentprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addpaymentprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Crmdashboardprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addorderprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Leadlistprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Editpaymentprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
crmLeadDetailsProvider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Crmdashboardprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Leadlistprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
crmLeadDetailsProvider
()),
],
],
child:
Builder
(
child:
Builder
(
builder:
(
BuildContext
context
)
{
builder:
(
BuildContext
context
)
{
...
@@ -213,7 +215,7 @@ class MyApp extends StatelessWidget {
...
@@ -213,7 +215,7 @@ class MyApp extends StatelessWidget {
builder:
(
BuildContext
context
,
Widget
?
child
)
{
builder:
(
BuildContext
context
,
Widget
?
child
)
{
final
MediaQueryData
data
=
MediaQuery
.
of
(
context
);
final
MediaQueryData
data
=
MediaQuery
.
of
(
context
);
return
MediaQuery
(
return
MediaQuery
(
data:
data
.
copyWith
(
textScale
Factor:
1.0
),
data:
data
.
copyWith
(
textScale
r:
TextScaler
.
linear
(
1.0
)
)
,
child:
child
??
Container
(),
child:
child
??
Container
(),
);
);
},
},
...
@@ -271,7 +273,9 @@ class MyApp extends StatelessWidget {
...
@@ -271,7 +273,9 @@ class MyApp extends StatelessWidget {
interactive:
true
,
interactive:
true
,
radius:
Radius
.
circular
(
6
),
radius:
Radius
.
circular
(
6
),
thickness:
WidgetStatePropertyAll
(
10
),
thickness:
WidgetStatePropertyAll
(
10
),
thumbColor:
WidgetStateProperty
.
all
(
AppColors
.
grey_semi
.
withOpacity
(
0.6
))
thumbColor:
WidgetStateProperty
.
all
(
AppColors
.
grey_semi
.
withOpacity
(
0.6
),
),
),
),
),
),
home:
const
Splash
(),
home:
const
Splash
(),
...
...
lib/screens/HomeScreen.dart
View file @
b9d7c024
...
@@ -118,8 +118,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -118,8 +118,8 @@ class _MyHomePageState extends State<MyHomePage> {
"Whizzdom"
,
"Whizzdom"
,
"Common"
,
"Common"
,
"Finance"
,
"Finance"
,
"Orders"
,
//
"Orders",
"CRM"
,
//
"CRM",
];
];
final
icons
=
[
final
icons
=
[
"assets/svg/home_icons_1.svg"
,
"assets/svg/home_icons_1.svg"
,
...
@@ -131,8 +131,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -131,8 +131,8 @@ class _MyHomePageState extends State<MyHomePage> {
"assets/svg/home_icons_81.svg"
,
"assets/svg/home_icons_81.svg"
,
"assets/svg/home_icons_9.svg"
,
"assets/svg/home_icons_9.svg"
,
"assets/svg/home_icons_10.svg"
,
"assets/svg/home_icons_10.svg"
,
"assets/svg/home_icons_11.svg"
,
//
"assets/svg/home_icons_11.svg",
"assets/svg/home_icons_12.svg"
,
//
"assets/svg/home_icons_12.svg",
];
];
final
requiredRoles
=
[
final
requiredRoles
=
[
"430"
,
"430"
,
...
@@ -144,8 +144,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -144,8 +144,8 @@ class _MyHomePageState extends State<MyHomePage> {
"431"
,
"431"
,
"430"
,
"430"
,
"430"
,
"430"
,
"430"
,
//
"430",
"430"
,
//
"430",
];
];
final
filteredItems
=
<
Map
<
String
,
String
>>[];
final
filteredItems
=
<
Map
<
String
,
String
>>[];
...
@@ -204,8 +204,9 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -204,8 +204,9 @@ class _MyHomePageState extends State<MyHomePage> {
flex:
2
,
flex:
2
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
SizedBox
(
SizedBox
(
width:
66
,
width:
66
,
...
@@ -217,7 +218,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -217,7 +218,8 @@ class _MyHomePageState extends State<MyHomePage> {
child:
CachedNetworkImage
(
child:
CachedNetworkImage
(
cacheKey:
profile
.
profileImage
,
cacheKey:
profile
.
profileImage
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
imageUrl:
"
${profile.profileImage}
"
,
imageUrl:
"
${profile.profileImage}
"
,
useOldImageOnUrlChange:
false
,
useOldImageOnUrlChange:
false
,
placeholder:
placeholder:
(
context
,
url
)
=>
(
context
,
url
)
=>
...
@@ -228,7 +230,7 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -228,7 +230,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
),
),
),
),
Row
(
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
center
,
MainAxisAlignment
.
center
,
...
@@ -266,7 +268,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -266,7 +268,8 @@ class _MyHomePageState extends State<MyHomePage> {
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Text
(
Text
(
"
${profile.employeeName}
"
,
"
${profile.employeeName}
"
,
...
@@ -341,7 +344,7 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -341,7 +344,7 @@ class _MyHomePageState extends State<MyHomePage> {
top:
0
,
top:
0
,
bottom:
10
,
bottom:
10
,
),
),
margin:
EdgeInsets
.
only
(
top:
10
),
margin:
EdgeInsets
.
only
(
top:
10
),
child:
GridView
.
builder
(
child:
GridView
.
builder
(
itemCount:
filteredItems
.
length
,
itemCount:
filteredItems
.
length
,
gridDelegate:
gridDelegate:
...
@@ -394,14 +397,15 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -394,14 +397,15 @@ class _MyHomePageState extends State<MyHomePage> {
}
else
{
}
else
{
requestGpsPermission
();
requestGpsPermission
();
}
}
break
;
break
;
case
"Gen Tracker"
:
case
"Gen Tracker"
:
res
=
await
Navigator
.
push
(
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
Gentrackerdashboard
(),
(
context
)
=>
Gentrackerdashboard
(),
),
),
);
);
break
;
break
;
...
@@ -423,13 +427,14 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -423,13 +427,14 @@ class _MyHomePageState extends State<MyHomePage> {
(
context
)
=>
Nearbygenerators
(),
(
context
)
=>
Nearbygenerators
(),
),
),
);
);
break
;
break
;
case
"Inventory"
:
case
"Inventory"
:
res
=
await
Navigator
.
push
(
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
context
)
=>
InventoryScreen
(),
builder:
(
context
)
=>
InventoryScreen
(),
),
),
);
);
break
;
break
;
...
@@ -443,7 +448,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -443,7 +448,8 @@ class _MyHomePageState extends State<MyHomePage> {
builder:
builder:
(
context
)
=>
WebWhizzdomScreen
(
(
context
)
=>
WebWhizzdomScreen
(
whizzdom_url:
whizzdom_url:
homescreen
.
whizzdomPageUrl
,
homescreen
.
whizzdomPageUrl
,
),
),
),
),
);
);
...
@@ -455,7 +461,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -455,7 +461,8 @@ class _MyHomePageState extends State<MyHomePage> {
res
=
await
Navigator
.
push
(
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
context
)
=>
Commondashboard
(),
builder:
(
context
)
=>
Commondashboard
(),
),
),
);
);
break
;
break
;
...
@@ -473,10 +480,11 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -473,10 +480,11 @@ class _MyHomePageState extends State<MyHomePage> {
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
Ordermoduledashboard
(),
(
context
)
=>
Ordermoduledashboard
(),
),
),
);
);
case
"CRM"
:
case
"CRM"
:
res
=
await
Navigator
.
push
(
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
@@ -498,10 +506,14 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -498,10 +506,14 @@ class _MyHomePageState extends State<MyHomePage> {
borderRadius:
BorderRadius
.
circular
(
30
),
borderRadius:
BorderRadius
.
circular
(
30
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
SvgPicture
.
asset
(
item
[
'icon'
]!,
height:
45
),
SvgPicture
.
asset
(
item
[
'icon'
]!,
height:
45
,
),
SizedBox
(
height:
10
),
SizedBox
(
height:
10
),
Text
(
item
[
'name'
]!),
Text
(
item
[
'name'
]!),
],
],
...
...
lib/screens/finance/PaymentRequestionListDetails.dart
View file @
b9d7c024
...
@@ -32,7 +32,6 @@ class Paymentrequestionlistdetails extends StatefulWidget {
...
@@ -32,7 +32,6 @@ class Paymentrequestionlistdetails extends StatefulWidget {
class
_PaymentrequestionlistdetailsState
class
_PaymentrequestionlistdetailsState
extends
State
<
Paymentrequestionlistdetails
>
{
extends
State
<
Paymentrequestionlistdetails
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
Dropdowntheme
ddtheme
=
Dropdowntheme
();
TextEditingController
approvedAmount
=
TextEditingController
();
TextEditingController
approvedAmount
=
TextEditingController
();
TextEditingController
remarks
=
TextEditingController
();
TextEditingController
remarks
=
TextEditingController
();
...
@@ -55,11 +54,9 @@ class _PaymentrequestionlistdetailsState
...
@@ -55,11 +54,9 @@ class _PaymentrequestionlistdetailsState
bool
isLevel2Finalized
=
false
;
bool
isLevel2Finalized
=
false
;
// Final decision on whether to show buttons
// Final decision on whether to show buttons
bool
shouldShowButtons
=
false
;
bool
shouldShowButtons
=
false
;
@override
@override
void
initState
()
{
void
initState
()
{
// TODO: implement initState
// TODO: implement initState
...
@@ -95,11 +92,13 @@ class _PaymentrequestionlistdetailsState
...
@@ -95,11 +92,13 @@ class _PaymentrequestionlistdetailsState
if
(
widget
.
mode
==
"apr_lvl1"
)
{
if
(
widget
.
mode
==
"apr_lvl1"
)
{
shouldShowButtons
=
!
isLevel1Finalized
;
shouldShowButtons
=
!
isLevel1Finalized
;
}
else
if
(
widget
.
mode
==
"apr_lvl2"
)
{
}
else
if
(
widget
.
mode
==
"apr_lvl2"
)
{
shouldShowButtons
=
!
isLevel2Finalized
&&
[
shouldShowButtons
=
"Requested"
,
!
isLevel2Finalized
&&
"Level 1 Approved"
,
[
"Level 1 approved"
,
"Requested"
,
].
contains
(
req_det
.
status
);
"Level 1 Approved"
,
"Level 1 approved"
,
].
contains
(
req_det
.
status
);
}
else
if
(
widget
.
mode
==
"process"
)
{
}
else
if
(
widget
.
mode
==
"process"
)
{
shouldShowButtons
=
[
shouldShowButtons
=
[
"Level 2 Approved"
,
"Level 2 Approved"
,
...
@@ -109,7 +108,12 @@ class _PaymentrequestionlistdetailsState
...
@@ -109,7 +108,12 @@ class _PaymentrequestionlistdetailsState
return
WillPopScope
(
return
WillPopScope
(
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageName
,
provider
.
resetAll
,
SizedBox
(
width:
0
,)),
appBar:
appbar2
(
context
,
widget
.
pageName
,
provider
.
resetAll
,
SizedBox
(
width:
0
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
body:
SafeArea
(
child:
Container
(
child:
Container
(
...
@@ -199,8 +203,8 @@ class _PaymentrequestionlistdetailsState
...
@@ -199,8 +203,8 @@ class _PaymentrequestionlistdetailsState
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
if
(
provider
.
Headings
[
j
]
==
if
(
provider
.
Headings
[
j
]
==
"Attachment"
&&
"Attachment"
&&
req_det
.
attachmentViewFileName
==
""
){
req_det
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
return
SizedBox
.
shrink
();
}
}
return
Container
(
return
Container
(
...
@@ -301,113 +305,129 @@ class _PaymentrequestionlistdetailsState
...
@@ -301,113 +305,129 @@ class _PaymentrequestionlistdetailsState
),
),
),
),
),
),
floatingActionButton:
([
"admin"
,
"self"
].
contains
(
widget
.
mode
)
||
!
shouldShowButtons
)
floatingActionButton:
?
Container
(
height:
0
)
([
"admin"
,
"self"
].
contains
(
widget
.
mode
)
||
!
shouldShowButtons
)
:
Container
(
?
Container
(
height:
0
)
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
:
Container
(
alignment:
Alignment
.
bottomCenter
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
height:
60
,
alignment:
Alignment
.
bottomCenter
,
child:
Container
(
height:
60
,
margin:
EdgeInsets
.
only
(
bottom:
10
),
child:
Container
(
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
only
(
bottom:
10
),
height:
45
,
alignment:
Alignment
.
center
,
child:
Row
(
height:
45
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
child:
Row
(
children:
[
mainAxisAlignment:
MainAxisAlignment
.
center
,
Expanded
(
children:
[
child:
InkResponse
(
Expanded
(
onTap:
()
{
child:
InkResponse
(
_showLevelRejectionSheet
(
context
);
onTap:
()
{
},
print
(
provider
.
requestsDetails
.
id
);
child:
Container
(
_showLevelRejectionSheet
(
decoration:
BoxDecoration
(
context
,
borderRadius:
BorderRadius
.
circular
(
8
),
provider
.
requestsDetails
.
id
,
color:
Color
(
0xFFFFEFEF
),
);
border:
Border
.
all
(
},
color:
Color
(
0xFFED3424
),
child:
Container
(
width:
0.5
,
decoration:
BoxDecoration
(
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
color:
Color
(
0xFFFFEFEF
),
child:
Center
(
border:
Border
.
all
(
child:
Text
(
color:
Color
(
0xFFED3424
),
"Reject"
,
width:
0.5
,
style:
TextStyle
(
),
color:
Color
(
0xFFED3424
),
),
),
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
),
),
),
),
),
),
),
),
SizedBox
(
width:
10
),
),
if
([
),
"apr_lvl1"
,
]
"apr_lvl2"
,
else
if
(
widget
.
mode
==
"process"
)
...[
].
contains
(
widget
.
mode
))
...[
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
provider
.
approveRejectPaymentRequestAPIFunction
(
provider
context
,
.
approveRejectPaymentRequestAPIFunction
(
provider
.
requestsDetails
.
id
,
context
,
);
provider
.
requestsDetails
.
id
,
provider
.
preValues
();
);
_showAddPaymentSheet
(
context
);
_showLevelApprovalSheet
(
},
context
,
child:
Container
(
provider
.
requestsDetails
.
id
,
decoration:
BoxDecoration
(
);
borderRadius:
BorderRadius
.
circular
(
8
),
},
color:
Color
(
0xFFE7FFE5
),
child:
Container
(
border:
Border
.
all
(
decoration:
BoxDecoration
(
color:
Color
(
0xFF0D9C00
),
borderRadius:
BorderRadius
.
circular
(
8
),
width:
0.5
,
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"
)
...[
child:
Center
(
Expanded
(
child:
Text
(
child:
InkResponse
(
"Add Payment"
,
onTap:
()
{
style:
TextStyle
(
provider
color:
Color
(
0xFF0D9C00
),
.
approveRejectPaymentRequestAPIFunction
(
context
,
provider
.
requestsDetails
.
id
,
);
provider
.
preValues
();
_showAddPaymentSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
},
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
),
),
),
),
),
),
),
),
),
)
,
]
,
)
,
]
,
),
),
),
),
],
),
],
floatingActionButtonLocation:
),
FloatingActionButtonLocation
.
centerFloat
,
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
// bottomNavigationBar:
// bottomNavigationBar:
// (["admin", "self"].contains(widget.mode))
// (["admin", "self"].contains(widget.mode))
// ? Container(height: 0)
// ? Container(height: 0)
...
@@ -539,7 +559,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -539,7 +559,7 @@ class _PaymentrequestionlistdetailsState
);
);
}
}
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
)
{
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
isDismissible:
true
,
isDismissible:
true
,
...
@@ -561,7 +581,9 @@ class _PaymentrequestionlistdetailsState
...
@@ -561,7 +581,9 @@ class _PaymentrequestionlistdetailsState
right:
15
,
right:
15
,
top:
10
,
top:
10
,
),
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
...
@@ -668,42 +690,53 @@ class _PaymentrequestionlistdetailsState
...
@@ -668,42 +690,53 @@ class _PaymentrequestionlistdetailsState
},
},
dropdownSearchData:
DropdownSearchData
(
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchInnerWidgetHeight:
50
,
searchController:
provider
.
paymentAccountSearchController
,
searchController:
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
child:
TextFormField
(
controller:
provider
.
paymentAccountSearchController
,
controller:
provider
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
contentPadding:
horizontal:
10
,
const
EdgeInsets
.
symmetric
(
vertical:
8
,
horizontal:
10
,
),
vertical:
8
,
),
hintText:
'Search account...'
,
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
return
item
.
value
?.
name
?.
toLowerCase
()
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
false
;
},
},
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
),
),
onMenuStateChange:
(
isOpen
)
{
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
.
clear
();
provider
.
paymentAccountSearchController
.
clear
();
}
}
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
menuItemStyleData:
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
),
),
],
],
...
@@ -715,7 +748,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -715,7 +748,7 @@ class _PaymentrequestionlistdetailsState
.
paymentrequisitionApproveSubmitAPIFunction
(
.
paymentrequisitionApproveSubmitAPIFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
p
rovider
.
paymentsReqDetails
.
id
,
p
aymentID
,
approvedAmount
.
text
,
approvedAmount
.
text
,
remarks
.
text
,
remarks
.
text
,
provider
.
selectedID
,
provider
.
selectedID
,
...
@@ -737,6 +770,8 @@ class _PaymentrequestionlistdetailsState
...
@@ -737,6 +770,8 @@ class _PaymentrequestionlistdetailsState
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
"Submit"
,
"Submit"
,
///approve
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
style:
TextStyle
(
color:
Colors
.
white
),
),
),
...
@@ -756,7 +791,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -756,7 +791,7 @@ class _PaymentrequestionlistdetailsState
);
);
}
}
Future
<
void
>
_showLevelRejectionSheet
(
BuildContext
context
)
{
Future
<
void
>
_showLevelRejectionSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
isDismissible:
true
,
isDismissible:
true
,
...
@@ -778,7 +813,9 @@ class _PaymentrequestionlistdetailsState
...
@@ -778,7 +813,9 @@ class _PaymentrequestionlistdetailsState
right:
15
,
right:
15
,
top:
10
,
top:
10
,
),
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
...
@@ -829,7 +866,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -829,7 +866,7 @@ class _PaymentrequestionlistdetailsState
.
paymentrequisitionRejectSubmitAPIFunction
(
.
paymentrequisitionRejectSubmitAPIFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
p
rovider
.
paymentsReqDetails
.
id
,
p
aymentID
,
remarks
.
text
,
remarks
.
text
,
);
);
},
},
...
@@ -849,6 +886,8 @@ class _PaymentrequestionlistdetailsState
...
@@ -849,6 +886,8 @@ class _PaymentrequestionlistdetailsState
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
"Submit"
,
"Submit"
,
///reject
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
style:
TextStyle
(
color:
Colors
.
white
),
),
),
...
@@ -868,7 +907,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -868,7 +907,7 @@ class _PaymentrequestionlistdetailsState
);
);
}
}
Future
<
void
>
_showAddPaymentSheet
(
BuildContext
context
)
{
Future
<
void
>
_showAddPaymentSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
isDismissible:
true
,
isDismissible:
true
,
...
@@ -890,7 +929,9 @@ class _PaymentrequestionlistdetailsState
...
@@ -890,7 +929,9 @@ class _PaymentrequestionlistdetailsState
right:
15
,
right:
15
,
top:
10
,
top:
10
,
),
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
...
@@ -967,8 +1008,10 @@ class _PaymentrequestionlistdetailsState
...
@@ -967,8 +1008,10 @@ class _PaymentrequestionlistdetailsState
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
menuItemStyleData:
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
),
),
],
],
...
@@ -1138,7 +1181,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -1138,7 +1181,7 @@ class _PaymentrequestionlistdetailsState
.
paymentrequisitionProcessSubmitAPIFunction
(
.
paymentrequisitionProcessSubmitAPIFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
p
rovider
.
paymentsReqDetails
.
id
,
p
aymentID
,
paymentReferenceNumber
.
text
,
paymentReferenceNumber
.
text
,
remarks
.
text
,
remarks
.
text
,
provider
.
imagePath
,
provider
.
imagePath
,
...
@@ -1160,6 +1203,8 @@ class _PaymentrequestionlistdetailsState
...
@@ -1160,6 +1203,8 @@ class _PaymentrequestionlistdetailsState
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
"Submit"
,
"Submit"
,
///add payment
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
style:
TextStyle
(
color:
Colors
.
white
),
),
),
...
...
lib/screens/serviceEngineer/PendingComplaints.dart
View file @
b9d7c024
...
@@ -55,193 +55,214 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -55,193 +55,214 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
child:
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
child:
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
),
),
),
),
body:
SafeArea
(
child:
provider
.
technician_complaint_list
.
isNotEmpty
?
Container
(
body:
SafeArea
(
child:
ListView
.
builder
(
child:
scrollDirection:
Axis
.
vertical
,
provider
.
technician_complaint_list
.
isNotEmpty
shrinkWrap:
true
,
?
Container
(
itemCount:
provider
.
technician_complaint_list
.
length
,
child:
ListView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
scrollDirection:
Axis
.
vertical
,
horizontal:
10
,
shrinkWrap:
true
,
vertical:
10
,
itemCount:
provider
.
technician_complaint_list
.
length
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
vertical:
10
,
),
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
),
SizedBox
(
width:
5
),
Expanded
(
flex:
4
,
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Row
(
"
${provider.technician_complaint_list[index].contactName}
"
,
crossAxisAlignment:
maxLines:
1
,
CrossAxisAlignment
.
center
,
overflow:
TextOverflow
.
ellipsis
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
style:
TextStyle
(
children:
[
fontFamily:
"JakartaMedium"
,
Expanded
(
),
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
SizedBox
(
width:
5
),
Expanded
(
flex:
4
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${provider.technician_complaint_list[index].contactName}
"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
),
Text
(
"
${provider.technician_complaint_list[index].companyName}
"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
),
],
),
),
Spacer
(),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${provider.technician_complaint_list[index].mobileNo}
'
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/se_call_customer.svg"
,
color:
Color
(
0xFF0D9C00
),
height:
20
,
width:
20
,
),
),
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
_showOptionsSheet
(
context
,
provider
.
technician_complaint_list
[
index
]
.
companyName
,
provider
.
technician_complaint_list
[
index
]
.
genId
,
provider
.
technician_complaint_list
[
index
]
.
complaintId
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
,
),
),
),
],
),
),
Text
(
Divider
(
"
${provider.technician_complaint_list[index].companyName}
"
,
thickness:
0.5
,
maxLines:
1
,
color:
Color
(
0xFFD7D7D7
),
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
),
),
],
...
List
.
generate
(
4
,
(
j
)
{
),
final
textheads
=
[
),
"Complaint ID"
,
Spacer
(),
"Product Name"
,
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${provider.technician_complaint_list[index].mobileNo}
'
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/se_call_customer.svg"
,
color:
Color
(
0xFF0D9C00
),
height:
20
,
width:
20
,
),
),
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
_showOptionsSheet
(
context
,
provider
.
technician_complaint_list
[
index
]
.
companyName
,
provider
"Engine Number"
,
.
technician_complaint_list
[
index
]
"Address"
,
.
genId
,
];
provider
final
textSubheads
=
[
.
technician_complaint_list
[
index
]
provider
.
complaintId
,
.
technician_complaint_list
[
index
]
);
.
complaintId
,
},
provider
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
,),
.
technician_complaint_list
[
index
]
),
.
productName
,
),
provider
],
.
technician_complaint_list
[
index
]
),
.
engineNo
,
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
provider
...
List
.
generate
(
3
,
(
j
)
{
.
technician_complaint_list
[
index
]
final
textheads
=
[
.
address
,
"Complaint ID"
,
];
"Product Name"
,
return
Container
(
"Address"
,
padding:
EdgeInsets
.
symmetric
(
];
vertical:
3
,
final
textSubheads
=
[
),
provider
child:
Row
(
.
technician_complaint_list
[
index
]
crossAxisAlignment:
.
complaintId
,
CrossAxisAlignment
.
start
,
provider
children:
[
.
technician_complaint_list
[
index
]
Expanded
(
.
productName
,
flex:
1
,
provider
child:
Text
(
.
technician_complaint_list
[
index
]
textheads
[
j
].
toString
(),
.
address
,
style:
TextStyle
(
];
fontFamily:
"JakartaMedium"
,
return
Container
(
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
),
child:
Row
(
),
crossAxisAlignment:
Expanded
(
CrossAxisAlignment
.
start
,
flex:
2
,
children:
[
child:
Text
(
Expanded
(
textSubheads
[
j
].
toString
(),
flex:
1
,
style:
TextStyle
(
child:
Text
(
color:
Color
(
0xFF818181
),
textheads
[
j
].
toString
(),
),
style:
TextStyle
(
),
fontFamily:
"JakartaMedium"
,
),
),
],
),
),
),
);
Expanded
(
}),
flex:
2
,
InkResponse
(
child:
Text
(
onTap:
()
{
textSubheads
[
j
].
toString
(),
Navigator
.
push
(
style:
TextStyle
(
context
,
color:
Color
(
0xFF818181
),
MaterialPageRoute
(
builder:
(
context
)
=>
Visitdetails
(
complaintID:
provider
.
technician_complaint_list
[
index
]
.
complaintId
,
),
),
);
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
),
),
],
],
),
);
}),
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Visitdetails
(
complaintID:
provider
.
technician_complaint_list
[
index
]
.
complaintId
,
),
),
),
);
);
},
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
)
),
:
Emptywidget
(
context
),
);
),
},
),
):
Emptywidget
(
context
),)
),
),
);
);
},
},
...
@@ -346,9 +367,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -346,9 +367,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
leading:
SvgPicture
.
asset
(
leading:
SvgPicture
.
asset
(
"assets/svg/
${assetnames[index]}
.svg"
,
"assets/svg/
${assetnames[index]}
.svg"
,
),
),
title:
Text
(
Headingnames
[
index
],
style:
TextStyle
(
title:
Text
(
fontFamily:
"JakartaMedium"
Headingnames
[
index
],
),),
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
),
trailing:
SvgPicture
.
asset
(
trailing:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
"assets/svg/arrow_right_new.svg"
,
),
),
...
...
lib/screens/serviceEngineer/UpdateComplaints.dart
View file @
b9d7c024
...
@@ -10,7 +10,7 @@ import '../../Utils/dropdownTheme.dart';
...
@@ -10,7 +10,7 @@ import '../../Utils/dropdownTheme.dart';
class
Updatecomplaints
extends
StatefulWidget
{
class
Updatecomplaints
extends
StatefulWidget
{
final
ComplaintID
;
final
ComplaintID
;
const
Updatecomplaints
({
super
.
key
,
required
this
.
ComplaintID
});
const
Updatecomplaints
({
super
.
key
,
required
this
.
ComplaintID
});
@override
@override
State
<
Updatecomplaints
>
createState
()
=>
_UpdatecomplaintsState
();
State
<
Updatecomplaints
>
createState
()
=>
_UpdatecomplaintsState
();
...
@@ -18,14 +18,17 @@ class Updatecomplaints extends StatefulWidget {
...
@@ -18,14 +18,17 @@ class Updatecomplaints extends StatefulWidget {
class
_UpdatecomplaintsState
extends
State
<
Updatecomplaints
>
{
class
_UpdatecomplaintsState
extends
State
<
Updatecomplaints
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
Dropdowntheme
ddtheme
=
Dropdowntheme
();
@override
@override
void
initState
()
{
void
initState
()
{
// TODO: implement initState
// TODO: implement initState
super
.
initState
();
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Pendingcomplaintsprovider
>(
context
,
listen:
false
);
final
provider
=
Provider
.
of
<
Pendingcomplaintsprovider
>(
context
,
listen:
false
,
);
provider
.
checkDropDownSelected
();
provider
.
checkDropDownSelected
();
}
,
);
});
}
}
@override
@override
...
@@ -40,14 +43,19 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -40,14 +43,19 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},
},
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Update Complaint"
,
provider
.
resetAll
,
SizedBox
(
width:
0
,)),
appBar:
appbar2
(
context
,
"Update Complaint"
,
provider
.
resetAll
,
SizedBox
(
width:
0
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
body:
SafeArea
(
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
)
borderRadius:
BorderRadius
.
circular
(
20
)
,
),
),
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
...
@@ -55,7 +63,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -55,7 +63,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
children:
[
SizedBox
(
height:
15
),
SizedBox
(
height:
15
),
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
child:
Text
(
...
@@ -77,26 +85,26 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -77,26 +85,26 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
'Select Complaint Status'
,
'Select Complaint Status'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
),
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
],
],
),
),
items:
provider
.
CompletedStatus
.
map
(
items:
(
complaintStatus
)
=>
provider
.
CompletedStatus
.
map
(
DropdownMenuItem
<
String
>(
(
complaintStatus
)
=>
value:
complaintStatus
[
'name'
],
DropdownMenuItem
<
String
>(
child:
Text
(
value:
complaintStatus
[
'name'
],
complaintStatus
[
'name'
]
??
''
,
child:
Text
(
style:
const
TextStyle
(
complaintStatus
[
'name'
]
??
''
,
fontSize:
14
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
).
toList
(),
).
toList
(),
value:
provider
.
statusID
,
value:
provider
.
statusID
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
...
@@ -114,10 +122,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -114,10 +122,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
],
],
),
),
),
),
SizedBox
(
height:
5
,
),
SizedBox
(
height:
5
),
ErrorWidget
(
context
,
provider
.
statusError
),
ErrorWidget
(
context
,
provider
.
statusError
),
if
(
provider
.
statusID
!=
null
)...[
if
(
provider
.
statusID
!=
"Pending"
)...[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
child:
Text
(
...
@@ -128,57 +134,47 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -128,57 +134,47 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
),
),
),
Container
(
Container
(
height:
50
,
height:
50
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
borderRadius:
borderRadius:
BorderRadius
.
circular
(
14
),
BorderRadius
.
circular
(
14
),
),
),
child:
Padding
(
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
padding:
child:
TextFormField
(
const
EdgeInsets
.
fromLTRB
(
controller:
provider
.
fsrNumberController
,
10.0
,
0.0
,
10
,
0
),
keyboardType:
TextInputType
.
text
,
child:
TextFormField
(
onChanged:
(
value
)
{
controller:
provider
.
fsrError
=
""
;
provider
.
fsrNumberController
,
},
keyboardType:
decoration:
InputDecoration
(
TextInputType
.
text
,
hintText:
"Enter FSR Number"
,
onChanged:
(
value
)
{
hintStyle:
TextStyle
(
provider
.
fsrError
=
""
;
fontWeight:
FontWeight
.
w400
,
},
color:
Color
(
0xFFB4BEC0
),
decoration:
InputDecoration
(
fontSize:
14
,
hintText:
"Enter FSR Number"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
SizedBox
(
height:
5
,
),
),
ErrorWidget
(
context
,
provider
.
fsrError
)
)
,
]
SizedBox
(
height:
5
),
]
,
ErrorWidget
(
context
,
provider
.
fsrError
)
,
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Padding
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
5.0
,
vertical:
3
),
horizontal:
5.0
,
vertical:
3
,
),
child:
Text
(
child:
Text
(
"Select Time"
,
"Select Time"
,
style:
TextStyle
(
style:
TextStyle
(
...
@@ -191,7 +187,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -191,7 +187,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Expanded
(
Expanded
(
child:
Padding
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
20.0
),
horizontal:
20.0
,
),
child:
Text
(
child:
Text
(
"Running Hours"
,
"Running Hours"
,
style:
TextStyle
(
style:
TextStyle
(
...
@@ -201,88 +198,83 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -201,88 +198,83 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
),
),
),
],
],
),
),
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
borderRadius:
borderRadius:
BorderRadius
.
circular
(
14
),
BorderRadius
.
circular
(
14
),
),
),
child:
InkWell
(
child:
InkWell
(
onTap:
()
{
onTap:
()
{
provider
.
selectTime
(
context
);
provider
.
selectTime
(
context
);
},
},
child:
Container
(
child:
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
45
,
height:
45
,
margin:
EdgeInsets
.
only
(
margin:
left:
15.0
,
EdgeInsets
.
only
(
right:
15.0
,
left:
15.0
,
right:
15.0
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
borderRadius:
BorderRadius
.
circular
(
15.0
),
15.0
),
),
),
child:
Row
(
child:
Row
(
children:
[
children:
[
Text
(
Text
(
provider
.
selectedTime
.
hour
provider
.
selectedTime
.
hour
.
toString
()
+
.
toString
()
+
":"
+
":"
+
provider
.
selectedTime
.
minute
provider
.
selectedTime
.
minute
.
toString
()
??
.
toString
()
??
"Enter in Time"
,
"Enter in Time"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
),
fontWeight:
FontWeight
.
w400
,
),
),
),
]
)
,
],
),
),
)),
),
),
),
),
),
SizedBox
(
width:
10
,
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
height:
50
,
height:
50
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
borderRadius:
borderRadius:
BorderRadius
.
circular
(
14
),
BorderRadius
.
circular
(
14
),
),
),
child:
Padding
(
child:
Padding
(
padding:
padding:
const
EdgeInsets
.
fromLTRB
(
const
EdgeInsets
.
fromLTRB
(
10.0
,
10.0
,
0.0
,
10
,
0
),
0.0
,
10
,
0
,
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller:
provider
.
runningHoursController
,
provider
.
runningHoursController
,
keyboardType:
TextInputType
.
text
,
keyboardType:
TextInputType
.
text
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{
provider
.
runningHoursError
=
""
;
provider
.
runningHoursError
=
""
;
},
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
"Enter Running Hours"
,
hintText:
"Enter Running Hours"
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
fontSize:
14
,
),
),
enabledBorder:
enabledBorder:
InputBorder
.
none
,
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
),
),
...
@@ -290,11 +282,15 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -290,11 +282,15 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
],
],
),
),
Row
(
Row
(
children:
[
children:
[
Expanded
(
child:
SizedBox
()),
Expanded
(
child:
SizedBox
()),
SizedBox
(
width:
10
,),
SizedBox
(
width:
10
),
Expanded
(
child:
ErrorWidget
(
context
,
provider
.
runningHoursError
)),
Expanded
(
child:
ErrorWidget
(
context
,
provider
.
runningHoursError
,
),
),
],
],
),
),
InkResponse
(
InkResponse
(
...
@@ -304,44 +300,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -304,44 +300,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
height:
45
,
width:
MediaQuery
width:
MediaQuery
.
of
(
context
).
size
.
width
,
.
of
(
context
)
.
size
.
width
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
)
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
),
child:
Center
(
child:
Center
(
child:
Text
(
"Scan Document"
,
style:
TextStyle
(
child:
Text
(
color:
AppColors
.
app_blue
"Scan Document"
,
),),
style:
TextStyle
(
color:
AppColors
.
app_blue
),
),
),
),
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Text
(
color:
AppColors
.
semi_black
,
"
${provider.imagePath}
"
,
fontSize:
11
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w600
color:
AppColors
.
semi_black
,
),),
fontSize:
11
,
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
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
,
),
),
],
],
),
),
)
)
,
],
],
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
...
@@ -355,60 +360,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -355,60 +360,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
Container
(
Container
(
height:
150
,
height:
150
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
color:
AppColors
.
text_field_color
,
borderRadius:
borderRadius:
BorderRadius
.
circular
(
14
),
BorderRadius
.
circular
(
14
),
),
),
child:
Padding
(
child:
Padding
(
padding:
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller:
provider
.
feedbackController
,
provider
.
feedbackController
,
maxLines:
60
,
maxLines:
60
,
keyboardType:
keyboardType:
TextInputType
.
text
,
TextInputType
.
text
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
"Enter Feedback"
,
hintText:
"Enter Feedback"
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
fontSize:
14
,
),
),
enabledBorder:
enabledBorder:
InputBorder
.
none
,
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
),
),
),
),
],
],
),
),
),
),
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkResponse
(
floatingActionButton:
InkResponse
(
onTap:
provider
.
submitLoading
?
null
:
()
{
onTap:
provider
.
submitLoading
=
true
;
provider
.
submitLoading
provider
.
UpdateComplaintAPIFunction
(
?
null
context
,
:
()
{
widget
.
ComplaintID
,
provider
.
submitLoading
=
true
;
provider
.
feedbackController
.
text
,
provider
.
UpdateComplaintAPIFunction
(
provider
.
fsrNumberController
.
text
,
context
,
provider
.
runningHoursController
.
text
,
widget
.
ComplaintID
,
provider
.
statusID
);
provider
.
feedbackController
.
text
,
},
provider
.
fsrNumberController
.
text
,
provider
.
runningHoursController
.
text
,
provider
.
statusID
,
);
},
child:
Container
(
child:
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
45
,
height:
45
,
...
@@ -423,32 +421,38 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -423,32 +421,38 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
borderRadius:
BorderRadius
.
circular
(
15.0
),
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
),
child:
Center
(
child:
Center
(
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
child:
valueColor:
AlwaysStoppedAnimation
<
Color
>(
provider
.
submitLoading
AppColors
.
white
)
?
CircularProgressIndicator
.
adaptive
(
):
Text
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
"Submit"
,
AppColors
.
white
,
textAlign:
TextAlign
.
center
,
),
style:
TextStyle
(
)
fontSize:
15
,
:
Text
(
fontFamily:
"JakartaMedium"
,
"Submit"
,
color:
Colors
.
white
),
textAlign:
TextAlign
.
center
,
),
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
),
),
),
);
);
},);
},
);
}
}
Widget
ErrorWidget
(
context
,
text
)
{
Widget
ErrorWidget
(
context
,
text
)
{
if
(
text
!=
null
)
if
(
text
!=
null
)
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
else
else
return
SizedBox
(
height:
10
);
return
SizedBox
(
height:
10
);
}
}
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
...
@@ -465,15 +469,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -465,15 +469,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child:
Consumer
<
Pendingcomplaintsprovider
>(
child:
Consumer
<
Pendingcomplaintsprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
Padding
(
return
Padding
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
bottom:
bottom:
MediaQuery
MediaQuery
.
of
(
.
of
(
context
,
context
,
).
viewInsets
.
bottom
,
// This handles keyboard
)
.
viewInsets
.
bottom
,
// This handles keyboard
),
),
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
margin:
EdgeInsets
.
only
(
...
@@ -494,11 +494,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -494,11 +494,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
"Select Source"
,
"Select Source"
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
fontSize:
16
fontSize:
16
,
),
),
),
),
),
),
SizedBox
(
height:
15
,
),
SizedBox
(
height:
15
),
InkWell
(
InkWell
(
onTap:
()
{
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
Navigator
.
of
(
context
).
pop
(
false
);
...
@@ -513,8 +513,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -513,8 +513,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
InkWell
(
InkWell
(
onTap:
()
{
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
(
provider
.
imgFromCamera
();
);
},
},
child:
Container
(
child:
Container
(
height:
35
,
height:
35
,
...
@@ -534,5 +533,4 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -534,5 +533,4 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},
},
);
);
}
}
}
}
lib/screens/serviceEngineer/VisitDetails.dart
View file @
b9d7c024
...
@@ -51,8 +51,14 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -51,8 +51,14 @@ class _VisitdetailsState extends State<Visitdetails> {
children:
[
children:
[
Text
(
"Customer Details"
),
Text
(
"Customer Details"
),
Container
(
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
horizontal:
10
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
...
@@ -67,13 +73,12 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -67,13 +73,12 @@ class _VisitdetailsState extends State<Visitdetails> {
"Mail ID"
,
"Mail ID"
,
];
];
final
textSubheads
=
[
final
textSubheads
=
[
customerDetails
.
aname
??
"-"
,
customerDetails
.
aname
??
"-"
,
customerDetails
.
mob1
??
"-"
,
customerDetails
.
mob1
??
"-"
,
customerDetails
.
mob2
??
"-"
,
customerDetails
.
mob2
??
"-"
,
customerDetails
.
mail
??
"-"
,
customerDetails
.
mail
??
"-"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
vertical:
6
,
horizontal:
0
,
horizontal:
0
,
...
@@ -94,9 +99,11 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -94,9 +99,11 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
textheads
[
j
].
toString
(),
Text
(
maxLines:
2
,
textheads
[
j
].
toString
(),
overflow:
TextOverflow
.
ellipsis
,),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
),
SizedBox
(
SizedBox
(
// height:45,
// height:45,
width:
width:
...
@@ -105,11 +112,11 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -105,11 +112,11 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
).
size
.
width
*
0.75
,
0.75
,
child:
Text
(
child:
Text
(
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
]
==
""
textSubheads
[
j
],
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
),
),
),
...
@@ -125,11 +132,17 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -125,11 +132,17 @@ class _VisitdetailsState extends State<Visitdetails> {
}),
}),
),
),
),
),
Text
(
"Generator Details"
),
Text
(
"Generator Details"
),
Container
(
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
horizontal:
10
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
...
@@ -159,7 +172,9 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -159,7 +172,9 @@ class _VisitdetailsState extends State<Visitdetails> {
"
${complaintDetails.dateOfSupply}
"
,
"
${complaintDetails.dateOfSupply}
"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Row
(
Row
(
...
@@ -175,7 +190,9 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -175,7 +190,9 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
textheads
[
j
].
toString
()),
Text
(
textheads
[
j
].
toString
(),
),
SizedBox
(
SizedBox
(
// height:45,
// height:45,
width:
width:
...
@@ -184,12 +201,17 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -184,12 +201,17 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
).
size
.
width
*
0.8
,
0.8
,
child:
Text
(
child:
Text
(
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
textSubheads
[
j
]
==
""
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
,
),
),
),
),
),
),
),
...
@@ -208,11 +230,17 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -208,11 +230,17 @@ class _VisitdetailsState extends State<Visitdetails> {
],
],
),
),
),
),
Text
(
"Complaint Details"
),
Text
(
"Complaint Details"
),
Container
(
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
horizontal:
10
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
...
@@ -221,7 +249,6 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -221,7 +249,6 @@ class _VisitdetailsState extends State<Visitdetails> {
children:
[
children:
[
Row
(
Row
(
children:
[
children:
[
SvgPicture
.
asset
(
"assetName"
),
Column
(
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
4
,
(
j
)
{
children:
List
.
generate
(
4
,
(
j
)
{
...
@@ -238,7 +265,9 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -238,7 +265,9 @@ class _VisitdetailsState extends State<Visitdetails> {
"
${complaintDetails.complaintType}
"
,
"
${complaintDetails.complaintType}
"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Column
(
child:
Column
(
children:
[
children:
[
Row
(
Row
(
...
@@ -254,7 +283,9 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -254,7 +283,9 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
textheads
[
j
].
toString
()),
Text
(
textheads
[
j
].
toString
(),
),
SizedBox
(
SizedBox
(
// height:45,
// height:45,
width:
width:
...
@@ -263,12 +294,17 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -263,12 +294,17 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
).
size
.
width
*
0.8
,
0.8
,
child:
Text
(
child:
Text
(
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
textSubheads
[
j
]
==
""
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
,
),
),
),
),
),
),
),
...
@@ -287,7 +323,7 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -287,7 +323,7 @@ class _VisitdetailsState extends State<Visitdetails> {
],
],
),
),
),
),
SizedBox
(
height:
75
),
SizedBox
(
height:
75
),
],
],
),
),
...
@@ -320,8 +356,10 @@ class _VisitdetailsState extends State<Visitdetails> {
...
@@ -320,8 +356,10 @@ class _VisitdetailsState extends State<Visitdetails> {
child:
Text
(
child:
Text
(
"Followup Details"
,
"Followup Details"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
),
),
),
...
...
lib/services/api_calling.dart
View file @
b9d7c024
...
@@ -367,7 +367,7 @@ class ApiCalling {
...
@@ -367,7 +367,7 @@ class ApiCalling {
sessioId
,
sessioId
,
location
,
location
,
latlngs
,
latlngs
,
check_out_pic
,
check_out_pic
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
...
@@ -391,7 +391,13 @@ class ApiCalling {
...
@@ -391,7 +391,13 @@ class ApiCalling {
// return null;
// return null;
// }
// }
if
(
check_out_pic
!=
null
)
{
if
(
check_out_pic
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
employeeCheckOutUrl
,
check_out_pic
,
'check_out_pic'
);
res
=
await
postImageNew
(
data
,
{},
employeeCheckOutUrl
,
check_out_pic
,
'check_out_pic'
,
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
employeeCheckOutUrl
,
{});
res
=
await
post
(
data
,
employeeCheckOutUrl
,
{});
...
@@ -943,7 +949,13 @@ class ApiCalling {
...
@@ -943,7 +949,13 @@ class ApiCalling {
// }
// }
if
(
payment_proof
!=
null
)
{
if
(
payment_proof
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
technicianAddPaymentCollectionUrl
,
payment_proof
,
'payment_proof'
);
res
=
await
postImageNew
(
data
,
{},
technicianAddPaymentCollectionUrl
,
payment_proof
,
'payment_proof'
,
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
return
TechnicianAddPaymentCollectionResponse
.
fromJson
(
res
);
return
TechnicianAddPaymentCollectionResponse
.
fromJson
(
res
);
}
else
{
}
else
{
...
@@ -1150,7 +1162,13 @@ class ApiCalling {
...
@@ -1150,7 +1162,13 @@ class ApiCalling {
// print(fsr_file);
// print(fsr_file);
var
res
;
var
res
;
if
(
fsr_file
!=
null
)
{
if
(
fsr_file
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
technicianUpdateVisitUrl
,
fsr_file
,
'fsr_file'
);
res
=
await
postImageNew
(
data
,
{},
technicianUpdateVisitUrl
,
fsr_file
,
'fsr_file'
,
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
return
UpdateComplaintResponse
.
fromJson
(
res
);
return
UpdateComplaintResponse
.
fromJson
(
res
);
}
else
{
}
else
{
...
@@ -1327,7 +1345,6 @@ class ApiCalling {
...
@@ -1327,7 +1345,6 @@ class ApiCalling {
var
res
;
var
res
;
if
(
attachment
!=
null
)
{
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
res
=
await
postImageNew
(
data
,
data
,
{},
{},
...
@@ -1469,14 +1486,12 @@ class ApiCalling {
...
@@ -1469,14 +1486,12 @@ class ApiCalling {
"attachment"
,
"attachment"
,
);
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
addPaymentReceiptSubmitUrl
,
{});
res
=
await
post
(
data
,
addPaymentReceiptSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
res
=
jsonDecode
(
res
.
body
);
// return addReceiptPaymentResponse.fromJson(res);
// return addReceiptPaymentResponse.fromJson(res);
}
}
return
addReceiptPaymentResponse
.
fromJson
(
res
);
return
addReceiptPaymentResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
return
null
;
...
@@ -1665,6 +1680,7 @@ class ApiCalling {
...
@@ -1665,6 +1680,7 @@ class ApiCalling {
"attachment"
,
"attachment"
,
);
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
print
(
data
);
return
approveRejectPaymentRequestResponse
.
fromJson
(
res
);
return
approveRejectPaymentRequestResponse
.
fromJson
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
approveRejectPaymentRequestSubmitUrl
,
{});
res
=
await
post
(
data
,
approveRejectPaymentRequestSubmitUrl
,
{});
...
@@ -2091,13 +2107,11 @@ class ApiCalling {
...
@@ -2091,13 +2107,11 @@ class ApiCalling {
}
}
}
}
static
Future
<
AddOrderViewResponse
?>
addOrderViewAPI
(
static
Future
<
AddOrderViewResponse
?>
addOrderViewAPI
(
empId
,
empId
,
session
,
session
,
mode
mode
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2119,10 +2133,10 @@ class ApiCalling {
...
@@ -2119,10 +2133,10 @@ class ApiCalling {
}
}
static
Future
<
addOrderAccontDetailsResponse
?>
addOrderAccountDetailsAPI
(
static
Future
<
addOrderAccontDetailsResponse
?>
addOrderAccountDetailsAPI
(
empId
,
empId
,
session
,
session
,
account_id
account_id
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2144,16 +2158,16 @@ class ApiCalling {
...
@@ -2144,16 +2158,16 @@ class ApiCalling {
}
}
static
Future
<
addOrderTpcAgentListResponse
?>
addOrderTPCAgentListAPI
(
static
Future
<
addOrderTpcAgentListResponse
?>
addOrderTPCAgentListAPI
(
empId
,
empId
,
session
,
session
,
mode
,
mode
,
text
text
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
mode
.
toString
(),
'mode'
:
mode
.
toString
(),
'text'
:
(
text
).
toString
(),
'text'
:
(
text
).
toString
(),
};
};
final
res
=
await
post
(
data
,
ordersAddOrderTpcAgentListUrl
,
{});
final
res
=
await
post
(
data
,
ordersAddOrderTpcAgentListUrl
,
{});
...
@@ -2171,99 +2185,91 @@ class ApiCalling {
...
@@ -2171,99 +2185,91 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
addOrderSubmitAPI
(
static
Future
<
CommonResponse
?>
addOrderSubmitAPI
(
empId
,
empId
,
session
,
session
,
mode
,
mode
,
sales_person_emp_id
,
sales_person_emp_id
,
selected_acc_id
,
selected_acc_id
,
dispatch_state_id
,
dispatch_state_id
,
dispatch_district_id
,
dispatch_district_id
,
dispatch_sub_location_id
,
dispatch_sub_location_id
,
dispatch_pincode
,
dispatch_pincode
,
dispatch_address
,
dispatch_address
,
basic_amount
,
basic_amount
,
cgst_amount
,
cgst_amount
,
sgst_amount
,
sgst_amount
,
igst_amount
,
igst_amount
,
total_amount
,
total_amount
,
order_received_date
,
order_received_date
,
note
,
note
,
unloading
,
unloading
,
freight
,
freight
,
erection
,
erection
,
tpc_applicable
,
tpc_applicable
,
billing_name
,
billing_name
,
billing_gst_no
,
billing_gst_no
,
billing_pincode
,
billing_pincode
,
billing_address
,
billing_address
,
billing_state
,
billing_state
,
billing_district
,
billing_district
,
billing_sub_locality
,
billing_sub_locality
,
order_products
,
order_products
,
lead_id
,
lead_id
,
feedback
,
feedback
,
in_time
,
in_time
,
loc
,
loc
,
requested_tpc_amount
,
requested_tpc_amount
,
tpc_agent_id
,
tpc_agent_id
,
po
po
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
empId
.
toString
(),
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'session_id'
:
session
.
toString
(),
'mode'
:
mode
.
toString
(),
'mode'
:
mode
.
toString
(),
'sales_person_emp_id'
:
sales_person_emp_id
.
toString
(),
'sales_person_emp_id'
:
sales_person_emp_id
.
toString
(),
'selected_acc_id'
:
selected_acc_id
.
toString
(),
'selected_acc_id'
:
selected_acc_id
.
toString
(),
'dispatch_state_id'
:
dispatch_state_id
.
toString
(),
'dispatch_state_id'
:
dispatch_state_id
.
toString
(),
'dispatch_district_id'
:
dispatch_district_id
.
toString
(),
'dispatch_district_id'
:
dispatch_district_id
.
toString
(),
'dispatch_sub_location_id'
:
dispatch_sub_location_id
.
toString
(),
'dispatch_sub_location_id'
:
dispatch_sub_location_id
.
toString
(),
'dispatch_pincode'
:
dispatch_pincode
.
toString
(),
'dispatch_pincode'
:
dispatch_pincode
.
toString
(),
'dispatch_address'
:
dispatch_address
.
toString
(),
'dispatch_address'
:
dispatch_address
.
toString
(),
'basic_amount'
:
basic_amount
.
toString
(),
'basic_amount'
:
basic_amount
.
toString
(),
'cgst_amount'
:
cgst_amount
.
toString
(),
'cgst_amount'
:
cgst_amount
.
toString
(),
'sgst_amount'
:
sgst_amount
.
toString
(),
'sgst_amount'
:
sgst_amount
.
toString
(),
'igst_amount'
:
igst_amount
.
toString
(),
'igst_amount'
:
igst_amount
.
toString
(),
'total_amount'
:
total_amount
.
toString
(),
'total_amount'
:
total_amount
.
toString
(),
'order_received_date'
:
order_received_date
.
toString
(),
'order_received_date'
:
order_received_date
.
toString
(),
'note'
:
note
.
toString
(),
'note'
:
note
.
toString
(),
'unloading'
:
unloading
.
toString
(),
'unloading'
:
unloading
.
toString
(),
'freight'
:
freight
.
toString
(),
'freight'
:
freight
.
toString
(),
'erection'
:
erection
.
toString
(),
'erection'
:
erection
.
toString
(),
'tpc_applicable'
:
tpc_applicable
.
toString
(),
'tpc_applicable'
:
tpc_applicable
.
toString
(),
'billing_name'
:
billing_name
.
toString
(),
'billing_name'
:
billing_name
.
toString
(),
'billing_gst_no'
:
billing_gst_no
.
toString
(),
'billing_gst_no'
:
billing_gst_no
.
toString
(),
'billing_pincode'
:
billing_pincode
.
toString
(),
'billing_pincode'
:
billing_pincode
.
toString
(),
'billing_address'
:
billing_address
.
toString
(),
'billing_address'
:
billing_address
.
toString
(),
'billing_state'
:
billing_state
.
toString
(),
'billing_state'
:
billing_state
.
toString
(),
'billing_district'
:
billing_district
.
toString
(),
'billing_district'
:
billing_district
.
toString
(),
'billing_sub_locality'
:
billing_sub_locality
.
toString
(),
'billing_sub_locality'
:
billing_sub_locality
.
toString
(),
'order_products'
:
jsonEncode
(
order_products
).
toString
(),
'order_products'
:
jsonEncode
(
order_products
).
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'feedback'
:
feedback
.
toString
(),
'feedback'
:
feedback
.
toString
(),
'in_time'
:
in_time
.
toString
(),
'in_time'
:
in_time
.
toString
(),
'loc'
:
loc
.
toString
(),
'loc'
:
loc
.
toString
(),
'requested_tpc_amount'
:
requested_tpc_amount
.
toString
(),
'requested_tpc_amount'
:
requested_tpc_amount
.
toString
(),
'tpc_agent_id'
:
tpc_agent_id
.
toString
(),
'tpc_agent_id'
:
tpc_agent_id
.
toString
(),
};
};
var
res
;
var
res
;
print
(
data
);
print
(
data
);
if
(
po
!=
null
)
{
if
(
po
!=
null
)
{
res
=
await
postImageNew
(
res
=
await
postImageNew
(
data
,
{},
ordersAddOrderSubmitUrl
,
po
,
"po"
);
data
,
{},
ordersAddOrderSubmitUrl
,
po
,
"po"
,
);
res
=
jsonDecode
(
res
);
res
=
jsonDecode
(
res
);
}
else
{
}
else
{
res
=
await
post
(
data
,
ordersAddOrderSubmitUrl
,
{});
res
=
await
post
(
data
,
ordersAddOrderSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
res
=
jsonDecode
(
res
.
body
);
}
}
return
CommonResponse
.
fromJson
(
res
);
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
return
null
;
...
@@ -2271,10 +2277,10 @@ class ApiCalling {
...
@@ -2271,10 +2277,10 @@ class ApiCalling {
}
}
static
Future
<
ordersListByModeFilterResponse
?>
ordersListByModeFilterAPI
(
static
Future
<
ordersListByModeFilterResponse
?>
ordersListByModeFilterAPI
(
empId
,
empId
,
session
,
session
,
mode
mode
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2296,12 +2302,12 @@ class ApiCalling {
...
@@ -2296,12 +2302,12 @@ class ApiCalling {
}
}
static
Future
<
ordersListByModeResponse
?>
ordersListByModeAPI
(
static
Future
<
ordersListByModeResponse
?>
ordersListByModeAPI
(
empId
,
empId
,
session
,
session
,
mode
,
mode
,
teamemployee
,
teamemployee
,
status
status
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2326,10 +2332,10 @@ class ApiCalling {
...
@@ -2326,10 +2332,10 @@ class ApiCalling {
}
}
static
Future
<
ordersDetailsByModeResponse
?>
ordersDetailsByModeAPI
(
static
Future
<
ordersDetailsByModeResponse
?>
ordersDetailsByModeAPI
(
empId
,
empId
,
session
,
session
,
order_id
order_id
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2351,15 +2357,14 @@ class ApiCalling {
...
@@ -2351,15 +2357,14 @@ class ApiCalling {
}
}
}
}
static
Future
<
CommonResponse
?>
static
Future
<
CommonResponse
?>
ordersDetailsFeedbackSubmissionAPI
(
ordersDetailsFeedbackSubmissionAPI
(
empId
,
empId
,
session
,
session
,
order_id
,
order_id
,
feedback
,
feedback
,
status
,
status
,
attachment_file
,
attachment_file
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2390,39 +2395,39 @@ class ApiCalling {
...
@@ -2390,39 +2395,39 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
ordersDetailsApproveRejectAPI
(
static
Future
<
CommonResponse
?>
ordersDetailsApproveRejectAPI
(
empId
,
empId
,
session
,
session
,
status
,
status
,
type
,
type
,
order_id
,
order_id
,
feedback
,
feedback
,
tpc_applicable
,
tpc_applicable
,
tpc_approved_amount
,
tpc_approved_amount
,
sale_order_number
,
sale_order_number
,
edit_company_name
,
edit_company_name
,
invoice_number
,
invoice_number
,
vehicle_number
,
vehicle_number
,
driver_name
,
driver_name
,
driver_mobile_no
,
driver_mobile_no
,
crm_order_p_id
crm_order_p_id
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"status"
:
status
.
toString
(),
"status"
:
status
.
toString
(),
"type"
:
type
.
toString
(),
"type"
:
type
.
toString
(),
"order_id"
:
order_id
.
toString
(),
"order_id"
:
order_id
.
toString
(),
"feedback"
:
feedback
.
toString
(),
"feedback"
:
feedback
.
toString
(),
"tpc_applicable"
:
tpc_applicable
.
toString
(),
"tpc_applicable"
:
tpc_applicable
.
toString
(),
"tpc_approved_amount"
:
tpc_approved_amount
.
toString
(),
"tpc_approved_amount"
:
tpc_approved_amount
.
toString
(),
"sale_order_number"
:
sale_order_number
.
toString
(),
"sale_order_number"
:
sale_order_number
.
toString
(),
"edit_company_name"
:
edit_company_name
.
toString
(),
"edit_company_name"
:
edit_company_name
.
toString
(),
"invoice_number"
:
invoice_number
.
toString
(),
"invoice_number"
:
invoice_number
.
toString
(),
"vehicle_number"
:
vehicle_number
.
toString
(),
"vehicle_number"
:
vehicle_number
.
toString
(),
"driver_name"
:
driver_name
.
toString
(),
"driver_name"
:
driver_name
.
toString
(),
"driver_mobile_no"
:
driver_mobile_no
.
toString
(),
"driver_mobile_no"
:
driver_mobile_no
.
toString
(),
"crm_order_p_id"
:
crm_order_p_id
.
toString
()
"crm_order_p_id"
:
crm_order_p_id
.
toString
()
,
};
};
final
res
=
await
post
(
data
,
ordersOrderApproveRejectUrl
,
{});
final
res
=
await
post
(
data
,
ordersOrderApproveRejectUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -2440,17 +2445,17 @@ class ApiCalling {
...
@@ -2440,17 +2445,17 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
ordersDetailsDeleteAPI
(
static
Future
<
CommonResponse
?>
ordersDetailsDeleteAPI
(
empId
,
empId
,
session
,
session
,
order_id
,
order_id
,
feedback
feedback
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"order_id"
:
order_id
.
toString
(),
"order_id"
:
order_id
.
toString
(),
"feedback"
:
feedback
.
toString
(),
"feedback"
:
feedback
.
toString
(),
};
};
final
res
=
await
post
(
data
,
ordersOrderLDeleteUrl
,
{});
final
res
=
await
post
(
data
,
ordersOrderLDeleteUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -2468,9 +2473,9 @@ class ApiCalling {
...
@@ -2468,9 +2473,9 @@ class ApiCalling {
}
}
static
Future
<
addOrderPaymentViewResponse
?>
addOrderpaymentListViewAPI
(
static
Future
<
addOrderPaymentViewResponse
?>
addOrderpaymentListViewAPI
(
empId
,
empId
,
session
,
session
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2491,28 +2496,28 @@ class ApiCalling {
...
@@ -2491,28 +2496,28 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
addOrderpaymentListSubmitAPI
(
static
Future
<
CommonResponse
?>
addOrderpaymentListSubmitAPI
(
empId
,
empId
,
session
,
session
,
account_id
,
account_id
,
description
,
description
,
selected_orders
,
selected_orders
,
payment_amount
,
payment_amount
,
payment_date
,
payment_date
,
payment_type
,
payment_type
,
ref_no
,
ref_no
,
attachment
attachment
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account_id
.
toString
(),
'account_id'
:
account_id
.
toString
(),
'description'
:
description
.
toString
(),
'description'
:
description
.
toString
(),
'selected_orders'
:
jsonEncode
(
selected_orders
).
toString
(),
'selected_orders'
:
jsonEncode
(
selected_orders
).
toString
(),
'payment_amount'
:
payment_amount
.
toString
(),
'payment_amount'
:
payment_amount
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
};
};
var
res
;
var
res
;
print
(
data
);
print
(
data
);
...
@@ -2531,120 +2536,129 @@ class ApiCalling {
...
@@ -2531,120 +2536,129 @@ class ApiCalling {
// return CommonResponse.fromJson(res);
// return CommonResponse.fromJson(res);
}
}
return
CommonResponse
.
fromJson
(
res
);
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
return
null
;
}
}
}
}
static
Future
<
CommonResponse
?>
ordersEditPaymentDetailsAPI
(
static
Future
<
CommonResponse
?>
ordersEditPaymentDetailsAPI
(
empId
,
empId
,
session
,
session
,
payment_id
,
payment_id
,
description
,
description
,
payment_type
,
payment_type
,
ref_no
,
ref_no
,
payment_date
,
payment_date
,
amount
amount
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'description'
:
description
.
toString
(),
'description'
:
description
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
'amount'
:
amount
.
toString
(),
'amount'
:
amount
.
toString
(),
};
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsUrl
,
{});
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
return
null
;
}
}
}
}
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersViewAPI
(
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
empId
,
ordersEditPaymentDetailsAdjustedOrdersViewAPI
(
session
,
empId
,
payment_id
,
session
,
)
async
{
payment_id
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'payment_id'
:
payment_id
.
toString
(),
};
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersViewUrl
,
{});
var
res
=
await
post
(
if
(
res
!=
null
)
{
data
,
ordersEditPaymentDetailsAdjustedOrdersViewUrl
,
{},
);
if
(
res
!=
null
)
{
print
(
"edit adjusted :
${res.body}
"
);
print
(
"edit adjusted :
${res.body}
"
);
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
}
else
{
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
return
null
;
}
}
}
}
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersUpdateAPI
(
empId
,
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
session
,
ordersEditPaymentDetailsAdjustedOrdersUpdateAPI
(
payment_id
,
empId
,
update_amounts
,
session
,
insert_amounts
payment_id
,
)
async
{
update_amounts
,
insert_amounts
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'update_amounts'
:
jsonEncode
(
update_amounts
).
toString
(),
'update_amounts'
:
jsonEncode
(
update_amounts
).
toString
(),
'insert_amounts'
:
jsonEncode
(
insert_amounts
).
toString
(),
'insert_amounts'
:
jsonEncode
(
insert_amounts
).
toString
(),
};
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersUrl
,
{});
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
}
else
{
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
return
null
;
}
}
}
}
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
AddOrderPaymentSelectAccountAPI
(
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
empId
,
AddOrderPaymentSelectAccountAPI
(
empId
,
session
,
mode
,
search_term
)
async
{
session
,
mode
,
search_term
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
mode
.
toString
(),
'mode'
:
mode
.
toString
(),
'search_term'
:
search_term
.
toString
(),
'search_term'
:
search_term
.
toString
(),
};
};
final
res
=
await
post
(
data
,
ordersAddPaymentSelectAccountForOrderUrl
,
{});
final
res
=
await
post
(
data
,
ordersAddPaymentSelectAccountForOrderUrl
,
{},
);
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
print
(
data
);
print
(
data
);
print
(
"PaymentSeralectAccount
${res.body}
"
);
print
(
"PaymentSeralectAccount
${res.body}
"
);
return
AddOrderPaymentSelectAccountResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
AddOrderPaymentSelectAccountResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
return
null
;
return
null
;
...
@@ -2655,22 +2669,21 @@ class ApiCalling {
...
@@ -2655,22 +2669,21 @@ class ApiCalling {
}
}
}
}
static
Future
<
AddOrderPaymentSelectOrderResponse
?>
AddOrderPaymentSelectOrderAPI
(
static
Future
<
AddOrderPaymentSelectOrderResponse
?>
empId
,
AddOrderPaymentSelectOrderAPI
(
empId
,
session
,
account_id
)
async
{
session
,
account_id
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account_id
.
toString
(),
'account_id'
:
account_id
.
toString
(),
};
};
final
res
=
await
post
(
data
,
ordersAddPaymentSelectOrderUrl
,
{});
final
res
=
await
post
(
data
,
ordersAddPaymentSelectOrderUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
print
(
data
);
print
(
data
);
debugPrint
(
"add order payment selected order:
${res.body}
"
);
debugPrint
(
"add order payment selected order:
${res.body}
"
);
return
AddOrderPaymentSelectOrderResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
AddOrderPaymentSelectOrderResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
return
null
;
return
null
;
...
@@ -2682,10 +2695,10 @@ class ApiCalling {
...
@@ -2682,10 +2695,10 @@ class ApiCalling {
}
}
static
Future
<
paymentListByModeFilterResponse
?>
paymentListByModeFilterAPI
(
static
Future
<
paymentListByModeFilterResponse
?>
paymentListByModeFilterAPI
(
empId
,
empId
,
session
,
session
,
mode
mode
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2707,11 +2720,11 @@ class ApiCalling {
...
@@ -2707,11 +2720,11 @@ class ApiCalling {
}
}
static
Future
<
paymentListByModeResponse
?>
paymentListsByModeAPI
(
static
Future
<
paymentListByModeResponse
?>
paymentListsByModeAPI
(
empId
,
empId
,
session
,
session
,
mode
,
mode
,
teamemployee
,
teamemployee
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2735,19 +2748,19 @@ class ApiCalling {
...
@@ -2735,19 +2748,19 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
paymentOrderApproveRejectAPI
(
static
Future
<
CommonResponse
?>
paymentOrderApproveRejectAPI
(
empId
,
empId
,
session
,
session
,
payment_id
,
payment_id
,
type
,
type
,
remarks
remarks
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"payment_id"
:
payment_id
.
toString
(),
"payment_id"
:
payment_id
.
toString
(),
"type"
:
type
.
toString
(),
"type"
:
type
.
toString
(),
"remarks"
:
remarks
.
toString
()
"remarks"
:
remarks
.
toString
()
,
};
};
final
res
=
await
post
(
data
,
ordersPaymentListApproveRejectUrl
,
{});
final
res
=
await
post
(
data
,
ordersPaymentListApproveRejectUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -2765,15 +2778,15 @@ class ApiCalling {
...
@@ -2765,15 +2778,15 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
paymentOrderDeleteAPI
(
static
Future
<
CommonResponse
?>
paymentOrderDeleteAPI
(
empId
,
empId
,
session
,
session
,
payment_id
,
payment_id
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"payment_id"
:
payment_id
.
toString
(),
"payment_id"
:
payment_id
.
toString
(),
};
};
final
res
=
await
post
(
data
,
ordersPaymentListDeleteUrl
,
{});
final
res
=
await
post
(
data
,
ordersPaymentListDeleteUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -2790,12 +2803,11 @@ class ApiCalling {
...
@@ -2790,12 +2803,11 @@ class ApiCalling {
}
}
}
}
static
Future
<
paymentDetailsByModeFilterResponse
?>
paymentsDetailsByModeAPI
(
static
Future
<
paymentDetailsByModeFilterResponse
?>
paymentsDetailsByModeAPI
(
empId
,
empId
,
session
,
session
,
payment_id
payment_id
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2806,7 +2818,9 @@ class ApiCalling {
...
@@ -2806,7 +2818,9 @@ class ApiCalling {
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
print
(
data
);
print
(
data
);
debugPrint
(
res
.
body
);
debugPrint
(
res
.
body
);
return
paymentDetailsByModeFilterResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
paymentDetailsByModeFilterResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
return
null
;
return
null
;
...
@@ -2817,31 +2831,29 @@ class ApiCalling {
...
@@ -2817,31 +2831,29 @@ class ApiCalling {
}
}
}
}
static
Future
<
CommonResponse
?>
ordersAddTPCAgentAPI
(
static
Future
<
CommonResponse
?>
empId
,
ordersAddTPCAgentAPI
(
session
,
empId
,
agent_name
,
session
,
mobile_number
,
agent_name
,
bank_name
,
mobile_number
,
bank_account_no
,
bank_name
,
bank_ifsc_code
,
bank_account_no
,
bank_beneficiary_name
,
bank_ifsc_code
,
note
,
bank_beneficiary_name
,
id_proof
,
note
,
)
async
{
id_proof
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'agent_name'
:
agent_name
.
toString
(),
'agent_name'
:
agent_name
.
toString
(),
'mobile_number'
:
mobile_number
.
toString
(),
'mobile_number'
:
mobile_number
.
toString
(),
'bank_name'
:
bank_name
.
toString
(),
'bank_name'
:
bank_name
.
toString
(),
'bank_account_no'
:
bank_account_no
.
toString
(),
'bank_account_no'
:
bank_account_no
.
toString
(),
'bank_ifsc_code'
:
bank_ifsc_code
.
toString
(),
'bank_ifsc_code'
:
bank_ifsc_code
.
toString
(),
'bank_beneficiary_name'
:
bank_beneficiary_name
.
toString
(),
'bank_beneficiary_name'
:
bank_beneficiary_name
.
toString
(),
'note'
:
note
.
toString
(),
'note'
:
note
.
toString
(),
};
};
var
res
;
var
res
;
if
(
id_proof
!=
null
)
{
if
(
id_proof
!=
null
)
{
...
@@ -2865,11 +2877,7 @@ class ApiCalling {
...
@@ -2865,11 +2877,7 @@ class ApiCalling {
}
}
}
}
static
Future
<
TPCListResponse
?>
TPCAgentListAPI
(
static
Future
<
TPCListResponse
?>
TPCAgentListAPI
(
empId
,
session
,
mode
)
async
{
empId
,
session
,
mode
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2892,10 +2900,10 @@ class ApiCalling {
...
@@ -2892,10 +2900,10 @@ class ApiCalling {
}
}
static
Future
<
TPCAgentDetailsResponse
?>
TPCAgentDetailsAPI
(
static
Future
<
TPCAgentDetailsResponse
?>
TPCAgentDetailsAPI
(
empId
,
empId
,
session
,
session
,
tpc_agent_id
tpc_agent_id
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2918,9 +2926,9 @@ class ApiCalling {
...
@@ -2918,9 +2926,9 @@ class ApiCalling {
}
}
static
Future
<
PendingTPCAgentListResponse
?>
pendingTPCAgentIssueListAPI
(
static
Future
<
PendingTPCAgentListResponse
?>
pendingTPCAgentIssueListAPI
(
empId
,
empId
,
session
,
session
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -2941,24 +2949,23 @@ class ApiCalling {
...
@@ -2941,24 +2949,23 @@ class ApiCalling {
}
}
}
}
static
Future
<
CommonResponse
?>
TpcIssueListApprovalAPI
(
static
Future
<
CommonResponse
?>
TpcIssueListApprovalAPI
(
empId
,
empId
,
session
,
session
,
tpc_payment_mode
,
tpc_payment_mode
,
tpc_payment_reference_no
,
tpc_payment_reference_no
,
order_id
,
order_id
,
order_tpc_feedback
,
order_tpc_feedback
,
tpc_paym_attachment
tpc_paym_attachment
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'tpc_payment_mode'
:
tpc_payment_mode
.
toString
(),
'tpc_payment_mode'
:
tpc_payment_mode
.
toString
(),
'tpc_payment_reference_no'
:
tpc_payment_reference_no
.
toString
(),
'tpc_payment_reference_no'
:
tpc_payment_reference_no
.
toString
(),
'order_id'
:
order_id
.
toString
(),
'order_id'
:
order_id
.
toString
(),
'order_tpc_feedback'
:
order_tpc_feedback
.
toString
(),
'order_tpc_feedback'
:
order_tpc_feedback
.
toString
(),
};
};
var
res
;
var
res
;
if
(
tpc_paym_attachment
!=
null
)
{
if
(
tpc_paym_attachment
!=
null
)
{
...
@@ -2984,9 +2991,9 @@ class ApiCalling {
...
@@ -2984,9 +2991,9 @@ class ApiCalling {
///CRM Module
///CRM Module
static
Future
<
AccessiblePagesResponse
?>
crmAccessiblePagesAPI
(
static
Future
<
AccessiblePagesResponse
?>
crmAccessiblePagesAPI
(
empId
,
empId
,
session
session
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -3008,10 +3015,10 @@ class ApiCalling {
...
@@ -3008,10 +3015,10 @@ class ApiCalling {
}
}
static
Future
<
LeadListViewResponse
?>
crmLeadListViewAPI
(
static
Future
<
LeadListViewResponse
?>
crmLeadListViewAPI
(
empId
,
empId
,
session
,
session
,
mode
mode
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -3034,40 +3041,41 @@ class ApiCalling {
...
@@ -3034,40 +3041,41 @@ class ApiCalling {
}
}
static
Future
<
SubmitLeadListFilterResponse
?>
crmLeadListFilterSubmitAPI
(
static
Future
<
SubmitLeadListFilterResponse
?>
crmLeadListFilterSubmitAPI
(
empId
,
empId
,
session
,
mode
,
session
,
teamemployee
,
mode
,
slead_id
,
teamemployee
,
status
,
slead_id
,
open_status
,
status
,
mob
,
open_status
,
com
,
mob
,
source
,
com
,
reference
,
source
,
team
,
reference
,
segment
,
team
,
state
,
segment
,
district
,
state
,
sub_loc
,
district
,
)
async
{
sub_loc
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'teamemployee'
:
teamemployee
.
toString
(),
'teamemployee'
:
teamemployee
.
toString
(),
'slead_id'
:
slead_id
.
toString
(),
'slead_id'
:
slead_id
.
toString
(),
'status'
:
status
.
toString
(),
'status'
:
status
.
toString
(),
'open_status'
:
open_status
.
toString
(),
'open_status'
:
open_status
.
toString
(),
'mob'
:
mob
.
toString
(),
'mob'
:
mob
.
toString
(),
'com'
:
com
.
toString
(),
'com'
:
com
.
toString
(),
'source'
:
source
.
toString
(),
'source'
:
source
.
toString
(),
'reference'
:
reference
.
toString
(),
'reference'
:
reference
.
toString
(),
'team'
:
team
.
toString
(),
'team'
:
team
.
toString
(),
'segment'
:
segment
.
toString
(),
'segment'
:
segment
.
toString
(),
'state'
:
state
.
toString
(),
'state'
:
state
.
toString
(),
'district'
:
district
.
toString
(),
'district'
:
district
.
toString
(),
'sub_loc'
:
sub_loc
.
toString
(),
'sub_loc'
:
sub_loc
.
toString
(),
};
};
final
res
=
await
post
(
data
,
crmLeadListFilterSubmitUrl
,
{});
final
res
=
await
post
(
data
,
crmLeadListFilterSubmitUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -3085,9 +3093,10 @@ class ApiCalling {
...
@@ -3085,9 +3093,10 @@ class ApiCalling {
}
}
static
Future
<
GetSourceOnReferenceResponse
?>
crmLeadListSourceOnReferenceAPI
(
static
Future
<
GetSourceOnReferenceResponse
?>
crmLeadListSourceOnReferenceAPI
(
empId
,
empId
,
session
,
source_id
session
,
)
async
{
source_id
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -3110,9 +3119,10 @@ class ApiCalling {
...
@@ -3110,9 +3119,10 @@ class ApiCalling {
}
}
static
Future
<
GetSegmentOnTeamResponse
?>
crmLeadListSegmentOnTeamAPI
(
static
Future
<
GetSegmentOnTeamResponse
?>
crmLeadListSegmentOnTeamAPI
(
empId
,
empId
,
session
,
team_id
session
,
)
async
{
team_id
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -3135,9 +3145,10 @@ class ApiCalling {
...
@@ -3135,9 +3145,10 @@ class ApiCalling {
}
}
static
Future
<
GetDistrictOnStateResponse
?>
crmDistrictsOnStateAPI
(
static
Future
<
GetDistrictOnStateResponse
?>
crmDistrictsOnStateAPI
(
empId
,
empId
,
session
,
state_id
session
,
)
async
{
state_id
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -3160,9 +3171,10 @@ class ApiCalling {
...
@@ -3160,9 +3171,10 @@ class ApiCalling {
}
}
static
Future
<
GetSubLocOnDistrictResponse
?>
crmSubLocOnDistrictAPI
(
static
Future
<
GetSubLocOnDistrictResponse
?>
crmSubLocOnDistrictAPI
(
empId
,
empId
,
session
,
district_id
session
,
)
async
{
district_id
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -3185,9 +3197,10 @@ class ApiCalling {
...
@@ -3185,9 +3197,10 @@ class ApiCalling {
}
}
static
Future
<
LeadListContactPopUpResponse
?>
crmLeadListContactPopUpAPI
(
static
Future
<
LeadListContactPopUpResponse
?>
crmLeadListContactPopUpAPI
(
empId
,
empId
,
session
,
account_id
session
,
)
async
{
account_id
,
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
...
@@ -3208,19 +3221,19 @@ class ApiCalling {
...
@@ -3208,19 +3221,19 @@ class ApiCalling {
return
null
;
return
null
;
}
}
}
}
static
Future
<
LeadDetailsResponse
?>
crmLeadDetailsAPI
(
static
Future
<
LeadDetailsResponse
?>
crmLeadDetailsAPI
(
empId
,
empId
,
session
,
session
,
lead_id
,
lead_id
,
mode
mode
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead_id
).
toString
(),
'lead_id'
:
(
lead_id
).
toString
(),
'mode'
:(
mode
).
toString
()
'mode'
:
(
mode
).
toString
()
,
};
};
final
res
=
await
post
(
data
,
crmLeadDetailsUrl
,
{});
final
res
=
await
post
(
data
,
crmLeadDetailsUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -3238,27 +3251,27 @@ class ApiCalling {
...
@@ -3238,27 +3251,27 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
crmLeadDetailsAddContactAPI
(
static
Future
<
CommonResponse
?>
crmLeadDetailsAddContactAPI
(
empId
,
empId
,
session
,
session
,
acc_id
,
acc_id
,
name
,
name
,
mob1
,
mob1
,
designation
,
designation
,
mob2
,
mob2
,
tel
,
tel
,
email
email
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'acc_id'
:
(
acc_id
).
toString
(),
'acc_id'
:
(
acc_id
).
toString
(),
'name'
:(
name
).
toString
(),
'name'
:
(
name
).
toString
(),
'mob1'
:(
mob1
).
toString
(),
'mob1'
:
(
mob1
).
toString
(),
'designation'
:(
designation
).
toString
(),
'designation'
:
(
designation
).
toString
(),
'mob2'
:(
mob2
).
toString
(),
'mob2'
:
(
mob2
).
toString
(),
'tel'
:(
tel
).
toString
(),
'tel'
:
(
tel
).
toString
(),
'email'
:(
email
).
toString
(),
'email'
:
(
email
).
toString
(),
};
};
final
res
=
await
post
(
data
,
crmLeadDetailsAddContactUrl
,
{});
final
res
=
await
post
(
data
,
crmLeadDetailsAddContactUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -3276,27 +3289,27 @@ class ApiCalling {
...
@@ -3276,27 +3289,27 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
crmLeadDetailsEditContactAPI
(
static
Future
<
CommonResponse
?>
crmLeadDetailsEditContactAPI
(
empId
,
empId
,
session
,
session
,
contact_id
,
contact_id
,
name
,
name
,
mob1
,
mob1
,
designation
,
designation
,
mob2
,
mob2
,
tel
,
tel
,
email
email
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'contact_id'
:
(
contact_id
).
toString
(),
'contact_id'
:
(
contact_id
).
toString
(),
'name'
:(
name
).
toString
(),
'name'
:
(
name
).
toString
(),
'mob1'
:(
mob1
).
toString
(),
'mob1'
:
(
mob1
).
toString
(),
'designation'
:(
designation
).
toString
(),
'designation'
:
(
designation
).
toString
(),
'mob2'
:(
mob2
).
toString
(),
'mob2'
:
(
mob2
).
toString
(),
'tel'
:(
tel
).
toString
(),
'tel'
:
(
tel
).
toString
(),
'email'
:(
email
).
toString
(),
'email'
:
(
email
).
toString
(),
};
};
final
res
=
await
post
(
data
,
crmLeadDetailsEditContactUrl
,
{});
final
res
=
await
post
(
data
,
crmLeadDetailsEditContactUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -3314,21 +3327,21 @@ class ApiCalling {
...
@@ -3314,21 +3327,21 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
crmLeadDetailsAddAppointmentAPI
(
static
Future
<
CommonResponse
?>
crmLeadDetailsAddAppointmentAPI
(
empId
,
empId
,
session
,
session
,
lead_id
,
lead_id
,
appointment_date
,
appointment_date
,
type
,
type
,
note
,
note
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead_id
).
toString
(),
'lead_id'
:
(
lead_id
).
toString
(),
'appointment_date'
:(
appointment_date
).
toString
(),
'appointment_date'
:
(
appointment_date
).
toString
(),
'type'
:(
type
).
toString
(),
'type'
:
(
type
).
toString
(),
'note'
:(
note
).
toString
(),
'note'
:
(
note
).
toString
(),
};
};
final
res
=
await
post
(
data
,
crmLeadDetailsAddAppointmentUrl
,
{});
final
res
=
await
post
(
data
,
crmLeadDetailsAddAppointmentUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
...
@@ -3345,7 +3358,6 @@ class ApiCalling {
...
@@ -3345,7 +3358,6 @@ class ApiCalling {
}
}
}
}
// static Future<CommonResponse?> TpcIssueListApprovalAPI(
// static Future<CommonResponse?> TpcIssueListApprovalAPI(
// empId,
// empId,
// session,
// session,
...
...
pubspec.lock
View file @
b9d7c024
...
@@ -37,10 +37,10 @@ packages:
...
@@ -37,10 +37,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: async
name: async
sha256:
d2872f9c1
97
3
1c
2
e5
f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
sha256:
"758e6d74e
971c
3
e5
aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.1
2
.0"
version: "2.1
3
.0"
barcode:
barcode:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -285,10 +285,10 @@ packages:
...
@@ -285,10 +285,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: fake_async
name: fake_async
sha256: "
6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc
"
sha256: "
5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44
"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.3.
2
"
version: "1.3.
3
"
ffi:
ffi:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -932,26 +932,26 @@ packages:
...
@@ -932,26 +932,26 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker
name: leak_tracker
sha256:
c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
sha256:
"8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1
0
.0.
8
"
version: "1
1
.0.
1
"
leak_tracker_flutter_testing:
leak_tracker_flutter_testing:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker_flutter_testing
name: leak_tracker_flutter_testing
sha256:
f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
sha256:
"1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "3.0.
9
"
version: "3.0.
10
"
leak_tracker_testing:
leak_tracker_testing:
dependency: transitive
dependency: transitive
description:
description:
name: leak_tracker_testing
name: leak_tracker_testing
sha256: "
6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3
"
sha256: "
8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1
"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "3.0.
1
"
version: "3.0.
2
"
lints:
lints:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -1657,10 +1657,10 @@ packages:
...
@@ -1657,10 +1657,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: vm_service
name: vm_service
sha256:
"0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
sha256:
ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1
4.3.1
"
version: "1
5.0.0
"
web:
web:
dependency: transitive
dependency: transitive
description:
description:
...
...
pubspec.yaml
View file @
b9d7c024
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.8
7
+9
1
version
:
1.0.8
8
+9
2
environment
:
environment
:
sdk
:
^3.7.2
sdk
:
^3.7.2
...
...
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