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
55280429
Commit
55280429
authored
Aug 20, 2025
by
Sai Srinivas
Browse files
20-08-2025 By Sai Srinivas
Test Cases CRM
parent
6ace5c45
Changes
31
Hide whitespace changes
Inline
Side-by-side
lib/screens/crm/generateQuotationScreen.dart
View file @
55280429
...
@@ -26,6 +26,7 @@ class Generatequotationscreen extends StatefulWidget {
...
@@ -26,6 +26,7 @@ class Generatequotationscreen extends StatefulWidget {
class
_GeneratequotationscreenState
extends
State
<
Generatequotationscreen
>
{
class
_GeneratequotationscreenState
extends
State
<
Generatequotationscreen
>
{
Dropdowntheme
ddtheme
=
Dropdowntheme
();
Dropdowntheme
ddtheme
=
Dropdowntheme
();
List
<
FocusNode
>
focusNodes
=
List
.
generate
(
12
,
(
index
)
=>
FocusNode
());
@override
@override
void
initState
()
{
void
initState
()
{
...
@@ -45,6 +46,13 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
...
@@ -45,6 +46,13 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
});
});
}
}
@override
void
dispose
()
{
focusNodes
.
map
((
e
)
=>
e
.
dispose
());
super
.
dispose
();
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Crmgeneratequotationprovider
>(
return
Consumer
<
Crmgeneratequotationprovider
>(
...
@@ -95,6 +103,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
...
@@ -95,6 +103,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
TextInputType
.
emailAddress
,
TextInputType
.
emailAddress
,
false
,
false
,
null
,
null
,
focusNodes
[
0
],
focusNodes
[
1
],
TextInputAction
.
done
,
null
,
),
),
errorWidget
(
context
,
provider
.
mailIdError
),
errorWidget
(
context
,
provider
.
mailIdError
),
...
@@ -107,6 +119,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
...
@@ -107,6 +119,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
TextInputType
.
phone
,
TextInputType
.
phone
,
false
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
FilteringTextInputFormatter
.
digitsOnly
,
focusNodes
[
1
],
focusNodes
[
2
],
TextInputAction
.
done
,
null
,
),
),
errorWidget
(
context
,
provider
.
mobileError
),
errorWidget
(
context
,
provider
.
mobileError
),
...
@@ -119,6 +135,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
...
@@ -119,6 +135,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
2
],
focusNodes
[
3
],
TextInputAction
.
done
,
null
,
),
),
errorWidget
(
context
,
provider
.
subjectsError
),
errorWidget
(
context
,
provider
.
subjectsError
),
],
],
...
@@ -623,6 +643,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
...
@@ -623,6 +643,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
3
],
focusNodes
[
4
],
TextInputAction
.
done
,
null
,
),
),
errorWidget
(
context
,
provider
.
SpecialNoteError
),
errorWidget
(
context
,
provider
.
SpecialNoteError
),
...
@@ -635,6 +659,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
...
@@ -635,6 +659,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
4
],
focusNodes
[
5
],
TextInputAction
.
done
,
null
,
),
),
errorWidget
(
context
,
provider
.
forError
),
errorWidget
(
context
,
provider
.
forError
),
...
@@ -647,6 +675,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
...
@@ -647,6 +675,10 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
focusNodes
[
5
],
focusNodes
[
6
],
TextInputAction
.
done
,
null
,
),
),
errorWidget
(
context
,
provider
.
paymentTermsError
),
errorWidget
(
context
,
provider
.
paymentTermsError
),
],
],
...
@@ -675,214 +707,240 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
...
@@ -675,214 +707,240 @@ class _GeneratequotationscreenState extends State<Generatequotationscreen> {
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
provider
.
buttonsLoading
?[
children:
SizedBox
(
width:
25
),
provider
.
buttonsLoading
CircularProgressIndicator
.
adaptive
(
?
[
valueColor:
AlwaysStoppedAnimation
(
AppColors
.
app_blue
),
SizedBox
(
width:
25
),
),
CircularProgressIndicator
.
adaptive
(
SizedBox
(
width:
25
),
valueColor:
AlwaysStoppedAnimation
(
]:
[
AppColors
.
app_blue
,
Expanded
(
),
child:
InkResponse
(
),
onTap:
SizedBox
(
width:
25
),
provider
.
buttonsLoading
]
?
null
:
[
:
()
{
Expanded
(
provider
.
buttonsLoading
=
true
;
child:
InkResponse
(
//genquotedown
onTap:
final
insertedData
=
provider
.
productRows
;
provider
.
buttonsLoading
print
(
insertedData
);
?
null
provider
:
()
{
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
HapticFeedback
.
mediumImpact
();
context
,
provider
.
buttonsLoading
=
true
;
widget
.
leadId
,
//genquotedown
insertedData
,
final
insertedData
=
"genquotedown"
,
provider
.
productRows
;
);
print
(
insertedData
);
},
provider
child:
Container
(
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
height:
45
,
context
,
alignment:
Alignment
.
center
,
widget
.
leadId
,
insertedData
,
"genquotedown"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/crm/download_quote_ic.svg"
,
),
SizedBox
(
width:
10
,),
Text
(
"Download"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
),
),
],
),
),
),
child:
),
provider
.
submitLoading
),
?
CircularProgressIndicator
.
adaptive
(
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
),
valueColor:
Expanded
(
AlwaysStoppedAnimation
<
Color
>(
child:
InkResponse
(
AppColors
.
app_blue
,
onTap:
),
provider
.
buttonsLoading
)
?
null
:
Row
(
:
()
{
mainAxisAlignment:
provider
.
buttonsLoading
=
true
;
MainAxisAlignment
.
center
,
//genquotemail,
children:
[
final
insertedData
=
provider
.
getFormData
();
SvgPicture
.
asset
(
provider
"assets/svg/crm/download_quote_ic.svg"
,
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
),
context
,
SizedBox
(
width:
10
),
widget
.
leadId
,
Text
(
insertedData
,
"Download"
,
"genquotemail"
,
style:
TextStyle
(
);
fontSize:
14
,
},
fontFamily:
child:
Container
(
"JakartaRegular"
,
height:
45
,
),
alignment:
Alignment
.
center
,
),
],
),
),
),
),
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
,
),
Expanded
(
child:
InkResponse
(
onTap:
provider
.
buttonsLoading
?
null
:
()
{
HapticFeedback
.
mediumImpact
();
provider
.
buttonsLoading
=
true
;
//genquotemail,
final
insertedData
=
provider
.
productRows
;
print
(
insertedData
);
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotemail"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/crm/email_quote_ic.svg"
,
),
SizedBox
(
width:
10
,),
Text
(
"Email"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
),
),
],
),
),
),
child:
),
provider
.
submitLoading
),
?
CircularProgressIndicator
.
adaptive
(
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
),
valueColor:
Expanded
(
AlwaysStoppedAnimation
<
Color
>(
child:
InkResponse
(
AppColors
.
app_blue
,
onTap:
),
provider
.
buttonsLoading
)
?
null
:
Row
(
:
()
{
mainAxisAlignment:
provider
.
buttonsLoading
=
true
;
MainAxisAlignment
.
center
,
//genquotewhatsapp,
children:
[
final
insertedData
=
provider
.
getFormData
();
SvgPicture
.
asset
(
provider
"assets/svg/crm/email_quote_ic.svg"
,
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
),
context
,
SizedBox
(
width:
10
),
widget
.
leadId
,
Text
(
insertedData
,
"Email"
,
"genquotewhatsapp"
,
style:
TextStyle
(
);
fontSize:
14
,
},
fontFamily:
child:
Container
(
"JakartaRegular"
,
height:
45
,
),
alignment:
Alignment
.
center
,
),
],
),
),
),
),
SvgPicture
.
asset
(
"assets/svg/crm/vertical_line_ic.svg"
,
),
Expanded
(
child:
InkResponse
(
onTap:
provider
.
buttonsLoading
?
null
:
()
{
HapticFeedback
.
mediumImpact
();
provider
.
buttonsLoading
=
true
;
//genquotewhatsapp,
final
insertedData
=
provider
.
productRows
;
print
(
insertedData
);
provider
.
crmLeadDetailsGenerateQuoteSubmitAPIFunction
(
context
,
widget
.
leadId
,
insertedData
,
"genquotewhatsapp"
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
// color: AppColors.app_blue,
// color: AppColors.app_blue,
borderRadius:
BorderRadius
.
circular
(
10
),
borderRadius:
BorderRadius
.
circular
(
10
),
),
child:
provider
.
submitLoading
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
,
),
)
:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SvgPicture
.
asset
(
"assets/svg/crm/whatsapp_quote_ic.svg"
,
),
SizedBox
(
width:
10
,),
Text
(
"Whatsapp"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
),
),
],
),
),
),
child:
),
provider
.
submitLoading
),
?
CircularProgressIndicator
.
adaptive
(
// Expanded(
valueColor:
// child: InkResponse(
AlwaysStoppedAnimation
<
Color
>(
// onTap:
AppColors
.
app_blue
,
// provider.submitLoading
),
// ? null
)
// : () {
:
Row
(
// //genquotewhatsappbymynum,
mainAxisAlignment:
// final insertedData = provider.getFormData();
MainAxisAlignment
.
center
,
// provider
children:
[
// .crmLeadDetailsGenerateQuoteSubmitAPIFunction(
SvgPicture
.
asset
(
// context,
"assets/svg/crm/whatsapp_quote_ic.svg"
,
// widget.leadId,
),
// insertedData,
SizedBox
(
width:
10
),
// "genquotewhatsappbymynum",
Text
(
// );
"Whatsapp"
,
// },
style:
TextStyle
(
// child: Container(
fontSize:
14
,
// height: 45,
fontFamily:
// alignment: Alignment.center,
"JakartaRegular"
,
// margin: const EdgeInsets.symmetric(
),
// horizontal: 10,
),
// vertical: 15,
],
// ),
),
// padding: const EdgeInsets.symmetric(
),
// horizontal: 10,
),
// vertical: 5,
),
// ),
// Expanded(
// decoration: BoxDecoration(
// child: InkResponse(
// // color: AppColors.app_blue,
// onTap:
// borderRadius: BorderRadius.circular(10),
// provider.submitLoading
// ),
// ? null
// child:
// : () {
// provider.submitLoading
// //genquotewhatsappbymynum,
// ? CircularProgressIndicator.adaptive(
// final insertedData = provider.getFormData();
// valueColor: AlwaysStoppedAnimation<Color>(
// provider
// AppColors.app_blue,
// .crmLeadDetailsGenerateQuoteSubmitAPIFunction(
// ),
// context,
// )
// widget.leadId,
// : SvgPicture.asset(
// insertedData,
// "assets/svg/whatsapp_quote_self.svg",
// "genquotewhatsappbymynum",
// ),
// );
// ),
// },
// ),
// child: Container(
// ),
// height: 45,
],
// alignment: Alignment.center,
// margin: const EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 15,
// ),
// padding: const EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 5,
// ),
// decoration: BoxDecoration(
// // color: AppColors.app_blue,
// borderRadius: BorderRadius.circular(10),
// ),
// child:
// provider.submitLoading
// ? CircularProgressIndicator.adaptive(
// valueColor: AlwaysStoppedAnimation<Color>(
// AppColors.app_blue,
// ),
// )
// : SvgPicture.asset(
// "assets/svg/whatsapp_quote_self.svg",
// ),
// ),
// ),
// ),
],
),
),
),
),
),
),
...
...
lib/screens/crm/pendingTasksDetails.dart
View file @
55280429
...
@@ -3,6 +3,7 @@ import 'dart:io';
...
@@ -3,6 +3,7 @@ import 'dart:io';
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/crmProvider/crmDashboardProvider.dart'
;
import
'package:generp/Notifiers/crmProvider/crmDashboardProvider.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
...
@@ -96,7 +97,10 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
...
@@ -96,7 +97,10 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
InkResponse
(
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pop
(
context
,
true
);
},
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back_button.svg"
,
"assets/svg/appbar_back_button.svg"
,
height:
25
,
height:
25
,
...
@@ -104,7 +108,10 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
...
@@ -104,7 +108,10 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
InkResponse
(
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pop
(
context
,
true
);
},
child:
Text
(
child:
Text
(
"Pending Tasks"
,
"Pending Tasks"
,
style:
TextStyle
(
style:
TextStyle
(
...
@@ -236,6 +243,7 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
...
@@ -236,6 +243,7 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
belowHeads
[
i
]==
"Mobile Number"
?(){
onTap:
belowHeads
[
i
]==
"Mobile Number"
?(){
HapticFeedback
.
selectionClick
();
launch
(
launch
(
'tel://
${belowSubHeads[i]}
'
,
'tel://
${belowSubHeads[i]}
'
,
);
);
...
@@ -278,6 +286,7 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
...
@@ -278,6 +286,7 @@ class _PendingtasksdetailsState extends State<Pendingtasksdetails> {
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkResponse
(
floatingActionButton:
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
await
Navigator
.
push
(
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Followupupdatescreen
(
MaterialPageRoute
(
builder:
(
context
)
=>
Followupupdatescreen
(
...
...
lib/screens/crm/pendingTasksList.dart
View file @
55280429
...
@@ -3,6 +3,7 @@ import 'dart:io';
...
@@ -3,6 +3,7 @@ import 'dart:io';
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/flutter_svg.dart'
;
import
'package:flutter_svg/flutter_svg.dart'
;
import
'package:generp/Notifiers/crmProvider/crmDashboardProvider.dart'
;
import
'package:generp/Notifiers/crmProvider/crmDashboardProvider.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
...
@@ -140,6 +141,7 @@ class _PendingTasksListState extends State<PendingTasksList> {
...
@@ -140,6 +141,7 @@ class _PendingTasksListState extends State<PendingTasksList> {
];
];
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
await
Navigator
.
push
(
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
@@ -236,7 +238,8 @@ class _PendingTasksListState extends State<PendingTasksList> {
...
@@ -236,7 +238,8 @@ class _PendingTasksListState extends State<PendingTasksList> {
child:
Text
(
child:
Text
(
"
${provider.pendingTasksLists[index].anote}
"
,
"
${provider.pendingTasksLists[index].anote}
"
,
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
maxLines:
1
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
...
...
lib/screens/crm/universalSearchScreen.dart
View file @
55280429
import
'dart:io'
;
import
'dart:io'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/screens/crm/ProspectDetailsByMode.dart'
;
import
'package:generp/screens/crm/ProspectDetailsByMode.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
...
@@ -73,7 +74,10 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
...
@@ -73,7 +74,10 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
=>
Navigator
.
pop
(
context
,
true
),
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pop
(
context
,
true
);
},
child:
Container
(
child:
Container
(
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back_button.svg"
,
height:
25
)),
child:
SvgPicture
.
asset
(
"assets/svg/appbar_back_button.svg"
,
height:
25
)),
...
@@ -127,6 +131,7 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
...
@@ -127,6 +131,7 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
child:
provider
.
searchController
.
text
.
isNotEmpty
?
child:
provider
.
searchController
.
text
.
isNotEmpty
?
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
provider
.
searchController
.
clear
();
provider
.
searchController
.
clear
();
provider
.
crmUniversalSearchFunction
(
provider
.
crmUniversalSearchFunction
(
context
,
context
,
...
@@ -260,6 +265,7 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
...
@@ -260,6 +265,7 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
}
}
return
InkResponse
(
return
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pushAndRemoveUntil
(
Navigator
.
pushAndRemoveUntil
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
@@ -395,6 +401,7 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
...
@@ -395,6 +401,7 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
}
}
return
InkResponse
(
return
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
pushAndRemoveUntil
(
Navigator
.
pushAndRemoveUntil
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
...
lib/screens/finance/AllPaymentRequesitionListsByModes.dart
View file @
55280429
...
@@ -92,7 +92,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -92,7 +92,7 @@ class _AllpaymentrequesitionlistsbymodesState
Color
getDecorationColor
(
value
)
{
Color
getDecorationColor
(
value
)
{
var
color
=
AppColors
.
approved_bg_color
;
var
color
=
AppColors
.
approved_bg_color
;
switch
(
value
){
switch
(
value
)
{
case
'Requested'
:
case
'Requested'
:
return
AppColors
.
requested_bg_color
;
return
AppColors
.
requested_bg_color
;
case
'Level 1 Approved'
:
case
'Level 1 Approved'
:
...
@@ -106,15 +106,14 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -106,15 +106,14 @@ class _AllpaymentrequesitionlistsbymodesState
case
'Processed'
:
case
'Processed'
:
return
AppColors
.
processed_bg_color
;
return
AppColors
.
processed_bg_color
;
case
'Payment Rejected'
:
case
'Payment Rejected'
:
return
AppColors
.
rejected_bg_color
;
return
AppColors
.
rejected_bg_color
;
}
}
return
color
;
return
color
;
}
}
Color
getTextColor
(
value
)
{
Color
getTextColor
(
value
)
{
var
color
=
AppColors
.
approved_text_color
;
var
color
=
AppColors
.
approved_text_color
;
switch
(
value
){
switch
(
value
)
{
case
'Requested'
:
case
'Requested'
:
return
AppColors
.
requested_text_color
;
return
AppColors
.
requested_text_color
;
case
'Level 1 Approved'
:
case
'Level 1 Approved'
:
...
@@ -129,14 +128,13 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -129,14 +128,13 @@ class _AllpaymentrequesitionlistsbymodesState
return
AppColors
.
processed_text_color
;
return
AppColors
.
processed_text_color
;
case
'Payment Rejected'
:
case
'Payment Rejected'
:
return
AppColors
.
rejected_text_color
;
return
AppColors
.
rejected_text_color
;
}
}
return
color
;
return
color
;
}
}
getText
(
value
){
getText
(
value
)
{
var
text
=
"A"
;
var
text
=
"A"
;
switch
(
value
){
switch
(
value
)
{
case
'Requested'
:
case
'Requested'
:
return
"R"
;
return
"R"
;
case
'Level 1 Approved'
:
case
'Level 1 Approved'
:
...
@@ -151,14 +149,13 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -151,14 +149,13 @@ class _AllpaymentrequesitionlistsbymodesState
return
"P"
;
return
"P"
;
case
'Payment Rejected'
:
case
'Payment Rejected'
:
return
"R"
;
return
"R"
;
}
}
return
text
;
return
text
;
}
}
double
getSize
(
value
){
double
getSize
(
value
)
{
var
text
=
"A"
;
var
text
=
"A"
;
switch
(
value
){
switch
(
value
)
{
case
'Requested'
:
case
'Requested'
:
return
16.0
;
return
16.0
;
case
'Level 1 Approved'
:
case
'Level 1 Approved'
:
...
@@ -173,7 +170,6 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -173,7 +170,6 @@ class _AllpaymentrequesitionlistsbymodesState
return
16.0
;
return
16.0
;
case
'Payment Rejected'
:
case
'Payment Rejected'
:
return
16.0
;
return
16.0
;
}
}
return
18.0
;
return
18.0
;
}
}
...
@@ -214,7 +210,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -214,7 +210,7 @@ class _AllpaymentrequesitionlistsbymodesState
:
NoNetwork
(
context
);
:
NoNetwork
(
context
);
}
}
bool
shouldShowSwipeButtons
(
status
){
bool
shouldShowSwipeButtons
(
status
)
{
isLevel1Finalized
=
[
isLevel1Finalized
=
[
"Level 1 Approved"
,
"Level 1 Approved"
,
"Level 1 Rejected"
,
"Level 1 Rejected"
,
...
@@ -233,11 +229,11 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -233,11 +229,11 @@ class _AllpaymentrequesitionlistsbymodesState
}
else
if
(
widget
.
mode
==
"apr_lvl2"
)
{
}
else
if
(
widget
.
mode
==
"apr_lvl2"
)
{
shouldShowButtons
=
shouldShowButtons
=
!
isLevel2Finalized
&&
!
isLevel2Finalized
&&
[
[
"Requested"
,
"Requested"
,
"Level 1 Approved"
,
"Level 1 Approved"
,
"Level 1 approved"
,
"Level 1 approved"
,
].
contains
(
status
);
].
contains
(
status
);
}
else
if
(
widget
.
mode
==
"process"
)
{
}
else
if
(
widget
.
mode
==
"process"
)
{
shouldShowButtons
=
[
shouldShowButtons
=
[
"Level 2 Approved"
,
"Level 2 Approved"
,
...
@@ -265,8 +261,8 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -265,8 +261,8 @@ class _AllpaymentrequesitionlistsbymodesState
// "Level 2 rejected",
// "Level 2 rejected",
// ].contains(req_det.status);
// ].contains(req_det.status);
return
Consumer2
<
Requestionlistprovider
,
Requesitionlidtdetailsprovider
>(
return
Consumer2
<
Requestionlistprovider
,
Requesitionlidtdetailsprovider
>(
builder:
(
context
,
provider
,
detailsProvider
,
child
)
{
builder:
(
context
,
provider
,
detailsProvider
,
child
)
{
final
requestLists
=
provider
.
requisitionList
;
final
requestLists
=
provider
.
requisitionList
;
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
...
@@ -284,6 +280,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -284,6 +280,7 @@ class _AllpaymentrequesitionlistsbymodesState
// ),
// ),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
cf
=
Commondaterangefilter
();
var
cf
=
Commondaterangefilter
();
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
if
(
result
!=
null
)
{
if
(
result
!=
null
)
{
...
@@ -320,7 +317,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -320,7 +317,7 @@ class _AllpaymentrequesitionlistsbymodesState
),
),
],
],
),
),
0xFFFFFFFF
0xFFFFFFFF
,
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
body:
...
@@ -349,6 +346,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -349,6 +346,7 @@ class _AllpaymentrequesitionlistsbymodesState
}
}
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
var
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
@@ -376,7 +374,6 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -376,7 +374,6 @@ class _AllpaymentrequesitionlistsbymodesState
}
}
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
5
,
vertical:
5
,
...
@@ -388,91 +385,118 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -388,91 +385,118 @@ class _AllpaymentrequesitionlistsbymodesState
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
child:
Slidable
(
child:
Slidable
(
startActionPane:
shouldShowButtons
?
ActionPane
(
startActionPane:
motion:
const
ScrollMotion
(),
shouldShowButtons
dragDismissible:
false
,
?
ActionPane
(
// dismissible: DismissiblePane(onDismissed: () {}),
motion:
const
ScrollMotion
(),
dragDismissible:
false
,
children:
[
// dismissible: DismissiblePane(onDismissed: () {}),
if
(
shouldShowButtons
&&
![
"admin"
,
"self"
].
contains
(
widget
.
mode
))...[
children:
[
SlidableAction
(
if
(
shouldShowButtons
&&
onPressed:
(
context
)
{
![
"admin"
,
_showLevelRejectionSheet
(
"self"
,
context
,
].
contains
(
widget
.
mode
))
...[
requestLists
[
index
].
id
,
SlidableAction
(
);
onPressed:
(
context
)
{
},
_showLevelRejectionSheet
(
backgroundColor:
Color
(
0xFFFFE5E5
),
context
,
foregroundColor:
Color
(
0xFFEF3739
),
requestLists
[
index
].
id
,
icon:
Icons
.
clear
,
);
label:
'Reject'
,
},
),
backgroundColor:
Color
(
],
0xFFFFE5E5
,
),
foregroundColor:
Color
(
0xFFEF3739
,
),
icon:
Icons
.
clear
,
label:
'Reject'
,
),
],
if
(
widget
.
mode
==
"process"
)...[
if
(
widget
.
mode
==
"process"
)
...[
SlidableAction
(
SlidableAction
(
onPressed:
(
context
)
{
onPressed:
(
context
)
{
detailsProvider
detailsProvider
.
approveRejectPaymentRequestAPIFunction
(
.
approveRejectPaymentRequestAPIFunction
(
context
,
context
,
requestLists
[
index
].
id
,
requestLists
[
index
]
);
.
id
,
detailsProvider
.
preValues
();
);
_showAddPaymentSheet
(
detailsProvider
.
preValues
();
context
,
_showAddPaymentSheet
(
context
,
requestLists
[
index
].
id
,
);
},
backgroundColor:
Color
(
0xFFFFF8E5
,
),
foregroundColor:
Color
(
0xFFFFB600
,
),
icon:
Icons
.
add
,
label:
'Add Payment'
,
),
],
],
)
:
null
,
endActionPane:
shouldShowButtons
?
ActionPane
(
motion:
const
ScrollMotion
(),
key:
ValueKey
(
requestLists
[
index
].
id
,
requestLists
[
index
].
id
,
);
),
},
dragDismissible:
false
,
backgroundColor:
Color
(
0xFFFFF8E5
),
foregroundColor:
Color
(
0xFFFFB600
),
icon:
Icons
.
add
,
label:
'Add Payment'
,
),
],
],
):
null
,
endActionPane:
shouldShowButtons
?
ActionPane
(
motion:
const
ScrollMotion
(),
key:
ValueKey
(
requestLists
[
index
].
id
),
dragDismissible:
false
,
// dismissible: DismissiblePane(
//
// onDismissed: () {},
// closeOnCancel: true,
// resizeDuration: Duration(milliseconds: 300),),
children:
[
if
([
"apr_lvl1"
,
"apr_lvl2"
,
"self_apr_lvl2"
,
].
contains
(
widget
.
mode
))...[
SlidableAction
(
onPressed:
(
context
)
{
detailsProvider
.
paymentRequesitionDetails
(
context
,
requestLists
[
index
].
id
);
// dismissible: DismissiblePane(
detailsProvider
.
preValues
();
//
detailsProvider
// onDismissed: () {},
.
approveRejectPaymentRequestAPIFunction
(
// closeOnCancel: true,
context
,
// resizeDuration: Duration(milliseconds: 300),),
requestLists
[
index
].
id
,
children:
[
);
if
([
_showLevelApprovalSheet
(
"apr_lvl1"
,
context
,
"apr_lvl2"
,
requestLists
[
index
].
id
,
"self_apr_lvl2"
,
);
].
contains
(
widget
.
mode
))
...[
},
SlidableAction
(
backgroundColor:
Color
(
0xFFE9FFE8
),
onPressed:
(
context
)
{
foregroundColor:
Color
(
0xFF4CB443
),
detailsProvider
icon:
Icons
.
check
,
.
paymentRequesitionDetails
(
label:
'Approve'
,
context
,
),
requestLists
[
index
]
],
.
id
,
],
);
):
null
,
detailsProvider
.
preValues
();
detailsProvider
.
approveRejectPaymentRequestAPIFunction
(
context
,
requestLists
[
index
]
.
id
,
);
_showLevelApprovalSheet
(
context
,
requestLists
[
index
].
id
,
);
},
backgroundColor:
Color
(
0xFFE9FFE8
,
),
foregroundColor:
Color
(
0xFF4CB443
,
),
icon:
Icons
.
check
,
label:
'Approve'
,
),
],
],
)
:
null
,
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
...
@@ -490,16 +514,27 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -490,16 +514,27 @@ class _AllpaymentrequesitionlistsbymodesState
width:
50
,
width:
50
,
padding:
EdgeInsets
.
all
(
8.0
),
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
getDecorationColor
(
requestLists
[
index
].
status
),
color:
getDecorationColor
(
shape:
BoxShape
.
circle
requestLists
[
index
].
status
,
),
shape:
BoxShape
.
circle
,
),
),
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
getText
(
requestLists
[
index
].
status
),
getText
(
requestLists
[
index
]
.
status
,
),
style:
TextStyle
(
style:
TextStyle
(
color:
getTextColor
(
requestLists
[
index
].
status
),
color:
getTextColor
(
fontSize:
getSize
(
requestLists
[
index
].
status
),
requestLists
[
index
]
fontFamily:
"JakartaBold"
.
status
,
),
fontSize:
getSize
(
requestLists
[
index
]
.
status
,
),
fontFamily:
"JakartaBold"
,
),
),
),
),
),
),
...
@@ -517,19 +552,25 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -517,19 +552,25 @@ class _AllpaymentrequesitionlistsbymodesState
requestLists
[
index
]
requestLists
[
index
]
.
accountName
!,
.
accountName
!,
maxLines:
1
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
),
),
Text
(
Text
(
"
${requestLists[index].date}
"
,
"
${requestLists[index].date}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
),
),
),
),
],
],
...
@@ -616,6 +657,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -616,6 +657,7 @@ class _AllpaymentrequesitionlistsbymodesState
];
];
return
ListTile
(
return
ListTile
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
provider
.
copyToClipboard
(
context
);
provider
.
copyToClipboard
(
context
);
...
@@ -719,7 +761,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -719,7 +761,7 @@ class _AllpaymentrequesitionlistsbymodesState
provider
.
requestedAmount
,
provider
.
requestedAmount
,
"Requested Amount"
,
"Requested Amount"
,
"Enter Requested Amount"
,
"Enter Requested Amount"
,
(
p0
)
{},
(
p0
)
{},
TextInputType
.
numberWithOptions
(),
TextInputType
.
numberWithOptions
(),
true
,
true
,
null
,
null
,
...
@@ -732,9 +774,9 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -732,9 +774,9 @@ class _AllpaymentrequesitionlistsbymodesState
provider
.
approvedAmount
,
provider
.
approvedAmount
,
"Approved Amount"
,
"Approved Amount"
,
"Enter Approved Amount"
,
"Enter Approved Amount"
,
(
p0
)
{
(
p0
)
{
provider
.
onChangeApprov
(
p0
);
provider
.
onChangeApprov
(
p0
);
},
},
TextInputType
.
numberWithOptions
(),
TextInputType
.
numberWithOptions
(),
false
,
false
,
null
,
null
,
...
@@ -742,15 +784,15 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -742,15 +784,15 @@ class _AllpaymentrequesitionlistsbymodesState
focusNodes
[
1
],
focusNodes
[
1
],
TextInputAction
.
next
,
TextInputAction
.
next
,
),
),
if
(
provider
.
ApprovedAmountError
!=
null
)...[
if
(
provider
.
ApprovedAmountError
!=
null
)
...[
errorWidget
(
context
,
provider
.
ApprovedAmountError
),
errorWidget
(
context
,
provider
.
ApprovedAmountError
),
],
],
textControllerWidget
(
textControllerWidget
(
context
,
context
,
remarks
,
remarks
,
"Remarks"
,
"Remarks"
,
"Enter Remarks"
,
"Enter Remarks"
,
(
p0
)
{},
(
p0
)
{},
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
...
@@ -772,23 +814,23 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -772,23 +814,23 @@ class _AllpaymentrequesitionlistsbymodesState
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
items:
items:
provider
.
paymentsAccounts
provider
.
paymentsAccounts
.
map
(
.
map
(
(
paymenents
)
=>
DropdownMenuItem
<
(
paymenents
)
=>
DropdownMenuItem
<
PaymentAccounts
PaymentAccounts
>(
>(
value:
paymenents
,
value:
paymenents
,
child:
Text
(
child:
Text
(
paymenents
.
name
??
''
,
paymenents
.
name
??
''
,
style:
const
TextStyle
(
style:
const
TextStyle
(
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
),
),
),
),
)
)
.
toList
(),
.
toList
(),
value:
provider
.
selectedPaymentAccounts
,
value:
provider
.
selectedPaymentAccounts
,
onChanged:
(
PaymentAccounts
?
value
)
{
onChanged:
(
PaymentAccounts
?
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
...
@@ -812,35 +854,35 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -812,35 +854,35 @@ class _AllpaymentrequesitionlistsbymodesState
dropdownSearchData:
DropdownSearchData
(
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
50
,
searchInnerWidgetHeight:
50
,
searchController:
searchController:
provider
provider
.
paymentAccountSearchController
,
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
searchInnerWidget:
Padding
(
padding:
const
EdgeInsets
.
all
(
8
),
padding:
const
EdgeInsets
.
all
(
8
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller:
provider
provider
.
paymentAccountSearchController
,
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
isDense:
true
,
contentPadding:
contentPadding:
const
EdgeInsets
.
symmetric
(
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
8
,
vertical:
8
,
),
),
hintText:
'Search account...'
,
hintText:
'Search account...'
,
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderRadius:
borderRadius:
BorderRadius
.
circular
(
8
),
BorderRadius
.
circular
(
8
),
),
),
),
),
),
),
),
),
searchMatchFn:
(
item
,
searchValue
)
{
searchMatchFn:
(
item
,
searchValue
)
{
return
item
.
value
?.
name
return
item
.
value
?.
name
?.
toLowerCase
()
?.
toLowerCase
()
.
contains
(
.
contains
(
searchValue
.
toLowerCase
(),
searchValue
.
toLowerCase
(),
)
??
)
??
false
;
false
;
},
},
...
@@ -855,9 +897,9 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -855,9 +897,9 @@ class _AllpaymentrequesitionlistsbymodesState
buttonStyleData:
ddtheme
.
buttonStyleData
,
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
ddtheme
.
dropdownStyleData
,
),
),
),
),
],
],
...
@@ -865,15 +907,16 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -865,15 +907,16 @@ class _AllpaymentrequesitionlistsbymodesState
),
),
InkWell
(
InkWell
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
provider
provider
.
paymentrequisitionApproveSubmitAPIFunction
(
.
paymentrequisitionApproveSubmitAPIFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
paymentID
,
paymentID
,
provider
.
approvedAmount
.
text
,
provider
.
approvedAmount
.
text
,
remarks
.
text
,
remarks
.
text
,
provider
.
selectedID
,
provider
.
selectedID
,
);
);
},
},
child:
Container
(
child:
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
...
@@ -916,13 +959,22 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -916,13 +959,22 @@ class _AllpaymentrequesitionlistsbymodesState
context
,
context
,
listen:
false
,
listen:
false
,
);
);
final
detailsprov
=
Provider
.
of
<
Requesitionlidtdetailsprovider
>(
context
,
listen:
false
);
final
detailsprov
=
Provider
.
of
<
Requesitionlidtdetailsprovider
>(
context
,
listen:
false
,
);
detailsprov
.
resetAll
();
detailsprov
.
resetAll
();
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
});
});
}
,
);
});
}
}
Future
<
void
>
_showLevelRejectionSheet
(
BuildContext
context
,
paymentID
)
{
Future
<
void
>
_showLevelRejectionSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
...
@@ -980,7 +1032,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -980,7 +1032,7 @@ class _AllpaymentrequesitionlistsbymodesState
context
,
context
,
provider
.
requestedAmount
,
provider
.
requestedAmount
,
"Requested Amount"
,
"Requested Amount"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerWidget
(
textControllerWidget
(
...
@@ -988,7 +1040,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -988,7 +1040,7 @@ class _AllpaymentrequesitionlistsbymodesState
remarks
,
remarks
,
"Remarks"
,
"Remarks"
,
"Enter Remarks"
,
"Enter Remarks"
,
(
p0
)
{},
(
p0
)
{},
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
...
@@ -999,13 +1051,14 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -999,13 +1051,14 @@ class _AllpaymentrequesitionlistsbymodesState
errorWidget
(
context
,
provider
.
remarksError
),
errorWidget
(
context
,
provider
.
remarksError
),
InkWell
(
InkWell
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
provider
provider
.
paymentrequisitionRejectSubmitAPIFunction
(
.
paymentrequisitionRejectSubmitAPIFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
paymentID
,
paymentID
,
remarks
.
text
,
remarks
.
text
,
);
);
},
},
child:
Container
(
child:
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
...
@@ -1044,18 +1097,26 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1044,18 +1097,26 @@ class _AllpaymentrequesitionlistsbymodesState
).
whenComplete
(()
{
).
whenComplete
(()
{
print
(
"closing Sheet"
);
print
(
"closing Sheet"
);
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
context
,
listen:
false
,
listen:
false
,
);
);
final
detailsprov
=
Provider
.
of
<
Requesitionlidtdetailsprovider
>(
context
,
listen:
false
);
final
detailsprov
=
Provider
.
of
<
Requesitionlidtdetailsprovider
>(
context
,
listen:
false
,
);
detailsprov
.
resetAll
();
detailsprov
.
resetAll
();
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
});
});
}
,
);
});
}
}
Future
<
void
>
_showAddPaymentSheet
(
BuildContext
context
,
paymentID
)
{
Future
<
void
>
_showAddPaymentSheet
(
BuildContext
context
,
paymentID
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
...
@@ -1095,7 +1156,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1095,7 +1156,7 @@ class _AllpaymentrequesitionlistsbymodesState
child:
Padding
(
child:
Padding
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
bottom:
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
),
child:
Column
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
...
@@ -1105,7 +1166,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1105,7 +1166,7 @@ class _AllpaymentrequesitionlistsbymodesState
Expanded
(
Expanded
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
start
,
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
children:
[
Align
(
Align
(
...
@@ -1122,7 +1183,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1122,7 +1183,7 @@ class _AllpaymentrequesitionlistsbymodesState
context
,
context
,
provider
.
proposedPaymentAccount
,
provider
.
proposedPaymentAccount
,
"Enter Proposed Payment Account"
,
"Enter Proposed Payment Account"
,
(
p0
)
{},
(
p0
)
{},
),
),
TextWidget
(
TextWidget
(
context
,
context
,
...
@@ -1133,7 +1194,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1133,7 +1194,7 @@ class _AllpaymentrequesitionlistsbymodesState
children:
[
children:
[
Expanded
(
Expanded
(
child:
DropdownButton2
<
child:
DropdownButton2
<
PaymentAccounts
PaymentAccounts
>(
>(
isExpanded:
true
,
isExpanded:
true
,
hint:
Text
(
hint:
Text
(
...
@@ -1142,41 +1203,41 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1142,41 +1203,41 @@ class _AllpaymentrequesitionlistsbymodesState
fontSize:
14
,
fontSize:
14
,
),
),
overflow:
overflow:
TextOverflow
.
ellipsis
,
),
items:
provider
.
paymentsAccounts
.
map
(
(
paymenents
,
)
=>
DropdownMenuItem
<
PaymentAccounts
>(
value:
paymenents
,
child:
Text
(
paymenents
.
name
??
''
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
TextOverflow
.
ellipsis
,
.
ellipsis
,
),
),
),
items:
)
provider
.
toList
(),
.
paymentsAccounts
.
map
(
(
paymenents
,
)
=>
DropdownMenuItem
<
PaymentAccounts
>(
value:
paymenents
,
child:
Text
(
paymenents
.
name
??
''
,
style:
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
value:
provider
provider
.
selectedPaymentAccounts
,
.
selectedPaymentAccounts
,
onChanged:
(
onChanged:
(
PaymentAccounts
?
value
,
PaymentAccounts
?
value
,
)
{
)
{
if
(
value
!=
null
&&
if
(
value
!=
null
&&
provider
provider
.
paymentsAccounts
.
paymentsAccounts
...
@@ -1185,9 +1246,9 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1185,9 +1246,9 @@ class _AllpaymentrequesitionlistsbymodesState
provider
.
selectedPaymentAccounts
=
provider
.
selectedPaymentAccounts
=
value
;
value
;
provider
.
selectedID
=
provider
.
selectedID
=
value
.
id
!;
value
.
id
!;
provider
.
selectedValue
=
provider
.
selectedValue
=
value
.
name
!;
value
.
name
!;
print
(
print
(
"Selected Account:
${value.name}
, ID:
${value.id}
"
,
"Selected Account:
${value.name}
, ID:
${value.id}
"
,
);
);
...
@@ -1196,56 +1257,56 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1196,56 +1257,56 @@ class _AllpaymentrequesitionlistsbymodesState
},
},
dropdownSearchData:
DropdownSearchData
(
dropdownSearchData:
DropdownSearchData
(
searchInnerWidgetHeight:
searchInnerWidgetHeight:
50
,
50
,
searchController:
searchController:
provider
provider
.
paymentAccountSearchController
,
.
paymentAccountSearchController
,
searchInnerWidget:
Padding
(
searchInnerWidget:
Padding
(
padding:
padding:
const
EdgeInsets
.
all
(
const
EdgeInsets
.
all
(
8
,
8
,
),
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller:
provider
provider
.
paymentAccountSearchController
,
.
paymentAccountSearchController
,
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
isDense:
true
,
contentPadding:
contentPadding:
EdgeInsets
.
symmetric
(
EdgeInsets
.
symmetric
(
horizontal:
horizontal:
10
,
10
,
vertical:
8
,
vertical:
8
,
),
),
hintText:
hintText:
'Search account...'
,
'Search account...'
,
border:
OutlineInputBorder
(
border:
OutlineInputBorder
(
borderRadius:
borderRadius:
BorderRadius
.
circular
(
BorderRadius
.
circular
(
8
,
8
,
),
),
),
),
),
),
),
),
),
),
searchMatchFn:
(
searchMatchFn:
(
item
,
item
,
searchValue
,
searchValue
,
)
{
)
{
return
item
return
item
.
value
.
value
?.
name
?.
name
?.
toLowerCase
()
?.
toLowerCase
()
.
contains
(
.
contains
(
searchValue
searchValue
.
toLowerCase
(),
.
toLowerCase
(),
)
??
)
??
false
;
false
;
},
},
),
),
onMenuStateChange:
(
onMenuStateChange:
(
isOpen
,
isOpen
,
)
{
)
{
if
(!
isOpen
)
{
if
(!
isOpen
)
{
provider
provider
.
paymentAccountSearchController
.
paymentAccountSearchController
...
@@ -1253,16 +1314,16 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1253,16 +1314,16 @@ class _AllpaymentrequesitionlistsbymodesState
}
}
},
},
buttonStyleData:
buttonStyleData:
ddtheme
ddtheme
.
buttonStyleData
,
.
buttonStyleData
,
iconStyleData:
iconStyleData:
ddtheme
.
iconStyleData
,
ddtheme
.
iconStyleData
,
menuItemStyleData:
menuItemStyleData:
ddtheme
ddtheme
.
menuItemStyleData
,
.
menuItemStyleData
,
dropdownStyleData:
dropdownStyleData:
ddtheme
ddtheme
.
dropdownStyleData
,
.
dropdownStyleData
,
),
),
),
),
],
],
...
@@ -1272,29 +1333,29 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1272,29 +1333,29 @@ class _AllpaymentrequesitionlistsbymodesState
context
,
context
,
provider
.
approvedAmountReadonly
,
provider
.
approvedAmountReadonly
,
"Approved Amount"
,
"Approved Amount"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerWidget
(
textControllerWidget
(
context
,
context
,
provider
.
approvedAmount
,
provider
.
approvedAmount
,
"Payment Amount"
,
"Payment Amount"
,
"Enter Payment Amount"
,
"Enter Payment Amount"
,
(
p0
)
{
(
p0
)
{
if
(
numberFormat
.
parse
(
if
(
numberFormat
.
parse
(
provider
provider
.
approvedAmountReadonly
.
approvedAmountReadonly
.
text
,
.
text
,
)
<
)
<
numberFormat
.
parse
(
numberFormat
.
parse
(
provider
provider
.
approvedAmount
.
approvedAmount
.
text
,
.
text
,
))
{
))
{
provider
.
proposedAmountError
=
provider
.
proposedAmountError
=
"Amount should not be greater than Approved amount"
;
"Amount should not be greater than Approved amount"
;
}
else
{
}
else
{
provider
.
proposedAmountError
=
provider
.
proposedAmountError
=
""
;
""
;
}
}
},
},
TextInputType
.
numberWithOptions
(),
TextInputType
.
numberWithOptions
(),
...
@@ -1310,7 +1371,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1310,7 +1371,7 @@ class _AllpaymentrequesitionlistsbymodesState
paymentReferenceNumber
,
paymentReferenceNumber
,
"Enter Payment Reference Number"
,
"Enter Payment Reference Number"
,
"Payment Reference Number"
,
"Payment Reference Number"
,
(
p0
)
{},
(
p0
)
{},
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
...
@@ -1323,7 +1384,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1323,7 +1384,7 @@ class _AllpaymentrequesitionlistsbymodesState
remarks
,
remarks
,
"Remarks"
,
"Remarks"
,
"Enter Remarks"
,
"Enter Remarks"
,
(
p0
)
{},
(
p0
)
{},
TextInputType
.
text
,
TextInputType
.
text
,
false
,
false
,
null
,
null
,
...
@@ -1333,6 +1394,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1333,6 +1394,7 @@ class _AllpaymentrequesitionlistsbymodesState
),
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
_showAttachmentSheet
(
context
);
_showAttachmentSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
...
@@ -1341,13 +1403,13 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1341,13 +1403,13 @@ class _AllpaymentrequesitionlistsbymodesState
),
),
height:
45
,
height:
45
,
width:
width:
MediaQuery
.
of
(
MediaQuery
.
of
(
context
,
context
,
).
size
.
width
,
).
size
.
width
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
Color
(
0xFFE6F6FF
),
borderRadius:
borderRadius:
BorderRadius
.
circular
(
12
),
BorderRadius
.
circular
(
12
),
border:
Border
.
all
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
width:
0.5
,
width:
0.5
,
...
@@ -1358,7 +1420,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1358,7 +1420,7 @@ class _AllpaymentrequesitionlistsbymodesState
"Add Attachment"
,
"Add Attachment"
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
fontFamily:
"JakartaMedium"
,
"JakartaMedium"
,
color:
AppColors
.
app_blue
,
color:
AppColors
.
app_blue
,
),
),
),
),
...
@@ -1369,34 +1431,35 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1369,34 +1431,35 @@ class _AllpaymentrequesitionlistsbymodesState
provider
.
imagePath
!=
null
)
...[
provider
.
imagePath
!=
null
)
...[
Padding
(
Padding
(
padding:
padding:
const
EdgeInsets
.
symmetric
(
const
EdgeInsets
.
symmetric
(
vertical:
4.0
,
vertical:
4.0
,
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
MainAxisAlignment
.
spaceBetween
,
.
spaceBetween
,
children:
[
children:
[
Text
(
Text
(
"
${provider.imagePath}
"
,
"
${provider.imagePath}
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
color:
AppColors
AppColors
.
semi_black
,
.
semi_black
,
fontSize:
11
,
fontSize:
11
,
fontWeight:
fontWeight:
FontWeight
.
w600
,
FontWeight
.
w600
,
),
),
),
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
setState
(()
{
setState
(()
{
provider
.
imagePicked
=
provider
.
imagePicked
=
0
;
0
;
provider
.
imagePath
=
provider
.
imagePath
=
null
;
null
;
provider
.
imageFilePath
=
provider
.
imageFilePath
=
null
;
null
;
});
});
},
},
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
...
@@ -1413,73 +1476,73 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1413,73 +1476,73 @@ class _AllpaymentrequesitionlistsbymodesState
context
,
context
,
provider
.
accountName
,
provider
.
accountName
,
"Enter Account Name"
,
"Enter Account Name"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
branch
,
provider
.
branch
,
"Enter Branch Name"
,
"Enter Branch Name"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
requestingPurpose
,
provider
.
requestingPurpose
,
"Enter Requesting Purpose"
,
"Enter Requesting Purpose"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
description
,
provider
.
description
,
"Enter Description"
,
"Enter Description"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
amount
,
provider
.
amount
,
"Enter Amount"
,
"Enter Amount"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
paymentMode
,
provider
.
paymentMode
,
"Enter Payment Mode"
,
"Enter Payment Mode"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
bankHolderName
,
provider
.
bankHolderName
,
"Bank Account Holder Name"
,
"Bank Account Holder Name"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
bankAccountNumber
,
provider
.
bankAccountNumber
,
"Bank Account Number"
,
"Bank Account Number"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
bankName
,
provider
.
bankName
,
"Bank Name"
,
"Bank Name"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
bankBranchName
,
provider
.
bankBranchName
,
"Bank Branch Name"
,
"Bank Branch Name"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
bankIfscCode
,
provider
.
bankIfscCode
,
"Bank IFSC Code"
,
"Bank IFSC Code"
,
(
p0
)
{},
(
p0
)
{},
),
),
textControllerReadonlyWidget
(
textControllerReadonlyWidget
(
context
,
context
,
provider
.
bankUpiID
,
provider
.
bankUpiID
,
"Bank UPI ID"
,
"Bank UPI ID"
,
(
p0
)
{},
(
p0
)
{},
),
),
],
],
),
),
...
@@ -1501,17 +1564,18 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1501,17 +1564,18 @@ class _AllpaymentrequesitionlistsbymodesState
),
),
child:
InkWell
(
child:
InkWell
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
provider
provider
.
paymentrequisitionProcessSubmitAPIFunction
(
.
paymentrequisitionProcessSubmitAPIFunction
(
context
,
context
,
widget
.
mode
,
widget
.
mode
,
paymentReferenceNumber
.
text
,
paymentReferenceNumber
.
text
,
provider
.
approvedAmount
.
text
,
provider
.
approvedAmount
.
text
,
paymentID
,
paymentID
,
provider
.
selectedID
,
provider
.
selectedID
,
remarks
.
text
,
remarks
.
text
,
provider
.
imagePath
,
provider
.
imagePath
,
);
);
},
},
child:
Container
(
child:
Container
(
height:
45
,
height:
45
,
...
@@ -1541,18 +1605,26 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1541,18 +1605,26 @@ class _AllpaymentrequesitionlistsbymodesState
).
whenComplete
(()
{
).
whenComplete
(()
{
print
(
"closing Sheet"
);
print
(
"closing Sheet"
);
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
var
provider
=
Provider
.
of
<
Requestionlistprovider
>(
context
,
context
,
listen:
false
,
listen:
false
,
);
);
final
detailsprov
=
Provider
.
of
<
Requesitionlidtdetailsprovider
>(
context
,
listen:
false
);
final
detailsprov
=
Provider
.
of
<
Requesitionlidtdetailsprovider
>(
detailsprov
.
resetAll
();
context
,
listen:
false
,
);
detailsprov
.
resetAll
();
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
});
});
}
,
);
});
}
}
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
useSafeArea:
true
,
useSafeArea:
true
,
...
@@ -1571,9 +1643,9 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1571,9 +1643,9 @@ class _AllpaymentrequesitionlistsbymodesState
return
Padding
(
return
Padding
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
bottom:
bottom:
MediaQuery
.
of
(
MediaQuery
.
of
(
context
,
context
,
).
viewInsets
.
bottom
,
// This handles keyboard
).
viewInsets
.
bottom
,
// This handles keyboard
),
),
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
margin:
EdgeInsets
.
only
(
...
@@ -1601,6 +1673,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1601,6 +1673,7 @@ class _AllpaymentrequesitionlistsbymodesState
SizedBox
(
height:
15
),
SizedBox
(
height:
15
),
InkWell
(
InkWell
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
of
(
context
).
pop
(
false
);
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromGallery
(
context
);
provider
.
imgFromGallery
(
context
);
},
},
...
@@ -1612,6 +1685,7 @@ class _AllpaymentrequesitionlistsbymodesState
...
@@ -1612,6 +1685,7 @@ class _AllpaymentrequesitionlistsbymodesState
SizedBox
(
height:
10
),
SizedBox
(
height:
10
),
InkWell
(
InkWell
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
Navigator
.
of
(
context
).
pop
(
false
);
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
imgFromCamera
(
context
);
provider
.
imgFromCamera
(
context
);
},
},
...
...
lib/screens/finance/PaymentRequestionListDetails.dart
View file @
55280429
...
@@ -335,7 +335,9 @@ class _PaymentrequestionlistdetailsState
...
@@ -335,7 +335,9 @@ class _PaymentrequestionlistdetailsState
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
if
(
provider
.
Headings
[
j
]
==
"Attachment"
)
{
HapticFeedback
.
selectionClick
();
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
@@ -354,6 +356,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -354,6 +356,7 @@ class _PaymentrequestionlistdetailsState
);
);
}
else
if
(
provider
.
Headings
[
j
]
==
}
else
if
(
provider
.
Headings
[
j
]
==
"Requested Account"
)
{
"Requested Account"
)
{
HapticFeedback
.
selectionClick
();
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
@@ -428,6 +431,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -428,6 +431,7 @@ class _PaymentrequestionlistdetailsState
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
print
(
provider
.
requestsDetails
.
id
);
print
(
provider
.
requestsDetails
.
id
);
_showLevelRejectionSheet
(
_showLevelRejectionSheet
(
context
,
context
,
...
@@ -461,6 +465,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -461,6 +465,7 @@ class _PaymentrequestionlistdetailsState
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
provider
provider
.
approveRejectPaymentRequestAPIFunction
(
.
approveRejectPaymentRequestAPIFunction
(
context
,
context
,
...
@@ -495,6 +500,7 @@ class _PaymentrequestionlistdetailsState
...
@@ -495,6 +500,7 @@ class _PaymentrequestionlistdetailsState
Expanded
(
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
provider
provider
.
approveRejectPaymentRequestAPIFunction
(
.
approveRejectPaymentRequestAPIFunction
(
context
,
context
,
...
...
lib/screens/finance/financeDashboard.dart
View file @
55280429
...
@@ -2,6 +2,7 @@ import 'dart:io';
...
@@ -2,6 +2,7 @@ import 'dart:io';
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'
;
import
'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/commonProvider/accountsListProvider.dart'
;
import
'package:generp/Notifiers/commonProvider/accountsListProvider.dart'
;
...
@@ -94,7 +95,10 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -94,7 +95,10 @@ class _FinancedashboardState extends State<Financedashboard> {
"assets/svg/finance/fin_accounts_ic.svg"
,
//"
"assets/svg/finance/fin_accounts_ic.svg"
,
//"
];
];
final
paymentInitiationNames
=
[
"Self"
,
"Account List"
];
final
paymentInitiationNames
=
[
"Self"
,
"Account List"
];
final
paymentInitiationSubtitles
=
[
"Payment Requests"
,
"Transactions Details"
];
final
paymentInitiationSubtitles
=
[
"Payment Requests"
,
"Transactions Details"
,
];
final
paymentInitiationRoles
=
[
668
,
293
];
final
paymentInitiationRoles
=
[
668
,
293
];
final
paymentAdministrationIcons
=
[
final
paymentAdministrationIcons
=
[
...
@@ -118,9 +122,11 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -118,9 +122,11 @@ class _FinancedashboardState extends State<Financedashboard> {
// "Ledgers, transactions, finance",
// "Ledgers, transactions, finance",
"Payment Requests"
,
"Payment Requests"
,
];
];
final
paymentAdministrationRoles
=
[
666
,
678
,
673
,
final
paymentAdministrationRoles
=
[
666
,
678
,
673
,
// 675,
// 675,
667
];
667
,
];
// Extract role IDs from accessible pages
// Extract role IDs from accessible pages
final
roles
=
provider
.
accessiblePagesList
.
map
((
e
)
=>
e
.
id
).
toList
();
final
roles
=
provider
.
accessiblePagesList
.
map
((
e
)
=>
e
.
id
).
toList
();
...
@@ -163,7 +169,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -163,7 +169,7 @@ class _FinancedashboardState extends State<Financedashboard> {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbarNew
(
context
,
"Finance"
,
0xFFCEEDFF
),
appBar:
appbarNew
(
context
,
"Finance"
,
0xFFCEEDFF
),
body:
SizedBox
(
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
...
@@ -171,15 +177,21 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -171,15 +177,21 @@ class _FinancedashboardState extends State<Financedashboard> {
Container
(
Container
(
height:
200
,
height:
200
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
AssetImage
(
image:
DecorationImage
(
image:
AssetImage
(
"assets/svg/finance/main_dashboard.png"
,
"assets/svg/finance/main_dashboard.png"
,
),
fit:
BoxFit
.
contain
,),
),
gradient:
LinearGradient
(
colors:
[
fit:
BoxFit
.
contain
,
),
gradient:
LinearGradient
(
colors:
[
Color
(
0xFFCEEDFF
),
Color
(
0xFFCEEDFF
),
AppColors
.
scaffold_bg_color
AppColors
.
scaffold_bg_color
,
],
begin:
Alignment
.
topCenter
,
end:
Alignment
.
bottomCenter
)
],
begin:
Alignment
.
topCenter
,
end:
Alignment
.
bottomCenter
,
),
),
),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
...
@@ -215,6 +227,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -215,6 +227,7 @@ class _FinancedashboardState extends State<Financedashboard> {
return
Expanded
(
return
Expanded
(
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
navigate
;
var
navigate
;
navigate
=
Allpaymentrequesitionlistsbymodes
(
navigate
=
Allpaymentrequesitionlistsbymodes
(
mode:
approvalModes
[
co
],
mode:
approvalModes
[
co
],
...
@@ -293,6 +306,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -293,6 +306,7 @@ class _FinancedashboardState extends State<Financedashboard> {
itemBuilder:
(
context
,
ini
)
{
itemBuilder:
(
context
,
ini
)
{
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
navigate
;
var
navigate
;
if
(
ini
==
0
)
{
if
(
ini
==
0
)
{
navigate
=
await
Navigator
.
push
(
navigate
=
await
Navigator
.
push
(
...
@@ -406,6 +420,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -406,6 +420,7 @@ class _FinancedashboardState extends State<Financedashboard> {
itemBuilder:
(
context
,
ad
)
{
itemBuilder:
(
context
,
ad
)
{
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
navigate
;
var
navigate
;
if
(
ad
==
0
)
{
if
(
ad
==
0
)
{
navigate
=
await
Navigator
.
push
(
navigate
=
await
Navigator
.
push
(
...
@@ -483,8 +498,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -483,8 +498,7 @@ class _FinancedashboardState extends State<Financedashboard> {
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
child:
Row
(
child:
Row
(
mainAxisAlignment:
mainAxisAlignment:
MainAxisAlignment
.
center
,
MainAxisAlignment
.
center
,
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
center
,
CrossAxisAlignment
.
center
,
children:
[
children:
[
...
@@ -535,7 +549,8 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -535,7 +549,8 @@ class _FinancedashboardState extends State<Financedashboard> {
},
},
),
),
],
],
SizedBox
(
height:
100
,),
SizedBox
(
height:
100
),
// ListView.builder(
// ListView.builder(
// itemCount: pages.length,
// itemCount: pages.length,
// shrinkWrap: true,
// shrinkWrap: true,
...
@@ -653,7 +668,6 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -653,7 +668,6 @@ class _FinancedashboardState extends State<Financedashboard> {
// );
// );
// },
// },
// ),
// ),
],
],
),
),
),
),
...
@@ -665,6 +679,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -665,6 +679,7 @@ class _FinancedashboardState extends State<Financedashboard> {
FloatingActionButtonLocation
.
centerFloat
,
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkResponse
(
floatingActionButton:
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
_showPaymentOptionsSheet
(
context
);
_showPaymentOptionsSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
...
@@ -752,6 +767,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -752,6 +767,7 @@ class _FinancedashboardState extends State<Financedashboard> {
];
];
return
ListTile
(
return
ListTile
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
;
var
res
;
if
(
provider
if
(
provider
.
accessiblePagesList2
[
index
]
.
accessiblePagesList2
[
index
]
...
@@ -856,9 +872,7 @@ class _FinancedashboardState extends State<Financedashboard> {
...
@@ -856,9 +872,7 @@ class _FinancedashboardState extends State<Financedashboard> {
}
}
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
},
},
leading:
SvgPicture
.
asset
(
leading:
SvgPicture
.
asset
(
icons
[
index
]),
icons
[
index
],
),
title:
Text
(
title:
Text
(
"
${pages2[index].pageName}
"
,
"
${pages2[index].pageName}
"
,
style:
TextStyle
(
style:
TextStyle
(
...
...
lib/screens/finance/paymentListPaymentRequisition.dart
View file @
55280429
...
@@ -3,6 +3,7 @@ import 'dart:io';
...
@@ -3,6 +3,7 @@ import 'dart:io';
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
import
'package:generp/screens/finance/paymentDetailsPaymentRequisition.dart'
;
import
'package:generp/screens/finance/paymentDetailsPaymentRequisition.dart'
;
...
@@ -109,6 +110,7 @@ class _PaymentlistpaymentrequisitionState
...
@@ -109,6 +110,7 @@ class _PaymentlistpaymentrequisitionState
// ),
// ),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
cf
=
Commondaterangefilter
();
var
cf
=
Commondaterangefilter
();
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
if
(
result
!=
null
)
{
if
(
result
!=
null
)
{
...
@@ -164,6 +166,7 @@ class _PaymentlistpaymentrequisitionState
...
@@ -164,6 +166,7 @@ class _PaymentlistpaymentrequisitionState
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
var
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
@@ -334,6 +337,7 @@ class _PaymentlistpaymentrequisitionState
...
@@ -334,6 +337,7 @@ class _PaymentlistpaymentrequisitionState
];
];
return
ListTile
(
return
ListTile
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
provider
.
copyToClipboard
(
context
);
provider
.
copyToClipboard
(
context
);
...
...
lib/screens/finance/paymentreceiptList.dart
View file @
55280429
...
@@ -3,6 +3,7 @@ import 'dart:io';
...
@@ -3,6 +3,7 @@ import 'dart:io';
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
import
'package:generp/Utils/GlobalConstants.dart'
;
import
'package:generp/screens/finance/paymentReceiptDetails.dart'
;
import
'package:generp/screens/finance/paymentReceiptDetails.dart'
;
...
@@ -93,6 +94,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
...
@@ -93,6 +94,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
// ),
// ),
InkResponse
(
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
cf
=
Commondaterangefilter
();
var
cf
=
Commondaterangefilter
();
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
var
result
=
await
cf
.
showFilterBottomSheet
(
context
);
if
(
result
!=
null
)
{
if
(
result
!=
null
)
{
...
@@ -124,7 +126,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
...
@@ -124,7 +126,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
),
),
],
],
),
),
0xFFFFFFFF
0xFFFFFFFF
,
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
body:
...
@@ -146,22 +148,22 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
...
@@ -146,22 +148,22 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
InkResponse
(
return
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
var
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
Paymentreceiptdetails
(
(
context
)
=>
Paymentreceiptdetails
(
pageName:
widget
.
pageTitleName
,
pageName:
widget
.
pageTitleName
,
paymentRequestId:
paymentRequestId:
requestLists
[
index
].
id
,
requestLists
[
index
].
id
,
),
),
settings:
RouteSettings
(
settings:
RouteSettings
(
name:
"Paymentreceiptdetails"
,
name:
"Paymentreceiptdetails"
,
),
),
),
),
);
);
if
(
routeSettingName
==
if
(
routeSettingName
==
"Paymentreceiptdetails"
)
{
"Paymentreceiptdetails"
)
{
debugPrint
(
"prd"
);
debugPrint
(
"prd"
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
provider
.
paymentsListAPI
(
context
,
''
,
''
);
}
}
...
@@ -194,7 +196,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
...
@@ -194,7 +196,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
padding:
EdgeInsets
.
all
(
3.0
),
padding:
EdgeInsets
.
all
(
3.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
requested_bg_color
,
color:
AppColors
.
requested_bg_color
,
shape:
BoxShape
.
circle
shape:
BoxShape
.
circle
,
),
),
child:
SvgPicture
.
asset
(
child:
SvgPicture
.
asset
(
"assets/svg/finance/rupee_ic.svg"
,
"assets/svg/finance/rupee_ic.svg"
,
...
@@ -311,6 +313,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
...
@@ -311,6 +313,7 @@ class _PaymentreceiptlistState extends State<Paymentreceiptlist> {
];
];
return
ListTile
(
return
ListTile
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
provider
.
copyToClipboard
(
context
);
provider
.
copyToClipboard
(
context
);
...
...
lib/screens/finance/submitPaymentRequestionListsByMode.dart
View file @
55280429
...
@@ -293,6 +293,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -293,6 +293,7 @@ class _SubmitpaymentrequestionlistsbymodeState
flex:
1
,
flex:
1
,
child:
InkResponse
(
child:
InkResponse
(
onTap:
()
async
{
onTap:
()
async
{
HapticFeedback
.
selectionClick
();
var
res
=
await
Navigator
.
push
(
var
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
...
@@ -574,6 +575,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -574,6 +575,7 @@ class _SubmitpaymentrequestionlistsbymodeState
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
HapticFeedback
.
selectionClick
();
_showAttachmentSheet
(
context
);
_showAttachmentSheet
(
context
);
},
},
child:
Container
(
child:
Container
(
...
@@ -759,6 +761,7 @@ class _SubmitpaymentrequestionlistsbymodeState
...
@@ -759,6 +761,7 @@ class _SubmitpaymentrequestionlistsbymodeState
provider
.
submitClicked
provider
.
submitClicked
?
null
?
null
:
()
{
:
()
{
HapticFeedback
.
selectionClick
();
provider
.
submitClicked
=
true
;
provider
.
submitClicked
=
true
;
provider
.
addPaymentRequestionSubmitAPI
(
provider
.
addPaymentRequestionSubmitAPI
(
...
...
pubspec.yaml
View file @
55280429
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.9
8
+10
6
version
:
1.0.9
9
+10
7
environment
:
environment
:
sdk
:
^3.7.2
sdk
:
^3.7.2
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment