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
185e0896
Commit
185e0896
authored
Sep 17, 2025
by
Sai Srinivas
Browse files
changes by mohit
parent
ee5b7a8e
Changes
35
Hide whitespace changes
Inline
Side-by-side
lib/screens/finance/AllPaymentRequesitionListsByModes.dart
View file @
185e0896
...
...
@@ -57,31 +57,48 @@ class _AllpaymentrequesitionlistsbymodesState
bool
shouldShowButtons
=
false
;
final
numberFormat
=
NumberFormat
.
decimalPattern
();
final
ScrollController
_scrollController
=
ScrollController
();
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
_connectivity
.
initialise
();
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
cf
=
Commondaterangefilter
();
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
listen:
false
,
);
final
now
=
DateTime
.
now
();
final
range
=
DateTimeRange
(
start:
DateTime
(
now
.
year
,
now
.
month
,
now
.
day
),
end:
DateTime
(
now
.
year
,
now
.
month
,
now
.
day
),
);
final
dateRange
=
cf
.
getFormattedDateRange
(
range
);
// print(dateRange);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
_scrollController
.
addListener
(()
{
if
(
_scrollController
.
position
.
pixels
>=
_scrollController
.
position
.
maxScrollExtent
-
200
&&
!
provider
.
isLoadingMore
&&
provider
.
hasMoreData
)
{
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
append:
true
,
);
}
});
});
}
@override
void
dispose
()
{
_scrollController
.
dispose
();
_connectivity
.
disposeStream
();
super
.
dispose
();
}
//'Requested',
// 'Level 1 Approved',
// 'Level 2 Approved',
...
...
@@ -174,12 +191,12 @@ class _AllpaymentrequesitionlistsbymodesState
return
18.0
;
}
@override
void
dispose
()
{
// TODO: implement dispose
super
.
dispose
();
_connectivity
.
disposeStream
();
}
//
@override
//
void dispose() {
//
// TODO: implement dispose
//
super.dispose();
//
_connectivity.disposeStream();
//
}
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -320,387 +337,316 @@ class _AllpaymentrequesitionlistsbymodesState
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
body:
provider
.
isLoading
&&
requestLists
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
),
)
:
requestLists
.
isNotEmpty
?
RefreshIndicator
(
onRefresh:
()
async
{
provider
.
resetPagination
();
await
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
},
child:
Scrollbar
(
controller:
_scrollController
,
// attach here
thumbVisibility:
false
,
child:
ListView
.
builder
(
controller:
_scrollController
,
physics:
const
AlwaysScrollableScrollPhysics
(),
itemCount:
requestLists
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
// loader row for pagination
if
(
index
==
requestLists
.
length
)
{
return
provider
.
isLoadingMore
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
(),
),
),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
shouldShowSwipeButtons
(
requestLists
[
index
].
status
);
if
(
requestLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
return
InkResponse
(
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentrequestionlistdetails"
,
)
:
const
SizedBox
.
shrink
();
}
// Your swipe logic untouched
final
request
=
requestLists
[
index
];
shouldShowSwipeButtons
(
request
.
status
);
return
InkResponse
(
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentrequestionlistdetails"
,
),
),
);
if
(
routeSettingName
==
"Paymentrequestionlistdetails"
)
{
print
(
"croos refresh"
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
20
),
child:
Slidable
(
startActionPane:
shouldShowButtons
?
ActionPane
(
motion:
const
ScrollMotion
(),
dragDismissible:
false
,
// dismissible: DismissiblePane(onDismissed: () {}),
children:
[
if
(
shouldShowButtons
&&
![
"admin"
,
"self"
,
].
contains
(
widget
.
mode
))
...[
SlidableAction
(
onPressed:
(
context
)
{
_showLevelRejectionSheet
(
context
,
requestLists
[
index
].
id
,
);
},
backgroundColor:
Color
(
0xFFFFE5E5
,
),
foregroundColor:
Color
(
0xFFEF3739
,
),
icon:
Icons
.
clear
,
label:
'Reject'
,
),
);
if
(
routeSettingName
==
"Paymentrequestionlistdetails"
)
{
print
(
"croos refresh"
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
20
),
child:
Slidable
(
startActionPane:
shouldShowButtons
?
ActionPane
(
motion:
const
ScrollMotion
(),
dragDismissible:
false
,
// dismissible: DismissiblePane(onDismissed: () {}),
children:
[
if
(
shouldShowButtons
&&
![
"admin"
,
"self"
,
].
contains
(
widget
.
mode
))
...[
SlidableAction
(
onPressed:
(
context
)
{
_showLevelRejectionSheet
(
context
,
requestLists
[
index
].
id
,
);
},
backgroundColor:
Color
(
0xFFFFE5E5
,
),
foregroundColor:
Color
(
0xFFEF3739
,
),
icon:
Icons
.
clear
,
label:
'Reject'
,
),
],
],
if
(
widget
.
mode
==
"process"
)
...[
SlidableAction
(
onPressed:
(
context
)
{
detailsProvider
.
approveRejectPaymentRequestAPIFunction
(
context
,
requestLists
[
index
]
.
id
,
);
detailsProvider
.
preValues
();
_showAddPaymentSheet
(
context
,
requestLists
[
index
].
id
,
);
},
backgroundColor:
Color
(
0xFFFFF8E5
,
),
foregroundColor:
Color
(
0xFFFFB600
,
),
icon:
Icons
.
add
,
label:
'Add Payment'
,
),
],
],
)
:
null
,
endActionPane:
shouldShowButtons
?
ActionPane
(
motion:
const
ScrollMotion
(),
key:
ValueKey
(
requestLists
[
index
].
id
,
),
dragDismissible:
false
,
if
(
widget
.
mode
==
"process"
)
...[
SlidableAction
(
onPressed:
(
context
)
{
detailsProvider
.
approveRejectPaymentRequestAPIFunction
(
context
,
requestLists
[
index
]
.
id
,
);
detailsProvider
.
preValues
();
_showAddPaymentSheet
(
context
,
requestLists
[
index
].
id
,
);
},
backgroundColor:
Color
(
0xFFFFF8E5
,
),
foregroundColor:
Color
(
0xFFFFB600
,
),
icon:
Icons
.
add
,
label:
'Add Payment'
,
),
],
],
)
:
null
,
endActionPane:
shouldShowButtons
?
ActionPane
(
motion:
const
ScrollMotion
(),
key:
ValueKey
(
requestLists
[
index
].
id
,
),
dragDismissible:
false
,
// dismissible: DismissiblePane(
//
// onDismissed: () {},
// closeOnCancel: true,
// resizeDuration: Duration(milliseconds: 300),),
children:
[
if
([
"apr_lvl1"
,
"apr_lvl2"
,
"self_apr_lvl2"
,
].
contains
(
widget
.
mode
))
...[
SlidableAction
(
onPressed:
(
context
)
{
detailsProvider
.
paymentRequesitionDetails
(
context
,
requestLists
[
index
]
.
id
,
);
detailsProvider
.
preValues
();
detailsProvider
.
approveRejectPaymentRequestAPIFunction
(
context
,
requestLists
[
index
]
.
id
,
);
_showLevelApprovalSheet
(
context
,
requestLists
[
index
].
id
,
);
},
backgroundColor:
Color
(
0xFFE9FFE8
,
),
foregroundColor:
Color
(
0xFF4CB443
,
),
icon:
Icons
.
check
,
label:
'Approve'
,
),
],
],
)
:
null
,
// dismissible: DismissiblePane(
//
// onDismissed: () {},
// closeOnCancel: true,
// resizeDuration: Duration(milliseconds: 300),),
children:
[
if
([
"apr_lvl1"
,
"apr_lvl2"
,
"self_apr_lvl2"
,
].
contains
(
widget
.
mode
))
...[
SlidableAction
(
onPressed:
(
context
)
{
detailsProvider
.
paymentRequesitionDetails
(
context
,
requestLists
[
index
]
.
id
,
);
detailsProvider
.
preValues
();
detailsProvider
.
approveRejectPaymentRequestAPIFunction
(
context
,
requestLists
[
index
]
.
id
,
);
_showLevelApprovalSheet
(
context
,
requestLists
[
index
].
id
,
);
},
backgroundColor:
Color
(
0xFFE9FFE8
,
),
foregroundColor:
Color
(
0xFF4CB443
,
),
icon:
Icons
.
check
,
label:
'Approve'
,
),
],
],
)
:
null
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
getDecorationColor
(
requestLists
[
index
].
status
,
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
requestLists
[
index
]
.
status
,
),
style:
TextStyle
(
color:
getTextColor
(
requestLists
[
index
]
.
status
,
),
fontSize:
getSize
(
requestLists
[
index
]
.
status
,
),
fontFamily:
"JakartaBold"
,
),
),
),
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
getDecorationColor
(
requestLists
[
index
].
status
,
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
requestLists
[
index
]
.
status
,
),
style:
TextStyle
(
color:
getTextColor
(
requestLists
[
index
]
.
status
,
),
fontSize:
getSize
(
requestLists
[
index
]
.
status
,
),
fontFamily:
"JakartaBold"
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
accountName
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"
${requestLists[index].date}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
accountName
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Expanded
(
flex:
3
,
child:
Text
(
maxLines:
1
,
"₹
${requestLists[index].amount!}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
Text
(
"
${requestLists[index].date}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
]
,
)
,
),
),
Expanded
(
flex:
3
,
child:
Text
(
maxLines:
1
,
"₹
${requestLists[index].amount!}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
],
),
)
,
]
,
),
);
},
),
),
)
:
Emptywidget
(
context
),
);
},
);
}
Future
<
void
>
_showOptionsSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
backgroundColor:
Colors
.
white
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Requestionlistprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
SizedBox
(
height:
15
),
...
List
.
generate
(
5
,
(
index
)
{
final
assetnames
=
[
"se_locate_customer"
,
"se_locate_customer"
,
"se_update_complaint"
,
"se_payment_details"
,
"se_payment_details"
,
];
final
Headingnames
=
[
"Copy to Clipboard"
,
"Download CSV"
,
"Download XLSX"
,
"Download PDF"
,
"Print Data"
,
];
return
ListTile
(
onTap:
()
{
HapticFeedback
.
selectionClick
();
switch
(
index
)
{
case
0
:
provider
.
copyToClipboard
(
context
);
break
;
case
1
:
provider
.
downloadCSV
(
context
);
break
;
case
2
:
provider
.
downloadXLS
(
context
);
break
;
case
3
:
provider
.
downloadPDF
(
context
);
break
;
case
4
:
provider
.
printData
(
context
);
break
;
}
},
leading:
SvgPicture
.
asset
(
"assets/svg/
${assetnames[index]}
.svg"
,
),
title:
Text
(
Headingnames
[
index
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
),
trailing:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
);
}),
],
),
),
),
),
);
},
),
);
},
),
)
:
Emptywidget
(
context
),
);
},
);
}
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
lib/screens/finance/paymentListPaymentRequisition.dart
View file @
185e0896
...
...
@@ -28,41 +28,45 @@ class Paymentlistpaymentrequisition extends StatefulWidget {
class
_PaymentlistpaymentrequisitionState
extends
State
<
Paymentlistpaymentrequisition
>
{
late
Commondaterangefilter
cf
;
final
ScrollController
_scrollController
=
ScrollController
();
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
_connectivity
.
initialise
();
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
cf
=
Commondaterangefilter
();
var
provider
=
Provider
.
of
<
Paymentrequisitionpaymentslistprovider
>(
context
,
listen:
false
,
);
final
now
=
DateTime
.
now
();
final
range
=
DateTimeRange
(
start:
DateTime
(
now
.
year
,
now
.
month
,
now
.
day
),
end:
DateTime
(
now
.
year
,
now
.
month
,
now
.
day
),
);
final
dateRange
=
cf
.
getFormattedDateRange
(
range
);
provider
.
resetPagination
();
provider
.
paymentsListAPI
(
context
,
''
,
''
);
_scrollController
.
addListener
(()
{
if
(
_scrollController
.
position
.
pixels
>=
_scrollController
.
position
.
maxScrollExtent
-
200
)
{
provider
.
loadMore
(
context
,
''
,
''
);
}
});
});
}
@override
void
dispose
()
{
// TODO: implement dispose
super
.
dispose
();
_scrollController
.
dispose
();
_connectivity
.
disposeStream
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
...
...
@@ -145,144 +149,152 @@ class _PaymentlistpaymentrequisitionState
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
requestLists
.
isNotEmpty
?
Scrollbar
(
controller:
_scrollController
,
thumbVisibility:
false
,
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
requestLists
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
if
(
index
==
requestLists
.
length
)
{
return
provider
.
isLoadingMore
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
()),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
:
const
SizedBox
.
shrink
();
}
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailspaymentrequisition
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentdetailspaymentrequisition"
,
),
),
);
if
(
routeSettingName
==
"Paymentdetailspaymentrequisition"
)
{
print
(
"pld"
);
final
payment
=
requestLists
[
index
];
return
InkResponse
(
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailspaymentrequisition
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentdetailspaymentrequisition"
,
),
),
);
if
(
routeSettingName
==
"Paymentdetailspaymentrequisition"
)
{
print
(
"pld"
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
3.0
),
decoration:
BoxDecoration
(
color:
AppColors
.
requested_bg_color
,
shape:
BoxShape
.
circle
),
child:
SvgPicture
.
asset
(
"assets/svg/finance/rupee_ic.svg"
,
fit:
BoxFit
.
scaleDown
,
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
3.0
),
decoration:
BoxDecoration
(
color:
AppColors
.
requested_bg_color
,
shape:
BoxShape
.
circle
),
child:
SvgPicture
.
asset
(
"assets/svg/finance/rupee_ic.svg"
,
fit:
BoxFit
.
scaleDown
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
receipientAccount
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"
${requestLists[index].paymentDate}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
receipientAccount
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
3
,
child:
Text
(
"₹
${requestLists[index].amount}
"
,
maxLines:
1
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
Text
(
"
${requestLists[index].paymentDate}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
3
,
child:
Text
(
"₹
${requestLists[index].amount}
"
,
maxLines:
1
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
],
),
],
),
],
),
),
);
},
),
],
),
)
:
Emptywidget
(
context
),
),
);
},
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
lib/screens/finance/paymentreceiptList.dart
View file @
185e0896
...
...
@@ -29,24 +29,41 @@ class Paymentreceiptlist extends StatefulWidget {
class
_PaymentreceiptlistState
extends
State
<
Paymentreceiptlist
>
{
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
final
ScrollController
_scrollController
=
ScrollController
();
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
_connectivity
.
initialise
();
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
var
provider
=
Provider
.
of
<
Paymentreceiptsprovider
>(
context
,
listen:
false
,
);
provider
.
resetPagination
();
provider
.
paymentsListAPI
(
context
,
''
,
''
);
_scrollController
.
addListener
(()
{
if
(
_scrollController
.
position
.
pixels
>=
_scrollController
.
position
.
maxScrollExtent
-
200
)
{
provider
.
loadMore
(
context
,
''
,
''
);
}
});
});
}
@override
void
dispose
()
{
_scrollController
.
dispose
();
_connectivity
.
disposeStream
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
...
...
@@ -77,6 +94,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Paymentreceiptsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
receipts
=
provider
.
receiptsList
;
final
requestLists
=
provider
.
receiptsList
;
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
...
...
@@ -129,137 +147,146 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
receipts
.
isNotEmpty
?
Scrollbar
(
controller:
_scrollController
,
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
receipts
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
if
(
index
==
receipts
.
length
)
{
return
provider
.
isLoadingMore
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
()),
)
:
const
SizedBox
.
shrink
();
}
final
receipt
=
receipts
[
index
];
return
InkResponse
(
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentreceiptdetails
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentreceiptdetails"
,
),
),
);
if
(
routeSettingName
==
"Paymentreceiptdetails"
)
{
debugPrint
(
"prd"
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
// if (res == true) {
// provider.paymentsListAPI(context, '', '');
// }
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentreceiptdetails
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentreceiptdetails"
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
3.0
),
decoration:
BoxDecoration
(
color:
AppColors
.
requested_bg_color
,
shape:
BoxShape
.
circle
,
),
child:
SvgPicture
.
asset
(
"assets/svg/finance/rupee_ic.svg"
,
fit:
BoxFit
.
scaleDown
,
),
);
if
(
routeSettingName
==
"Paymentreceiptdetails"
)
{
debugPrint
(
"prd"
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
// if (res == true) {
// provider.paymentsListAPI(context, '', '');
// }
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
3.0
),
decoration:
BoxDecoration
(
color:
AppColors
.
requested_bg_color
,
shape:
BoxShape
.
circle
,
),
child:
SvgPicture
.
asset
(
"assets/svg/finance/rupee_ic.svg"
,
fit:
BoxFit
.
scaleDown
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
receipientAccount
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"
${requestLists[index].receiptDate}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
receipientAccount
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
3
,
child:
Text
(
"₹
${requestLists[index].amount}
"
,
textAlign:
TextAlign
.
right
,
maxLines:
1
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
Text
(
"
${requestLists[index].receiptDate}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
]
,
)
,
]
,
)
,
]
,
)
,
),
),
);
},
),
SizedBox
(
width:
10
),
Expanded
(
flex:
3
,
child:
Text
(
"₹
${requestLists[index].amount}
"
,
textAlign:
TextAlign
.
right
,
maxLines:
1
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
],
),
],
),
)
:
Emptywidget
(
context
),
),
);
},
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
lib/screens/hrm/HrmDashboardScreen.dart
View file @
185e0896
...
...
@@ -66,7 +66,7 @@ class _HrmdashboardScreenState extends State<HrmdashboardScreen> {
],
),
),
backgroundColor:
const
Color
(
0xffF6F6F8
)
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SingleChildScrollView
(
child:
Column
(
children:
[
...
...
lib/screens/hrm/LeaveApplicationDetailScreen.dart
View file @
185e0896
...
...
@@ -2,24 +2,27 @@ import 'package:dotted_line/dotted_line.dart';
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
import
'../../Notifiers/hrmProvider/leaveApplicationDetailsProvider.dart'
;
import
'../../Notifiers/HomeScreenNotifier.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../finance/FileViewer.dart'
;
/// Screen for leave application details
class
LeaveApplicationDetailScreen
extends
StatefulWidget
{
final
String
leaveRequestId
;
final
String
mode
;
const
LeaveApplicationDetailScreen
({
super
.
key
,
required
this
.
leaveRequestId
,
required
this
.
mode
});
const
LeaveApplicationDetailScreen
({
super
.
key
,
required
this
.
leaveRequestId
,
required
this
.
mode
,
});
@override
State
<
LeaveApplicationDetailScreen
>
createState
()
=>
_LeaveApplicationDetailScreenState
();
State
<
LeaveApplicationDetailScreen
>
createState
()
=>
_LeaveApplicationDetailScreenState
();
}
class
_LeaveApplicationDetailScreenState
extends
State
<
LeaveApplicationDetailScreen
>
{
class
_LeaveApplicationDetailScreenState
extends
State
<
LeaveApplicationDetailScreen
>
{
bool
_actionSubmitted
=
false
;
@override
...
...
@@ -30,12 +33,19 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
// Scale factors based on screen size
final
scaleFactor
=
screenWidth
/
360
;
// Base width for scaling
final
textScaleFactor
=
MediaQuery
.
of
(
context
).
textScaleFactor
.
clamp
(
1.0
,
1.2
);
final
textScaleFactor
=
MediaQuery
.
of
(
context
,
).
textScaleFactor
.
clamp
(
1.0
,
1.2
);
return
SafeArea
(
top:
false
,
child:
ChangeNotifierProvider
(
create:
(
_
)
=>
LeaveApplicationDetailsProvider
()..
fetchLeaveApplicationDetails
(
context
,
widget
.
leaveRequestId
),
create:
(
_
)
=>
LeaveApplicationDetailsProvider
()..
fetchLeaveApplicationDetails
(
context
,
widget
.
leaveRequestId
,
),
child:
Consumer
<
LeaveApplicationDetailsProvider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
...
...
@@ -74,7 +84,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
body:
Builder
(
builder:
(
context
)
{
if
(
provider
.
isLoading
)
{
return
const
Center
(
child:
CircularProgressIndicator
(
color:
Colors
.
blue
));
return
const
Center
(
child:
CircularProgressIndicator
(
color:
Colors
.
blue
),
);
}
if
(
provider
.
response
?.
requestDetails
==
null
)
{
return
const
Center
(
child:
Text
(
"No details found"
));
...
...
@@ -89,7 +101,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
children:
[
Card
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
16
*
scaleFactor
),
borderRadius:
BorderRadius
.
circular
(
16
*
scaleFactor
,
),
),
elevation:
0
,
child:
Padding
(
...
...
@@ -99,14 +113,18 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
children:
[
/// Header with status
Container
(
margin:
EdgeInsets
.
only
(
bottom:
0.5
*
scaleFactor
),
margin:
EdgeInsets
.
only
(
bottom:
0.5
*
scaleFactor
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
2.5
*
scaleFactor
,
vertical:
12
*
scaleFactor
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
12
*
scaleFactor
),
borderRadius:
BorderRadius
.
circular
(
12
*
scaleFactor
,
),
),
child:
Row
(
children:
[
...
...
@@ -132,14 +150,18 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
/// Middle text
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
details
.
leaveType
??
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dotted
,
decorationColor:
AppColors
.
grey_thick
,
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dotted
,
decorationColor:
AppColors
.
grey_thick
,
height:
1.2
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
...
...
@@ -166,8 +188,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
horizontal:
12
*
scaleFactor
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
6
*
scaleFactor
),
color:
_getStatusBackgroundColor
(
details
.
status
),
borderRadius:
BorderRadius
.
circular
(
6
*
scaleFactor
,
),
color:
_getStatusBackgroundColor
(
details
.
status
,
),
),
child:
Center
(
child:
Text
(
...
...
@@ -175,7 +201,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
style:
TextStyle
(
fontSize:
13
,
fontWeight:
FontWeight
.
w600
,
color:
_getStatusTextColor
(
details
.
status
),
color:
_getStatusTextColor
(
details
.
status
,
),
),
),
),
...
...
@@ -189,26 +217,89 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
padding:
EdgeInsets
.
all
(
8.0
*
scaleFactor
),
child:
Column
(
children:
[
_buildSectionHeader
(
"Leave Details"
,
scaleFactor
),
_buildDetailTile
(
"Application ID"
,
details
.
id
,
scaleFactor
),
_buildDetailTile
(
"Applied Date"
,
details
.
appliedDate
,
scaleFactor
),
_buildDetailTile
(
"Leave Type"
,
details
.
leaveType
,
scaleFactor
),
_buildDateRangeTile
(
"Leave Period"
,
details
.
fromDate
,
details
.
toDate
,
scaleFactor
),
_buildTimeRangeTile
(
"Time Period"
,
details
.
fromTime
,
details
.
toTime
,
scaleFactor
),
_buildDetailTile
(
"Reason"
,
details
.
reason
,
scaleFactor
),
_buildSectionHeader
(
"Leave Details"
,
scaleFactor
,
),
_buildDetailTile
(
"Application ID"
,
details
.
id
,
scaleFactor
,
),
_buildDetailTile
(
"Applied Date"
,
details
.
appliedDate
,
scaleFactor
,
),
_buildDetailTile
(
"Leave Type"
,
details
.
leaveType
,
scaleFactor
,
),
_buildDateRangeTile
(
"Leave Period"
,
details
.
fromDate
,
details
.
toDate
,
scaleFactor
,
),
_buildTimeRangeTile
(
"Time Period"
,
details
.
fromTime
,
details
.
toTime
,
scaleFactor
,
),
_buildDetailTile
(
"Reason"
,
details
.
reason
,
scaleFactor
,
),
/// Approval Details
_buildSectionHeader
(
"Approval Details"
,
scaleFactor
),
_buildDetailTile
(
"Requested To"
,
details
.
requestedTo
,
scaleFactor
),
_buildDetailTile
(
"Approved By"
,
details
.
approvedBy
,
scaleFactor
),
_buildDetailTile
(
"Approved Date"
,
details
.
approvedDate
,
scaleFactor
),
_buildDetailTile
(
"Approval Remarks"
,
details
.
approvalRemarks
,
scaleFactor
),
_buildSectionHeader
(
"Approval Details"
,
scaleFactor
,
),
_buildDetailTile
(
"Requested To"
,
details
.
requestedTo
,
scaleFactor
,
),
_buildDetailTile
(
"Approved By"
,
details
.
approvedBy
,
scaleFactor
,
),
_buildDetailTile
(
"Approved Date"
,
details
.
approvedDate
,
scaleFactor
,
),
_buildDetailTile
(
"Approval Remarks"
,
details
.
approvalRemarks
,
scaleFactor
,
),
/// Additional Information
_buildSectionHeader
(
"Additional Information"
,
scaleFactor
),
_buildDetailTile
(
"Status"
,
details
.
status
,
scaleFactor
),
_buildDetailTile
(
"From Time"
,
details
.
fromTime
,
scaleFactor
),
_buildDetailTile
(
"To Time"
,
details
.
toTime
,
scaleFactor
),
_buildSectionHeader
(
"Additional Information"
,
scaleFactor
,
),
_buildDetailTile
(
"Status"
,
details
.
status
,
scaleFactor
,
),
_buildDetailTile
(
"From Time"
,
details
.
fromTime
,
scaleFactor
,
),
_buildDetailTile
(
"To Time"
,
details
.
toTime
,
scaleFactor
,
),
],
),
),
...
...
@@ -222,129 +313,158 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
);
},
),
bottomNavigationBar:
(
widget
.
mode
==
"teamleader"
&&
!
_actionSubmitted
&&
provider
.
response
?.
requestDetails
?.
status
!=
"Approved"
&&
provider
.
response
?.
requestDetails
?.
status
!=
"Rejected"
)
?
Container
(
decoration:
const
BoxDecoration
(
gradient:
LinearGradient
(
begin:
Alignment
.
topCenter
,
end:
Alignment
.
bottomCenter
,
colors:
[
Color
(
0xffFFFFFF
),
Color
(
0x00FFFFFF
),
],
),
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
*
scaleFactor
,
vertical:
6
*
scaleFactor
),
height:
61
*
scaleFactor
,
child:
Column
(
children:
[
Row
(
children:
[
/// Reject Button
Expanded
(
child:
InkWell
(
onTap:
()
{
showRemarkSheet
(
context:
context
,
actionType:
"Reject"
,
onSubmit:
(
remark
)
{
provider
.
leaveRequestRejectApprove
(
context
,
mode:
widget
.
mode
,
type:
"Rejected"
,
remarks:
remark
,
id:
provider
.
response
!.
requestDetails
!.
id
!,
);
},
).
then
((
_
)
{
provider
.
fetchLeaveApplicationDetails
(
context
,
widget
.
leaveRequestId
);
});
},
child:
Container
(
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
*
scaleFactor
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_reject_ic.svg"
),
SizedBox
(
width:
6
*
scaleFactor
),
Text
(
"Reject"
,
style:
TextStyle
(
color:
Colors
.
black87
,
fontSize:
14
*
scaleFactor
,
fontFamily:
"JakartaMedium"
,
),
),
],
),
),
bottomNavigationBar:
(
widget
.
mode
==
"teamleader"
&&
!
_actionSubmitted
&&
provider
.
response
?.
requestDetails
?.
status
!=
"Approved"
&&
provider
.
response
?.
requestDetails
?.
status
!=
"Rejected"
)
?
Container
(
decoration:
const
BoxDecoration
(
gradient:
LinearGradient
(
begin:
Alignment
.
topCenter
,
end:
Alignment
.
bottomCenter
,
colors:
[
Color
(
0xffFFFFFF
),
Color
(
0x00FFFFFF
)],
),
),
/// Vertical Divider
Container
(
width:
1
,
height:
45
*
scaleFactor
,
color:
Colors
.
grey
.
shade300
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
*
scaleFactor
,
vertical:
6
*
scaleFactor
,
),
height:
61
*
scaleFactor
,
child:
Column
(
children:
[
Row
(
children:
[
/// Reject Button
Expanded
(
child:
InkWell
(
onTap:
()
{
showRemarkSheet
(
context:
context
,
actionType:
"Reject"
,
onSubmit:
(
remark
)
{
provider
.
leaveRequestRejectApprove
(
context
,
mode:
widget
.
mode
,
type:
"Rejected"
,
remarks:
remark
,
id:
provider
.
response
!
.
requestDetails
!
.
id
!,
);
},
).
then
((
_
)
{
provider
.
fetchLeaveApplicationDetails
(
context
,
widget
.
leaveRequestId
,
);
});
},
child:
Container
(
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
*
scaleFactor
,
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_reject_ic.svg"
,
),
SizedBox
(
width:
6
*
scaleFactor
),
Text
(
"Reject"
,
style:
TextStyle
(
color:
Colors
.
black87
,
fontSize:
14
*
scaleFactor
,
fontFamily:
"JakartaMedium"
,
),
),
],
),
),
),
),
/// Approve Button
Expanded
(
child:
InkWell
(
onTap:
()
{
showRemarkSheet
(
context:
context
,
actionType:
"Approve"
,
onSubmit:
(
remark
)
async
{
await
provider
.
leaveRequestRejectApprove
(
context
,
mode:
widget
.
mode
,
type:
"Approved"
,
remarks:
remark
,
id:
provider
.
response
!.
requestDetails
!.
id
!,
);
},
).
then
((
_
)
{
provider
.
fetchLeaveApplicationDetails
(
context
,
widget
.
leaveRequestId
);
});
},
child:
Container
(
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
*
scaleFactor
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
),
SizedBox
(
width:
6
*
scaleFactor
),
Text
(
"Approve"
,
style:
TextStyle
(
color:
Colors
.
black87
,
fontSize:
14
*
scaleFactor
,
fontFamily:
"JakartaMedium"
,
/// Vertical Divider
Container
(
width:
1
,
height:
45
*
scaleFactor
,
color:
Colors
.
grey
.
shade300
,
),
/// Approve Button
Expanded
(
child:
InkWell
(
onTap:
()
{
showRemarkSheet
(
context:
context
,
actionType:
"Approve"
,
onSubmit:
(
remark
)
async
{
await
provider
.
leaveRequestRejectApprove
(
context
,
mode:
widget
.
mode
,
type:
"Approved"
,
remarks:
remark
,
id:
provider
.
response
!
.
requestDetails
!
.
id
!,
);
},
).
then
((
_
)
{
provider
.
fetchLeaveApplicationDetails
(
context
,
widget
.
leaveRequestId
,
);
});
},
child:
Container
(
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
*
scaleFactor
,
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
,
),
SizedBox
(
width:
6
*
scaleFactor
),
Text
(
"Approve"
,
style:
TextStyle
(
color:
Colors
.
black87
,
fontSize:
14
*
scaleFactor
,
fontFamily:
"JakartaMedium"
,
),
),
],
),
),
),
]
,
)
,
)
,
]
,
),
),
SizedBox
(
height:
2
*
scaleFactor
),
],
),
],
),
SizedBox
(
height:
2
*
scaleFactor
)
],
),
)
:
const
SizedBox
.
shrink
(),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerDocked
,
)
:
const
SizedBox
.
shrink
(),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerDocked
,
);
},
),
...
...
@@ -380,7 +500,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
bool
validateFields
()
{
String
?
newRemarkError
=
remarkController
.
text
.
trim
().
isEmpty
?
"Remark required"
:
null
;
remarkController
.
text
.
trim
().
isEmpty
?
"Remark required"
:
null
;
if
(
remarkError
!=
newRemarkError
)
{
updateState
(()
{
...
...
@@ -390,23 +512,30 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
return
newRemarkError
==
null
;
}
Widget
errorText
(
String
?
msg
)
=>
msg
==
null
?
const
SizedBox
()
:
Padding
(
padding:
EdgeInsets
.
only
(
top:
4
*
scaleFactor
,
left:
4
*
scaleFactor
),
child:
Text
(
msg
,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
*
scaleFactor
,
fontFamily:
"JakartaMedium"
,
),
),
);
Widget
errorText
(
String
?
msg
)
=>
msg
==
null
?
const
SizedBox
()
:
Padding
(
padding:
EdgeInsets
.
only
(
top:
4
*
scaleFactor
,
left:
4
*
scaleFactor
,
),
child:
Text
(
msg
,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
*
scaleFactor
,
fontFamily:
"JakartaMedium"
,
),
),
);
return
SafeArea
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
15
*
scaleFactor
,
vertical:
10
*
scaleFactor
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
15
*
scaleFactor
,
vertical:
10
*
scaleFactor
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
...
...
@@ -461,8 +590,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
),
border:
InputBorder
.
none
,
contentPadding:
EdgeInsets
.
symmetric
(
horizontal:
12
*
scaleFactor
,
vertical:
12
*
scaleFactor
horizontal:
12
*
scaleFactor
,
vertical:
12
*
scaleFactor
,
),
),
),
...
...
@@ -480,7 +609,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
height:
45
*
scaleFactor
,
decoration:
BoxDecoration
(
color:
Color
(
0x12AAAAAA
),
borderRadius:
BorderRadius
.
circular
(
12
*
scaleFactor
),
borderRadius:
BorderRadius
.
circular
(
12
*
scaleFactor
,
),
),
child:
Center
(
child:
Text
(
...
...
@@ -510,7 +641,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
}
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
SnackBar
(
content:
Text
(
"Request submitted successfully"
),
content:
Text
(
"Request submitted successfully"
,
),
backgroundColor:
Colors
.
green
,
behavior:
SnackBarBehavior
.
floating
,
),
...
...
@@ -521,7 +654,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
height:
45
*
scaleFactor
,
decoration:
BoxDecoration
(
color:
Colors
.
blue
,
borderRadius:
BorderRadius
.
circular
(
12
*
scaleFactor
),
borderRadius:
BorderRadius
.
circular
(
12
*
scaleFactor
,
),
),
child:
Center
(
child:
Text
(
...
...
@@ -538,7 +673,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
),
],
),
SizedBox
(
height:
2
*
scaleFactor
)
SizedBox
(
height:
2
*
scaleFactor
)
,
],
),
),
...
...
@@ -591,7 +726,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
}
/// For date range display
Widget
_buildDateRangeTile
(
String
label
,
String
?
fromDate
,
String
?
toDate
,
double
scaleFactor
)
{
Widget
_buildDateRangeTile
(
String
label
,
String
?
fromDate
,
String
?
toDate
,
double
scaleFactor
,
)
{
return
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
*
scaleFactor
),
child:
Row
(
...
...
@@ -631,8 +771,14 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
}
/// For time range display
Widget
_buildTimeRangeTile
(
String
label
,
String
?
fromTime
,
String
?
toTime
,
double
scaleFactor
)
{
if
((
fromTime
==
null
||
fromTime
.
isEmpty
)
&&
(
toTime
==
null
||
toTime
.
isEmpty
))
{
Widget
_buildTimeRangeTile
(
String
label
,
String
?
fromTime
,
String
?
toTime
,
double
scaleFactor
,
)
{
if
((
fromTime
==
null
||
fromTime
.
isEmpty
)
&&
(
toTime
==
null
||
toTime
.
isEmpty
))
{
return
const
SizedBox
.
shrink
();
}
...
...
@@ -684,10 +830,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
children:
[
Text
(
title
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
),
),
SizedBox
(
width:
10
*
scaleFactor
),
Expanded
(
...
...
@@ -729,4 +872,4 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
return
AppColors
.
requested_text_color
;
}
}
}
\ No newline at end of file
}
lib/screens/hrm/TourExpensesListScreen.dart
View file @
185e0896
...
...
@@ -16,222 +16,286 @@ class TourExpensesListScreen extends StatefulWidget {
}
class
_TourExpensesListScreenState
extends
State
<
TourExpensesListScreen
>
{
final
ScrollController
_scrollController
=
ScrollController
();
int
_currentPage
=
1
;
bool
_isLoadingMore
=
false
;
bool
_hasMoreItems
=
true
;
@override
void
initState
()
{
super
.
initState
();
_scrollController
.
addListener
(
_scrollListener
);
// fetch first page only once
Future
.
microtask
(()
{
final
provider
=
Provider
.
of
<
TourExpensesProvider
>(
context
,
listen:
false
);
provider
.
fetchTourExpenses
(
context
,
"1"
);
});
}
@override
void
dispose
()
{
_scrollController
.
removeListener
(
_scrollListener
);
_scrollController
.
dispose
();
super
.
dispose
();
}
void
_scrollListener
()
{
if
(
_scrollController
.
position
.
pixels
==
_scrollController
.
position
.
maxScrollExtent
)
{
_loadMoreItems
(
context
);
}
}
void
_loadMoreItems
(
BuildContext
context
)
{
if
(
_isLoadingMore
||
!
_hasMoreItems
)
return
;
final
provider
=
Provider
.
of
<
TourExpensesProvider
>(
context
,
listen:
false
);
setState
(()
{
_isLoadingMore
=
true
;
_currentPage
++;
});
provider
.
fetchTourExpenses
(
context
,
_currentPage
.
toString
(),
append:
true
)
.
then
((
_
)
{
setState
(()
{
_isLoadingMore
=
false
;
final
newItems
=
provider
.
response
?.
tourList
??
[];
if
(
newItems
.
length
<
_currentPage
*
10
)
{
// assuming API gives 10 items per page
_hasMoreItems
=
false
;
}
});
}).
catchError
((
_
)
{
setState
(()
{
_isLoadingMore
=
false
;
_currentPage
--;
// rollback
});
});
}
void
_refreshList
(
BuildContext
context
)
{
final
provider
=
Provider
.
of
<
TourExpensesProvider
>(
context
,
listen:
false
);
setState
(()
{
_currentPage
=
1
;
_hasMoreItems
=
true
;
_isLoadingMore
=
false
;
});
provider
.
fetchTourExpenses
(
context
,
"1"
);
}
@override
Widget
build
(
BuildContext
context
)
{
return
SafeArea
(
top:
false
,
child:
ChangeNotifierProvider
(
create:
(
_
)
=>
TourExpensesProvider
()..
fetchTourExpenses
(
context
,
"1"
),
child:
Consumer
<
TourExpensesProvider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
backgroundColor:
Colors
.
white
,
title:
Row
(
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back_button.svg"
,
height:
25
,
),
child:
Consumer
<
TourExpensesProvider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
backgroundColor:
Colors
.
white
,
title:
Row
(
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back_button.svg"
,
height:
25
,
),
const
SizedBox
(
width:
10
),
const
Text
(
"Tour Expenses"
,
style:
TextStyle
(
fontSize:
18
,
font
Family:
"Plus Jakarta Sans"
,
font
Weight:
FontWeight
.
w600
,
color:
Colors
.
black87
,
)
,
),
const
SizedBox
(
width:
10
),
const
Text
(
"Tour Expenses"
,
style:
TextStyle
(
font
Size:
18
,
font
Family:
"Plus Jakarta Sans"
,
fontWeight:
FontWeight
.
w600
,
color:
Colors
.
black87
,
),
]
,
)
,
)
,
]
,
),
),
backgroundColor:
const
Color
(
0xFFF6F6F8
),
body:
_buildBody
(
provider
),
bottomNavigationBar:
_buildBottomBar
(
context
),
);
},
),
);
}
backgroundColor:
const
Color
(
0xFFF6F6F8
),
body:
Column
(
children:
[
Expanded
(
child:
Builder
(
builder:
(
context
)
{
if
(
provider
.
isLoading
)
{
return
const
Center
(
child:
CircularProgressIndicator
(
color:
Colors
.
blue
));
}
if
(
provider
.
errorMessage
!=
null
)
{
return
Center
(
child:
Text
(
provider
.
errorMessage
!));
}
if
(
provider
.
response
?.
tourList
==
null
||
provider
.
response
!.
tourList
!.
isEmpty
)
{
return
const
Center
(
child:
Text
(
"No Tour Expenses Found"
));
}
final
list
=
provider
.
response
!.
tourList
!;
return
ListView
.
builder
(
padding:
const
EdgeInsets
.
all
(
12
),
itemCount:
list
.
length
,
itemBuilder:
(
context
,
index
)
{
final
TourList
item
=
list
[
index
];
Widget
_buildBody
(
TourExpensesProvider
provider
)
{
if
(
provider
.
isLoading
&&
_currentPage
==
1
)
{
return
const
Center
(
child:
CircularProgressIndicator
(
color:
Colors
.
blue
));
}
if
(
provider
.
errorMessage
!=
null
)
{
return
Center
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
errorMessage
!),
const
SizedBox
(
height:
16
),
ElevatedButton
(
onPressed:
()
=>
_refreshList
(
context
),
child:
const
Text
(
"Retry"
),
),
],
),
);
}
if
(
provider
.
response
?.
tourList
==
null
||
provider
.
response
!.
tourList
!.
isEmpty
)
{
return
const
Center
(
child:
Text
(
"No Tour Expenses Found"
));
}
return
InkWell
(
onTap:
()
{
/// navigation flow
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
TourExpensesDetailsScreen
(
tourBillId:
item
.
id
.
toString
(),
),
),
);
},
child:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
6
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
14
,
vertical:
12
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Row
(
children:
[
/// Left Avatar Circle
Container
(
height:
46
,
width:
46
,
decoration:
BoxDecoration
(
color:
_getAvatarColor
(
item
.
approvalStatus
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
item
.
approvalStatus
),
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"Plus Jakarta Sans"
,
fontWeight:
FontWeight
.
w500
,
color:
_getAvatarTxtColor
(
item
.
approvalStatus
),
),
),
),
),
const
SizedBox
(
width:
12
),
final
list
=
provider
.
response
!.
tourList
!;
return
RefreshIndicator
(
onRefresh:
()
async
{
_refreshList
(
context
);
},
child:
ListView
.
builder
(
controller:
_scrollController
,
padding:
const
EdgeInsets
.
all
(
12
),
itemCount:
list
.
length
+
(
_hasMoreItems
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
if
(
index
>=
list
.
length
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
16
),
child:
Center
(
child:
_isLoadingMore
?
const
CircularProgressIndicator
(
color:
Colors
.
blue
)
:
!
_hasMoreItems
?
const
Text
(
"No more items to load"
)
:
const
SizedBox
.
shrink
(),
),
);
}
/// Middle Section
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
item
.
placeOfVisit
??
"-"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
item
.
appliedDate
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
final
TourList
item
=
list
[
index
];
return
_buildItem
(
context
,
item
);
},
),
);
}
/// Right Section (Applied Amount)
Text
(
"₹
${item.appliedAmount ?? '0'}
"
,
style:
const
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xff1487c9
),
)
),
],
),
),
);
},
);
},
),
Widget
_buildItem
(
BuildContext
context
,
TourList
item
)
{
return
InkWell
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
TourExpensesDetailsScreen
(
tourBillId:
item
.
id
.
toString
()),
),
);
},
child:
Container
(
margin:
const
EdgeInsets
.
symmetric
(
vertical:
6
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
14
,
vertical:
12
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Row
(
children:
[
Container
(
height:
46
,
width:
46
,
decoration:
BoxDecoration
(
color:
_getAvatarColor
(
item
.
approvalStatus
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
item
.
approvalStatus
),
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"Plus Jakarta Sans"
,
fontWeight:
FontWeight
.
w500
,
color:
_getAvatarTxtColor
(
item
.
approvalStatus
),
),
]
,
)
,
),
bottomNavigationBar:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
18
,
vertical:
10
),
color:
Colors
.
white
,
child:
ElevatedButton
(
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
const
Color
(
0xff1487c9
),
// App blue
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
15
),
),
const
SizedBox
(
width:
12
),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
item
.
placeOfVisit
??
"-"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
14
),
elevation:
0
,
// Optional: remove shadow
),
onPressed:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
const
AddBillScreen
(
pageTitleName:
"Add Bill"
),
settings:
const
RouteSettings
(
name:
'AddTourExpBillScreen'
),
),
).
then
((
_
)
{
provider
.
fetchTourExpenses
(
context
,
"1"
);
});
},
child:
const
Text
(
"Add Bill"
,
Text
(
item
.
appliedDate
??
"-"
,
style:
TextStyle
(
fontSize:
16
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
white
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
)
,
]
,
),
),
Text
(
"₹
${item.appliedAmount ?? '0'}
"
,
style:
const
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xff1487c9
),
),
),
],
),
),
);
}
// /// Bottom Add Bill Button
// bottomNavigationBar: Container(
// padding: const EdgeInsets.all(18),
// color: Colors.white,
// child: ElevatedButton(
// style: ElevatedButton.styleFrom(
// backgroundColor: Color(0xff1487c9),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(15),
// ),
// padding: const EdgeInsets.symmetric(vertical: 14),
// ),
// onPressed: () {
// // to work
// },
// child: const Text(
// "Add Bill",
// style: TextStyle(
// fontSize: 16,
// fontFamily: "Plus Jakarta Sans",
// fontWeight: FontWeight.w500,
// color: Colors.white,
// ),
// ),
// ),
// ),
);
},
Widget
_buildBottomBar
(
BuildContext
context
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
18
,
vertical:
10
),
color:
Colors
.
white
,
child:
ElevatedButton
(
style:
ElevatedButton
.
styleFrom
(
backgroundColor:
const
Color
(
0xff1487c9
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
15
),
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
14
),
elevation:
0
,
),
onPressed:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
const
AddBillScreen
(
pageTitleName:
"Add Bill"
),
settings:
const
RouteSettings
(
name:
'AddTourExpBillScreen'
),
),
).
then
((
_
)
{
_refreshList
(
context
);
});
},
child:
const
Text
(
"Add Bill"
,
style:
TextStyle
(
fontSize:
16
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
white
,
),
),
),
);
...
...
@@ -260,11 +324,11 @@ class _TourExpensesListScreenState extends State<TourExpensesListScreen> {
return
AppColors
.
rejected_text_color
;
case
'Expired at TL'
:
return
AppColors
.
rejected_text_color
;
}
return
color
;
}
getText
(
value
)
{
String
getText
(
value
)
{
switch
(
value
)
{
case
'HR Approved'
:
return
"A"
;
...
...
@@ -278,5 +342,4 @@ class _TourExpensesListScreenState extends State<TourExpensesListScreen> {
return
"R"
;
}
}
}
}
\ No newline at end of file
lib/screens/order/ordersListByModes.dart
View file @
185e0896
...
...
@@ -36,29 +36,37 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
final
ScrollController
_scrollController
=
ScrollController
();
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
_connectivity
.
initialise
();
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
,
);
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
provider
.
resetPagination
();
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
});
_scrollController
.
addListener
(()
{
if
(
_scrollController
.
position
.
pixels
>=
_scrollController
.
position
.
maxScrollExtent
-
200
)
{
final
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
provider
.
loadMore
(
context
,
widget
.
mode
,
""
,
""
);
}
});
}
@override
void
dispose
()
{
// TODO: implement dispose
super
.
dispose
();
_scrollController
.
dispose
();
_connectivity
.
disposeStream
();
super
.
dispose
();
}
Color
getDecorationColor
(
value
)
{
...
...
@@ -212,467 +220,183 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
body:
provider
.
isLoading
&&
ordersList
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
),
)
:
ordersList
.
isNotEmpty
?
RefreshIndicator
(
onRefresh:
()
async
{
provider
.
resetPagination
();
await
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
},
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
ordersList
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
ol
)
{
if
(
ol
==
ordersList
.
length
)
{
return
provider
.
isLoadingMore
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
()),
)
:
const
SizedBox
.
shrink
();
}
final
order
=
ordersList
[
ol
];
return
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
widget
.
pageTitleName
,
orderId:
ordersList
[
ol
].
orderId
,
mode:
widget
.
mode
,
),
settings:
RouteSettings
(
name:
"Ordersdetailsbymodes"
)
),
);
if
(
routeSettingName
==
"Ordersdetailsbymodes"
)
{
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
,
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
7.5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
)
:
ordersList
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
ordersList
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
ol
)
{
if
(
ordersList
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
return
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
widget
.
pageTitleName
,
orderId:
ordersList
[
ol
].
orderId
,
mode:
widget
.
mode
,
),
settings:
RouteSettings
(
name:
"Ordersdetailsbymodes"
)
),
);
if
(
routeSettingName
==
"Ordersdetailsbymodes"
)
{
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
,
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
},
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
7.5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
color:
getDecorationColor
(
ordersList
[
ol
].
status
,
),
shape:
BoxShape
.
circle
,
),
child:
Column
(
children:
[
Row
(
children:
[
// Expanded(
// flex: 1,
// child: Container(
// height: 50,
// width: 35,
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Color(0xFFFFF3CE),
// borderRadius: BorderRadius.circular(
// 8,
// ),
// ),
// child: SvgPicture.asset(
// "assets/svg/fin_ic.svg",
// ),
// ),
// ),
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
getDecorationColor
(
ordersList
[
ol
].
status
,
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
ordersList
[
ol
].
status
,
),
style:
TextStyle
(
color:
getTextColor
(
ordersList
[
ol
].
status
,
),
fontSize:
getSize
(
ordersList
[
ol
].
status
,
),
fontFamily:
"JakartaBold"
,
),
),
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
ordersList
[
ol
]
.
accountName
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
ordersList
[
ol
]
.
orderNumber
!,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
2
,
child:
Container
(
child:
Text
(
"₹"
"
${ordersList[ol].balanceAmount}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
),
],
child:
Center
(
child:
Text
(
getText
(
ordersList
[
ol
].
status
,
),
],
),
),
);
},
),
],
),
)
:
Emptywidget
(
context
),
);
},
);
}
Widget
_scaffold1
(
BuildContext
context
)
{
return
Consumer
<
Pagesdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
ordersList
=
provider
.
ordersList
;
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
Row
(
children:
[
// InkResponse(
// onTap: () {
// _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg"),
// ),
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,
),
),
],
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
ordersList
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
ordersList
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
ordersList
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
style:
TextStyle
(
color:
getTextColor
(
ordersList
[
ol
].
status
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
ordersList
[
index
].
accountName
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹"
"
${ordersList[index].balanceAmount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
ordersList
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
fontSize:
getSize
(
ordersList
[
ol
].
status
,
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
fontFamily:
"JakartaBold"
,
),
),
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
"Order Number"
,
"Entered Employee"
,
"Sales Person"
,
// "Date",
"Paid Amount"
,
"Balance Amount"
,
];
final
subHeadings
=
[
ordersList
[
index
].
orderNumber
,
ordersList
[
index
].
enteredEmpName
,
ordersList
[
index
].
salesPersonEmpName
,
// ordersList[index].createdDatetime,
ordersList
[
index
].
paidAmount
,
ordersList
[
index
].
balanceAmount
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
widget
.
pageTitleName
,
orderId:
ordersList
[
index
].
orderId
,
mode:
widget
.
mode
,
),
),
);
if
(
res
==
true
)
{
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
,
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
ordersList
[
ol
]
.
accountName
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
Text
(
ordersList
[
ol
]
.
orderNumber
!,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
3
,
child:
Container
(
child:
Text
(
"₹"
"
${ordersList[ol].balanceAmount}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
]
,
)
,
),
)
;
}
,
)
,
]
,
),
],
),
)
:
Emptywidget
(
context
),
),
);
},
),
)
:
Emptywidget
(
context
),
);
},
);
}
Future
<
void
>
_showOptionsSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -943,8 +667,8 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedEmpID
,
provider
.
selectedLeadType
,
provider
.
selectedEmpID
.
toString
()
,
provider
.
selectedLeadType
.
toString
()
,
);
},
child:
Container
(
...
...
lib/screens/order/paymentListsByMode.dart
View file @
185e0896
...
...
@@ -117,30 +117,37 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
}
return
18.0
;
}
final
ScrollController
_scrollController
=
ScrollController
();
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
_connectivity
.
initialise
();
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Paymentsprovider
>(
context
,
listen:
false
,
);
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Paymentsprovider
>(
context
,
listen:
false
);
provider
.
resetPagination
();
provider
.
paymentsListsByModeFilterAPIFunction
(
context
,
widget
.
mode
);
provider
.
paymentsListsByModeAPIFunction
(
context
,
widget
.
mode
,
""
,);
provider
.
paymentsListsByModeAPIFunction
(
context
,
widget
.
mode
,
""
);
});
_scrollController
.
addListener
(()
{
if
(
_scrollController
.
position
.
pixels
>=
_scrollController
.
position
.
maxScrollExtent
-
200
)
{
final
provider
=
Provider
.
of
<
Paymentsprovider
>(
context
,
listen:
false
);
provider
.
loadMore
(
context
,
widget
.
mode
,
""
);
}
});
}
@override
@override
void
dispose
()
{
// TODO: implement dispose
super
.
dispose
();
_scrollController
.
dispose
();
_connectivity
.
disposeStream
();
super
.
dispose
();
}
@override
...
...
@@ -207,169 +214,162 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
paymentLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
paymentLists
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
paymentLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
paymentId:
paymentLists
[
index
].
paymentId
,
),));
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
body:
provider
.
isLoading
&&
paymentLists
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
),
)
:
paymentLists
.
isNotEmpty
?
RefreshIndicator
(
onRefresh:
()
async
{
provider
.
resetPagination
();
await
provider
.
paymentsListsByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
);
},
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
paymentLists
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
if
(
index
==
paymentLists
.
length
)
{
return
provider
.
isLoadingMore
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
()),
)
:
const
SizedBox
.
shrink
();
}
final
payment
=
paymentLists
[
index
];
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
paymentId:
paymentLists
[
index
].
paymentId
,
),));
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Row
(
children:
[
// Expanded(
// flex: 1,
// child: Container(
// height: 50,
// width: 35,
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Color(0xFFFFF3CE),
// borderRadius:
// BorderRadius.circular(8),
// ),
// child: SvgPicture.asset(
// "assets/svg/fin_ic.svg",
// ),
// ),
// ),
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
getDecorationColor
(
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
getDecorationColor
(
paymentLists
[
index
].
status
,
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
paymentLists
[
index
].
status
,
),
style:
TextStyle
(
color:
getTextColor
(
paymentLists
[
index
].
status
,
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
getText
(
paymentLists
[
index
].
status
,
),
style:
TextStyle
(
color:
getTextColor
(
paymentLists
[
index
].
status
,
),
fontSize:
getSize
(
paymentLists
[
index
].
status
,
),
fontFamily:
"JakartaBold"
,
),
fontSize:
getSize
(
paymentLists
[
index
].
status
,
),
fontFamily:
"JakartaBold"
,
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
paymentLists
[
index
].
ename
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
paymentLists
[
index
]
.
orderNumber
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
],
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
paymentLists
[
index
].
ename
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
child:
Center
(
child:
Text
(
"₹"
"
${paymentLists[index].amount}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
Text
(
paymentLists
[
index
]
.
orderNumber
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
],
),
]
,
)
,
),
Expanded
(
flex:
2
,
child:
Container
(
child:
Center
(
child:
Text
(
"₹"
"
${paymentLists[index].amount}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
),
),
),
],
),
),
);
},
),
],
],
),
),
);
},
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
@@ -844,7 +844,7 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
onTap:
()
{
Navigator
.
pop
(
context
);
provider
.
paymentsListsByModeAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedEmpID
);
context
,
widget
.
mode
,
provider
.
selectedEmpID
.
toString
()
);
},
child:
Container
(
height:
45
,
...
...
lib/screens/order/tpcAgentIssueList.dart
View file @
185e0896
...
...
@@ -27,31 +27,38 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
final
ScrollController
_scrollController
=
ScrollController
();
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
_connectivity
.
initialise
();
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
,
);
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
);
provider
.
resetPagination
();
// clear before first load
provider
.
TPCAgentsIssueListAPIFunction
(
context
);
});
_scrollController
.
addListener
(()
{
if
(
_scrollController
.
position
.
pixels
>=
_scrollController
.
position
.
maxScrollExtent
-
200
)
{
final
provider
=
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
);
provider
.
loadMoreIssues
(
context
);
}
});
}
@override
void
dispose
()
{
// TODO: implement dispose
super
.
dispose
();
_scrollController
.
dispose
();
_connectivity
.
disposeStream
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
...
...
@@ -108,134 +115,141 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
tpcAgentsIssueList
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
tpcAgentsIssueList
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
tpcAgentsIssueList
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentissuelistdetails
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
body:
provider
.
isLoading
&&
tpcAgentsIssueList
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
),
)
:
tpcAgentsIssueList
.
isNotEmpty
?
RefreshIndicator
(
onRefresh:
()
async
{
provider
.
resetPagination
();
await
provider
.
TPCAgentsIssueListAPIFunction
(
context
);
},
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
tpcAgentsIssueList
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
if
(
index
==
tpcAgentsIssueList
.
length
)
{
return
provider
.
isLoadingMore
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
()),
)
:
const
SizedBox
.
shrink
();
}
final
issue
=
tpcAgentsIssueList
[
index
];
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentissuelistdetails
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/order/tpc_list_ic.svg"
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/order/tpc_list_ic.svg"
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
tpcAgentsIssueList
[
index
].
name
!,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"
${tpcAgentsIssueList[index].aname}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
tpcAgentsIssueList
[
index
].
name
!,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentsIssueList[index]
.mobileNumber}
'
,
);
},
child:
SizedBox
(
height:
35
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_list_call_ic.svg"
,
Text
(
"
${tpcAgentsIssueList[index].aname}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentsIssueList[index]
.mobileNumber}
'
,
);
},
child:
SizedBox
(
height:
35
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_list_call_ic.svg"
,
),
),
]
,
)
,
),
],
),
),
);
},
),
],
],
),
),
);
},
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
lib/screens/order/tpcAgentListByMode.dart
View file @
185e0896
...
...
@@ -27,30 +27,36 @@ class Tpcagentlistbymode extends StatefulWidget {
class
_TpcagentlistbymodeState
extends
State
<
Tpcagentlistbymode
>
{
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
final
ScrollController
_scrollController
=
ScrollController
();
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
_connectivity
.
initialise
();
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
,
);
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
);
provider
.
resetPagination
();
provider
.
TPCAgentsListAPIFunction
(
context
,
widget
.
mode
);
});
_scrollController
.
addListener
(()
{
if
(
_scrollController
.
position
.
pixels
>=
_scrollController
.
position
.
maxScrollExtent
-
200
)
{
final
provider
=
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
);
provider
.
loadMore
(
context
,
widget
.
mode
);
}
});
}
@override
void
dispose
()
{
// TODO: implement dispose
super
.
dispose
();
_scrollController
.
dispose
();
_connectivity
.
disposeStream
();
super
.
dispose
();
}
...
...
@@ -110,138 +116,148 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
tpcAgentsLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
itemCount:
tpcAgentsLists
.
length
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
tpcAgentsLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
tpcAgentId:
tpcAgentsLists
[
index
]
.
tpcAgentId
,
),));
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
body:
provider
.
isLoading
&&
tpcAgentsLists
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
),
)
:
tpcAgentsLists
.
isNotEmpty
?
RefreshIndicator
(
onRefresh:
()
async
{
provider
.
resetPagination
();
await
provider
.
TPCAgentsListAPIFunction
(
context
,
widget
.
mode
,
);
},
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
tpcAgentsLists
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
if
(
index
==
tpcAgentsLists
.
length
)
{
return
provider
.
isLoadingMore
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
()),
)
:
const
SizedBox
.
shrink
();
}
final
agent
=
tpcAgentsLists
[
index
];
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
tpcAgentId:
tpcAgentsLists
[
index
]
.
tpcAgentId
,
),));
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
7.5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
// decoration: BoxDecoration(
// color: Color(0xFFEAF7FF),
// borderRadius:
// BorderRadius.circular(8),
// ),
child:
SvgPicture
.
asset
(
"assets/svg/order/tpc_list_ic.svg"
,
),
),
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
// decoration: BoxDecoration(
// color: Color(0xFFEAF7FF),
// borderRadius:
// BorderRadius.circular(8),
// ),
child:
SvgPicture
.
asset
(
"assets/svg/order/tpc_list_ic.svg"
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
tpcAgentsLists
[
index
].
name
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"
${tpcAgentsLists[index]
.mobileNumber}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
tpcAgentsLists
[
index
].
name
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentsLists[index]
.mobileNumber}
'
,
);
},
child:
SizedBox
(
height:
35
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_list_call_ic.svg"
,
Text
(
"
${tpcAgentsLists[index]
.mobileNumber}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentsLists[index]
.mobileNumber}
'
,
);
},
child:
SizedBox
(
height:
35
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_list_call_ic.svg"
,
),
),
],
),
),
],
),
),
);
},
),
],
],
),
),
);
},
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
lib/services/api_calling.dart
View file @
185e0896
...
...
@@ -143,19 +143,19 @@ class ApiCalling {
var
directory
=
""
;
if
(
Platform
.
isAndroid
)
{
directory
=
"/storage/emulated/0/Download"
;
var
_
directory
=
Directory
(
directory
);
if
(!
_
directory
.
existsSync
())
{
var
directory
0
=
Directory
(
directory
);
if
(!
directory
0
.
existsSync
())
{
// If the directory does not exist, create it
_
directory
.
createSync
(
recursive:
true
);
debugPrint
(
'Directory created:
$
_
directory
'
);
directory
0
.
createSync
(
recursive:
true
);
debugPrint
(
'Directory created:
$directory
0
'
);
}
else
{
debugPrint
(
'Directory already exists:
$
_
directory
'
);
debugPrint
(
'Directory already exists:
$directory
0
'
);
}
// final androiddirectory = await getDownloadsDirectory();
// directory = androiddirectory!.path;
}
else
if
(
Platform
.
isIOS
)
{
final
iosDirectory
=
await
getApplicationSupportDirectory
();
directory
=
iosDirectory
!
.
path
;
directory
=
iosDirectory
.
path
;
}
final
contentDisposition
=
res
.
headers
[
'content-disposition'
];
...
...
@@ -175,7 +175,7 @@ class ApiCalling {
await
file
.
writeAsBytes
(
bytes
);
toast
(
cntxt
,
"File saved to your downloads as
$
{
filename
}
to
$
{
directory
}
, Successfully"
,
"File saved to your downloads as
$filename
to
$directory
, Successfully"
,
);
debugPrint
(
'File saved successfully'
);
return
jsonDecode
(
res
.
body
);
...
...
@@ -193,12 +193,12 @@ class ApiCalling {
try
{
final
response
=
await
post
({},
getAppVersionUrl
,
{});
if
(
response
!=
null
)
{
print
(
"
${
response.body
}
"
);
print
(
response
.
body
);
return
VersionsResponse
.
fromJson
(
jsonDecode
(
response
.
body
));
}
else
{
return
null
;
}
}
catch
(
e
,
s
)
{
}
catch
(
e
)
{
return
null
;
}
}
...
...
@@ -258,19 +258,19 @@ class ApiCalling {
empId
,
session
,
password
,
conf
_p
assword
,
conf
P
assword
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'password'
:
(
password
).
toString
(),
'confirm_password'
:
(
conf
_p
assword
).
toString
(),
'confirm_password'
:
(
conf
P
assword
).
toString
(),
};
final
res
=
await
post
(
data
,
updatePasswordUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
"update password
${res.body}
"
);
debugPrint
(
"update password
$
{
data
}
"
);
debugPrint
(
"update password
$data
"
);
return
UpdatePasswordResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -376,7 +376,7 @@ class ApiCalling {
sessioId
,
location
,
latlngs
,
check
_in_p
ic
,
check
InP
ic
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -387,7 +387,7 @@ class ApiCalling {
};
var
res
;
// if (check_in_pic != null) {
res
=
await
postImage
(
data
,
employeeChekInUrl
,
{},
check
_in_p
ic
);
res
=
await
postImage
(
data
,
employeeChekInUrl
,
{},
check
InP
ic
);
res
=
jsonDecode
(
res
);
// } else {
// // res = await post(data, employeeChekInUrl, {});
...
...
@@ -410,7 +410,7 @@ class ApiCalling {
sessioId
,
location
,
latlngs
,
check
_out_p
ic
,
check
OutP
ic
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -438,7 +438,7 @@ class ApiCalling {
data
,
{},
employeeCheckOutUrl
,
check
_out_p
ic
,
check
OutP
ic
,
'check_out_pic'
,
);
if
(
res
!=
null
)
{
...
...
@@ -529,13 +529,13 @@ class ApiCalling {
static
Future
<
loadGeneratorDetailsResponse
?>
LoadGeneratorDetailsAPI
(
empId
,
session
,
gen
_h
ash
_i
d
,
gen
H
ash
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'gen_hash_id'
:
(
gen
_h
ash
_i
d
).
toString
(),
'gen_hash_id'
:
(
gen
H
ash
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
genTrackerGeneratorDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -554,15 +554,15 @@ class ApiCalling {
static
Future
<
generatorComplaintResponse
?>
LoadGeneratorComplaintListAPI
(
empId
,
session
,
gen
_i
d
,
open
_s
tatus
,
gen
I
d
,
open
S
tatus
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'gen_id'
:
(
gen
_i
d
).
toString
(),
'open_status'
:
(
open
_s
tatus
).
toString
(),
'gen_id'
:
(
gen
I
d
).
toString
(),
'open_status'
:
(
open
S
tatus
).
toString
(),
};
final
res
=
await
post
(
data
,
genTrackerGeneratorComplaintsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -581,7 +581,7 @@ class ApiCalling {
static
Future
<
TagLocationResponse
?>
TagLocationAPI
(
empId
,
session
,
gen
_h
ash
_i
d
,
gen
H
ash
I
d
,
location
,
attachment
,
)
async
{
...
...
@@ -589,10 +589,10 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'gen_hash_id'
:
(
gen
_h
ash
_i
d
).
toString
(),
'gen_hash_id'
:
(
gen
H
ash
I
d
).
toString
(),
'location'
:
(
location
).
toString
(),
};
print
(
"Tag Loation:
$
{
data
}
"
);
print
(
"Tag Loation:
$data
"
);
var
res
;
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
...
...
@@ -623,15 +623,15 @@ class ApiCalling {
static
Future
<
TagGeneratorResponse
?>
TagGeneratorAPI
(
empId
,
session
,
gen
_h
ash
_i
d
,
engine
_n
o
,
gen
H
ash
I
d
,
engine
N
o
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'gen_hash_id'
:
(
gen
_h
ash
_i
d
).
toString
(),
'engine_no'
:
(
engine
_n
o
).
toString
(),
'gen_hash_id'
:
(
gen
H
ash
I
d
).
toString
(),
'engine_no'
:
(
engine
N
o
).
toString
(),
};
final
res
=
await
post
(
data
,
genTrackerTagGeneratorUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -650,13 +650,13 @@ class ApiCalling {
static
Future
<
TagGeneratorResponse
?>
TagGeneratorCheckAPI
(
empId
,
session
,
gen
_h
ash
_i
d
,
gen
H
ash
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'gen_hash_id'
:
(
gen
_h
ash
_i
d
).
toString
(),
'gen_hash_id'
:
(
gen
H
ash
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
genTrackerCheckTagGeneratorUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -675,23 +675,23 @@ class ApiCalling {
static
Future
<
SubmitComplaintResponse
?>
SubmitGeneratorComplaintAPI
(
empId
,
session
,
complaint
_t
ype
_i
d
,
complaint
_c
ategory
_i
d
,
complaint
_d
esc
_i
d
,
running
_h
rs
,
gen
_i
d
,
complaint
_n
ote
,
complaint
T
ype
I
d
,
complaint
C
ategory
I
d
,
complaint
D
esc
I
d
,
running
H
rs
,
gen
I
d
,
complaint
N
ote
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'complaint_type_id'
:
(
complaint
_t
ype
_i
d
).
toString
(),
'complaint_category_id'
:
(
complaint
_c
ategory
_i
d
).
toString
(),
'complaint_desc_id'
:
(
complaint
_d
esc
_i
d
).
toString
(),
'running_hrs'
:
(
running
_h
rs
).
toString
(),
'gen_id'
:
(
gen
_i
d
).
toString
(),
'complaint_note'
:
(
complaint
_n
ote
).
toString
(),
'complaint_type_id'
:
(
complaint
T
ype
I
d
).
toString
(),
'complaint_category_id'
:
(
complaint
C
ategory
I
d
).
toString
(),
'complaint_desc_id'
:
(
complaint
D
esc
I
d
).
toString
(),
'running_hrs'
:
(
running
H
rs
).
toString
(),
'gen_id'
:
(
gen
I
d
).
toString
(),
'complaint_note'
:
(
complaint
N
ote
).
toString
(),
};
final
res
=
await
post
(
data
,
genTrackerRegisterComplaint
,
{});
if
(
res
!=
null
)
{
...
...
@@ -710,13 +710,13 @@ class ApiCalling {
static
Future
<
ComplaintsSelectionResponse
?>
ComplaintSelectionAPI
(
empId
,
session
,
gen
_h
ash
_i
d
,
gen
H
ash
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'gen_hash_id'
:
(
gen
_h
ash
_i
d
).
toString
(),
'gen_hash_id'
:
(
gen
H
ash
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
complaintsSelectionUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -737,13 +737,13 @@ class ApiCalling {
static
Future
<
Inventory_Part_details_response
?>
LoadPartDetailsAPI
(
empId
,
session
,
part
_i
d
,
part
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'part_id'
:
(
part
_i
d
).
toString
(),
'part_id'
:
(
part
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
inventoryPartDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -764,8 +764,8 @@ class ApiCalling {
session
,
qty
,
descr
,
part
_i
d
,
tran
_t
ype
,
part
I
d
,
tran
T
ype
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -773,8 +773,8 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'qty'
:
(
qty
).
toString
(),
'descr'
:
(
descr
).
toString
(),
'product_id'
:
(
part
_i
d
).
toString
(),
'tran_type'
:
(
tran
_t
ype
).
toString
(),
'product_id'
:
(
part
I
d
).
toString
(),
'tran_type'
:
(
tran
T
ype
).
toString
(),
};
final
res
=
await
post
(
data
,
inventoryStockUpdateUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -793,17 +793,17 @@ class ApiCalling {
///technician
static
Future
<
loadGeneratorDetailsResponse
?>
LoadTechnicianGeneratorDetailsAPI
(
empId
,
session
,
gen
_i
d
)
async
{
LoadTechnicianGeneratorDetailsAPI
(
empId
,
session
,
gen
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'gen_id'
:
(
gen
_i
d
).
toString
(),
'gen_id'
:
(
gen
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
technicianGeneratorDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
"genderrails:
${jsonDecode(res
!
.body)}
"
);
print
(
"genderrails:
${jsonDecode(res.body)}
"
);
return
loadGeneratorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -887,7 +887,7 @@ class ApiCalling {
static
Future
<
NearbyGeneratorsResponse
?>
loadNearbyGeneratorsAPI
(
empId
,
session
,
tech
_l
oc
,
tech
L
oc
,
radius
,
status
,
)
async
{
...
...
@@ -895,7 +895,7 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'tech_loc'
:
(
tech
_l
oc
).
toString
(),
'tech_loc'
:
(
tech
L
oc
).
toString
(),
'radius'
:
(
radius
).
toString
(),
'status'
:
(
status
).
toString
(),
};
...
...
@@ -917,13 +917,13 @@ class ApiCalling {
static
Future
<
AccountSuggestionResonse
?>
AccountSuggestionAPI
(
empId
,
session
,
search
_s
tring
,
search
S
tring
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'search_string'
:
(
search
_s
tring
).
toString
(),
'search_string'
:
(
search
S
tring
).
toString
(),
};
final
res
=
await
post
(
data
,
technicianAccountSearchUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -966,16 +966,16 @@ class ApiCalling {
empId
,
session
,
type
,
gen
_i
d
,
account
_i
d
,
gen
I
d
,
account
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'type'
:
(
type
).
toString
(),
'gen_id'
:
(
gen
_i
d
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'gen_id'
:
(
gen
I
d
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
};
print
(
data
);
final
res
=
await
post
(
data
,
technicianAddPaymentUrl
,
{});
...
...
@@ -996,26 +996,26 @@ class ApiCalling {
TechnicianUpdatepaymentAPI
(
empId
,
session
,
ref
_t
ype
,
ref
_i
d
,
payment
_m
ode
_i
d
,
payment
_ref_n
o
,
ref
T
ype
,
ref
I
d
,
payment
M
ode
I
d
,
payment
RefN
o
,
amount
,
otp
_v
alidated
_n
ame
,
otp
_v
alidated
_m
obile
_n
umber
,
payment
_p
roof
,
otp
V
alidated
N
ame
,
otp
V
alidated
M
obile
N
umber
,
payment
P
roof
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'ref_type'
:
(
ref
_t
ype
).
toString
(),
'ref_id'
:
(
ref
_i
d
).
toString
(),
'payment_mode_id'
:
(
payment
_m
ode
_i
d
).
toString
(),
'payment_ref_no'
:
(
payment
_ref_n
o
).
toString
(),
'ref_type'
:
(
ref
T
ype
).
toString
(),
'ref_id'
:
(
ref
I
d
).
toString
(),
'payment_mode_id'
:
(
payment
M
ode
I
d
).
toString
(),
'payment_ref_no'
:
(
payment
RefN
o
).
toString
(),
'amount'
:
(
amount
).
toString
(),
'otp_validated_name'
:
(
otp
_v
alidated
_n
ame
).
toString
(),
'otp_validated_mobile_number'
:
(
otp
_v
alidated
_m
obile
_n
umber
).
toString
(),
'otp_validated_name'
:
(
otp
V
alidated
N
ame
).
toString
(),
'otp_validated_mobile_number'
:
(
otp
V
alidated
M
obile
N
umber
).
toString
(),
};
var
res
;
// if (payment_proof != null) {
...
...
@@ -1036,13 +1036,13 @@ class ApiCalling {
// debugPrint("Null Response");
// return null;
// }
print
(
"send otp:
$
{
data
}
"
);
if
(
payment
_p
roof
!=
null
)
{
print
(
"send otp:
$data
"
);
if
(
payment
P
roof
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
technicianAddPaymentCollectionUrl
,
payment
_p
roof
,
payment
P
roof
,
'payment_proof'
,
);
...
...
@@ -1065,14 +1065,14 @@ class ApiCalling {
TechnicianPaymentOTPValidateAPI
(
empId
,
session
,
payment
_c
ollection
_i
d
,
payment
C
ollection
I
d
,
otp
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_collection_id'
:
(
payment
_c
ollection
_i
d
).
toString
(),
'payment_collection_id'
:
(
payment
C
ollection
I
d
).
toString
(),
'otp'
:
(
otp
).
toString
(),
};
final
res
=
await
post
(
data
,
technicianPaymentCollectionOtpUrl
,
{});
...
...
@@ -1092,12 +1092,12 @@ class ApiCalling {
}
static
Future
<
Technicianaddpaymentresendotpresponse
?>
TechnicianPaymentOTPResendAPI
(
empId
,
session
,
payment
_c
ollection
_i
d
)
async
{
TechnicianPaymentOTPResendAPI
(
empId
,
session
,
payment
C
ollection
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_collection_id'
:
(
payment
_c
ollection
_i
d
).
toString
(),
'payment_collection_id'
:
(
payment
C
ollection
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
technicianAddPaymentResendOTPUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -1164,13 +1164,13 @@ class ApiCalling {
static
Future
<
ViewVisitDetailsResponseNew
?>
loadVisitDetailsAPI
(
empId
,
session
,
comp
_i
d
,
comp
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'comp_id'
:
(
comp
_i
d
).
toString
(),
'comp_id'
:
(
comp
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
technicianComplaintDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -1189,13 +1189,13 @@ class ApiCalling {
static
Future
<
FollowupListResponse
?>
loadFollowupListAPI
(
empId
,
session
,
comp
_i
d
,
comp
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'comp_id'
:
(
comp
_i
d
).
toString
(),
'comp_id'
:
(
comp
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
technicianComplaintFollowUpUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -1214,7 +1214,7 @@ class ApiCalling {
static
Future
<
AddContactResponse
?>
AddContactAPI
(
empId
,
session
,
gen
_i
d
,
gen
I
d
,
name
,
designation
,
mob1
,
...
...
@@ -1222,13 +1222,13 @@ class ApiCalling {
tel
,
mail
,
type
,
account
_i
d
,
account
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'gen_id'
:
(
gen
_i
d
).
toString
(),
'gen_id'
:
(
gen
I
d
).
toString
(),
'name'
:
(
name
).
toString
(),
'designation'
:
(
designation
).
toString
(),
'mob1'
:
(
mob1
).
toString
(),
...
...
@@ -1236,7 +1236,7 @@ class ApiCalling {
'tel'
:
(
tel
).
toString
(),
'mail'
:
(
mail
).
toString
(),
'type'
:
(
type
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
};
print
(
"add:
$data
"
);
final
res
=
await
post
(
data
,
technicianAddContactUrl
,
{});
...
...
@@ -1256,34 +1256,34 @@ class ApiCalling {
static
Future
<
UpdateComplaintResponse
?>
UpdateComplaintAPI
(
empId
,
session
,
complaint
_i
d
,
in
_t
ime
,
complaint
I
d
,
in
T
ime
,
feedback
,
fsr
_n
o
,
running
_h
rs
,
complaint
_s
tatus
,
fsr
_f
ile
,
fsr
N
o
,
running
H
rs
,
complaint
S
tatus
,
fsr
F
ile
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'complaint_id'
:
(
complaint
_i
d
).
toString
(),
'in_time'
:
(
in
_t
ime
).
toString
(),
'complaint_id'
:
(
complaint
I
d
).
toString
(),
'in_time'
:
(
in
T
ime
).
toString
(),
'feedback'
:
(
feedback
).
toString
(),
'fsr_no'
:
(
fsr
_n
o
).
toString
(),
'running_hrs'
:
(
running
_h
rs
).
toString
(),
'complaint_status'
:
(
complaint
_s
tatus
).
toString
(),
'fsr_no'
:
(
fsr
N
o
).
toString
(),
'running_hrs'
:
(
running
H
rs
).
toString
(),
'complaint_status'
:
(
complaint
S
tatus
).
toString
(),
};
// print(data);
// print(fsr_file);
var
res
;
if
(
fsr
_f
ile
!=
null
)
{
if
(
fsr
F
ile
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
technicianUpdateVisitUrl
,
fsr
_f
ile
,
fsr
F
ile
,
'fsr_file'
,
);
res
=
jsonDecode
(
res
);
...
...
@@ -1426,40 +1426,40 @@ class ApiCalling {
}
static
Future
<
CommonResponse
?>
addPaymentRequestionSubmitAPI
(
emp
_i
d
,
session
_i
d
,
emp
I
d
,
session
I
d
,
type
,
account
_i
d
,
requesting
_p
urpose
,
account
I
d
,
requesting
P
urpose
,
description
,
amount
,
payment
_m
ode
_i
d
,
bank
_n
ame
,
bank
_b
ranch
_n
ame
,
bank
_acc_n
umber
,
bank
_i
fsc
_c
ode
,
acc
_h
older
_n
ame
,
bank
_upi_i
d
,
approval
_a
ssignee
_emp_i
d
,
payment
M
ode
I
d
,
bank
N
ame
,
bank
B
ranch
N
ame
,
bank
AccN
umber
,
bank
I
fsc
C
ode
,
acc
H
older
N
ame
,
bank
UpiI
d
,
approval
A
ssignee
EmpI
d
,
attachment
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
emp
_i
d
.
toString
(),
'session_id'
:
session
_i
d
.
toString
(),
'emp_id'
:
emp
I
d
.
toString
(),
'session_id'
:
session
I
d
.
toString
(),
'type'
:
type
.
toString
(),
'account_id'
:
account
_i
d
.
toString
(),
'requesting_purpose'
:
requesting
_p
urpose
.
toString
(),
'account_id'
:
account
I
d
.
toString
(),
'requesting_purpose'
:
requesting
P
urpose
.
toString
(),
'description'
:
description
.
toString
(),
'amount'
:
amount
.
toString
(),
'payment_mode_id'
:
payment
_m
ode
_i
d
.
toString
(),
'bank_name'
:
bank
_n
ame
.
toString
(),
'bank_branch_name'
:
bank
_b
ranch
_n
ame
.
toString
(),
'bank_acc_number'
:
bank
_acc_n
umber
.
toString
(),
'bank_ifsc_code'
:
bank
_i
fsc
_c
ode
.
toString
(),
'acc_holder_name'
:
acc
_h
older
_n
ame
.
toString
(),
'bank_upi_id'
:
bank
_upi_i
d
.
toString
(),
'approval_assignee_emp_id'
:
approval
_a
ssignee
_emp_i
d
.
toString
(),
'payment_mode_id'
:
payment
M
ode
I
d
.
toString
(),
'bank_name'
:
bank
N
ame
.
toString
(),
'bank_branch_name'
:
bank
B
ranch
N
ame
.
toString
(),
'bank_acc_number'
:
bank
AccN
umber
.
toString
(),
'bank_ifsc_code'
:
bank
I
fsc
C
ode
.
toString
(),
'acc_holder_name'
:
acc
H
older
N
ame
.
toString
(),
'bank_upi_id'
:
bank
UpiI
d
.
toString
(),
'approval_assignee_emp_id'
:
approval
A
ssignee
EmpI
d
.
toString
(),
};
var
res
;
...
...
@@ -1486,40 +1486,40 @@ class ApiCalling {
}
static
Future
<
addDirectPaymentResponse
?>
addDirectPaymentRequestionSubmitAPI
(
emp
_i
d
,
session
_i
d
,
from
_a
ccount
_i
d
,
to
_a
ccount
_i
d
,
emp
I
d
,
session
I
d
,
from
A
ccount
I
d
,
to
A
ccount
I
d
,
description
,
payment
_m
ode
_i
d
,
payment
M
ode
I
d
,
amount
,
payment
_d
ate
,
payment
_r
eference
_n
umber
,
bank
_n
ame
,
bank
_b
ranch
_n
ame
,
bank
_acc_n
umber
,
bank
_i
fsc
_c
ode
,
acc
_h
older
_n
ame
,
bank
_upi_i
d
,
payment
D
ate
,
payment
R
eference
N
umber
,
bank
N
ame
,
bank
B
ranch
N
ame
,
bank
AccN
umber
,
bank
I
fsc
C
ode
,
acc
H
older
N
ame
,
bank
UpiI
d
,
attachment
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
emp
_i
d
.
toString
(),
'session_id'
:
session
_i
d
.
toString
(),
'from_account_id'
:
from
_a
ccount
_i
d
.
toString
(),
'to_account_id'
:
to
_a
ccount
_i
d
.
toString
(),
'emp_id'
:
emp
I
d
.
toString
(),
'session_id'
:
session
I
d
.
toString
(),
'from_account_id'
:
from
A
ccount
I
d
.
toString
(),
'to_account_id'
:
to
A
ccount
I
d
.
toString
(),
'description'
:
description
.
toString
(),
'payment_mode_id'
:
payment
_m
ode
_i
d
.
toString
(),
'payment_mode_id'
:
payment
M
ode
I
d
.
toString
(),
'amount'
:
amount
.
toString
(),
'payment_date'
:
payment
_d
ate
.
toString
(),
'payment_reference_number'
:
payment
_r
eference
_n
umber
.
toString
(),
'bank_name'
:
bank
_n
ame
.
toString
(),
'bank_branch_name'
:
bank
_b
ranch
_n
ame
.
toString
(),
'bank_acc_number'
:
bank
_acc_n
umber
.
toString
(),
'bank_ifsc_code'
:
bank
_i
fsc
_c
ode
.
toString
(),
'acc_holder_name'
:
acc
_h
older
_n
ame
.
toString
(),
'bank_upi_id'
:
bank
_upi_i
d
.
toString
(),
'payment_date'
:
payment
D
ate
.
toString
(),
'payment_reference_number'
:
payment
R
eference
N
umber
.
toString
(),
'bank_name'
:
bank
N
ame
.
toString
(),
'bank_branch_name'
:
bank
B
ranch
N
ame
.
toString
(),
'bank_acc_number'
:
bank
AccN
umber
.
toString
(),
'bank_ifsc_code'
:
bank
I
fsc
C
ode
.
toString
(),
'acc_holder_name'
:
acc
H
older
N
ame
.
toString
(),
'bank_upi_id'
:
bank
UpiI
d
.
toString
(),
};
print
(
data
);
print
(
attachment
);
...
...
@@ -1554,40 +1554,40 @@ class ApiCalling {
static
Future
<
addReceiptPaymentResponse
?>
addReceiptPaymentRequestionSubmitAPI
(
emp
_i
d
,
session
_i
d
,
from
_a
ccount
_i
d
,
to
_a
ccount
_i
d
,
emp
I
d
,
session
I
d
,
from
A
ccount
I
d
,
to
A
ccount
I
d
,
description
,
payment
_m
ode
_i
d
,
payment
M
ode
I
d
,
amount
,
receipt
_d
ate
,
payment
_r
eference
_n
umber
,
bank
_n
ame
,
bank
_b
ranch
_n
ame
,
bank
_acc_n
umber
,
bank
_i
fsc
_c
ode
,
acc
_h
older
_n
ame
,
bank
_upi_i
d
,
receipt
D
ate
,
payment
R
eference
N
umber
,
bank
N
ame
,
bank
B
ranch
N
ame
,
bank
AccN
umber
,
bank
I
fsc
C
ode
,
acc
H
older
N
ame
,
bank
UpiI
d
,
attachment
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
emp
_i
d
.
toString
(),
'session_id'
:
session
_i
d
.
toString
(),
'from_account_id'
:
from
_a
ccount
_i
d
.
toString
(),
'to_account_id'
:
to
_a
ccount
_i
d
.
toString
(),
'emp_id'
:
emp
I
d
.
toString
(),
'session_id'
:
session
I
d
.
toString
(),
'from_account_id'
:
from
A
ccount
I
d
.
toString
(),
'to_account_id'
:
to
A
ccount
I
d
.
toString
(),
'description'
:
description
.
toString
(),
'payment_mode_id'
:
payment
_m
ode
_i
d
.
toString
(),
'payment_mode_id'
:
payment
M
ode
I
d
.
toString
(),
'amount'
:
amount
.
toString
(),
'receipt_date'
:
receipt
_d
ate
.
toString
(),
'payment_reference_number'
:
payment
_r
eference
_n
umber
.
toString
(),
'bank_name'
:
bank
_n
ame
.
toString
(),
'bank_branch_name'
:
bank
_b
ranch
_n
ame
.
toString
(),
'bank_acc_number'
:
bank
_acc_n
umber
.
toString
(),
'bank_ifsc_code'
:
bank
_i
fsc
_c
ode
.
toString
(),
'acc_holder_name'
:
acc
_h
older
_n
ame
.
toString
(),
'bank_upi_id'
:
bank
_upi_i
d
.
toString
(),
'receipt_date'
:
receipt
D
ate
.
toString
(),
'payment_reference_number'
:
payment
R
eference
N
umber
.
toString
(),
'bank_name'
:
bank
N
ame
.
toString
(),
'bank_branch_name'
:
bank
B
ranch
N
ame
.
toString
(),
'bank_acc_number'
:
bank
AccN
umber
.
toString
(),
'bank_ifsc_code'
:
bank
I
fsc
C
ode
.
toString
(),
'acc_holder_name'
:
acc
H
older
N
ame
.
toString
(),
'bank_upi_id'
:
bank
UpiI
d
.
toString
(),
};
var
res
;
...
...
@@ -1616,16 +1616,18 @@ class ApiCalling {
empId
,
session
,
mode
,
from_date
,
to_date
,
fromDate
,
toDate
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'from'
:
from_date
.
toString
(),
'to'
:
to_date
.
toString
(),
'from'
:
fromDate
.
toString
(),
'to'
:
toDate
.
toString
(),
'page_number'
:
pageNumber
.
toString
(),
};
print
(
data
);
final
res
=
await
post
(
data
,
paymentRequestionListUrl
,
{});
...
...
@@ -1645,13 +1647,13 @@ class ApiCalling {
static
Future
<
paymentRequisitionDetailsResponse
?>
paymentRequestionDetailsAPI
(
empId
,
session
,
payment
_r
equest
_i
d
,
payment
R
equest
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_request_id'
:
(
payment
_r
equest
_i
d
).
toString
(),
'payment_request_id'
:
(
payment
R
equest
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
paymentRequestionDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -1668,16 +1670,16 @@ class ApiCalling {
}
static
Future
<
paymentRequestionBankDetailsResponse
?>
paymentRequestionBankDetailsAPI
(
empId
,
session
,
account
_i
d
)
async
{
paymentRequestionBankDetailsAPI
(
empId
,
session
,
account
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
paymentRequestBankDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Bank Detaols
$
{
data
}
"
);
print
(
"Bank Detaols
$data
"
);
debugPrint
(
res
.
body
);
return
paymentRequestionBankDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -1693,16 +1695,16 @@ class ApiCalling {
}
static
Future
<
approveRejectPaymentRequestResponse
?>
approveRejectPaymentRequestAPI
(
empId
,
session
,
payment
_r
equest
_i
d
)
async
{
approveRejectPaymentRequestAPI
(
empId
,
session
,
payment
R
equest
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_request_id'
:
(
payment
_r
equest
_i
d
).
toString
(),
'payment_request_id'
:
(
payment
R
equest
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
approveRejectPaymentRequestUrl
,
{});
if
(
res
!=
null
)
{
print
(
"add payment:
$
{
data
}
"
);
print
(
"add payment:
$data
"
);
debugPrint
(
res
.
body
);
return
approveRejectPaymentRequestResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -1722,8 +1724,8 @@ class ApiCalling {
empId
,
session
,
mode
,
payment
_r
equest
_i
d
,
approve
_r
emarks
,
payment
R
equest
I
d
,
approve
R
emarks
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -1731,8 +1733,8 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'type'
:
'reject'
,
'mode'
:
mode
.
toString
(),
'payment_request_id'
:
(
payment
_r
equest
_i
d
).
toString
(),
'approve_remarks'
:
approve
_r
emarks
,
'payment_request_id'
:
(
payment
R
equest
I
d
).
toString
(),
'approve_remarks'
:
approve
R
emarks
,
};
final
res
=
await
post
(
data
,
approveRejectPaymentRequestSubmitUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -1756,10 +1758,10 @@ class ApiCalling {
empId
,
session
,
mode
,
payment
_r
equest
_i
d
,
approved
_a
mount
,
approve
_r
emarks
,
proposed
_p
ayment
_a
ccount
_i
d
,
payment
R
equest
I
d
,
approved
A
mount
,
approve
R
emarks
,
proposed
P
ayment
A
ccount
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -1767,10 +1769,10 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'type'
:
'approve'
,
'mode'
:
mode
.
toString
(),
'payment_request_id'
:
(
payment
_r
equest
_i
d
).
toString
(),
'approve_remarks'
:
approve
_r
emarks
,
'approved_amount'
:
approved
_a
mount
,
'proposed_payment_account_id'
:
proposed
_p
ayment
_a
ccount
_i
d
,
'payment_request_id'
:
(
payment
R
equest
I
d
).
toString
(),
'approve_remarks'
:
approve
R
emarks
,
'approved_amount'
:
approved
A
mount
,
'proposed_payment_account_id'
:
proposed
P
ayment
A
ccount
I
d
,
};
// print(data);
final
res
=
await
post
(
data
,
approveRejectPaymentRequestSubmitUrl
,
{});
...
...
@@ -1794,11 +1796,11 @@ class ApiCalling {
empId
,
session
,
mode
,
payment
_r
eference
_n
umber
,
payment
_a
mount
,
payment
_r
equest
_i
d
,
payment
_a
ccount
_i
d
,
processing
_r
emarks
,
payment
R
eference
N
umber
,
payment
A
mount
,
payment
R
equest
I
d
,
payment
A
ccount
I
d
,
processing
R
emarks
,
attachment
,
)
async
{
try
{
...
...
@@ -1807,14 +1809,14 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'type'
:
'approve'
.
toString
(),
'mode'
:
mode
.
toString
(),
'payment_reference_number'
:
payment
_r
eference
_n
umber
.
toString
(),
'payment_amount'
:
payment
_a
mount
.
toString
(),
'payment_request_id'
:
(
payment
_r
equest
_i
d
).
toString
(),
'payment_account_id'
:
payment
_a
ccount
_i
d
.
toString
(),
'processing_remarks'
:
processing
_r
emarks
.
toString
(),
'payment_reference_number'
:
payment
R
eference
N
umber
.
toString
(),
'payment_amount'
:
payment
A
mount
.
toString
(),
'payment_request_id'
:
(
payment
R
equest
I
d
).
toString
(),
'payment_account_id'
:
payment
A
ccount
I
d
.
toString
(),
'processing_remarks'
:
processing
R
emarks
.
toString
(),
};
var
res
;
print
(
"Process:
$
{
data
}
"
);
print
(
"Process:
$data
"
);
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
data
,
...
...
@@ -1823,7 +1825,7 @@ class ApiCalling {
attachment
,
"attachment"
,
);
print
(
"Process:
$
{
data
}
"
);
print
(
"Process:
$data
"
);
res
=
jsonDecode
(
res
);
print
(
data
);
return
CommonResponse
.
fromJson
(
res
);
...
...
@@ -1839,13 +1841,14 @@ class ApiCalling {
}
static
Future
<
paymentRequisitionPaymentsListResponse
?>
paymentRequisitionPaymentListAPI
(
empId
,
session
,
from
,
to
)
async
{
paymentRequisitionPaymentListAPI
(
empId
,
session
,
from
,
to
,
pageNumber
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'from'
:
(
from
).
toString
(),
'to'
:
(
to
).
toString
(),
'page_number'
:
(
pageNumber
).
toString
(),
};
final
res
=
await
post
(
data
,
paymentRequesitionPaymentsListUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -1866,13 +1869,20 @@ class ApiCalling {
}
static
Future
<
paymentRequisitionPaymentsReceiptsListResponse
?>
paymentRequisitionPaymentReceiptListAPI
(
empId
,
session
,
from
,
to
)
async
{
paymentRequisitionPaymentReceiptListAPI
(
empId
,
session
,
from
,
to
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'from'
:
(
from
).
toString
(),
'to'
:
(
to
).
toString
(),
'page_number'
:
(
pageNumber
).
toString
(),
};
final
res
=
await
post
(
data
,
...
...
@@ -1895,12 +1905,12 @@ class ApiCalling {
}
static
Future
<
paymentRequisitionPaymentsDetailsResponse
?>
paymentRequisitionPaymentDetailsAPI
(
empId
,
session
,
payment
_i
d
)
async
{
paymentRequisitionPaymentDetailsAPI
(
empId
,
session
,
payment
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
(
payment
_i
d
).
toString
(),
'payment_id'
:
(
payment
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
paymentRequesitionPaymentsDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -1919,12 +1929,12 @@ class ApiCalling {
}
static
Future
<
paymentRequisitionPaymentsReceiptsDetailsResponse
?>
paymentRequisitionPaymentReceiptDetailsAPI
(
empId
,
session
,
payment
_i
d
)
async
{
paymentRequisitionPaymentReceiptDetailsAPI
(
empId
,
session
,
payment
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_receipt_id'
:
(
payment
_i
d
).
toString
(),
'payment_receipt_id'
:
(
payment
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
...
...
@@ -1945,24 +1955,23 @@ class ApiCalling {
return
null
;
}
}
static
Future
<
CommonResponse
?>
editProcessedRequestAmountAPI
(
empId
,
session
,
process
_p
ayment
_i
d
,
approval
_a
mount
,
)
async
{
empId
,
session
,
process
P
ayment
I
d
,
approval
A
mount
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'process_payment_id'
:
process
_p
ayment
_i
d
.
toString
(),
'approval_amount'
:
approval
_a
mount
.
toString
(),
'process_payment_id'
:
process
P
ayment
I
d
.
toString
(),
'approval_amount'
:
approval
A
mount
.
toString
(),
};
print
(
"Process EDIT:
$
{
data
}
"
);
print
(
"Process EDIT:
$data
"
);
var
res
=
await
post
(
data
,
paymentRequesitionEditProcessedPaymentUrl
,
{});
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -2024,13 +2033,13 @@ class ApiCalling {
static
Future
<
DistrictsResponse
?>
commonAddAccountViewDistrictAPI
(
empId
,
session
,
state
_i
d
,
state
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'state_id'
:
state
_i
d
.
toString
(),
'state_id'
:
state
I
d
.
toString
(),
};
final
res
=
await
post
(
data
,
commonAddAccountViewgetDistrictUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2049,13 +2058,13 @@ class ApiCalling {
static
Future
<
SubLocationsResponse
?>
commonAddAccountViewSubLocationAPI
(
empId
,
session
,
district
_i
d
,
district
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'district_id'
:
district
_i
d
.
toString
(),
'district_id'
:
district
I
d
.
toString
(),
};
final
res
=
await
post
(
data
,
commonAddAccountViewgetSubLocationUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2075,14 +2084,14 @@ class ApiCalling {
empId
,
session
,
type
,
type
_v
alue
,
type
V
alue
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'type'
:
(
type
).
toString
(),
'type_value'
:
(
type
_v
alue
).
toString
(),
'type_value'
:
(
type
V
alue
).
toString
(),
};
final
res
=
await
post
(
data
,
commonAddAccountCheckInputsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2111,13 +2120,13 @@ class ApiCalling {
address
,
state
,
district
,
sub
_l
ocality
,
bank
_n
ame
,
bank
_b
ranch
_n
ame
,
bank
_i
fsc
_c
ode
,
bank
_a
ccount
_h
older
_n
ame
,
bank
_a
ccount
_n
umber
,
bank
_upi_i
d
,
sub
L
ocality
,
bank
N
ame
,
bank
B
ranch
N
ame
,
bank
I
fsc
C
ode
,
bank
A
ccount
H
older
N
ame
,
bank
A
ccount
N
umber
,
bank
UpiI
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2133,13 +2142,13 @@ class ApiCalling {
'address'
:
address
.
toString
(),
'state'
:
state
.
toString
(),
'district'
:
district
.
toString
(),
'sub_locality'
:
sub
_l
ocality
.
toString
(),
'bank_name'
:
bank
_n
ame
.
toString
(),
'bank_branch_name'
:
bank
_b
ranch
_n
ame
.
toString
(),
'bank_ifsc_code'
:
bank
_i
fsc
_c
ode
.
toString
(),
'bank_account_holder_name'
:
bank
_a
ccount
_h
older
_n
ame
.
toString
(),
'bank_account_number'
:
bank
_a
ccount
_n
umber
.
toString
(),
'bank_upi_id'
:
bank
_upi_i
d
.
toString
(),
'sub_locality'
:
sub
L
ocality
.
toString
(),
'bank_name'
:
bank
N
ame
.
toString
(),
'bank_branch_name'
:
bank
B
ranch
N
ame
.
toString
(),
'bank_ifsc_code'
:
bank
I
fsc
C
ode
.
toString
(),
'bank_account_holder_name'
:
bank
A
ccount
H
older
N
ame
.
toString
(),
'bank_account_number'
:
bank
A
ccount
N
umber
.
toString
(),
'bank_upi_id'
:
bank
UpiI
d
.
toString
(),
};
final
res
=
await
post
(
data
,
commonAddAccountSubmit
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2159,17 +2168,17 @@ class ApiCalling {
static
Future
<
commonAccountlistResponse
?>
commonAccountListAPI
(
empId
,
session
,
page
_n
umber
,
company
_n
ame
,
mobile
_n
umber
,
page
N
umber
,
company
N
ame
,
mobile
N
umber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'page_number'
:
page
_n
umber
.
toString
(),
'company_name'
:
company
_n
ame
.
toString
(),
'mobile_number'
:
mobile
_n
umber
.
toString
(),
'page_number'
:
page
N
umber
.
toString
(),
'company_name'
:
company
N
ame
.
toString
(),
'mobile_number'
:
mobile
N
umber
.
toString
(),
};
final
res
=
await
post
(
data
,
commonAccountListUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2188,13 +2197,13 @@ class ApiCalling {
static
Future
<
commonAccountdetailsResponse
?>
commonAccountDetailsAPI
(
empId
,
session
,
account
_i
d
,
account
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account
_i
d
.
toString
(),
'account_id'
:
account
I
d
.
toString
(),
};
final
res
=
await
post
(
data
,
commonAccountLedgerAccountDetails
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2234,13 +2243,13 @@ class ApiCalling {
static
Future
<
commonAccountLedgerResponse
?>
commonAccountLedgerListAPI
(
empId
,
session
,
account
_i
d
,
account
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account
_i
d
.
toString
(),
'account_id'
:
account
I
d
.
toString
(),
};
print
(
data
);
final
res
=
await
post
(
data
,
commonAccountLedgerListWithFilterUrl
,
{});
...
...
@@ -2281,7 +2290,6 @@ class ApiCalling {
}
}
static
Future
<
ordersAccessiblePagesResponse
?>
ordersAccesibleAddPagesAPI
(
empId
,
session
,
...
...
@@ -2387,13 +2395,13 @@ class ApiCalling {
static
Future
<
addOrderAccontDetailsResponse
?>
addOrderAccountDetailsAPI
(
empId
,
session
,
account
_i
d
,
account
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersAddOrderAccountDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2440,38 +2448,38 @@ class ApiCalling {
empId
,
session
,
mode
,
sales
_p
erson
_emp_i
d
,
selected
_acc_i
d
,
dispatch
_s
tate
_i
d
,
dispatch
_d
istrict
_i
d
,
dispatch
_sub_l
ocation
_i
d
,
dispatch
_p
incode
,
dispatch
_a
ddress
,
basic
_a
mount
,
cgst
_a
mount
,
sgst
_a
mount
,
igst
_a
mount
,
total
_a
mount
,
order
_r
eceived
_d
ate
,
sales
P
erson
EmpI
d
,
selected
AccI
d
,
dispatch
S
tate
I
d
,
dispatch
D
istrict
I
d
,
dispatch
SubL
ocation
I
d
,
dispatch
P
incode
,
dispatch
A
ddress
,
basic
A
mount
,
cgst
A
mount
,
sgst
A
mount
,
igst
A
mount
,
total
A
mount
,
order
R
eceived
D
ate
,
note
,
unloading
,
freight
,
erection
,
tpc
_a
pplicable
,
billing
_n
ame
,
billing
_gst_n
o
,
billing
_p
incode
,
billing
_a
ddress
,
billing
_s
tate
,
billing
_d
istrict
,
billing
_sub_l
ocality
,
order
_p
roducts
,
lead
_i
d
,
tpc
A
pplicable
,
billing
N
ame
,
billing
GstN
o
,
billing
P
incode
,
billing
A
ddress
,
billing
S
tate
,
billing
D
istrict
,
billing
SubL
ocality
,
order
P
roducts
,
lead
I
d
,
feedback
,
in
_t
ime
,
in
T
ime
,
loc
,
requested
_tpc_a
mount
,
tpc
_a
gent
_i
d
,
requested
TpcA
mount
,
tpc
A
gent
I
d
,
po
,
)
async
{
try
{
...
...
@@ -2479,41 +2487,41 @@ class ApiCalling {
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'mode'
:
mode
.
toString
(),
'sales_person_emp_id'
:
sales
_p
erson
_emp_i
d
.
toString
(),
'selected_acc_id'
:
selected
_acc_i
d
.
toString
(),
'dispatch_state_id'
:
dispatch
_s
tate
_i
d
.
toString
(),
'dispatch_district_id'
:
dispatch
_d
istrict
_i
d
.
toString
(),
'dispatch_sub_location_id'
:
dispatch
_sub_l
ocation
_i
d
.
toString
(),
'dispatch_pincode'
:
dispatch
_p
incode
.
toString
(),
'dispatch_address'
:
dispatch
_a
ddress
.
toString
(),
'basic_amount'
:
basic
_a
mount
.
toString
(),
'cgst_amount'
:
cgst
_a
mount
.
toString
(),
'sgst_amount'
:
sgst
_a
mount
.
toString
(),
'igst_amount'
:
igst
_a
mount
.
toString
(),
'total_amount'
:
total
_a
mount
.
toString
(),
'order_received_date'
:
order
_r
eceived
_d
ate
.
toString
(),
'sales_person_emp_id'
:
sales
P
erson
EmpI
d
.
toString
(),
'selected_acc_id'
:
selected
AccI
d
.
toString
(),
'dispatch_state_id'
:
dispatch
S
tate
I
d
.
toString
(),
'dispatch_district_id'
:
dispatch
D
istrict
I
d
.
toString
(),
'dispatch_sub_location_id'
:
dispatch
SubL
ocation
I
d
.
toString
(),
'dispatch_pincode'
:
dispatch
P
incode
.
toString
(),
'dispatch_address'
:
dispatch
A
ddress
.
toString
(),
'basic_amount'
:
basic
A
mount
.
toString
(),
'cgst_amount'
:
cgst
A
mount
.
toString
(),
'sgst_amount'
:
sgst
A
mount
.
toString
(),
'igst_amount'
:
igst
A
mount
.
toString
(),
'total_amount'
:
total
A
mount
.
toString
(),
'order_received_date'
:
order
R
eceived
D
ate
.
toString
(),
'note'
:
note
.
toString
(),
'unloading'
:
unloading
.
toString
(),
'freight'
:
freight
.
toString
(),
'erection'
:
erection
.
toString
(),
'tpc_applicable'
:
tpc
_a
pplicable
.
toString
(),
'billing_name'
:
billing
_n
ame
.
toString
(),
'billing_gst_no'
:
billing
_gst_n
o
.
toString
(),
'billing_pincode'
:
billing
_p
incode
.
toString
(),
'billing_address'
:
billing
_a
ddress
.
toString
(),
'billing_state'
:
billing
_s
tate
.
toString
(),
'billing_district'
:
billing
_d
istrict
.
toString
(),
'billing_sub_locality'
:
billing
_sub_l
ocality
.
toString
(),
'order_products'
:
(
order
_p
roducts
).
toString
(),
'lead_id'
:
lead
_i
d
.
toString
(),
'tpc_applicable'
:
tpc
A
pplicable
.
toString
(),
'billing_name'
:
billing
N
ame
.
toString
(),
'billing_gst_no'
:
billing
GstN
o
.
toString
(),
'billing_pincode'
:
billing
P
incode
.
toString
(),
'billing_address'
:
billing
A
ddress
.
toString
(),
'billing_state'
:
billing
S
tate
.
toString
(),
'billing_district'
:
billing
D
istrict
.
toString
(),
'billing_sub_locality'
:
billing
SubL
ocality
.
toString
(),
'order_products'
:
(
order
P
roducts
).
toString
(),
'lead_id'
:
lead
I
d
.
toString
(),
'feedback'
:
feedback
.
toString
(),
'in_time'
:
in
_t
ime
.
toString
(),
'in_time'
:
in
T
ime
.
toString
(),
'loc'
:
loc
.
toString
(),
'requested_tpc_amount'
:
requested
_tpc_a
mount
.
toString
(),
'tpc_agent_id'
:
tpc
_a
gent
_i
d
.
toString
(),
'requested_tpc_amount'
:
requested
TpcA
mount
.
toString
(),
'tpc_agent_id'
:
tpc
A
gent
I
d
.
toString
(),
};
var
res
;
print
(
"add order:
$
{
data
}
"
);
print
(
"add order:
$data
"
);
if
(
po
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
ordersAddOrderSubmitUrl
,
po
,
"po"
);
res
=
jsonDecode
(
res
);
...
...
@@ -2559,6 +2567,7 @@ class ApiCalling {
mode
,
teamemployee
,
status
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2567,6 +2576,7 @@ class ApiCalling {
'mode'
:
(
mode
).
toString
(),
'teamemployee'
:
(
teamemployee
).
toString
(),
'status'
:
(
status
).
toString
(),
'page_number'
:
(
pageNumber
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersOrderListFilterUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2586,17 +2596,17 @@ class ApiCalling {
static
Future
<
ordersDetailsByModeResponse
?>
ordersDetailsByModeAPI
(
empId
,
session
,
order
_i
d
,
order
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'order_id'
:
(
order
_i
d
).
toString
(),
'order_id'
:
(
order
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersOrderDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Order Details
$
{
data
}
"
);
print
(
"Order Details
$data
"
);
print
(
"Order Details
${res.body}
"
);
return
ordersDetailsByModeResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -2612,26 +2622,26 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
ordersDetailsFeedbackSubmissionAPI
(
empId
,
session
,
order
_i
d
,
order
I
d
,
feedback
,
status
,
attachment
_f
ile
,
attachment
F
ile
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'order_id'
:
order
_i
d
.
toString
(),
'order_id'
:
order
I
d
.
toString
(),
'feedback'
:
(
feedback
).
toString
(),
'status'
:
status
,
};
var
res
;
if
(
attachment
_f
ile
!=
null
)
{
if
(
attachment
F
ile
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
ordersOrderDetailsFeedbackSubmitUrl
,
attachment
_f
ile
,
attachment
F
ile
,
"attachment_file"
,
);
res
=
jsonDecode
(
res
);
...
...
@@ -2647,12 +2657,12 @@ class ApiCalling {
}
static
Future
<
ordersDetailsEditOrderViewResponse
?>
ordersDetailsEditOrderViewAPI
(
empId
,
session
,
order
_i
d
)
async
{
ordersDetailsEditOrderViewAPI
(
empId
,
session
,
order
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'order_id'
:
order
_i
d
.
toString
(),
'order_id'
:
order
I
d
.
toString
(),
};
var
res
=
await
post
(
data
,
ordersOrderDetailsEditOrderUrl
,
{});
...
...
@@ -2667,18 +2677,19 @@ class ApiCalling {
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
return
null
;
}
static
Future
<
CommonResponse
?>
ordersDetailsEditOrderSubmitAPI
(
empId
,
session
,
order
_i
d
,
attachment
_f
ile
,
dispatch
_s
tate
_i
d
,
order
I
d
,
attachment
F
ile
,
dispatch
S
tate
I
d
,
district
,
sub
_l
ocality
,
dispatch
_p
incode
,
dispatch
_a
ddress
,
sub
L
ocality
,
dispatch
P
incode
,
dispatch
A
ddress
,
unloading
,
freight
,
erection
,
...
...
@@ -2688,12 +2699,12 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'order_id'
:
order
_i
d
.
toString
(),
'dispatch_state_id'
:
dispatch
_s
tate
_i
d
.
toString
(),
'order_id'
:
order
I
d
.
toString
(),
'dispatch_state_id'
:
dispatch
S
tate
I
d
.
toString
(),
'district'
:
district
.
toString
(),
'sub_locality'
:
sub
_l
ocality
.
toString
(),
'dispatch_pincode'
:
dispatch
_p
incode
.
toString
(),
'dispatch_address'
:
dispatch
_a
ddress
.
toString
(),
'sub_locality'
:
sub
L
ocality
.
toString
(),
'dispatch_pincode'
:
dispatch
P
incode
.
toString
(),
'dispatch_address'
:
dispatch
A
ddress
.
toString
(),
'unloading'
:
unloading
.
toString
(),
'freight'
:
freight
.
toString
(),
'erection'
:
erection
.
toString
(),
...
...
@@ -2701,12 +2712,12 @@ class ApiCalling {
};
var
res
;
print
(
"Edit Order:
$data
"
);
if
(
attachment
_f
ile
!=
null
)
{
if
(
attachment
F
ile
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
ordersOrderDetailsEditOrderSubmitUrl
,
attachment
_f
ile
,
attachment
F
ile
,
"attachment_file"
,
);
res
=
jsonDecode
(
res
);
...
...
@@ -2722,12 +2733,12 @@ class ApiCalling {
}
static
Future
<
ordersDetailsDispatchOrderViewResponse
?>
ordersDetailsDispatchOrderViewAPI
(
empId
,
session
,
order
_i
d
)
async
{
ordersDetailsDispatchOrderViewAPI
(
empId
,
session
,
order
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'order_id'
:
order
_i
d
.
toString
(),
'order_id'
:
order
I
d
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersOrderDetailsDispatchProductsUrl
,
{});
...
...
@@ -2742,18 +2753,19 @@ class ApiCalling {
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
return
null
;
}
static
Future
<
ordersPdiIdByEngNumberResponse
?>
ordersPdiIdByEngNumberUrlAPI
(
empId
,
session
,
engine
_n
umber
,
engine
N
umber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'engine_number'
:
engine
_n
umber
.
toString
(),
'engine_number'
:
engine
N
umber
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersPdiIdByEngNumberUrl
,
{});
...
...
@@ -2766,6 +2778,7 @@ class ApiCalling {
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
return
null
;
}
static
Future
<
CommonResponse
?>
ordersDetailsApproveRejectAPI
(
...
...
@@ -2773,17 +2786,17 @@ class ApiCalling {
session
,
status
,
type
,
order
_i
d
,
order
I
d
,
feedback
,
tpc
_a
pplicable
,
tpc
_a
pproved
_a
mount
,
sale
_o
rder
_n
umber
,
edit
_c
ompany
_n
ame
,
invoice
_n
umber
,
vehicle
_n
umber
,
driver
_n
ame
,
driver
_m
obile
_n
o
,
crm
_o
rder
_p_i
d
,
tpc
A
pplicable
,
tpc
A
pproved
A
mount
,
sale
O
rder
N
umber
,
edit
C
ompany
N
ame
,
invoice
N
umber
,
vehicle
N
umber
,
driver
N
ame
,
driver
M
obile
N
o
,
crm
O
rder
PI
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2791,17 +2804,17 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
"status"
:
status
.
toString
(),
"type"
:
type
.
toString
(),
"order_id"
:
order
_i
d
.
toString
(),
"order_id"
:
order
I
d
.
toString
(),
"feedback"
:
feedback
.
toString
(),
"tpc_applicable"
:
tpc
_a
pplicable
.
toString
(),
"tpc_approved_amount"
:
tpc
_a
pproved
_a
mount
.
toString
(),
"sale_order_number"
:
sale
_o
rder
_n
umber
.
toString
(),
"edit_company_name"
:
edit
_c
ompany
_n
ame
.
toString
(),
"invoice_number"
:
invoice
_n
umber
.
toString
(),
"vehicle_number"
:
vehicle
_n
umber
.
toString
(),
"driver_name"
:
driver
_n
ame
.
toString
(),
"driver_mobile_no"
:
driver
_m
obile
_n
o
.
toString
(),
"crm_order_p_id"
:
crm
_o
rder
_p_i
d
.
toString
(),
"tpc_applicable"
:
tpc
A
pplicable
.
toString
(),
"tpc_approved_amount"
:
tpc
A
pproved
A
mount
.
toString
(),
"sale_order_number"
:
sale
O
rder
N
umber
.
toString
(),
"edit_company_name"
:
edit
C
ompany
N
ame
.
toString
(),
"invoice_number"
:
invoice
N
umber
.
toString
(),
"vehicle_number"
:
vehicle
N
umber
.
toString
(),
"driver_name"
:
driver
N
ame
.
toString
(),
"driver_mobile_no"
:
driver
M
obile
N
o
.
toString
(),
"crm_order_p_id"
:
crm
O
rder
PI
d
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersOrderApproveRejectUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2821,14 +2834,14 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
ordersDetailsDeleteAPI
(
empId
,
session
,
order
_i
d
,
order
I
d
,
feedback
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"order_id"
:
order
_i
d
.
toString
(),
"order_id"
:
order
I
d
.
toString
(),
"feedback"
:
feedback
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersOrderLDeleteUrl
,
{});
...
...
@@ -2872,29 +2885,29 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
addOrderpaymentListSubmitAPI
(
empId
,
session
,
account
_i
d
,
account
I
d
,
description
,
selected
_o
rders
,
payment
_a
mount
,
payment
_d
ate
,
payment
_t
ype
,
ref
_n
o
,
selected
O
rders
,
payment
A
mount
,
payment
D
ate
,
payment
T
ype
,
ref
N
o
,
attachment
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account
_i
d
.
toString
(),
'account_id'
:
account
I
d
.
toString
(),
'description'
:
description
.
toString
(),
'selected_orders'
:
jsonEncode
(
selected
_o
rders
).
toString
(),
'payment_amount'
:
payment
_a
mount
.
toString
(),
'payment_date'
:
payment
_d
ate
.
toString
(),
'payment_type'
:
payment
_t
ype
.
toString
(),
'ref_no'
:
ref
_n
o
.
toString
(),
'selected_orders'
:
jsonEncode
(
selected
O
rders
).
toString
(),
'payment_amount'
:
payment
A
mount
.
toString
(),
'payment_date'
:
payment
D
ate
.
toString
(),
'payment_type'
:
payment
T
ype
.
toString
(),
'ref_no'
:
ref
N
o
.
toString
(),
};
var
res
;
print
(
"Add Payment:
$
{
data
}
"
);
print
(
"Add Payment:
$data
"
);
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
data
,
...
...
@@ -2919,22 +2932,22 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
ordersEditPaymentDetailsAPI
(
empId
,
session
,
payment
_i
d
,
payment
I
d
,
description
,
payment
_t
ype
,
ref
_n
o
,
payment
_d
ate
,
payment
T
ype
,
ref
N
o
,
payment
D
ate
,
amount
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment
_i
d
.
toString
(),
'payment_id'
:
payment
I
d
.
toString
(),
'description'
:
description
.
toString
(),
'payment_type'
:
payment
_t
ype
.
toString
(),
'payment_date'
:
payment
_d
ate
.
toString
(),
'ref_no'
:
ref
_n
o
.
toString
(),
'payment_type'
:
payment
T
ype
.
toString
(),
'payment_date'
:
payment
D
ate
.
toString
(),
'ref_no'
:
ref
N
o
.
toString
(),
'amount'
:
amount
.
toString
(),
};
...
...
@@ -2948,19 +2961,20 @@ class ApiCalling {
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
return
null
;
}
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersViewAPI
(
empId
,
session
,
payment
_i
d
,
payment
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment
_i
d
.
toString
(),
'payment_id'
:
payment
I
d
.
toString
(),
};
var
res
=
await
post
(
...
...
@@ -2980,23 +2994,24 @@ class ApiCalling {
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
return
null
;
}
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersUpdateAPI
(
empId
,
session
,
payment
_i
d
,
update
_a
mounts
,
insert
_a
mounts
,
payment
I
d
,
update
A
mounts
,
insert
A
mounts
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment
_i
d
.
toString
(),
'update_amounts'
:
jsonEncode
(
update
_a
mounts
).
toString
(),
'insert_amounts'
:
jsonEncode
(
insert
_a
mounts
).
toString
(),
'payment_id'
:
payment
I
d
.
toString
(),
'update_amounts'
:
jsonEncode
(
update
A
mounts
).
toString
(),
'insert_amounts'
:
jsonEncode
(
insert
A
mounts
).
toString
(),
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersUrl
,
{});
...
...
@@ -3011,16 +3026,17 @@ class ApiCalling {
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
return
null
;
}
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
AddOrderPaymentSelectAccountAPI
(
empId
,
session
,
mode
,
search
_t
erm
)
async
{
AddOrderPaymentSelectAccountAPI
(
empId
,
session
,
mode
,
search
T
erm
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
mode
.
toString
(),
'search_term'
:
search
_t
erm
.
toString
(),
'search_term'
:
search
T
erm
.
toString
(),
};
final
res
=
await
post
(
data
,
...
...
@@ -3044,12 +3060,12 @@ class ApiCalling {
}
static
Future
<
AddOrderPaymentSelectOrderResponse
?>
AddOrderPaymentSelectOrderAPI
(
empId
,
session
,
account
_i
d
)
async
{
AddOrderPaymentSelectOrderAPI
(
empId
,
session
,
account
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account
_i
d
.
toString
(),
'account_id'
:
account
I
d
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersAddPaymentSelectOrderUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3098,6 +3114,7 @@ class ApiCalling {
session
,
mode
,
teamemployee
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3105,6 +3122,7 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'teamemployee'
:
(
teamemployee
).
toString
(),
'page_number'
:
(
pageNumber
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersPaymentListByModeUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3124,7 +3142,7 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
paymentOrderApproveRejectAPI
(
empId
,
session
,
payment
_i
d
,
payment
I
d
,
type
,
remarks
,
)
async
{
...
...
@@ -3132,7 +3150,7 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"payment_id"
:
payment
_i
d
.
toString
(),
"payment_id"
:
payment
I
d
.
toString
(),
"type"
:
type
.
toString
(),
"remarks"
:
remarks
.
toString
(),
};
...
...
@@ -3151,18 +3169,17 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
verifyOrderAPI
(
empId
,
session
,
order
_i
d
,
otp
,
order
I
d
,
otp
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"order_id"
:
order
_i
d
.
toString
(),
"order_id"
:
order
I
d
.
toString
(),
"otp"
:
otp
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersVerifyOtpUrl
,
{});
...
...
@@ -3183,13 +3200,13 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
resendOTPOrderAPI
(
empId
,
session
,
order
_i
d
,
order
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"order_id"
:
order
_i
d
.
toString
(),
"order_id"
:
order
I
d
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersResendOtpUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3209,13 +3226,13 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
paymentOrderDeleteAPI
(
empId
,
session
,
payment
_i
d
,
payment
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"payment_id"
:
payment
_i
d
.
toString
(),
"payment_id"
:
payment
I
d
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersPaymentListDeleteUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3235,13 +3252,13 @@ class ApiCalling {
static
Future
<
paymentDetailsByModeFilterResponse
?>
paymentsDetailsByModeAPI
(
empId
,
session
,
payment
_i
d
,
payment
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
(
payment
_i
d
).
toString
(),
'payment_id'
:
(
payment
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersPaymentDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3263,26 +3280,23 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
paymentsDetailsAddAdjustedOrderAPI
(
empId
,
session
,
payment
_i
d
,
selected
_o
rder
_i
d
,
amount
,
payment
I
d
,
selected
O
rder
I
d
,
amount
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
(
payment
_i
d
).
toString
(),
'selected_order_id'
:
(
selected
_o
rder
_i
d
).
toString
(),
'payment_id'
:
(
payment
I
d
).
toString
(),
'selected_order_id'
:
(
selected
O
rder
I
d
).
toString
(),
'amount'
:
(
amount
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersPaymentDetailsAddOrderUrl
,
{});
if
(
res
!=
null
)
{
print
(
"paymentsDetailsAddAdjusted:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
@@ -3296,25 +3310,23 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
paymentsDetailsEditAdjustedOrderAPI
(
empId
,
session
,
selected
_o
rder
_i
d
,
amount
,
order
_p
ayment
_i
d
,
selected
O
rder
I
d
,
amount
,
order
P
ayment
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'selected_order_id'
:
(
selected
_o
rder
_i
d
).
toString
(),
'selected_order_id'
:
(
selected
O
rder
I
d
).
toString
(),
'amount'
:
(
amount
).
toString
(),
'order_payment_id'
:
(
order
_p
ayment
_i
d
).
toString
(),
'order_payment_id'
:
(
order
P
ayment
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersPaymentDetailsEditOrderUrl
,
{});
if
(
res
!=
null
)
{
print
(
"paymentsDetailsEditAdjusted
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
@@ -3328,35 +3340,35 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
ordersAddTPCAgentAPI
(
empId
,
session
,
agent
_n
ame
,
mobile
_n
umber
,
bank
_n
ame
,
bank
_a
ccount
_n
o
,
bank
_i
fsc
_c
ode
,
bank
_b
eneficiary
_n
ame
,
agent
N
ame
,
mobile
N
umber
,
bank
N
ame
,
bank
A
ccount
N
o
,
bank
I
fsc
C
ode
,
bank
B
eneficiary
N
ame
,
note
,
id
_p
roof
,
id
P
roof
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'agent_name'
:
agent
_n
ame
.
toString
(),
'mobile_number'
:
mobile
_n
umber
.
toString
(),
'bank_name'
:
bank
_n
ame
.
toString
(),
'bank_account_no'
:
bank
_a
ccount
_n
o
.
toString
(),
'bank_ifsc_code'
:
bank
_i
fsc
_c
ode
.
toString
(),
'bank_beneficiary_name'
:
bank
_b
eneficiary
_n
ame
.
toString
(),
'agent_name'
:
agent
N
ame
.
toString
(),
'mobile_number'
:
mobile
N
umber
.
toString
(),
'bank_name'
:
bank
N
ame
.
toString
(),
'bank_account_no'
:
bank
A
ccount
N
o
.
toString
(),
'bank_ifsc_code'
:
bank
I
fsc
C
ode
.
toString
(),
'bank_beneficiary_name'
:
bank
B
eneficiary
N
ame
.
toString
(),
'note'
:
note
.
toString
(),
};
var
res
;
print
(
"add TPC:
$data
"
);
if
(
id
_p
roof
!=
null
)
{
if
(
id
P
roof
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
ordersAddTPCAgentUrl
,
id
_p
roof
,
id
P
roof
,
"id_proof"
,
);
res
=
jsonDecode
(
res
);
...
...
@@ -3365,7 +3377,7 @@ class ApiCalling {
res
=
jsonDecode
(
res
.
body
);
// return CommonResponse.fromJson(res);
}
print
(
"Add TPC:
$
{
res
}
"
);
print
(
"Add TPC:
$res
"
);
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
...
...
@@ -3373,12 +3385,18 @@ class ApiCalling {
}
}
static
Future
<
TPCListResponse
?>
TPCAgentListAPI
(
empId
,
session
,
mode
)
async
{
static
Future
<
TPCListResponse
?>
TPCAgentListAPI
(
empId
,
session
,
mode
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'page_number'
:
(
pageNumber
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersTPCAgentListUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3398,13 +3416,13 @@ class ApiCalling {
static
Future
<
TPCAgentDetailsResponse
?>
TPCAgentDetailsAPI
(
empId
,
session
,
tpc
_a
gent
_i
d
,
tpc
A
gent
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'tpc_agent_id'
:
(
tpc
_a
gent
_i
d
).
toString
(),
'tpc_agent_id'
:
(
tpc
A
gent
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersTPCAgentDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3424,11 +3442,13 @@ class ApiCalling {
static
Future
<
PendingTPCAgentListResponse
?>
pendingTPCAgentIssueListAPI
(
empId
,
session
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'page_number'
:
(
pageNumber
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersPendingTPCIssueListUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3448,28 +3468,28 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
TpcIssueListApprovalAPI
(
empId
,
session
,
tpc
_p
ayment
_m
ode
,
tpc
_p
ayment
_r
eference
_n
o
,
order
_i
d
,
order
_tpc_f
eedback
,
tpc
_p
aym
_a
ttachment
,
tpc
P
ayment
M
ode
,
tpc
P
ayment
R
eference
N
o
,
order
I
d
,
order
TpcF
eedback
,
tpc
P
aym
A
ttachment
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'tpc_payment_mode'
:
tpc
_p
ayment
_m
ode
.
toString
(),
'tpc_payment_reference_no'
:
tpc
_p
ayment
_r
eference
_n
o
.
toString
(),
'order_id'
:
order
_i
d
.
toString
(),
'order_tpc_feedback'
:
order
_tpc_f
eedback
.
toString
(),
'tpc_payment_mode'
:
tpc
P
ayment
M
ode
.
toString
(),
'tpc_payment_reference_no'
:
tpc
P
ayment
R
eference
N
o
.
toString
(),
'order_id'
:
order
I
d
.
toString
(),
'order_tpc_feedback'
:
order
TpcF
eedback
.
toString
(),
};
var
res
;
if
(
tpc
_p
aym
_a
ttachment
!=
null
)
{
if
(
tpc
P
aym
A
ttachment
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
ordersApprovePendingTPCIssueListUrl
,
tpc
_p
aym
_a
ttachment
,
tpc
P
aym
A
ttachment
,
"tpc_paym_attachment"
,
);
res
=
jsonDecode
(
res
);
...
...
@@ -3534,14 +3554,15 @@ class ApiCalling {
}
}
static
Future
<
crmNewLeadsProspectsSubmitResponse
?>
crmNewLeadsProspectsSubmitAPI
(
session_id
,
emp_id
,
static
Future
<
crmNewLeadsProspectsSubmitResponse
?>
crmNewLeadsProspectsSubmitAPI
(
sessionId
,
empId
,
mode
,
acc
_m
anager
_i
d
,
salutation
_n
ame
,
acc
M
anager
I
d
,
salutation
N
ame
,
name
,
contact
_n
ame
,
contact
N
ame
,
district
,
state
,
address
,
...
...
@@ -3549,24 +3570,24 @@ class ApiCalling {
source
,
reference
,
team
,
sub
_l
ocality
,
sub
L
ocality
,
mob1
,
mob2
,
tel
,
email
,
designation
,
lead
_s
tatus
,
lead
S
tatus
,
products
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
session
_i
d
.
toString
(),
'emp_id'
:
emp
_i
d
.
toString
(),
'session_id'
:
session
I
d
.
toString
(),
'emp_id'
:
emp
I
d
.
toString
(),
'mode'
:
mode
.
toString
(),
'acc_manager_id'
:
acc
_m
anager
_i
d
.
toString
(),
'salutation_name'
:
salutation
_n
ame
.
toString
(),
'acc_manager_id'
:
acc
M
anager
I
d
.
toString
(),
'salutation_name'
:
salutation
N
ame
.
toString
(),
'name'
:
name
.
toString
(),
'contact_name'
:
contact
_n
ame
.
toString
(),
'contact_name'
:
contact
N
ame
.
toString
(),
'district'
:
district
.
toString
(),
'state'
:
state
.
toString
(),
'address'
:
address
.
toString
(),
...
...
@@ -3574,20 +3595,22 @@ class ApiCalling {
'source'
:
source
.
toString
(),
'reference'
:
reference
.
toString
(),
'team'
:
team
.
toString
(),
'sub_locality'
:
sub
_l
ocality
.
toString
(),
'sub_locality'
:
sub
L
ocality
.
toString
(),
'mob1'
:
mob1
.
toString
(),
'mob2'
:
mob2
.
toString
(),
'tel'
:
tel
.
toString
(),
'email'
:
email
.
toString
(),
'designation'
:
designation
.
toString
(),
'lead_status'
:
lead
_s
tatus
.
toString
(),
'lead_status'
:
lead
S
tatus
.
toString
(),
'products'
:
products
.
toString
(),
};
final
res
=
await
post
(
data
,
crmNewProspectLeadSubmitUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
"Submit New Leads
${res.body}
"
);
return
crmNewLeadsProspectsSubmitResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
crmNewLeadsProspectsSubmitResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
@@ -3601,13 +3624,13 @@ class ApiCalling {
static
Future
<
crmDashboardResponse
?>
crmDashboardAPI
(
empId
,
session
,
emp
_l
oc
,
emp
L
oc
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'emp_loc'
:
emp
_l
oc
.
toString
(),
'emp_loc'
:
emp
L
oc
.
toString
(),
};
final
res
=
await
post
(
data
,
crmDashboardUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3705,7 +3728,7 @@ class ApiCalling {
session
,
mode
,
status
,
open
_s
tatus
,
open
S
tatus
,
mob
,
com
,
source
,
...
...
@@ -3713,6 +3736,7 @@ class ApiCalling {
team
,
segment
,
alphabet
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3720,7 +3744,7 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'status'
:
status
.
toString
(),
'open_status'
:
open
_s
tatus
.
toString
(),
'open_status'
:
open
S
tatus
.
toString
(),
'mob'
:
mob
.
toString
(),
'com'
:
com
.
toString
(),
'source'
:
source
.
toString
(),
...
...
@@ -3728,10 +3752,11 @@ class ApiCalling {
'team'
:
team
.
toString
(),
'segment'
:
segment
.
toString
(),
'alphabet'
:
alphabet
.
toString
(),
'page_number'
:
pageNumber
.
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadListFilterSubmitUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Lead Filter:
$
{
data
}
"
);
print
(
"Lead Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
SubmitLeadListFilterResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -3747,13 +3772,13 @@ class ApiCalling {
static
Future
<
GetSourceOnReferenceResponse
?>
crmLeadListSourceOnReferenceAPI
(
empId
,
session
,
source
_i
d
,
source
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'source_id'
:
(
source
_i
d
).
toString
(),
'source_id'
:
(
source
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadListSourceOnReferenceUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3773,13 +3798,13 @@ class ApiCalling {
static
Future
<
GetSegmentOnTeamResponse
?>
crmLeadListSegmentOnTeamAPI
(
empId
,
session
,
team
_i
d
,
team
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'team_id'
:
(
team
_i
d
).
toString
(),
'team_id'
:
(
team
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadListSegmentOnTeamUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3799,13 +3824,13 @@ class ApiCalling {
static
Future
<
GetDistrictOnStateResponse
?>
crmDistrictsOnStateAPI
(
empId
,
session
,
state
_i
d
,
state
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'state_id'
:
(
state
_i
d
).
toString
(),
'state_id'
:
(
state
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadListDistrictOnStateUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3825,13 +3850,13 @@ class ApiCalling {
static
Future
<
GetSubLocOnDistrictResponse
?>
crmSubLocOnDistrictAPI
(
empId
,
session
,
district
_i
d
,
district
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'district_id'
:
(
district
_i
d
).
toString
(),
'district_id'
:
(
district
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadListSubLocOnDistrictUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3851,13 +3876,13 @@ class ApiCalling {
static
Future
<
LeadListContactPopUpResponse
?>
crmLeadListContactPopUpAPI
(
empId
,
session
,
account
_i
d
,
account
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadListContactPopUpUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3877,14 +3902,14 @@ class ApiCalling {
static
Future
<
LeadDetailsResponse
?>
crmLeadDetailsAPI
(
empId
,
session
,
lead
_i
d
,
lead
I
d
,
mode
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead
_i
d
).
toString
(),
'lead_id'
:
(
lead
I
d
).
toString
(),
'mode'
:
(
mode
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsUrl
,
{});
...
...
@@ -3905,10 +3930,10 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmLeadDetailsAddEditProductsAPI
(
empId
,
session
,
lead
_i
d
,
lead
I
d
,
type
,
lead
_p
roduct
_i
d
,
product
_i
d
,
lead
P
roduct
I
d
,
product
I
d
,
qty
,
amount
,
)
async
{
...
...
@@ -3916,10 +3941,10 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead
_i
d
).
toString
(),
'lead_id'
:
(
lead
I
d
).
toString
(),
'type'
:
(
type
).
toString
(),
'lead_product_id'
:
(
lead
_p
roduct
_i
d
).
toString
(),
'product_id'
:
(
product
_i
d
).
toString
(),
'lead_product_id'
:
(
lead
P
roduct
I
d
).
toString
(),
'product_id'
:
(
product
I
d
).
toString
(),
'qty'
:
(
qty
).
toString
(),
'amount'
:
(
amount
).
toString
(),
};
...
...
@@ -3939,41 +3964,41 @@ class ApiCalling {
}
static
Future
<
crmAddFollowUpResponse
?>
crmLeadDetailsAddFollowUpAPI
(
session
_i
d
,
emp
_i
d
,
session
I
d
,
emp
I
d
,
nextapp
,
orderstatus
,
lead
_i
d
,
followup
_f
eedback
,
followup
_t
ype
,
lead
I
d
,
followup
F
eedback
,
followup
T
ype
,
followupintime
,
loc
,
competitor
,
reason
,
followup
_s
tatus
,
next
_a
ppointment
_d
ate
,
appointment
_t
ype
,
followup
S
tatus
,
next
A
ppointment
D
ate
,
appointment
T
ype
,
sms
,
app
_n
ote
,
app
N
ote
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
session
_i
d
.
toString
(),
'emp_id'
:
emp
_i
d
.
toString
(),
'session_id'
:
session
I
d
.
toString
(),
'emp_id'
:
emp
I
d
.
toString
(),
'nextapp'
:
nextapp
.
toString
(),
'orderstatus'
:
orderstatus
.
toString
(),
'lead_id'
:
lead
_i
d
.
toString
(),
'followup_feedback'
:
followup
_f
eedback
.
toString
(),
'followup_type'
:
followup
_t
ype
.
toString
(),
'lead_id'
:
lead
I
d
.
toString
(),
'followup_feedback'
:
followup
F
eedback
.
toString
(),
'followup_type'
:
followup
T
ype
.
toString
(),
'followupintime'
:
followupintime
.
toString
(),
'loc'
:
loc
.
toString
(),
'competitor'
:
competitor
.
toString
(),
'reason'
:
reason
.
toString
(),
'followup_status'
:
followup
_s
tatus
.
toString
(),
'next_appointment_date'
:
next
_a
ppointment
_d
ate
.
toString
(),
'appointment_type'
:
appointment
_t
ype
.
toString
(),
'followup_status'
:
followup
S
tatus
.
toString
(),
'next_appointment_date'
:
next
A
ppointment
D
ate
.
toString
(),
'appointment_type'
:
appointment
T
ype
.
toString
(),
'sms'
:
sms
.
toString
(),
'app_note'
:
app
_n
ote
.
toString
(),
'app_note'
:
app
N
ote
.
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsAddFollowUpUrl
,
{});
...
...
@@ -3992,12 +4017,12 @@ class ApiCalling {
}
static
Future
<
crmLeadDetailsEditAccountViewResponse
?>
crmLeadDetailsEditAccountViewAPI
(
empId
,
session
,
lead
_i
d
,
mode
)
async
{
crmLeadDetailsEditAccountViewAPI
(
empId
,
session
,
lead
I
d
,
mode
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead
_i
d
).
toString
(),
'lead_id'
:
(
lead
I
d
).
toString
(),
'mode'
:
(
mode
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsEditAccountViewUrl
,
{});
...
...
@@ -4020,19 +4045,19 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmLeadDetailsEditAccountSubmitAPI
(
empId
,
session
,
account
_i
d
,
segment
_i
d
,
team
_i
d
,
account
_n
ame
,
account
I
d
,
segment
I
d
,
team
I
d
,
account
N
ame
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'segment_id'
:
(
segment
_i
d
).
toString
(),
'team_id'
:
(
team
_i
d
).
toString
(),
'account_name'
:
(
account
_n
ame
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
'segment_id'
:
(
segment
I
d
).
toString
(),
'team_id'
:
(
team
I
d
).
toString
(),
'account_name'
:
(
account
N
ame
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsEditAccountUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -4050,17 +4075,19 @@ class ApiCalling {
}
static
Future
<
crmLeadDetailsEditProductsViewResponse
?>
crmLeadDetailsEditProductsViewAPI
(
empId
,
session
,
lead
_i
d
)
async
{
crmLeadDetailsEditProductsViewAPI
(
empId
,
session
,
lead
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead
_i
d
).
toString
(),
'lead_id'
:
(
lead
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsEditProductsViewUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
print
(
"crmLeadDetailsEditProductsViewAPI:
${jsonDecode(res.body)['lead_products']}
"
);
print
(
"crmLeadDetailsEditProductsViewAPI:
${jsonDecode(res.body)['lead_products']}
"
,
);
debugPrint
(
res
.
body
);
return
crmLeadDetailsEditProductsViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -4079,14 +4106,14 @@ class ApiCalling {
empId
,
session
,
products
,
lead
_i
d
,
lead
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'products'
:
jsonEncode
(
products
).
toString
(),
'lead_id'
:
(
lead
_i
d
).
toString
(),
'lead_id'
:
(
lead
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsEditProductsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -4106,7 +4133,7 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmLeadDetailsAddContactAPI
(
empId
,
session
,
acc
_i
d
,
acc
I
d
,
name
,
mob1
,
designation
,
...
...
@@ -4118,7 +4145,7 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'acc_id'
:
(
acc
_i
d
).
toString
(),
'acc_id'
:
(
acc
I
d
).
toString
(),
'name'
:
(
name
).
toString
(),
'mob1'
:
(
mob1
).
toString
(),
'designation'
:
(
designation
).
toString
(),
...
...
@@ -4144,7 +4171,7 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmLeadDetailsEditContactAPI
(
empId
,
session
,
contact
_i
d
,
contact
I
d
,
name
,
mob1
,
designation
,
...
...
@@ -4156,7 +4183,7 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'contact_id'
:
(
contact
_i
d
).
toString
(),
'contact_id'
:
(
contact
I
d
).
toString
(),
'name'
:
(
name
).
toString
(),
'mob1'
:
(
mob1
).
toString
(),
'designation'
:
(
designation
).
toString
(),
...
...
@@ -4182,8 +4209,8 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmLeadDetailsAddAppointmentAPI
(
empId
,
session
,
lead
_i
d
,
appointment
_d
ate
,
lead
I
d
,
appointment
D
ate
,
type
,
note
,
)
async
{
...
...
@@ -4191,8 +4218,8 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead
_i
d
).
toString
(),
'appointment_date'
:
(
appointment
_d
ate
).
toString
(),
'lead_id'
:
(
lead
I
d
).
toString
(),
'appointment_date'
:
(
appointment
D
ate
).
toString
(),
'type'
:
(
type
).
toString
(),
'note'
:
(
note
).
toString
(),
};
...
...
@@ -4212,12 +4239,12 @@ class ApiCalling {
}
static
Future
<
crmLeadDetailsGenerateQuotationViewResponse
?>
crmLeadDetailsGenerateQuotationViewAPI
(
empId
,
session
,
lead
_i
d
)
async
{
crmLeadDetailsGenerateQuotationViewAPI
(
empId
,
session
,
lead
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead
_i
d
).
toString
(),
'lead_id'
:
(
lead
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsGenerateQuotationViewUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -4238,33 +4265,33 @@ class ApiCalling {
static
Future
<
crmLeadDetailsGenerateQuotationSubmitResponse
?>
crmLeadDetailsGenerateQuotationSubmitAPI
(
emp
_i
d
,
session
_i
d
,
lead
_i
d
,
emp
I
d
,
session
I
d
,
lead
I
d
,
quotemno
,
quotesubject
,
taxes
,
quotenote
,
quotefor
,
quotep
_t
erms
,
quotep
T
erms
,
quotemail
,
quote
_p
roducts
,
quotation
_t
ype
,
quote
P
roducts
,
quotation
T
ype
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
emp
_i
d
.
toString
(),
'session_id'
:
session
_i
d
.
toString
(),
'lead_id'
:
lead
_i
d
.
toString
(),
'emp_id'
:
emp
I
d
.
toString
(),
'session_id'
:
session
I
d
.
toString
(),
'lead_id'
:
lead
I
d
.
toString
(),
'quotemno'
:
quotemno
.
toString
(),
'quotesubject'
:
quotesubject
.
toString
(),
'taxes'
:
taxes
.
toString
(),
'quotenote'
:
quotenote
.
toString
(),
'quotefor'
:
quotefor
.
toString
(),
'quotep_terms'
:
quotep
_t
erms
.
toString
(),
'quotep_terms'
:
quotep
T
erms
.
toString
(),
'quotemail'
:
quotemail
.
toString
(),
'quote_products'
:
jsonEncode
(
quote
_p
roducts
).
toString
(),
'quotation_type'
:
quotation
_t
ype
.
toString
(),
'quote_products'
:
jsonEncode
(
quote
P
roducts
).
toString
(),
'quotation_type'
:
quotation
T
ype
.
toString
(),
};
final
res
=
await
post
(
data
,
...
...
@@ -4272,7 +4299,7 @@ class ApiCalling {
{},
);
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
crmLeadDetailsGenerateQuotationSubmitResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -4287,35 +4314,26 @@ class ApiCalling {
}
}
static
Future
<
crmDownloadGenQuoteResponse
?>
crmDownloadGenQuoteAPI
(
emp_id
,
session_id
,
lead_id
,
quote_id
,
quotation_type
,
static
Future
<
crmDownloadGenQuoteResponse
?>
crmDownloadGenQuoteAPI
(
empId
,
sessionId
,
leadId
,
quoteId
,
quotationType
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
emp_id
.
toString
(),
'session_id'
:
session_id
.
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'quote_id'
:
quote_id
.
toString
(),
'quotation_type'
:
quotation_type
.
toString
(),
'emp_id'
:
empId
.
toString
(),
'session_id'
:
sessionId
.
toString
(),
'lead_id'
:
leadId
.
toString
(),
'quote_id'
:
quoteId
.
toString
(),
'quotation_type'
:
quotationType
.
toString
(),
};
final
res
=
await
post
(
data
,
crmDownloadGeneratedQuotationUrl
,
{},
);
final
res
=
await
post
(
data
,
crmDownloadGeneratedQuotationUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
crmDownloadGenQuoteResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
return
crmDownloadGenQuoteResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
@@ -4359,7 +4377,8 @@ class ApiCalling {
mode
,
teamemployee
,
mob
,
company_name
,
companyName
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -4368,11 +4387,12 @@ class ApiCalling {
'mode'
:
(
mode
).
toString
(),
'teamemployee'
:
teamemployee
.
toString
(),
'mob'
:
mob
.
toString
(),
'company_name'
:
company_name
.
toString
(),
'company_name'
:
companyName
.
toString
(),
'page_number'
:
pageNumber
.
toString
(),
};
final
res
=
await
post
(
data
,
crmProspectListFilterSubmitUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
SubmitProspectListFilterResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4388,17 +4408,17 @@ class ApiCalling {
static
Future
<
crmProspectDetailsResponse
?>
crmProspectDetailsAPI
(
empId
,
session
,
account
_i
d
,
account
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmProspectDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
crmProspectDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4414,19 +4434,19 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmProspectDetailsTransferAccountAPI
(
empId
,
session
,
account
_i
d
,
tranemp
_i
d
,
account
I
d
,
tranemp
I
d
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'tranemp_id'
:
(
tranemp
_i
d
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
'tranemp_id'
:
(
tranemp
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmProspectDetailsTransferAccountUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4440,16 +4460,16 @@ class ApiCalling {
}
static
Future
<
crmProspectDetailsEditAccountViewResponse
?>
crmProspectDetailsEditAccountViewAPI
(
empId
,
session
,
account
_i
d
)
async
{
crmProspectDetailsEditAccountViewAPI
(
empId
,
session
,
account
I
d
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmProspectDetailsEditAccountViewUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
print
(
"Stetets:
${jsonDecode(res.body)['states']}
"
);
return
crmProspectDetailsEditAccountViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -4467,12 +4487,12 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmProspectDetailsEditAccountSubmitAPI
(
empId
,
session
,
account
_i
d
,
edit
_c
ompany
_n
ame
,
edit
_s
alutation
_n
ame
,
state
_i
d
,
account
I
d
,
edit
C
ompany
N
ame
,
edit
S
alutation
N
ame
,
state
I
d
,
district
,
sub
_l
ocality
,
sub
L
ocality
,
pincode
,
address
,
)
async
{
...
...
@@ -4480,18 +4500,18 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account
_i
d
).
toString
(),
'edit_company_name'
:
edit
_c
ompany
_n
ame
.
toString
(),
'edit_salutation_name'
:
edit
_s
alutation
_n
ame
.
toString
(),
'state_id'
:
state
_i
d
.
toString
(),
'account_id'
:
(
account
I
d
).
toString
(),
'edit_company_name'
:
edit
C
ompany
N
ame
.
toString
(),
'edit_salutation_name'
:
edit
S
alutation
N
ame
.
toString
(),
'state_id'
:
state
I
d
.
toString
(),
'district'
:
district
.
toString
(),
'sub_locality'
:
sub
_l
ocality
.
toString
(),
'sub_locality'
:
sub
L
ocality
.
toString
(),
'pincode'
:
pincode
.
toString
(),
'address'
:
address
.
toString
(),
};
final
res
=
await
post
(
data
,
crmProspectDetailsEditAccountSubmitUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4514,7 +4534,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
crmProspectDetailsAddLeadViewUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
crmProspectDetailsAddLeadsResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -4533,24 +4553,24 @@ class ApiCalling {
empId
,
session
,
mode
,
account
_i
d
,
acc
_m
anager
_i
d
,
account
I
d
,
acc
M
anager
I
d
,
products
,
lead
_s
tatus
,
lead
S
tatus
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'account_id'
:
account
_i
d
.
toString
(),
'acc_manager_id'
:
acc
_m
anager
_i
d
.
toString
(),
'account_id'
:
account
I
d
.
toString
(),
'acc_manager_id'
:
acc
M
anager
I
d
.
toString
(),
'products'
:
jsonEncode
(
products
).
toString
(),
'lead_status'
:
lead
_s
tatus
.
toString
(),
'lead_status'
:
lead
S
tatus
.
toString
(),
};
final
res
=
await
post
(
data
,
crmProspectDetailsAddLeadSubmitUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4566,25 +4586,25 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmProspectDetailsAddLeadAPI
(
empId
,
session
,
account
_i
d
,
product
_i
d
,
account
I
d
,
product
I
d
,
quantity
,
amount
,
lead
_s
tatus
,
lead
S
tatus
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account
_i
d
.
toString
(),
'product_id'
:
product
_i
d
.
toString
(),
'account_id'
:
account
I
d
.
toString
(),
'product_id'
:
product
I
d
.
toString
(),
'quantity'
:
quantity
.
toString
(),
'amount'
:
amount
.
toString
(),
'lead_status'
:
lead
_s
tatus
.
toString
(),
'lead_status'
:
lead
S
tatus
.
toString
(),
};
final
res
=
await
post
(
data
,
crmProspectDetailsAddLeadUrl
,
{});
if
(
res
!=
null
)
{
print
(
"crmProspectDetailsAddLead:
$
{
data
}
"
);
print
(
"crmProspectDetailsAddLead:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4601,7 +4621,7 @@ class ApiCalling {
empId
,
session
,
name
,
acc
_i
d
,
acc
I
d
,
mob1
,
designation
,
email
,
...
...
@@ -4613,7 +4633,7 @@ class ApiCalling {
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'name'
:
name
.
toString
(),
'acc_id'
:
acc
_i
d
.
toString
(),
'acc_id'
:
acc
I
d
.
toString
(),
'mob1'
:
mob1
.
toString
(),
'designation'
:
designation
.
toString
(),
'email'
:
email
.
toString
(),
...
...
@@ -4622,7 +4642,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
crmProspectDetailsAddAccountUrl
,
{});
if
(
res
!=
null
)
{
print
(
"crmProspectDetailsAddAccountAPI:
$
{
data
}
"
);
print
(
"crmProspectDetailsAddAccountAPI:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4638,9 +4658,9 @@ class ApiCalling {
static
Future
<
CommonResponse
?>
crmProspectDetailsEditContactAPI
(
empId
,
session
,
contact
_i
d
,
contact
I
d
,
name
,
acc
_i
d
,
acc
I
d
,
mob1
,
mob2
,
tel
,
...
...
@@ -4651,9 +4671,9 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'contact_id'
:
(
contact
_i
d
).
toString
(),
'contact_id'
:
(
contact
I
d
).
toString
(),
'name'
:
name
.
toString
(),
'acc_id'
:
acc
_i
d
.
toString
(),
'acc_id'
:
acc
I
d
.
toString
(),
'mob1'
:
mob1
.
toString
(),
'mob2'
:
mob2
.
toString
(),
'tel'
:
tel
.
toString
(),
...
...
@@ -4662,7 +4682,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
crmProspectDetailsEditContactUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4681,12 +4701,12 @@ class ApiCalling {
session
,
nextapp
,
orderstatus
,
lead
_i
d
,
followup
_f
eedback
,
followup
_t
ype
,
lead
I
d
,
followup
F
eedback
,
followup
T
ype
,
followupintime
,
loc
,
followup
_s
tatus
,
followup
S
tatus
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -4694,12 +4714,12 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'nextapp'
:
nextapp
.
toString
(),
'orderstatus'
:
orderstatus
.
toString
(),
'lead_id'
:
lead
_i
d
.
toString
(),
'followup_feedback'
:
followup
_f
eedback
.
toString
(),
'followup_type'
:
followup
_t
ype
.
toString
(),
'lead_id'
:
lead
I
d
.
toString
(),
'followup_feedback'
:
followup
F
eedback
.
toString
(),
'followup_type'
:
followup
T
ype
.
toString
(),
'followupintime'
:
followupintime
.
toString
(),
'loc'
:
loc
.
toString
(),
'followup_status'
:
followup
_s
tatus
.
toString
(),
'followup_status'
:
followup
S
tatus
.
toString
(),
};
final
res
=
await
post
(
data
,
...
...
@@ -4707,7 +4727,7 @@ class ApiCalling {
{},
);
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
crmProspectDetailsAddFollowUpAppointmentResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -4725,19 +4745,19 @@ class ApiCalling {
static
Future
<
appointmentCalendarResponse
?>
crmAppointmentCalendarAPI
(
empId
,
session
,
appointment
_d
ate
,
appointment
D
ate
,
type
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'appointment_date'
:
(
appointment
_d
ate
).
toString
(),
'appointment_date'
:
(
appointment
D
ate
).
toString
(),
'type'
:
(
type
).
toString
(),
};
final
res
=
await
post
(
data
,
crmAppointmentCalendarUrl
,
{});
if
(
res
!=
null
)
{
print
(
"appointmentCalendar:
$
{
data
}
"
);
print
(
"appointmentCalendar:
$data
"
);
debugPrint
(
res
.
body
);
return
appointmentCalendarResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4750,20 +4770,17 @@ class ApiCalling {
}
}
static
Future
<
crmSelectedProductDetailsResponse
?>
crmSelectedProductDetailsApi
(
empId
,
session
,
product_id
,
)
async
{
static
Future
<
crmSelectedProductDetailsResponse
?>
crmSelectedProductDetailsApi
(
empId
,
session
,
productId
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'product_id'
:
(
product
_i
d
).
toString
(),
'product_id'
:
(
product
I
d
).
toString
(),
};
final
res
=
await
post
(
data
,
crmSelectedProductDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
"crmSelectedProductDetailsApi:
$
{
data
}
"
);
print
(
"crmSelectedProductDetailsApi:
$data
"
);
debugPrint
(
res
.
body
);
return
crmSelectedProductDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4776,24 +4793,22 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
crmCheckAccountFieldsApi
(
empId
,
session
,
type
_v
alue
,
type
,
type
V
alue
,
type
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'type_value'
:
(
type
_v
alue
).
toString
(),
'type_value'
:
(
type
V
alue
).
toString
(),
'type'
:
(
type
).
toString
(),
};
final
res
=
await
post
(
data
,
crmCheckAccountFieldsUrl
,
{});
if
(
res
!=
null
)
{
print
(
"crmCheckAccountFieldsApi:
$
{
data
}
"
);
print
(
"crmCheckAccountFieldsApi:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4812,17 +4827,17 @@ class ApiCalling {
session
,
nextapp
,
orderstatus
,
lead
_i
d
,
followup
_f
eedback
,
followup
_t
ype
,
lead
I
d
,
followup
F
eedback
,
followup
T
ype
,
followupintime
,
loc
,
followup
_s
tatus
,
followup
S
tatus
,
appointmentset
,
app
_d
ate
,
app
D
ate
,
sms
,
app
_n
ote
,
in
_t
,
app
N
ote
,
in
T
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -4830,17 +4845,17 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'nextapp'
:
nextapp
.
toString
(),
'orderstatus'
:
orderstatus
.
toString
(),
'lead_id'
:
lead
_i
d
.
toString
(),
'followup_feedback'
:
followup
_f
eedback
.
toString
(),
'followup_type'
:
followup
_t
ype
.
toString
(),
'lead_id'
:
lead
I
d
.
toString
(),
'followup_feedback'
:
followup
F
eedback
.
toString
(),
'followup_type'
:
followup
T
ype
.
toString
(),
'followupintime'
:
followupintime
.
toString
(),
'loc'
:
loc
.
toString
(),
'followup_status'
:
followup
_s
tatus
.
toString
(),
'followup_status'
:
followup
S
tatus
.
toString
(),
'appointmentset'
:
appointmentset
.
toString
(),
'app_date'
:
app
_d
ate
.
toString
(),
'app_date'
:
app
D
ate
.
toString
(),
'sms'
:
sms
.
toString
(),
'app_note'
:
app
_n
ote
.
toString
(),
'in_t'
:
in
_t
.
toString
(),
'app_note'
:
app
N
ote
.
toString
(),
'in_t'
:
in
T
.
toString
(),
};
final
res
=
await
post
(
data
,
...
...
@@ -4848,7 +4863,7 @@ class ApiCalling {
{},
);
if
(
res
!=
null
)
{
print
(
"Filter:
$
{
data
}
"
);
print
(
"Filter:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -4864,14 +4879,14 @@ class ApiCalling {
static
Future
<
NearbyOpenLeadsResponse
?>
loadNearbyOpenLeadsAPI
(
empId
,
session
,
emp
_l
oc
,
emp
L
oc
,
radius
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'emp_loc'
:
(
emp
_l
oc
).
toString
(),
'emp_loc'
:
(
emp
L
oc
).
toString
(),
'radius'
:
radius
.
toString
(),
};
final
res
=
await
post
(
data
,
crmNearbyOpenLeadsUrl
,
{});
...
...
@@ -4892,7 +4907,7 @@ class ApiCalling {
static
Future
<
crmDashboardFollowUpResponse
?>
crmDashboardFollowUpAPI
(
empId
,
session
,
type
,
type
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -4916,9 +4931,9 @@ class ApiCalling {
}
static
Future
<
crmDashboardQuotationResponse
?>
crmDashboardQuotationsAPI
(
empId
,
session
,
)
async
{
empId
,
session
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
...
...
@@ -4939,14 +4954,11 @@ class ApiCalling {
}
}
///hrm modules
///hrm modules
///
///
static
Future
<
ogresponse
?>
ogChartAPI
(
empId
,
session
,
)
async
{
static
Future
<
ogresponse
?>
ogChartAPI
(
empId
,
session
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
...
...
@@ -4967,10 +4979,7 @@ class ApiCalling {
}
}
static
Future
<
jobDescriptionResponse
?>
jobDescriptAPI
(
empId
,
session
,
)
async
{
static
Future
<
jobDescriptionResponse
?>
jobDescriptAPI
(
empId
,
session
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -4992,9 +5001,9 @@ class ApiCalling {
}
static
Future
<
hrmAccessiblePagesResponse
?>
hrmAccessiblePagesAPI
(
empId
,
session
,
)
async
{
empId
,
session
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
...
...
@@ -5016,13 +5025,13 @@ class ApiCalling {
}
static
Future
<
attendanceRequestListResponse
?>
attendanceRequestListAPI
(
empId
,
session
,
type
,
from
,
to
,
mode
)
async
{
empId
,
session
,
type
,
from
,
to
,
mode
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
...
...
@@ -5047,12 +5056,11 @@ class ApiCalling {
}
}
static
Future
<
attendanceRequestDetailsResponse
?>
attendanceRequestDetailAPI
(
empId
,
session
,
attendanceRequestId
,
)
async
{
empId
,
session
,
attendanceRequestId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
...
...
@@ -5075,13 +5083,13 @@ class ApiCalling {
}
static
Future
<
CommonResponse
?>
attendanceRequestApproveRejectAPI
(
session
,
empId
,
mode
,
type
,
remarks
,
id
,
)
async
{
session
,
empId
,
mode
,
type
,
remarks
,
id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5093,7 +5101,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
AttendanceRequestRejectUrl
,
{});
if
(
res
!=
null
)
{
print
(
"Attendance App Reje:
$
{
data
}
"
);
print
(
"Attendance App Reje:
$data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -5122,7 +5130,10 @@ class ApiCalling {
String
?
note
,
})
async
{
try
{
var
request
=
http
.
MultipartRequest
(
'POST'
,
Uri
.
parse
(
AddAttendanceRequestUrl
));
var
request
=
http
.
MultipartRequest
(
'POST'
,
Uri
.
parse
(
AddAttendanceRequestUrl
),
);
// Add basic fields that are always required
Map
<
String
,
String
>
fields
=
{
...
...
@@ -5141,7 +5152,12 @@ class ApiCalling {
fields
[
"check_in_loc"
]
=
checkInLoc
??
""
;
if
(
checkInProof
!=
null
)
{
request
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
"check_in_proof"
,
checkInProof
.
path
));
request
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
"check_in_proof"
,
checkInProof
.
path
,
),
);
}
}
...
...
@@ -5151,7 +5167,12 @@ class ApiCalling {
fields
[
"check_out_loc"
]
=
checkOutLoc
??
""
;
if
(
checkOutProof
!=
null
)
{
request
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
"check_out_proof"
,
checkOutProof
.
path
));
request
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
"check_out_proof"
,
checkOutProof
.
path
,
),
);
}
}
...
...
@@ -5161,7 +5182,9 @@ class ApiCalling {
// Log the actual fields being sent
debugPrint
(
"addAttendanceRequestAPI - Type:
$type
"
);
debugPrint
(
"addAttendanceRequestAPI - Fields:
$fields
"
);
debugPrint
(
"addAttendanceRequestAPI - Files:
${request.files.map((f) => f.filename).toList()}
"
);
debugPrint
(
"addAttendanceRequestAPI - Files:
${request.files.map((f) => f.filename).toList()}
"
,
);
var
response
=
await
request
.
send
();
var
resBody
=
await
response
.
stream
.
bytesToString
();
...
...
@@ -5179,14 +5202,8 @@ class ApiCalling {
}
}
//reward list
static
Future
<
rewardListResponse
?>
rewardListAPI
(
empId
,
session
,
)
async
{
static
Future
<
rewardListResponse
?>
rewardListAPI
(
empId
,
session
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5209,10 +5226,10 @@ class ApiCalling {
//tour exp
static
Future
<
tourExpensesListResponse
?>
tourExpensesListAPI
(
empId
,
session
,
pageNumber
,
)
async
{
empId
,
session
,
pageNumber
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5235,10 +5252,10 @@ class ApiCalling {
}
static
Future
<
tourExpensesDetailsResponse
?>
tourExpensesDetailAPI
(
session
,
empId
,
tourBillId
,
)
async
{
session
,
empId
,
tourBillId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5261,10 +5278,10 @@ class ApiCalling {
}
static
Future
<
tourExpensesAddViewResponse
?>
tourExpensesAddViewAPI
(
empId
,
session
,
tourBillId
,
)
async
{
empId
,
session
,
tourBillId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5285,6 +5302,7 @@ class ApiCalling {
return
null
;
}
}
static
Future
<
CommonResponse
?>
addTourBillAPI
({
required
String
sessionId
,
required
String
empId
,
...
...
@@ -5300,7 +5318,10 @@ class ApiCalling {
List
<
File
>?
otherImages
,
})
async
{
try
{
var
request
=
http
.
MultipartRequest
(
"POST"
,
Uri
.
parse
(
AddTourExpensesUrl
));
var
request
=
http
.
MultipartRequest
(
"POST"
,
Uri
.
parse
(
AddTourExpensesUrl
),
);
/// Add text fields
request
.
fields
[
'session_id'
]
=
sessionId
;
...
...
@@ -5320,10 +5341,7 @@ class ApiCalling {
for
(
var
file
in
hotelImages
)
{
if
(
file
.
path
.
isNotEmpty
)
{
request
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
"hotel_image[]"
,
file
.
path
,
),
await
http
.
MultipartFile
.
fromPath
(
"hotel_image[]"
,
file
.
path
),
);
}
}
...
...
@@ -5334,10 +5352,7 @@ class ApiCalling {
for
(
var
file
in
travelImages
)
{
if
(
file
.
path
.
isNotEmpty
)
{
request
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
"travel_image[]"
,
file
.
path
,
),
await
http
.
MultipartFile
.
fromPath
(
"travel_image[]"
,
file
.
path
),
);
}
}
...
...
@@ -5348,14 +5363,12 @@ class ApiCalling {
for
(
var
file
in
otherImages
)
{
if
(
file
.
path
.
isNotEmpty
)
{
request
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
"other_image[]"
,
file
.
path
,
),
await
http
.
MultipartFile
.
fromPath
(
"other_image[]"
,
file
.
path
),
);
}
}
}
/// Send request
var
response
=
await
request
.
send
();
var
resBody
=
await
response
.
stream
.
bytesToString
();
...
...
@@ -5375,18 +5388,15 @@ class ApiCalling {
}
}
// Leave Application api
// Leave Application api
static
Future
<
leaveApplicationLIstResponse
?>
leaveApplicationListAPI
(
session
,
empId
,
dateFrom
,
dateTo
,
mode
)
async
{
session
,
empId
,
dateFrom
,
dateTo
,
mode
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5394,7 +5404,6 @@ class ApiCalling {
'requested_date_from'
:
(
dateFrom
),
'requested_date_to'
:
(
dateTo
),
'mode'
:
(
mode
),
};
final
res
=
await
post
(
data
,
LeaveApplicationListUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -5412,10 +5421,10 @@ class ApiCalling {
}
static
Future
<
leaveApplicationDetailsResponse
?>
leaveApplicationDetailAPI
(
session
,
empId
,
leaveRequestId
,
)
async
{
session
,
empId
,
leaveRequestId
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5436,17 +5445,18 @@ class ApiCalling {
return
null
;
}
}
//add leave request
static
Future
<
CommonResponse
?>
leaveRequestAddAPI
(
session
,
empId
,
fromDate
,
fromTime
,
toDate
,
toTime
,
leaveType
,
reason
)
async
{
session
,
empId
,
fromDate
,
fromTime
,
toDate
,
toTime
,
leaveType
,
reason
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5474,13 +5484,13 @@ class ApiCalling {
}
static
Future
<
CommonResponse
?>
leaveRequestRejectApproveAPI
(
session
,
empId
,
mode
,
type
,
remarks
,
id
,
)
async
{
session
,
empId
,
mode
,
type
,
remarks
,
id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
(
session
).
toString
(),
...
...
@@ -5505,7 +5515,6 @@ class ApiCalling {
}
}
// static Future<CommonResponse?> TpcIssueListApprovalAPI(
// empId,
// session,
...
...
lib/services/api_names.dart
View file @
185e0896
...
...
@@ -63,14 +63,14 @@ const addPaymentReceiptViewUrl = "${baseUrl_test}add_payment_receipt_view";
const
addPaymentRequestionSubmitUrl
=
"
${baseUrl_test}
add_payment_requsition_submit"
;
const
addDirectPaymentRequestionSubmitUrl
=
"
${baseUrl_test}
add_direct_payment_submit"
;
const
addPaymentReceiptSubmitUrl
=
"
${baseUrl_test}
add_payment_receipt_submit"
;
const
paymentRequestionListUrl
=
"
${baseUrl_test}
payment_requsition_list"
;
const
paymentRequestionListUrl
=
"
${baseUrl_test}
payment_requsition_list
_v2
"
;
const
paymentRequestionDetailsUrl
=
"
${baseUrl_test}
payment_requisition_details"
;
const
paymentRequestBankDetailsUrl
=
"
${baseUrl_test}
get_account_bank_details"
;
const
approveRejectPaymentRequestUrl
=
"
${baseUrl_test}
approve_reject_payment_request_view"
;
const
approveRejectPaymentRequestSubmitUrl
=
"
${baseUrl_test}
approve_reject_payment_request_submit"
;
const
paymentRequesitionPaymentsListUrl
=
"
${baseUrl_test}
payment_requistion_payments_list"
;
const
paymentRequesitionPaymentsListUrl
=
"
${baseUrl_test}
payment_requistion_payments_list
_v2
"
;
const
paymentRequesitionPaymentsDetailsUrl
=
"
${baseUrl_test}
payment_requisition_payment_details"
;
const
paymentRequesitionPaymentsReceiptsListUrl
=
"
${baseUrl_test}
payment_receipts_list"
;
const
paymentRequesitionPaymentsReceiptsListUrl
=
"
${baseUrl_test}
payment_receipts_list
_v2
"
;
const
paymentRequesitionPaymentsReceiptsDetailsUrl
=
"
${baseUrl_test}
payment_receipt_details"
;
const
paymentRequesitionEditProcessedPaymentUrl
=
"
${baseUrl_test}
edit_processes_payment"
;
...
...
@@ -82,9 +82,9 @@ const commonAddAccountViewgetDistrictUrl = "${baseUrl_test}get_district_on_state
const
commonAddAccountViewgetSubLocationUrl
=
"
${baseUrl_test}
get_sublocation_on_district"
;
const
commonAddAccountCheckInputsUrl
=
"
${baseUrl_test}
check_common_add_account_fields"
;
const
commonAddAccountSubmit
=
"
${baseUrl_test}
common_add_account_submit"
;
const
commonAccountListUrl
=
"
${baseUrl_test}
common_account_list"
;
const
commonAccountListUrl
=
"
${baseUrl_test}
common_account_list
_v2
"
;
const
commonAccountLedgerDropDownUrl
=
"
${baseUrl_test}
common_account_ledger_list_view"
;
const
commonAccountLedgerListWithFilterUrl
=
"
${baseUrl_test}
common_account_ledger_list_submit_filter"
;
const
commonAccountLedgerListWithFilterUrl
=
"
${baseUrl_test}
common_account_ledger_list_submit_filter
_v2
"
;
const
commonAccountLedgerAccountDetails
=
"
${baseUrl_test}
common_account_details"
;
///order Module
...
...
@@ -93,7 +93,7 @@ const ordersAccessibleAddPagesUrl = "${baseUrl_test}crm_add_order_accessible_pag
const
ordersDashboardUrl
=
"
${baseUrl_test}
order_dashboard"
;
const
ordersPendingTasksListUrl
=
"
${baseUrl_test}
pending_tasks_list"
;
const
ordersOrderListByModeUrl
=
"
${baseUrl_test}
crm_order_list_view"
;
const
ordersOrderListFilterUrl
=
"
${baseUrl_test}
crm_order_list_filter_submit"
;
const
ordersOrderListFilterUrl
=
"
${baseUrl_test}
crm_order_list_filter_submit
_v2
"
;
const
ordersOrderApproveRejectUrl
=
"
${baseUrl_test}
approve_reject_crm_order"
;
const
ordersOrderLDeleteUrl
=
"
${baseUrl_test}
delete_crm_order"
;
const
ordersOrderDetailsUrl
=
"
${baseUrl_test}
crm_order_details"
;
...
...
@@ -115,7 +115,7 @@ const ordersEditPaymentDetailsAdjustedOrdersUrl ="${baseUrl_test}crm_payment_upd
const
ordersAddPaymentSelectAccountForOrderUrl
=
"
${baseUrl_test}
select_account_for_order_payment"
;
const
ordersAddPaymentSelectOrderUrl
=
"
${baseUrl_test}
select_order_for_order_payment"
;
const
ordersPaymentListFilterUrl
=
"
${baseUrl_test}
crm_payments_list_view"
;
const
ordersPaymentListByModeUrl
=
"
${baseUrl_test}
crm_payments_list_filter_submit"
;
const
ordersPaymentListByModeUrl
=
"
${baseUrl_test}
crm_payments_list_filter_submit
_v2
"
;
const
ordersPaymentListDeleteUrl
=
"
${baseUrl_test}
delete_crm_order_payment"
;
const
ordersVerifyOtpUrl
=
"
${baseUrl_test}
verify_otp_add_order"
;
const
ordersResendOtpUrl
=
"
${baseUrl_test}
resend_otp_add_order"
;
...
...
@@ -124,9 +124,9 @@ const ordersPaymentDetailsUrl = "${baseUrl_test}crm_payment_details";
const
ordersPaymentDetailsAddOrderUrl
=
"
${baseUrl_test}
crm_payment_add_adjusted_orders"
;
const
ordersPaymentDetailsEditOrderUrl
=
"
${baseUrl_test}
crm_payment_edit_adjusted_orders"
;
const
ordersAddTPCAgentUrl
=
"
${baseUrl_test}
add_tpc_agent_submit"
;
const
ordersTPCAgentListUrl
=
"
${baseUrl_test}
tpc_agent_list"
;
const
ordersTPCAgentListUrl
=
"
${baseUrl_test}
tpc_agent_list
_v2
"
;
const
ordersTPCAgentDetailsUrl
=
"
${baseUrl_test}
tpc_agent_details"
;
const
ordersPendingTPCIssueListUrl
=
"
${baseUrl_test}
pending_tpc_issue_list"
;
const
ordersPendingTPCIssueListUrl
=
"
${baseUrl_test}
pending_tpc_issue_list
_v2
"
;
const
ordersApprovePendingTPCIssueListUrl
=
"
${baseUrl_test}
update_pending_tpc_issue_list"
;
...
...
@@ -156,7 +156,7 @@ const crmLeadDetailsGenerateQuotationViewUrl = "${baseUrl_test}crm_lead_details_
const
crmLeadDetailsGenerateQuotationSubmitUrl
=
"
${baseUrl_test}
crm_lead_details_generate_quotation_submit"
;
const
crmDownloadGeneratedQuotationUrl
=
"
${baseUrl_test}
download_generated_quotation_file"
;
const
crmProspectListViewUrl
=
"
${baseUrl_test}
crm_prospect_list_view"
;
const
crmProspectListFilterSubmitUrl
=
"
${baseUrl_test}
crm_prospect_list_filter_submit"
;
const
crmProspectListFilterSubmitUrl
=
"
${baseUrl_test}
crm_prospect_list_filter_submit
_v2
"
;
const
crmProspectDetailsUrl
=
"
${baseUrl_test}
crm_prospect_details"
;
const
crmProspectDetailsTransferAccountUrl
=
"
${baseUrl_test}
crm_prospect_details_transfer_account_submit"
;
const
crmProspectDetailsEditAccountViewUrl
=
"
${baseUrl_test}
crm_prospect_details_edit_account_view"
;
...
...
lib/services/api_post_request.dart
View file @
185e0896
...
...
@@ -5,16 +5,12 @@ import 'package:http/http.dart' as http;
Future
<
http
.
Response
?>
post
(
Map
<
String
,
dynamic
>
Body
,
api
_u
rl
,
api
U
rl
,
Map
<
String
,
String
>
Headers
,
)
async
{
http
.
Response
?
response
;
try
{
response
=
await
http
.
post
(
Uri
.
parse
(
api_url
),
headers:
Headers
,
body:
Body
,
);
response
=
await
http
.
post
(
Uri
.
parse
(
apiUrl
),
headers:
Headers
,
body:
Body
);
return
response
;
}
on
Exception
catch
(
e
,
s
)
{
print
(
e
);
...
...
@@ -23,10 +19,10 @@ Future<http.Response?> post(
return
response
;
}
Future
<
http
.
Response
?>
get
(
api
_u
rl
,
Map
<
String
,
String
>
Headers
)
async
{
Future
<
http
.
Response
?>
get
(
api
U
rl
,
Map
<
String
,
String
>
Headers
)
async
{
http
.
Response
?
response
;
try
{
response
=
await
http
.
get
(
Uri
.
parse
(
api
_u
rl
),
headers:
Headers
);
response
=
await
http
.
get
(
Uri
.
parse
(
api
U
rl
),
headers:
Headers
);
return
response
;
}
on
Exception
catch
(
e
,
s
)
{
print
(
e
);
...
...
@@ -158,13 +154,13 @@ Future<String?> postImageNew(
Map
<
String
,
String
>
headers
,
String
urlLink
,
File
image
,
req
_f
ield
req
F
ield
,
)
async
{
try
{
var
req
=
http
.
MultipartRequest
(
'POST'
,
Uri
.
parse
(
urlLink
));
req
.
headers
.
addAll
(
headers
??
{});
req
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
req
_f
ield
,
image
.
path
));
req
.
fields
.
addAll
(
body
??
{});
req
.
headers
.
addAll
(
headers
??
{});
req
.
files
.
add
(
await
http
.
MultipartFile
.
fromPath
(
req
F
ield
,
image
.
path
));
req
.
fields
.
addAll
(
body
??
{});
var
res
=
await
req
.
send
();
final
resBody
=
await
res
.
stream
.
bytesToString
();
...
...
@@ -185,16 +181,14 @@ Future<String?> postImageNew(
//hotel_image
//other_image
Future
<
String
?>
PostMultipleImagesNew
(
Map
<
String
,
String
>
body
,
String
urlLink
,
Map
<
String
,
String
>
headers
,
List
<
http
.
MultipartFile
>
newList
,
List
<
http
.
MultipartFile
>
newList1
,
List
<
http
.
MultipartFile
>
newList2
,
)
async
{
Map
<
String
,
String
>
body
,
String
urlLink
,
Map
<
String
,
String
>
headers
,
List
<
http
.
MultipartFile
>
newList
,
List
<
http
.
MultipartFile
>
newList1
,
List
<
http
.
MultipartFile
>
newList2
,
)
async
{
try
{
var
req
=
http
.
MultipartRequest
(
'POST'
,
Uri
.
parse
(
urlLink
));
req
.
headers
.
addAll
(
headers
);
...
...
@@ -220,12 +214,12 @@ Future<String?> PostMultipleImagesNew(
}
Future
<
String
?>
PostMultipleImagesNew2
(
Map
<
String
,
String
>
body
,
String
urlLink
,
Map
<
String
,
String
>
headers
,
List
<
http
.
MultipartFile
>
newList
,
List
<
http
.
MultipartFile
>
newList1
,
)
async
{
Map
<
String
,
String
>
body
,
String
urlLink
,
Map
<
String
,
String
>
headers
,
List
<
http
.
MultipartFile
>
newList
,
List
<
http
.
MultipartFile
>
newList1
,
)
async
{
try
{
var
req
=
http
.
MultipartRequest
(
'POST'
,
Uri
.
parse
(
urlLink
));
req
.
headers
.
addAll
(
headers
);
...
...
@@ -249,9 +243,6 @@ Future<String?> PostMultipleImagesNew2(
}
}
Future
<
String
?>
PostMultipleImages
(
Map
<
String
,
String
>
body
,
String
urlLink
,
...
...
pubspec.lock
View file @
185e0896
...
...
@@ -61,10 +61,10 @@ packages:
dependency: transitive
description:
name: async
sha256:
"758e6d74e
971c
3
e5
aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
sha256:
d2872f9c1
97
3
1c
2
e5
f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.1
3
.0"
version: "2.1
2
.0"
auto_size_text:
dependency: "direct main"
description:
...
...
@@ -445,10 +445,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "
5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44
"
sha256: "
6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc
"
url: "https://pub.dev"
source: hosted
version: "1.3.
3
"
version: "1.3.
2
"
ffi:
dependency: transitive
description:
...
...
@@ -1180,26 +1180,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256:
"8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
sha256:
c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
source: hosted
version: "1
1
.0.
1
"
version: "1
0
.0.
8
"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256:
"1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
sha256:
f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.
10
"
version: "3.0.
9
"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "
8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1
"
sha256: "
6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3
"
url: "https://pub.dev"
source: hosted
version: "3.0.
2
"
version: "3.0.
1
"
lints:
dependency: transitive
description:
...
...
@@ -2017,10 +2017,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256:
ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
sha256:
"0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "1
5.0.0
"
version: "1
4.3.1
"
watcher:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
185e0896
...
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.10
3
+11
1
version
:
1.0.10
4
+11
2
environment
:
sdk
:
^3.7.2
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment