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
3ad2ea55
Commit
3ad2ea55
authored
Jul 09, 2025
by
Sai Srinivas
Browse files
ios Changes
parent
38d17dba
Changes
24
Show whitespace changes
Inline
Side-by-side
lib/Notifiers/PaymentDetailsProvider.dart
View file @
3ad2ea55
...
@@ -227,7 +227,6 @@ class Paymentdetailsprovider extends ChangeNotifier {
...
@@ -227,7 +227,6 @@ class Paymentdetailsprovider extends ChangeNotifier {
if
(
data
.
error
==
0
)
{
if
(
data
.
error
==
0
)
{
print
(
data
.
paymentCollectionId
);
print
(
data
.
paymentCollectionId
);
_CollectionId
=
data
.
paymentCollectionId
??
0
;
_CollectionId
=
data
.
paymentCollectionId
??
0
;
notifyListeners
();
notifyListeners
();
}
else
{}
}
else
{}
}
else
{
}
else
{
...
@@ -427,7 +426,7 @@ class Paymentdetailsprovider extends ChangeNotifier {
...
@@ -427,7 +426,7 @@ class Paymentdetailsprovider extends ChangeNotifier {
email
,
email
,
)
async
{
)
async
{
if
(
actName
==
"Generator"
)
{
if
(
actName
==
"Generator"
)
{
_saveAgainst
=
"
G
enerator"
;
_saveAgainst
=
"
g
enerator"
;
_genId
=
generatorID
;
_genId
=
generatorID
;
}
else
{
}
else
{
_saveAgainst
=
"account"
;
_saveAgainst
=
"account"
;
...
...
lib/Notifiers/connectivity/connectivityProvider.dart
deleted
100644 → 0
View file @
38d17dba
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'dart:async'
;
class
Connectivityprovider
extends
ChangeNotifier
{
static
final
Connectivityprovider
_instance
=
Connectivityprovider
.
_
();
static
Connectivityprovider
get
instance
=>
_instance
;
final
Connectivity
_connectivity
=
Connectivity
();
bool
_isOnline
=
false
;
Map
<
ConnectivityResult
,
bool
>
_source
=
{
ConnectivityResult
.
none
:
false
};
Connectivityprovider
.
_
()
{
initialise
();
}
bool
get
isOnline
=>
_isOnline
;
Map
<
ConnectivityResult
,
bool
>
get
source
=>
_source
;
void
initialise
()
async
{
List
<
ConnectivityResult
>
result
=
await
_connectivity
.
checkConnectivity
();
_checkStatus
(
result
.
first
);
_connectivity
.
onConnectivityChanged
.
listen
((
result
)
{
_checkStatus
(
result
.
first
);
});
}
void
_checkStatus
(
ConnectivityResult
result
)
async
{
bool
isOnline
=
false
;
try
{
final
lookupResult
=
await
InternetAddress
.
lookup
(
'example.com'
);
isOnline
=
lookupResult
.
isNotEmpty
&&
lookupResult
[
0
].
rawAddress
.
isNotEmpty
;
}
on
SocketException
catch
(
_
)
{
isOnline
=
false
;
}
_source
=
{
result:
isOnline
};
_isOnline
=
isOnline
;
notifyListeners
();
// Notify all listeners of the change
}
void
dispose
()
{
// No StreamController to close, as we're using ChangeNotifier
}
}
lib/Notifiers/financeProvider/RequestionListProvider.dart
View file @
3ad2ea55
...
@@ -483,12 +483,11 @@ class Requestionlistprovider extends ChangeNotifier {
...
@@ -483,12 +483,11 @@ class Requestionlistprovider extends ChangeNotifier {
approvalEmployeeID
,
approvalEmployeeID
,
)
async
{
)
async
{
try
{
try
{
_submitClicked
=
true
;
notifyListeners
();
if
(!
validateForm
(
context
,
mode
))
{
if
(!
validateForm
(
context
,
mode
))
{
_submitClicked
=
false
;
return
;
return
;
}
}
_submitClicked
=
true
;
notifyListeners
();
var
homeProvider
=
Provider
.
of
<
HomescreenNotifier
>(
var
homeProvider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
context
,
...
@@ -511,8 +510,8 @@ class Requestionlistprovider extends ChangeNotifier {
...
@@ -511,8 +510,8 @@ class Requestionlistprovider extends ChangeNotifier {
bankIfscController
.
text
,
bankIfscController
.
text
,
bankAcHolderController
.
text
,
bankAcHolderController
.
text
,
bankUpiController
.
text
,
bankUpiController
.
text
,
_image
,
approvalEmployeeID
,
approvalEmployeeID
,
_image
,
);
);
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
if
(
data
.
error
==
"0"
)
{
...
@@ -550,11 +549,20 @@ class Requestionlistprovider extends ChangeNotifier {
...
@@ -550,11 +549,20 @@ class Requestionlistprovider extends ChangeNotifier {
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
if
(
data
.
error
==
"0"
)
{
_directPaymentAccounts
=
data
.
paymentAccounts
!;
_directPaymentAccounts
=
data
.
paymentAccounts
!;
_directPaymentAccounts
=
[
DirectPaymentAccounts
(
id:
""
,
name:
"Select"
),...
data
.
paymentAccounts
!];
_directPaymentAccounts
=
[
DirectPaymentAccounts
(
id:
""
,
name:
"Select"
),
...
data
.
paymentAccounts
!,
];
_directPaymentModes
=
data
.
paymentModes
!;
_directPaymentModes
=
data
.
paymentModes
!;
_directPaymentModes
=
[
DirectPaymentModes
(
name:
"Select"
,
id:
""
),...
data
.
paymentModes
!];
_directPaymentModes
=
[
DirectPaymentModes
(
name:
"Select"
,
id:
""
),
...
data
.
paymentModes
!,
];
_directAccounts
=
data
.
accounts
!;
_directAccounts
=
data
.
accounts
!;
_directAccounts
=
[
DirectAccounts
(
id:
""
,
name:
"Select"
),...
data
.
accounts
!];
_directAccounts
=
[
DirectAccounts
(
id:
""
,
name:
"Select"
),
...
data
.
accounts
!,
];
checkdirectPaymentDropDownsSlected
();
checkdirectPaymentDropDownsSlected
();
notifyListeners
();
notifyListeners
();
...
@@ -1058,6 +1066,14 @@ class Requestionlistprovider extends ChangeNotifier {
...
@@ -1058,6 +1066,14 @@ class Requestionlistprovider extends ChangeNotifier {
!
_requestingPurposes
.
contains
(
_selectReqPurpose
))
{
!
_requestingPurposes
.
contains
(
_selectReqPurpose
))
{
_selectReqPurpose
=
null
;
_selectReqPurpose
=
null
;
}
}
if
(
_selectedApprovalEmployee
!=
null
&&
!
_approvalEmployee
.
contains
(
_selectedApprovalEmployee
))
{
_selectedApprovalEmployee
=
null
;
_selectedApprovalEmployeeID
=
null
;
_selectedApprovalEmployeeValue
=
null
;
}
notifyListeners
();
}
}
bool
validateForm
(
BuildContext
context
,
String
mode
)
{
bool
validateForm
(
BuildContext
context
,
String
mode
)
{
...
@@ -1156,6 +1172,7 @@ class Requestionlistprovider extends ChangeNotifier {
...
@@ -1156,6 +1172,7 @@ class Requestionlistprovider extends ChangeNotifier {
// isValid = false;_submitClicked = false;
// isValid = false;_submitClicked = false;
// }
// }
buttonEnabled
=
isValid
;
buttonEnabled
=
isValid
;
_submitClicked
=
true
;
notifyListeners
();
notifyListeners
();
return
isValid
;
return
isValid
;
}
}
...
...
lib/Notifiers/splashVersionNotifier.dart
View file @
3ad2ea55
...
@@ -42,7 +42,7 @@ class SplashVersionNotifier extends ChangeNotifier {
...
@@ -42,7 +42,7 @@ class SplashVersionNotifier extends ChangeNotifier {
if
(
_packagedetails
.
isEmpty
)
{
if
(
_packagedetails
.
isEmpty
)
{
await
initPackageInfo
();
await
initPackageInfo
();
}
}
var
loginProvider
=
Provider
.
of
<
Loginnotifier
>(
context
,
listen:
false
);
var
loginProvider
=
Provider
.
of
<
Loginnotifier
>(
context
,
listen:
false
);
var
loginStatus
=
await
SharedpreferencesService
().
getInt
(
"loginStatus"
);
var
loginStatus
=
await
SharedpreferencesService
().
getInt
(
"loginStatus"
);
print
(
"login status:
${loginStatus}
"
);
print
(
"login status:
${loginStatus}
"
);
...
@@ -59,7 +59,6 @@ class SplashVersionNotifier extends ChangeNotifier {
...
@@ -59,7 +59,6 @@ class SplashVersionNotifier extends ChangeNotifier {
}
}
if
(
Platform
.
isAndroid
&&
if
(
Platform
.
isAndroid
&&
currentBuild
<
(
data
.
latestVersionCode
??
0
))
{
currentBuild
<
(
data
.
latestVersionCode
??
0
))
{
print
(
"Update"
);
print
(
"Update"
);
AppUpdateDialouge
(
context
,
data
.
url
!,
data
.
releaseNotes
!);
AppUpdateDialouge
(
context
,
data
.
url
!,
data
.
releaseNotes
!);
}
else
if
(
Platform
.
isIOS
&&
}
else
if
(
Platform
.
isIOS
&&
...
...
lib/Utils/GlobalConstants.dart
View file @
3ad2ea55
String
didPushed
=
""
;
String
didPushed
=
""
;
String
didPopped
=
""
;
String
didPopped
=
""
;
var
connection
;
lib/Utils/commonServices.dart
View file @
3ad2ea55
import
'dart:async'
;
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:fluttertoast/fluttertoast.dart'
;
import
'package:fluttertoast/fluttertoast.dart'
;
toast
(
context
,
text
)
{
toast
(
context
,
text
)
{
// OwnToast(context, text, "0");
// OwnToast(context, text, "0");
Fluttertoast
.
showToast
(
Fluttertoast
.
showToast
(
msg:
text
,
msg:
text
,
...
@@ -14,3 +17,35 @@ toast(context,text) {
...
@@ -14,3 +17,35 @@ toast(context,text) {
fontSize:
15.0
,
fontSize:
15.0
,
);
);
}
}
class
MyConnectivity
{
MyConnectivity
.
_
();
static
final
_instance
=
MyConnectivity
.
_
();
static
MyConnectivity
get
instance
=>
_instance
;
final
_connectivity
=
Connectivity
();
final
_controller
=
StreamController
.
broadcast
();
Stream
get
myStream
=>
_controller
.
stream
;
void
initialise
()
async
{
ConnectivityResult
result
=
(
await
_connectivity
.
checkConnectivity
())
as
ConnectivityResult
;
_checkStatus
(
result
);
_connectivity
.
onConnectivityChanged
.
listen
((
result
)
{
_checkStatus
(
result
as
ConnectivityResult
);
});
}
void
_checkStatus
(
ConnectivityResult
result
)
async
{
bool
isOnline
=
false
;
try
{
final
result
=
await
InternetAddress
.
lookup
(
'example.com'
);
isOnline
=
result
.
isNotEmpty
&&
result
[
0
].
rawAddress
.
isNotEmpty
;
}
on
SocketException
catch
(
_
)
{
isOnline
=
false
;
}
_controller
.
sink
.
add
({
result:
isOnline
});
}
void
disposeStream
()
=>
_controller
.
close
();
}
lib/Utils/commonWidgets.dart
View file @
3ad2ea55
...
@@ -141,7 +141,7 @@ Widget textControllerWidget(
...
@@ -141,7 +141,7 @@ Widget textControllerWidget(
height:
hintText
==
"Enter Description"
?
150
:
50
,
height:
hintText
==
"Enter Description"
?
150
:
50
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
readonly
?
Color
(
0xFFD7D7D7
):
AppColors
.
text_field_color
,
color:
readonly
?
Color
(
0xFFD7D7D7
)
:
AppColors
.
text_field_color
,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
child:
Padding
(
child:
Padding
(
...
@@ -175,7 +175,7 @@ Widget textControllerWidget(
...
@@ -175,7 +175,7 @@ Widget textControllerWidget(
?
[
FilteringTextInputFormatter
.
digitsOnly
]
?
[
FilteringTextInputFormatter
.
digitsOnly
]
:
[],
:
[],
style:
TextStyle
(
style:
TextStyle
(
color:
readonly
?
Color
(
0xFF9e9e9e
)
:
AppColors
.
semi_black
color:
readonly
?
Color
(
0xFF9e9e9e
)
:
AppColors
.
semi_black
,
),
),
decoration:
InputDecoration
(
decoration:
InputDecoration
(
counterText:
""
,
counterText:
""
,
...
@@ -198,12 +198,13 @@ Widget textControllerWidget(
...
@@ -198,12 +198,13 @@ Widget textControllerWidget(
NoNetwork
(
context
)
{
NoNetwork
(
context
)
{
return
Container
(
return
Container
(
decoration:
BoxDecoration
(
color:
AppColors
.
scaffold_bg_color
),
height:
MediaQuery
.
of
(
context
).
size
.
height
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Image
.
asset
(
'assets/images/no_wifi.png'
,
width:
100
,
height:
100
),
//
Image.asset('assets/images/no_wifi.png', width: 100, height: 100),
SizedBox
(
height:
10
),
SizedBox
(
height:
10
),
Center
(
Center
(
child:
Text
(
child:
Text
(
...
...
lib/main.dart
View file @
3ad2ea55
...
@@ -247,8 +247,7 @@ class MyApp extends StatelessWidget {
...
@@ -247,8 +247,7 @@ class MyApp extends StatelessWidget {
tabBarTheme:
const
TabBarThemeData
(),
tabBarTheme:
const
TabBarThemeData
(),
textSelectionTheme:
TextSelectionThemeData
(
textSelectionTheme:
TextSelectionThemeData
(
cursorColor:
AppColors
.
app_blue
,
cursorColor:
AppColors
.
app_blue
),
),
dialogTheme:
const
DialogThemeData
(
dialogTheme:
const
DialogThemeData
(
shadowColor:
Colors
.
white
,
shadowColor:
Colors
.
white
,
...
@@ -296,7 +295,7 @@ class MyApp extends StatelessWidget {
...
@@ -296,7 +295,7 @@ class MyApp extends StatelessWidget {
AppColors
.
grey_semi
.
withOpacity
(
0.6
),
AppColors
.
grey_semi
.
withOpacity
(
0.6
),
),
),
),
),
useMaterial3:
true
useMaterial3:
true
,
// inputDecorationTheme: InputDecorationTheme(
// inputDecorationTheme: InputDecorationTheme(
// hintStyle: TextStyle(
// hintStyle: TextStyle(
// fontWeight: FontWeight.w400,
// fontWeight: FontWeight.w400,
...
...
lib/screens/AttendanceScreen.dart
View file @
3ad2ea55
...
@@ -31,8 +31,25 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -31,8 +31,25 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
});
});
}
}
// return Container(
// // onWillPop: _onBackPressed,
// child: (Platform.isAndroid
// ? WillPopScope(
// onWillPop: onBackPressed,
// child: _scaffold(context),
// )
// : _scaffold(context)))
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
AttendanceNotifier
>(
return
Consumer
<
AttendanceNotifier
>(
builder:
(
context
,
attendance
,
index
)
{
builder:
(
context
,
attendance
,
index
)
{
final
timeString
=
final
timeString
=
...
@@ -102,11 +119,6 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -102,11 +119,6 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
attendance
.
init
(
homeProvider
,
context
);
attendance
.
init
(
homeProvider
,
context
);
attendance
.
loadAttendanceDetails
(
homeProvider
,
context
);
attendance
.
loadAttendanceDetails
(
homeProvider
,
context
);
},
},
child:
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
...
@@ -153,9 +165,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -153,9 +165,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
borderRadius:
BorderRadius
.
circular
(
16
),
16
,
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
...
@@ -169,14 +179,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -169,14 +179,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
style:
TextStyle
(
style:
TextStyle
(
color:
color:
formattedTime
!=
"-"
formattedTime
!=
"-"
?
Color
(
?
Color
(
0xFF493272
)
0xFF493272
,
:
Color
(
0xFFED3424
),
)
fontFamily:
"JakartaRegular"
,
:
Color
(
0xFFED3424
,
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
fontSize:
30
,
),
),
),
),
...
@@ -185,14 +190,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -185,14 +190,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
style:
TextStyle
(
style:
TextStyle
(
color:
color:
period
!=
"-"
period
!=
"-"
?
Color
(
?
Color
(
0xFF493272
)
0xFF493272
,
:
Color
(
0xFFED3424
),
)
fontFamily:
"JakartaRegular"
,
:
Color
(
0xFFED3424
,
),
fontFamily:
"JakartaRegular"
,
),
),
),
),
],
],
...
@@ -220,9 +220,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -220,9 +220,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFF3EDFF
),
color:
Color
(
0xFFF3EDFF
),
borderRadius:
BorderRadius
.
circular
(
borderRadius:
BorderRadius
.
circular
(
16
),
16
,
),
),
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
...
@@ -236,14 +234,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -236,14 +234,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
style:
TextStyle
(
style:
TextStyle
(
color:
color:
formattedTime2
!=
"-"
formattedTime2
!=
"-"
?
Color
(
?
Color
(
0xFF493272
)
0xFF493272
,
:
Color
(
0xFFED3424
),
)
fontFamily:
"JakartaRegular"
,
:
Color
(
0xFFED3424
,
),
fontFamily:
"JakartaRegular"
,
fontSize:
30
,
fontSize:
30
,
),
),
),
),
...
@@ -252,14 +245,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -252,14 +245,9 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
style:
TextStyle
(
style:
TextStyle
(
color:
color:
period2
!=
"-"
period2
!=
"-"
?
Color
(
?
Color
(
0xFF493272
)
0xFF493272
,
:
Color
(
0xFFED3424
),
)
fontFamily:
"JakartaRegular"
,
:
Color
(
0xFFED3424
,
),
fontFamily:
"JakartaRegular"
,
),
),
),
),
],
],
...
@@ -308,8 +296,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -308,8 +296,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
itemCount:
4
,
itemCount:
4
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
gridDelegate:
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisCount:
2
,
crossAxisSpacing:
10
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
mainAxisSpacing:
10
,
...
@@ -360,9 +347,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -360,9 +347,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
),
),
Text
(
Text
(
names
[
index
],
names
[
index
],
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
color:
Color
(
0xFF818181
),
),
),
),
],
],
),
),
...
@@ -374,10 +359,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -374,10 +359,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
///calendar
///calendar
Container
(
Container
(
// padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
// padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
margin:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
color:
Colors
.
white
,
color:
Colors
.
white
,
...
@@ -385,12 +367,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -385,12 +367,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
child:
Column
(
child:
Column
(
children:
[
children:
[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
padding:
const
EdgeInsets
.
fromLTRB
(
30
,
10
,
30
,
0
),
30
,
10
,
30
,
0
,
),
child:
Container
(
child:
Container
(
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
...
@@ -473,15 +450,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -473,15 +450,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
)
)
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
[
[
'S'
,
'M'
,
'T'
,
'W'
,
'T'
,
'F'
,
'S'
][
i
],
'S'
,
'M'
,
'T'
,
'W'
,
'T'
,
'F'
,
'S'
,
][
i
],
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
...
@@ -509,12 +478,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -509,12 +478,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
mainAxisSpacing:
1
,
mainAxisSpacing:
1
,
childAspectRatio:
(
255
/
245
),
childAspectRatio:
(
255
/
245
),
),
),
padding:
const
EdgeInsets
.
fromLTRB
(
padding:
const
EdgeInsets
.
fromLTRB
(
0
,
0
,
0
,
0
),
0
,
0
,
0
,
0
,
),
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
...
@@ -526,8 +490,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -526,8 +490,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
final
currentDateInPeriod
=
startDate
.
add
(
final
currentDateInPeriod
=
startDate
.
add
(
Duration
(
days:
dayIndex
),
Duration
(
days:
dayIndex
),
);
);
final
currentDay
=
final
currentDay
=
currentDateInPeriod
.
day
;
currentDateInPeriod
.
day
;
final
isFutureDate
=
currentDateInPeriod
final
isFutureDate
=
currentDateInPeriod
.
isAfter
(
currentDate
);
.
isAfter
(
currentDate
);
...
@@ -542,8 +505,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -542,8 +505,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
// Find matching penalty
// Find matching penalty
Map
<
String
,
dynamic
>?
penaltyMap
;
Map
<
String
,
dynamic
>?
penaltyMap
;
try
{
try
{
penaltyMap
=
penaltyMap
=
penalityArrayList
[
dayIndex
];
penalityArrayList
[
dayIndex
];
}
catch
(
e
)
{
}
catch
(
e
)
{
penaltyMap
=
{};
penaltyMap
=
{};
}
}
...
@@ -577,8 +539,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -577,8 +539,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
:
()
{
:
()
{
selectedIndex
=
index
;
selectedIndex
=
index
;
if
(
penaltyKey
!=
null
)
{
if
(
penaltyKey
!=
null
)
{
attendance
attendance
.
dateWiseAttendance
(
.
dateWiseAttendance
(
homeProvider
,
homeProvider
,
penaltyKey
,
penaltyKey
,
context
,
context
,
...
@@ -617,11 +578,8 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -617,11 +578,8 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
(
isCurrentDay
||
(
isCurrentDay
||
(
selectedIndex
==
(
selectedIndex
==
index
))
index
))
?
Color
(
?
Color
(
0xFF1487C9
)
0xFF1487C9
,
:
Colors
.
transparent
,
)
:
Colors
.
transparent
,
),
),
color:
color:
isFutureDate
isFutureDate
...
@@ -646,16 +604,14 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -646,16 +604,14 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
?
Color
(
0xFFFFE8D0
)
?
Color
(
0xFFFFE8D0
)
:
dateColor
==
'y'
:
dateColor
==
'y'
?
Color
(
0xFFFFF9B2
)
?
Color
(
0xFFFFF9B2
)
:
Colors
:
Colors
.
transparent
,
.
transparent
,
),
),
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
currentDay
.
toString
(),
currentDay
.
toString
(),
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
fontWeight:
fontWeight:
FontWeight
.
w400
,
FontWeight
.
w400
,
color:
color:
isFutureDate
isFutureDate
?
AppColors
?
AppColors
...
@@ -663,34 +619,17 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -663,34 +619,17 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
:
(
isCurrentDay
||
:
(
isCurrentDay
||
(
selectedIndex
==
(
selectedIndex
==
index
))
index
))
?
Color
(
?
Color
(
0xFF2D2D2D
)
0xFF2D2D2D
,
:
dateColor
==
'g'
)
?
Color
(
0xFF6B3A02
)
:
dateColor
==
:
dateColor
==
'r'
'g'
?
Color
(
0xFFFF0000
)
?
Color
(
:
dateColor
==
'b'
0xFF6B3A02
,
?
Color
(
0xFF493272
)
)
:
dateColor
==
'br'
:
dateColor
==
?
Color
(
0xFF6B3A02
)
'r'
:
dateColor
==
'y'
?
Color
(
?
Color
(
0xFF605C00
)
0xFFFF0000
,
)
:
dateColor
==
'b'
?
Color
(
0xFF493272
,
)
:
dateColor
==
'br'
?
Color
(
0xFF6B3A02
,
)
:
dateColor
==
'y'
?
Color
(
0xFF605C00
,
)
:
Colors
:
Colors
.
transparent
,
.
transparent
,
),
),
...
@@ -732,10 +671,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -732,10 +671,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
),
),
);
);
if
(
res
==
true
)
{
if
(
res
==
true
)
{
attendance
.
getAttendanceList
(
attendance
.
getAttendanceList
(
homeProvider
,
context
);
homeProvider
,
context
,
);
attendance
.
init
(
homeProvider
,
context
);
attendance
.
init
(
homeProvider
,
context
);
attendance
.
loadAttendanceDetails
(
attendance
.
loadAttendanceDetails
(
homeProvider
,
homeProvider
,
...
@@ -777,8 +713,6 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
...
@@ -777,8 +713,6 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
floatingActionButtonLocation:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
),
),
),
),
);
);
},
},
);
);
...
...
lib/screens/WebERPIOS.dart
View file @
3ad2ea55
...
@@ -77,18 +77,16 @@ class _WebERPIOSState extends State<WebERPIOS> {
...
@@ -77,18 +77,16 @@ class _WebERPIOSState extends State<WebERPIOS> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
WillPopScope
(
return
Platform
.
isAndroid
onWillPop:
()
async
{
?
WillPopScope
(
if
(
await
webViewController
!.
canGoBack
())
{
onWillPop:
()
=>
onBackPressed
(
context
),
webViewController
!.
goBack
();
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
return
false
;
// Prevent default back button behavior
)
:
_scaffold
(
context
);
}
}
return
true
;
// Allow default back button behavior
},
Widget
_scaffold
(
BuildContext
context
)
{
child:
SafeArea
(
return
Scaffold
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
appBar:
appbar
(
context
,
"ERP"
),
appBar:
appbar
(
context
,
"ERP"
),
body:
Container
(
body:
Container
(
child:
Column
(
child:
Column
(
...
@@ -276,8 +274,6 @@ class _WebERPIOSState extends State<WebERPIOS> {
...
@@ -276,8 +274,6 @@ class _WebERPIOSState extends State<WebERPIOS> {
],
],
),
),
),
),
),
),
);
);
}
}
}
}
lib/screens/WebWhizzdomScreen.dart
View file @
3ad2ea55
...
@@ -16,13 +16,14 @@ import 'WebERPScreen.dart';
...
@@ -16,13 +16,14 @@ import 'WebERPScreen.dart';
Future
runErpScreenApp2
(
)
async
{
Future
runErpScreenApp2
(
)
async
{
await
FlutterDownloader
.
initialize
(
await
FlutterDownloader
.
initialize
(
debug:
true
// optional: set false to disable printing logs to console
debug:
true
,
// optional: set false to disable printing logs to console
);
);
await
Permission
.
storage
.
request
();
await
Permission
.
storage
.
request
();
}
}
class
WebWhizzdomScreen
extends
StatefulWidget
{
class
WebWhizzdomScreen
extends
StatefulWidget
{
final
String
whizzdom_url
;
final
String
whizzdom_url
;
const
WebWhizzdomScreen
({
super
.
key
,
required
this
.
whizzdom_url
});
const
WebWhizzdomScreen
({
super
.
key
,
required
this
.
whizzdom_url
});
@override
@override
State
<
WebWhizzdomScreen
>
createState
()
=>
_WebWhizzdomScreenState
();
State
<
WebWhizzdomScreen
>
createState
()
=>
_WebWhizzdomScreenState
();
...
@@ -46,7 +47,8 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -46,7 +47,8 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
@override
@override
void
initState
()
{
void
initState
()
{
// loadData();
// loadData();
pullToRefreshController
=
kIsWeb
pullToRefreshController
=
kIsWeb
?
null
?
null
:
PullToRefreshController
(
:
PullToRefreshController
(
settings:
pullToRefreshSettings
,
settings:
pullToRefreshSettings
,
...
@@ -55,8 +57,10 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -55,8 +57,10 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
webViewController
?.
reload
();
webViewController
?.
reload
();
}
else
if
(
defaultTargetPlatform
==
TargetPlatform
.
iOS
)
{
}
else
if
(
defaultTargetPlatform
==
TargetPlatform
.
iOS
)
{
webViewController
?.
loadUrl
(
webViewController
?.
loadUrl
(
urlRequest:
urlRequest:
URLRequest
(
URLRequest
(
url:
await
webViewController
?.
getUrl
()));
url:
await
webViewController
?.
getUrl
(),
),
);
}
}
},
},
);
);
...
@@ -68,24 +72,24 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -68,24 +72,24 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
void
dispose
()
{
void
dispose
()
{
super
.
dispose
();
super
.
dispose
();
}
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
WillPopScope
(
return
Platform
.
isAndroid
onWillPop:
()
async
{
?
WillPopScope
(
if
(
await
webViewController
!.
canGoBack
())
{
onWillPop:
()
=>
onBackPressed
(
context
),
webViewController
!.
goBack
();
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
return
false
;
// Prevent default back button behavior
)
:
_scaffold
(
context
);
}
}
return
true
;
// Allow default back button behavior
},
Widget
_scaffold
(
BuildContext
context
)
{
child:
SafeArea
(
return
Scaffold
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Whizzdom"
),
appBar:
appbar
(
context
,
"Whizzdom"
),
body:
Container
(
body:
Container
(
child:
Column
(
children:
<
Widget
>[
child:
Column
(
children:
<
Widget
>[
Expanded
(
Expanded
(
child:
Stack
(
child:
Stack
(
children:
[
children:
[
...
@@ -93,10 +97,15 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -93,10 +97,15 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
initialUrlRequest:
URLRequest
(
initialUrlRequest:
URLRequest
(
url:
WebUri
(
widget
.
whizzdom_url
),
url:
WebUri
(
widget
.
whizzdom_url
),
),
),
androidOnGeolocationPermissionsShowPrompt:
androidOnGeolocationPermissionsShowPrompt:
(
(
InAppWebViewController
controller
,
String
origin
)
async
{
InAppWebViewController
controller
,
String
origin
,
)
async
{
return
GeolocationPermissionShowPromptResponse
(
return
GeolocationPermissionShowPromptResponse
(
origin:
origin
,
allow:
true
,
retain:
true
);
origin:
origin
,
allow:
true
,
retain:
true
,
);
},
},
initialOptions:
InAppWebViewGroupOptions
(
initialOptions:
InAppWebViewGroupOptions
(
android:
AndroidInAppWebViewOptions
(
android:
AndroidInAppWebViewOptions
(
...
@@ -119,12 +128,15 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -119,12 +128,15 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
),
),
),
),
androidOnPermissionRequest:
(
androidOnPermissionRequest:
(
InAppWebViewController
controller
,
InAppWebViewController
controller
,
String
origin
,
List
<
String
>
resources
)
async
{
String
origin
,
List
<
String
>
resources
,
)
async
{
return
PermissionRequestResponse
(
return
PermissionRequestResponse
(
resources:
resources
,
resources:
resources
,
action:
PermissionRequestResponseAction
.
GRANT
);
action:
PermissionRequestResponseAction
.
GRANT
,
);
},
},
onWebViewCreated:
(
controller
)
{
onWebViewCreated:
(
controller
)
{
webViewController
=
controller
;
webViewController
=
controller
;
...
@@ -150,9 +162,9 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -150,9 +162,9 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
pullToRefreshController
?.
endRefreshing
();
pullToRefreshController
?.
endRefreshing
();
}
}
},
},
),
),
if
(
isLoading
)
...[
Container
(
if
(
isLoading
)
...[
Container
(
color:
Colors
.
white
.
withOpacity
(
0.7
),
color:
Colors
.
white
.
withOpacity
(
0.7
),
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
...
@@ -164,9 +176,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -164,9 +176,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
// duration: Duration(seconds: 2),
// duration: Duration(seconds: 2),
size:
50
,
size:
50
,
),
),
const
SizedBox
(
const
SizedBox
(
height:
15
),
height:
15
,
),
SizedBox
(
SizedBox
(
width:
200
,
width:
200
,
child:
Text
(
child:
Text
(
...
@@ -176,17 +186,20 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
...
@@ -176,17 +186,20 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
decorationThickness:
0
,
decorationThickness:
0
,
fontSize:
15
,
fontSize:
15
,
fontWeight:
FontWeight
.
normal
,
fontWeight:
FontWeight
.
normal
,
color:
AppColors
.
app_blue
),
color:
AppColors
.
app_blue
,
),
),
),
),
),
// SvgPicture.asset("/assets/images/NutsLoader.gif")
// SvgPicture.asset("/assets/images/NutsLoader.gif")
],
],
),
),
)]
),
],
],
),
),
],
],
))
])),
),
),
),
),
);
);
...
...
lib/screens/crm/crmDashboard.dart
View file @
3ad2ea55
...
@@ -34,6 +34,15 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -34,6 +34,15 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Crmdashboardprovider
>(
return
Consumer
<
Crmdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
final
gridPages
=
final
gridPages
=
...
@@ -41,12 +50,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -41,12 +50,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
.
where
((
page
)
=>
![
8
,
9
,
23
,
24
,
51
,
50
].
contains
(
page
.
id
))
.
where
((
page
)
=>
![
8
,
9
,
23
,
24
,
51
,
50
].
contains
(
page
.
id
))
.
toList
();
.
toList
();
return
WillPopScope
(
return
Scaffold
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
AppBar
(
appBar:
AppBar
(
...
@@ -155,26 +159,17 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -155,26 +159,17 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
child:
Column
(
child:
Column
(
children:
[
children:
[
if
(
provider
.
allLeads
.
length
>
0
)...[
if
(
provider
.
allLeads
.
length
>
0
)
...[
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
horizontal:
10
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
child:
GridView
.
builder
(
child:
GridView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
horizontal:
0
,
vertical:
5
,
),
itemCount:
provider
.
allLeads
.
length
,
itemCount:
provider
.
allLeads
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
scrollDirection:
Axis
.
horizontal
,
...
@@ -238,9 +233,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -238,9 +233,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
.
filter
!
.
filter
!
.
mode
,
.
mode
,
filter:
filter:
provider
provider
.
allLeads
[
jndex
].
filter
!,
.
allLeads
[
jndex
]
.
filter
!,
),
),
),
),
);
);
...
@@ -280,10 +273,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -280,10 +273,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
ListView
.
builder
(
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
shrinkWrap:
true
,
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
vertical:
10
,
horizontal:
10
,
),
itemCount:
gridPages
.
length
,
itemCount:
gridPages
.
length
,
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
// final icons = ["comm_ic_1", "comm_ic_2"];
// final icons = ["comm_ic_1", "comm_ic_2"];
...
@@ -291,8 +281,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -291,8 +281,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
if
(
gridPages
[
index
].
pageName
!.
contains
(
"Lead List"
))
{
if
(
gridPages
[
index
].
pageName
!.
contains
(
"Lead List"
))
{
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
);
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
);
}
else
if
(
gridPages
[
index
].
pageName
==
}
else
if
(
gridPages
[
index
].
pageName
==
"Nearby Leads"
)
{
"Nearby Leads"
)
{
SvgIcon
=
SvgPicture
.
asset
(
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/home_icons_5.svg"
,
"assets/svg/home_icons_5.svg"
,
height:
18
,
height:
18
,
...
@@ -304,17 +293,14 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -304,17 +293,14 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
return
InkResponse
(
return
InkResponse
(
onTap:
()
{
onTap:
()
{
print
(
gridPages
[
index
].
pageName
!);
print
(
gridPages
[
index
].
pageName
!);
if
(
gridPages
[
index
].
pageName
!.
contains
(
if
(
gridPages
[
index
].
pageName
!.
contains
(
"Lead List"
))
{
"Lead List"
,
))
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
Leadlistbymode
(
(
context
)
=>
Leadlistbymode
(
mode:
gridPages
[
index
].
mode
,
mode:
gridPages
[
index
].
mode
,
pageTitleName:
pageTitleName:
gridPages
[
index
].
pageName
,
gridPages
[
index
].
pageName
,
),
),
),
),
);
);
...
@@ -327,8 +313,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -327,8 +313,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
builder:
builder:
(
context
)
=>
ProspectListByMode
(
(
context
)
=>
ProspectListByMode
(
mode:
gridPages
[
index
].
mode
,
mode:
gridPages
[
index
].
mode
,
pageTitleName:
pageTitleName:
gridPages
[
index
].
pageName
,
gridPages
[
index
].
pageName
,
),
),
),
),
);
);
...
@@ -412,11 +397,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -412,11 +397,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
),
),
Container
(
Container
(
width:
double
.
infinity
,
width:
double
.
infinity
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.34
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.34
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
shrinkWrap:
true
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
scrollDirection:
Axis
.
horizontal
,
...
@@ -435,16 +418,16 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -435,16 +418,16 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
"Status"
,
"Status"
,
];
];
final
subHeadings
=
[
final
subHeadings
=
[
provider
.
pendingTasksLists
[
index
].
aname
??
"-"
,
provider
.
pendingTasksLists
[
index
].
aname
??
"-"
,
provider
.
pendingTasksLists
[
index
].
conmob
??
"-"
,
provider
.
pendingTasksLists
[
index
].
conmob
??
"-"
,
provider
.
pendingTasksLists
[
index
].
appdate
??
"-"
,
provider
.
pendingTasksLists
[
index
].
appdate
??
"-"
,
provider
.
pendingTasksLists
[
index
].
atype
??
"-"
,
provider
.
pendingTasksLists
[
index
].
atype
??
"-"
,
provider
.
pendingTasksLists
[
index
].
anote
??
"-"
,
provider
.
pendingTasksLists
[
index
].
anote
??
"-"
,
provider
.
pendingTasksLists
[
index
].
lstatus
??
"-"
,
provider
.
pendingTasksLists
[
index
].
lstatus
??
"-"
,
];
];
return
Container
(
return
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.3
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.3
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.6
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
...
@@ -467,7 +450,8 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -467,7 +450,8 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
horizontal:
0
,
horizontal:
0
,
),
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Text
(
child:
Text
(
...
@@ -487,7 +471,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -487,7 +471,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
],
],
),
),
);
);
},)
}),
],
],
),
),
);
);
...
@@ -495,7 +479,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -495,7 +479,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
),
),
],
],
SizedBox
(
height:
150
,
),
SizedBox
(
height:
150
),
],
],
),
),
),
),
...
@@ -524,8 +508,6 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
...
@@ -524,8 +508,6 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
),
),
),
),
),
),
);
);
},
},
);
);
...
...
lib/screens/finance/addPaymentReceiptList.dart
View file @
3ad2ea55
...
@@ -11,6 +11,7 @@ import 'package:provider/provider.dart';
...
@@ -11,6 +11,7 @@ import 'package:provider/provider.dart';
import
'../../Notifiers/financeProvider/paymentReceiptsProvider.dart'
;
import
'../../Notifiers/financeProvider/paymentReceiptsProvider.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/commonWidgets.dart'
;
import
'../../Utils/commonWidgets.dart'
;
class
Addpaymentreceiptlist
extends
StatefulWidget
{
class
Addpaymentreceiptlist
extends
StatefulWidget
{
final
pageTitleName
;
final
pageTitleName
;
const
Addpaymentreceiptlist
({
super
.
key
,
this
.
pageTitleName
});
const
Addpaymentreceiptlist
({
super
.
key
,
this
.
pageTitleName
});
...
@@ -21,7 +22,7 @@ class Addpaymentreceiptlist extends StatefulWidget {
...
@@ -21,7 +22,7 @@ class Addpaymentreceiptlist extends StatefulWidget {
class
_AddpaymentreceiptlistState
extends
State
<
Addpaymentreceiptlist
>
{
class
_AddpaymentreceiptlistState
extends
State
<
Addpaymentreceiptlist
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
Dropdowntheme
ddtheme
=
Dropdowntheme
();
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
12
,
(
index
)
=>
FocusNode
()
,
);
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
12
,
(
index
)
=>
FocusNode
());
@override
@override
void
initState
()
{
void
initState
()
{
// TODO: implement initState
// TODO: implement initState
...
@@ -37,7 +38,7 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -37,7 +38,7 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
@override
@override
void
dispose
()
{
void
dispose
()
{
focusNodes
.
map
((
e
)=>
e
.
dispose
());
focusNodes
.
map
((
e
)
=>
e
.
dispose
());
super
.
dispose
();
super
.
dispose
();
}
}
...
@@ -53,11 +54,16 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -53,11 +54,16 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
return
WillPopScope
(
return
WillPopScope
(
child:
SafeArea
(
child:
SafeArea
(
top:
false
,
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
backgroundColor:
AppColors
.
white
,
appBar:
appbar2
(
context
,
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
(
width:
0
,)),
appBar:
appbar2
(
context
,
"
${widget.pageTitleName}
"
,
provider
.
resetForm
,
SizedBox
(
width:
0
),
),
body:
Container
(
body:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
...
@@ -80,11 +86,10 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -80,11 +86,10 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
[
items:
[
...
provider
.
receiptAccounts
...
provider
.
receiptAccounts
.
map
(
.
map
(
(
accs
)
=>
(
accs
)
=>
DropdownMenuItem
<
Accounts
>(
DropdownMenuItem
<
Accounts
>(
value:
accs
,
value:
accs
,
child:
Text
(
child:
Text
(
accs
.
name
??
''
,
accs
.
name
??
''
,
...
@@ -106,30 +111,37 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -106,30 +111,37 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
);
provider
.
receiptAccountId
=
value
.
id
!;
provider
.
receiptAccountId
=
value
.
id
!;
provider
.
receiptAccountValue
=
value
.
name
!;
provider
.
receiptAccountValue
=
value
.
name
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
receiptAccountId
.
toString
(),
provider
.
receiptAccountId
.
toString
(),
);
);
}
}
}
}
},
},
dropdownSearchData:
DropdownSearchData
(
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchInnerWidgetHeight:
50
,
searchController:
provider
.
accountSearchController
,
searchController:
provider
.
accountSearchController
,
searchInnerWidget:
Padding
(
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
child:
TextFormField
(
controller:
provider
.
accountSearchController
,
controller:
provider
.
accountSearchController
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
8
,
vertical:
8
,
),
),
hintText:
'Search account...'
,
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
),
),
),
),
),
...
@@ -137,11 +149,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -137,11 +149,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
searchMatchFn:
(
item
,
searchValue
)
{
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
return
item
.
value
?.
name
?.
toLowerCase
()
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
false
;
},
},
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
),
),
onMenuStateChange:
(
isOpen
)
{
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
if
(!
isOpen
)
{
...
@@ -173,16 +187,16 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -173,16 +187,16 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
items:
items:
provider
.
receiptPaymentAccounts
provider
.
receiptPaymentAccounts
.
map
(
.
map
(
(
accs
)
=>
DropdownMenuItem
<
(
accs
)
=>
ReceiptAccounts
DropdownMenuItem
<
ReceiptAccounts
>(
>(
value:
accs
,
value:
accs
,
child:
Text
(
child:
Text
(
accs
.
name
??
''
,
accs
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
)
)
...
@@ -212,20 +226,26 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -212,20 +226,26 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
},
},
dropdownSearchData:
DropdownSearchData
(
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchInnerWidgetHeight:
50
,
searchController:
provider
.
paymentAccountSearchController
,
searchController:
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
child:
TextFormField
(
controller:
provider
.
paymentAccountSearchController
,
controller:
provider
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
8
,
vertical:
8
,
),
),
hintText:
'Search account...'
,
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
),
),
),
),
),
...
@@ -233,15 +253,18 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -233,15 +253,18 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
searchMatchFn:
(
item
,
searchValue
)
{
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
return
item
.
value
?.
name
?.
toLowerCase
()
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
false
;
},
},
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
),
),
onMenuStateChange:
(
isOpen
)
{
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
.
clear
();
provider
.
paymentAccountSearchController
.
clear
();
}
}
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
...
@@ -260,26 +283,27 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -260,26 +283,27 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
provider
.
amountController
,
provider
.
amountController
,
"Amount"
,
"Amount"
,
"Enter Amount"
,
"Enter Amount"
,
provider
.
updateAmount
,
TextInputType
.
numberWithOptions
(),
false
,
provider
.
updateAmount
,
TextInputType
.
numberWithOptions
(),
false
,
null
,
null
,
focusNodes
[
0
],
focusNodes
[
0
],
focusNodes
[
1
],
focusNodes
[
1
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
amountError
),
errorWidget
(
context
,
provider
.
amountError
),
///payment date toBE
///payment date toBE
TextWidget
(
context
,
"Receipt Date"
),
TextWidget
(
context
,
"Receipt Date"
),
GestureDetector
(
GestureDetector
(
onTap:
()
{
onTap:
()
{
provider
.
showDatePickerDialog
(
context
);
provider
.
showDatePickerDialog
(
context
);
},
},
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
height:
50
,
height:
50
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
...
@@ -287,28 +311,28 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -287,28 +311,28 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
child:
Padding
(
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
),
padding:
const
EdgeInsets
.
fromLTRB
(
10.0
,
0.0
,
10
,
0
,
),
child:
TextFormField
(
child:
TextFormField
(
controller:
provider
.
dateController
,
controller:
provider
.
dateController
,
keyboardType:
TextInputType
.
text
,
keyboardType:
TextInputType
.
text
,
enabled:
false
,
enabled:
false
,
maxLines:
1
,
maxLines:
1
,
readOnly:
true
,
readOnly:
true
,
onChanged:
(
value
)
{
onChanged:
(
value
)
{},
},
focusNode:
focusNodes
[
1
],
focusNode:
focusNodes
[
1
],
onTapUpOutside:
(
event
)
{
onTapUpOutside:
(
event
)
{
if
(
focusNodes
[
1
].
hasFocus
)
{
if
(
focusNodes
[
1
].
hasFocus
){
focusNodes
[
1
].
unfocus
();
focusNodes
[
1
].
unfocus
();
}
}
},
},
textInputAction:
TextInputAction
.
done
,
textInputAction:
TextInputAction
.
done
,
onEditingComplete:
()
{
onEditingComplete:
()
{
focusNodes
[
1
].
unfocus
();
focusNodes
[
1
].
unfocus
();
},
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintText:
"Enter Date"
,
...
@@ -346,16 +370,16 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -346,16 +370,16 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
items:
items:
provider
.
receiptPaymentModes
provider
.
receiptPaymentModes
.
map
(
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
(
paymenents
)
=>
PaymentModes
DropdownMenuItem
<
PaymentModes
>(
>(
value:
paymenents
,
value:
paymenents
,
child:
Text
(
child:
Text
(
paymenents
.
name
??
''
,
paymenents
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
)
)
...
@@ -363,12 +387,16 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -363,12 +387,16 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
value:
provider
.
selectreceiptPaymentModes
,
value:
provider
.
selectreceiptPaymentModes
,
onChanged:
(
PaymentModes
?
value
)
{
onChanged:
(
PaymentModes
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
.
receiptPaymentModes
.
isNotEmpty
)
{
if
(
provider
provider
.
selectreceiptPaymentModes
=
value
;
.
receiptPaymentModes
.
isNotEmpty
)
{
provider
.
selectreceiptPaymentModes
=
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
);
provider
.
receiptPaymentModesID
=
value
.
id
!;
provider
.
receiptPaymentModesID
=
value
.
id
!;
provider
.
receiptPaymentModesValues
=
provider
.
receiptPaymentModesValues
=
value
.
name
!;
value
.
name
!;
print
(
print
(
...
@@ -394,17 +422,19 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -394,17 +422,19 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
"RTGS"
,
"RTGS"
,
"IMPS"
,
"IMPS"
,
"NEFT"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
...
].
contains
(
provider
.
paymentModeValue
))
...[
[
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankNameController
,
provider
.
bankNameController
,
"Bank Name"
,
"Bank Name"
,
"Enter Bank Name"
,
"Enter Bank Name"
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
2
],
focusNodes
[
2
],
focusNodes
[
3
],
focusNodes
[
3
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankNameError
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -412,10 +442,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -412,10 +442,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
provider
.
bankBranchController
,
provider
.
bankBranchController
,
"Bank Branch"
,
"Bank Branch"
,
"Enter Bank Branch"
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
3
],
focusNodes
[
3
],
focusNodes
[
4
],
focusNodes
[
4
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankBranchError
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -423,10 +456,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -423,10 +456,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
provider
.
bankAccNumberController
,
provider
.
bankAccNumberController
,
"Account Number"
,
"Account Number"
,
"Enter Account Number"
,
"Enter Account Number"
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
4
],
focusNodes
[
4
],
focusNodes
[
5
],
focusNodes
[
5
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankNumberError
),
errorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -434,10 +470,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -434,10 +470,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
provider
.
bankIfscController
,
provider
.
bankIfscController
,
"Bank IFSC"
,
"Bank IFSC"
,
"Enter Bank IFSC"
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
5
],
focusNodes
[
5
],
focusNodes
[
6
],
focusNodes
[
6
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -445,23 +484,28 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -445,23 +484,28 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
provider
.
bankAcHolderController
,
provider
.
bankAcHolderController
,
"Bank Account Holder Name"
,
"Bank Account Holder Name"
,
"Enter Bank Account Holder Name"
,
"Enter Bank Account Holder Name"
,
provider
.
updateHolder
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateHolder
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
6
],
focusNodes
[
6
],
focusNodes
[
8
],
focusNodes
[
8
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankHolderError
),
errorWidget
(
context
,
provider
.
bankHolderError
),
]
else
if
(
provider
.
paymentModeValue
==
"UPI"
)
...
]
else
if
(
provider
.
paymentModeValue
==
"UPI"
)
...[
[
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankUpiController
,
provider
.
bankUpiController
,
"UPI ID"
,
"UPI ID"
,
"Enter UPI ID"
,
"Enter UPI ID"
,
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
7
],
focusNodes
[
7
],
focusNodes
[
8
],
focusNodes
[
8
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
UPIError
),
errorWidget
(
context
,
provider
.
UPIError
),
],
],
...
@@ -470,10 +514,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -470,10 +514,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
provider
.
paymentReferenceController
,
provider
.
paymentReferenceController
,
"Payment Reference Number"
,
"Payment Reference Number"
,
"Enter Payment Reference Number"
,
"Enter Payment Reference Number"
,
provider
.
updatereference
,
TextInputType
.
text
,
false
,
null
,
provider
.
updatereference
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
8
],
focusNodes
[
8
],
focusNodes
[
9
],
focusNodes
[
9
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
paymentreferenceError
),
errorWidget
(
context
,
provider
.
paymentreferenceError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -481,10 +528,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -481,10 +528,13 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
provider
.
descController
,
provider
.
descController
,
"Description"
,
"Description"
,
"Enter Description"
,
"Enter Description"
,
provider
.
updateDescription
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateDescription
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
9
],
focusNodes
[
9
],
focusNodes
[
10
],
focusNodes
[
10
],
TextInputAction
.
done
TextInputAction
.
done
,
),
),
errorWidget
(
context
,
provider
.
descriptionError
),
errorWidget
(
context
,
provider
.
descriptionError
),
InkResponse
(
InkResponse
(
...
@@ -514,29 +564,44 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -514,29 +564,44 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
),
),
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Expanded
(
flex:
5
,
child:
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
fontWeight:
FontWeight
.
w600
,
),),
),
InkResponse
(
),
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
provider
.
imageFilePath
=
null
;
},
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
),
],
],
),
),
)
)
,
],
],
SizedBox
(
height:
75
,
)
SizedBox
(
height:
75
)
,
],
],
),
),
),
),
...
@@ -544,22 +609,31 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -544,22 +609,31 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
floatingActionButtonLocation:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
bottomNavigationBar:
InkResponse
(
onTap:
provider
.
submitClicked
?
null
:
()
{
onTap:
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
true
;
provider
.
submitClicked
=
true
;
provider
.
addReceiptPaymentRequestionSubmitAPI
(
context
,
provider
.
formattedDate
);
provider
.
addReceiptPaymentRequestionSubmitAPI
(
context
,
provider
.
formattedDate
,
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
0
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
0
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
borderRadius:
BorderRadius
.
circular
(
15
),
),
),
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
white
),
):
Text
(
)
:
Text
(
"Submit"
,
"Submit"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
15
,
fontSize:
15
,
...
@@ -638,8 +712,6 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
...
@@ -638,8 +712,6 @@ class _AddpaymentreceiptlistState extends State<Addpaymentreceiptlist> {
// );
// );
// }
// }
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
...
...
lib/screens/finance/directPaymentRequesitionList.dart
View file @
3ad2ea55
...
@@ -27,7 +27,7 @@ class Directpaymentrequesitionlist extends StatefulWidget {
...
@@ -27,7 +27,7 @@ class Directpaymentrequesitionlist extends StatefulWidget {
class
_DirectpaymentrequesitionlistState
class
_DirectpaymentrequesitionlistState
extends
State
<
Directpaymentrequesitionlist
>
{
extends
State
<
Directpaymentrequesitionlist
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
Dropdowntheme
ddtheme
=
Dropdowntheme
();
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
12
,
(
index
)
=>
FocusNode
()
,
);
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
12
,
(
index
)
=>
FocusNode
());
@override
@override
void
initState
()
{
void
initState
()
{
...
@@ -44,7 +44,7 @@ class _DirectpaymentrequesitionlistState
...
@@ -44,7 +44,7 @@ class _DirectpaymentrequesitionlistState
@override
@override
void
dispose
()
{
void
dispose
()
{
focusNodes
.
map
((
e
)
=>
e
.
dispose
()
,
);
focusNodes
.
map
((
e
)
=>
e
.
dispose
());
super
.
dispose
();
super
.
dispose
();
}
}
...
@@ -60,7 +60,7 @@ class _DirectpaymentrequesitionlistState
...
@@ -60,7 +60,7 @@ class _DirectpaymentrequesitionlistState
return
WillPopScope
(
return
WillPopScope
(
child:
SafeArea
(
child:
SafeArea
(
top:
false
,
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
backgroundColor:
AppColors
.
white
,
...
@@ -98,7 +98,8 @@ class _DirectpaymentrequesitionlistState
...
@@ -98,7 +98,8 @@ class _DirectpaymentrequesitionlistState
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
),
),
)
)
...
@@ -122,20 +123,25 @@ class _DirectpaymentrequesitionlistState
...
@@ -122,20 +123,25 @@ class _DirectpaymentrequesitionlistState
},
},
dropdownSearchData:
DropdownSearchData
(
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchInnerWidgetHeight:
50
,
searchController:
provider
.
accountSearchController
,
searchController:
provider
.
accountSearchController
,
searchInnerWidget:
Padding
(
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
child:
TextFormField
(
controller:
provider
.
accountSearchController
,
controller:
provider
.
accountSearchController
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
8
,
vertical:
8
,
),
),
hintText:
'Search account...'
,
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
),
),
),
),
),
...
@@ -143,11 +149,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -143,11 +149,13 @@ class _DirectpaymentrequesitionlistState
searchMatchFn:
(
item
,
searchValue
)
{
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
return
item
.
value
?.
name
?.
toLowerCase
()
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
false
;
},
},
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
),
),
onMenuStateChange:
(
isOpen
)
{
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
if
(!
isOpen
)
{
...
@@ -164,8 +172,6 @@ class _DirectpaymentrequesitionlistState
...
@@ -164,8 +172,6 @@ class _DirectpaymentrequesitionlistState
),
),
),
),
errorWidget
(
context
,
provider
.
selectDirectAccountError
),
errorWidget
(
context
,
provider
.
selectDirectAccountError
),
TextWidget
(
context
,
"Payment Account"
),
TextWidget
(
context
,
"Payment Account"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
...
@@ -221,20 +227,26 @@ class _DirectpaymentrequesitionlistState
...
@@ -221,20 +227,26 @@ class _DirectpaymentrequesitionlistState
},
},
dropdownSearchData:
DropdownSearchData
(
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchInnerWidgetHeight:
50
,
searchController:
provider
.
paymentAccountSearchController
,
searchController:
provider
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
child:
TextFormField
(
controller:
provider
.
paymentAccountSearchController
,
controller:
provider
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
isDense:
true
,
contentPadding:
const
EdgeInsets
.
symmetric
(
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
8
,
vertical:
8
,
),
),
hintText:
'Search account...'
,
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
8
),
borderRadius:
BorderRadius
.
circular
(
8
,
),
),
),
),
),
),
),
...
@@ -242,15 +254,18 @@ class _DirectpaymentrequesitionlistState
...
@@ -242,15 +254,18 @@ class _DirectpaymentrequesitionlistState
searchMatchFn:
(
item
,
searchValue
)
{
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
return
item
.
value
?.
name
?.
toLowerCase
()
?.
toLowerCase
()
.
contains
(
searchValue
.
toLowerCase
())
??
.
contains
(
searchValue
.
toLowerCase
(),
)
??
false
;
false
;
},
},
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
),
),
onMenuStateChange:
(
isOpen
)
{
onMenuStateChange:
(
isOpen
)
{
if
(!
isOpen
)
{
if
(!
isOpen
)
{
provider
.
paymentAccountSearchController
.
clear
();
provider
.
paymentAccountSearchController
.
clear
();
}
}
},
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
...
@@ -271,11 +286,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -271,11 +286,13 @@ class _DirectpaymentrequesitionlistState
provider
.
amountController
,
provider
.
amountController
,
"Amount"
,
"Amount"
,
"Enter Amount"
,
"Enter Amount"
,
provider
.
updateAmount
,
TextInputType
.
numberWithOptions
(),
provider
.
updateAmount
,
false
,
null
,
TextInputType
.
numberWithOptions
(),
false
,
null
,
focusNodes
[
0
],
focusNodes
[
0
],
focusNodes
[
1
],
focusNodes
[
1
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
amountError
),
errorWidget
(
context
,
provider
.
amountError
),
...
@@ -312,16 +329,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -312,16 +329,13 @@ class _DirectpaymentrequesitionlistState
onChanged:
(
value
)
{},
onChanged:
(
value
)
{},
focusNode:
focusNodes
[
1
],
focusNode:
focusNodes
[
1
],
onTapUpOutside:
(
event
)
{
onTapUpOutside:
(
event
)
{
if
(
focusNodes
[
1
].
hasFocus
)
{
if
(
focusNodes
[
1
].
hasFocus
){
focusNodes
[
1
].
unfocus
();
focusNodes
[
1
].
unfocus
();
}
}
},
},
textInputAction:
TextInputAction
.
done
,
textInputAction:
TextInputAction
.
done
,
onEditingComplete:
()
{
onEditingComplete:
()
{
focusNodes
[
1
].
unfocus
();
focusNodes
[
1
].
unfocus
();
},
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
"Enter Date"
,
hintText:
"Enter Date"
,
...
@@ -375,7 +389,9 @@ class _DirectpaymentrequesitionlistState
...
@@ -375,7 +389,9 @@ class _DirectpaymentrequesitionlistState
value:
provider
.
selectDirectPaymentModes
,
value:
provider
.
selectDirectPaymentModes
,
onChanged:
(
DirectPaymentModes
?
value
)
{
onChanged:
(
DirectPaymentModes
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
.
directPaymentModes
.
isNotEmpty
)
{
if
(
provider
.
directPaymentModes
.
isNotEmpty
)
{
provider
.
selectDirectPaymentModes
=
value
;
provider
.
selectDirectPaymentModes
=
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
...
@@ -412,10 +428,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -412,10 +428,13 @@ class _DirectpaymentrequesitionlistState
provider
.
bankNameController
,
provider
.
bankNameController
,
"Bank Name"
,
"Bank Name"
,
"Enter Bank Name"
,
"Enter Bank Name"
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateBankName
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
2
],
focusNodes
[
2
],
focusNodes
[
3
],
focusNodes
[
3
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankNameError
),
errorWidget
(
context
,
provider
.
bankNameError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -423,10 +442,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -423,10 +442,13 @@ class _DirectpaymentrequesitionlistState
provider
.
bankBranchController
,
provider
.
bankBranchController
,
"Bank Branch"
,
"Bank Branch"
,
"Enter Bank Branch"
,
"Enter Bank Branch"
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateBankBranch
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
3
],
focusNodes
[
3
],
focusNodes
[
4
],
focusNodes
[
4
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankBranchError
),
errorWidget
(
context
,
provider
.
bankBranchError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -434,10 +456,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -434,10 +456,13 @@ class _DirectpaymentrequesitionlistState
provider
.
bankAccNumberController
,
provider
.
bankAccNumberController
,
"Account Number"
,
"Account Number"
,
"Enter Account Number"
,
"Enter Account Number"
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
provider
.
updateNumber
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
4
],
focusNodes
[
4
],
focusNodes
[
5
],
focusNodes
[
5
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankNumberError
),
errorWidget
(
context
,
provider
.
bankNumberError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -445,10 +470,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -445,10 +470,13 @@ class _DirectpaymentrequesitionlistState
provider
.
bankIfscController
,
provider
.
bankIfscController
,
"Bank IFSC"
,
"Bank IFSC"
,
"Enter Bank IFSC"
,
"Enter Bank IFSC"
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateIFSC
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
5
],
focusNodes
[
5
],
focusNodes
[
6
],
focusNodes
[
6
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
errorWidget
(
context
,
provider
.
bankIFSCError
),
textControllerWidget
(
textControllerWidget
(
...
@@ -456,22 +484,29 @@ class _DirectpaymentrequesitionlistState
...
@@ -456,22 +484,29 @@ class _DirectpaymentrequesitionlistState
provider
.
bankAcHolderController
,
provider
.
bankAcHolderController
,
"Bank Account Holder Name"
,
"Bank Account Holder Name"
,
"Enter Bank Account Holder Name"
,
"Enter Bank Account Holder Name"
,
provider
.
updateHolder
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateHolder
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
6
],
focusNodes
[
6
],
focusNodes
[
8
],
focusNodes
[
8
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
bankHolderError
),
errorWidget
(
context
,
provider
.
bankHolderError
),
]
else
if
(
provider
.
directPaymentModesValues
==
"UPI"
)
...[
]
else
if
(
provider
.
directPaymentModesValues
==
"UPI"
)
...[
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankUpiController
,
provider
.
bankUpiController
,
"UPI ID"
,
"UPI ID"
,
"Enter UPI ID"
,
"Enter UPI ID"
,
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateUPI
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
7
],
focusNodes
[
7
],
focusNodes
[
8
],
focusNodes
[
8
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
UPIError
),
errorWidget
(
context
,
provider
.
UPIError
),
],
],
...
@@ -480,10 +515,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -480,10 +515,13 @@ class _DirectpaymentrequesitionlistState
provider
.
paymentReferenceController
,
provider
.
paymentReferenceController
,
"Payment Reference Number"
,
"Payment Reference Number"
,
"Enter Payment Reference Number"
,
"Enter Payment Reference Number"
,
provider
.
updateReference
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateReference
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
8
],
focusNodes
[
8
],
focusNodes
[
9
],
focusNodes
[
9
],
TextInputAction
.
next
TextInputAction
.
next
,
),
),
errorWidget
(
context
,
provider
.
paymentreferenceerror
),
errorWidget
(
context
,
provider
.
paymentreferenceerror
),
textControllerWidget
(
textControllerWidget
(
...
@@ -491,10 +529,13 @@ class _DirectpaymentrequesitionlistState
...
@@ -491,10 +529,13 @@ class _DirectpaymentrequesitionlistState
provider
.
descController
,
provider
.
descController
,
"Description"
,
"Description"
,
"Enter Description"
,
"Enter Description"
,
provider
.
updateDescription
,
TextInputType
.
text
,
false
,
null
,
provider
.
updateDescription
,
TextInputType
.
text
,
false
,
null
,
focusNodes
[
9
],
focusNodes
[
9
],
focusNodes
[
10
],
focusNodes
[
10
],
TextInputAction
.
done
TextInputAction
.
done
,
),
),
errorWidget
(
context
,
provider
.
descriptionError
),
errorWidget
(
context
,
provider
.
descriptionError
),
InkResponse
(
InkResponse
(
...
@@ -524,27 +565,42 @@ class _DirectpaymentrequesitionlistState
...
@@ -524,27 +565,42 @@ class _DirectpaymentrequesitionlistState
),
),
),
),
),
),
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)...[
if
(
provider
.
imagePicked
==
1
&&
provider
.
imagePath
!=
null
)
...[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
4.0
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
Flexible
(
flex:
4
,
child:
Text
(
"
${provider.imagePath}
"
,
style:
TextStyle
(
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
fontSize:
11
,
fontSize:
11
,
fontWeight:
FontWeight
.
w600
fontWeight:
FontWeight
.
w600
,
),),
),
InkResponse
(
),
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imagePath
=
null
;
provider
.
imageFilePath
=
null
;
provider
.
imageFilePath
=
null
;
},
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,))
child:
SvgPicture
.
asset
(
"assets/svg/ic_close.svg"
,
width:
15
,
height:
15
,
),
),
),
],
],
),
),
)
)
,
],
],
],
],
),
),
...
@@ -553,7 +609,10 @@ class _DirectpaymentrequesitionlistState
...
@@ -553,7 +609,10 @@ class _DirectpaymentrequesitionlistState
floatingActionButtonLocation:
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar:
InkResponse
(
bottomNavigationBar:
InkResponse
(
onTap:
provider
.
submitClicked
?
null
:
()
{
onTap:
provider
.
submitClicked
?
null
:
()
{
provider
.
submitClicked
=
true
;
provider
.
submitClicked
=
true
;
provider
.
addDirectPaymentRequestionSubmitAPI
(
provider
.
addDirectPaymentRequestionSubmitAPI
(
context
,
context
,
...
@@ -569,9 +628,14 @@ class _DirectpaymentrequesitionlistState
...
@@ -569,9 +628,14 @@ class _DirectpaymentrequesitionlistState
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
borderRadius:
BorderRadius
.
circular
(
15
),
),
),
child:
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
child:
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
),
provider
.
submitClicked
):
Text
(
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
,
),
)
:
Text
(
"Submit"
,
"Submit"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
15
,
fontSize:
15
,
...
@@ -650,8 +714,6 @@ class _DirectpaymentrequesitionlistState
...
@@ -650,8 +714,6 @@ class _DirectpaymentrequesitionlistState
// );
// );
// }
// }
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
...
...
lib/screens/finance/financeDashboard.dart
View file @
3ad2ea55
...
@@ -29,16 +29,20 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -29,16 +29,20 @@ class _FinancedashboardState extends State<Financedashboard> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Dashboardprovider
>(
return
Consumer
<
Dashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
final
pages
=
provider
.
accessiblePagesList
;
final
pages
=
provider
.
accessiblePagesList
;
return
WillPopScope
(
return
Scaffold
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Finance"
),
appBar:
appbar
(
context
,
"Finance"
),
...
@@ -54,20 +58,14 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -54,20 +58,14 @@ class _FinancedashboardState extends State<Financedashboard> {
Widget
?
SvgIcon
;
Widget
?
SvgIcon
;
switch
(
pages
[
index
].
mode
)
{
switch
(
pages
[
index
].
mode
)
{
case
"apr_lvl1"
:
case
"apr_lvl1"
:
SvgIcon
=
SvgPicture
.
asset
(
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
);
"assets/svg/fin_lv1.svg"
,
);
break
;
break
;
case
"apr_lvl2"
:
case
"apr_lvl2"
:
SvgIcon
=
SvgPicture
.
asset
(
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv2.svg"
);
"assets/svg/fin_lv2.svg"
,
);
break
;
break
;
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
default
:
default
:
SvgIcon
=
SvgPicture
.
asset
(
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
"assets/svg/fin_ic.svg"
,
);
break
;
break
;
}
}
return
InkResponse
(
return
InkResponse
(
...
@@ -76,9 +74,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -76,9 +74,7 @@ class _FinancedashboardState extends State<Financedashboard> {
if
(
pages
[
index
].
pageName
==
"Payments List"
)
{
if
(
pages
[
index
].
pageName
==
"Payments List"
)
{
navigate
=
Paymentlistpaymentrequisition
(
navigate
=
Paymentlistpaymentrequisition
(
pageTitleName:
pageTitleName:
provider
provider
.
accessiblePagesList
[
index
].
pageName
!,
.
accessiblePagesList
[
index
]
.
pageName
!,
);
);
}
else
if
(
provider
}
else
if
(
provider
.
accessiblePagesList
[
index
]
.
accessiblePagesList
[
index
]
...
@@ -86,9 +82,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -86,9 +82,7 @@ class _FinancedashboardState extends State<Financedashboard> {
"Payment Receipts List"
)
{
"Payment Receipts List"
)
{
navigate
=
Paymentreceiptlist
(
navigate
=
Paymentreceiptlist
(
pageTitleName:
pageTitleName:
provider
provider
.
accessiblePagesList
[
index
].
pageName
!,
.
accessiblePagesList
[
index
]
.
pageName
!,
);
);
}
else
if
(
provider
}
else
if
(
provider
.
accessiblePagesList
[
index
]
.
accessiblePagesList
[
index
]
...
@@ -106,16 +100,12 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -106,16 +100,12 @@ class _FinancedashboardState extends State<Financedashboard> {
navigate
=
Allpaymentrequesitionlistsbymodes
(
navigate
=
Allpaymentrequesitionlistsbymodes
(
mode:
pages
[
index
].
mode
!,
mode:
pages
[
index
].
mode
!,
pageTitleName:
pageTitleName:
provider
provider
.
accessiblePagesList
[
index
].
pageName
!,
.
accessiblePagesList
[
index
]
.
pageName
!,
);
);
}
}
await
Navigator
.
push
(
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
builder:
(
context
)
=>
navigate
,
),
);
);
},
},
child:
Container
(
child:
Container
(
...
@@ -133,25 +123,29 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -133,25 +123,29 @@ class _FinancedashboardState extends State<Financedashboard> {
),
),
child:
Row
(
child:
Row
(
children:
[
children:
[
if
(
provider
if
(
provider
.
accessiblePagesList
[
index
]
.
accessiblePagesList
[
index
]
.
pageName
==
.
pageName
==
"Account List"
)...[
"Account List"
)
...[
Expanded
(
flex:
1
,
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/comm_ic_1.svg"
,
width:
25
,
"assets/svg/comm_ic_1.svg"
,
width:
25
,
),
),
)
)
,
]
else
if
(
provider
]
else
if
(
provider
.
accessiblePagesList
[
index
]
.
accessiblePagesList
[
index
]
.
pageName
==
.
pageName
==
"Account Ledger"
)...[
"Account Ledger"
)
...[
Expanded
(
flex:
1
,
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/comm_ic_2.svg"
,
width:
25
,
"assets/svg/comm_ic_2.svg"
,
width:
25
,
),
),
)
)
,
]
else
...[
]
else
...[
Expanded
(
flex:
1
,
child:
SvgIcon
),
Expanded
(
flex:
1
,
child:
SvgIcon
),
],
],
Expanded
(
Expanded
(
...
@@ -170,7 +164,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -170,7 +164,7 @@ class _FinancedashboardState extends State<Financedashboard> {
);
);
},
},
),
),
SizedBox
(
height:
150
,
)
SizedBox
(
height:
150
)
,
],
],
),
),
),
),
...
@@ -200,8 +194,6 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -200,8 +194,6 @@ class _FinancedashboardState extends State<Financedashboard> {
),
),
),
),
),
),
),
),
);
);
},
},
);
);
...
@@ -296,11 +288,13 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -296,11 +288,13 @@ class _FinancedashboardState extends State<Financedashboard> {
);
);
}
else
if
(
provider
}
else
if
(
provider
.
accessiblePagesList2
[
index
]
.
accessiblePagesList2
[
index
]
.
pageName
!.
contains
(
"Add Account"
))
{
.
pageName
!
.
contains
(
"Add Account"
))
{
res
=
await
Navigator
.
push
(
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
context
)
=>
Addcommonpayment
(
builder:
(
context
)
=>
Addcommonpayment
(
from:
"Dashboard"
,
from:
"Dashboard"
,
),
),
),
),
...
...
lib/screens/finance/submitPaymentRequestionListsByMode.dart
View file @
3ad2ea55
...
@@ -22,7 +22,8 @@ class Submitpaymentrequestionlistsbymode extends StatefulWidget {
...
@@ -22,7 +22,8 @@ class Submitpaymentrequestionlistsbymode extends StatefulWidget {
const
Submitpaymentrequestionlistsbymode
({
const
Submitpaymentrequestionlistsbymode
({
super
.
key
,
super
.
key
,
required
this
.
mode
,
required
this
.
mode
,
required
this
.
pageTitleName
,
this
.
accountId
,
required
this
.
pageTitleName
,
this
.
accountId
,
});
});
@override
@override
...
@@ -34,7 +35,8 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -34,7 +35,8 @@ class _SubmitpaymentrequestionlistsbymodeState
extends
State
<
Submitpaymentrequestionlistsbymode
>
{
extends
State
<
Submitpaymentrequestionlistsbymode
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
Dropdowntheme
ddtheme
=
Dropdowntheme
();
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
11
,
(
index
)
=>
FocusNode
());
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
11
,
(
index
)
=>
FocusNode
());
GlobalKey
_globalKey
=
GlobalKey
();
ScrollController
scrollcontroller
=
ScrollController
();
@override
@override
void
initState
()
{
void
initState
()
{
// TODO: implement initState
// TODO: implement initState
...
@@ -46,69 +48,49 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -46,69 +48,49 @@ class _SubmitpaymentrequestionlistsbymodeState
);
);
print
(
"widget.accountId
${widget.accountId}
"
);
print
(
"widget.accountId
${widget.accountId}
"
);
provider
.
addPaymentRequestionViewAPI
(
context
,
widget
.
mode
);
provider
.
addPaymentRequestionViewAPI
(
context
,
widget
.
mode
);
Future
.
delayed
(
Duration
(
milliseconds:
500
),()
{
Future
.
delayed
(
Duration
(
milliseconds:
500
),
()
{
if
(
widget
.
mode
==
"self"
&&
provider
.
accounts
.
length
==
1
)
{
if
(
widget
.
mode
==
"self"
&&
provider
.
accounts
.
length
==
1
)
{
provider
.
selectedAccount
=
provider
.
accounts
.
first
;
provider
.
selectedAccount
=
provider
.
accounts
.
first
;
provider
.
accountId
=
provider
.
accounts
.
first
.
id
!;
provider
.
accountId
=
provider
.
accounts
.
first
.
id
!;
}
}
else
if
(
widget
.
mode
==
"other"
&&
provider
.
accounts
!=
null
)
{
else
if
(
widget
.
mode
==
"other"
&&
provider
.
accounts
!=
null
)
{
if
(
widget
.
accountId
!=
null
)
{
if
(
widget
.
accountId
!=
null
)
{
provider
.
selectedAccount
=
provider
.
accounts
.
firstWhereOrNull
(
provider
.
selectedAccount
=
(
element
)
=>
element
.
id
==
widget
.
accountId
,
provider
.
accounts
.
firstWhereOrNull
(
(
element
)
=>
element
.
id
==
widget
.
accountId
,
);
);
print
(
"sdsd,al;,al
${provider.selectedAccount!.id}
"
);
print
(
"sdsd,al;,al
${provider.selectedAccount!.id}
"
);
print
(
"sdsd,al;,al
${provider.selectedAccount!.name}
"
);
print
(
"sdsd,al;,al
${provider.selectedAccount!.name}
"
);
provider
.
accountId
=
provider
.
accountId
=
provider
.
accounts
provider
.
accounts
.
firstWhere
(
.
firstWhere
((
e
)
=>
e
.
id
==
widget
.
accountId
)!
(
e
)
=>
e
.
id
==
widget
.
accountId
,
)!
.
id
!;
.
id
!;
provider
.
accountValue
=
provider
.
accountValue
=
provider
.
accounts
provider
.
accounts
.
firstWhere
(
.
firstWhere
((
e
)
=>
e
.
id
==
widget
.
accountId
)!
(
e
)
=>
e
.
id
==
widget
.
accountId
,
)!
.
name
!;
.
name
!;
}
}
}
}
}
,
);
});
});
});
}
}
@override
@override
void
dispose
()
{
void
dispose
()
{
scrollcontroller
.
dispose
();
focusNodes
.
map
((
e
)
=>
e
.
dispose
());
focusNodes
.
map
((
e
)
=>
e
.
dispose
());
super
.
dispose
();
super
.
dispose
();
}
}
autofill
(
res
){
autofill
(
res
)
{
print
(
"auto"
);
print
(
"auto"
);
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
listen:
false
);
context
,
listen:
false
,
);
if
(
provider
.
accounts
!=
null
)
{
if
(
provider
.
accounts
!=
null
)
{
provider
.
selectedAccount
=
provider
.
accounts
.
firstWhereOrNull
(
provider
.
selectedAccount
=
provider
.
accounts
.
firstWhereOrNull
((
element
)
=>
element
.
id
==
res
,);
(
element
)
=>
element
.
id
==
res
,
);
print
(
"sdsd,al;,al
${provider.selectedAccount}
"
);
print
(
"sdsd,al;,al
${provider.selectedAccount}
"
);
provider
.
accountId
=
provider
.
accountId
=
provider
.
accounts
.
firstWhere
((
e
)
=>
e
.
id
==
res
).
id
!;
provider
.
accounts
.
firstWhere
(
(
e
)
=>
e
.
id
==
res
,
)
.
id
!;
provider
.
accountValue
=
provider
.
accountValue
=
provider
.
accounts
provider
.
accounts
.
firstWhere
((
e
)
=>
e
.
id
==
res
).
name
!;
.
firstWhere
(
(
e
)
=>
e
.
id
==
res
,
)
.
name
!;
}
}
}
}
...
@@ -121,12 +103,10 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -121,12 +103,10 @@ class _SubmitpaymentrequestionlistsbymodeState
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Requestionlistprovider
>(
return
Consumer
<
Requestionlistprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
child:
SafeArea
(
child:
SafeArea
(
top:
false
,
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
white
,
backgroundColor:
AppColors
.
white
,
...
@@ -143,6 +123,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -143,6 +123,7 @@ class _SubmitpaymentrequestionlistsbymodeState
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
controller:
scrollcontroller
,
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
...
@@ -257,7 +238,9 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -257,7 +238,9 @@ class _SubmitpaymentrequestionlistsbymodeState
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
Addcommonpayment
(
from:
"Requesition"
,),
(
context
)
=>
Addcommonpayment
(
from:
"Requesition"
,
),
),
),
);
);
print
(
"return Response:
${res}
"
);
print
(
"return Response:
${res}
"
);
...
@@ -441,6 +424,27 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -441,6 +424,27 @@ class _SubmitpaymentrequestionlistsbymodeState
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
paymentModeId
.
toString
(),
provider
.
paymentModeId
.
toString
(),
);
);
if
([
"Cheque"
,
"RTGS"
,
"IMPS"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
final
context
=
_globalKey
.
currentContext
;
if
(
context
!=
null
)
{
Scrollable
.
ensureVisible
(
context
,
duration:
Duration
(
milliseconds:
300
,
),
curve:
Curves
.
easeInOut
,
);
}
});
}
}
}
}
}
},
},
...
@@ -455,7 +459,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -455,7 +459,7 @@ class _SubmitpaymentrequestionlistsbymodeState
),
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
errorWidget
(
context
,
provider
.
selectPaymentError
),
if
(
widget
.
mode
==
"other"
)...[
if
(
widget
.
mode
==
"other"
)
...[
TextWidget
(
context
,
"Select Approval Employee"
),
TextWidget
(
context
,
"Select Approval Employee"
),
DropdownButtonHideUnderline
(
DropdownButtonHideUnderline
(
child:
Row
(
child:
Row
(
...
@@ -488,13 +492,18 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -488,13 +492,18 @@ class _SubmitpaymentrequestionlistsbymodeState
value:
provider
.
selectedApprovalEmployee
,
value:
provider
.
selectedApprovalEmployee
,
onChanged:
(
Employees
?
value
)
{
onChanged:
(
Employees
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
if
(
provider
.
approvalEmployee
.
isNotEmpty
)
{
if
(
provider
provider
.
selectedApprovalEmployee
=
value
;
.
approvalEmployee
.
isNotEmpty
)
{
provider
.
selectedApprovalEmployee
=
value
;
print
(
print
(
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
);
provider
.
selectedApprovalEmployeeID
=
value
.
id
!;
provider
.
selectedApprovalEmployeeID
=
provider
.
selectedApprovalEmployeeValue
=
value
.
name
!;
value
.
id
!;
provider
.
selectedApprovalEmployeeValue
=
value
.
name
!;
print
(
print
(
"hfjkshfg"
+
"hfjkshfg"
+
provider
.
paymentModeId
.
toString
(),
provider
.
paymentModeId
.
toString
(),
...
@@ -548,7 +557,9 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -548,7 +557,9 @@ class _SubmitpaymentrequestionlistsbymodeState
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Text
(
Expanded
(
flex:
4
,
child:
Text
(
"
${provider.imagePath}
"
,
"
${provider.imagePath}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
...
@@ -556,7 +567,10 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -556,7 +567,10 @@ class _SubmitpaymentrequestionlistsbymodeState
fontWeight:
FontWeight
.
w600
,
fontWeight:
FontWeight
.
w600
,
),
),
),
),
InkResponse
(
),
Expanded
(
flex:
1
,
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
provider
.
imagePicked
=
0
;
provider
.
imagePicked
=
0
;
provider
.
imagePath
=
null
;
provider
.
imagePath
=
null
;
...
@@ -568,6 +582,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -568,6 +582,7 @@ class _SubmitpaymentrequestionlistsbymodeState
height:
15
,
height:
15
,
),
),
),
),
),
],
],
),
),
),
),
...
@@ -580,6 +595,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -580,6 +595,7 @@ class _SubmitpaymentrequestionlistsbymodeState
"IMPS"
,
"IMPS"
,
"NEFT"
,
"NEFT"
,
].
contains
(
provider
.
paymentModeValue
))
...[
].
contains
(
provider
.
paymentModeValue
))
...[
SizedBox
(
height:
3
,
key:
_globalKey
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
bankNameController
,
provider
.
bankNameController
,
...
@@ -645,7 +661,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -645,7 +661,7 @@ class _SubmitpaymentrequestionlistsbymodeState
"RTGS"
,
"RTGS"
,
"IMPS"
,
"IMPS"
,
"NEFT"
,
"NEFT"
,
"UPI"
"UPI"
,
].
contains
(
provider
.
paymentModeValue
))
...[
].
contains
(
provider
.
paymentModeValue
))
...[
textControllerWidget
(
textControllerWidget
(
context
,
context
,
...
@@ -688,18 +704,18 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -688,18 +704,18 @@ class _SubmitpaymentrequestionlistsbymodeState
provider
.
submitClicked
provider
.
submitClicked
?
null
?
null
:
()
{
:
()
{
provider
.
submitClicked
=
fals
e
;
provider
.
submitClicked
=
tru
e
;
provider
.
addPaymentRequestionSubmitAPI
(
provider
.
addPaymentRequestionSubmitAPI
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
provider
.
selectedApprovalEmployeeID
provider
.
selectedApprovalEmployeeID
,
);
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
...
...
lib/screens/genTracker/GenTrackerDashboard.dart
View file @
3ad2ea55
...
@@ -17,6 +17,15 @@ class Gentrackerdashboard extends StatefulWidget {
...
@@ -17,6 +17,15 @@ class Gentrackerdashboard extends StatefulWidget {
class
_GentrackerdashboardState
extends
State
<
Gentrackerdashboard
>
{
class
_GentrackerdashboardState
extends
State
<
Gentrackerdashboard
>
{
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
final
names
=
[
final
names
=
[
"Generator Details"
,
"Generator Details"
,
// "Register Complaint",
// "Register Complaint",
...
@@ -29,12 +38,7 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
...
@@ -29,12 +38,7 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
// "gent_tag_loc",
// "gent_tag_loc",
"gent_tag_den"
,
"gent_tag_den"
,
];
];
return
WillPopScope
(
return
Scaffold
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Tracker"
),
appBar:
appbar
(
context
,
"Gen Tracker"
),
...
@@ -131,16 +135,13 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
...
@@ -131,16 +135,13 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
padding:
const
EdgeInsets
.
all
(
8.0
),
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Text
(
child:
Text
(
"Note: 'Tag Location' and 'Register Complaint' are moved to 'Generator Details'."
,
"Note: 'Tag Location' and 'Register Complaint' are moved to 'Generator Details'."
,
style:
TextStyle
(
color:
AppColors
.
grey_thick
,
style:
TextStyle
(
color:
AppColors
.
grey_thick
,
fontSize:
14
),
fontSize:
14
),
),
),
),
),
),
),
SizedBox
(
height:
10
),
SizedBox
(
height:
10
),
],
],
),
),
),
),
);
);
}
}
}
}
lib/screens/inventory/InventoryScreen.dart
View file @
3ad2ea55
...
@@ -35,14 +35,18 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -35,14 +35,18 @@ class _InventoryScreenState extends State<InventoryScreen> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
InventoryProvider
>(
return
Consumer
<
InventoryProvider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
Scaffold
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
appBar:
appbar
(
context
,
"Gen Inventory"
),
...
@@ -55,7 +59,6 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -55,7 +59,6 @@ class _InventoryScreenState extends State<InventoryScreen> {
height:
250
,
height:
250
,
child:
QRView
(
child:
QRView
(
key:
provider
.
scannerKey
,
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
onQRViewCreated:
(
p0
)
{
provider
.
onQRViewCreated
(
p0
,
"inventory"
,
context
);
provider
.
onQRViewCreated
(
p0
,
"inventory"
,
context
);
...
@@ -64,7 +67,6 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -64,7 +67,6 @@ class _InventoryScreenState extends State<InventoryScreen> {
cameraFacing:
CameraFacing
.
back
,
cameraFacing:
CameraFacing
.
back
,
overlay:
QrScannerOverlayShape
(
overlay:
QrScannerOverlayShape
(
borderColor:
AppColors
.
app_blue
,
borderColor:
AppColors
.
app_blue
,
borderRadius:
20
,
borderRadius:
20
,
borderLength:
60
,
borderLength:
60
,
...
@@ -77,7 +79,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -77,7 +79,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
Text
(
Text
(
"Scan QR"
,
"Scan QR"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
style:
TextStyle
(
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
Text
(
Text
(
"to open Inventory"
,
"to open Inventory"
,
...
@@ -88,8 +94,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -88,8 +94,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
Text
(
Text
(
"or"
,
"or"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
18
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
fontSize:
18
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
...
@@ -98,17 +107,17 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -98,17 +107,17 @@ class _InventoryScreenState extends State<InventoryScreen> {
child:
Text
(
child:
Text
(
"Tap To Enter Part ID"
,
"Tap To Enter Part ID"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
17
,
style:
TextStyle
(
fontSize:
17
,
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),
color:
AppColors
.
app_blue
,
),
),
),
),
),
SizedBox
(
height:
50
),
SizedBox
(
height:
50
),
],
],
),
),
),
),
),
),
);
);
},
},
);
);
...
@@ -160,7 +169,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -160,7 +169,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
),
),
),
),
),
),
SizedBox
(
height:
5
,
),
SizedBox
(
height:
5
),
Container
(
Container
(
height:
48
,
height:
48
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
...
@@ -188,7 +197,8 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -188,7 +197,8 @@ class _InventoryScreenState extends State<InventoryScreen> {
controller:
partIDcontroller
,
controller:
partIDcontroller
,
keyboardType:
TextInputType
.
text
,
keyboardType:
TextInputType
.
text
,
focusNode:
partIDfocusNode
,
focusNode:
partIDfocusNode
,
textCapitalization:
TextCapitalization
.
characters
,
textCapitalization:
TextCapitalization
.
characters
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
onChanged:
(
value
)
{},
onChanged:
(
value
)
{},
...
@@ -210,7 +220,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -210,7 +220,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
),
),
),
),
),
),
SizedBox
(
height:
15
,
),
SizedBox
(
height:
15
),
InkWell
(
InkWell
(
onTap:
()
{
onTap:
()
{
provider
.
LoadPartDetailsApifunction
(
provider
.
LoadPartDetailsApifunction
(
...
@@ -238,9 +248,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -238,9 +248,11 @@ class _InventoryScreenState extends State<InventoryScreen> {
child:
Text
(
child:
Text
(
"Submit"
,
"Submit"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
15
),
fontSize:
15
,
),
),
),
),
),
),
),
...
...
lib/screens/order/orderModuleDashboard.dart
View file @
3ad2ea55
...
@@ -23,22 +23,30 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -23,22 +23,30 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
// TODO: implement initState
// TODO: implement initState
super
.
initState
();
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
,
);
provider
.
orderDashboardAPIFunction
(
context
,
"executive"
,
""
,
""
,
""
);
provider
.
orderDashboardAPIFunction
(
context
,
"executive"
,
""
,
""
,
""
);
provider
.
ordersAccessiblePagesAPIFunction
(
context
);
provider
.
ordersAccessiblePagesAPIFunction
(
context
);
});
});
}
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
)),
)
:
_scaffold
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Pagesdashboardprovider
>(
return
Consumer
<
Pagesdashboardprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
final
pages
=
provider
.
ordersAccessiblePagesList
;
final
pages
=
provider
.
ordersAccessiblePagesList
;
return
WillPopScope
(
return
Scaffold
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Orders"
),
appBar:
appbar
(
context
,
"Orders"
),
...
@@ -47,15 +55,15 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -47,15 +55,15 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
child:
Column
(
child:
Column
(
children:
[
children:
[
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
10
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
borderRadius:
BorderRadius
.
circular
(
16
)
,
),
),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
child:
GridView
.
builder
(
child:
GridView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
itemCount:
provider
.
ordersgain
.
length
,
itemCount:
provider
.
ordersgain
.
length
,
shrinkWrap:
true
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
scrollDirection:
Axis
.
horizontal
,
...
@@ -64,7 +72,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -64,7 +72,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
crossAxisCount:
2
,
crossAxisCount:
2
,
crossAxisSpacing:
10
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
mainAxisSpacing:
10
,
childAspectRatio:
0.65
childAspectRatio:
0.65
,
),
),
itemBuilder:
(
context
,
jndex
)
{
itemBuilder:
(
context
,
jndex
)
{
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
...
@@ -149,79 +157,69 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -149,79 +157,69 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
Widget
?
SvgIcon
;
Widget
?
SvgIcon
;
switch
(
pages
[
index
].
mode
)
{
switch
(
pages
[
index
].
mode
)
{
case
"level_one_approval"
:
case
"level_one_approval"
:
SvgIcon
=
SvgPicture
.
asset
(
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv1.svg"
);
"assets/svg/fin_lv1.svg"
,
);
break
;
break
;
case
"level_two_approval"
:
case
"level_two_approval"
:
case
"level_two_rejected"
:
case
"level_two_rejected"
:
SvgIcon
=
SvgPicture
.
asset
(
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_lv2.svg"
);
"assets/svg/fin_lv2.svg"
,
);
break
;
break
;
default
:
default
:
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
SvgIcon
=
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
);
break
;
break
;
};
}
;
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
var
navigate
;
var
navigate
;
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Order"
)
)
{
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Order"
))
{
navigate
=
AddorderScreen
(
navigate
=
AddorderScreen
(
mode:
pages
[
index
].
mode
!,
mode:
pages
[
index
].
mode
!,
pageTitleName:
pageTitleName:
pages
[
index
].
pageName
!,
pages
[
index
]
.
pageName
!,
);
);
}
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Payment"
)
)
{
}
if
(
pages
[
index
].
pageName
!.
contains
(
"Add Payment"
))
{
(
"navigate to Add Payment"
);
(
"navigate to Add Payment"
);
navigate
=
AddpaymentScreen
(
navigate
=
AddpaymentScreen
(
mode:
pages
[
index
].
mode
!,
mode:
pages
[
index
].
mode
!,
pageTitleName:
pageTitleName:
pages
[
index
].
pageName
!,
pages
[
index
]
.
pageName
!,
);
);
}
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Payments List"
))
{
"Payments List"
,
))
{
navigate
=
Paymentlistsbymode
(
navigate
=
Paymentlistsbymode
(
mode:
pages
[
index
].
mode
!,
mode:
pages
[
index
].
mode
!,
pageTitleName:
pageTitleName:
pages
[
index
].
pageName
!,
pages
[
index
]
.
pageName
!,
);
);
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Order List"
)){
}
else
if
(
pages
[
index
].
pageName
!.
contains
(
"Order List"
,
))
{
navigate
=
OrderslistbyModes
(
navigate
=
OrderslistbyModes
(
mode:
pages
[
index
].
mode
!,
mode:
pages
[
index
].
mode
!,
pageTitleName:
pageTitleName:
pages
[
index
].
pageName
!,
pages
[
index
]
.
pageName
!,
);
);
}
else
if
(
pages
[
index
].
pageName
==
"Add TPC Agent"
){
}
else
if
(
pages
[
index
].
pageName
==
"Add TPC Agent"
)
{
navigate
=
AddtpcagentScreen
();
navigate
=
AddtpcagentScreen
();
}
else
if
(
pages
[
index
].
pageName
==
"TPC Agent List (Admin)"
){
}
else
if
(
pages
[
index
].
pageName
==
"TPC Agent List (Admin)"
)
{
navigate
=
Tpcagentlistbymode
(
navigate
=
Tpcagentlistbymode
(
mode:
pages
[
index
].
mode
!,
mode:
pages
[
index
].
mode
!,
pageTitleName:
pageTitleName:
pages
[
index
].
pageName
!,
pages
[
index
]
.
pageName
!,
);
);
}
else
if
(
pages
[
index
].
pageName
==
"Pending TPC Issue List"
){
}
else
if
(
pages
[
index
].
pageName
==
"Pending TPC Issue List"
)
{
navigate
=
Tpcagentissuelist
(
navigate
=
Tpcagentissuelist
(
mode:
pages
[
index
].
mode
!,
mode:
pages
[
index
].
mode
!,
pageTitleName:
pageTitleName:
pages
[
index
].
pageName
!,
pages
[
index
]
.
pageName
!,
);
);
}
}
if
(
navigate
!=
null
){
if
(
navigate
!=
null
)
{
await
Navigator
.
push
(
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
MaterialPageRoute
(
builder:
(
context
)
=>
navigate
),
);
);
}
}
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
...
@@ -241,9 +239,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -241,9 +239,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
Expanded
(
flex:
1
,
child:
SvgIcon
),
Expanded
(
flex:
1
,
child:
SvgIcon
),
Expanded
(
Expanded
(
flex:
5
,
flex:
5
,
child:
Text
(
child:
Text
(
"
${pages[index].pageName}
"
),
"
${pages[index].pageName}
"
,
),
),
),
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
...
@@ -261,8 +257,6 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
...
@@ -261,8 +257,6 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
),
),
),
),
),
),
),
),
);
);
},
},
);
);
...
...
lib/screens/serviceEngineer/AccountSuggestions.dart
View file @
3ad2ea55
...
@@ -27,7 +27,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -27,7 +27,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
child:
SafeArea
(
top:
false
,
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Accounts"
),
appBar:
appbar
(
context
,
"Accounts"
),
...
@@ -54,7 +54,10 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -54,7 +54,10 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
border:
border:
searchFocusNode
.
hasFocus
searchFocusNode
.
hasFocus
?
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
)
?
Border
.
all
(
color:
AppColors
.
app_blue
,
width:
0.5
,
)
:
null
,
:
null
,
),
),
// alignment: Alignment.center,
// alignment: Alignment.center,
...
@@ -123,7 +126,9 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -123,7 +126,9 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
builder:
builder:
(
context
)
=>
Paymentdetails
(
(
context
)
=>
Paymentdetails
(
accountName:
"Account"
,
accountName:
"Account"
,
name:
accountList
![
index
].
accountName
,
name:
accountList
![
index
]
.
accountName
,
genId:
""
,
genId:
""
,
referenceID:
referenceID:
accountList
![
index
].
accountId
,
accountList
![
index
].
accountId
,
...
@@ -135,7 +140,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -135,7 +140,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
child:
SizedBox
(
child:
SizedBox
(
child:
Container
(
child:
Container
(
width:
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
padding:
EdgeInsets
.
fromLTRB
(
0
,
5
,
0
,
10
),
padding:
EdgeInsets
.
fromLTRB
(
0
,
5
,
0
,
10
),
child:
Row
(
child:
Row
(
children:
[
children:
[
...
@@ -148,9 +154,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -148,9 +154,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
borderRadius:
8
,
BorderRadius
.
circular
(
8
),
),
),
),
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
width:
30
,
width:
30
,
...
@@ -159,7 +164,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -159,7 +164,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
),
),
),
),
),
),
SizedBox
(
width:
10
,
),
SizedBox
(
width:
10
),
Expanded
(
Expanded
(
flex:
5
,
flex:
5
,
child:
Text
(
child:
Text
(
...
@@ -168,7 +173,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -168,7 +173,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
maxLines:
3
,
maxLines:
3
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
color:
AppColors
.
semi_black
,
),
),
),
),
),
),
...
@@ -189,7 +194,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -189,7 +194,8 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
child:
Container
(
child:
Container
(
width:
double
.
infinity
,
width:
double
.
infinity
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
// Set width to fill parent width
// Set width to fill parent width
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
only
(
borderRadius:
BorderRadius
.
only
(
...
@@ -197,7 +203,12 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -197,7 +203,12 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
topRight:
Radius
.
circular
(
30.0
),
topRight:
Radius
.
circular
(
30.0
),
),
),
),
),
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
padding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
,
),
child:
Container
(
child:
Container
(
child:
Align
(
child:
Align
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment