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
7210793a
Commit
7210793a
authored
Sep 17, 2025
by
Sai Srinivas
Browse files
17-09
parent
185e0896
Changes
285
Show whitespace changes
Inline
Side-by-side
lib/screens/order/editOrderAccountDetails.dart
View file @
7210793a
...
...
@@ -19,16 +19,22 @@ class Editorderaccountdetails extends StatefulWidget {
final
mode
;
final
orderID
;
const
Editorderaccountdetails
({
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
mode
,
required
this
.
orderID
});
const
Editorderaccountdetails
({
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
mode
,
required
this
.
orderID
,
});
@override
State
<
Editorderaccountdetails
>
createState
()
=>
_EditorderaccountdetailsState
();
State
<
Editorderaccountdetails
>
createState
()
=>
_EditorderaccountdetailsState
();
}
class
_EditorderaccountdetailsState
extends
State
<
Editorderaccountdetails
>
{
FocusNode
focusNode
=
FocusNode
();
FocusNode
focusNodetpc
=
FocusNode
();
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
5
,
(
index
)
=>
FocusNode
()
,
);
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
5
,
(
index
)
=>
FocusNode
());
Dropdowntheme
ddtheme
=
Dropdowntheme
();
@override
void
initState
()
{
...
...
@@ -43,7 +49,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
@override
void
dispose
()
{
focusNodes
.
map
((
e
)=>
e
.
dispose
());
focusNodes
.
map
((
e
)
=>
e
.
dispose
());
super
.
dispose
();
}
...
...
@@ -59,7 +65,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
return
WillPopScope
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
...
...
@@ -68,7 +74,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
(
width:
0
),
0xFFFFFFFF
0xFFFFFFFF
,
),
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
...
...
@@ -80,7 +86,6 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextWidget
(
context
,
"Dispatch State"
),
DropdownButtonHideUnderline
(
child:
Row
(
...
...
@@ -111,14 +116,17 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
onChanged:
(
States
?
value
)
{
if
(
provider
.
dispatchStates
.
isNotEmpty
)
{
provider
.
selecetdDispatchStates
=
value
;
provider
.
selectedDispatchStateID
=
value
!.
id
!;
provider
.
selectedDispatchStateID
=
value
!.
id
!;
provider
.
selectedDispatchStateName
=
value
!
.
name
!;
value
.
name
!;
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
provider
.
dispatchDistricts
.
clear
();
// provider.selectedDispatchDistricts = null;
provider
.
selectedDispatchDistrictId
=
null
;
provider
.
selectedDispatchDistrictValue
=
""
;
provider
.
selectedDispatchDistrictId
=
null
;
provider
.
selectedDispatchDistrictValue
=
""
;
}
provider
.
getDispatchDistrictAPI
(
context
,
...
...
@@ -169,7 +177,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
provider
.
selectedDispatchDistrictId
=
value
!.
id
!;
provider
.
selectedDispatchDistrictValue
=
value
!
.
district
!;
value
.
district
!;
if
(
provider
.
dispatchSubLocations
.
isNotEmpty
)
{
...
...
@@ -220,12 +228,15 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
.
toList
(),
value:
provider
.
selectedDispatchSubLocations
,
onChanged:
(
SubLocations
?
value
)
{
if
(
provider
.
dispatchSubLocations
.
isNotEmpty
)
{
provider
.
selectedDispatchSubLocations
=
value
;
if
(
provider
.
dispatchSubLocations
.
isNotEmpty
)
{
provider
.
selectedDispatchSubLocations
=
value
;
provider
.
selectedDispatchSubLocID
=
value
!.
id
!;
provider
.
selectedDispatchSubLocValue
=
value
!
.
subLocality
!;
value
.
subLocality
!;
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
...
...
@@ -247,7 +258,9 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
TextInputType
.
text
,
false
,
null
,
focusNodes
[
0
],
focusNodes
[
1
],
TextInputAction
.
next
focusNodes
[
0
],
focusNodes
[
1
],
TextInputAction
.
next
,
),
errorWidget
(
context
,
provider
.
dispatchAddressError
),
...
...
@@ -260,7 +273,9 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
1
],
focusNodes
[
2
],
TextInputAction
.
next
focusNodes
[
1
],
focusNodes
[
2
],
TextInputAction
.
next
,
),
errorWidget
(
context
,
provider
.
dispatchPincodeError
),
textControllerWidget
(
...
...
@@ -272,12 +287,12 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
TextInputType
.
text
,
false
,
null
,
focusNodes
[
2
],
focusNodes
[
3
],
TextInputAction
.
done
focusNodes
[
2
],
focusNodes
[
3
],
TextInputAction
.
done
,
),
errorWidget
(
context
,
provider
.
noteError
),
InkResponse
(
onTap:
()
{
_showAttachmentSheet
(
context
);
...
...
@@ -352,7 +367,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
provider
.
unloadingScope
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!
,
value:
e
,
child:
Text
(
e
,
style:
const
TextStyle
(
...
...
@@ -392,7 +407,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
provider
.
freightScope
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!
,
value:
e
,
child:
Text
(
e
,
style:
const
TextStyle
(
...
...
@@ -402,7 +417,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
),
)
.
toList
(),
value:
provider
.
selectedFreightScope
,
value:
provider
.
selectedFreightScope
,
onChanged:
(
String
?
value
)
{
if
(
provider
.
freightScope
.
isNotEmpty
)
{
provider
.
selectedFreightScope
=
value
;
...
...
@@ -438,11 +453,11 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
),
scrollbarTheme:
ScrollbarThemeData
(
radius:
const
Radius
.
circular
(
15
),
thickness:
Material
StateProperty
.
all
<
double
>(
thickness:
Widget
StateProperty
.
all
<
double
>(
6
,
),
thumbVisibility:
Material
StateProperty
.
all
<
bool
>(
true
),
Widget
StateProperty
.
all
<
bool
>(
true
),
),
),
menuItemStyleData:
const
MenuItemStyleData
(
...
...
@@ -469,7 +484,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
provider
.
erectionScope
.
map
(
(
e
)
=>
DropdownMenuItem
<
String
>(
value:
e
!
,
value:
e
,
child:
Text
(
e
,
style:
const
TextStyle
(
...
...
@@ -479,7 +494,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
),
)
.
toList
(),
value:
provider
.
selectedErectionScope
,
value:
provider
.
selectedErectionScope
,
onChanged:
(
String
?
value
)
{
if
(
provider
.
erectionScope
.
isNotEmpty
)
{
provider
.
selectedErectionScope
=
value
;
...
...
@@ -494,7 +509,6 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
],
),
),
],
),
),
...
...
@@ -507,8 +521,16 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
?
null
:
()
{
provider
.
submitClicked
=
true
;
provider
.
ordersEditOrderAPISubmitFunction
(
context
,
widget
.
orderID
,
provider
.
selectedDispatchStateID
,
provider
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchSubLocID
,
provider
.
selectedUnloadingScope
,
provider
.
selectedFreightScope
,
provider
.
selectedErectionScope
);
provider
.
ordersEditOrderAPISubmitFunction
(
context
,
widget
.
orderID
,
provider
.
selectedDispatchStateID
,
provider
.
selectedDispatchDistrictId
,
provider
.
selectedDispatchSubLocID
,
provider
.
selectedUnloadingScope
,
provider
.
selectedFreightScope
,
provider
.
selectedErectionScope
,
);
},
child:
Container
(
height:
45
,
...
...
@@ -539,7 +561,6 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
),
),
onWillPop:
()
async
{
return
_onBackPressed
(
context
);
},
);
...
...
@@ -599,7 +620,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromGallery
(
context
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Select photo from gallery"
),
),
...
...
@@ -610,7 +631,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
(
context
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Capture photo from camera"
),
),
...
...
@@ -629,6 +650,3 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
);
}
}
lib/screens/order/editPaymentDetailsByMode.dart
View file @
7210793a
...
...
@@ -5,10 +5,8 @@ import 'package:connectivity_plus/connectivity_plus.dart';
import
'package:dropdown_button2/dropdown_button2.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Models/ordersModels/AddOrderPaymentSelectOrderResponse.dart'
;
import
'../../Notifiers/ordersProvider/addPaymentProvider.dart'
;
import
'../../Notifiers/ordersProvider/editPaymentProvider.dart'
;
import
'../../Utils/app_colors.dart'
;
...
...
@@ -128,15 +126,13 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
:
NoNetwork
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer2
<
Addpaymentprovider
,
Editpaymentprovider
>(
builder:
(
context
,
provider
,
editProvider
,
child
)
{
return
WillPopScope
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
...
...
@@ -145,7 +141,7 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
.
shrink
(),
0xFFFFFFFF
0xFFFFFFFF
,
),
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
...
...
@@ -220,7 +216,7 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
0
],
null
,
TextInputAction
.
done
TextInputAction
.
done
,
),
errorWidget
(
context
,
provider
.
amountError
),
...
...
@@ -288,7 +284,7 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
null
,
focusNodes
[
1
],
null
,
TextInputAction
.
done
TextInputAction
.
done
,
),
errorWidget
(
context
,
provider
.
paymentRefError
),
TextWidget
(
context
,
"Payment Received Date"
),
...
...
lib/screens/order/orderDetailsFeedbackHistory.dart
View file @
7210793a
...
...
@@ -12,20 +12,18 @@ class Orderdetailsfeedbackhistory extends StatefulWidget {
const
Orderdetailsfeedbackhistory
({
super
.
key
});
@override
State
<
Orderdetailsfeedbackhistory
>
createState
()
=>
_OrderdetailsfeedbackhistoryState
();
State
<
Orderdetailsfeedbackhistory
>
createState
()
=>
_OrderdetailsfeedbackhistoryState
();
}
class
_OrderdetailsfeedbackhistoryState
extends
State
<
Orderdetailsfeedbackhistory
>
{
class
_OrderdetailsfeedbackhistoryState
extends
State
<
Orderdetailsfeedbackhistory
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
var
details
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
,
);
var
details
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
});
}
...
...
@@ -39,23 +37,34 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Feedback History"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
feedbackHistory
.
isNotEmpty
?
Container
(
body:
feedbackHistory
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemCount:
feedbackHistory
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
return
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
),
...
...
@@ -78,7 +87,6 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
"
${feedbackHistory[index].createdDatetime}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
0
,
...
...
@@ -86,13 +94,15 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textheads
[
j
].
toString
(),
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
overflow:
TextOverflow
.
ellipsis
,
),
),
Expanded
(
child:
SizedBox
(
...
...
@@ -105,8 +115,7 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
...
...
@@ -119,9 +128,10 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
}),
),
);
}
},
),
):
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
floatingActionButton:
Align
(
alignment:
Alignment
.
bottomCenter
,
child:
InkWell
(
...
...
@@ -141,8 +151,10 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
child:
Text
(
"Feedback Update"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
),
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
),
),
),
),
...
...
@@ -156,6 +168,7 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
},
);
}
Future
<
void
>
_showFeedbackSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -179,7 +192,9 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
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
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -197,7 +212,10 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
,
),
child:
Text
(
"Remarks"
),
),
Container
(
...
...
@@ -208,14 +226,22 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
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
,
readOnly:
true
,
keyboardType:
TextInputType
.
text
,
maxLines:
60
,
maxLines:
60
,
onChanged:
provider
.
onChangeFeedback
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
decoration:
InputDecoration
(
hintText:
"Write Remarks"
,
hintStyle:
TextStyle
(
...
...
@@ -230,13 +256,16 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
),
),
),
if
(
provider
.
feedbackError
!=
null
)...[
if
(
provider
.
feedbackError
!=
null
)
...[
Container
(
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
top:
2.5
,
left:
25
),
child:
Text
(
"
${provider.feedbackError}
"
,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
),
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
,
),
),
),
],
...
...
@@ -267,31 +296,48 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
),),
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
)
)
,
],
InkWell
(
onTap:
()
{
provider
.
ordersDetailsFeedbackSubmissionAPIFunction
(
context
,
orderDetails
.
id
,
orderDetails
.
status
);
provider
.
ordersDetailsFeedbackSubmissionAPIFunction
(
context
,
orderDetails
.
id
,
orderDetails
.
status
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
...
...
@@ -374,7 +420,7 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromGallery
(
context
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Select photo from gallery"
),
),
...
...
@@ -385,7 +431,7 @@ class _OrderdetailsfeedbackhistoryState extends State<Orderdetailsfeedbackhistor
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
(
context
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Capture photo from camera"
),
),
...
...
lib/screens/order/orderDetailsPaymentHistory.dart
View file @
7210793a
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/ordersProvider/pagesDashboardProvider.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -9,24 +8,21 @@ import '../../Utils/app_colors.dart';
import
'../../Utils/commonWidgets.dart'
;
class
Orderdetailspaymenthistory
extends
StatefulWidget
{
const
Orderdetailspaymenthistory
({
super
.
key
});
@override
State
<
Orderdetailspaymenthistory
>
createState
()
=>
_OrderdetailspaymenthistoryState
();
State
<
Orderdetailspaymenthistory
>
createState
()
=>
_OrderdetailspaymenthistoryState
();
}
class
_OrderdetailspaymenthistoryState
extends
State
<
Orderdetailspaymenthistory
>
{
class
_OrderdetailspaymenthistoryState
extends
State
<
Orderdetailspaymenthistory
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
var
details
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
,
);
var
details
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
});
}
...
...
@@ -39,23 +35,34 @@ class _OrderdetailspaymenthistoryState extends State<Orderdetailspaymenthistory>
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Payment History"
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
paymentHistory
.
isNotEmpty
?
Container
(
body:
paymentHistory
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemCount:
paymentHistory
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
return
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
),
...
...
@@ -82,7 +89,6 @@ class _OrderdetailspaymenthistoryState extends State<Orderdetailspaymenthistory>
"
${paymentHistory[index].approvalStatus}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
6
,
horizontal:
0
,
...
...
@@ -90,13 +96,15 @@ class _OrderdetailspaymenthistoryState extends State<Orderdetailspaymenthistory>
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textheads
[
j
].
toString
(),
child:
Text
(
textheads
[
j
].
toString
(),
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,),
overflow:
TextOverflow
.
ellipsis
,
),
),
Expanded
(
child:
SizedBox
(
...
...
@@ -109,8 +117,7 @@ class _OrderdetailspaymenthistoryState extends State<Orderdetailspaymenthistory>
child:
Text
(
textSubheads
[
j
],
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
),
...
...
@@ -123,10 +130,10 @@ class _OrderdetailspaymenthistoryState extends State<Orderdetailspaymenthistory>
}),
),
);
}
},
),
):
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
),
),
);
...
...
lib/screens/order/orderModuleDashboard.dart
View file @
7210793a
...
...
@@ -323,11 +323,10 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
);
break
;
}
;
return
Expanded
(
child:
InkResponse
(
onTap:
()
async
{
var
navigate
;
OrderslistbyModes
navigate
;
if
(
approvalOrderPages
[
co
].
pageName
!.
contains
(
"Order List"
,
))
{
...
...
@@ -431,11 +430,10 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
);
break
;
}
;
return
InkResponse
(
onTap:
()
async
{
var
navigate
;
OrderslistbyModes
navigate
;
if
(
otherOrderPages
[
index
].
pageName
!.
contains
(
"Order List"
,
))
{
...
...
@@ -556,7 +554,6 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
);
break
;
}
;
return
InkResponse
(
onTap:
()
async
{
...
...
@@ -567,18 +564,18 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
navigate
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentlistsbymode
(
builder:
(
context
)
=>
Paymentlistsbymode
(
mode:
receiptListPages
[
index
].
mode
!,
pageTitleName:
receiptListPages
[
index
].
pageName
!,
),
settings:
RouteSettings
(
name:
"Paymentlistsbymode"
)
name:
"Paymentlistsbymode"
,
)
,
),
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -665,7 +662,6 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
itemBuilder:
(
context
,
index
)
{
Widget
?
SvgIcon
;
switch
(
otherPages
[
index
].
mode
)
{
case
"self"
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/finance/fin_receipts_ic.svg"
,
...
...
@@ -678,11 +674,10 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
);
break
;
}
;
return
InkResponse
(
onTap:
()
async
{
var
navigate
;
StatefulWidget
navigate
;
if
(
otherPages
[
index
].
pageName
!.
contains
(
"TPC Agent List"
,
))
{
...
...
@@ -811,7 +806,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
child:
SingleChildScrollView
(
child:
Column
(
children:
[
if
(
provider
.
ordersgain
.
length
>
0
)
...[
if
(
provider
.
ordersgain
.
isNotEmpty
)
...[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
...
...
@@ -932,11 +927,10 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
break
;
}
;
return
InkResponse
(
onTap:
()
async
{
var
navigate
;
StatefulWidget
navigate
;
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Order"
))
{
navigate
=
AddorderScreen
(
mode:
pages
[
index
].
mode
!,
...
...
@@ -1188,9 +1182,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
// }
Navigator
.
pop
(
context
);
},
leading:
SvgPicture
.
asset
(
icons
[
index
],
),
leading:
SvgPicture
.
asset
(
icons
[
index
]),
title:
Text
(
"
${pages2[index].pageName}
"
,
style:
TextStyle
(
...
...
lib/screens/order/ordersDetailsByModes.dart
View file @
7210793a
...
...
@@ -536,10 +536,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
),
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
children:
[
Row
(
...
...
@@ -565,8 +562,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{},
...
...
@@ -578,8 +574,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
Text
(
orderDetails
.
accountName
==
""
?
"-"
:
orderDetails
.
accountName
??
"-"
,
:
orderDetails
.
accountName
??
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
...
...
@@ -630,9 +625,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
getTextColor
(
orderDetails
.
status
,
),
color:
getTextColor
(
orderDetails
.
status
),
),
),
),
...
...
@@ -646,19 +639,18 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Editorderaccountdetails
(
(
context
)
=>
Editorderaccountdetails
(
mode:
widget
.
mode
,
pageTitleName:
"Edit Order"
,
orderID:
widget
.
orderId
,
orderID:
widget
.
orderId
,
),
settings:
RouteSettings
(
name:
'Editorderaccountdetails'
,
),
),
);
if
(
routeSettingName
==
'Editorderaccountdetails'
)
{
if
(
routeSettingName
==
'Editorderaccountdetails'
)
{
provider
.
ordersDetailsByModeAPIFunction
(
context
,
widget
.
orderId
,
...
...
@@ -694,9 +686,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
4
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -724,9 +714,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
Column
(
children:
List
.
generate
(
headings
.
length
,
(
j
,
)
{
children:
List
.
generate
(
headings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
,
...
...
@@ -739,8 +727,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -761,22 +748,16 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
fontSize:
14
,
decoration:
subHeadings
[
j
]
==
"View"
subHeadings
[
j
]
==
"View"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
:
TextDecoration
.
none
,
decorationColor:
AppColors
.
app_blue
,
color:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
),
),
),
...
...
@@ -814,9 +795,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
...
...
@@ -839,11 +818,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
///product details
if
(
productsHistory
.
isNotEmpty
)
...[
Container
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -876,8 +851,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
300
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -948,8 +922,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
AppColors
.
app_blue
,
),
),
),
...
...
@@ -1039,8 +1012,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -1058,23 +1030,23 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
feedbackHistory
[
lp
]
.
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
feedbackHistory
[
lp
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
...
...
@@ -1133,10 +1105,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
),
...
List
.
generate
(
2
,
(
j
)
{
final
heads
=
[
"Unit Price"
,
"Total Price"
];
final
heads
=
[
"Unit Price"
,
"Total Price"
];
final
subHeads
=
[
"₹
${productsHistory[lp].unitPrice ?? "-"}
"
,
"₹
${productsHistory[lp].totalPrice ?? "-"}
"
,
...
...
@@ -1154,8 +1123,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -1173,23 +1141,23 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
feedbackHistory
[
lp
]
.
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
feedbackHistory
[
lp
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
...
...
@@ -1227,11 +1195,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
///Feedback details
Container
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -1285,8 +1249,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
220
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -1300,8 +1263,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -1380,9 +1342,10 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
Center
(
child:
Text
(
textAlign:
TextAlign
.
center
,
"
${feedbackHistory[lp].status ?? "-"}
"
,
TextAlign
.
center
,
feedbackHistory
[
lp
]
.
status
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
...
...
@@ -1433,10 +1396,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
),
...
List
.
generate
(
2
,
(
j
)
{
final
heads
=
[
"Feedback"
,
"Attachment"
,
];
final
heads
=
[
"Feedback"
,
"Attachment"
];
final
subHeads
=
[
feedbackHistory
[
lp
].
feedback
??
"-"
,
"View"
,
...
...
@@ -1450,13 +1410,12 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
flex:
1
,
child:
Text
(
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -1464,7 +1423,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
if
(
subHeads
[
j
]
==
"View"
)
...[
Expanded
(
flex:
3
,
flex:
3
,
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
...
...
@@ -1475,23 +1434,23 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
feedbackHistory
[
lp
]
.
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
feedbackHistory
[
lp
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
...
...
@@ -1503,13 +1462,13 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
]
else
...[
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
maxLines:
2
,
maxLines:
2
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
...
...
@@ -1558,14 +1517,9 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
],
///PaymentHistory details
if
(
paymentHistory
.
isNotEmpty
)
...[
Container
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -1579,7 +1533,6 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
),
),
],
),
),
...
...
@@ -1598,9 +1551,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
225
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -1609,15 +1560,12 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -1634,8 +1582,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
Column
(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
...
...
@@ -1655,22 +1602,18 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹
${paymentHistory[lp]
.amount ??
"-"}
"
,
"₹
${paymentHistory[lp].amount ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
...
...
@@ -1689,27 +1632,23 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
flex:
2
,
child:
Container
(
height:
45
,
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
processed_bg_color
,
borderRadius:
BorderRadius
.
circular
(
color:
AppColors
.
processed_bg_color
,
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
Center
(
child:
Text
(
paymentHistory
[
lp
].
approvalStatus
??
"-"
,
textAlign:
TextAlign
.
right
,
paymentHistory
[
lp
]
.
approvalStatus
??
"-"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
...
...
@@ -1719,13 +1658,10 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -1734,8 +1670,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
"Payment Info"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
...
...
@@ -1744,8 +1679,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
...
...
@@ -1761,17 +1695,10 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
"Payment Date"
,
];
final
subHeadsa
=
[
paymentHistory
[
lp
]
.
paymentType
??
"-"
,
paymentHistory
[
lp
]
.
refNo
??
"-"
,
"₹
${paymentHistory[lp]
.adjustedAmount ??
"-"}
"
,
paymentHistory
[
lp
]
.
paymentDate
??
"-"
,
paymentHistory
[
lp
].
paymentType
??
"-"
,
paymentHistory
[
lp
].
refNo
??
"-"
,
"₹
${paymentHistory[lp].adjustedAmount ?? "-"}
"
,
paymentHistory
[
lp
].
paymentDate
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -1786,27 +1713,21 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
textAlign:
TextAlign
.
left
,
headsa
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeadsa
[
j
]
==
""
?
"-"
:
subHeadsa
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
color:
Color
(
0xFF818181
),
),
),
),
...
...
@@ -1814,7 +1735,6 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
);
}),
],
),
);
...
...
@@ -1830,9 +1750,9 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
bottomNavigationBar:
(
widget
.
mode
==
"pending_approval"
)
?
SizedBox
.
shrink
()
:
widget
.
mode
==
"self"
&&
orderDetails
.
status
==
"Customer verification Pending"
?
Container
(
:
widget
.
mode
==
"self"
&&
orderDetails
.
status
==
"Customer verification Pending"
?
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
...
...
@@ -1844,7 +1764,6 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SizedBox
(
width:
10
),
Expanded
(
child:
InkResponse
(
...
...
@@ -1863,8 +1782,10 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/verify_otp_ic.svg"
),
SizedBox
(
width:
5
,),
SvgPicture
.
asset
(
"assets/svg/finance/verify_otp_ic.svg"
,
),
SizedBox
(
width:
5
),
Center
(
child:
Text
(
"Verify OTP"
,
...
...
@@ -1880,13 +1801,11 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
),
SizedBox
(
width:
10
),
],
),
),
)
:
Container
(
:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
...
...
@@ -1926,7 +1845,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
SvgPicture
.
asset
(
"assets/svg/finance/level_reject_ic.svg"
,
),
SizedBox
(
width:
5
,
),
SizedBox
(
width:
5
),
Center
(
child:
Text
(
"Reject"
,
...
...
@@ -1981,7 +1900,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
,
),
SizedBox
(
width:
5
,
),
SizedBox
(
width:
5
),
Center
(
child:
Text
(
"Approve"
,
...
...
@@ -1999,7 +1918,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
SizedBox
(
width:
10
),
],
if
(
widget
.
mode
==
"admin"
)
...[
if
(
widget
.
mode
==
"admin"
)
...[
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
,
),
...
...
@@ -2021,8 +1940,10 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_delete_ic.svg"
),
SizedBox
(
width:
5
,),
SvgPicture
.
asset
(
"assets/svg/finance/level_delete_ic.svg"
,
),
SizedBox
(
width:
5
),
Center
(
child:
Text
(
"Delete"
,
...
...
@@ -2369,7 +2290,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
?
"View"
:
subHeadings
[
j
]
==
""
?
"-"
:
"
${
subHeadings[j]
}
"
,
:
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
...
...
@@ -2746,8 +2667,8 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
alignment:
Alignment
.
topLeft
,
child:
Text
(
type
==
"Approve"
?
"
${
provider.approvalSheetHeading
}
"
:
"
${
provider.rejecetionSheetHeading
}
"
,
?
provider
.
approvalSheetHeading
:
provider
.
rejecetionSheetHeading
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
...
...
@@ -3413,7 +3334,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
Align
(
alignment:
Alignment
.
topLeft
,
child:
Text
(
"
${
provider.deletionSheetHeading
}
"
,
provider
.
deletionSheetHeading
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
...
...
@@ -3667,7 +3588,8 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
// ),
Container
(
margin:
EdgeInsets
.
zero
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.78
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.78
,
child:
Pinput
(
useNativeKeyboard:
true
,
// pastedTextStyle: TextStyle(
...
...
@@ -3683,7 +3605,6 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
hapticFeedbackType:
HapticFeedbackType
.
mediumImpact
,
// defaultPinTheme: PinTheme(
// height: 50,
// width: 60,
...
...
@@ -3710,8 +3631,10 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
// borderRadius: BorderRadius.circular(15),
// color: AppColors.cyan_blue),
// ),
keyboardType:
TextInputType
.
numberWithOptions
(),
textInputAction:
(
Platform
.
isAndroid
)
keyboardType:
TextInputType
.
numberWithOptions
(),
textInputAction:
(
Platform
.
isAndroid
)
?
TextInputAction
.
none
:
TextInputAction
.
done
,
...
...
@@ -3720,7 +3643,11 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
],
onCompleted:
(
String
enteredCode
)
{
provider
.
enteredOtp
=
enteredCode
;
provider
.
verifyOrderAPIFunction
(
context
,
provider
.
orderDetails
.
id
,
provider
.
enteredOtp
);
provider
.
verifyOrderAPIFunction
(
context
,
provider
.
orderDetails
.
id
,
provider
.
enteredOtp
,
);
},
onChanged:
(
String
enteredCode
)
{
...
...
@@ -3748,7 +3675,10 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
child:
InkResponse
(
onTap:
()
{
provider
.
ResendOtpAPI
(
context
,
provider
.
orderDetails
.
id
);
provider
.
ResendOtpAPI
(
context
,
provider
.
orderDetails
.
id
,
);
},
child:
Center
(
child:
Text
(
...
...
@@ -3762,8 +3692,12 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
InkResponse
(
onTap:
()
async
{
await
provider
.
verifyOrderAPIFunction
(
context
,
provider
.
orderDetails
.
id
,
provider
.
enteredOtp
);
onTap:
()
async
{
await
provider
.
verifyOrderAPIFunction
(
context
,
provider
.
orderDetails
.
id
,
provider
.
enteredOtp
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
...
...
@@ -3807,8 +3741,6 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
);
}
Future
<
void
>
_showFeedbackSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -4060,7 +3992,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromGallery
(
context
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Select photo from gallery"
),
),
...
...
@@ -4071,7 +4003,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
(
context
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Capture photo from camera"
),
),
...
...
lib/screens/order/ordersListByModes.dart
View file @
7210793a
...
...
@@ -47,7 +47,10 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
});
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
final
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
,
);
provider
.
resetPagination
();
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
...
...
@@ -56,7 +59,10 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
_scrollController
.
addListener
(()
{
if
(
_scrollController
.
position
.
pixels
>=
_scrollController
.
position
.
maxScrollExtent
-
200
)
{
final
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
final
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
,
);
provider
.
loadMore
(
context
,
widget
.
mode
,
""
,
""
);
}
});
...
...
@@ -175,7 +181,10 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
{
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
).
resetAll
();
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
,
).
resetAll
();
return
onBackPressed
(
context
);
},
child:
SafeArea
(
...
...
@@ -220,10 +229,13 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
&&
ordersList
.
isEmpty
body:
provider
.
isLoading
&&
ordersList
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
ordersList
.
isNotEmpty
...
...
@@ -239,13 +251,16 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
},
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
ordersList
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
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
()),
child:
Center
(
child:
CircularProgressIndicator
(),
),
)
:
const
SizedBox
.
shrink
();
}
...
...
@@ -262,7 +277,9 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
orderId:
ordersList
[
ol
].
orderId
,
mode:
widget
.
mode
,
),
settings:
RouteSettings
(
name:
"Ordersdetailsbymodes"
)
settings:
RouteSettings
(
name:
"Ordersdetailsbymodes"
,
),
),
);
if
(
routeSettingName
==
"Ordersdetailsbymodes"
)
{
...
...
@@ -309,9 +326,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
),
child:
Center
(
child:
Text
(
getText
(
ordersList
[
ol
].
status
,
),
getText
(
ordersList
[
ol
].
status
),
style:
TextStyle
(
color:
getTextColor
(
ordersList
[
ol
].
status
,
...
...
@@ -334,28 +349,22 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
CrossAxisAlignment
.
start
,
children:
[
Text
(
ordersList
[
ol
]
.
accountName
!,
ordersList
[
ol
].
accountName
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
ordersList
[
ol
]
.
orderNumber
!,
ordersList
[
ol
].
orderNumber
!,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
...
...
@@ -395,8 +404,6 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
);
}
Future
<
void
>
_showOptionsSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -643,9 +650,7 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
provider
.
selectedEmpName
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
selectedEmpID
.
toString
(),
"hfjkshfg
${provider.selectedEmpID}
"
,
);
}
}
...
...
lib/screens/order/paymentDetailsByMode.dart
View file @
7210793a
...
...
@@ -271,10 +271,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
),
),
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
children:
[
Row
(
...
...
@@ -300,8 +297,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{},
...
...
@@ -313,8 +309,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
child:
Text
(
paymentDetails
.
accountName
==
""
?
"-"
:
paymentDetails
.
accountName
??
:
paymentDetails
.
accountName
??
"-"
,
style:
TextStyle
(
decoration:
...
...
@@ -396,23 +391,23 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
.
paymentId
,
"description"
:
provider
.
paymentDetails
!
.
paymentDetails
.
description
,
"amount"
:
provider
.
paymentDetails
!
.
paymentDetails
.
amount
,
"payment_mode"
:
provider
.
paymentDetails
!
.
paymentDetails
.
paymentType
,
"pay_ref"
:
provider
.
paymentDetails
!
.
paymentDetails
.
refNo
,
"pay_received_date"
:
provider
.
paymentDetails
!
.
paymentDetails
.
paymentDate
,
},
),
...
...
@@ -422,8 +417,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
),
);
if
(
res
==
true
)
{
provider
.
paymentsDetailsByModeAPIFunction
(
provider
.
paymentsDetailsByModeAPIFunction
(
context
,
widget
.
paymentId
,
widget
.
mode
,
...
...
@@ -459,9 +453,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
4
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -489,9 +481,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
),
Column
(
children:
List
.
generate
(
headings
.
length
,
(
j
,
)
{
children:
List
.
generate
(
headings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
,
...
...
@@ -504,8 +494,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -526,22 +515,16 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
fontSize:
14
,
decoration:
subHeadings
[
j
]
==
"View"
subHeadings
[
j
]
==
"View"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
:
TextDecoration
.
none
,
decorationColor:
AppColors
.
app_blue
,
color:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
),
),
),
...
...
@@ -579,9 +562,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
...
...
@@ -621,13 +602,13 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
context
,
paymentDetails
.
paymentId
,
);
Future
.
delayed
(
Duration
(
milliseconds:
500
),()
{
Future
.
delayed
(
Duration
(
milliseconds:
500
),
()
{
_showAddAdjustedOrderSheet
(
context
,
paymentDetails
.
paymentId
,
widget
.
mode
,
);
}
,
);
});
},
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
...
...
@@ -650,10 +631,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemCount:
adjustList
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
itemBuilder:
(
context
,
lp
)
{
return
InkResponse
(
...
...
@@ -741,9 +719,8 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Ordersdetailsbymodes
(
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
...
...
@@ -780,9 +757,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -822,9 +797,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
adjustList
[
lp
].
adjustedAmount
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -843,9 +816,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
...
...
@@ -870,13 +841,13 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
context
,
paymentDetails
.
paymentId
,
);
Future
.
delayed
(
Duration
(
milliseconds:
500
),()
{
Future
.
delayed
(
Duration
(
milliseconds:
500
),
()
{
_showAddAdjustedOrderSheet
(
context
,
paymentDetails
.
paymentId
,
widget
.
mode
,
);
}
,
);
});
},
child:
Container
(
height:
50
,
...
...
@@ -934,8 +905,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
// ),
// ),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_reject_ic.svg"
,
...
...
@@ -983,8 +953,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
// ),
// ),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
,
...
...
@@ -1023,8 +992,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
// ),
// ),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_delete_ic.svg"
,
...
...
@@ -1210,7 +1178,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
child:
Text
(
provider
.
Headings
[
j
]
==
"Attachment"
?
"View"
:
"
${
provider.subHeadings[j]
}
"
,
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
...
...
@@ -1553,23 +1521,23 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
.
paymentId
,
"description"
:
provider
.
paymentDetails
!
.
paymentDetails
.
description
,
"amount"
:
provider
.
paymentDetails
!
.
paymentDetails
.
amount
,
"payment_mode"
:
provider
.
paymentDetails
!
.
paymentDetails
.
paymentType
,
"pay_ref"
:
provider
.
paymentDetails
!
.
paymentDetails
.
refNo
,
"pay_received_date"
:
provider
.
paymentDetails
!
.
paymentDetails
.
paymentDate
,
},
),
...
...
@@ -1682,8 +1650,8 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
alignment:
Alignment
.
topLeft
,
child:
Text
(
type
==
"Approve"
?
"
${
"Payment Approval"
}
"
:
"
${
"Payment Reject"
}
"
,
?
"Payment Approval"
:
"Payment Reject"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
16
,
...
...
@@ -2107,7 +2075,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
if
(
provider
.
paidList
.
isNotEmpty
)
{
provider
.
editselectedPaidList
=
value
;
provider
.
editselectedPaidOrderId
=
value
!
.
orderId
;
value
.
orderId
;
print
(
"Selected Complaint Type:
${provider.editselectedPaidOrderId}
, ID:
${value.orderNumber}
"
,
);
...
...
@@ -2330,7 +2298,7 @@ class _PaymentdetailsbymodeState extends State<Paymentdetailsbymode> {
if
(
provider
.
paidList
.
isNotEmpty
)
{
provider
.
editselectedPaidList
=
value
;
provider
.
editselectedPaidOrderId
=
value
!
.
orderId
;
value
.
orderId
;
print
(
"Selected Complaint Type:
${value.orderId}
, ID:
${value.orderNumber}
"
,
);
...
...
lib/screens/order/paymentListsByMode.dart
View file @
7210793a
...
...
@@ -14,12 +14,16 @@ import '../../Utils/dropdownTheme.dart';
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:generp/Utils/commonServices.dart'
;
class
Paymentlistsbymode
extends
StatefulWidget
{
final
mode
;
final
pageTitleName
;
const
Paymentlistsbymode
(
{
super
.
key
,
required
this
.
mode
,
required
this
.
pageTitleName
});
const
Paymentlistsbymode
({
super
.
key
,
required
this
.
mode
,
required
this
.
pageTitleName
,
});
@override
State
<
Paymentlistsbymode
>
createState
()
=>
_PaymentlistsbymodeState
();
...
...
@@ -117,6 +121,7 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
}
return
18.0
;
}
final
ScrollController
_scrollController
=
ScrollController
();
@override
...
...
@@ -167,8 +172,11 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
async
{
Provider
.
of
<
Paymentsprovider
>(
context
,
listen:
false
).
resetAll
();
Navigator
.
pop
(
context
,
true
);
Provider
.
of
<
Paymentsprovider
>(
context
,
listen:
false
,
).
resetAll
();
Navigator
.
pop
(
context
,
true
);
return
true
;
},
child:
SafeArea
(
...
...
@@ -181,9 +189,7 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
:
NoNetwork
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Paymentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
paymentLists
=
provider
.
paymentsList
;
...
...
@@ -201,23 +207,27 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
"assets/svg/filter_ic.svg"
,
height:
25
,
),
),
],
),
0xFFFFFFFF
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
&&
paymentLists
.
isEmpty
body:
provider
.
isLoading
&&
paymentLists
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
paymentLists
.
isNotEmpty
...
...
@@ -232,13 +242,16 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
},
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
paymentLists
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
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
()),
child:
Center
(
child:
CircularProgressIndicator
(),
),
)
:
const
SizedBox
.
shrink
();
}
...
...
@@ -246,12 +259,17 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
final
payment
=
paymentLists
[
index
];
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
paymentId:
paymentLists
[
index
].
paymentId
,
),));
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -267,11 +285,9 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
...
...
@@ -286,9 +302,7 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
),
child:
Center
(
child:
Text
(
getText
(
paymentLists
[
index
].
status
,
),
getText
(
paymentLists
[
index
].
status
),
style:
TextStyle
(
color:
getTextColor
(
paymentLists
[
index
].
status
,
...
...
@@ -314,28 +328,23 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
Text
(
paymentLists
[
index
].
ename
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
Text
(
paymentLists
[
index
]
.
orderNumber
??
"-"
,
paymentLists
[
index
]
.
orderNumber
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
fontFamily:
"JakartaRegular"
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
],
),
),
...
...
@@ -343,15 +352,13 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
Expanded
(
flex:
2
,
child:
Container
(
child:
Center
(
child:
Text
(
"₹"
"
${paymentLists[index].amount}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
...
...
@@ -361,7 +368,6 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
),
],
),
],
),
),
...
...
@@ -374,6 +380,7 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
},
);
}
Widget
_scaffold1
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
case
ConnectivityResult
.
mobile
:
...
...
@@ -386,8 +393,7 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
default
:
connection
=
'Offline'
;
}
return
Consumer
<
Paymentsprovider
>(
return
Consumer
<
Paymentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
paymentLists
=
provider
.
paymentsList
;
return
WillPopScope
(
...
...
@@ -397,7 +403,7 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
...
...
@@ -412,13 +418,14 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
"assets/svg/filter_ic.svg"
,
height:
25
,
),
),
],
),
...
...
@@ -426,11 +433,15 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
paymentLists
.
isNotEmpty
?
SingleChildScrollView
(
AppColors
.
app_blue
,
),
),
)
:
paymentLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
...
...
@@ -575,17 +586,15 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
),
Expanded
(
child:
InkResponse
(
child:
Text
(
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
color:
Color
(
0xFF818181
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
...
...
@@ -596,12 +605,22 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
paymentId:
paymentLists
[
index
].
paymentId
,
),));
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
paymentId:
paymentLists
[
index
]
.
paymentId
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -636,7 +655,8 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
),
],
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
),
),
);
...
...
@@ -666,7 +686,9 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
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
,
...
...
@@ -750,10 +772,7 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
builder:
(
context
,
provider
,
child
)
{
return
Container
(
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
)
.
viewInsets
.
bottom
,
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
margin:
EdgeInsets
.
only
(
bottom:
15
,
...
...
@@ -817,24 +836,23 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
if
(
provider
.
employeesList
.
isNotEmpty
)
{
provider
.
selectedEmployee
=
value
;
print
(
"Selected Complaint Type:
${value
.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
selectedEmpID
=
value
.
id
!;
provider
.
selectedEmpName
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
selectedEmpID
.
toString
(),
"hfjkshfg
${provider.selectedEmpID}
"
,
);
}
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -844,15 +862,22 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
onTap:
()
{
Navigator
.
pop
(
context
);
provider
.
paymentsListsByModeAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedEmpID
.
toString
());
context
,
widget
.
mode
,
provider
.
selectedEmpID
.
toString
(),
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
horizontal:
10
,
vertical:
15
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
...
...
lib/screens/order/tpcAgentDetailsByMode.dart
View file @
7210793a
...
...
@@ -172,7 +172,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
children:
[
Expanded
(
flex:
1
,
child:
Container
(
child:
SizedBox
(
height:
50
,
width:
35
,
child:
SvgPicture
.
asset
(
...
...
@@ -206,24 +206,20 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
3.0
,
),
child:
Text
(
tpcAgentDetails
.
mobileNumber
??
tpcAgentDetails
.
mobileNumber
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dashed
,
TextDecorationStyle
.
dashed
,
decorationColor:
AppColors
.
grey_semi
,
),
...
...
@@ -239,8 +235,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
),
SizedBox
(
height:
5
),
Visibility
(
visible:
provider
.
showMoreDetails
?
true
:
false
,
visible:
provider
.
showMoreDetails
?
true
:
false
,
child:
Column
(
children:
List
.
generate
(
sections
.
length
,
(
sectionIndex
,
...
...
@@ -250,8 +245,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
final
headings
=
section
[
"headings"
]
as
List
<
String
>;
final
subHeadings
=
section
[
"subHeadings"
]
as
List
<
String
>;
section
[
"subHeadings"
]
as
List
<
String
>;
return
Column
(
crossAxisAlignment:
...
...
@@ -269,8 +263,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
title
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
...
...
@@ -279,8 +272,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
...
...
@@ -295,7 +287,8 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
)
{
if
(
headings
[
j
]
==
"ID Proof"
&&
tpcAgentDetails
.
idProofDirFilePath
==
""
)
{
.
idProofDirFilePath
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
...
...
@@ -314,16 +307,14 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
subHeadings
[
j
]
==
"View"
subHeadings
[
j
]
==
"View"
?
()
{
Navigator
.
push
(
context
,
...
...
@@ -398,10 +389,8 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
...
...
@@ -438,10 +427,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
only
(
top:
15
,
left:
10
,
),
padding:
EdgeInsets
.
only
(
top:
15
,
left:
10
),
child:
Text
(
"TPC Amounts Requested"
,
style:
TextStyle
(
...
...
@@ -456,10 +442,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemCount:
tpcReqAmt
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
...
...
@@ -468,23 +451,16 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Ordersdetailsbymodes
(
pageTitleName:
"CRM Order Details"
,
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
orderId:
tpcReqAmt
[
index
]
.
orderId
,
orderId:
tpcReqAmt
[
index
].
orderId
,
),
),
);
},
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -495,16 +471,14 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
vertical:
5
,
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
...
...
@@ -519,8 +493,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
child:
Column
(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
...
...
@@ -530,8 +503,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
flex:
4
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{
...
...
@@ -544,7 +516,8 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
)
=>
Ordersdetailsbymodes
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
mode:
widget
.
mode
,
orderId:
tpcReqAmt
[
index
]
.
orderId
,
...
...
@@ -553,19 +526,28 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
),
child:
Text
(
tpcReqAmt
[
index
].
customerName
??
tpcReqAmt
[
index
]
.
customerName
??
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dashed
,
decorationColor:
AppColors
.
semi_black
,
decoration:
TextDecoration
.
underline
,
decorationStyle:
TextDecorationStyle
.
dashed
,
decorationColor:
AppColors
.
semi_black
,
height:
1.5
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
...
...
@@ -574,16 +556,15 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
),
),
Text
(
tpcReqAmt
[
index
].
orderNumber
??
tpcReqAmt
[
index
]
.
orderNumber
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
AppColors
.
grey_semi
,
),
),
],
...
...
@@ -592,32 +573,27 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
Expanded
(
flex:
2
,
child:
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
AppColors
.
requested_bg_color
,
BorderRadius
.
circular
(
8
),
color:
AppColors
.
requested_bg_color
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
child:
Center
(
child:
Text
(
textAlign:
TextAlign
.
right
,
"
${tpcReqAmt[index].tpcStatus ??
"-"
}
"
,
textAlign:
TextAlign
.
right
,
tpcReqAmt
[
index
]
.
tpcStatus
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
...
...
@@ -633,9 +609,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -644,8 +618,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
"Order Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
...
...
@@ -654,8 +627,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
...
...
@@ -673,39 +645,28 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
"
${tpcReqAmt[index].level2TpcApprovedAmount}
"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
color:
Color
(
0xFF818181
),
),
),
),
...
...
@@ -713,14 +674,12 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
),
);
}),
],
),
),
);
},
),
],
),
),
...
...
@@ -815,7 +774,6 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
...
...
@@ -853,7 +811,7 @@ class _TpcagentdetailsbymodeState extends State<Tpcagentdetailsbymode> {
}
},
child:
Text
(
"
${
provider.subHeadings[j]
}
"
,
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
...
...
lib/screens/order/tpcAgentIssueList.dart
View file @
7210793a
...
...
@@ -16,20 +16,22 @@ import 'ordersDetailsByModes.dart';
class
Tpcagentissuelist
extends
StatefulWidget
{
final
pageTitleName
;
final
mode
;
const
Tpcagentissuelist
({
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
mode
});
const
Tpcagentissuelist
({
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
mode
,
});
@override
State
<
Tpcagentissuelist
>
createState
()
=>
_TpcagentissuelistState
();
}
class
_TpcagentissuelistState
extends
State
<
Tpcagentissuelist
>
{
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
final
ScrollController
_scrollController
=
ScrollController
();
@override
void
initState
()
{
super
.
initState
();
...
...
@@ -59,6 +61,7 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
_connectivity
.
disposeStream
();
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
...
...
@@ -76,7 +79,10 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
{
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
).
resetAll
();
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
,
).
resetAll
();
return
onBackPressed
(
context
);
},
child:
SafeArea
(
...
...
@@ -89,7 +95,6 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
:
NoNetwork
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
...
...
@@ -108,18 +113,18 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
),
0xFFFFFFFF
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
&&
tpcAgentsIssueList
.
isEmpty
body:
provider
.
isLoading
&&
tpcAgentsIssueList
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
tpcAgentsIssueList
.
isNotEmpty
...
...
@@ -130,7 +135,8 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
},
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
tpcAgentsIssueList
.
length
+
itemCount:
tpcAgentsIssueList
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
if
(
index
==
tpcAgentsIssueList
.
length
)
{
...
...
@@ -138,7 +144,8 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
()),
child:
CircularProgressIndicator
(),
),
)
:
const
SizedBox
.
shrink
();
}
...
...
@@ -150,11 +157,11 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentissuelistdetails
(
(
context
)
=>
Tpcagentissuelistdetails
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
),
),
);
...
...
@@ -178,7 +185,7 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
children:
[
Expanded
(
flex:
1
,
child:
Container
(
child:
SizedBox
(
height:
50
,
width:
35
,
...
...
@@ -198,19 +205,15 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
Text
(
tpcAgentsIssueList
[
index
].
name
!,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"
${tpcAgentsIssueList[index].aname}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
...
...
@@ -225,8 +228,7 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentsIssueList[index]
.mobileNumber}
'
,
'tel://
${tpcAgentsIssueList[index].mobileNumber}
'
,
);
},
child:
SizedBox
(
...
...
@@ -240,8 +242,6 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
),
],
),
],
),
),
...
...
@@ -266,7 +266,7 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
...
...
@@ -281,19 +281,21 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
tpcAgentsIssueList
.
isNotEmpty
?
SingleChildScrollView
(
AppColors
.
app_blue
,
),
),
)
:
tpcAgentsIssueList
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
...
...
@@ -350,7 +352,8 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
CrossAxisAlignment
.
start
,
children:
[
Text
(
tpcAgentsIssueList
[
index
].
name
!,
tpcAgentsIssueList
[
index
]
.
name
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
...
...
@@ -360,7 +363,6 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
),
),
Text
(
"
${tpcAgentsIssueList[index].aname}
"
,
style:
TextStyle
(
fontFamily:
...
...
@@ -373,7 +375,6 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
),
),
),
],
),
Divider
(
...
...
@@ -386,8 +387,6 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
"Order Number"
,
"Order Amount"
,
"Order Status"
,
];
final
subHeadings
=
[
...
...
@@ -416,17 +415,15 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
),
Expanded
(
child:
InkResponse
(
child:
Text
(
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
color:
Color
(
0xFF818181
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
...
...
@@ -441,11 +438,15 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentissuelistdetails
(
pageTitleName:
"CRM Order Details"
,
(
context
,
)
=>
Tpcagentissuelistdetails
(
pageTitleName:
"CRM Order Details"
,
mode:
widget
.
mode
,
orderId:
tpcAgentsIssueList
[
index
].
orderId
,
orderId:
tpcAgentsIssueList
[
index
]
.
orderId
,
),
),
);
...
...
@@ -483,7 +484,8 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
),
],
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
),
),
);
...
...
lib/screens/order/tpcAgentIssueListDetails.dart
View file @
7210793a
...
...
@@ -17,11 +17,16 @@ class Tpcagentissuelistdetails extends StatefulWidget {
final
orderId
;
final
mode
;
const
Tpcagentissuelistdetails
(
{
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
orderId
,
required
this
.
mode
});
const
Tpcagentissuelistdetails
({
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
orderId
,
required
this
.
mode
,
});
@override
State
<
Tpcagentissuelistdetails
>
createState
()
=>
_TpcagentissuelistdetailsState
();
State
<
Tpcagentissuelistdetails
>
createState
()
=>
_TpcagentissuelistdetailsState
();
}
class
_TpcagentissuelistdetailsState
extends
State
<
Tpcagentissuelistdetails
>
{
...
...
@@ -44,7 +49,10 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
provider
.
showMoreDetails
=
false
;
provider
.
ordersDetailsByModeAPIFunction
(
context
,
widget
.
orderId
,
widget
.
mode
);
context
,
widget
.
orderId
,
widget
.
mode
,
);
});
}
...
...
@@ -144,7 +152,6 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
return
18.0
;
}
@override
Widget
build
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
...
...
@@ -180,8 +187,8 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer2
<
Pagesdashboardprovider
,
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
tpcProvider
,
child
)
{
return
Consumer2
<
Pagesdashboardprovider
,
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
tpcProvider
,
child
)
{
var
orderDetails
=
provider
.
orderDetails
;
final
productsHistory
=
provider
.
productsHistory
;
final
feedbackHistory
=
provider
.
feedbackHistory
;
...
...
@@ -353,15 +360,19 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2New
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
appBar:
appbar2New
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
SizedBox
.
shrink
(),
0xFFFFFFFF
),
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SingleChildScrollView
(
child:
Column
(
children:
[
Card
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
2
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
2
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
...
...
@@ -378,10 +389,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
children:
[
Row
(
...
...
@@ -407,8 +415,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
InkResponse
(
onTap:
()
{},
...
...
@@ -420,8 +427,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
Text
(
orderDetails
.
accountName
==
""
?
"-"
:
orderDetails
.
accountName
??
"-"
,
:
orderDetails
.
accountName
??
"-"
,
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
...
...
@@ -472,15 +478,12 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
getTextColor
(
orderDetails
.
status
,
),
color:
getTextColor
(
orderDetails
.
status
),
),
),
),
),
),
],
),
SizedBox
(
height:
10
),
...
...
@@ -499,9 +502,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
4
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -529,9 +530,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
Column
(
children:
List
.
generate
(
headings
.
length
,
(
j
,
)
{
children:
List
.
generate
(
headings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
,
...
...
@@ -544,8 +543,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -566,22 +564,16 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
fontSize:
14
,
decoration:
subHeadings
[
j
]
==
"View"
subHeadings
[
j
]
==
"View"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
:
TextDecoration
.
none
,
decorationColor:
AppColors
.
app_blue
,
color:
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
,
),
subHeadings
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
),
),
),
...
...
@@ -619,9 +611,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
...
...
@@ -644,11 +634,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
///product details
if
(
productsHistory
.
isNotEmpty
)
...[
Container
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -681,8 +667,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
260
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -753,8 +738,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
AppColors
.
app_blue
,
),
),
),
...
...
@@ -844,8 +828,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -863,23 +846,23 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
feedbackHistory
[
lp
]
.
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
feedbackHistory
[
lp
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
...
...
@@ -940,7 +923,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
...
List
.
generate
(
1
,
(
j
)
{
final
heads
=
[
// "Unit Price",
"Total Price"
"Total Price"
,
];
final
subHeads
=
[
// "₹ ${productsHistory[lp].unitPrice ?? "-"}",
...
...
@@ -959,8 +942,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -978,23 +960,23 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
feedbackHistory
[
lp
]
.
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
feedbackHistory
[
lp
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
...
...
@@ -1032,11 +1014,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
///Feedback details
Container
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -1090,8 +1068,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
220
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -1106,8 +1083,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -1142,7 +1118,9 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
.
employeNaem
??
"-"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
...
...
@@ -1188,9 +1166,10 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
Center
(
child:
Text
(
textAlign:
TextAlign
.
center
,
"
${feedbackHistory[lp].status ?? "-"}
"
,
TextAlign
.
center
,
feedbackHistory
[
lp
]
.
status
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
...
...
@@ -1241,10 +1220,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
...
List
.
generate
(
2
,
(
j
)
{
final
heads
=
[
"Feedback"
,
"Attachment"
,
];
final
heads
=
[
"Feedback"
,
"Attachment"
];
final
subHeads
=
[
feedbackHistory
[
lp
].
feedback
??
"-"
,
"View"
,
...
...
@@ -1258,13 +1234,12 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
flex:
1
,
child:
Text
(
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
...
...
@@ -1272,7 +1247,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
if
(
subHeads
[
j
]
==
"View"
)
...[
Expanded
(
flex:
3
,
flex:
3
,
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
...
...
@@ -1283,23 +1258,23 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
context
,
)
=>
Fileviewer
(
fileName:
feedbackHistory
[
lp
].
attachmentViewFileName
!,
feedbackHistory
[
lp
]
.
attachmentViewFileName
!,
fileUrl:
feedbackHistory
[
lp
].
attachmentDirFilePath
!,
feedbackHistory
[
lp
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
...
...
@@ -1311,13 +1286,13 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
]
else
...[
Expanded
(
flex:
4
,
flex:
4
,
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
maxLines:
2
,
maxLines:
2
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
...
...
@@ -1366,14 +1341,9 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
],
///PaymentHistory details
if
(
paymentHistory
.
isNotEmpty
)
...[
Container
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -1387,7 +1357,6 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
],
),
),
...
...
@@ -1406,9 +1375,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
itemBuilder:
(
context
,
lp
)
{
return
Container
(
height:
225
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
...
...
@@ -1417,15 +1384,12 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -1442,8 +1406,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
Column
(
// mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
...
...
@@ -1463,22 +1426,18 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹
${paymentHistory[lp]
.amount ??
"-"}
"
,
"₹
${paymentHistory[lp].amount ?? "-"}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
...
...
@@ -1497,27 +1456,23 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
flex:
2
,
child:
Container
(
height:
45
,
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
processed_bg_color
,
borderRadius:
BorderRadius
.
circular
(
color:
AppColors
.
processed_bg_color
,
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
Center
(
child:
Text
(
paymentHistory
[
lp
].
approvalStatus
??
"-"
,
textAlign:
TextAlign
.
right
,
paymentHistory
[
lp
]
.
approvalStatus
??
"-"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
...
...
@@ -1527,13 +1482,10 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
),
child:
Row
(
children:
[
Expanded
(
...
...
@@ -1542,8 +1494,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
"Payment Info"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
...
...
@@ -1552,8 +1503,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
...
...
@@ -1569,17 +1519,10 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
"Payment Date"
,
];
final
subHeadsa
=
[
paymentHistory
[
lp
]
.
paymentType
??
"-"
,
paymentHistory
[
lp
]
.
refNo
??
"-"
,
"₹
${paymentHistory[lp]
.adjustedAmount ??
"-"}
"
,
paymentHistory
[
lp
]
.
paymentDate
??
"-"
,
paymentHistory
[
lp
].
paymentType
??
"-"
,
paymentHistory
[
lp
].
refNo
??
"-"
,
"₹
${paymentHistory[lp].adjustedAmount ?? "-"}
"
,
paymentHistory
[
lp
].
paymentDate
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -1594,27 +1537,21 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
textAlign:
TextAlign
.
left
,
headsa
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
subHeadsa
[
j
]
==
""
?
"-"
:
subHeadsa
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
color:
Color
(
0xFF818181
),
),
),
),
...
...
@@ -1622,7 +1559,6 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
);
}),
],
),
);
...
...
@@ -1635,18 +1571,13 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
],
),
),
bottomNavigationBar:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
bottomNavigationBar:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
alignment:
Alignment
.
center
,
height:
65
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
child:
InkResponse
(
onTap:
()
{
...
...
@@ -1655,8 +1586,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
// context,
// provider.requestsDetails.id,
// );
_showLevelApprovalSheet
(
context
);
_showLevelApprovalSheet
(
context
);
},
child:
Container
(
// decoration: BoxDecoration(
...
...
@@ -1670,14 +1600,14 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
),
SizedBox
(
width:
10
,),
SvgPicture
.
asset
(
"assets/svg/finance/level_approve_ic.svg"
,
),
SizedBox
(
width:
10
),
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
),
style:
TextStyle
(
color:
AppColors
.
semi_black
),
),
),
],
...
...
@@ -1685,24 +1615,17 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
],
),
),
);
},
);
}
Widget
_scaffold1
(
BuildContext
context
)
{
return
Consumer2
<
Pagesdashboardprovider
,
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
tpcProvider
,
child
)
{
return
Consumer2
<
Pagesdashboardprovider
,
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
tpcProvider
,
child
)
{
var
orderDetails
=
provider
.
orderDetails
;
var
Headings1
=
[
...
...
@@ -1718,7 +1641,6 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
provider
.
orderDetails
.
orderReceivedDate
??
"-"
,
];
var
Headings2
=
[
"Billing State"
,
"Billing District"
,
...
...
@@ -1769,7 +1691,6 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
"Status"
,
];
var
subHeadings2
=
[
provider
.
orderDetails
.
billingState
??
"-"
,
provider
.
orderDetails
.
billingDistrict
??
"-"
,
provider
.
orderDetails
.
billingSubLocality
??
"-"
,
...
...
@@ -1819,34 +1740,30 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
provider
.
orderDetails
.
status
??
"-"
,
];
var
Headings
=
[...
Headings1
];
var
subHeadings
=
[...
subHeadings1
];
if
(
provider
.
showMoreDetails
){
Headings
=
[...
Headings1
,...
Headings2
];
subHeadings
=
[...
subHeadings1
,...
subHeadings2
];
if
(
provider
.
showMoreDetails
)
{
Headings
=
[...
Headings1
,
...
Headings2
];
subHeadings
=
[...
subHeadings1
,
...
subHeadings2
];
}
return
WillPopScope
(
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
InkResponse
(
onTap:
()
{
_showOptionsSheet
(
context
);
_showOptionsSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
,),
),),
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
...
...
@@ -1871,7 +1788,9 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
),
SizedBox
(
width:
10
),
...
...
@@ -1947,14 +1866,12 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
Headings
[
j
]
==
"Purchase Order"
)
{
if
(
Headings
[
j
]
==
"Purchase Order"
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
(
context
)
=>
Fileviewer
(
fileName:
orderDetails
.
tpcPaymentAttachementViewFileName
!,
...
...
@@ -1969,7 +1886,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
Text
(
Headings
[
j
]
==
"Purchase Order"
?
"View"
:
"
${
subHeadings[j]
}
"
,
:
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
...
...
@@ -1994,27 +1911,25 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
...
...
@@ -2024,9 +1939,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
bottomNavigationBar:
Container
(
bottomNavigationBar:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
alignment:
Alignment
.
bottomCenter
,
height:
60
,
...
...
@@ -2037,7 +1950,6 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
child:
InkResponse
(
onTap:
()
{
...
...
@@ -2046,8 +1958,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
// context,
// provider.requestsDetails.id,
// );
_showLevelApprovalSheet
(
context
);
_showLevelApprovalSheet
(
context
);
},
child:
Container
(
decoration:
BoxDecoration
(
...
...
@@ -2061,23 +1972,16 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
child:
Center
(
child:
Text
(
"Approve"
,
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
),
style:
TextStyle
(
color:
Color
(
0xFF0D9C00
)),
),
),
),
),
),
),
],
),
),
),
),
),
...
...
@@ -2089,8 +1993,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
);
}
Future
<
void
>
_showOptionsSheet
(
BuildContext
context
,)
{
Future
<
void
>
_showOptionsSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
...
...
@@ -2103,8 +2006,8 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer2
<
Pagesdashboardprovider
,
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
tpcProvider
,
child
)
{
child:
Consumer2
<
Pagesdashboardprovider
,
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
tpcProvider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
...
...
@@ -2112,7 +2015,9 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
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
,
...
...
@@ -2140,8 +2045,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
MaterialPageRoute
(
builder:
(
context
)
=>
Orderdetailspaymenthistory
(
),
Orderdetailspaymenthistory
(),
),
);
break
;
...
...
@@ -2152,8 +2056,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
MaterialPageRoute
(
builder:
(
context
)
=>
Orderdetailsproductshistory
(
),
Orderdetailsproductshistory
(),
),
);
break
;
...
...
@@ -2164,9 +2067,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
MaterialPageRoute
(
builder:
(
context
)
=>
Orderdetailsfeedbackhistory
(
),
Orderdetailsfeedbackhistory
(),
),
);
break
;
...
...
@@ -2175,9 +2076,10 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
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"
,
),
...
...
@@ -2219,7 +2121,9 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
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
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -2237,7 +2141,10 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
,
),
child:
Text
(
"Remarks"
),
),
Container
(
...
...
@@ -2248,14 +2155,22 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
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
,
readOnly:
true
,
keyboardType:
TextInputType
.
text
,
maxLines:
60
,
maxLines:
60
,
onChanged:
provider
.
onChangeFeedback
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
),
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
decoration:
InputDecoration
(
hintText:
"Write Remarks"
,
hintStyle:
TextStyle
(
...
...
@@ -2270,13 +2185,16 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
if
(
provider
.
feedbackError
!=
null
)...[
if
(
provider
.
feedbackError
!=
null
)
...[
Container
(
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
top:
2.5
,
left:
25
),
child:
Text
(
"
${provider.feedbackError}
"
,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
),
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
,
),
),
),
],
...
...
@@ -2307,31 +2225,48 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
),),
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
],
),
)
)
,
],
InkWell
(
onTap:
()
{
provider
.
ordersDetailsFeedbackSubmissionAPIFunction
(
context
,
orderDetails
.
id
,
orderDetails
.
status
);
provider
.
ordersDetailsFeedbackSubmissionAPIFunction
(
context
,
orderDetails
.
id
,
orderDetails
.
status
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
...
...
@@ -2363,9 +2298,6 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
);
}
Future
<
void
>
_showLevelApprovalSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -2380,8 +2312,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Tpcagentsprovider
>(
builder:
(
context
,
tcpProvider
,
child
)
{
builder:
(
context
,
tcpProvider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
...
...
@@ -2389,7 +2320,9 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
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
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -2408,7 +2341,9 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
bottom:
5.0
,
top:
8.0
,
),
child:
Text
(
"TPC Payment Mode"
),
),
Container
(
...
...
@@ -2420,16 +2355,22 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
10.0
,
0.0
,
10
,
0
,
),
child:
TextFormField
(
controller:
tcpProvider
.
tpcPaymentModeController
,
controller:
tcpProvider
.
tpcPaymentModeController
,
readOnly:
true
,
keyboardType:
TextInputType
.
text
,
maxLines:
1
,
onChanged:
tcpProvider
.
onChangeTPCPayment
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
),
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
decoration:
InputDecoration
(
hintText:
"Enter Company Name"
,
hintStyle:
TextStyle
(
...
...
@@ -2444,20 +2385,27 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
if
(
tcpProvider
.
tpcPaymentModeError
!=
null
)...[
if
(
tcpProvider
.
tpcPaymentModeError
!=
null
)
...[
Container
(
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
top:
2.5
,
left:
25
),
child:
Text
(
"
${tcpProvider.tpcPaymentModeError}
"
,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
),
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
,
),
),
),
],
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
child:
Text
(
"TPC Payment Reference No. /Cheque No. / UTR No."
),
bottom:
5.0
,
top:
8.0
,
),
child:
Text
(
"TPC Payment Reference No. /Cheque No. / UTR No."
,
),
),
Container
(
height:
50
,
...
...
@@ -2468,16 +2416,23 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
10.0
,
0.0
,
10
,
0
,
),
child:
TextFormField
(
controller:
tcpProvider
.
tpcPaymentModeController
,
controller:
tcpProvider
.
tpcPaymentModeController
,
readOnly:
true
,
keyboardType:
TextInputType
.
text
,
maxLines:
1
,
onChanged:
tcpProvider
.
onChangeTPCPaymentReference
,
onChanged:
tcpProvider
.
onChangeTPCPaymentReference
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
),
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
decoration:
InputDecoration
(
hintText:
"Enter Order Number"
,
hintStyle:
TextStyle
(
...
...
@@ -2492,22 +2447,26 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
if
(
tcpProvider
.
tpcPaymentReferenceNoError
!=
null
)...[
if
(
tcpProvider
.
tpcPaymentReferenceNoError
!=
null
)
...[
Container
(
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
top:
2.5
,
left:
25
),
child:
Text
(
"
${tcpProvider.tpcPaymentReferenceNoError}
"
,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
),
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
,
),
),
),
],
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
,
top:
8.0
),
bottom:
5.0
,
top:
8.0
,
),
child:
Text
(
"Remarks"
),
),
Container
(
...
...
@@ -2519,16 +2478,22 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
10.0
,
0.0
,
10
,
0
,
),
child:
TextFormField
(
controller:
tcpProvider
.
orderTpcFeedbackController
,
controller:
tcpProvider
.
orderTpcFeedbackController
,
readOnly:
true
,
keyboardType:
TextInputType
.
text
,
maxLines:
60
,
onChanged:
tcpProvider
.
onChangeTpcFeedback
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
fontSize:
14
),
color:
Color
(
0xFF818181
),
fontSize:
14
,
),
decoration:
InputDecoration
(
hintText:
"Write Remarks"
,
hintStyle:
TextStyle
(
...
...
@@ -2543,13 +2508,16 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
if
(
tcpProvider
.
orderTpcFeedbackError
!=
null
)...[
if
(
tcpProvider
.
orderTpcFeedbackError
!=
null
)
...[
Container
(
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
top:
2.5
,
left:
25
),
child:
Text
(
"
${tcpProvider.orderTpcFeedbackError}
"
,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
),
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
10
,
),
),
),
],
...
...
@@ -2580,32 +2548,47 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
),
),
if
(
tcpProvider
.
imagePicked
==
1
&&
tcpProvider
.
imagePath
!=
null
)...[
if
(
tcpProvider
.
imagePicked
==
1
&&
tcpProvider
.
imagePath
!=
null
)
...[
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
"
${tcpProvider.imagePath}
"
,
style:
TextStyle
(
Text
(
"
${tcpProvider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
),),
fontWeight:
FontWeight
.
w600
,
),
),
InkResponse
(
onTap:
()
{
tcpProvider
.
imagePicked
=
0
;
tcpProvider
.
imagePath
=
null
;
tcpProvider
.
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
,
),
),
],
),
)
)
,
],
InkWell
(
onTap:
()
{
tcpProvider
.
TPCAgentsIssueApprovalAPIFunction
(
context
,
widget
.
orderId
);
tcpProvider
.
TPCAgentsIssueApprovalAPIFunction
(
context
,
widget
.
orderId
,
);
},
child:
Container
(
...
...
@@ -2657,18 +2640,13 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Tpcagentsprovider
>(
builder:
(
context
,
tcpProvider
,
child
)
{
builder:
(
context
,
tcpProvider
,
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
(
...
...
@@ -2689,17 +2667,17 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
"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
);
tcpProvider
.
imgFromGallery
(
context
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Select photo from gallery"
),
),
...
...
@@ -2708,10 +2686,9 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
InkWell
(
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
tcpProvider
.
imgFromCamera
(
context
);
tcpProvider
.
imgFromCamera
(
context
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Capture photo from camera"
),
),
...
...
@@ -2729,5 +2706,4 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
},
);
}
}
lib/screens/order/tpcAgentListByMode.dart
View file @
7210793a
...
...
@@ -13,12 +13,16 @@ import '../../Utils/commonWidgets.dart';
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:generp/Utils/commonServices.dart'
;
class
Tpcagentlistbymode
extends
StatefulWidget
{
final
pageTitleName
;
final
mode
;
const
Tpcagentlistbymode
(
{
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
mode
});
const
Tpcagentlistbymode
({
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
mode
,
});
@override
State
<
Tpcagentlistbymode
>
createState
()
=>
_TpcagentlistbymodeState
();
...
...
@@ -59,7 +63,6 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
switch
(
_source
.
keys
.
toList
()[
0
])
{
...
...
@@ -77,7 +80,10 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
{
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
).
resetAll
();
Provider
.
of
<
Tpcagentsprovider
>(
context
,
listen:
false
,
).
resetAll
();
return
onBackPressed
(
context
);
},
child:
SafeArea
(
...
...
@@ -91,7 +97,6 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
tpcAgentsLists
=
provider
.
tpcAgentsList
;
...
...
@@ -109,18 +114,18 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
),
0xFFFFFFFF
0xFFFFFFFF
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
&&
tpcAgentsLists
.
isEmpty
body:
provider
.
isLoading
&&
tpcAgentsLists
.
isEmpty
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
),
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
tpcAgentsLists
.
isNotEmpty
...
...
@@ -134,7 +139,8 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
},
child:
ListView
.
builder
(
controller:
_scrollController
,
itemCount:
tpcAgentsLists
.
length
+
itemCount:
tpcAgentsLists
.
length
+
(
provider
.
hasMoreData
?
1
:
0
),
itemBuilder:
(
context
,
index
)
{
if
(
index
==
tpcAgentsLists
.
length
)
{
...
...
@@ -142,7 +148,8 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
?
const
Padding
(
padding:
EdgeInsets
.
all
(
16
),
child:
Center
(
child:
CircularProgressIndicator
()),
child:
CircularProgressIndicator
(),
),
)
:
const
SizedBox
.
shrink
();
}
...
...
@@ -150,13 +157,18 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
final
agent
=
tpcAgentsLists
[
index
];
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
tpcAgentId:
tpcAgentsLists
[
index
]
.
tpcAgentId
,
),));
tpcAgentId:
tpcAgentsLists
[
index
].
tpcAgentId
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -177,7 +189,7 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
children:
[
Expanded
(
flex:
1
,
child:
Container
(
child:
SizedBox
(
height:
50
,
width:
35
,
...
...
@@ -204,20 +216,15 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"
${tpcAgentsLists[index]
.mobileNumber}
"
,
"
${tpcAgentsLists[index].mobileNumber}
"
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
...
...
@@ -232,8 +239,7 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
child:
InkResponse
(
onTap:
()
{
launch
(
'tel://
${tpcAgentsLists[index]
.mobileNumber}
'
,
'tel://
${tpcAgentsLists[index].mobileNumber}
'
,
);
},
child:
SizedBox
(
...
...
@@ -245,11 +251,8 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
),
),
],
),
],
),
),
...
...
@@ -263,10 +266,7 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
);
}
Widget
_scaffold1
(
BuildContext
context
)
{
return
Consumer
<
Tpcagentsprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
tpcAgentsLists
=
provider
.
tpcAgentsList
;
...
...
@@ -277,7 +277,7 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
...
...
@@ -292,19 +292,21 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
tpcAgentsLists
.
isNotEmpty
?
SingleChildScrollView
(
AppColors
.
app_blue
,
),
),
)
:
tpcAgentsLists
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
...
...
@@ -371,9 +373,7 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
),
Text
(
"
${tpcAgentsLists[index]
.mobileNumber}
"
,
"
${tpcAgentsLists[index].mobileNumber}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
...
...
@@ -385,7 +385,6 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
),
),
],
),
Divider
(
...
...
@@ -424,38 +423,47 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
),
),
if
(
subHeadings
[
j
]
==
"View"
)...[
if
(
subHeadings
[
j
]
==
"View"
)
...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
tpcAgentsLists
[
index
]
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
tpcAgentsLists
[
index
]
.
idProofViewFileName
??
"-"
,
fileUrl:
tpcAgentsLists
[
index
]
fileUrl:
tpcAgentsLists
[
index
]
.
idProofDirFilePath
??
"-"
),));
"-"
,
),
),
);
},
child:
Text
(
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
decoration:
TextDecoration
color:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
decorationColor:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
),
),
),
),
]
else
...[
]
else
...[
Expanded
(
child:
InkResponse
(
child:
Text
(
"
${subHeadings[j]}
"
,
style:
TextStyle
(
...
...
@@ -463,29 +471,37 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
color:
Color
(
0xFF818181
,
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
),
]
],
],
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
tpcAgentId:
tpcAgentsLists
[
index
]
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
tpcAgentId:
tpcAgentsLists
[
index
]
.
tpcAgentId
,
),));
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -520,7 +536,8 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
],
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
),
),
);
...
...
lib/screens/serviceEngineer/AccountSuggestions.dart
View file @
7210793a
...
...
@@ -30,7 +30,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbarNew
(
context
,
"Accounts"
,
0xFFFFFFFF
),
appBar:
appbarNew
(
context
,
"Accounts"
,
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
...
...
@@ -91,8 +91,9 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
),
suffixIcon:
Container
(
padding:
EdgeInsets
.
only
(
right:
10
),
child:
_searchController
.
text
.
isNotEmpty
?
InkResponse
(
child:
_searchController
.
text
.
isNotEmpty
?
InkResponse
(
onTap:
()
{
_searchController
.
clear
();
provider
.
accountList
.
clear
();
...
...
@@ -100,8 +101,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
child:
SvgPicture
.
asset
(
"assets/svg/crm/clear_search.svg"
,
),
)
:
SvgPicture
.
asset
(
)
:
SvgPicture
.
asset
(
"assets/svg/search_ic.svg"
,
),
),
...
...
@@ -144,18 +145,22 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
physics:
AlwaysScrollableScrollPhysics
(),
child:
Container
(
child:
ListView
.
builder
(
itemCount:
provider
.
accountList
!
.
length
,
itemCount:
provider
.
accountList
.
length
,
padding:
const
EdgeInsets
.
all
(
5
),
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemBuilder:
(
context
,
index
)
{
var
accountList
=
provider
.
accountList
;
String
accname
=
provider
.
accountList
[
index
].
accountName
??
""
;
RegExp
regex
=
RegExp
(
_searchController
.
text
,
caseSensitive:
false
);
Iterable
<
Match
>
matches
=
regex
.
allMatches
(
accname
);
String
accname
=
provider
.
accountList
[
index
].
accountName
??
""
;
RegExp
regex
=
RegExp
(
_searchController
.
text
,
caseSensitive:
false
,
);
Iterable
<
Match
>
matches
=
regex
.
allMatches
(
accname
,
);
List
<
TextSpan
>
textSpans
=
[];
int
previousMatchEnd
=
0
;
...
...
@@ -166,7 +171,9 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
textSpans
.
add
(
TextSpan
(
text:
accname
.
substring
(
previousMatchEnd
,
match
.
start
),
previousMatchEnd
,
match
.
start
,
),
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
...
...
@@ -180,7 +187,9 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
textSpans
.
add
(
TextSpan
(
text:
accname
.
substring
(
match
.
start
,
match
.
end
),
match
.
start
,
match
.
end
,
),
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
14
,
// Highlight color
...
...
@@ -205,7 +214,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
),
);
}
if
(
accountList
!.
length
>
0
)
{
if
(
accountList
!.
isNotEmpty
)
{
return
InkWell
(
onTap:
()
{
// if(actname == "pendingComplaints"&&status=="Open"){
...
...
@@ -216,18 +225,18 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
(
context
)
=>
Paymentdetails
(
accountName:
"Account"
,
name:
accountList
!
[
index
]
accountList
[
index
]
.
accountName
,
genId:
""
,
referenceID:
accountList
!
[
index
].
accountId
,
accountList
[
index
].
accountId
,
),
),
);
// }
},
child:
SizedBox
(
child:
Container
(
child:
SizedBox
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
...
...
@@ -278,18 +287,20 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
leading:
SvgPicture
.
asset
(
"assets/svg/crm/crm_search_list_ic.svg"
,
),
title:
RichText
(
text:
TextSpan
(
title:
RichText
(
text:
TextSpan
(
children:
textSpans
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
// Highlight color
fontFamily:
"JakartaMedium"
,
),
)),
),
),
trailing:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
)
)
,
),
),
);
...
...
lib/screens/serviceEngineer/NearbyGenerators.dart
View file @
7210793a
...
...
@@ -28,9 +28,12 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
var
provider
=
Provider
.
of
<
Nearbygeneratorsprovider
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
Nearbygeneratorsprovider
>(
context
,
listen:
false
,
);
provider
.
getLocationPermission
(
context
);
}
,
);
});
}
// Future infoDialogue(BuildContext context) async {
...
...
@@ -207,25 +210,32 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
@override
Widget
build
(
BuildContext
context
)
{
debugPrint
(
"Nearbygenerators widget rebuilt"
);
return
Consumer
<
Nearbygeneratorsprovider
>(
builder:
(
context
,
provider
,
child
)
{
return
Consumer
<
Nearbygeneratorsprovider
>(
builder:
(
context
,
provider
,
child
)
{
var
sendWidget
=
GestureDetector
(
onTap:
()
{
_showFilterBottomSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,));
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
),
);
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
"Nearby Generators"
,
provider
.
resetAll
,
sendWidget
),
appBar:
appbar2
(
context
,
"Nearby Generators"
,
provider
.
resetAll
,
sendWidget
,
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
ClipRRect
(
// Apply border radius using ClipRRect
...
...
@@ -234,9 +244,10 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
topRight:
Radius
.
circular
(
30.0
),
),
// padding: EdgeInsets.fromLTRB(10, 20, 10, 20),
child:
Container
(
child:
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
Stack
(
children:
[
child:
Stack
(
children:
[
GoogleMap
(
scrollGesturesEnabled:
true
,
rotateGesturesEnabled:
true
,
...
...
@@ -245,15 +256,21 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
zoomGesturesEnabled:
true
,
zoomControlsEnabled:
true
,
gestureRecognizers:
{
Factory
<
OneSequenceGestureRecognizer
>(()
=>
EagerGestureRecognizer
()),
Factory
<
PanGestureRecognizer
>(()
=>
PanGestureRecognizer
()),
Factory
<
ScaleGestureRecognizer
>(()
=>
ScaleGestureRecognizer
()),
// Prioritize pinch-to-zoom
Factory
<
OneSequenceGestureRecognizer
>(
()
=>
EagerGestureRecognizer
(),
),
Factory
<
PanGestureRecognizer
>(
()
=>
PanGestureRecognizer
(),
),
Factory
<
ScaleGestureRecognizer
>(
()
=>
ScaleGestureRecognizer
(),
),
// Prioritize pinch-to-zoom
},
initialCameraPosition:
CameraPosition
(
target:
provider
.
startLocation
,
zoom:
14.0
zoom:
14.0
,
),
markers:
provider
.
markers
.
toSet
(),
markers:
provider
.
markers
.
toSet
(),
mapType:
MapType
.
normal
,
onMapCreated:
(
controller
)
{
setState
(()
{
...
...
@@ -261,10 +278,11 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
});
},
onCameraMove:
(
position
)
{
provider
.
onCameraMove
(
context
,
position
);
provider
.
onCameraMove
(
context
,
position
);
},
),
]),
],
),
),
),
],
...
...
@@ -274,10 +292,10 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
),
),
);
},);
},
);
}
Future
<
void
>
_showFilterBottomSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -292,7 +310,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
Nearbygeneratorsprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
...
...
@@ -300,7 +318,9 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
right:
15
,
top:
15
,
),
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
,
...
...
@@ -339,46 +359,53 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
Expanded
(
child:
Text
(
'Select Complaint Status'
,
style:
TextStyle
(
fontSize:
14
,
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
),
),
],
),
items:
<
String
>[
items:
<
String
>[
'Active'
,
'Inactive'
,
'Suspense'
,
].
map
(
(
value
)
=>
DropdownMenuItem
<
String
>(
]
.
map
(
(
value
,
)
=>
DropdownMenuItem
<
String
>(
value:
value
,
child:
Text
(
value
??
''
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
)).
toList
(),
),
)
.
toList
(),
value:
provider
.
selectedItem
,
onChanged:
(
String
?
newValue
)
{
setState
(()
{
provider
.
selectedItem
=
newValue
!;
});
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
),
),
SizedBox
(
height:
10
,
),
SizedBox
(
height:
10
),
Row
(
children:
[
Text
(
...
...
@@ -399,14 +426,17 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
],
),
InteractiveSlider
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
4
,
vertical:
0
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
4
,
vertical:
0
,
),
min:
1.0
,
max:
50.0
,
enabled:
true
,
// backgroundColor: AppColors.app_blue,
foregroundColor:
AppColors
.
app_blue
,
segmentDividerColor:
Color
(
0xFFF6F6F8
),
segmentDividerColor:
Color
(
0xFFF6F6F8
),
onChanged:
(
value
)
{
provider
.
currentValue
=
value
;
// provider.debounce(() {
...
...
@@ -434,7 +464,10 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
child:
InkWell
(
onTap:
()
{
provider
.
debounce
(()
{
provider
.
LoadNearbyGeneratorsAPI
(
context
,
provider
.
currentValue
);
provider
.
LoadNearbyGeneratorsAPI
(
context
,
provider
.
currentValue
,
);
Navigator
.
pop
(
context
);
},
Duration
(
milliseconds:
500
));
},
...
...
@@ -447,14 +480,14 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14.0
),
color:
AppColors
.
app_blue
color:
AppColors
.
app_blue
,
),
child:
Text
(
"Search"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
'JakartaMedium'
,
color:
Colors
.
white
color:
Colors
.
white
,
),
),
),
...
...
@@ -466,7 +499,7 @@ class _NearbygeneratorsState extends State<Nearbygenerators> {
),
),
);
}
}
,
),
);
},
...
...
lib/screens/serviceEngineer/PCWallet.dart
View file @
7210793a
...
...
@@ -70,7 +70,6 @@ class _PcwalletState extends State<Pcwallet> {
:
NoNetwork
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Pcwalletprovider
>(
builder:
(
context
,
provider
,
child
)
{
...
...
@@ -79,9 +78,10 @@ class _PcwalletState extends State<Pcwallet> {
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
///Container(
// padding: EdgeInsets.symmetric(horizontal: 10),
// height: 40,
...
...
@@ -111,7 +111,10 @@ class _PcwalletState extends State<Pcwallet> {
child:
Column
(
children:
[
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
...
...
@@ -219,14 +222,18 @@ class _PcwalletState extends State<Pcwallet> {
maxLines:
1
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
svgs
[
jj
]),
child:
SvgPicture
.
asset
(
svgs
[
jj
],
),
),
],
),
...
...
@@ -238,28 +245,31 @@ class _PcwalletState extends State<Pcwallet> {
}),
],
),
SizedBox
(
height:
5
,
)
SizedBox
(
height:
5
)
,
],
),
),
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemCount:
provider
.
historyList
.
length
,
itemBuilder:
(
context
,
index
)
{
double
running
_b
alance
=
0
;
double
running
B
alance
=
0
;
int
currentIndex
=
provider
.
historyList
.
indexOf
(
provider
.
historyList
[
index
],
);
String
part1
=
provider
.
historyList
[
index
].
description
!.
split
(
' ('
).
first
;
provider
.
historyList
[
index
].
description
!
.
split
(
' ('
)
.
first
;
RegExp
regExp
=
RegExp
(
r'\(([^)]+)\)'
);
String
?
part2
=
regExp
.
firstMatch
(
provider
.
historyList
[
index
].
description
!)
.
firstMatch
(
provider
.
historyList
[
index
].
description
!,
)
?.
group
(
1
);
return
Container
(
...
...
@@ -267,7 +277,10 @@ class _PcwalletState extends State<Pcwallet> {
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
// margin: EdgeInsets.symmetric(vertical: 5),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -281,7 +294,9 @@ class _PcwalletState extends State<Pcwallet> {
flex:
1
,
child:
SizedBox
(
child:
provider
.
historyList
[
index
].
transactionType
==
provider
.
historyList
[
index
]
.
transactionType
==
"Debit"
?
SvgPicture
.
asset
(
"assets/svg/finance/debited_filled_ic.svg"
,
...
...
@@ -304,7 +319,8 @@ class _PcwalletState extends State<Pcwallet> {
child:
Column
(
children:
[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
// Expanded(
// flex: 5,
...
...
@@ -324,25 +340,30 @@ class _PcwalletState extends State<Pcwallet> {
// ),
// ),
Expanded
(
flex:
5
,
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
part1
,
Text
(
part1
,
maxLines:
2
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
),),
if
(
part2
!=
null
)
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
),
),
if
(
part2
!=
null
)
Text
(
"
${
part2
}
"
,
part2
,
maxLines:
2
,
style:
TextStyle
(
color:
AppColors
.
grey_semi
,
fontSize:
14
color:
AppColors
.
grey_semi
,
fontSize:
14
,
),
),
],
...
...
@@ -356,7 +377,8 @@ class _PcwalletState extends State<Pcwallet> {
child:
RichText
(
maxLines:
1
,
textAlign:
TextAlign
.
right
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
text:
TextSpan
(
children:
[
TextSpan
(
...
...
@@ -373,8 +395,12 @@ class _PcwalletState extends State<Pcwallet> {
.
historyList
[
index
]
.
transactionType
==
"Debit"
?
Color
(
0xFFEF3739
)
:
Color
(
0xFF0D9C00
),
?
Color
(
0xFFEF3739
,
)
:
Color
(
0xFF0D9C00
,
),
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
...
...
@@ -384,12 +410,17 @@ class _PcwalletState extends State<Pcwallet> {
text:
"₹
${provider.historyList[index].transactionType == "Debit" ? "${provider.historyList[index].amount}
"
:
"
${provider.historyList[index].amount}
"
}
",
style: TextStyle(
color: provider
color:
provider
.historyList[index]
.transactionType ==
"
Debit
"
? Color(0xFFEF3739)
: Color(0xFF0D9C00),
? Color(
0xFFEF3739,
)
: Color(
0xFF0D9C00,
),
fontSize: 14,
fontFamily:
"
JakartaRegular
",
...
...
@@ -402,7 +433,7 @@ class _PcwalletState extends State<Pcwallet> {
),
],
),
SizedBox(height: 7
,
),
SizedBox(height: 7),
Row(
children: [
Expanded(
...
...
@@ -414,16 +445,17 @@ class _PcwalletState extends State<Pcwallet> {
.datetime ??
"
-
",
maxLines: 2,
overflow: TextOverflow.ellipsis,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontFamily: "
JakartaRegular
",
fontFamily:
"
JakartaRegular
",
color: AppColors.grey_semi,
fontSize: 12,
),
),
),
),
],
),
],
...
...
@@ -446,7 +478,6 @@ class _PcwalletState extends State<Pcwallet> {
);
}
Widget _scaffold1(BuildContext context) {
return Consumer<Pcwalletprovider>(
builder: (context, provider, child) {
...
...
@@ -455,9 +486,10 @@ class _PcwalletState extends State<Pcwallet> {
onWillPop: () => onBackPressed(context),
child: SafeArea(
top: false,
bottom: Platform.isIOS
?
false
:
true,
bottom: Platform.isIOS
?
false
:
true,
child: Scaffold(
resizeToAvoidBottomInset: true,
///Container(
// padding: EdgeInsets.symmetric(horizontal: 10),
// height: 40,
...
...
@@ -486,9 +518,11 @@ class _PcwalletState extends State<Pcwallet> {
child: SingleChildScrollView(
child: Column(
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 15),
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 15,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
...
...
@@ -509,7 +543,8 @@ class _PcwalletState extends State<Pcwallet> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
"
₹
",
...
...
@@ -519,7 +554,8 @@ class _PcwalletState extends State<Pcwallet> {
),
),
Text(
"
$
{
provider
.
totlDetails
.
creditAmount
??
"0.00"
}
",
provider.totlDetails.creditAmount ??
"
0.00
",
style: TextStyle(
fontSize: 30,
height: 1,
...
...
@@ -528,9 +564,12 @@ class _PcwalletState extends State<Pcwallet> {
),
],
),
Text("
Credited
",style: TextStyle(
fontFamily: "
JakartaMedium
"
),),
Text(
"
Credited
",
style: TextStyle(
fontFamily: "
JakartaMedium
",
),
),
],
),
),
...
...
@@ -550,7 +589,8 @@ class _PcwalletState extends State<Pcwallet> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
"
₹
",
...
...
@@ -560,7 +600,7 @@ class _PcwalletState extends State<Pcwallet> {
),
),
Text(
"
$
{
provider
.
totlDetails
.
debitAmount
??
0.00
}
",
"
$
{
provider
.
totlDetails
.
debitAmount
??
0.00
}
",
style: TextStyle(
fontSize: 30,
height: 1,
...
...
@@ -569,9 +609,12 @@ class _PcwalletState extends State<Pcwallet> {
),
],
),
Text("
Debited
",style: TextStyle(
fontFamily: "
JakartaMedium
"
)),
Text(
"
Debited
",
style: TextStyle(
fontFamily: "
JakartaMedium
",
),
),
],
),
),
...
...
@@ -627,9 +670,10 @@ class _PcwalletState extends State<Pcwallet> {
MainAxisAlignment.start,
children: [
Expanded(
flex:1,
flex:
1,
child: SizedBox(
child: item.transactionType == "
Credit
"
child:
item.transactionType == "
Credit
"
? Image.asset(
"
assets
/
images
/
trans_credit
.
png
",
height: 45,
...
...
@@ -644,19 +688,22 @@ class _PcwalletState extends State<Pcwallet> {
),
),
),
SizedBox(width: 10
,
),
SizedBox(width: 10),
Expanded(
flex:5,
flex:
5,
child: SizedBox(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(part1,style: TextStyle(
fontFamily: "
JakartaMedium
"
),),
Text(
"
$
{
part2
}
",
part1,
style: TextStyle(
fontFamily: "
JakartaMedium
",
),
),
Text(
"
$part2
",
style: TextStyle(
color: Color(0xFF818181),
),
...
...
@@ -673,13 +720,16 @@ class _PcwalletState extends State<Pcwallet> {
text: TextSpan(
children: [
TextSpan(
text: item.transactionType ==
text:
item.transactionType ==
"
Credit
"
? "
+
":"
-
",
? "
+
"
: "
-
",
style: TextStyle(
color: Color(0xFF2D2D2D),
fontSize: 14,
fontFamily: "
JakartaRegular
",
fontFamily:
"
JakartaRegular
",
),
),
TextSpan(
...
...
@@ -687,7 +737,8 @@ class _PcwalletState extends State<Pcwallet> {
style: TextStyle(
color: Color(0xFF2D2D2D),
fontSize: 14,
fontFamily: "
JakartaMedium
",
fontFamily:
"
JakartaMedium
",
),
),
],
...
...
@@ -698,13 +749,12 @@ class _PcwalletState extends State<Pcwallet> {
],
),
);
})
.toList()
,
}),
],
),
);
},
),
],
),
),
...
...
lib/screens/serviceEngineer/PaymentDetails.dart
View file @
7210793a
...
...
@@ -73,7 +73,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbarNew
(
context
,
"Payment Details"
,
0xFFFFFFFF
),
appBar:
appbarNew
(
context
,
"Payment Details"
,
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SingleChildScrollView
(
child:
RefreshIndicator
.
adaptive
(
...
...
@@ -162,7 +162,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
],
),
);
})
.
toList
()
,
}),
DropdownMenuItem
<
Contacts
>(
onTap:
()
{},
value:
null
,
...
...
@@ -294,12 +294,10 @@ class _PaymentdetailsState extends State<Paymentdetails> {
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
PaymentMode
=
value
?
.
name
;
provider
.
paymentModeID
=
value
?
.
id
;
provider
.
PaymentMode
=
value
.
name
;
provider
.
paymentModeID
=
value
.
id
;
print
(
"hfjkshfg"
+
provider
.
paymentModeID
.
toString
(),
"hfjkshfg
${provider.paymentModeID}
"
,
);
}
}
...
...
@@ -438,7 +436,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
MainAxisAlignment
.
spaceBetween
,
children:
[
Expanded
(
flex:
5
,
flex:
5
,
child:
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
...
...
@@ -468,7 +466,6 @@ class _PaymentdetailsState extends State<Paymentdetails> {
),
],
errorWidget
(
context
,
provider
.
imageError
),
],
),
),
...
...
@@ -478,13 +475,11 @@ class _PaymentdetailsState extends State<Paymentdetails> {
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkWell
(
onTap:
()
{
provider
.
PaymentUpdateAPI
(
context
,
provider
.
Referencecontroller
.
text
,
provider
.
Amountcontroller
.
text
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
...
...
@@ -575,7 +570,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
provider
.
Amountcontroller
.
text
,
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Select photo from gallery"
),
),
...
...
@@ -590,7 +585,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
provider
.
Amountcontroller
.
text
,
);
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Capture photo from camera"
),
),
...
...
@@ -897,7 +892,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${
controllersNames[index]
}
"
),
Text
(
controllersNames
[
index
]),
Container
(
height:
50
,
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
...
...
@@ -946,7 +941,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
:
TextInputAction
.
next
,
decoration:
InputDecoration
(
counterText:
""
,
hintText:
"
${
hintTextNames[index]
}
"
,
hintText:
hintTextNames
[
index
],
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
...
...
@@ -959,7 +954,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
),
),
),
errorWidget
(
context
,
Errors
[
index
])
errorWidget
(
context
,
Errors
[
index
])
,
],
);
}),
...
...
lib/screens/serviceEngineer/PendingComplaints.dart
View file @
7210793a
...
...
@@ -135,7 +135,6 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
);
},
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -168,7 +167,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
?.
split
(
","
)
.
toString
();
var
uri
=
Uri
.
parse
(
"google.navigation:q=
${loc![0]}
,
${loc
!
[1]}
&mode=d"
,
"google.navigation:q=
${loc![0]}
,
${loc[1]}
&mode=d"
,
);
if
(
await
canLaunch
(
uri
.
toString
(),
...
...
@@ -190,8 +189,11 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Updatecomplaints
(
ComplaintID:
provider
(
context
,
)
=>
Updatecomplaints
(
ComplaintID:
provider
.
technician_complaint_list
[
index
]
.
complaintId
,
),
...
...
@@ -749,7 +751,7 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
?.
split
(
","
)
.
toString
();
var
uri
=
Uri
.
parse
(
"google.navigation:q=
${loc![0]}
,
${loc
!
[1]}
&mode=d"
,
"google.navigation:q=
${loc![0]}
,
${loc[1]}
&mode=d"
,
);
if
(
await
canLaunch
(
uri
.
toString
()))
{
await
launch
(
uri
.
toString
());
...
...
lib/screens/serviceEngineer/TodayMontlyVisists.dart
View file @
7210793a
...
...
@@ -22,7 +22,6 @@ class Todaymontlyvisists extends StatefulWidget {
}
class
_TodaymontlyvisistsState
extends
State
<
Todaymontlyvisists
>
{
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
...
...
@@ -52,6 +51,7 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
}
});
}
@override
void
dispose
()
{
// TODO: implement dispose
...
...
@@ -86,7 +86,6 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
:
NoNetwork
(
context
);
}
@override
Widget
_scaffold1
(
BuildContext
context
)
{
return
Consumer
<
Todaymontlyvisitsprovider
>(
...
...
@@ -95,12 +94,13 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbarNew
(
context
,
provider
.
title
,
0xFFFFFFFF
),
body:
provider
.
visitsList
.
isNotEmpty
appBar:
appbarNew
(
context
,
provider
.
title
,
0xFFFFFFFF
),
body:
provider
.
visitsList
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
...
...
@@ -140,22 +140,21 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
20
),
child:
Slidable
(
endActionPane:
ActionPane
(
motion:
const
ScrollMotion
(),
key:
ValueKey
(
provider
.
visitsList
[
index
].
complaintId
),
key:
ValueKey
(
provider
.
visitsList
[
index
].
complaintId
,
),
dragDismissible:
false
,
// dismissible: DismissiblePane(
//
// onDismissed: () {},
// closeOnCancel: true,
// resizeDuration: Duration(milliseconds: 300),),
children:
[
SlidableAction
(
onPressed:
(
context
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
...
...
@@ -183,7 +182,6 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
icon:
Icons
.
add
,
label:
'Payment Details'
,
),
],
),
...
...
@@ -194,11 +192,14 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
vertical:
0
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
flex:
1
,
...
...
@@ -209,7 +210,7 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
shape:
BoxShape
.
circle
shape:
BoxShape
.
circle
,
),
child:
SvgPicture
.
asset
(
width:
30
,
...
...
@@ -225,22 +226,33 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${provider.visitsList[index].contactName ?? "-"}
"
,
provider
.
visitsList
[
index
]
.
contactName
??
"-"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
),
),
Text
(
"
${provider.visitsList[index].companyName}
"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
Color
(
0xFF818181
,
),
),
),
],
...
...
@@ -266,8 +278,6 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
),
],
),
],
),
),
...
...
@@ -278,7 +288,7 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
},
),
)
:
Emptywidget
(
context
)
:
Emptywidget
(
context
)
,
),
),
);
...
...
@@ -293,12 +303,13 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
provider
.
title
),
body:
provider
.
visitsList
.
isNotEmpty
body:
provider
.
visitsList
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
...
...
@@ -324,7 +335,8 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
...
...
@@ -357,7 +369,10 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
CrossAxisAlignment
.
start
,
children:
[
Text
(
"
${provider.visitsList[index].contactName ?? "-"}
"
,
provider
.
visitsList
[
index
]
.
contactName
??
"-"
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
...
...
@@ -423,7 +438,9 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
provider
.
visitsList
[
index
].
address
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -528,7 +545,7 @@ class _TodaymontlyvisistsState extends State<Todaymontlyvisists> {
},
),
)
:
Emptywidget
(
context
)
:
Emptywidget
(
context
)
,
),
),
);
...
...
lib/screens/serviceEngineer/UpdateComplaints.dart
View file @
7210793a
...
...
@@ -45,7 +45,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
...
...
@@ -230,10 +230,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child:
Row
(
children:
[
Text
(
provider
.
selectedTime
.
hour
.
toString
()
+
":"
+
provider
.
selectedTime
.
minute
.
toString
()
??
"
${provider.selectedTime.hour}
:
${provider.selectedTime.minute}
"
??
"Enter in Time"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
...
...
@@ -451,11 +448,12 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
}
Widget
ErrorWidget
(
context
,
text
)
{
if
(
text
!=
null
)
if
(
text
!=
null
)
{
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
else
}
else
{
return
SizedBox
(
height:
10
);
}
}
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
...
...
@@ -508,7 +506,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromGallery
();
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Select photo from gallery"
),
),
...
...
@@ -519,7 +517,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
();
},
child:
Container
(
child:
SizedBox
(
height:
35
,
child:
Text
(
"Capture photo from camera"
),
),
...
...
Prev
1
…
10
11
12
13
14
15
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