Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
b9d7c024
Commit
b9d7c024
authored
Jun 23, 2025
by
Sai Srinivas
Browse files
sai srinivas
finance module updated
parent
a92809e3
Changes
11
Show whitespace changes
Inline
Side-by-side
lib/Models/TechniciansPendingComplaintsResponse.dart
View file @
b9d7c024
...
...
@@ -3,8 +3,11 @@ class TechnicianPendingComplaintsResponse {
int
?
error
;
int
?
sessionExists
;
TechnicianPendingComplaintsResponse
(
{
this
.
list
,
this
.
error
,
this
.
sessionExists
});
TechnicianPendingComplaintsResponse
({
this
.
list
,
this
.
error
,
this
.
sessionExists
,
});
TechnicianPendingComplaintsResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'list'
]
!=
null
)
{
...
...
@@ -39,9 +42,10 @@ class TP_List {
String
?
compRegDatetime
;
String
?
mobileNo
;
String
?
contactName
;
String
?
engineNo
;
TP_List
(
{
this
.
genId
,
TP_List
(
{
this
.
genId
,
this
.
address
,
this
.
loc
,
this
.
complaintId
,
...
...
@@ -51,6 +55,7 @@ class TP_List {
this
.
compRegDatetime
,
this
.
mobileNo
,
this
.
contactName
,
this
.
engineNo
,
});
TP_List
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
...
...
@@ -64,6 +69,7 @@ class TP_List {
compRegDatetime
=
json
[
'comp_reg_datetime'
];
mobileNo
=
json
[
'mobile_no'
];
contactName
=
json
[
'contact_name'
];
engineNo
=
json
[
'engine_number'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
...
...
@@ -78,6 +84,7 @@ class TP_List {
data
[
'comp_reg_datetime'
]
=
this
.
compRegDatetime
;
data
[
'mobile_no'
]
=
this
.
mobileNo
;
data
[
'contact_name'
]
=
this
.
contactName
;
data
[
'engine_number'
]
=
this
.
engineNo
;
return
data
;
}
}
lib/Utils/commonWidgets.dart
View file @
b9d7c024
...
...
@@ -18,7 +18,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
),
),
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
Text
(
title
,
style:
TextStyle
(
...
...
@@ -40,7 +40,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
);
}
PreferredSizeWidget
appbar2
(
BuildContext
context
,
title
,
reset
,
widget
)
{
PreferredSizeWidget
appbar2
(
BuildContext
context
,
title
,
reset
,
widget
)
{
return
AppBar
(
automaticallyImplyLeading:
false
,
elevation:
2.0
,
...
...
@@ -50,14 +50,14 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
InkResponse
(
onTap:
(){
onTap:
()
{
reset
();
Navigator
.
pop
(
context
,
true
);
},
child:
SvgPicture
.
asset
(
"assets/svg/app_bar_back.svg"
,
height:
25
),
),
Expanded
(
flex:
4
,
flex:
4
,
child:
InkResponse
(
onTap:
()
{
reset
();
...
...
@@ -77,7 +77,7 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
),
),
Spacer
(),
widget
widget
,
],
),
),
...
...
@@ -94,11 +94,10 @@ Future<bool> onBackPressed(BuildContext context) async {
return
true
;
}
Widget
Emptywidget
(
BuildContext
context
){
Widget
Emptywidget
(
BuildContext
context
)
{
return
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.8
,
child:
Center
(
child:
Text
(
"No Data Available"
)),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.8
,
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
...
...
@@ -124,7 +123,7 @@ Widget textControllerWidget(
inputtype
,
readonly
,
inputFormatters
,
)
{
)
{
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -169,12 +168,13 @@ Widget textControllerWidget(
],
);
}
Widget
textControllerReadonlyWidget
(
context
,
controller
,
hintText
,
Function
(
String
)?
onChanged
,
)
{
)
{
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -215,14 +215,15 @@ Widget textControllerReadonlyWidget(
],
);
}
class
MyNavigatorObserver
extends
NavigatorObserver
{
@override
void
didPush
(
Route
route
,
Route
?
previousRoute
)
{
super
.
didPush
(
route
,
previousRoute
);
// Called when a route has been pushed onto the navigator.
didPushed
=
"true"
;
//
print('Route pushed: ${route.settings.name}');
//
print('didPushed$didPushed');
print
(
'Route pushed:
${route.settings.name}
'
);
print
(
'didPushed
$didPushed
'
);
}
@override
...
...
@@ -230,7 +231,7 @@ class MyNavigatorObserver extends NavigatorObserver {
super
.
didPop
(
route
,
previousRoute
);
didPopped
=
"true"
;
// Called when a route has been popped off the navigator.
//
print('Route popped: ${route.settings.name}');
//
print('didPopped${didPopped}');
print
(
'Route popped:
${route.settings.name}
'
);
print
(
'didPopped
${didPopped}
'
);
}
}
lib/main.dart
View file @
b9d7c024
...
...
@@ -57,7 +57,6 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
void
main
(
)
async
{
WidgetsFlutterBinding
.
ensureInitialized
();
if
(
Platform
.
isAndroid
)
{
await
Firebase
.
initializeApp
(
options:
FirebaseOptions
(
...
...
@@ -186,25 +185,28 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentdetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Generatordetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Nearbygeneratorsprovider
()),
///finance
ChangeNotifierProvider
(
create:
(
_
)
=>
Dashboardprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Requestionlistprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Requesitionlidtdetailsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentrequisitionpaymentslistprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentreceiptsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Commonpagesprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountslistprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountdetailsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountledgerprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Pagesdashboardprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Tpcagentsprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addpaymentprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addorderprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Editpaymentprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Crmdashboardprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Leadlistprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
crmLeadDetailsProvider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Dashboardprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Requestionlistprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Requesitionlidtdetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentrequisitionpaymentslistprovider
(),
),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentreceiptsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Commonpagesprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountslistprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountdetailsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Accountledgerprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Pagesdashboardprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Paymentsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Tpcagentsprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addpaymentprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addorderprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Editpaymentprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Crmdashboardprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
Leadlistprovider
()),
ChangeNotifierProvider
(
create:
(
_
)
=>
crmLeadDetailsProvider
()),
],
child:
Builder
(
builder:
(
BuildContext
context
)
{
...
...
@@ -213,7 +215,7 @@ class MyApp extends StatelessWidget {
builder:
(
BuildContext
context
,
Widget
?
child
)
{
final
MediaQueryData
data
=
MediaQuery
.
of
(
context
);
return
MediaQuery
(
data:
data
.
copyWith
(
textScale
Factor:
1.0
),
data:
data
.
copyWith
(
textScale
r:
TextScaler
.
linear
(
1.0
)
)
,
child:
child
??
Container
(),
);
},
...
...
@@ -271,7 +273,9 @@ class MyApp extends StatelessWidget {
interactive:
true
,
radius:
Radius
.
circular
(
6
),
thickness:
WidgetStatePropertyAll
(
10
),
thumbColor:
WidgetStateProperty
.
all
(
AppColors
.
grey_semi
.
withOpacity
(
0.6
))
thumbColor:
WidgetStateProperty
.
all
(
AppColors
.
grey_semi
.
withOpacity
(
0.6
),
),
),
),
home:
const
Splash
(),
...
...
lib/screens/HomeScreen.dart
View file @
b9d7c024
...
...
@@ -118,8 +118,8 @@ class _MyHomePageState extends State<MyHomePage> {
"Whizzdom"
,
"Common"
,
"Finance"
,
"Orders"
,
"CRM"
,
//
"Orders",
//
"CRM",
];
final
icons
=
[
"assets/svg/home_icons_1.svg"
,
...
...
@@ -131,8 +131,8 @@ class _MyHomePageState extends State<MyHomePage> {
"assets/svg/home_icons_81.svg"
,
"assets/svg/home_icons_9.svg"
,
"assets/svg/home_icons_10.svg"
,
"assets/svg/home_icons_11.svg"
,
"assets/svg/home_icons_12.svg"
,
//
"assets/svg/home_icons_11.svg",
//
"assets/svg/home_icons_12.svg",
];
final
requiredRoles
=
[
"430"
,
...
...
@@ -144,8 +144,8 @@ class _MyHomePageState extends State<MyHomePage> {
"431"
,
"430"
,
"430"
,
"430"
,
"430"
,
//
"430",
//
"430",
];
final
filteredItems
=
<
Map
<
String
,
String
>>[];
...
...
@@ -204,7 +204,8 @@ class _MyHomePageState extends State<MyHomePage> {
flex:
2
,
child:
SizedBox
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SizedBox
(
...
...
@@ -217,7 +218,8 @@ class _MyHomePageState extends State<MyHomePage> {
child:
CachedNetworkImage
(
cacheKey:
profile
.
profileImage
,
fit:
BoxFit
.
cover
,
imageUrl:
"
${profile.profileImage}
"
,
imageUrl:
"
${profile.profileImage}
"
,
useOldImageOnUrlChange:
false
,
placeholder:
(
context
,
url
)
=>
...
...
@@ -266,7 +268,8 @@ class _MyHomePageState extends State<MyHomePage> {
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
"
${profile.employeeName}
"
,
...
...
@@ -341,7 +344,7 @@ class _MyHomePageState extends State<MyHomePage> {
top:
0
,
bottom:
10
,
),
margin:
EdgeInsets
.
only
(
top:
10
),
margin:
EdgeInsets
.
only
(
top:
10
),
child:
GridView
.
builder
(
itemCount:
filteredItems
.
length
,
gridDelegate:
...
...
@@ -401,7 +404,8 @@ class _MyHomePageState extends State<MyHomePage> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Gentrackerdashboard
(),
(
context
)
=>
Gentrackerdashboard
(),
),
);
break
;
...
...
@@ -429,7 +433,8 @@ class _MyHomePageState extends State<MyHomePage> {
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
InventoryScreen
(),
builder:
(
context
)
=>
InventoryScreen
(),
),
);
break
;
...
...
@@ -443,7 +448,8 @@ class _MyHomePageState extends State<MyHomePage> {
builder:
(
context
)
=>
WebWhizzdomScreen
(
whizzdom_url:
homescreen
.
whizzdomPageUrl
,
homescreen
.
whizzdomPageUrl
,
),
),
);
...
...
@@ -455,7 +461,8 @@ class _MyHomePageState extends State<MyHomePage> {
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Commondashboard
(),
builder:
(
context
)
=>
Commondashboard
(),
),
);
break
;
...
...
@@ -473,7 +480,8 @@ class _MyHomePageState extends State<MyHomePage> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordermoduledashboard
(),
(
context
)
=>
Ordermoduledashboard
(),
),
);
case
"CRM"
:
...
...
@@ -498,10 +506,14 @@ class _MyHomePageState extends State<MyHomePage> {
borderRadius:
BorderRadius
.
circular
(
30
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
item
[
'icon'
]!,
height:
45
),
SvgPicture
.
asset
(
item
[
'icon'
]!,
height:
45
,
),
SizedBox
(
height:
10
),
Text
(
item
[
'name'
]!),
],
...
...
lib/screens/finance/PaymentRequestionListDetails.dart
View file @
b9d7c024
...
...
@@ -32,7 +32,6 @@ class Paymentrequestionlistdetails extends StatefulWidget {
class
_PaymentrequestionlistdetailsState
extends
State
<
Paymentrequestionlistdetails
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
TextEditingController
approvedAmount
=
TextEditingController
();
TextEditingController
remarks
=
TextEditingController
();
...
...
@@ -55,11 +54,9 @@ class _PaymentrequestionlistdetailsState
bool
isLevel2Finalized
=
false
;
// Final decision on whether to show buttons
// Final decision on whether to show buttons
bool
shouldShowButtons
=
false
;
@override
void
initState
()
{
// TODO: implement initState
...
...
@@ -95,7 +92,9 @@ class _PaymentrequestionlistdetailsState
if
(
widget
.
mode
==
"apr_lvl1"
)
{
shouldShowButtons
=
!
isLevel1Finalized
;
}
else
if
(
widget
.
mode
==
"apr_lvl2"
)
{
shouldShowButtons
=
!
isLevel2Finalized
&&
[
shouldShowButtons
=
!
isLevel2Finalized
&&
[
"Requested"
,
"Level 1 Approved"
,
"Level 1 approved"
,
...
...
@@ -109,7 +108,12 @@ class _PaymentrequestionlistdetailsState
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageName
,
provider
.
resetAll
,
SizedBox
(
width:
0
,)),
appBar:
appbar2
(
context
,
widget
.
pageName
,
provider
.
resetAll
,
SizedBox
(
width:
0
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
Container
(
...
...
@@ -199,8 +203,8 @@ class _PaymentrequestionlistdetailsState
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
&&
req_det
.
attachmentViewFileName
==
""
){
if
(
provider
.
Headings
[
j
]
==
"Attachment"
&&
req_det
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
...
...
@@ -301,7 +305,8 @@ class _PaymentrequestionlistdetailsState
),
),
),
floatingActionButton:
([
"admin"
,
"self"
].
contains
(
widget
.
mode
)
||
!
shouldShowButtons
)
floatingActionButton:
([
"admin"
,
"self"
].
contains
(
widget
.
mode
)
||
!
shouldShowButtons
)
?
Container
(
height:
0
)
:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
...
...
@@ -317,7 +322,11 @@ class _PaymentrequestionlistdetailsState
Expanded
(
child:
InkResponse
(
onTap:
()
{
_showLevelRejectionSheet
(
context
);
print
(
provider
.
requestsDetails
.
id
);
_showLevelRejectionSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
},
child:
Container
(
decoration:
BoxDecoration
(
...
...
@@ -340,15 +349,22 @@ class _PaymentrequestionlistdetailsState
),
),
SizedBox
(
width:
10
),
if
([
"apr_lvl1"
,
"apr_lvl2"
].
contains
(
widget
.
mode
))
...[
if
([
"apr_lvl1"
,
"apr_lvl2"
,
].
contains
(
widget
.
mode
))
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
provider
.
approveRejectPaymentRequestAPIFunction
(
provider
.
approveRejectPaymentRequestAPIFunction
(
context
,
provider
.
requestsDetails
.
id
,
);
_showLevelApprovalSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
_showLevelApprovalSheet
(
context
);
},
child:
Container
(
decoration:
BoxDecoration
(
...
...
@@ -370,17 +386,20 @@ class _PaymentrequestionlistdetailsState
),
),
),
]
else
if
(
widget
.
mode
==
"process"
)
...[
]
else
if
(
widget
.
mode
==
"process"
)
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
provider
.
approveRejectPaymentRequestAPIFunction
(
provider
.
approveRejectPaymentRequestAPIFunction
(
context
,
provider
.
requestsDetails
.
id
,
);
provider
.
preValues
();
_showAddPaymentSheet
(
context
);
_showAddPaymentSheet
(
context
,
provider
.
requestsDetails
.
id
,
);
},
child:
Container
(
decoration:
BoxDecoration
(
...
...
@@ -407,7 +426,8 @@ class _PaymentrequestionlistdetailsState
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
// bottomNavigationBar:
// (["admin", "self"].contains(widget.mode))
// ? Container(height: 0)
...
...
@@ -539,7 +559,7 @@ class _PaymentrequestionlistdetailsState
);
}
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
)
{
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
...
...
@@ -561,7 +581,9 @@ class _PaymentrequestionlistdetailsState
right:
15
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
Column
(
...
...
@@ -668,20 +690,26 @@ class _PaymentrequestionlistdetailsState
},
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
paymentAccountSearchController
,
searchController:
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
paymentAccountSearchController
,
controller:
provider
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
),
...
...
@@ -689,21 +717,26 @@ class _PaymentrequestionlistdetailsState
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
),
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
.
clear
();
provider
.
paymentAccountSearchController
.
clear
();
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -715,7 +748,7 @@ class _PaymentrequestionlistdetailsState
.
paymentrequisitionApproveSubmitAPIFunction
(
context
,
widget
.
mode
,
p
rovider
.
paymentsReqDetails
.
id
,
p
aymentID
,
approvedAmount
.
text
,
remarks
.
text
,
provider
.
selectedID
,
...
...
@@ -737,6 +770,8 @@ class _PaymentrequestionlistdetailsState
child:
Center
(
child:
Text
(
"Submit"
,
///approve
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
...
...
@@ -756,7 +791,7 @@ class _PaymentrequestionlistdetailsState
);
}
Future
<
void
>
_showLevelRejectionSheet
(
BuildContext
context
)
{
Future
<
void
>
_showLevelRejectionSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
...
...
@@ -778,7 +813,9 @@ class _PaymentrequestionlistdetailsState
right:
15
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
...
...
@@ -829,7 +866,7 @@ class _PaymentrequestionlistdetailsState
.
paymentrequisitionRejectSubmitAPIFunction
(
context
,
widget
.
mode
,
p
rovider
.
paymentsReqDetails
.
id
,
p
aymentID
,
remarks
.
text
,
);
},
...
...
@@ -849,6 +886,8 @@ class _PaymentrequestionlistdetailsState
child:
Center
(
child:
Text
(
"Submit"
,
///reject
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
...
...
@@ -868,7 +907,7 @@ class _PaymentrequestionlistdetailsState
);
}
Future
<
void
>
_showAddPaymentSheet
(
BuildContext
context
)
{
Future
<
void
>
_showAddPaymentSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
...
...
@@ -890,7 +929,9 @@ class _PaymentrequestionlistdetailsState
right:
15
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
Column
(
...
...
@@ -967,8 +1008,10 @@ class _PaymentrequestionlistdetailsState
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -1138,7 +1181,7 @@ class _PaymentrequestionlistdetailsState
.
paymentrequisitionProcessSubmitAPIFunction
(
context
,
widget
.
mode
,
p
rovider
.
paymentsReqDetails
.
id
,
p
aymentID
,
paymentReferenceNumber
.
text
,
remarks
.
text
,
provider
.
imagePath
,
...
...
@@ -1160,6 +1203,8 @@ class _PaymentrequestionlistdetailsState
child:
Center
(
child:
Text
(
"Submit"
,
///add payment
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
...
...
lib/screens/serviceEngineer/PendingComplaints.dart
View file @
b9d7c024
...
...
@@ -55,7 +55,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
child:
SvgPicture
.
asset
(
"assets/svg/scanner.svg"
),
),
),
body:
SafeArea
(
child:
provider
.
technician_complaint_list
.
isNotEmpty
?
Container
(
body:
SafeArea
(
child:
provider
.
technician_complaint_list
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
...
...
@@ -80,7 +83,8 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
...
...
@@ -152,16 +156,24 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
.
complaintId
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
,),
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
,
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
3
,
(
j
)
{
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
textheads
=
[
"Complaint ID"
,
"Product Name"
,
"Engine Number"
,
"Address"
,
];
final
textSubheads
=
[
...
...
@@ -171,12 +183,17 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
provider
.
technician_complaint_list
[
index
]
.
productName
,
provider
.
technician_complaint_list
[
index
]
.
engineNo
,
provider
.
technician_complaint_list
[
index
]
.
address
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -219,14 +236,16 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
);
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
fontFamily:
"JakartaMedium"
,
),
),
SizedBox
(
width:
5
),
...
...
@@ -241,7 +260,9 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
);
},
),
):
Emptywidget
(
context
),)
)
:
Emptywidget
(
context
),
),
),
);
},
...
...
@@ -346,9 +367,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
leading:
SvgPicture
.
asset
(
"assets/svg/
${assetnames[index]}
.svg"
,
),
title:
Text
(
Headingnames
[
index
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),),
title:
Text
(
Headingnames
[
index
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
),
trailing:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
...
...
lib/screens/serviceEngineer/UpdateComplaints.dart
View file @
b9d7c024
...
...
@@ -10,7 +10,7 @@ import '../../Utils/dropdownTheme.dart';
class
Updatecomplaints
extends
StatefulWidget
{
final
ComplaintID
;
const
Updatecomplaints
({
super
.
key
,
required
this
.
ComplaintID
});
const
Updatecomplaints
({
super
.
key
,
required
this
.
ComplaintID
});
@override
State
<
Updatecomplaints
>
createState
()
=>
_UpdatecomplaintsState
();
...
...
@@ -18,14 +18,17 @@ class Updatecomplaints extends StatefulWidget {
class
_UpdatecomplaintsState
extends
State
<
Updatecomplaints
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
@override
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Pendingcomplaintsprovider
>(
context
,
listen:
false
);
final
provider
=
Provider
.
of
<
Pendingcomplaintsprovider
>(
context
,
listen:
false
,
);
provider
.
checkDropDownSelected
();
}
,
);
});
}
@override
...
...
@@ -40,14 +43,19 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Update Complaint"
,
provider
.
resetAll
,
SizedBox
(
width:
0
,)),
appBar:
appbar2
(
context
,
"Update Complaint"
,
provider
.
resetAll
,
SizedBox
(
width:
0
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SafeArea
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
)
borderRadius:
BorderRadius
.
circular
(
20
)
,
),
child:
SingleChildScrollView
(
child:
Column
(
...
...
@@ -77,15 +85,14 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Expanded
(
child:
Text
(
'Select Complaint Status'
,
style:
TextStyle
(
fontSize:
14
,
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
),
],
),
items:
provider
.
CompletedStatus
.
map
(
items:
provider
.
CompletedStatus
.
map
(
(
complaintStatus
)
=>
DropdownMenuItem
<
String
>(
value:
complaintStatus
[
'name'
],
...
...
@@ -96,7 +103,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
overflow:
TextOverflow
.
ellipsis
,
),
)).
toList
(),
),
).
toList
(),
value:
provider
.
statusID
,
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
...
...
@@ -114,10 +122,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
],
),
),
SizedBox
(
height:
5
,
),
SizedBox
(
height:
5
),
ErrorWidget
(
context
,
provider
.
statusError
),
if
(
provider
.
statusID
!=
null
)...[
if
(
provider
.
statusID
!=
"Pending"
)...[
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
...
...
@@ -134,51 +140,41 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
provider
.
fsrNumberController
,
keyboardType:
TextInputType
.
text
,
controller:
provider
.
fsrNumberController
,
keyboardType:
TextInputType
.
text
,
onChanged:
(
value
)
{
provider
.
fsrError
=
""
;
},
decoration:
InputDecoration
(
hintText:
"Enter FSR Number"
,
hintText:
"Enter FSR Number"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
SizedBox
(
height:
5
,),
ErrorWidget
(
context
,
provider
.
fsrError
)
]
],
SizedBox
(
height:
5
),
ErrorWidget
(
context
,
provider
.
fsrError
),
Row
(
children:
[
Expanded
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
5.0
,
vertical:
3
),
horizontal:
5.0
,
vertical:
3
,
),
child:
Text
(
"Select Time"
,
style:
TextStyle
(
...
...
@@ -191,7 +187,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Expanded
(
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
20.0
),
horizontal:
20.0
,
),
child:
Text
(
"Running Hours"
,
style:
TextStyle
(
...
...
@@ -201,7 +198,6 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
],
),
...
...
@@ -211,8 +207,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child:
Container
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
InkWell
(
onTap:
()
{
...
...
@@ -221,31 +216,33 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child:
Container
(
alignment:
Alignment
.
center
,
height:
45
,
margin:
EdgeInsets
.
only
(
left:
15.0
,
right:
15.0
),
margin:
EdgeInsets
.
only
(
left:
15.0
,
right:
15.0
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
15.0
),
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Row
(
children:
[
child:
Row
(
children:
[
Text
(
provider
.
selectedTime
.
hour
.
toString
()
+
provider
.
selectedTime
.
hour
.
toString
()
+
":"
+
provider
.
selectedTime
.
minute
.
toString
()
??
"Enter in Time"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w400
),
fontWeight:
FontWeight
.
w400
,
),
),
],
),
),
]),
),
)),
),
SizedBox
(
width:
10
,),
),
SizedBox
(
width:
10
),
Expanded
(
child:
Container
(
height:
50
,
...
...
@@ -253,36 +250,31 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
,
),
child:
TextFormField
(
controller:
provider
.
runningHoursController
,
keyboardType:
TextInputType
.
text
,
controller:
provider
.
runningHoursController
,
keyboardType:
TextInputType
.
text
,
onChanged:
(
value
)
{
provider
.
runningHoursError
=
""
;
},
decoration:
InputDecoration
(
hintText:
"Enter Running Hours"
,
hintText:
"Enter Running Hours"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
...
...
@@ -290,11 +282,15 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
],
),
Row
(
children:
[
Expanded
(
child:
SizedBox
()),
SizedBox
(
width:
10
,),
Expanded
(
child:
ErrorWidget
(
context
,
provider
.
runningHoursError
)),
SizedBox
(
width:
10
),
Expanded
(
child:
ErrorWidget
(
context
,
provider
.
runningHoursError
,
),
),
],
),
InkResponse
(
...
...
@@ -304,44 +300,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
),
height:
45
,
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
)
color:
AppColors
.
app_blue
,
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Scan Document"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
),
child:
Text
(
"Scan Document"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
),),
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
)
)
,
],
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
...
...
@@ -359,47 +364,39 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
controller:
provider
.
feedbackController
,
controller:
provider
.
feedbackController
,
maxLines:
60
,
keyboardType:
TextInputType
.
text
,
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
hintText:
"Enter Feedback"
,
hintText:
"Enter Feedback"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
fontSize:
14
fontSize:
14
,
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
),
),
),
),
],
),
),
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkResponse
(
onTap:
provider
.
submitLoading
?
null
:
()
{
onTap:
provider
.
submitLoading
?
null
:
()
{
provider
.
submitLoading
=
true
;
provider
.
UpdateComplaintAPIFunction
(
context
,
...
...
@@ -407,7 +404,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
provider
.
feedbackController
.
text
,
provider
.
fsrNumberController
.
text
,
provider
.
runningHoursController
.
text
,
provider
.
statusID
);
provider
.
statusID
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
...
...
@@ -423,32 +421,38 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Center
(
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
white
)
):
Text
(
AppColors
.
white
,
),
)
:
Text
(
"Submit"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
color:
Colors
.
white
,
),
),
),
),
),
),
);
},);
},
);
}
Widget
ErrorWidget
(
context
,
text
)
{
if
(
text
!=
null
)
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
else
return
SizedBox
(
height:
10
);
}
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -465,15 +469,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child:
Consumer
<
Pendingcomplaintsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Padding
(
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
MediaQuery
.
of
(
context
,
)
.
viewInsets
.
bottom
,
// This handles keyboard
).
viewInsets
.
bottom
,
// This handles keyboard
),
child:
Container
(
margin:
EdgeInsets
.
only
(
...
...
@@ -494,11 +494,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
"Select Source"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
fontSize:
16
,
),
),
),
SizedBox
(
height:
15
,
),
SizedBox
(
height:
15
),
InkWell
(
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
...
...
@@ -513,8 +513,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
InkWell
(
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
(
);
provider
.
imgFromCamera
();
},
child:
Container
(
height:
35
,
...
...
@@ -534,5 +533,4 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},
);
}
}
lib/screens/serviceEngineer/VisitDetails.dart
View file @
b9d7c024
...
...
@@ -51,8 +51,14 @@ class _VisitdetailsState extends State<Visitdetails> {
children:
[
Text
(
"Customer Details"
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
...
...
@@ -67,13 +73,12 @@ class _VisitdetailsState extends State<Visitdetails> {
"Mail ID"
,
];
final
textSubheads
=
[
customerDetails
.
aname
??
"-"
,
customerDetails
.
mob1
??
"-"
,
customerDetails
.
mob2
??
"-"
,
customerDetails
.
mail
??
"-"
,
customerDetails
.
aname
??
"-"
,
customerDetails
.
mob1
??
"-"
,
customerDetails
.
mob2
??
"-"
,
customerDetails
.
mail
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
0
,
...
...
@@ -94,9 +99,11 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textheads
[
j
].
toString
(),
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
overflow:
TextOverflow
.
ellipsis
,
),
SizedBox
(
// height:45,
width:
...
...
@@ -105,11 +112,11 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
0.75
,
child:
Text
(
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
textSubheads
[
j
]
==
""
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
...
...
@@ -128,8 +135,14 @@ class _VisitdetailsState extends State<Visitdetails> {
Text
(
"Generator Details"
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
...
...
@@ -159,7 +172,9 @@ class _VisitdetailsState extends State<Visitdetails> {
"
${complaintDetails.dateOfSupply}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Column
(
children:
[
Row
(
...
...
@@ -175,7 +190,9 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textheads
[
j
].
toString
()),
Text
(
textheads
[
j
].
toString
(),
),
SizedBox
(
// height:45,
width:
...
...
@@ -184,12 +201,17 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
0.8
,
child:
Text
(
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
textSubheads
[
j
]
==
""
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
,
),
),
),
),
...
...
@@ -211,8 +233,14 @@ class _VisitdetailsState extends State<Visitdetails> {
Text
(
"Complaint Details"
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
...
...
@@ -221,7 +249,6 @@ class _VisitdetailsState extends State<Visitdetails> {
children:
[
Row
(
children:
[
SvgPicture
.
asset
(
"assetName"
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
4
,
(
j
)
{
...
...
@@ -238,7 +265,9 @@ class _VisitdetailsState extends State<Visitdetails> {
"
${complaintDetails.complaintType}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Column
(
children:
[
Row
(
...
...
@@ -254,7 +283,9 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
textheads
[
j
].
toString
()),
Text
(
textheads
[
j
].
toString
(),
),
SizedBox
(
// height:45,
width:
...
...
@@ -263,12 +294,17 @@ class _VisitdetailsState extends State<Visitdetails> {
).
size
.
width
*
0.8
,
child:
Text
(
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
textSubheads
[
j
]
==
""
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
,
),
),
),
),
...
...
@@ -320,8 +356,10 @@ class _VisitdetailsState extends State<Visitdetails> {
child:
Text
(
"Followup Details"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
),
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
...
...
lib/services/api_calling.dart
View file @
b9d7c024
...
...
@@ -391,7 +391,13 @@ class ApiCalling {
// return null;
// }
if
(
check_out_pic
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
employeeCheckOutUrl
,
check_out_pic
,
'check_out_pic'
);
res
=
await
postImageNew
(
data
,
{},
employeeCheckOutUrl
,
check_out_pic
,
'check_out_pic'
,
);
res
=
jsonDecode
(
res
);
}
else
{
res
=
await
post
(
data
,
employeeCheckOutUrl
,
{});
...
...
@@ -943,7 +949,13 @@ class ApiCalling {
// }
if
(
payment_proof
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
technicianAddPaymentCollectionUrl
,
payment_proof
,
'payment_proof'
);
res
=
await
postImageNew
(
data
,
{},
technicianAddPaymentCollectionUrl
,
payment_proof
,
'payment_proof'
,
);
res
=
jsonDecode
(
res
);
return
TechnicianAddPaymentCollectionResponse
.
fromJson
(
res
);
}
else
{
...
...
@@ -1150,7 +1162,13 @@ class ApiCalling {
// print(fsr_file);
var
res
;
if
(
fsr_file
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
technicianUpdateVisitUrl
,
fsr_file
,
'fsr_file'
);
res
=
await
postImageNew
(
data
,
{},
technicianUpdateVisitUrl
,
fsr_file
,
'fsr_file'
,
);
res
=
jsonDecode
(
res
);
return
UpdateComplaintResponse
.
fromJson
(
res
);
}
else
{
...
...
@@ -1327,7 +1345,6 @@ class ApiCalling {
var
res
;
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
...
...
@@ -1469,14 +1486,12 @@ class ApiCalling {
"attachment"
,
);
res
=
jsonDecode
(
res
);
}
else
{
res
=
await
post
(
data
,
addPaymentReceiptSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
// return addReceiptPaymentResponse.fromJson(res);
}
return
addReceiptPaymentResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
...
...
@@ -1665,6 +1680,7 @@ class ApiCalling {
"attachment"
,
);
res
=
jsonDecode
(
res
);
print
(
data
);
return
approveRejectPaymentRequestResponse
.
fromJson
(
res
);
}
else
{
res
=
await
post
(
data
,
approveRejectPaymentRequestSubmitUrl
,
{});
...
...
@@ -2091,12 +2107,10 @@ class ApiCalling {
}
}
static
Future
<
AddOrderViewResponse
?>
addOrderViewAPI
(
empId
,
session
,
mode
mode
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2121,7 +2135,7 @@ class ApiCalling {
static
Future
<
addOrderAccontDetailsResponse
?>
addOrderAccountDetailsAPI
(
empId
,
session
,
account_id
account_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2147,13 +2161,13 @@ class ApiCalling {
empId
,
session
,
mode
,
text
text
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
mode
.
toString
(),
'mode'
:
mode
.
toString
(),
'text'
:
(
text
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersAddOrderTpcAgentListUrl
,
{});
...
...
@@ -2206,64 +2220,56 @@ class ApiCalling {
loc
,
requested_tpc_amount
,
tpc_agent_id
,
po
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'mode'
:
mode
.
toString
(),
'sales_person_emp_id'
:
sales_person_emp_id
.
toString
(),
'selected_acc_id'
:
selected_acc_id
.
toString
(),
'dispatch_state_id'
:
dispatch_state_id
.
toString
(),
'dispatch_district_id'
:
dispatch_district_id
.
toString
(),
'dispatch_sub_location_id'
:
dispatch_sub_location_id
.
toString
(),
'dispatch_pincode'
:
dispatch_pincode
.
toString
(),
'dispatch_address'
:
dispatch_address
.
toString
(),
'basic_amount'
:
basic_amount
.
toString
(),
'cgst_amount'
:
cgst_amount
.
toString
(),
'sgst_amount'
:
sgst_amount
.
toString
(),
'igst_amount'
:
igst_amount
.
toString
(),
'total_amount'
:
total_amount
.
toString
(),
'order_received_date'
:
order_received_date
.
toString
(),
'note'
:
note
.
toString
(),
'unloading'
:
unloading
.
toString
(),
'freight'
:
freight
.
toString
(),
'erection'
:
erection
.
toString
(),
'tpc_applicable'
:
tpc_applicable
.
toString
(),
'billing_name'
:
billing_name
.
toString
(),
'billing_gst_no'
:
billing_gst_no
.
toString
(),
'billing_pincode'
:
billing_pincode
.
toString
(),
'billing_address'
:
billing_address
.
toString
(),
'billing_state'
:
billing_state
.
toString
(),
'billing_district'
:
billing_district
.
toString
(),
'billing_sub_locality'
:
billing_sub_locality
.
toString
(),
'order_products'
:
jsonEncode
(
order_products
).
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'feedback'
:
feedback
.
toString
(),
'in_time'
:
in_time
.
toString
(),
'loc'
:
loc
.
toString
(),
'requested_tpc_amount'
:
requested_tpc_amount
.
toString
(),
'tpc_agent_id'
:
tpc_agent_id
.
toString
(),
po
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'mode'
:
mode
.
toString
(),
'sales_person_emp_id'
:
sales_person_emp_id
.
toString
(),
'selected_acc_id'
:
selected_acc_id
.
toString
(),
'dispatch_state_id'
:
dispatch_state_id
.
toString
(),
'dispatch_district_id'
:
dispatch_district_id
.
toString
(),
'dispatch_sub_location_id'
:
dispatch_sub_location_id
.
toString
(),
'dispatch_pincode'
:
dispatch_pincode
.
toString
(),
'dispatch_address'
:
dispatch_address
.
toString
(),
'basic_amount'
:
basic_amount
.
toString
(),
'cgst_amount'
:
cgst_amount
.
toString
(),
'sgst_amount'
:
sgst_amount
.
toString
(),
'igst_amount'
:
igst_amount
.
toString
(),
'total_amount'
:
total_amount
.
toString
(),
'order_received_date'
:
order_received_date
.
toString
(),
'note'
:
note
.
toString
(),
'unloading'
:
unloading
.
toString
(),
'freight'
:
freight
.
toString
(),
'erection'
:
erection
.
toString
(),
'tpc_applicable'
:
tpc_applicable
.
toString
(),
'billing_name'
:
billing_name
.
toString
(),
'billing_gst_no'
:
billing_gst_no
.
toString
(),
'billing_pincode'
:
billing_pincode
.
toString
(),
'billing_address'
:
billing_address
.
toString
(),
'billing_state'
:
billing_state
.
toString
(),
'billing_district'
:
billing_district
.
toString
(),
'billing_sub_locality'
:
billing_sub_locality
.
toString
(),
'order_products'
:
jsonEncode
(
order_products
).
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'feedback'
:
feedback
.
toString
(),
'in_time'
:
in_time
.
toString
(),
'loc'
:
loc
.
toString
(),
'requested_tpc_amount'
:
requested_tpc_amount
.
toString
(),
'tpc_agent_id'
:
tpc_agent_id
.
toString
(),
};
var
res
;
print
(
data
);
if
(
po
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
ordersAddOrderSubmitUrl
,
po
,
"po"
,
);
res
=
await
postImageNew
(
data
,
{},
ordersAddOrderSubmitUrl
,
po
,
"po"
);
res
=
jsonDecode
(
res
);
}
else
{
res
=
await
post
(
data
,
ordersAddOrderSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
}
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
...
...
@@ -2273,7 +2279,7 @@ class ApiCalling {
static
Future
<
ordersListByModeFilterResponse
?>
ordersListByModeFilterAPI
(
empId
,
session
,
mode
mode
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2300,7 +2306,7 @@ class ApiCalling {
session
,
mode
,
teamemployee
,
status
status
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2328,7 +2334,7 @@ class ApiCalling {
static
Future
<
ordersDetailsByModeResponse
?>
ordersDetailsByModeAPI
(
empId
,
session
,
order_id
order_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2351,8 +2357,7 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
ordersDetailsFeedbackSubmissionAPI
(
static
Future
<
CommonResponse
?>
ordersDetailsFeedbackSubmissionAPI
(
empId
,
session
,
order_id
,
...
...
@@ -2404,25 +2409,25 @@ class ApiCalling {
vehicle_number
,
driver_name
,
driver_mobile_no
,
crm_order_p_id
crm_order_p_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"status"
:
status
.
toString
(),
"type"
:
type
.
toString
(),
"order_id"
:
order_id
.
toString
(),
"feedback"
:
feedback
.
toString
(),
"tpc_applicable"
:
tpc_applicable
.
toString
(),
"tpc_approved_amount"
:
tpc_approved_amount
.
toString
(),
"sale_order_number"
:
sale_order_number
.
toString
(),
"edit_company_name"
:
edit_company_name
.
toString
(),
"invoice_number"
:
invoice_number
.
toString
(),
"vehicle_number"
:
vehicle_number
.
toString
(),
"driver_name"
:
driver_name
.
toString
(),
"driver_mobile_no"
:
driver_mobile_no
.
toString
(),
"crm_order_p_id"
:
crm_order_p_id
.
toString
()
"status"
:
status
.
toString
(),
"type"
:
type
.
toString
(),
"order_id"
:
order_id
.
toString
(),
"feedback"
:
feedback
.
toString
(),
"tpc_applicable"
:
tpc_applicable
.
toString
(),
"tpc_approved_amount"
:
tpc_approved_amount
.
toString
(),
"sale_order_number"
:
sale_order_number
.
toString
(),
"edit_company_name"
:
edit_company_name
.
toString
(),
"invoice_number"
:
invoice_number
.
toString
(),
"vehicle_number"
:
vehicle_number
.
toString
(),
"driver_name"
:
driver_name
.
toString
(),
"driver_mobile_no"
:
driver_mobile_no
.
toString
(),
"crm_order_p_id"
:
crm_order_p_id
.
toString
()
,
};
final
res
=
await
post
(
data
,
ordersOrderApproveRejectUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2443,14 +2448,14 @@ class ApiCalling {
empId
,
session
,
order_id
,
feedback
feedback
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"order_id"
:
order_id
.
toString
(),
"feedback"
:
feedback
.
toString
(),
"order_id"
:
order_id
.
toString
(),
"feedback"
:
feedback
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersOrderLDeleteUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2500,19 +2505,19 @@ class ApiCalling {
payment_date
,
payment_type
,
ref_no
,
attachment
attachment
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account_id
.
toString
(),
'description'
:
description
.
toString
(),
'selected_orders'
:
jsonEncode
(
selected_orders
).
toString
(),
'payment_amount'
:
payment_amount
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
'account_id'
:
account_id
.
toString
(),
'description'
:
description
.
toString
(),
'selected_orders'
:
jsonEncode
(
selected_orders
).
toString
(),
'payment_amount'
:
payment_amount
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
};
var
res
;
print
(
data
);
...
...
@@ -2531,12 +2536,12 @@ class ApiCalling {
// return CommonResponse.fromJson(res);
}
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
CommonResponse
?>
ordersEditPaymentDetailsAPI
(
empId
,
session
,
...
...
@@ -2545,34 +2550,34 @@ class ApiCalling {
payment_type
,
ref_no
,
payment_date
,
amount
amount
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'description'
:
description
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
'amount'
:
amount
.
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'description'
:
description
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
'amount'
:
amount
.
toString
(),
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersViewAPI
(
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersViewAPI
(
empId
,
session
,
payment_id
,
...
...
@@ -2581,70 +2586,79 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'payment_id'
:
payment_id
.
toString
(),
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersViewUrl
,
{});
if
(
res
!=
null
)
{
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersViewUrl
,
{},
);
if
(
res
!=
null
)
{
print
(
"edit adjusted :
${res.body}
"
);
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersUpdateAPI
(
static
Future
<
EditPaymentDetailsAdjustedOrdersViewResponse
?>
ordersEditPaymentDetailsAdjustedOrdersUpdateAPI
(
empId
,
session
,
payment_id
,
update_amounts
,
insert_amounts
insert_amounts
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'update_amounts'
:
jsonEncode
(
update_amounts
).
toString
(),
'insert_amounts'
:
jsonEncode
(
insert_amounts
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'update_amounts'
:
jsonEncode
(
update_amounts
).
toString
(),
'insert_amounts'
:
jsonEncode
(
insert_amounts
).
toString
(),
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsAdjustedOrdersUrl
,
{});
if
(
res
!=
null
)
{
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
if
(
res
!=
null
)
{
return
EditPaymentDetailsAdjustedOrdersViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
AddOrderPaymentSelectAccountAPI
(
empId
,
session
,
mode
,
search_term
)
async
{
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
AddOrderPaymentSelectAccountAPI
(
empId
,
session
,
mode
,
search_term
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
mode
.
toString
(),
'search_term'
:
search_term
.
toString
(),
'mode'
:
mode
.
toString
(),
'search_term'
:
search_term
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersAddPaymentSelectAccountForOrderUrl
,
{});
final
res
=
await
post
(
data
,
ordersAddPaymentSelectAccountForOrderUrl
,
{},
);
if
(
res
!=
null
)
{
print
(
data
);
print
(
"PaymentSeralectAccount
${res.body}
"
);
return
AddOrderPaymentSelectAccountResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
AddOrderPaymentSelectAccountResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
@@ -2655,22 +2669,21 @@ class ApiCalling {
}
}
static
Future
<
AddOrderPaymentSelectOrderResponse
?>
AddOrderPaymentSelectOrderAPI
(
empId
,
session
,
account_id
,
)
async
{
static
Future
<
AddOrderPaymentSelectOrderResponse
?>
AddOrderPaymentSelectOrderAPI
(
empId
,
session
,
account_id
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account_id
.
toString
(),
'account_id'
:
account_id
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersAddPaymentSelectOrderUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
"add order payment selected order:
${res.body}
"
);
return
AddOrderPaymentSelectOrderResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
AddOrderPaymentSelectOrderResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
@@ -2684,7 +2697,7 @@ class ApiCalling {
static
Future
<
paymentListByModeFilterResponse
?>
paymentListByModeFilterAPI
(
empId
,
session
,
mode
mode
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2739,15 +2752,15 @@ class ApiCalling {
session
,
payment_id
,
type
,
remarks
remarks
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"payment_id"
:
payment_id
.
toString
(),
"type"
:
type
.
toString
(),
"remarks"
:
remarks
.
toString
()
"payment_id"
:
payment_id
.
toString
(),
"type"
:
type
.
toString
(),
"remarks"
:
remarks
.
toString
()
,
};
final
res
=
await
post
(
data
,
ordersPaymentListApproveRejectUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2773,7 +2786,7 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
"payment_id"
:
payment_id
.
toString
(),
"payment_id"
:
payment_id
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersPaymentListDeleteUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -2790,11 +2803,10 @@ class ApiCalling {
}
}
static
Future
<
paymentDetailsByModeFilterResponse
?>
paymentsDetailsByModeAPI
(
empId
,
session
,
payment_id
payment_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2806,7 +2818,9 @@ class ApiCalling {
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
paymentDetailsByModeFilterResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
paymentDetailsByModeFilterResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
@@ -2817,9 +2831,7 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
ordersAddTPCAgentAPI
(
static
Future
<
CommonResponse
?>
ordersAddTPCAgentAPI
(
empId
,
session
,
agent_name
,
...
...
@@ -2835,13 +2847,13 @@ class ApiCalling {
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'agent_name'
:
agent_name
.
toString
(),
'mobile_number'
:
mobile_number
.
toString
(),
'bank_name'
:
bank_name
.
toString
(),
'bank_account_no'
:
bank_account_no
.
toString
(),
'bank_ifsc_code'
:
bank_ifsc_code
.
toString
(),
'bank_beneficiary_name'
:
bank_beneficiary_name
.
toString
(),
'note'
:
note
.
toString
(),
'agent_name'
:
agent_name
.
toString
(),
'mobile_number'
:
mobile_number
.
toString
(),
'bank_name'
:
bank_name
.
toString
(),
'bank_account_no'
:
bank_account_no
.
toString
(),
'bank_ifsc_code'
:
bank_ifsc_code
.
toString
(),
'bank_beneficiary_name'
:
bank_beneficiary_name
.
toString
(),
'note'
:
note
.
toString
(),
};
var
res
;
if
(
id_proof
!=
null
)
{
...
...
@@ -2865,11 +2877,7 @@ class ApiCalling {
}
}
static
Future
<
TPCListResponse
?>
TPCAgentListAPI
(
empId
,
session
,
mode
)
async
{
static
Future
<
TPCListResponse
?>
TPCAgentListAPI
(
empId
,
session
,
mode
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
...
...
@@ -2894,7 +2902,7 @@ class ApiCalling {
static
Future
<
TPCAgentDetailsResponse
?>
TPCAgentDetailsAPI
(
empId
,
session
,
tpc_agent_id
tpc_agent_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -2941,7 +2949,6 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
TpcIssueListApprovalAPI
(
empId
,
session
,
...
...
@@ -2949,16 +2956,16 @@ class ApiCalling {
tpc_payment_reference_no
,
order_id
,
order_tpc_feedback
,
tpc_paym_attachment
tpc_paym_attachment
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'tpc_payment_mode'
:
tpc_payment_mode
.
toString
(),
'tpc_payment_reference_no'
:
tpc_payment_reference_no
.
toString
(),
'order_id'
:
order_id
.
toString
(),
'order_tpc_feedback'
:
order_tpc_feedback
.
toString
(),
'tpc_payment_mode'
:
tpc_payment_mode
.
toString
(),
'tpc_payment_reference_no'
:
tpc_payment_reference_no
.
toString
(),
'order_id'
:
order_id
.
toString
(),
'order_tpc_feedback'
:
order_tpc_feedback
.
toString
(),
};
var
res
;
if
(
tpc_paym_attachment
!=
null
)
{
...
...
@@ -2985,7 +2992,7 @@ class ApiCalling {
///CRM Module
static
Future
<
AccessiblePagesResponse
?>
crmAccessiblePagesAPI
(
empId
,
session
session
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3010,7 +3017,7 @@ class ApiCalling {
static
Future
<
LeadListViewResponse
?>
crmLeadListViewAPI
(
empId
,
session
,
mode
mode
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3035,7 +3042,8 @@ class ApiCalling {
static
Future
<
SubmitLeadListFilterResponse
?>
crmLeadListFilterSubmitAPI
(
empId
,
session
,
mode
,
session
,
mode
,
teamemployee
,
slead_id
,
status
,
...
...
@@ -3055,19 +3063,19 @@ class ApiCalling {
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'teamemployee'
:
teamemployee
.
toString
(),
'slead_id'
:
slead_id
.
toString
(),
'status'
:
status
.
toString
(),
'open_status'
:
open_status
.
toString
(),
'mob'
:
mob
.
toString
(),
'com'
:
com
.
toString
(),
'source'
:
source
.
toString
(),
'reference'
:
reference
.
toString
(),
'team'
:
team
.
toString
(),
'segment'
:
segment
.
toString
(),
'state'
:
state
.
toString
(),
'district'
:
district
.
toString
(),
'sub_loc'
:
sub_loc
.
toString
(),
'teamemployee'
:
teamemployee
.
toString
(),
'slead_id'
:
slead_id
.
toString
(),
'status'
:
status
.
toString
(),
'open_status'
:
open_status
.
toString
(),
'mob'
:
mob
.
toString
(),
'com'
:
com
.
toString
(),
'source'
:
source
.
toString
(),
'reference'
:
reference
.
toString
(),
'team'
:
team
.
toString
(),
'segment'
:
segment
.
toString
(),
'state'
:
state
.
toString
(),
'district'
:
district
.
toString
(),
'sub_loc'
:
sub_loc
.
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadListFilterSubmitUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3086,7 +3094,8 @@ class ApiCalling {
static
Future
<
GetSourceOnReferenceResponse
?>
crmLeadListSourceOnReferenceAPI
(
empId
,
session
,
source_id
session
,
source_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3111,7 +3120,8 @@ class ApiCalling {
static
Future
<
GetSegmentOnTeamResponse
?>
crmLeadListSegmentOnTeamAPI
(
empId
,
session
,
team_id
session
,
team_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3136,7 +3146,8 @@ class ApiCalling {
static
Future
<
GetDistrictOnStateResponse
?>
crmDistrictsOnStateAPI
(
empId
,
session
,
state_id
session
,
state_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3161,7 +3172,8 @@ class ApiCalling {
static
Future
<
GetSubLocOnDistrictResponse
?>
crmSubLocOnDistrictAPI
(
empId
,
session
,
district_id
session
,
district_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3186,7 +3198,8 @@ class ApiCalling {
static
Future
<
LeadListContactPopUpResponse
?>
crmLeadListContactPopUpAPI
(
empId
,
session
,
account_id
session
,
account_id
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -3213,14 +3226,14 @@ class ApiCalling {
empId
,
session
,
lead_id
,
mode
mode
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead_id
).
toString
(),
'mode'
:(
mode
).
toString
()
'mode'
:
(
mode
).
toString
()
,
};
final
res
=
await
post
(
data
,
crmLeadDetailsUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3246,19 +3259,19 @@ class ApiCalling {
designation
,
mob2
,
tel
,
email
email
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'acc_id'
:
(
acc_id
).
toString
(),
'name'
:(
name
).
toString
(),
'mob1'
:(
mob1
).
toString
(),
'designation'
:(
designation
).
toString
(),
'mob2'
:(
mob2
).
toString
(),
'tel'
:(
tel
).
toString
(),
'email'
:(
email
).
toString
(),
'name'
:
(
name
).
toString
(),
'mob1'
:
(
mob1
).
toString
(),
'designation'
:
(
designation
).
toString
(),
'mob2'
:
(
mob2
).
toString
(),
'tel'
:
(
tel
).
toString
(),
'email'
:
(
email
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsAddContactUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3284,19 +3297,19 @@ class ApiCalling {
designation
,
mob2
,
tel
,
email
email
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'contact_id'
:
(
contact_id
).
toString
(),
'name'
:(
name
).
toString
(),
'mob1'
:(
mob1
).
toString
(),
'designation'
:(
designation
).
toString
(),
'mob2'
:(
mob2
).
toString
(),
'tel'
:(
tel
).
toString
(),
'email'
:(
email
).
toString
(),
'name'
:
(
name
).
toString
(),
'mob1'
:
(
mob1
).
toString
(),
'designation'
:
(
designation
).
toString
(),
'mob2'
:
(
mob2
).
toString
(),
'tel'
:
(
tel
).
toString
(),
'email'
:
(
email
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsEditContactUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3326,9 +3339,9 @@ class ApiCalling {
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead_id
).
toString
(),
'appointment_date'
:(
appointment_date
).
toString
(),
'type'
:(
type
).
toString
(),
'note'
:(
note
).
toString
(),
'appointment_date'
:
(
appointment_date
).
toString
(),
'type'
:
(
type
).
toString
(),
'note'
:
(
note
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsAddAppointmentUrl
,
{});
if
(
res
!=
null
)
{
...
...
@@ -3345,7 +3358,6 @@ class ApiCalling {
}
}
// static Future<CommonResponse?> TpcIssueListApprovalAPI(
// empId,
// session,
...
...
pubspec.lock
View file @
b9d7c024
...
...
@@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: async
sha256:
d2872f9c1
97
3
1c
2
e5
f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
sha256:
"758e6d74e
971c
3
e5
aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.1
2
.0"
version: "2.1
3
.0"
barcode:
dependency: transitive
description:
...
...
@@ -285,10 +285,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "
6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc
"
sha256: "
5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44
"
url: "https://pub.dev"
source: hosted
version: "1.3.
2
"
version: "1.3.
3
"
ffi:
dependency: transitive
description:
...
...
@@ -932,26 +932,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256:
c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
sha256:
"8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.dev"
source: hosted
version: "1
0
.0.
8
"
version: "1
1
.0.
1
"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256:
f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
sha256:
"1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.
9
"
version: "3.0.
10
"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "
6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3
"
sha256: "
8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1
"
url: "https://pub.dev"
source: hosted
version: "3.0.
1
"
version: "3.0.
2
"
lints:
dependency: transitive
description:
...
...
@@ -1657,10 +1657,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256:
"0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
sha256:
ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev"
source: hosted
version: "1
4.3.1
"
version: "1
5.0.0
"
web:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
b9d7c024
...
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.8
7
+9
1
version
:
1.0.8
8
+9
2
environment
:
sdk
:
^3.7.2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment