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
256
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
256 of 256+
files are displayed.
Plain diff
Email patch
lib/screens/hrm/OrganizationStructureScreen.dart
View file @
7210793a
...
...
@@ -5,8 +5,8 @@ class OrganizationStructureScreen extends StatelessWidget {
Department
(
name:
"Engineering"
,
teams:
[
Team
(
name:
"Mobile Team"
,
members:
[
"Mohit"
,
"Srinivas"
,
]),
Team
(
name:
"Backend Team"
,
members:
[
"Dheeraj"
,
"Satya"
,
"Sneha"
]),
Team
(
name:
"Mobile Team"
,
members:
[
"Mohit"
,
"Srinivas"
]),
Team
(
name:
"Backend Team"
,
members:
[
"Dheeraj"
,
"Satya"
,
"Sneha"
]),
],
),
Department
(
...
...
@@ -25,6 +25,8 @@ class OrganizationStructureScreen extends StatelessWidget {
),
];
const
OrganizationStructureScreen
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
...
...
@@ -40,34 +42,45 @@ class OrganizationStructureScreen extends StatelessWidget {
child:
ExpansionTile
(
title:
Text
(
"
${dept.name}
not ready"
,
style:
const
TextStyle
(
fontSize:
18
,
fontWeight:
FontWeight
.
bold
),
style:
const
TextStyle
(
fontSize:
18
,
fontWeight:
FontWeight
.
bold
,
),
),
children:
dept
.
teams
.
map
((
team
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
8
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
team
.
name
,
style:
const
TextStyle
(
fontSize:
16
,
fontWeight:
FontWeight
.
w600
),
),
const
SizedBox
(
height:
4
),
Wrap
(
spacing:
8
,
children:
team
.
members
.
map
((
member
)
{
return
Chip
(
label:
Text
(
member
),
backgroundColor:
Colors
.
blue
.
shade50
,
);
}).
toList
(),
children:
dept
.
teams
.
map
((
team
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
8
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
team
.
name
,
style:
const
TextStyle
(
fontSize:
16
,
fontWeight:
FontWeight
.
w600
,
),
),
const
SizedBox
(
height:
4
),
Wrap
(
spacing:
8
,
children:
team
.
members
.
map
((
member
)
{
return
Chip
(
label:
Text
(
member
),
backgroundColor:
Colors
.
blue
.
shade50
,
);
}).
toList
(),
),
const
SizedBox
(
height:
8
),
],
),
);
}).
toList
(),
const
SizedBox
(
height:
8
),
],
),
);
}).
toList
(),
),
);
},
...
...
lib/screens/hrm/RewardListScreen.dart
View file @
7210793a
...
...
@@ -8,7 +8,7 @@ import '../../Notifiers/hrmProvider/rewardListProvider.dart';
import
'../../Utils/app_colors.dart'
;
class
RewardListScreen
extends
StatefulWidget
{
const
RewardListScreen
({
Key
?
key
})
:
super
(
key:
key
);
const
RewardListScreen
({
super
.
key
}
);
@override
State
<
RewardListScreen
>
createState
()
=>
_RewardListScreenState
();
...
...
@@ -20,287 +20,294 @@ class _RewardListScreenState extends State<RewardListScreen> {
return
SafeArea
(
top:
false
,
child:
ChangeNotifierProvider
(
create:
(
_
)
=>
RewardListProvider
()..
fetchRewardList
(
context
),
child:
Consumer
<
RewardListProvider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
backgroundColor:
Colors
.
white
,
title:
Row
(
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back_button.svg"
,
height:
25
,
),
),
const
SizedBox
(
width:
10
),
Text
(
"Reward List"
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"Plus Jakarta Sans"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
),
),
],
create:
(
_
)
=>
RewardListProvider
()..
fetchRewardList
(
context
),
child:
Consumer
<
RewardListProvider
>(
builder:
(
context
,
provider
,
child
)
{
return
Scaffold
(
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
backgroundColor:
Colors
.
white
,
title:
Row
(
children:
[
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back_button.svg"
,
height:
25
,
),
),
// actions: [
// InkResponse(
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => RewardSearchScreen(),
// settings: const RouteSettings(
// name: 'AddLiveAttendanceScreen',
// ),
// ),
// ).then((_) {
// });
// },
// child: SvgPicture.asset(
// "assets/svg/search_ic.svg",
// height: 25,
// ),
// ),
// const SizedBox(width: 20),
// ],
),
backgroundColor:
Color
(
0xFFF6F6F8
),
body:
Builder
(
builder:
(
context
)
{
if
(
provider
.
isLoading
)
{
return
const
Center
(
child:
CircularProgressIndicator
(
color:
Colors
.
blue
,));
}
if
(
provider
.
errorMessage
!=
null
)
{
return
Center
(
child:
Text
(
provider
.
errorMessage
!));
}
if
(
provider
.
response
==
null
)
{
return
const
Center
(
child:
Text
(
"No details found"
));
}
final
rewardDetail
=
provider
.
response
!;
final
rewardResponse
=
provider
.
response
!;
final
rewards
=
rewardResponse
.
rewardsList
;
// main list object
final
achieved
=
rewardResponse
.
achievedAmount
??
"0"
;
final
disbursed
=
rewardResponse
.
disbursedAmount
??
"0"
;
final
balance
=
rewardResponse
.
balanceAmount
??
"0"
;
return
SingleChildScrollView
(
padding:
const
EdgeInsets
.
all
(
16
),
child:
Column
(
children:
[
const
SizedBox
(
width:
10
),
Text
(
"Reward List"
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"Plus Jakarta Sans"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
),
),
],
),
// actions: [
// InkResponse(
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => RewardSearchScreen(),
// settings: const RouteSettings(
// name: 'AddLiveAttendanceScreen',
// ),
// ),
// ).then((_) {
// });
// },
// child: SvgPicture.asset(
// "assets/svg/search_ic.svg",
// height: 25,
// ),
// ),
// const SizedBox(width: 20),
// ],
),
/// --- Top Summary Cards ---
Stack
(
backgroundColor:
Color
(
0xFFF6F6F8
),
body:
Builder
(
builder:
(
context
)
{
if
(
provider
.
isLoading
)
{
return
const
Center
(
child:
CircularProgressIndicator
(
color:
Colors
.
blue
),
);
}
if
(
provider
.
errorMessage
!=
null
)
{
return
Center
(
child:
Text
(
provider
.
errorMessage
!));
}
if
(
provider
.
response
==
null
)
{
return
const
Center
(
child:
Text
(
"No details found"
));
}
final
rewardDetail
=
provider
.
response
!;
final
rewardResponse
=
provider
.
response
!;
final
rewards
=
rewardResponse
.
rewardsList
;
// main list object
final
achieved
=
rewardResponse
.
achievedAmount
??
"0"
;
final
disbursed
=
rewardResponse
.
disbursedAmount
??
"0"
;
final
balance
=
rewardResponse
.
balanceAmount
??
"0"
;
return
SingleChildScrollView
(
padding:
const
EdgeInsets
.
all
(
16
),
child:
Column
(
children:
[
/// --- Top Summary Cards ---
Stack
(
children:
[
Container
(
height:
110
,
width:
double
.
infinity
,
padding:
const
EdgeInsets
.
all
(
18
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xffd9ffd6
),
borderRadius:
BorderRadius
.
circular
(
18
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Container
(
height:
110
,
width:
double
.
infinity
,
padding:
const
EdgeInsets
.
all
(
18
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xffd9ffd6
),
borderRadius:
BorderRadius
.
circular
(
18
),
Text
(
"₹
$achieved
"
,
// Achieved Amount from response
style:
const
TextStyle
(
fontSize:
20
,
color:
Color
(
0xff0D9C00
),
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w500
,
),
),
const
SizedBox
(
height:
10
),
const
Text
(
"Achievement Amount"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xff2D2D2D
),
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
),
],
),
),
// Positioned SVG Icon
Positioned
(
bottom:
8
,
right:
12
,
child:
Container
(
height:
42
,
width:
42
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
const
Color
(
0xA0FFFFFF
),
// icon bg
),
child:
Center
(
child:
SvgPicture
.
asset
(
height:
25
,
width:
25
,
"assets/svg/hrm/achievement_ic.svg"
,
fit:
BoxFit
.
contain
,
),
),
),
),
],
),
const
SizedBox
(
height:
12
),
Row
(
children:
[
Expanded
(
child:
Container
(
height:
110
,
padding:
const
EdgeInsets
.
all
(
16
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xffe8ddff
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Stack
(
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"₹
$
{achiev
ed
}
"
,
//
Achiev
ed Amount
from response
"₹
$
disburs
ed
"
,
//
Disburs
ed Amount
style:
const
TextStyle
(
fontSize:
20
,
color:
Color
(
0xff0D9C00
),
fontStyle:
FontStyle
.
normal
,
color:
Color
(
0xff493272
),
fontWeight:
FontWeight
.
w500
,
),
),
const
SizedBox
(
height:
10
),
const
SizedBox
(
height:
8
),
const
Text
(
"
Achievement
Amount"
,
"
Disbursed
\n
Amount"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xff2D2D2D
),
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
,
),
),
],
),
),
// Positioned SVG Icon
Positio
ne
d
(
bottom:
8
,
right
:
1
2
,
child:
Container
(
height:
42
,
width:
42
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
const
Color
(
0xA0FFFFFF
),
// icon bg
),
child:
Center
(
child:
SvgPicture
.
asset
(
height
:
25
,
width:
25
,
"assets/svg/hrm/achievement_ic.svg"
,
fit:
BoxFit
.
contain
,
Positioned
(
bottom:
2
,
right:
2
,
child:
Contai
ne
r
(
height:
42
,
width
:
4
2
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
const
Color
(
0xA0FFFFFF
,
),
// icon bg
),
child:
Center
(
child:
SvgPicture
.
asset
(
height:
25
,
width
:
25
,
"assets/svg/hrm/location_ic.svg"
,
fit:
BoxFit
.
contain
,
)
,
),
),
),
)
,
]
,
]
,
)
,
),
const
SizedBox
(
height:
12
),
Row
(
children:
[
Expanded
(
child:
Container
(
height:
110
,
padding:
const
EdgeInsets
.
all
(
16
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xffe8ddff
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Stack
(
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"₹
${disbursed}
"
,
// Disbursed Amount
style:
const
TextStyle
(
fontSize:
20
,
color:
Color
(
0xff493272
),
fontWeight:
FontWeight
.
w500
,
),
),
const
SizedBox
(
height:
8
),
const
Text
(
"Disbursed
\n
Amount"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xff2D2D2D
),
fontWeight:
FontWeight
.
w400
,
),
),
],
),
const
SizedBox
(
width:
12
),
Expanded
(
child:
Container
(
height:
110
,
padding:
const
EdgeInsets
.
all
(
16
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xfffffbc3
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Stack
(
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"₹
$balance
"
,
// Balance Amount
style:
const
TextStyle
(
fontSize:
18
,
color:
Color
(
0xff605C00
),
),
Positioned
(
bottom:
2
,
right:
2
,
child:
Container
(
height:
42
,
width:
42
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
const
Color
(
0xA0FFFFFF
),
// icon bg
),
child:
Center
(
child:
SvgPicture
.
asset
(
height:
25
,
width:
25
,
"assets/svg/hrm/location_ic.svg"
,
fit:
BoxFit
.
contain
,
),
),
),
),
const
SizedBox
(
height:
8
),
const
Text
(
"Balance
\n
Amount"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xff2D2D2D
),
fontWeight:
FontWeight
.
w400
,
),
]
,
)
,
)
,
]
,
),
),
const
SizedBox
(
width:
12
),
Expanded
(
child:
Container
(
height:
110
,
padding:
const
EdgeInsets
.
all
(
16
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xfffffbc3
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Stack
(
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"₹
${balance}
"
,
// Balance Amount
style:
const
TextStyle
(
fontSize:
18
,
color:
Color
(
0xff605C00
),
),
),
const
SizedBox
(
height:
8
),
const
Text
(
"Balance
\n
Amount"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xff2D2D2D
),
fontWeight:
FontWeight
.
w400
,
),
),
],
),
Positioned
(
bottom:
2
,
right:
2
,
child:
Container
(
height:
42
,
width:
42
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
const
Color
(
0xA0FFFFFF
),
// icon bg
),
child:
Center
(
child:
SvgPicture
.
asset
(
height:
25
,
width:
25
,
"assets/svg/hrm/ballance_ic.svg"
,
fit:
BoxFit
.
contain
,
),
),
),
Positioned
(
bottom:
2
,
right:
2
,
child:
Container
(
height:
42
,
width:
42
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
const
Color
(
0xA0FFFFFF
,
),
// icon bg
),
child:
Center
(
child:
SvgPicture
.
asset
(
height:
25
,
width:
25
,
"assets/svg/hrm/ballance_ic.svg"
,
fit:
BoxFit
.
contain
,
),
]
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
],
),
const
SizedBox
(
height:
20
),
const
SizedBox
(
height:
20
),
/// --- Reward List Card ---
if
(
rewards
!=
null
)
_rewardListCard
(
title:
rewards
.
description
??
"-"
,
// rewardsList fields
dateTime:
rewards
.
dateTime
??
"-"
,
achieved:
achieved
,
disbursed:
disbursed
,
balance:
balance
,
enteredBy:
rewards
.
enteredBy
??
"-"
,
)
else
const
Text
(
"No rewards available"
),
],
),
);
}
),
);
}
)
/// --- Reward List Card ---
if
(
rewards
!=
null
)
_rewardListCard
(
title:
rewards
.
description
??
"-"
,
// rewardsList fields
dateTime:
rewards
.
dateTime
??
"-"
,
achieved:
achieved
,
disbursed:
disbursed
,
balance:
balance
,
enteredBy:
rewards
.
enteredBy
??
"-"
,
)
else
const
Text
(
"No rewards available"
),
],
),
);
},
),
);
},
),
),
);
}
/// Reusable Reward Card Function
...
...
@@ -350,31 +357,31 @@ class _RewardListScreenState extends State<RewardListScreen> {
Text
(
title
,
style:
const
TextStyle
(
fontSize:
14.5
,
color:
Color
(
0xff2D2D2D
),
fontFamily:
"Plus Jakarta Sans"
,
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
),
fontSize:
14.5
,
color:
Color
(
0xff2D2D2D
),
fontFamily:
"Plus Jakarta Sans"
,
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
,
),
),
Text
(
dateTime
,
style:
const
TextStyle
(
fontSize:
12.5
,
color:
Color
(
0xff818181
),
fontFamily:
"Plus Jakarta Sans"
,
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
),
fontSize:
12.5
,
color:
Color
(
0xff818181
),
fontFamily:
"Plus Jakarta Sans"
,
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
,
),
),
],
),
),
],
),
const
SizedBox
(
height:
12
),
/// Amount Details
Padding
(
padding:
const
EdgeInsets
.
all
(
2.0
),
...
...
@@ -382,10 +389,7 @@ class _RewardListScreenState extends State<RewardListScreen> {
children:
[
const
Text
(
"Amount Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
),
),
const
SizedBox
(
width:
10
),
Expanded
(
...
...
@@ -415,10 +419,7 @@ class _RewardListScreenState extends State<RewardListScreen> {
children:
[
const
Text
(
"Employee Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
),
),
const
SizedBox
(
width:
10
),
Expanded
(
...
...
@@ -447,19 +448,18 @@ class _RewardListScreenState extends State<RewardListScreen> {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
key
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
Text
(
key
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
value
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
style:
const
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
)),
),
],
),
...
...
lib/screens/hrm/RewardSearchScreen.dart
View file @
7210793a
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'../../Utils/app_colors.dart'
;
class
RewardSearchScreen
extends
StatefulWidget
{
const
RewardSearchScreen
({
super
.
key
});
...
...
@@ -42,11 +40,17 @@ class _RewardSearchScreenState extends State<RewardSearchScreen> {
@override
Widget
build
(
BuildContext
context
)
{
final
filteredAccounts
=
accounts
.
where
((
e
)
=>
e
.
toLowerCase
().
contains
(
query
.
toLowerCase
())).
toList
();
accounts
.
where
((
e
)
=>
e
.
toLowerCase
().
contains
(
query
.
toLowerCase
()))
.
toList
();
final
filteredInquiries
=
inquiries
.
where
((
e
)
=>
e
.
toLowerCase
().
contains
(
query
.
toLowerCase
())).
toList
();
inquiries
.
where
((
e
)
=>
e
.
toLowerCase
().
contains
(
query
.
toLowerCase
()))
.
toList
();
final
filteredLeads
=
leads
.
where
((
e
)
=>
e
.
toLowerCase
().
contains
(
query
.
toLowerCase
())).
toList
();
leads
.
where
((
e
)
=>
e
.
toLowerCase
().
contains
(
query
.
toLowerCase
()))
.
toList
();
return
Scaffold
(
appBar:
AppBar
(
...
...
@@ -94,8 +98,10 @@ class _RewardSearchScreenState extends State<RewardSearchScreen> {
prefixIcon:
const
Icon
(
Icons
.
search
,
color:
Colors
.
black54
),
filled:
true
,
fillColor:
const
Color
(
0xffFFFFFF
),
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
12
),
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
12
,
),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
12
),
borderSide:
BorderSide
.
none
,
...
...
@@ -159,52 +165,60 @@ class _RewardSearchScreenState extends State<RewardSearchScreen> {
),
const
SizedBox
(
height:
10
),
Column
(
children:
items
.
map
((
e
)
=>
Container
(
margin:
const
EdgeInsets
.
only
(
bottom:
12
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
12
,
vertical:
12
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
12
),
boxShadow:
[
BoxShadow
(
color:
Colors
.
grey
.
withOpacity
(
0.1
),
blurRadius:
5
,
offset:
const
Offset
(
0
,
3
),
)
],
),
child:
Row
(
children:
[
Container
(
height:
32
,
width:
32
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xffE8F3FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
const
Icon
(
Icons
.
search
,
color:
Color
(
0xff0066FF
),
size:
20
),
),
const
SizedBox
(
width:
10
),
Expanded
(
child:
Text
(
e
,
style:
const
TextStyle
(
fontSize:
14
,
fontFamily:
"Plus Jakarta Sans"
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xff2D2D2D
),
children:
items
.
map
(
(
e
)
=>
Container
(
margin:
const
EdgeInsets
.
only
(
bottom:
12
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
12
,
vertical:
12
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
12
),
boxShadow:
[
BoxShadow
(
color:
Colors
.
grey
.
withOpacity
(
0.1
),
blurRadius:
5
,
offset:
const
Offset
(
0
,
3
),
),
],
),
child:
Row
(
children:
[
Container
(
height:
32
,
width:
32
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xffE8F3FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
const
Icon
(
Icons
.
search
,
color:
Color
(
0xff0066FF
),
size:
20
,
),
),
const
SizedBox
(
width:
10
),
Expanded
(
child:
Text
(
e
,
style:
const
TextStyle
(
fontSize:
14
,
fontFamily:
"Plus Jakarta Sans"
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xff2D2D2D
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
],
),
),
overflow:
TextOverflow
.
ellipsis
,
),
),
],
),
))
.
toList
(),
)
)
.
toList
(),
),
],
);
}
...
...
lib/screens/hrm/TourExpensesDetailsScreen.dart
View file @
7210793a
...
...
@@ -7,23 +7,25 @@ import '../../Notifiers/hrmProvider/tourExpensesDetailsProvider.dart';
import
'../../Utils/app_colors.dart'
;
import
'../finance/FileViewer.dart'
;
class
TourExpensesDetailsScreen
extends
StatefulWidget
{
final
String
tourBillId
;
const
TourExpensesDetailsScreen
({
Key
?
key
,
required
this
.
tourBillId
})
:
super
(
key:
key
);
const
TourExpensesDetailsScreen
({
super
.
key
,
required
this
.
tourBillId
});
@override
State
<
TourExpensesDetailsScreen
>
createState
()
=>
_TourExpensesDetailsScreenState
();
State
<
TourExpensesDetailsScreen
>
createState
()
=>
_TourExpensesDetailsScreenState
();
}
class
_TourExpensesDetailsScreenState
extends
State
<
TourExpensesDetailsScreen
>{
class
_TourExpensesDetailsScreenState
extends
State
<
TourExpensesDetailsScreen
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
SafeArea
(
top:
false
,
child:
ChangeNotifierProvider
(
create:
(
_
)
=>
TourExpensesDetailsProvider
()
..
fetchTourExpensesDetails
(
context
,
widget
.
tourBillId
),
create:
(
_
)
=>
TourExpensesDetailsProvider
()
..
fetchTourExpensesDetails
(
context
,
widget
.
tourBillId
),
child:
Scaffold
(
appBar:
AppBar
(
automaticallyImplyLeading:
false
,
...
...
@@ -71,8 +73,9 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
if
(
response
==
null
)
{
return
const
Center
(
child:
Text
(
"No data available"
));
}
debugPrint
(
"==================requestDetails:
${widget.tourBillId}
"
);
debugPrint
(
"==================requestDetails:
${widget.tourBillId}
"
,
);
return
SingleChildScrollView
(
child:
Column
(
...
...
@@ -82,29 +85,68 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
_expenseHeaderCard
(
title:
response
.
requestDetails
?.
placeOfVisit
??
"Tour"
,
date:
response
.
requestDetails
?.
appliedDate
??
"-"
,
status:
(
response
.
requestDetails
?.
approvalStatus
?.
isNotEmpty
??
false
)
?
response
.
requestDetails
!.
approvalStatus
!
:
"No Status"
,
status:
(
response
.
requestDetails
?.
approvalStatus
?.
isNotEmpty
??
false
)
?
response
.
requestDetails
!.
approvalStatus
!
:
"No Status"
,
details:
[
{
"key"
:
"Employee"
,
"value"
:
response
.
requestDetails
!.
employeeName
!},
{
"key"
:
"Approved By TL"
,
"value"
:
response
.
requestDetails
!.
tlApprovedBy
!},
{
"key"
:
"TL Approval Amount"
,
"value"
:
response
.
requestDetails
!.
tlApprovedAmount
!},
{
"key"
:
"TL Remarks"
,
"value"
:
response
.
requestDetails
!.
tlRemarks
!},
{
"key"
:
"Approved By HR"
,
"value"
:
response
.
requestDetails
!.
hrApprovedBy
!},
{
"key"
:
"HR Approval Amount"
,
"value"
:
response
.
requestDetails
!.
hrApprovedAmount
!},
{
"key"
:
"TL Remarks"
,
"value"
:
response
.
requestDetails
!.
tlRemarks
!},
{
"key"
:
"Total Approved Amount"
,
"value"
:
response
.
requestDetails
?.
approvedAmount
??
"-"
},
{
"key"
:
"Total Balance Amount"
,
"value"
:
response
.
requestDetails
!.
appliedAmount
!},
{
"key"
:
"Type"
,
"value"
:
response
.
requestDetails
!.
type
!},
{
"key"
:
"Employee"
,
"value"
:
response
.
requestDetails
!.
employeeName
!,
},
{
"key"
:
"Approved By TL"
,
"value"
:
response
.
requestDetails
!.
tlApprovedBy
!,
},
{
"key"
:
"TL Approval Amount"
,
"value"
:
response
.
requestDetails
!.
tlApprovedAmount
!,
},
{
"key"
:
"TL Remarks"
,
"value"
:
response
.
requestDetails
!.
tlRemarks
!,
},
{
"key"
:
"Approved By HR"
,
"value"
:
response
.
requestDetails
!.
hrApprovedBy
!,
},
{
"key"
:
"HR Approval Amount"
,
"value"
:
response
.
requestDetails
!.
hrApprovedAmount
!,
},
{
"key"
:
"TL Remarks"
,
"value"
:
response
.
requestDetails
!.
tlRemarks
!,
},
{
"key"
:
"Total Approved Amount"
,
"value"
:
response
.
requestDetails
?.
approvedAmount
??
"-"
,
},
{
"key"
:
"Total Balance Amount"
,
"value"
:
response
.
requestDetails
!.
appliedAmount
!,
},
{
"key"
:
"Type"
,
"value"
:
response
.
requestDetails
!.
type
!,
},
],
),
const
SizedBox
(
height:
16
),
/// Tour Expense Card (Main Summary)
if
(
response
.
requestDetails
!=
null
&&
response
.
tourExpenses
!=
null
)
...[
if
(
response
.
requestDetails
!=
null
&&
response
.
tourExpenses
!=
null
)
...[
const
SizedBox
(
height:
10
),
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
30.0
),
child:
Text
(
"Tour Summary"
,
child:
Text
(
"Tour Summary"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -119,28 +161,36 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
child:
ListView
(
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
MediaQuery
.
of
(
context
).
size
.
width
*
0.05
,
horizontal:
MediaQuery
.
of
(
context
).
size
.
width
*
0.05
,
),
children:
[
SizedBox
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.90
,
child:
_tourExpenseCard
(
employeeName:
response
.
requestDetails
?.
employeeName
??
"-"
,
placeOfVisit:
response
.
requestDetails
?.
placeOfVisit
??
"-"
,
employeeName:
response
.
requestDetails
?.
employeeName
??
"-"
,
placeOfVisit:
response
.
requestDetails
?.
placeOfVisit
??
"-"
,
daAmount:
response
.
tourExpenses
?.
da
??
"0"
,
totalAmount:
response
.
tourExpenses
?.
appliedAmount
??
"0"
,
fromDate:
response
.
tourExpenses
?.
fromDate
??
"-"
,
totalAmount:
response
.
tourExpenses
?.
appliedAmount
??
"0"
,
fromDate:
response
.
tourExpenses
?.
fromDate
??
"-"
,
toDate:
response
.
tourExpenses
?.
toDate
??
"-"
,
remarks:
response
.
tourExpenses
?.
extraNote
??
"-"
,
remarks:
response
.
tourExpenses
?.
extraNote
??
"-"
,
),
),
],
),
),
],
const
SizedBox
(
height:
10
),
/// Travel Expenses Cards
if
(
response
.
travelExpenses
!=
null
&&
response
.
travelExpenses
!.
isNotEmpty
)
...[
...
...
@@ -163,14 +213,18 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
child:
ListView
.
separated
(
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
MediaQuery
.
of
(
context
).
size
.
width
*
0.04
,
horizontal:
MediaQuery
.
of
(
context
).
size
.
width
*
0.04
,
),
itemCount:
response
.
travelExpenses
!.
length
,
separatorBuilder:
(
_
,
__
)
=>
const
SizedBox
(
width:
12
),
separatorBuilder:
(
_
,
__
)
=>
const
SizedBox
(
width:
12
),
itemBuilder:
(
context
,
index
)
{
final
t
=
response
.
travelExpenses
![
index
];
return
SizedBox
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.90
,
// card width
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.90
,
// card width
child:
_travelExpenseCard
(
travelType:
t
.
travelType
??
"-"
,
amount:
t
.
fare
??
"0"
,
...
...
@@ -185,16 +239,10 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
t
.
imageDirFilePath
??
""
,
fileUrl:
t
.
imageDirFilePath
??
""
,
),
(
context
)
=>
Fileviewer
(
fileName:
t
.
imageDirFilePath
??
""
,
fileUrl:
t
.
imageDirFilePath
??
""
,
),
),
);
},
...
...
@@ -202,7 +250,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
);
},
),
)
)
,
],
const
SizedBox
(
height:
10
),
...
...
@@ -212,7 +260,8 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const
SizedBox
(
height:
10
),
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
30.0
),
child:
Text
(
"Hotel Expenses"
,
child:
Text
(
"Hotel Expenses"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -227,10 +276,12 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
child:
ListView
.
separated
(
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
MediaQuery
.
of
(
context
).
size
.
width
*
0.04
,
horizontal:
MediaQuery
.
of
(
context
).
size
.
width
*
0.04
,
),
itemCount:
response
.
hotelExpenses
!.
length
,
separatorBuilder:
(
_
,
__
)
=>
const
SizedBox
(
width:
12
),
separatorBuilder:
(
_
,
__
)
=>
const
SizedBox
(
width:
12
),
itemBuilder:
(
context
,
index
)
{
final
h
=
response
.
hotelExpenses
![
index
];
return
SizedBox
(
...
...
@@ -247,16 +298,10 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
h
.
imageDirFilePath
??
""
,
fileUrl:
h
.
imageDirFilePath
??
""
,
),
(
context
)
=>
Fileviewer
(
fileName:
h
.
imageDirFilePath
??
""
,
fileUrl:
h
.
imageDirFilePath
??
""
,
),
),
);
},
...
...
@@ -274,7 +319,8 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const
SizedBox
(
height:
10
),
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
30.0
),
child:
Text
(
"Other Expenses"
,
child:
Text
(
"Other Expenses"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -289,10 +335,12 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
child:
ListView
.
separated
(
scrollDirection:
Axis
.
horizontal
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
MediaQuery
.
of
(
context
).
size
.
width
*
0.04
,
horizontal:
MediaQuery
.
of
(
context
).
size
.
width
*
0.04
,
),
itemCount:
response
.
otherExpenses
!.
length
,
separatorBuilder:
(
_
,
__
)
=>
const
SizedBox
(
width:
12
),
separatorBuilder:
(
_
,
__
)
=>
const
SizedBox
(
width:
12
),
itemBuilder:
(
context
,
index
)
{
final
o
=
response
.
otherExpenses
![
index
];
return
SizedBox
(
...
...
@@ -308,16 +356,10 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
o
.
imageDirFilePath
??
""
,
fileUrl:
o
.
imageDirFilePath
??
""
,
),
(
context
)
=>
Fileviewer
(
fileName:
o
.
imageDirFilePath
??
""
,
fileUrl:
o
.
imageDirFilePath
??
""
,
),
),
);
},
...
...
@@ -328,7 +370,6 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
),
],
const
SizedBox
(
height:
25
),
],
),
...
...
@@ -381,15 +422,17 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
employeeName
,
style:
TextStyle
(
fontSize:
14.5
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
)
Text
(
employeeName
,
style:
TextStyle
(
fontSize:
14.5
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
),
),
Text
(
placeOfVisit
,
Text
(
placeOfVisit
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -457,22 +500,24 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
),
),
const
SizedBox
(
width:
8
),
Text
(
travelType
,
style:
TextStyle
(
fontSize:
14.5
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
)
Text
(
travelType
,
style:
TextStyle
(
fontSize:
14.5
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
),
),
],
),
Text
(
"₹
$amount
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
Text
(
"₹
$amount
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
...
...
@@ -483,7 +528,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const
SizedBox
(
height:
2
),
_buildKeyValue
(
"To"
,
to
),
const
SizedBox
(
height:
2
),
if
(
imageUrl
!=
null
&&
imageUrl
!.
isNotEmpty
)
if
(
imageUrl
!=
null
&&
imageUrl
!.
isNotEmpty
)
_buildKeyValue
(
"Image"
,
"View"
,
isLink:
true
,
onTap:
onViewTap
),
],
),
...
...
@@ -524,29 +569,27 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
CircleAvatar
(
radius:
20
,
backgroundColor:
const
Color
(
0xffFCE4EC
),
child:
SvgPicture
.
asset
(
"assets/svg/hrm/hotel_ic.svg"
,
),
child:
SvgPicture
.
asset
(
"assets/svg/hrm/hotel_ic.svg"
),
),
const
SizedBox
(
width:
8
),
Text
(
hotelName
,
style:
TextStyle
(
fontSize:
14.5
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
)
Text
(
hotelName
,
style:
TextStyle
(
fontSize:
14.5
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
)
,
),
],
),
Text
(
"₹
$amount
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
Text
(
"₹
$amount
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
...
...
@@ -557,8 +600,8 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const
SizedBox
(
height:
2
),
_buildKeyValue
(
"To"
,
toDate
),
const
SizedBox
(
height:
2
),
if
(
imageUrl
!=
null
&&
imageUrl
!.
isNotEmpty
)
_buildKeyValue
(
"Image"
,
"View"
,
isLink:
true
,
onTap:
onViewTap
),
if
(
imageUrl
!=
null
&&
imageUrl
!.
isNotEmpty
)
_buildKeyValue
(
"Image"
,
"View"
,
isLink:
true
,
onTap:
onViewTap
),
],
),
);
...
...
@@ -597,28 +640,27 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
CircleAvatar
(
radius:
20
,
backgroundColor:
const
Color
(
0xffEDE7F6
),
child:
SvgPicture
.
asset
(
"assets/svg/hrm/books_ic.svg"
,
),
child:
SvgPicture
.
asset
(
"assets/svg/hrm/books_ic.svg"
),
),
const
SizedBox
(
width:
8
),
Text
(
description
,
style:
TextStyle
(
fontSize:
14.5
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
)
description
,
style:
TextStyle
(
fontSize:
14.5
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w600
,
color:
AppColors
.
semi_black
,
)
,
),
],
),
Text
(
"₹
$amount
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
Text
(
"₹
$amount
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
...
...
@@ -629,8 +671,8 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const
SizedBox
(
height:
2
),
_buildKeyValue
(
"Description"
,
description
),
const
SizedBox
(
height:
2
),
if
(
imageUrl
!=
null
&&
imageUrl
!.
isNotEmpty
)
_buildKeyValue
(
"Image"
,
"View"
,
isLink:
true
,
onTap:
onViewTap
),
if
(
imageUrl
!=
null
&&
imageUrl
!.
isNotEmpty
)
_buildKeyValue
(
"Image"
,
"View"
,
isLink:
true
,
onTap:
onViewTap
),
],
),
);
...
...
@@ -639,56 +681,59 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
Widget
_buildSectionHeader
(
String
title
)
{
return
Row
(
children:
[
Text
(
title
,
style:
const
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
)
Text
(
title
,
style:
const
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
),
),
const
SizedBox
(
width:
16
),
Expanded
(
child:
DottedLine
(
dashGapLength:
3
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
)
child:
DottedLine
(
dashGapLength:
3
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
);
}
Widget
_buildKeyValue
(
String
key
,
String
value
,
{
bool
isLink
=
false
,
VoidCallback
?
onTap
})
{
Widget
_buildKeyValue
(
String
key
,
String
value
,
{
bool
isLink
=
false
,
VoidCallback
?
onTap
,
})
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
3.5
,
horizontal:
2
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Text
(
key
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
Text
(
key
,
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
isLink
?
GestureDetector
(
onTap:
onTap
,
child:
const
Text
(
"View"
,
style:
TextStyle
(
onTap:
onTap
,
child:
const
Text
(
"View"
,
style:
TextStyle
(
fontSize:
14
,
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
blue
)),
)
:
Text
(
value
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
color:
Colors
.
blue
,
),
),
)
:
Text
(
value
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
)),
),
),
],
),
);
...
...
@@ -735,7 +780,9 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
color:
Color
(
0xFFE6F6FF
),
shape:
BoxShape
.
circle
,
),
child:
SvgPicture
.
asset
(
"assets/svg/hrm/tour_main_ic.svg"
),
child:
SvgPicture
.
asset
(
"assets/svg/hrm/tour_main_ic.svg"
,
),
),
const
SizedBox
(
width:
10
),
Expanded
(
...
...
@@ -743,36 +790,43 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
title
,
style:
const
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
Color
(
0xff2D2D2D
)
)
Text
(
title
,
style:
const
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
Color
(
0xff2D2D2D
),
),
),
const
SizedBox
(
height:
3
),
Text
(
date
,
style:
const
TextStyle
(
fontSize:
12
,
color:
Color
(
0xff818181
)
)
Text
(
date
,
style:
const
TextStyle
(
fontSize:
12
,
color:
Color
(
0xff818181
),
),
),
],
),
),
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
6
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
6
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
_getStatusBgColor
(
status
),
),
child:
Text
(
status
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
_getStatusTxtColor
(
status
))),
)
child:
Text
(
status
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
_getStatusTxtColor
(
status
),
),
),
),
],
),
...
...
@@ -784,11 +838,12 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
padding:
const
EdgeInsets
.
symmetric
(
vertical:
8
),
child:
Row
(
children:
[
const
Text
(
"Amount Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
)
const
Text
(
"Amount Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
const
SizedBox
(
width:
10
),
Expanded
(
...
...
@@ -806,37 +861,40 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const
SizedBox
(
height:
6
),
Column
(
children:
details
.
map
((
d
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
8
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Expanded
(
flex:
4
,
child:
Text
(
d
[
"key"
]
??
"-"
,
children:
details
.
map
((
d
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
8
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Expanded
(
flex:
4
,
child:
Text
(
d
[
"key"
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
)
)
),
Expanded
(
flex:
3
,
child:
Text
(
d
[
"value"
]
??
"-"
,
),
),
),
Expanded
(
flex:
3
,
child:
Text
(
d
[
"value"
]
??
"-"
,
textAlign:
TextAlign
.
right
,
style:
const
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
Color
(
0xff818181
)
)
)
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
Color
(
0xff818181
),
),
),
),
],
),
],
),
);
}).
toList
(),
);
}).
toList
(),
),
],
...
...
@@ -848,13 +906,14 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
showMore
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w500
,
color:
AppColors
.
app_blue
,
)
Text
(
showMore
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
fontWeight:
FontWeight
.
w500
,
color:
AppColors
.
app_blue
,
),
),
const
SizedBox
(
width:
6
),
Transform
.
flip
(
...
...
@@ -865,11 +924,11 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
width:
20
,
color:
AppColors
.
app_blue
,
),
)
)
,
],
),
),
)
)
,
],
),
),
...
...
@@ -877,6 +936,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
},
);
}
///travel icons
String
_getTravelIcon
(
String
?
travelType
)
{
switch
(
travelType
?.
toLowerCase
())
{
...
...
@@ -897,7 +957,6 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
}
}
/// Avatar color generator
Color
_getStatusBgColor
(
value
)
{
var
color
=
AppColors
.
approved_bg_color
;
...
...
@@ -921,10 +980,10 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
return
AppColors
.
rejected_text_color
;
case
'Expired at TL'
:
return
AppColors
.
rejected_text_color
;
}
return
color
;
}
getText
(
value
)
{
switch
(
value
)
{
case
'HR Approved'
:
...
...
@@ -939,5 +998,4 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
return
"Requested"
;
}
}
}
lib/screens/hrm/oggchart.dart
View file @
7210793a
...
...
@@ -4,7 +4,6 @@ import 'package:flutter/foundation.dart';
import
'package:flutter/material.dart'
;
import
'package:cached_network_image/cached_network_image.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/screens/commom/accountsListDetails.dart'
;
import
'package:graphview/GraphView.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Models/hrmmodels/ogresponse.dart'
;
...
...
lib/screens/inventory/GeneratorPartDetailsScreen.dart
View file @
7210793a
...
...
@@ -126,7 +126,10 @@ class _GeneratorPartDetailsScreenState
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
),
...
...
@@ -344,13 +347,13 @@ class _GeneratorPartDetailsScreenState
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
only
(
left:
10
,
top:
10
),
padding:
EdgeInsets
.
only
(
left:
10
,
top:
10
),
child:
Text
(
"Product Details"
,
style:
TextStyle
(
color:
AppColors
.
grey_thick
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
fontSize:
14
,
),
),
),
...
...
@@ -425,7 +428,7 @@ class _GeneratorPartDetailsScreenState
Expanded
(
child:
Text
(
values
[
j
]
==
""
?
"-"
:
values
[
j
],
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
...
...
@@ -495,7 +498,7 @@ class _GeneratorPartDetailsScreenState
Expanded
(
child:
Text
(
values
[
j
]
==
""
?
"-"
:
values
[
j
],
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
...
...
@@ -560,7 +563,6 @@ class _GeneratorPartDetailsScreenState
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
provider
.
partData
.
prodDesc
==
""
...
...
@@ -569,7 +571,7 @@ class _GeneratorPartDetailsScreenState
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaRegular"
fontFamily:
"JakartaRegular"
,
),
),
),
...
...
@@ -815,7 +817,7 @@ class _GeneratorPartDetailsScreenState
Expanded
(
flex:
1
,
child:
Text
(
"
${
headings[index]
}
"
,
headings
[
index
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
...
...
@@ -881,7 +883,7 @@ class _GeneratorPartDetailsScreenState
Expanded
(
flex:
1
,
child:
Text
(
"
${
headings[index]
}
"
,
headings
[
index
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
...
...
@@ -960,7 +962,7 @@ class _GeneratorPartDetailsScreenState
Expanded
(
flex:
1
,
child:
Text
(
"
${
headings[index]
}
"
,
headings
[
index
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
),
...
...
@@ -1122,7 +1124,7 @@ class _GeneratorPartDetailsScreenState
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Text
(
"Inventory
$
{
type
}
"
,
"Inventory
$type
"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontWeight:
FontWeight
.
w600
,
...
...
@@ -1253,7 +1255,12 @@ class _GeneratorPartDetailsScreenState
color:
AppColors
.
grey_semi
,
fontSize:
14
,
),
contentPadding:
EdgeInsets
.
fromLTRB
(
5.0
,
10.0
,
5.0
,
10.0
),
contentPadding:
EdgeInsets
.
fromLTRB
(
5.0
,
10.0
,
5.0
,
10.0
,
),
enabledBorder:
InputBorder
.
none
,
focusedBorder:
InputBorder
.
none
,
hintText:
'Enter Description'
,
...
...
lib/screens/inventory/InventoryScreen.dart
View file @
7210793a
...
...
@@ -81,13 +81,13 @@ class _InventoryScreenState extends State<InventoryScreen> {
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbarNew
(
context
,
"Gen Inventory"
,
0xFFFFFFFF
),
appBar:
appbarNew
(
context
,
"Gen Inventory"
,
0xFFFFFFFF
),
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Column
(
children:
[
Spacer
(),
Container
(
SizedBox
(
height:
250
,
child:
QRView
(
...
...
lib/screens/old/AllrequesitionListsOld.dart
View file @
7210793a
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/financeProvider/RequestionListProvider.dart'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
...
...
@@ -84,17 +82,17 @@ class _AllpaymentrequesitionlistsbymodesoldState
}
return
connection
==
"Online"
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
{
return
onBackPressed
(
context
);
},
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
?
WillPopScope
(
onWillPop:
()
{
return
onBackPressed
(
context
);
},
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
...
...
@@ -157,294 +155,294 @@ class _AllpaymentrequesitionlistsbymodesoldState
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
requestLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
requestLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
children:
[
Row
(
children:
[
Text
(
requestLists
[
index
].
accountName
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
),
Text
(
"₹"
"
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
].
accountName
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹"
"
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
requestLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
requestLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Requesting Propose"
,
"Attachment"
,
"Requested Date"
,
"Note"
,
];
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Requesting Propose"
,
"Attachment"
,
"Requested Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
requestingPurpose
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
date
,
requestLists
[
index
].
description
,
];
if
(
j
==
1
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
final
subHeadings
=
[
requestLists
[
index
].
requestingPurpose
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
date
,
requestLists
[
index
].
description
,
];
if
(
j
==
1
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
);
},
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentrequestionlistdetails"
,
),
),
);
if
(
routeSettingName
==
"Paymentrequestionlistdetails"
)
{
print
(
"croos refresh"
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
// if (res == true) {
// print("android refresh");
// provider
// .paymentRequestionListsAPIFunction(
// context,
// widget.mode,
// "",
// "",
// );
// }
// if (Platform.isIOS) {
// print("IOS Refresh");
// if (didPushed == "true" ||
// didPopped == "true") {
// provider
// .paymentRequestionListsAPIFunction(
// context,
// widget.mode,
// "",
// "",
// );
// }
// }
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentrequestionlistdetails"
,
),
),
);
if
(
routeSettingName
==
"Paymentrequestionlistdetails"
)
{
print
(
"croos refresh"
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
// if (res == true) {
// print("android refresh");
// provider
// .paymentRequestionListsAPIFunction(
// context,
// widget.mode,
// "",
// "",
// );
// }
// if (Platform.isIOS) {
// print("IOS Refresh");
// if (didPushed == "true" ||
// didPopped == "true") {
// provider
// .paymentRequestionListsAPIFunction(
// context,
// widget.mode,
// "",
// "",
// );
// }
// }
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
},
),
),
);
},
),
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
lib/screens/old/HomescreenOld.dart
View file @
7210793a
...
...
@@ -34,60 +34,59 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
// TODO: implement initState
_connectivity
.
initialise
();
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
var
prov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
var
prof
_p
rov
=
Provider
.
of
<
ProfileNotifer
>(
context
,
listen:
false
);
var
prof
P
rov
=
Provider
.
of
<
ProfileNotifer
>(
context
,
listen:
false
);
Future
.
microtask
(()
{
prov
.
DashboardApiFunction
(
context
);
});
Future
.
delayed
(
Duration
(
milliseconds:
600
),
()
{
prof
_p
rov
.
ProfileApiFunction
(
prov
,
context
);
prof
_p
rov
.
VersionApiFunction
();
prof
P
rov
.
ProfileApiFunction
(
prov
,
context
);
prof
P
rov
.
VersionApiFunction
();
});
super
.
initState
();
}
Future
<
bool
>
onBackPressed
()
async
{
return
await
showDialog
<
bool
>(
context:
context
,
builder:
(
context
)
=>
AlertDialog
(
title:
const
Text
(
'Are you sure?'
),
content:
const
Text
(
'Do you want to exit the App'
),
actions:
[
TextButton
(
style:
ButtonStyle
(
backgroundColor:
Material
StateProperty
.
all
(
Colors
.
white
),
overlayColor:
Material
StateProperty
.
all
(
Colors
.
white
),
),
onPressed:
()
=>
Navigator
.
of
(
context
).
pop
(
false
),
child:
Text
(
"NO"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w500
),
),
),
const
SizedBox
(
height:
16
),
TextButton
(
style:
ButtonStyle
(
backgroundColor:
Material
StateProperty
.
all
(
Colors
.
white
),
overlayColor:
Material
StateProperty
.
all
(
Colors
.
white70
),
),
onPressed:
()
=>
SystemChannels
.
platform
.
invokeMethod
(
'SystemNavigator.pop'
,
),
child:
Text
(
"YES"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w500
),
),
),
],
elevation:
30.0
,
),
barrierDismissible:
false
,
)
??
context:
context
,
builder:
(
context
)
=>
AlertDialog
(
title:
const
Text
(
'Are you sure?'
),
content:
const
Text
(
'Do you want to exit the App'
),
actions:
[
TextButton
(
style:
ButtonStyle
(
backgroundColor:
Widget
StateProperty
.
all
(
Colors
.
white
),
overlayColor:
Widget
StateProperty
.
all
(
Colors
.
white
),
),
onPressed:
()
=>
Navigator
.
of
(
context
).
pop
(
false
),
child:
Text
(
"NO"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w500
),
),
),
const
SizedBox
(
height:
16
),
TextButton
(
style:
ButtonStyle
(
backgroundColor:
Widget
StateProperty
.
all
(
Colors
.
white
),
overlayColor:
Widget
StateProperty
.
all
(
Colors
.
white70
),
),
onPressed:
()
=>
SystemChannels
.
platform
.
invokeMethod
(
'SystemNavigator.pop'
,
),
child:
Text
(
"YES"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w500
),
),
),
],
elevation:
30.0
,
),
barrierDismissible:
false
,
)
??
false
;
}
...
...
@@ -100,7 +99,7 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
LocationPermission
permission
=
await
Geolocator
.
checkPermission
();
hasLocationPermission
=
permission
==
LocationPermission
.
always
||
permission
==
LocationPermission
.
whileInUse
;
permission
==
LocationPermission
.
whileInUse
;
final
loc
.
Location
location
=
loc
.
Location
();
bool
serviceEnabled
;
...
...
@@ -135,491 +134,491 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
}
return
(
connection
==
'Online'
)
?
Consumer2
<
HomescreenNotifier
,
ProfileNotifer
>(
builder:
(
context
,
homescreen
,
profile
,
child
)
{
// Define the original data
final
names
=
[
"Attendance"
,
"Finance"
,
"CRM"
,
"Orders"
,
"ERP"
,
"Service Engineer"
,
"Gen Tracker"
,
// "Nearby",
"Inventory"
,
"Whizzdom"
,
// "Common",
];
final
icons
=
[
"assets/svg/home_icons_1.svg"
,
"assets/svg/home_icons_10.svg"
,
"assets/svg/home_icons_12.svg"
,
"assets/svg/home_icons_11.svg"
,
"assets/svg/home_icons_2.svg"
,
"assets/svg/home_icons_4.svg"
,
"assets/svg/home_icons_31.svg"
,
// "assets/svg/home_icons_5.svg",
"assets/svg/home_icons_6.svg"
,
"assets/svg/home_icons_81.svg"
,
// "assets/svg/home_icons_9.svg",
];
final
requiredRoles
=
[
"430"
,
"430"
,
"430"
,
"430"
,
"431"
,
"433"
,
"434"
,
// "433",
"432"
,
"431"
,
// "430",
];
final
filteredItems
=
<
Map
<
String
,
String
>>[];
for
(
int
i
=
0
;
i
<
names
.
length
;
i
++)
{
if
(
homescreen
.
roleStatus
.
contains
(
requiredRoles
[
i
]))
{
filteredItems
.
add
({
'name'
:
names
[
i
],
'icon'
:
icons
[
i
]});
}
}
return
WillPopScope
(
onWillPop:
onBackPressed
,
child:
RefreshIndicator
.
adaptive
(
color:
AppColors
.
app_blue
,
onRefresh:
()
async
{
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
homescreen
.
DashboardApiFunction
(
context
);
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
Column
(
children:
[
Expanded
(
flex:
4
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
),
),
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
30
,
),
padding:
EdgeInsets
.
only
(
bottom:
15
,
right:
10
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
30
),
gradient:
LinearGradient
(
colors:
[
AppColors
.
profile_card_gradient1
,
AppColors
.
profile_card_gradient2
,
],
builder:
(
context
,
homescreen
,
profile
,
child
)
{
// Define the original data
final
names
=
[
"Attendance"
,
"Finance"
,
"CRM"
,
"Orders"
,
"ERP"
,
"Service Engineer"
,
"Gen Tracker"
,
// "Nearby",
"Inventory"
,
"Whizzdom"
,
// "Common",
];
final
icons
=
[
"assets/svg/home_icons_1.svg"
,
"assets/svg/home_icons_10.svg"
,
"assets/svg/home_icons_12.svg"
,
"assets/svg/home_icons_11.svg"
,
"assets/svg/home_icons_2.svg"
,
"assets/svg/home_icons_4.svg"
,
"assets/svg/home_icons_31.svg"
,
// "assets/svg/home_icons_5.svg",
"assets/svg/home_icons_6.svg"
,
"assets/svg/home_icons_81.svg"
,
// "assets/svg/home_icons_9.svg",
];
final
requiredRoles
=
[
"430"
,
"430"
,
"430"
,
"430"
,
"431"
,
"433"
,
"434"
,
// "433",
"432"
,
"431"
,
// "430",
];
final
filteredItems
=
<
Map
<
String
,
String
>>[];
for
(
int
i
=
0
;
i
<
names
.
length
;
i
++)
{
if
(
homescreen
.
roleStatus
.
contains
(
requiredRoles
[
i
]))
{
filteredItems
.
add
({
'name'
:
names
[
i
],
'icon'
:
icons
[
i
]});
}
}
return
WillPopScope
(
onWillPop:
onBackPressed
,
child:
RefreshIndicator
.
adaptive
(
color:
AppColors
.
app_blue
,
onRefresh:
()
async
{
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
homescreen
.
DashboardApiFunction
(
context
);
},
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
Column
(
children:
[
Expanded
(
flex:
4
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
),
),
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Expanded
(
flex:
2
,
child:
SizedBox
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SizedBox
(
width:
66
,
height:
66
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
50
),
child:
CachedNetworkImage
(
cacheKey:
profile
.
profileImage
,
fit:
BoxFit
.
cover
,
imageUrl:
"
${profile.profileImage}
"
,
useOldImageOnUrlChange:
false
,
placeholder:
(
context
,
url
)
=>
CircularProgressIndicator
.
adaptive
(),
errorWidget:
(
context
,
url
,
error
)
=>
Icon
(
Icons
.
error
),
child:
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
30
,
),
padding:
EdgeInsets
.
only
(
bottom:
15
,
right:
10
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
30
),
gradient:
LinearGradient
(
colors:
[
AppColors
.
profile_card_gradient1
,
AppColors
.
profile_card_gradient2
,
],
),
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Expanded
(
flex:
2
,
child:
SizedBox
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SizedBox
(
width:
66
,
height:
66
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
50
),
child:
CachedNetworkImage
(
cacheKey:
profile
.
profileImage
,
fit:
BoxFit
.
cover
,
imageUrl:
"
${profile.profileImage}
"
,
useOldImageOnUrlChange:
false
,
placeholder:
(
context
,
url
)
=>
CircularProgressIndicator
.
adaptive
(),
errorWidget:
(
context
,
url
,
error
)
=>
Icon
(
Icons
.
error
),
),
),
),
),
),
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Container
(
width:
13
,
height:
13
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
homescreen
.
onlineStatus
==
"Online"
?
Colors
.
green
:
Colors
.
yellow
,
),
),
SizedBox
(
width:
6
),
Text
(
"
${homescreen.onlineStatus}
"
,
style:
TextStyle
(
fontSize:
16
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF2D2D2D
),
),
),
],
),
],
),
),
),
Expanded
(
flex:
3
,
child:
Container
(
padding:
EdgeInsets
.
only
(
right:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
MainAxisAlignment
.
center
,
children:
[
Container
(
width:
13
,
height:
13
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
homescreen
.
onlineStatus
==
"Online"
?
Colors
.
green
:
Colors
.
yellow
,
// Text(
// "${profile.employeeName}",
// maxLines: 1,
// style: TextStyle(
// color: AppColors.app_blue,
// fontFamily: "JakartaSemiBold",
// fontSize: 18,
// ),
// ),
AutoSizeText
(
'
${profile.employeeName}
'
,
maxFontSize:
18
,
minFontSize:
12
,
style:
TextStyle
(
fontSize:
18
,
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaRegular"
,
),
maxLines:
2
,
),
SizedBox
(
width:
6
),
Text
(
"
${homescreen.onlineStatus}
"
,
AutoSizeText
(
'(
${profile.designation}
)'
,
maxFontSize:
14
,
minFontSize:
10
,
style:
TextStyle
(
fontSize:
1
6
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF2D2D2D
)
,
fontSize:
1
4
,
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
),
maxLines:
1
,
),
],
),
],
),
),
),
Expanded
(
flex:
3
,
child:
Container
(
padding:
EdgeInsets
.
only
(
right:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Text(
// "${profile.employeeName}",
// maxLines: 1,
// style: TextStyle(
// color: AppColors.app_blue,
// fontFamily: "JakartaSemiBold",
// fontSize: 18,
// ),
// ),
AutoSizeText
(
'
${profile.employeeName}
'
,
maxFontSize:
18
,
minFontSize:
12
,
style:
TextStyle
(
fontSize:
18
,
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaRegular"
,
),
maxLines:
2
,
),
AutoSizeText
(
'(
${profile.designation}
)'
,
maxFontSize:
14
,
minFontSize:
10
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
),
maxLines:
1
,
),
// Text(
// "${profile.designation}",
// maxLines: 1,
// style: TextStyle(
// color: AppColors.semi_black,
// fontFamily: "JakartaRegular",
// fontSize: 14,
// ),
// ),
Text
(
"
${profile.employeeeID}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
),
),
InkResponse
(
onTap:
()
{
_showProfileBottomSheet
(
context
,
);
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Profile"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
),
// Text(
// "${profile.designation}",
// maxLines: 1,
// style: TextStyle(
// color: AppColors.semi_black,
// fontFamily: "JakartaRegular",
// fontSize: 14,
// ),
// ),
Text
(
"
${profile.employeeeID}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
),
SizedBox
(
width:
5
),
SizedBox
(
width:
15
,
height:
15
,
child:
Center
(
child:
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
InkResponse
(
onTap:
()
{
_showProfileBottomSheet
(
context
,
);
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
"View Profile"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
),
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
15
,
height:
15
,
child:
Center
(
child:
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
),
),
],
),
]
,
)
,
)
,
]
,
),
]
,
)
,
),
)
,
]
,
),
]
,
)
,
),
),
),
),
Expanded
(
flex:
10
,
child:
Container
(
padding:
EdgeInsets
.
only
(
left:
20
,
right:
20
,
top:
0
,
bottom:
10
,
),
margin:
EdgeInsets
.
only
(
top:
10
),
child:
GridView
.
builder
(
itemCount:
filteredItems
.
length
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
),
itemBuilder:
(
context
,
index
)
{
final
item
=
filteredItems
[
index
];
return
InkResponse
(
onTap:
()
async
{
var
res
;
switch
(
item
[
'name'
])
{
case
"Attendance"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
AttendanceScreen
(),
settings:
RouteSettings
(
arguments:
'AttendanceScreen'
,
),
),
);
break
;
case
"ERP"
:
bool
isGpsEnabled
=
await
Geolocator
.
isLocationServiceEnabled
();
if
(
isGpsEnabled
)
{
if
(
Platform
.
isAndroid
)
{
Expanded
(
flex:
10
,
child:
Container
(
padding:
EdgeInsets
.
only
(
left:
20
,
right:
20
,
top:
0
,
bottom:
10
,
),
margin:
EdgeInsets
.
only
(
top:
10
),
child:
GridView
.
builder
(
itemCount:
filteredItems
.
length
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
),
itemBuilder:
(
context
,
index
)
{
final
item
=
filteredItems
[
index
];
return
InkResponse
(
onTap:
()
async
{
var
res
;
switch
(
item
[
'name'
])
{
case
"Attendance"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
AttendanceScreen
(),
settings:
RouteSettings
(
arguments:
'AttendanceScreen'
,
),
),
);
break
;
case
"ERP"
:
bool
isGpsEnabled
=
await
Geolocator
.
isLocationServiceEnabled
();
if
(
isGpsEnabled
)
{
if
(
Platform
.
isAndroid
)
{
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
WebErpScreen
(
erp_url:
homescreen
.
webPageUrl
,
),
),
);
}
else
{
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
WebERPIOS
(
url:
homescreen
.
webPageUrl
,
),
),
);
}
}
else
{
requestGpsPermission
();
}
break
;
case
"Gen Tracker"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Gentrackerdashboard
(),
settings:
RouteSettings
(
arguments:
'Gentrackerdashboard'
,
),
),
);
break
;
case
"Service Engineer"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Serviceengineerdashboard
(),
),
);
break
;
case
"Nearby"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Nearbygenerators
(),
),
);
break
;
case
"Inventory"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
InventoryScreen
(),
),
);
break
;
case
"Whizzdom"
:
bool
isGpsEnabled
=
await
Geolocator
.
isLocationServiceEnabled
();
if
(
isGpsEnabled
)
{
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
WebWhizzdomScreen
(
whizzdom_url:
homescreen
.
whizzdomPageUrl
,
),
),
);
}
else
{
requestGpsPermission
();
}
break
;
case
"Common"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Commondashboard
(),
),
);
break
;
case
"Finance"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
WebErpScreen
(
erp_url:
homescreen
.
webPageUrl
,
(
context
)
=>
Financedashboard
(),
settings:
RouteSettings
(
arguments:
'Financedashboard'
,
),
),
);
}
else
{
break
;
case
"Orders"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
WebERPIOS
(
url:
homescreen
.
webPageUrl
,
(
context
)
=>
Ordermoduledashboard
(),
),
);
case
"CRM"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
CrmdashboardScreen
(),
settings:
RouteSettings
(
name:
'CrmdashboardScreen'
,
),
),
);
}
}
else
{
requestGpsPermission
()
;
default
:
print
(
"111"
);
break
;
}
break
;
case
"Gen Tracker"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Gentrackerdashboard
(),
settings:
RouteSettings
(
arguments:
'Gentrackerdashboard'
,
),
),
);
break
;
case
"Service Engineer"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Serviceengineerdashboard
(),
),
);
break
;
case
"Nearby"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Nearbygenerators
(),
),
);
break
;
case
"Inventory"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
InventoryScreen
(),
),
);
break
;
case
"Whizzdom"
:
bool
isGpsEnabled
=
await
Geolocator
.
isLocationServiceEnabled
();
if
(
isGpsEnabled
)
{
res
=
await
Navigator
.
push
(
if
(
res
==
true
)
{
homescreen
.
DashboardApiFunction
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
WebWhizzdomScreen
(
whizzdom_url:
homescreen
.
whizzdomPageUrl
,
),
),
);
}
else
{
requestGpsPermission
();
}
break
;
case
"Common"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Commondashboard
(),
),
);
break
;
case
"Finance"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Financedashboard
(),
settings:
RouteSettings
(
arguments:
'Financedashboard'
,
),
),
);
break
;
case
"Orders"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordermoduledashboard
(),
),
);
case
"CRM"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
CrmdashboardScreen
(),
settings:
RouteSettings
(
name:
'CrmdashboardScreen'
,
},
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
30
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
item
[
'icon'
]!,
height:
45
,
),
),
);
default
:
print
(
"111"
);
break
;
}
if
(
res
==
true
)
{
homescreen
.
DashboardApiFunction
(
context
,
);
}
},
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
30
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
item
[
'icon'
]!,
height:
45
,
SizedBox
(
height:
10
),
Text
(
item
[
'name'
]!),
],
),
SizedBox
(
height:
10
),
Text
(
item
[
'name'
]!),
],
),
),
);
},
),
);
},
),
),
),
)
,
]
,
),
]
,
)
,
),
),
),
),
),
);
},
)
);
},
)
:
NoNetwork
(
context
);
}
...
...
@@ -647,9 +646,9 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
Consumer3
<
HomescreenNotifier
,
ProfileNotifer
,
LogoutNotifier
HomescreenNotifier
,
ProfileNotifer
,
LogoutNotifier
>(
builder:
(
context
,
home
,
profile
,
logout
,
child
)
{
return
SingleChildScrollView
(
...
...
@@ -721,10 +720,10 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
useOldImageOnUrlChange:
false
,
placeholder:
(
context
,
url
)
=>
CircularProgressIndicator
.
adaptive
(),
CircularProgressIndicator
.
adaptive
(),
errorWidget:
(
context
,
url
,
error
)
=>
Icon
(
Icons
.
error
),
Icon
(
Icons
.
error
),
),
),
),
...
...
@@ -752,7 +751,7 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
CrossAxisAlignment
.
center
,
children:
[
Expanded
(
flex:
1
,
...
...
@@ -760,7 +759,7 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
shrinkWrap:
true
,
itemCount:
5
,
physics:
NeverScrollableScrollPhysics
(),
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
final
textHeadings
=
[
"Company"
,
...
...
@@ -774,7 +773,7 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
child:
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Text
(
"
${
textHeadings[index]
}
"
,
textHeadings
[
index
],
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
...
...
@@ -794,7 +793,7 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
shrinkWrap:
true
,
itemCount:
5
,
physics:
NeverScrollableScrollPhysics
(),
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
final
textHeadings
=
[
profile
.
company
,
...
...
@@ -808,7 +807,8 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
child:
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Text
(
"
${textHeadings[index].toString()}
"
,
textHeadings
[
index
]
.
toString
(),
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
fontSize:
14
,
...
...
@@ -906,9 +906,9 @@ class _MyHomePageOldState extends State<MyHomePageOld> {
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
Consumer3
<
HomescreenNotifier
,
ProfileNotifer
,
LogoutNotifier
HomescreenNotifier
,
ProfileNotifer
,
LogoutNotifier
>(
builder:
(
context
,
home
,
profile
,
logout
,
child
)
{
return
SingleChildScrollView
(
...
...
lib/screens/old/crmDashboardold.dart
View file @
7210793a
...
...
@@ -62,15 +62,15 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
}
return
(
connection
==
"Online"
)
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
...
...
@@ -78,9 +78,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
return
Consumer
<
Crmdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
gridPages
=
provider
.
accessPages
.
where
((
page
)
=>
![
8
,
9
,
23
,
24
,
51
,
50
].
contains
(
page
.
id
))
.
toList
();
provider
.
accessPages
.
where
((
page
)
=>
![
8
,
9
,
23
,
24
,
51
,
50
].
contains
(
page
.
id
))
.
toList
();
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
...
...
@@ -126,9 +126,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
color:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
border:
focusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
)
:
null
,
focusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
)
:
null
,
),
child:
Row
(
children:
[
...
...
@@ -154,8 +154,8 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
MaterialPageRoute
(
builder:
(
context
)
=>
Universalsearchscreen
(
text:
provider
.
searchController
.
text
,
),
text:
provider
.
searchController
.
text
,
),
settings:
RouteSettings
(
name:
'SearchScreen'
),
),
);
...
...
@@ -191,7 +191,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
physics:
AlwaysScrollableScrollPhysics
(),
child:
Column
(
children:
[
if
(
provider
.
allLeads
.
length
>
0
)
...[
if
(
provider
.
allLeads
.
isNotEmpty
)
...[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
...
...
@@ -254,19 +254,19 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
MaterialPageRoute
(
builder:
(
context
)
=>
Leadlistbymode
(
pageTitleName:
provider
.
allLeads
[
jndex
]
.
filter
!
.
pageName
!,
mode:
provider
.
allLeads
[
jndex
]
.
filter
!
.
mode
,
filter:
provider
.
allLeads
[
jndex
].
filter
!,
),
pageTitleName:
provider
.
allLeads
[
jndex
]
.
filter
!
.
pageName
!,
mode:
provider
.
allLeads
[
jndex
]
.
filter
!
.
mode
,
filter:
provider
.
allLeads
[
jndex
].
filter
!,
),
),
);
}
...
...
@@ -331,9 +331,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
MaterialPageRoute
(
builder:
(
context
)
=>
Leadlistbymode
(
mode:
gridPages
[
index
].
mode
,
pageTitleName:
gridPages
[
index
].
pageName
,
),
mode:
gridPages
[
index
].
mode
,
pageTitleName:
gridPages
[
index
].
pageName
,
),
),
);
}
else
if
(
gridPages
[
index
].
pageName
!.
contains
(
...
...
@@ -344,9 +344,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
MaterialPageRoute
(
builder:
(
context
)
=>
ProspectListByMode
(
mode:
gridPages
[
index
].
mode
,
pageTitleName:
gridPages
[
index
].
pageName
,
),
mode:
gridPages
[
index
].
mode
,
pageTitleName:
gridPages
[
index
].
pageName
,
),
),
);
}
else
if
(
gridPages
[
index
].
pageName
==
...
...
@@ -414,7 +414,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
},
),
if
(
provider
.
pendingTasksLists
.
length
>
0
)
...[
if
(
provider
.
pendingTasksLists
.
isNotEmpty
)
...[
Align
(
alignment:
Alignment
.
centerLeft
,
child:
Padding
(
...
...
@@ -428,7 +428,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
),
Container
(
SizedBox
(
width:
double
.
infinity
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.34
,
child:
ListView
.
builder
(
...
...
@@ -483,17 +483,17 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
"
${
headings[j]
}
"
,
headings
[
j
],
style:
TextStyle
(
fontSize:
14
),
),
),
Expanded
(
child:
Text
(
"
${
subHeadings[j]
}
"
,
subHeadings
[
j
],
style:
TextStyle
(
color:
AppColors
.
grey_semi
,
fontSize:
14
,
...
...
@@ -516,7 +516,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkResponse
(
onTap:
()
{
if
(
provider
.
accessPages
...
...
@@ -566,9 +566,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
child:
Consumer
<
Crmdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
final
accessiblePagesList
=
provider
.
accessPages
.
where
((
page
)
=>
[
8
,
9
].
contains
(
page
.
id
))
.
toList
();
provider
.
accessPages
.
where
((
page
)
=>
[
8
,
9
].
contains
(
page
.
id
))
.
toList
();
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
...
...
lib/screens/old/leadDetailsOld.dart
View file @
7210793a
...
...
@@ -76,15 +76,15 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
}
return
(
connection
==
"Online"
)
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
...
...
@@ -101,11 +101,11 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
"Last Followup Date"
,
];
var
subHeadings1
=
[
provider
.
accountDetails
!
.
accManager
??
"-"
,
provider
.
accountDetails
!
.
owner
??
"-"
,
provider
.
leadDetails
!
.
address
??
"-"
,
provider
.
leadDetails
!
.
status
??
"-"
,
provider
.
followupDetails
.
first
!
.
fdate
??
"-"
,
provider
.
accountDetails
.
accManager
??
"-"
,
provider
.
accountDetails
.
owner
??
"-"
,
provider
.
leadDetails
.
address
??
"-"
,
provider
.
leadDetails
.
status
??
"-"
,
provider
.
followupDetails
.
first
.
fdate
??
"-"
,
];
var
headings2
=
[
...
...
@@ -120,14 +120,14 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
];
var
subHeadings2
=
[
provider
.
accountDetails
!
.
state
??
"-"
,
provider
.
accountDetails
!
.
district
??
"-"
,
provider
.
accountDetails
!
.
subLocality
??
"-"
,
provider
.
accountDetails
!
.
source
??
"-"
,
provider
.
accountDetails
!
.
reference
??
"-"
,
provider
.
accountDetails
!
.
team
??
"-"
,
provider
.
accountDetails
!
.
segment
??
"-"
,
"
${provider.leadDetails
!
.lage ?? "-"}
days"
,
provider
.
accountDetails
.
state
??
"-"
,
provider
.
accountDetails
.
district
??
"-"
,
provider
.
accountDetails
.
subLocality
??
"-"
,
provider
.
accountDetails
.
source
??
"-"
,
provider
.
accountDetails
.
reference
??
"-"
,
provider
.
accountDetails
.
team
??
"-"
,
provider
.
accountDetails
.
segment
??
"-"
,
"
${provider.leadDetails.lage ?? "-"}
days"
,
];
var
totalHeadings
=
[...
headings1
];
...
...
@@ -210,11 +210,11 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
EditAccountDetails
(
leadID:
leadDetails
.
id
,
mode:
widget
.
mode
,
accountID:
leadDetails
.
accId
,
companyName:
leadDetails
.
name
,
),
leadID:
leadDetails
.
id
,
mode:
widget
.
mode
,
accountID:
leadDetails
.
accId
,
companyName:
leadDetails
.
name
,
),
),
);
if
(
res
==
true
)
{
...
...
@@ -257,35 +257,35 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
Expanded
(
child:
InkResponse
(
child:
totalHeadings
[
j
]
==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
totalHeadings
[
j
]
==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
message:
"
${provider.leadDetails.createdDatetime}
"
,
child:
Text
(
totalSubHeadings
[
j
]
==
""
?
"-"
:
totalSubHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
),
),
)
:
Text
(
totalSubHeadings
[
j
]
==
""
?
"-"
:
totalSubHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
message:
"
${provider.leadDetails.createdDatetime}
"
,
child:
Text
(
totalSubHeadings
[
j
]
==
""
?
"-"
:
totalSubHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
),
),
)
:
Text
(
totalSubHeadings
[
j
]
==
""
?
"-"
:
totalSubHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
),
],
...
...
@@ -385,9 +385,9 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
Productdetails
(
leadID:
provider
.
leadDetails
.
id
,
mode:
widget
.
mode
,
),
leadID:
provider
.
leadDetails
.
id
,
mode:
widget
.
mode
,
),
),
);
break
;
...
...
@@ -397,8 +397,8 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
Contactdetails
(
accID:
provider
.
leadDetails
.
accId
,
),
accID:
provider
.
leadDetails
.
accId
,
),
),
);
break
;
...
...
@@ -416,8 +416,8 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
AppointmentDetails
(
leadID:
provider
.
leadDetails
.
id
,
),
leadID:
provider
.
leadDetails
.
id
,
),
),
);
break
;
...
...
@@ -427,9 +427,9 @@ class _LeadDetailsByModeOldState extends State<LeadDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
QuotationDetails
(
leadID:
provider
.
leadDetails
.
id
,
mode:
widget
.
mode
,
),
leadID:
provider
.
leadDetails
.
id
,
mode:
widget
.
mode
,
),
),
);
default
:
...
...
lib/screens/old/leadListOld.dart
View file @
7210793a
...
...
@@ -102,15 +102,15 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
}
return
(
connection
==
"Online"
)
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
...
...
@@ -140,207 +140,207 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
crmLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
crmLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
crmLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
)
:
crmLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
crmLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
crmLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Text
(
crmLists
[
index
].
company
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
crmLists
[
index
].
company
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
crmLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
],
),
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
crmLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Account Manager"
,
"Contact Person"
,
"Product"
,
"Open Status"
,
];
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Account Manager"
,
"Contact Person"
,
"Product"
,
"Open Status"
,
];
final
subHeadings
=
[
crmLists
[
index
].
accman
,
crmLists
[
index
].
cname
,
crmLists
[
index
].
product
,
crmLists
[
index
].
openStatus
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
final
subHeadings
=
[
crmLists
[
index
].
accman
,
crmLists
[
index
].
cname
,
crmLists
[
index
].
product
,
crmLists
[
index
].
openStatus
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
),
),
),
Expanded
(
child:
Text
(
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
LeadDetailsByMode
(
pageTitleName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
leadId:
provider
.
crmLeadList
[
index
]
.
leadid
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
LeadDetailsByMode
(
pageTitleName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
leadId:
provider
.
crmLeadList
[
index
]
.
leadid
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
},
),
),
);
},
),
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
@@ -412,26 +412,26 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
employeesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Employees
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
employeesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Employees
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
employeesList
.
contains
(
provider
.
selectedEmployee
,
)
?
provider
.
selectedEmployee
:
null
,
provider
.
employeesList
.
contains
(
provider
.
selectedEmployee
,
)
?
provider
.
selectedEmployee
:
null
,
// value: provider.selectedEmployees,
onChanged:
(
Employees
?
value
)
{
...
...
@@ -441,15 +441,15 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
.
isNotEmpty
)
{
provider
.
selectedEmployee
=
value
;
provider
.
selectedEmployeeId
=
value
!
.
id
!;
value
.
id
!;
provider
.
selectedEmployeeValue
=
value
!
.
name
!;
value
.
name
!;
provider
.
crmLeadListSourceOnReferenceAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedSourceId
,
);
context
,
widget
.
mode
,
provider
.
selectedSourceId
,
);
}
}
},
...
...
@@ -457,9 +457,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -477,20 +477,20 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
leadStatusList
.
map
(
(
leadStatus
)
=>
DropdownMenuItem
<
String
>(
value:
leadStatus
,
child:
Text
(
leadStatus
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
leadStatusList
.
map
(
(
leadStatus
)
=>
DropdownMenuItem
<
String
>(
value:
leadStatus
,
child:
Text
(
leadStatus
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedLeadStatus
,
onChanged:
(
String
?
value
)
{
if
(
value
!=
null
)
{
...
...
@@ -501,9 +501,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -521,20 +521,20 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
openStatusList
.
map
(
(
leadStatus
)
=>
DropdownMenuItem
<
String
>(
value:
leadStatus
,
child:
Text
(
leadStatus
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
openStatusList
.
map
(
(
leadStatus
)
=>
DropdownMenuItem
<
String
>(
value:
leadStatus
,
child:
Text
(
leadStatus
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedOpenStatus
,
onChanged:
(
String
?
value
)
{
if
(
value
!=
null
)
{
...
...
@@ -545,9 +545,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -585,35 +585,34 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
sourcesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Sources
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
sourcesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Sources
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedSource
,
onChanged:
(
Sources
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
sourcesList
.
isNotEmpty
)
{
provider
.
selectedSource
=
value
;
provider
.
selectedSourceId
=
value
!.
id
!;
provider
.
selectedSourceId
=
value
.
id
!;
provider
.
selectedSourceValue
=
value
!
.
name
!;
value
.
name
!;
provider
.
crmLeadListSourceOnReferenceAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedSourceId
,
);
context
,
widget
.
mode
,
provider
.
selectedSourceId
,
);
}
}
},
...
...
@@ -621,9 +620,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -641,20 +640,20 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
referencesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
References
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
referencesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
References
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedReference
,
onChanged:
(
References
?
value
)
{
if
(
value
!=
null
)
{
...
...
@@ -663,9 +662,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
.
isNotEmpty
)
{
provider
.
selectedReference
=
value
;
provider
.
selectedReferenceId
=
value
!
.
id
!;
value
.
id
!;
provider
.
selectedReferenceValue
=
value
!
.
name
!;
value
.
name
!;
}
}
},
...
...
@@ -673,9 +672,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -693,34 +692,34 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
teamsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Teams
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
teamsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Teams
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedTeam
,
onChanged:
(
Teams
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
teamsList
.
isNotEmpty
)
{
provider
.
selectedTeam
=
value
;
provider
.
selectedTeamId
=
value
!
.
id
!;
provider
.
selectedTeamId
=
value
.
id
!;
provider
.
selectedTeamValue
=
value
!
.
name
!;
value
.
name
!;
provider
.
crmLeadListSegmentOnTeamAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedTeamId
,
);
context
,
widget
.
mode
,
provider
.
selectedTeamId
,
);
}
}
},
...
...
@@ -728,9 +727,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -748,29 +747,29 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
segmentsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Segments
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
segmentsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Segments
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedSegment
,
onChanged:
(
Segments
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
segmentsList
.
isNotEmpty
)
{
provider
.
selectedSegment
=
value
;
provider
.
selectedSegmentId
=
value
!
.
id
!;
value
.
id
!;
provider
.
selectedSegmentValue
=
value
!
.
name
!;
value
.
name
!;
}
}
},
...
...
@@ -778,9 +777,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -798,28 +797,28 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
statesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
States
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
statesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
States
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedStates
,
onChanged:
(
States
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
statesList
.
isNotEmpty
)
{
provider
.
selectedStates
=
value
;
provider
.
selectedStateId
=
value
!
.
id
!;
provider
.
selectedStateId
=
value
.
id
!;
provider
.
selectedStateValue
=
value
!
.
name
!;
value
.
name
!;
if
(
provider
.
districtsList
.
isNotEmpty
)
{
...
...
@@ -830,10 +829,10 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
}
provider
.
crmLeadListDistrictsOnStateAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedStateId
,
);
context
,
widget
.
mode
,
provider
.
selectedStateId
,
);
}
}
},
...
...
@@ -841,9 +840,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -861,29 +860,29 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
districtsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Districts
>(
value:
slist
,
child:
Text
(
slist
.
district
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
districtsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Districts
>(
value:
slist
,
child:
Text
(
slist
.
district
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedDistricts
,
onChanged:
(
Districts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
districtsList
.
isNotEmpty
)
{
provider
.
selectedDistricts
=
value
;
provider
.
selectedDistrictId
=
value
!
.
id
!;
value
.
id
!;
provider
.
selectedDistrictValue
=
value
!
.
district
!;
value
.
district
!;
if
(
provider
.
subLocationsList
.
isNotEmpty
)
{
...
...
@@ -891,16 +890,16 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
// provider.selectedSubLocations =
// null;
provider
.
selectedSubLocationId
=
null
;
null
;
provider
.
selectedSubLocationValue
=
""
;
""
;
}
provider
.
crmLeadListSubLocOnDistrictAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedDistrictId
,
);
context
,
widget
.
mode
,
provider
.
selectedDistrictId
,
);
}
}
},
...
...
@@ -908,9 +907,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -928,21 +927,21 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
subLocationsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
SubLocations
>(
value:
slist
,
child:
Text
(
slist
.
subLocality
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
subLocationsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
SubLocations
>(
value:
slist
,
child:
Text
(
slist
.
subLocality
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedSubLocations
,
onChanged:
(
SubLocations
?
value
)
{
if
(
value
!=
null
)
{
...
...
@@ -951,9 +950,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
.
isNotEmpty
)
{
provider
.
selectedSubLocations
=
value
;
provider
.
selectedSubLocationId
=
value
!
.
id
!;
value
.
id
!;
provider
.
selectedSubLocationValue
=
value
!
.
subLocality
!;
value
.
subLocality
!;
}
}
},
...
...
@@ -961,9 +960,9 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -981,7 +980,7 @@ class _LeadlistbymodeOldState extends State<LeadlistbymodeOld> {
provider
.
selectedReferenceId
,
provider
.
selectedTeamId
,
provider
.
selectedSegmentId
,
""
""
,
);
Navigator
.
pop
(
context
);
},
...
...
lib/screens/old/paymentListPayReqOld.dart
View file @
7210793a
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
...
...
@@ -17,7 +16,10 @@ import '../commonDateRangeFilter.dart';
class
PaymentlistpaymentrequisitionOld
extends
StatefulWidget
{
final
String
pageTitleName
;
const
PaymentlistpaymentrequisitionOld
({
super
.
key
,
required
this
.
pageTitleName
});
const
PaymentlistpaymentrequisitionOld
({
super
.
key
,
required
this
.
pageTitleName
,
});
@override
State
<
PaymentlistpaymentrequisitionOld
>
createState
()
=>
...
...
@@ -77,15 +79,15 @@ class _PaymentlistpaymentrequisitionOldState
}
return
(
connection
==
"Online"
)
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
...
...
@@ -143,266 +145,266 @@ class _PaymentlistpaymentrequisitionOldState
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
children:
[
Text
(
requestLists
[
index
]
.
receipientAccount
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
),
Text
(
"₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
receipientAccount
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
// Expanded(
// flex: 2,
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 5,
// vertical: 10,
// ),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFE3FFE0),
// ),
// child: Center(
// child: Text(
// requestLists[index].refType!,
// textAlign: TextAlign.center,
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: Color(0xFF0D9C00),
// ),
// ),
// ),
// ),
// ),
],
),
),
),
// Expanded(
// flex: 2,
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 5,
// vertical: 10,
// ),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFE3FFE0),
// ),
// child: Center(
// child: Text(
// requestLists[index].refType!,
// textAlign: TextAlign.center,
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: Color(0xFF0D9C00),
// ),
// ),
// ),
// ),
// ),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
"To Account"
,
"Attachment"
,
"Request Mode"
,
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
"To Account"
,
"Attachment"
,
"Request Mode"
,
"Payment Date"
,
"Note"
,
];
"Payment Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
payAccount
,
"View"
,
requestLists
[
index
].
requestMode
,
final
subHeadings
=
[
requestLists
[
index
].
payAccount
,
"View"
,
requestLists
[
index
].
requestMode
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
paymentDate
,
requestLists
[
index
].
description
,
];
if
(
headings
[
j
]
==
"Attachment"
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
paymentDate
,
requestLists
[
index
].
description
,
];
if
(
headings
[
j
]
==
"Attachment"
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
);
},
child:
Text
(
subHeadings
[
j
]
==
""
?
"-"
:
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
subHeadings
[
j
]
==
""
?
"-"
:
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailspaymentrequisition
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentdetailspaymentrequisition"
,
),
),
);
if
(
routeSettingName
==
"Paymentdetailspaymentrequisition"
)
{
print
(
"pld"
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetailspaymentrequisition
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentdetailspaymentrequisition"
,
),
),
);
if
(
routeSettingName
==
"Paymentdetailspaymentrequisition"
)
{
print
(
"pld"
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
},
),
),
);
},
),
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
lib/screens/old/paymentreceiptListOld.dart
View file @
7210793a
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
...
...
@@ -61,15 +60,15 @@ class _PaymentreceiptlistOldState extends State<PaymentreceiptlistOld> {
}
return
(
connection
==
"Online"
)
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
...
...
@@ -127,239 +126,239 @@ class _PaymentreceiptlistOldState extends State<PaymentreceiptlistOld> {
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
)
:
requestLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
child:
ListView
.
builder
(
itemCount:
requestLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
,
),
child:
Column
(
children:
[
Row
(
children:
[
Text
(
requestLists
[
index
]
.
receipientAccount
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
),
Text
(
"₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
]
.
receipientAccount
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹
${requestLists[index].amount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
],
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
"Receipt Account"
,
"Attachment"
,
"Request Mode"
,
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
"Receipt Account"
,
"Attachment"
,
"Request Mode"
,
"Receipt Date"
,
"Note"
,
];
"Receipt Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
receipientAccount
,
"View"
,
requestLists
[
index
].
requestMode
,
final
subHeadings
=
[
requestLists
[
index
].
receipientAccount
,
"View"
,
requestLists
[
index
].
requestMode
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
receiptDate
,
requestLists
[
index
].
description
,
];
if
(
headings
[
j
]
==
"Attachment"
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
receiptDate
,
requestLists
[
index
].
description
,
];
if
(
headings
[
j
]
==
"Attachment"
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
);
},
child:
Text
(
subHeadings
[
j
]
==
""
?
"-"
:
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
child:
Text
(
subHeadings
[
j
]
==
""
?
"-"
:
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentreceiptdetails
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentreceiptdetails"
,
),
),
);
if
(
routeSettingName
==
"Paymentreceiptdetails"
)
{
debugPrint
(
"prd"
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
// if (res == true) {
// provider.paymentsListAPI(context, '', '');
// }
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentreceiptdetails
(
pageName:
widget
.
pageTitleName
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentreceiptdetails"
,
),
),
);
if
(
routeSettingName
==
"Paymentreceiptdetails"
)
{
debugPrint
(
"prd"
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
// if (res == true) {
// provider.paymentsListAPI(context, '', '');
// }
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
},
),
),
);
},
),
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
lib/screens/old/prospectDetailsOld.dart
View file @
7210793a
...
...
@@ -36,7 +36,8 @@ class ProspectDetailsByModeOld extends StatefulWidget {
});
@override
State
<
ProspectDetailsByModeOld
>
createState
()
=>
ProspectDetailsByModeOldState
();
State
<
ProspectDetailsByModeOld
>
createState
()
=>
ProspectDetailsByModeOldState
();
}
class
ProspectDetailsByModeOldState
extends
State
<
ProspectDetailsByModeOld
>
{
...
...
@@ -100,9 +101,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
editProvider
.
accountDetails
.
salutationName
!=
null
)
{
editProvider
.
selectedSalutation
=
editProvider
.
salutationList
.
firstWhere
(
(
element
)
=>
element
==
editProvider
.
accountDetails
.
salutationName
,
(
element
)
=>
element
==
editProvider
.
accountDetails
.
salutationName
,
)
??
editProvider
.
salutationList
.
first
;
editProvider
.
salutationList
.
first
;
}
// print("States:${editProvider.statesList.toList()}");
...
...
@@ -110,53 +111,47 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
editProvider
.
accountDetails
.
state
!=
null
)
{
print
(
editProvider
.
accountDetails
.
state
);
final
selectedState
=
editProvider
.
statesList
.
firstWhere
(
(
element
)
=>
element
.
id
!.
trim
()
==
editProvider
.
accountDetails
.
state
!.
trim
(),
(
element
)
=>
element
.
id
!.
trim
()
==
editProvider
.
accountDetails
.
state
!.
trim
(),
);
if
(
selectedState
!=
null
)
{
editProvider
.
selectedStates
=
selectedState
;
editProvider
.
selectedStateId
=
selectedState
.
id
;
editProvider
.
selectedStateValue
=
selectedState
.
name
;
editProvider
.
selectedStates
=
selectedState
;
editProvider
.
selectedStateId
=
selectedState
.
id
;
editProvider
.
selectedStateValue
=
selectedState
.
name
;
await
editProvider
.
crmLeadListDistrictsOnStateAPIFunction
(
context
,
widget
.
mode
,
editProvider
.
selectedStateId
,
);
}
await
editProvider
.
crmLeadListDistrictsOnStateAPIFunction
(
context
,
widget
.
mode
,
editProvider
.
selectedStateId
,
);
}
// Prefill district
if
(
editProvider
.
districtsList
.
isNotEmpty
&&
editProvider
.
accountDetails
.
district
!=
null
)
{
final
selectedDistrict
=
editProvider
.
districtsList
.
firstWhere
(
(
element
)
=>
element
.
id
!.
trim
()
==
editProvider
.
accountDetails
.
district
!.
trim
(),
(
element
)
=>
element
.
id
!.
trim
()
==
editProvider
.
accountDetails
.
district
!.
trim
(),
);
if
(
selectedDistrict
!=
null
)
{
editProvider
.
selectedDistricts
=
selectedDistrict
;
editProvider
.
selectedDistrictId
=
selectedDistrict
.
id
;
editProvider
.
selectedDistrictValue
=
selectedDistrict
.
district
;
editProvider
.
selectedDistricts
=
selectedDistrict
;
editProvider
.
selectedDistrictId
=
selectedDistrict
.
id
;
editProvider
.
selectedDistrictValue
=
selectedDistrict
.
district
;
await
editProvider
.
crmLeadListSubLocOnDistrictAPIFunction
(
context
,
widget
.
mode
,
editProvider
.
selectedDistrictId
,
);
}
await
editProvider
.
crmLeadListSubLocOnDistrictAPIFunction
(
context
,
widget
.
mode
,
editProvider
.
selectedDistrictId
,
);
}
if
(
editProvider
.
subLocationsList
.
isNotEmpty
&&
editProvider
.
accountDetails
.
subLocality
!=
null
)
{
final
selectedSubLocation
=
editProvider
.
subLocationsList
.
firstWhere
(
(
element
)
=>
element
.
id
==
editProvider
.
accountDetails
.
subLocality
,
(
element
)
=>
element
.
id
==
editProvider
.
accountDetails
.
subLocality
,
);
if
(
selectedSubLocation
!=
null
)
{
editProvider
.
selectedSubLocations
=
selectedSubLocation
;
editProvider
.
selectedSubLocationId
=
selectedSubLocation
.
id
;
editProvider
.
selectedSubLocationValue
=
selectedSubLocation
.
subLocality
;
}
editProvider
.
selectedSubLocations
=
selectedSubLocation
;
editProvider
.
selectedSubLocationId
=
selectedSubLocation
.
id
;
editProvider
.
selectedSubLocationValue
=
selectedSubLocation
.
subLocality
;
}
print
(
"Company Name:
${editProvider.editCompanyNameController.text}
"
);
...
...
@@ -188,22 +183,22 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
}
return
(
connection
==
"Online"
)
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer2
<
crmProspectDetailsProvider
,
Crmeditprospectaccountprovider
crmProspectDetailsProvider
,
Crmeditprospectaccountprovider
>(
builder:
(
context
,
provider
,
editProvider
,
child
)
{
var
leadDetails
=
provider
.
accountDetails
;
...
...
@@ -336,35 +331,35 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
Expanded
(
child:
InkResponse
(
child:
provider
.
Headings
[
j
]
==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
provider
.
Headings
[
j
]
==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
message:
"
${provider.accountDetails.createdDatetime}
"
,
child:
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
),
),
)
:
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
message:
"
${provider.accountDetails.createdDatetime}
"
,
child:
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
,
),
),
)
:
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
),
],
...
...
@@ -433,27 +428,27 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
editProsProvider
.
employeesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Employees
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
editProsProvider
.
employeesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Employees
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
editProsProvider
.
employeesList
.
contains
(
editProsProvider
.
selectedEmployees
,
)
?
editProsProvider
.
selectedEmployees
:
null
,
editProsProvider
.
employeesList
.
contains
(
editProsProvider
.
selectedEmployees
,
)
?
editProsProvider
.
selectedEmployees
:
null
,
// value: provider.selectedEmployees,
onChanged:
(
Employees
?
value
)
{
...
...
@@ -464,10 +459,10 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
editProsProvider
.
selectedEmployees
=
value
;
editProsProvider
.
selectedEmployeeId
=
value
!
.
id
!;
value
.
id
!;
editProsProvider
.
selectedEmployeeValue
=
value
!
.
name
!;
.
selectedEmployeeValue
=
value
.
name
!;
}
}
},
...
...
@@ -475,33 +470,33 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
editProsProvider
.
searchController
,
editProsProvider
.
searchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
editProsProvider
.
searchController
,
editProsProvider
.
searchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
...
...
@@ -514,9 +509,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -525,17 +520,17 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
InkWell
(
onTap:
editProsProvider
.
isLoading
?
null
:
()
{
editProsProvider
.
isLoading
=
true
;
editProsProvider
.
crmProspectDetailsTransferAccountAPIFunction
(
context
,
accID
,
editProsProvider
.
selectedEmployeeId
,
);
},
editProsProvider
.
isLoading
?
null
:
()
{
editProsProvider
.
isLoading
=
true
;
editProsProvider
.
crmProspectDetailsTransferAccountAPIFunction
(
context
,
accID
,
editProsProvider
.
selectedEmployeeId
,
);
},
child:
Container
(
alignment:
Alignment
.
center
,
height:
45
,
...
...
@@ -551,17 +546,17 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
),
child:
Center
(
child:
editProsProvider
.
isLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
,
),
)
:
Text
(
"Submit"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
editProsProvider
.
isLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
,
),
)
:
Text
(
"Submit"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
),
),
),
),
),
...
...
@@ -592,8 +587,8 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer2
<
Crmeditprospectaccountprovider
,
crmProspectDetailsProvider
Crmeditprospectaccountprovider
,
crmProspectDetailsProvider
>(
builder:
(
context
,
provider
,
prosDetProvider
,
child
)
{
return
Container
(
...
...
@@ -637,20 +632,20 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
salutationList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
String
>(
value:
slist
,
child:
Text
(
slist
,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
salutationList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
String
>(
value:
slist
,
child:
Text
(
slist
,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
selectedSalutation
,
onChanged:
(
String
?
value
)
{
if
(
value
!=
null
)
{
...
...
@@ -665,9 +660,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -697,33 +692,33 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
statesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
States
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
statesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
States
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
statesList
.
contains
(
provider
.
selectedStates
,
)
?
provider
.
selectedStates
:
null
,
provider
.
statesList
.
contains
(
provider
.
selectedStates
,
)
?
provider
.
selectedStates
:
null
,
onChanged:
(
States
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
statesList
.
isNotEmpty
)
{
provider
.
selectedStates
=
value
;
provider
.
selectedStateId
=
value
!
.
id
!;
provider
.
selectedStateId
=
value
.
id
!;
provider
.
selectedStateValue
=
value
!
.
name
!;
value
.
name
!;
if
(
provider
.
districtsList
.
isNotEmpty
)
{
...
...
@@ -734,10 +729,10 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
}
provider
.
crmLeadListDistrictsOnStateAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedStateId
,
);
context
,
widget
.
mode
,
provider
.
selectedStateId
,
);
}
}
},
...
...
@@ -745,9 +740,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -765,57 +760,57 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
districtsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Districts
>(
value:
slist
,
child:
Text
(
slist
.
district
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
districtsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Districts
>(
value:
slist
,
child:
Text
(
slist
.
district
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
districtsList
.
contains
(
provider
.
selectedDistricts
,
)
?
provider
.
selectedDistricts
:
null
,
provider
.
districtsList
.
contains
(
provider
.
selectedDistricts
,
)
?
provider
.
selectedDistricts
:
null
,
// value: provider.selectedDistricts,
onChanged:
(
Districts
?
value
)
{
if
(
value
!=
null
)
{
if
(
provider
.
districtsList
.
isNotEmpty
)
{
provider
.
selectedDistricts
=
value
;
provider
.
selectedDistrictId
=
value
!
.
id
!;
value
.
id
!;
provider
.
selectedDistrictValue
=
value
!
.
district
!;
value
.
district
!;
if
(
provider
.
subLocationsList
.
isNotEmpty
)
{
provider
.
subLocationsList
.
clear
();
provider
.
selectedSubLocations
=
null
;
null
;
provider
.
selectedSubLocationId
=
null
;
null
;
provider
.
selectedSubLocationValue
=
""
;
""
;
}
provider
.
crmLeadListSubLocOnDistrictAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedDistrictId
,
);
context
,
widget
.
mode
,
provider
.
selectedDistrictId
,
);
prosDetProvider
.
crmProspectDetailsAPIFunction
(
context
,
widget
.
leadId
,
);
context
,
widget
.
leadId
,
);
}
}
},
...
...
@@ -823,9 +818,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -843,27 +838,27 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
subLocationsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
SubLocations
>(
value:
slist
,
child:
Text
(
slist
.
subLocality
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
subLocationsList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
SubLocations
>(
value:
slist
,
child:
Text
(
slist
.
subLocality
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
subLocationsList
.
contains
(
provider
.
selectedSubLocations
,
)
?
provider
.
selectedSubLocations
:
null
,
provider
.
subLocationsList
.
contains
(
provider
.
selectedSubLocations
,
)
?
provider
.
selectedSubLocations
:
null
,
// value: provider.selectedSubLocations,
onChanged:
(
SubLocations
?
value
)
{
if
(
value
!=
null
)
{
...
...
@@ -872,9 +867,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
.
isNotEmpty
)
{
provider
.
selectedSubLocations
=
value
;
provider
.
selectedSubLocationId
=
value
!
.
id
!;
value
.
id
!;
provider
.
selectedSubLocationValue
=
value
!
.
subLocality
!;
value
.
subLocality
!;
}
}
},
...
...
@@ -882,9 +877,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -916,21 +911,21 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
InkResponse
(
onTap:
provider
.
isLoading
?
null
:
()
{
provider
.
isLoading
=
true
;
provider
.
crmProspectDetailsEditAccountSubmitAPIFunction
(
context
,
accID
,
provider
.
selectedSalutation
,
provider
.
selectedStateId
,
provider
.
selectedDistrictId
,
provider
.
selectedSubLocationId
,
);
Navigator
.
pop
(
context
);
},
provider
.
isLoading
?
null
:
()
{
provider
.
isLoading
=
true
;
provider
.
crmProspectDetailsEditAccountSubmitAPIFunction
(
context
,
accID
,
provider
.
selectedSalutation
,
provider
.
selectedStateId
,
provider
.
selectedDistrictId
,
provider
.
selectedSubLocationId
,
);
Navigator
.
pop
(
context
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
...
...
@@ -944,20 +939,20 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
provider
.
isLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
,
),
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
provider
.
isLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
,
),
)
:
Text
(
"Submit"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
],
...
...
@@ -1026,9 +1021,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
ProspectLeadDetails
(
leadID:
widget
.
leadId
,
mode:
widget
.
mode
,
),
leadID:
widget
.
leadId
,
mode:
widget
.
mode
,
),
),
);
break
;
...
...
@@ -1038,9 +1033,9 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
ProspectContactDetails
(
accountId:
provider
.
accountDetails
.
id
,
),
accountId:
provider
.
accountDetails
.
id
,
),
),
);
break
;
...
...
@@ -1050,8 +1045,8 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
ProspectOrderDetails
(
leadID:
widget
.
leadId
,
),
leadID:
widget
.
leadId
,
),
),
);
break
;
...
...
@@ -1061,8 +1056,8 @@ class ProspectDetailsByModeOldState extends State<ProspectDetailsByModeOld> {
MaterialPageRoute
(
builder:
(
context
)
=>
ProspectPaymentDetails
(
leadID:
widget
.
leadId
,
),
leadID:
widget
.
leadId
,
),
),
);
break
;
...
...
lib/screens/old/prospectListold.dart
View file @
7210793a
...
...
@@ -69,15 +69,15 @@ class _ProspectListByModeoldState extends State<ProspectListByModeold> {
}
return
(
connection
==
"Online"
)
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
...
...
@@ -108,187 +108,187 @@ class _ProspectListByModeoldState extends State<ProspectListByModeold> {
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
)
:
crmLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
crmLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
crmLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
// if(crmLists[index].aid=="1726"){
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
)
:
crmLists
.
isNotEmpty
?
SizedBox
(
child:
Scrollbar
(
thumbVisibility:
false
,
child:
ListView
.
builder
(
itemCount:
crmLists
.
length
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
crmLists
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
// if(crmLists[index].aid=="1726"){
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
,
),
child:
Column
(
children:
[
Row
(
children:
[
Text
(
crmLists
[
index
].
aname
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
crmLists
[
index
].
aname
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
],
),
),
),
],
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
6
,
(
j
)
{
final
headings
=
[
"Account Manager"
,
"Contact Person"
,
"Mobile Number"
,
"Address"
,
"Account Age"
,
"GST Number"
,
];
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
6
,
(
j
)
{
final
headings
=
[
"Account Manager"
,
"Contact Person"
,
"Mobile Number"
,
"Address"
,
"Account Age"
,
"GST Number"
,
];
final
subHeadings
=
[
crmLists
[
index
].
accman
,
crmLists
[
index
].
cname
,
crmLists
[
index
].
mob1
,
crmLists
[
index
].
address
,
"
${crmLists[index].age}
days old"
,
crmLists
[
index
].
gstNumber
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
final
subHeadings
=
[
crmLists
[
index
].
accman
,
crmLists
[
index
].
cname
,
crmLists
[
index
].
mob1
,
crmLists
[
index
].
address
,
"
${crmLists[index].age}
days old"
,
crmLists
[
index
].
gstNumber
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
),
),
),
Expanded
(
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
ProspectDetailsByMode
(
pageTitleName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
leadId:
provider
.
accountList
[
index
]
.
aid
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
ProspectDetailsByMode
(
pageTitleName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
leadId:
provider
.
accountList
[
index
]
.
aid
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
},
),
),
);
},
),
),
)
:
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
);
},
);
...
...
@@ -352,26 +352,26 @@ class _ProspectListByModeoldState extends State<ProspectListByModeold> {
style:
TextStyle
(
fontSize:
14
),
),
items:
provider
.
employeesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Employees
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
provider
.
employeesList
.
map
(
(
slist
)
=>
DropdownMenuItem
<
Employees
>(
value:
slist
,
child:
Text
(
slist
.
name
!,
style:
TextStyle
(
fontSize:
14
,
),
),
),
)
.
toList
(),
value:
provider
.
employeesList
.
contains
(
provider
.
selectedEmployees
,
)
?
provider
.
selectedEmployees
:
null
,
provider
.
employeesList
.
contains
(
provider
.
selectedEmployees
,
)
?
provider
.
selectedEmployees
:
null
,
// value: provider.selectedEmployees,
onChanged:
(
Employees
?
value
)
{
...
...
@@ -381,9 +381,9 @@ class _ProspectListByModeoldState extends State<ProspectListByModeold> {
.
isNotEmpty
)
{
provider
.
selectedEmployees
=
value
;
provider
.
selectedEmployeeId
=
value
!
.
id
!;
value
.
id
!;
provider
.
selectedEmployeeValue
=
value
!
.
name
!;
value
.
name
!;
}
}
},
...
...
@@ -391,33 +391,33 @@ class _ProspectListByModeoldState extends State<ProspectListByModeold> {
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchController:
provider
.
searchController
,
provider
.
searchController
,
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
controller:
provider
.
searchController
,
provider
.
searchController
,
decoration:
InputDecoration
(
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
,
),
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
BorderRadius
.
circular
(
8
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
},
),
...
...
@@ -429,9 +429,9 @@ class _ProspectListByModeoldState extends State<ProspectListByModeold> {
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
Prev
1
…
9
10
11
12
13
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