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
2ccf19cc
Commit
2ccf19cc
authored
Jul 04, 2025
by
Sai Srinivas
Browse files
04-07-2025 By Sai Srinivas
Test cases and Order Module, Crm Module.
parent
4b790bef
Changes
94
Show whitespace changes
Inline
Side-by-side
lib/screens/order/addTpcAgent.dart
View file @
2ccf19cc
...
...
@@ -66,6 +66,7 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
textControllerWidget
(
context
,
provider
.
tpcNameController
,
"Name"
,
"Enter Name"
,
provider
.
onChangetpcName
,
TextInputType
.
text
,
...
...
@@ -82,6 +83,7 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
textControllerWidget
(
context
,
provider
.
tpcMobileNumberController
,
"Mobile Number"
,
"Enter Mobile Number"
,
provider
.
onChangetpcMobileNumber
,
TextInputType
.
number
,
...
...
@@ -160,6 +162,7 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
textControllerWidget
(
context
,
provider
.
tpcBankNameController
,
"Bank Name"
,
"Enter Bank Name"
,
provider
.
onChangetpcBankName
,
TextInputType
.
text
,
...
...
@@ -174,6 +177,7 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
textControllerWidget
(
context
,
provider
.
tpcBankBeneficiaryNameController
,
"Bank Beneficiary Name"
,
"Enter Bank Beneficiary Name"
,
provider
.
onChangetpcBankBeneficiaryName
,
TextInputType
.
text
,
...
...
@@ -191,6 +195,7 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
textControllerWidget
(
context
,
provider
.
tpcBankAccountNumberController
,
"Bank Account Number"
,
"Enter Bank Account Number"
,
provider
.
onChangetpcBankAccountNumber
,
TextInputType
.
number
,
...
...
@@ -208,6 +213,7 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
textControllerWidget
(
context
,
provider
.
tpcBankIFSCController
,
"Bank IFSC"
,
"Enter Bank IFSC"
,
provider
.
onChangetpcBankIFSC
,
TextInputType
.
text
,
...
...
@@ -223,6 +229,7 @@ class _AddtpcagentScreenState extends State<AddtpcagentScreen> {
textControllerWidget
(
context
,
provider
.
tpcNoteController
,
"Description"
,
"Enter Description"
,
provider
.
onChangetpcNote
,
TextInputType
.
text
,
...
...
lib/screens/order/editAdjustedOrderList.dart
View file @
2ccf19cc
...
...
@@ -298,6 +298,7 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
context
,
editProvider
.
editOrderAmountControllers
[
index
],
"Order Amount"
,
"Enter Order Amount"
,
(
p0
)
{},
TextInputType
.
number
,
...
...
@@ -486,6 +487,7 @@ class _EditadjustedorderlistState extends State<Editadjustedorderlist> {
context
,
editProvider
.
editOrderAmountControllers2
[
j
],
"Order Amount"
,
"Enter Order Amount"
,
(
p0
)
{},
TextInputType
.
number
,
...
...
lib/screens/order/editOrderAccountDetails.dart
View file @
2ccf19cc
...
...
@@ -34,6 +34,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Editorderprovider
>(
context
,
listen:
false
);
provider
.
ordersEditOrderAPIViewFunction
(
context
,
widget
.
orderID
);
});
}
...
...
@@ -109,7 +110,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
value
!.
name
!;
if
(
provider
.
dispatchDistricts
.
isNotEmpty
)
{
provider
.
dispatchDistricts
.
clear
();
provider
.
selectedDispatchDistricts
=
null
;
//
provider.selectedDispatchDistricts = null;
provider
.
selectedDispatchDistrictId
=
null
;
provider
.
selectedDispatchDistrictValue
=
""
;
}
...
...
@@ -167,8 +168,8 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
.
dispatchSubLocations
.
isNotEmpty
)
{
provider
.
dispatchSubLocations
.
clear
();
provider
.
selectedDispatchSubLocations
=
null
;
//
provider.selectedDispatchSubLocations =
//
null;
provider
.
selectedDispatchSubLocID
=
null
;
provider
.
selectedDispatchSubLocValue
=
""
;
}
...
...
@@ -235,6 +236,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
context
,
provider
.
dispatchAddressController
,
"Dispatch Address"
,
"Enter Dispatch Address"
,
provider
.
onChangedDispatchAddress
,
TextInputType
.
text
,
false
,
...
...
@@ -247,6 +249,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
context
,
provider
.
dispatchPincodeController
,
"Dispatch Pin code"
,
"Enter Dispatch Pin code"
,
provider
.
onChangedDispatchPincode
,
TextInputType
.
number
,
false
,
...
...
@@ -257,6 +260,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
textControllerWidget
(
context
,
provider
.
noteController
,
"Note"
,
"Enter Note"
,
provider
.
onChangedNote
,
TextInputType
.
text
,
...
...
@@ -392,7 +396,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
),
)
.
toList
(),
value:
provider
.
selectedFreightScope
,
value:
provider
.
selectedFreightScope
,
onChanged:
(
String
?
value
)
{
if
(
provider
.
freightScope
.
isNotEmpty
)
{
provider
.
selectedFreightScope
=
value
;
...
...
@@ -469,7 +473,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
),
)
.
toList
(),
value:
provider
.
selectedErectionScope
,
value:
provider
.
selectedErectionScope
,
onChanged:
(
String
?
value
)
{
if
(
provider
.
erectionScope
.
isNotEmpty
)
{
provider
.
selectedErectionScope
=
value
;
...
...
@@ -513,7 +517,7 @@ class _EditorderaccountdetailsState extends State<Editorderaccountdetails> {
provider
.
submitClicked
?
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blu
e
,
AppColors
.
whit
e
,
),
)
:
Text
(
...
...
lib/screens/order/editPaymentDetailsByMode.dart
View file @
2ccf19cc
...
...
@@ -160,6 +160,7 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
context
,
provider
.
amountController
,
"Amount"
,
"Enter Amount"
,
provider
.
onChangeAmount
,
TextInputType
.
number
,
false
,
...
...
@@ -226,7 +227,8 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
textControllerWidget
(
context
,
provider
.
paymentRefController
,
"Payment Reference No. / Cheque No. / UTR No. tf"
,
"Payment Reference No."
,
"Enter Payment Reference No. / Cheque No. / UTR No."
,
provider
.
onChangepaymentRef
,
TextInputType
.
text
,
false
,
...
...
@@ -293,7 +295,7 @@ class _EditpaymentdetailsbymodeState extends State<Editpaymentdetailsbymode> {
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
bottomNavigationBar
:
InkResponse
(
floatingActionButton
:
InkResponse
(
onTap:
editProvider
.
submitLoading
?
null
...
...
lib/screens/order/orderModuleDashboard.dart
View file @
2ccf19cc
...
...
@@ -22,6 +22,7 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
provider
=
Provider
.
of
<
Pagesdashboardprovider
>(
context
,
listen:
false
);
provider
.
orderDashboardAPIFunction
(
context
,
"executive"
,
""
,
""
,
""
);
provider
.
ordersAccessiblePagesAPIFunction
(
context
);
});
}
...
...
@@ -40,6 +41,101 @@ class _OrdermoduledashboardState extends State<Ordermoduledashboard> {
child:
SingleChildScrollView
(
child:
Column
(
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
)
),
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.28
,
child:
GridView
.
builder
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
5
),
itemCount:
provider
.
ordersgain
.
length
,
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
physics:
AlwaysScrollableScrollPhysics
(),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
childAspectRatio:
0.65
),
itemBuilder:
(
context
,
jndex
)
{
final
icons
=
[
"comm_ic_1"
,
"comm_ic_2"
];
final
leadTitles
=
[
'Order Gain'
,
'Dispatched'
,
'Pending Tasks'
,
'Quote'
,
];
final
colors
=
[
0xFFE7FFE5
,
0xFFF3EDFF
,
0xFFFFFCD5
,
0xFFFFF6F0
,
];
final
textcolors
=
[
0xFF0D9C00
,
0xFF493272
,
0xFF605C00
,
0xFF91481B
,
];
return
InkResponse
(
onTap:
()
async
{
if
(
provider
.
ordersgain
[
jndex
].
filter
!.
pageName
!=
""
)
{
if
(
provider
.
ordersgain
[
jndex
].
filter
!.
pageName
!
.
contains
(
"Order List"
))
{
// await Navigator.push(
// context,
// MaterialPageRoute(
// builder:
// (context) => OrderslistbyModes(
// pageTitleName:
// provider
// .ordersgain[jndex]
// .filter!
// .pageName!,
// mode:
// provider.ordersgain[jndex].filter!.mode,
// filter: provider.ordersgain[jndex].filter!,
// ),
// ),
// );
}
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
13
),
decoration:
BoxDecoration
(
color:
Color
(
colors
[
jndex
]),
borderRadius:
BorderRadius
.
circular
(
12
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
ordersgain
[
jndex
].
count
!,
style:
TextStyle
(
fontSize:
30
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
textcolors
[
jndex
]),
),
),
Text
(
leadTitles
[
jndex
],
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
),
],
),
),
);
},
),
),
ListView
.
builder
(
itemCount:
pages
.
length
,
shrinkWrap:
true
,
...
...
lib/screens/order/ordersDetailsByModes.dart
View file @
2ccf19cc
...
...
@@ -41,8 +41,8 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
context
,
listen:
false
,
);
provider
.
showMoreDetails
=
false
;
var
disproved
=
Provider
.
of
<
Dispatchorderprovider
>(
context
,
listen:
false
);
disproved
.
ordersDetailsDispatchOrderViewFunction
(
context
,
widget
.
orderId
);
provider
.
ordersDetailsByModeAPIFunction
(
context
,
widget
.
orderId
,
...
...
@@ -57,12 +57,139 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
builder:
(
context
,
provider
,
disProvider
,
child
)
{
var
orderDetails
=
provider
.
orderDetails
;
var
Headings1
=
[
"Order Number"
,
"Account Name"
,
"Sales Person Name"
,
"Order Received Date"
,
];
var
subHeadings1
=
[
provider
.
orderDetails
.
orderNumber
??
"-"
,
provider
.
orderDetails
.
accountName
??
"-"
,
provider
.
orderDetails
.
salesPersonEmpName
??
"-"
,
provider
.
orderDetails
.
orderReceivedDate
??
"-"
,
];
var
Headings2
=
[
"Billing State"
,
"Billing District"
,
"Billing Sub Location"
,
"Billing Pincode"
,
"Billing Address"
,
"Entered By"
,
"Dispatch State"
,
"Dispatch District"
,
"District Sub Location"
,
"Dispatch Pincode"
,
"Dispatch Address"
,
"GST Number"
,
"Unloading Scope"
,
"Freight Scope"
,
"Erection Scope"
,
"CGST Amount"
,
"SGST Amount"
,
"IGST Amount"
,
"OTP"
,
"Basic Amount"
,
"Paid Amount"
,
"Balance Amount"
,
"Total Amount"
,
"TPC Applicable"
,
"TPC Agent"
,
"TPC Requested Amount"
,
"TPC Level 1 Approved Amount"
,
"TPC Level 2 Approved Amount"
,
"TPC Payment Mode"
,
"TPC Payment Reference No"
,
"TPC Payment Attachment"
,
"TPC Status"
,
"Purchase Order"
,
"Created Datetime"
,
"Note"
,
"Status"
,
];
var
subHeadings2
=
[
provider
.
orderDetails
.
billingState
??
"-"
,
provider
.
orderDetails
.
billingDistrict
??
"-"
,
provider
.
orderDetails
.
billingSubLocality
??
"-"
,
provider
.
orderDetails
.
billingPincode
??
"-"
,
provider
.
orderDetails
.
billingAddress
??
"-"
,
provider
.
orderDetails
.
enteredEmpName
??
"-"
,
provider
.
orderDetails
.
stateName
??
"-"
,
provider
.
orderDetails
.
districtName
??
"-"
,
provider
.
orderDetails
.
subLocationName
??
"-"
,
provider
.
orderDetails
.
dispatchPincode
??
"-"
,
provider
.
orderDetails
.
dispatchAddress
??
"-"
,
provider
.
orderDetails
.
gstNumber
??
"-"
,
provider
.
orderDetails
.
unloadingScope
??
"-"
,
provider
.
orderDetails
.
freightScope
??
"-"
,
provider
.
orderDetails
.
erectionScope
??
"-"
,
provider
.
orderDetails
.
cgstAmount
??
"-"
,
provider
.
orderDetails
.
sgstAmount
??
"-"
,
provider
.
orderDetails
.
igstAmount
??
"-"
,
provider
.
orderDetails
.
otp
??
"-"
,
provider
.
orderDetails
.
basicAmount
??
"-"
,
provider
.
orderDetails
.
paidAmount
??
"-"
,
provider
.
orderDetails
.
balanceAmount
??
"-"
,
provider
.
orderDetails
.
totalAmount
??
"-"
,
provider
.
orderDetails
.
tpcApplicable
??
"-"
,
provider
.
orderDetails
.
tpcaAgentName
??
"-"
,
provider
.
orderDetails
.
requestedTpcAmount
??
"-"
,
provider
.
orderDetails
.
level1TpcApprovedAmount
??
"-"
,
provider
.
orderDetails
.
level2TpcApprovedAmount
??
"-"
,
provider
.
orderDetails
.
tpcPaymentMode
??
"-"
,
provider
.
orderDetails
.
tpcPaymentReferenceNo
??
"-"
,
provider
.
orderDetails
.
tpcPaymentAttachementViewFileName
??
"-"
,
provider
.
orderDetails
.
tpcStatus
??
"-"
,
provider
.
orderDetails
.
tpcPaymentAttachmentDirFilePath
??
"-"
,
provider
.
orderDetails
.
createdDatetime
??
"-"
,
provider
.
orderDetails
.
note
??
"-"
,
provider
.
orderDetails
.
status
??
"-"
,
];
var
Headings
=
[...
Headings1
];
var
subHeadings
=
[...
subHeadings1
];
if
(
provider
.
showMoreDetails
){
Headings
=
[...
Headings1
,...
Headings2
];
subHeadings
=
[...
subHeadings1
,...
subHeadings2
];
}
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
widget
.
mode
!=
""
?
"Order Details"
:
"Order Details (
${widget.mode}
)"
,
provider
.
resetAll
,
InkResponse
(
onTap:
()
{
...
...
@@ -152,7 +279,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
...
List
.
generate
(
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
...
...
@@ -160,7 +287,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
children:
[
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -171,7 +298,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
provider
.
Headings
[
j
]
==
if
(
Headings
[
j
]
==
"Purchase Order"
)
{
Navigator
.
push
(
context
,
...
...
@@ -190,23 +317,23 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
}
},
child:
Text
(
provider
.
Headings
[
j
]
==
"Purchase Order"
Headings
[
j
]
==
"Purchase Order"
?
"View"
:
"
${provider.
subHeadings[j]}
"
,
:
subHeadings
[
j
]==
""
?
"-"
:
"
${
subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
provider
.
Headings
[
j
]
==
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
Headings
[
j
]
==
"Purchase Order"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
provider
.
Headings
[
j
]
==
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
AppColors
.
white
,
...
...
@@ -218,6 +345,33 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
);
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
],
),
),
...
...
@@ -341,32 +495,33 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
),
],
if
(
widget
.
mode
==
"dispatched"
)
...[
// Expanded(
// child: InkResponse(
// onTap: () {
// disProvider.initializeForm(context);
// _showDispatchSheet(context, "Dispatch");
// },
// child: Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(8),
// color: Color(0xFFFFEFEF),
// border: Border.all(
// color: Color(0xFFED3424),
// width: 0.5,
// ),
// ),
// child: Center(
// child: Text(
// "Dispatch",
// style: TextStyle(
// color: Color(0xFFED3424),
// ),
// ),
// ),
// ),
// ),
// ),
Expanded
(
child:
InkResponse
(
onTap:
()
{
disProvider
.
initializeForm
(
context
);
disProvider
.
ordersDetailsDispatchOrderViewFunction
(
context
,
widget
.
orderId
);
_showDispatchSheet
(
context
,
"Dispatch"
);
},
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Color
(
0xFFFFEFEF
),
border:
Border
.
all
(
color:
Color
(
0xFFED3424
),
width:
0.5
,
),
),
child:
Center
(
child:
Text
(
"Dispatch"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
),
),
),
),
),
),
],
],
),
...
...
@@ -413,15 +568,15 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
children:
[
SizedBox
(
height:
15
),
...
List
.
generate
(
3
,
(
index
)
{
...
List
.
generate
(
4
,
(
index
)
{
final
assetnames
=
[
//
"crm_contact_edit",
"crm_contact_edit"
,
"order_list_svg_2"
,
"order_list_svg_3"
,
"order_list_svg_3"
,
];
final
Headingnames
=
[
//
"Edit Order",
"Edit Order"
,
"Payment History"
,
"Products Details"
,
"Feedback History"
,
...
...
@@ -840,6 +995,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
textControllerWidget
(
context
,
disProvider
.
invoiceNumberController
,
"Invoice Number"
,
"Enter Invoice Number"
,
disProvider
.
onChangedinvoiceNumber
,
TextInputType
.
text
,
...
...
@@ -850,6 +1006,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
textControllerWidget
(
context
,
disProvider
.
vehicleNumberController
,
"Vehicle Number"
,
"Enter Vehicle Number"
,
disProvider
.
onChangedvehicleNumber
,
TextInputType
.
text
,
...
...
@@ -860,6 +1017,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
textControllerWidget
(
context
,
disProvider
.
driverNameController
,
"Driver Name"
,
"Enter Driver Name"
,
disProvider
.
onChangeddriverName
,
TextInputType
.
text
,
...
...
@@ -870,6 +1028,7 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
textControllerWidget
(
context
,
disProvider
.
driverMobileNumberController
,
"Driver Mobile Number"
,
"Enter Driver Mobile Number"
,
disProvider
.
onChangeddriverMobileNumber
,
TextInputType
.
text
,
...
...
@@ -974,11 +1133,18 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
textControllerWidget
(
context
,
disProvider
.
engineNumberControllers
[
j
],
"Engine Number"
,
"Enter Engine Number"
,
(
value
)
=>
disProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
(
p0
)
{
if
(
disProvider
.
engineNumberControllers
[
j
].
text
.
trim
().
isEmpty
){
disProvider
.
pdiIDControllers
[
j
].
clear
();
}
disProvider
.
updateTotalAmount
(
j
);
disProvider
.
ordersPDIIDByEngineNumberFunction
(
context
,
j
);
},
TextInputType
.
text
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
null
,
),
),
],
...
...
@@ -991,11 +1157,12 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
child:
textControllerWidget
(
context
,
disProvider
.
pdiIDControllers
[
j
],
"PDI ID"
,
"Enter PDI ID"
,
(
value
)
=>
disProvider
.
updateTotalAmount
(
j
),
TextInputType
.
number
,
fals
e
,
FilteringTextInputFormatter
.
digitsOnly
,
TextInputType
.
text
,
tru
e
,
null
,
),
),
],
...
...
@@ -1018,22 +1185,23 @@ class _OrdersdetailsbymodesState extends State<Ordersdetailsbymodes> {
provider
.
submitClicked
=
false
;
final
data
=
disProvider
.
getFormData
();
print
(
data
);
// disProvider.approvalRejectionAPIFunction(
// context,
// details.status,
// details.id,
// type == "Dispatch",
// provider.approveRejectFeedbackController.text,
// details.tpcApplicable,
// details.tpcApplicable == "Yes"
// ? (widget.mode == "level_one_approval"
// ? details.level1TpcApprovedAmount
// : details.level2TpcApprovedAmount)
// : "",
// provider.saleOrderNumberController.text,
// provider.editCompanyController.text,
// data,
// );
disProvider
.
approvalRejectionAPIFunction
(
context
,
details
.
status
,
details
.
id
,
type
==
"Dispatch"
,
provider
.
approveRejectFeedbackController
.
text
,
details
.
tpcApplicable
,
details
.
tpcApplicable
==
"Yes"
?
(
widget
.
mode
==
"level_one_approval"
?
details
.
level1TpcApprovedAmount
:
details
.
level2TpcApprovedAmount
)
:
""
,
provider
.
saleOrderNumberController
.
text
,
provider
.
editCompanyController
.
text
,
data
,
widget
.
mode
);
},
child:
Container
(
...
...
lib/screens/order/ordersListByModes.dart
View file @
2ccf19cc
...
...
@@ -14,7 +14,12 @@ import '../commonDateRangeFilter.dart';
class
OrderslistbyModes
extends
StatefulWidget
{
final
mode
;
final
pageTitleName
;
const
OrderslistbyModes
({
super
.
key
,
required
this
.
mode
,
required
this
.
pageTitleName
});
const
OrderslistbyModes
({
super
.
key
,
required
this
.
mode
,
required
this
.
pageTitleName
,
});
@override
State
<
OrderslistbyModes
>
createState
()
=>
_OrderslistbyModesState
();
...
...
@@ -33,11 +38,10 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
listen:
false
,
);
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Pagesdashboardprovider
>(
...
...
@@ -60,14 +64,17 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
onTap:
()
{
_showOptionsSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_download.svg"
,
),
child:
SvgPicture
.
asset
(
"assets/svg/ic_download.svg"
),
),
InkResponse
(
onTap:
()
async
{
_showFilterSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,),
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
25
,
),
),
],
),
...
...
@@ -75,11 +82,15 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
?
Center
(
child:
CircularProgressIndicator
.
adaptive
(
valueColor:
AlwaysStoppedAnimation
<
Color
>(
AppColors
.
app_blue
)
))
:
ordersList
.
isNotEmpty
?
SingleChildScrollView
(
AppColors
.
app_blue
,
),
),
)
:
ordersList
.
isNotEmpty
?
SingleChildScrollView
(
child:
Column
(
children:
[
ListView
.
builder
(
...
...
@@ -87,13 +98,14 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
context
,
index
)
{
if
(
ordersList
.
isEmpty
)
{
if
(
ordersList
.
isEmpty
)
{
return
SizedBox
(
child:
Center
(
child:
Text
(
"No Data Available"
),
),
);
}
if
(
ordersList
[
index
].
orderNumber
==
"GP20252605448"
)
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
...
...
@@ -136,21 +148,19 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
CrossAxisAlignment
.
start
,
children:
[
Text
(
ordersList
[
index
].
accountName
!,
ordersList
[
index
]
.
accountName
!,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹"
"
${ordersList[index].balanceAmount}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
...
...
@@ -192,17 +202,19 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
),
...
List
.
generate
(
5
,
(
j
)
{
final
headings
=
[
"Order Number"
,
"Entered Employee"
,
"Sales Person"
,
"Date"
,
//
"Date",
"Paid Amount"
,
"Balance Amount"
,
];
final
subHeadings
=
[
ordersList
[
index
].
orderNumber
,
ordersList
[
index
].
enteredEmpName
,
ordersList
[
index
].
salesPersonEmpName
,
ordersList
[
index
].
createdDatetime
,
//
ordersList[index].createdDatetime,
ordersList
[
index
].
paidAmount
,
ordersList
[
index
].
balanceAmount
,
];
...
...
@@ -226,17 +238,15 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
),
Expanded
(
child:
InkResponse
(
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
,
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
color:
Color
(
0xFF818181
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
),
),
),
...
...
@@ -247,19 +257,25 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
}),
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Ordersdetailsbymodes
(
pageTitleName:
widget
.
pageTitleName
,
pageTitleName:
widget
.
pageTitleName
,
orderId:
ordersList
[
index
].
orderId
,
ordersList
[
index
]
.
orderId
,
mode:
widget
.
mode
,
),
),
);
if
(
res
==
true
){
provider
.
ordersListByModeFilterAPIFunction
(
context
,
widget
.
mode
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
""
,
""
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
...
...
@@ -294,12 +310,14 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
),
],
),
):
Emptywidget
(
context
),
)
:
Emptywidget
(
context
),
),
);
},
);
}
Future
<
void
>
_showOptionsSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
...
...
@@ -322,7 +340,9 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
right:
15
,
top:
10
,
),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,),
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
...
...
@@ -431,7 +451,10 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
),
),
),
if
([
"admin"
,
"teamleader"
].
contains
(
widget
.
mode
))...[
if
([
"admin"
,
"teamleader"
,
].
contains
(
widget
.
mode
))
...[
Text
(
"Select Status"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
)),
...
...
@@ -456,19 +479,27 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
items:
provider
.
leadStatus
.
map
(
(
status
)
=>
DropdownMenuItem
<
String
>(
(
status
)
=>
DropdownMenuItem
<
String
>(
value:
status
,
child:
Text
(
status
,
style:
const
TextStyle
(
fontSize:
14
,
),
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
),
),
)
.
toList
(),
value:
provider
.
selectedLeadType
,
value:
provider
.
leadStatus
.
contains
(
provider
.
selectedLeadType
,
)
?
provider
.
selectedLeadType
:
null
,
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
provider
.
selectedLeadType
=
value
;
...
...
@@ -479,8 +510,10 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -528,20 +561,22 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
"Selected Complaint Type:
${value.name}
, ID:
${value.id}
"
,
);
provider
.
selectedEmpID
=
value
.
id
!;
provider
.
selectedEmpName
=
value
.
name
!;
provider
.
selectedEmpName
=
value
.
name
!;
print
(
"hfjkshfg"
+
provider
.
selectedEmpID
.
toString
(),
);
}
}
},
buttonStyleData:
ddtheme
.
buttonStyleData
,
iconStyleData:
ddtheme
.
iconStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
menuItemStyleData:
ddtheme
.
menuItemStyleData
,
dropdownStyleData:
ddtheme
.
dropdownStyleData
,
),
),
],
...
...
@@ -550,13 +585,24 @@ class _OrderslistbyModesState extends State<OrderslistbyModes> {
InkResponse
(
onTap:
()
{
Navigator
.
pop
(
context
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedEmpID
,
provider
.
selectedLeadType
);
provider
.
ordersListByModeAPIFunction
(
context
,
widget
.
mode
,
provider
.
selectedEmpID
,
provider
.
selectedLeadType
,
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
...
...
lib/screens/order/tpcAgentIssueListDetails.dart
View file @
2ccf19cc
...
...
@@ -30,6 +30,8 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
context
,
listen:
false
,
);
provider
.
showMoreDetails
=
false
;
provider
.
ordersDetailsByModeAPIFunction
(
context
,
widget
.
orderId
,
widget
.
mode
);
});
...
...
@@ -42,6 +44,133 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
builder:
(
context
,
provider
,
tpcProvider
,
child
)
{
var
orderDetails
=
provider
.
orderDetails
;
var
Headings1
=
[
"Order Number"
,
"Account Name"
,
"Sales Person Name"
,
"Order Received Date"
,
];
var
subHeadings1
=
[
provider
.
orderDetails
.
orderNumber
??
"-"
,
provider
.
orderDetails
.
accountName
??
"-"
,
provider
.
orderDetails
.
salesPersonEmpName
??
"-"
,
provider
.
orderDetails
.
orderReceivedDate
??
"-"
,
];
var
Headings2
=
[
"Billing State"
,
"Billing District"
,
"Billing Sub Location"
,
"Billing Pincode"
,
"Billing Address"
,
"Entered By"
,
"Dispatch State"
,
"Dispatch District"
,
"District Sub Location"
,
"Dispatch Pincode"
,
"Dispatch Address"
,
"GST Number"
,
"Unloading Scope"
,
"Freight Scope"
,
"Erection Scope"
,
"CGST Amount"
,
"SGST Amount"
,
"IGST Amount"
,
"OTP"
,
"Basic Amount"
,
"Paid Amount"
,
"Balance Amount"
,
"Total Amount"
,
"TPC Applicable"
,
"TPC Agent"
,
"TPC Requested Amount"
,
"TPC Level 1 Approved Amount"
,
"TPC Level 2 Approved Amount"
,
"TPC Payment Mode"
,
"TPC Payment Reference No"
,
"TPC Payment Attachment"
,
"TPC Status"
,
"Purchase Order"
,
"Created Datetime"
,
"Note"
,
"Status"
,
];
var
subHeadings2
=
[
provider
.
orderDetails
.
billingState
??
"-"
,
provider
.
orderDetails
.
billingDistrict
??
"-"
,
provider
.
orderDetails
.
billingSubLocality
??
"-"
,
provider
.
orderDetails
.
billingPincode
??
"-"
,
provider
.
orderDetails
.
billingAddress
??
"-"
,
provider
.
orderDetails
.
enteredEmpName
??
"-"
,
provider
.
orderDetails
.
stateName
??
"-"
,
provider
.
orderDetails
.
districtName
??
"-"
,
provider
.
orderDetails
.
subLocationName
??
"-"
,
provider
.
orderDetails
.
dispatchPincode
??
"-"
,
provider
.
orderDetails
.
dispatchAddress
??
"-"
,
provider
.
orderDetails
.
gstNumber
??
"-"
,
provider
.
orderDetails
.
unloadingScope
??
"-"
,
provider
.
orderDetails
.
freightScope
??
"-"
,
provider
.
orderDetails
.
erectionScope
??
"-"
,
provider
.
orderDetails
.
cgstAmount
??
"-"
,
provider
.
orderDetails
.
sgstAmount
??
"-"
,
provider
.
orderDetails
.
igstAmount
??
"-"
,
provider
.
orderDetails
.
otp
??
"-"
,
provider
.
orderDetails
.
basicAmount
??
"-"
,
provider
.
orderDetails
.
paidAmount
??
"-"
,
provider
.
orderDetails
.
balanceAmount
??
"-"
,
provider
.
orderDetails
.
totalAmount
??
"-"
,
provider
.
orderDetails
.
tpcApplicable
??
"-"
,
provider
.
orderDetails
.
tpcaAgentName
??
"-"
,
provider
.
orderDetails
.
requestedTpcAmount
??
"-"
,
provider
.
orderDetails
.
level1TpcApprovedAmount
??
"-"
,
provider
.
orderDetails
.
level2TpcApprovedAmount
??
"-"
,
provider
.
orderDetails
.
tpcPaymentMode
??
"-"
,
provider
.
orderDetails
.
tpcPaymentReferenceNo
??
"-"
,
provider
.
orderDetails
.
tpcPaymentAttachementViewFileName
??
"-"
,
provider
.
orderDetails
.
tpcStatus
??
"-"
,
provider
.
orderDetails
.
tpcPaymentAttachmentDirFilePath
??
"-"
,
provider
.
orderDetails
.
createdDatetime
??
"-"
,
provider
.
orderDetails
.
note
??
"-"
,
provider
.
orderDetails
.
status
??
"-"
,
];
var
Headings
=
[...
Headings1
];
var
subHeadings
=
[...
subHeadings1
];
if
(
provider
.
showMoreDetails
){
Headings
=
[...
Headings1
,...
Headings2
];
subHeadings
=
[...
subHeadings1
,...
subHeadings2
];
}
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
...
...
@@ -135,7 +264,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
...
List
.
generate
(
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
...
...
@@ -143,7 +272,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
children:
[
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
...
...
@@ -154,7 +283,7 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
Expanded
(
child:
InkResponse
(
onTap:
()
{
if
(
provider
.
Headings
[
j
]
==
if
(
Headings
[
j
]
==
"Purchase Order"
)
{
Navigator
.
push
(
context
,
...
...
@@ -174,21 +303,21 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
}
},
child:
Text
(
provider
.
Headings
[
j
]
==
"Purchase Order"
Headings
[
j
]
==
"Purchase Order"
?
"View"
:
"
${
provider.
subHeadings[j]}
"
,
:
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
provider
.
Headings
[
j
]
==
"Purchase Order"
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
provider
.
Headings
[
j
]
==
"Purchase Order"
Headings
[
j
]
==
"Purchase Order"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
provider
.
Headings
[
j
]
==
"Purchase Order"
Headings
[
j
]
==
"Purchase Order"
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
...
...
@@ -199,6 +328,33 @@ class _TpcagentissuelistdetailsState extends State<Tpcagentissuelistdetails> {
),
);
}),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"- Show Less"
:
"+ More Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
],
),
),
...
...
lib/screens/order/tpcAgentListByMode.dart
View file @
2ccf19cc
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/ordersProvider/tpcAgentsProvider.dart'
;
import
'package:generp/screens/finance/FileViewer.dart'
;
import
'package:generp/screens/order/tpcAgentDetailsByMode.dart'
;
import
'package:provider/provider.dart'
;
...
...
@@ -10,7 +11,9 @@ import '../../Utils/commonWidgets.dart';
class
Tpcagentlistbymode
extends
StatefulWidget
{
final
pageTitleName
;
final
mode
;
const
Tpcagentlistbymode
({
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
mode
});
const
Tpcagentlistbymode
(
{
super
.
key
,
required
this
.
pageTitleName
,
required
this
.
mode
});
@override
State
<
Tpcagentlistbymode
>
createState
()
=>
_TpcagentlistbymodeState
();
...
...
@@ -136,7 +139,8 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
Text
(
"
${tpcAgentsLists[index].createdDatetime}
"
,
"
${tpcAgentsLists[index]
.mobileNumber}
"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
...
...
@@ -157,16 +161,16 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Mobile Number"
,
"Entered Employee"
,
"Issued Amount"
,
"ID Proof"
,
"Description"
,
];
final
subHeadings
=
[
tpcAgentsLists
[
index
].
mobileNumber
,
tpcAgentsLists
[
index
].
enteredEmpName
,
tpcAgentsLists
[
index
].
issuedAmount
,
"View"
,
tpcAgentsLists
[
index
].
note
,
];
return
Container
(
...
...
@@ -187,6 +191,35 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
),
),
if
(
subHeadings
[
j
]
==
"View"
)...[
Expanded
(
child:
InkResponse
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
tpcAgentsLists
[
index
]
.
idProofViewFileName
??
"-"
,
fileUrl:
tpcAgentsLists
[
index
]
.
idProofDirFilePath
??
"-"
),));
},
child:
Text
(
"
${subHeadings[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
,
decorationColor:
AppColors
.
app_blue
,
),
),
),
),
]
else
...[
Expanded
(
child:
InkResponse
(
...
...
@@ -199,11 +232,14 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
),
decoration:
TextDecoration
.
none
,
decorationColor:
AppColors
.
white
,
decorationColor:
AppColors
.
white
,
),
),
),
),
]
],
),
);
...
...
@@ -214,7 +250,8 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
builder:
(
context
)
=>
Tpcagentdetailsbymode
(
mode:
widget
.
mode
,
pageTitleName:
widget
.
pageTitleName
,
tpcAgentId:
tpcAgentsLists
[
index
].
tpcAgentId
,
tpcAgentId:
tpcAgentsLists
[
index
]
.
tpcAgentId
,
),));
},
child:
Container
(
...
...
lib/screens/serviceEngineer/PaymentDetails.dart
View file @
2ccf19cc
...
...
@@ -56,9 +56,6 @@ class _PaymentdetailsState extends State<Paymentdetails> {
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Paymentdetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
// Debug prints to inspect contactsDropDown and selectContact
debugPrint
(
"contactsDropDown:
${provider.contactsDropDown}
"
);
debugPrint
(
"selectContact:
${provider.selectContact}
"
);
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
child:
Scaffold
(
...
...
@@ -112,7 +109,6 @@ class _PaymentdetailsState extends State<Paymentdetails> {
...
provider
.
contactsDropDown
.
map
((
contacts
)
{
return
DropdownMenuItem
<
Contacts
>(
value:
contacts
,
// You can use the entire object, but we need to ensure it's unique
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -146,6 +142,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
_addContactSheet
(
context
);
},
child:
Container
(
height:
45
,
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
AppColors
.
app_blue
,
...
...
@@ -154,7 +151,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
borderRadius:
BorderRadius
.
circular
(
12
)
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
12
,
horizontal:
14
),
vertical:
5
,
horizontal:
14
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
...
...
@@ -199,7 +196,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
SizedBox
(
height:
10
,),
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
"
Complai
nt Type"
),
child:
Text
(
"
Payme
nt Type"
),
),
DropdownButtonHideUnderline
(
child:
Row
(
...
...
@@ -211,7 +208,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
children:
[
Expanded
(
child:
Text
(
'Select
Complai
nt Type'
,
'Select
Payme
nt Type'
,
style:
TextStyle
(
fontSize:
14
,
),
...
...
@@ -360,7 +357,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
color:
AppColors
.
app_blue
,
width:
0.5
)
),
child:
Center
(
child:
Text
(
"
Scan
Document"
,
style:
TextStyle
(
child:
Text
(
"
Reference
Document"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
color:
AppColors
.
app_blue
),),
...
...
@@ -398,10 +395,11 @@ class _PaymentdetailsState extends State<Paymentdetails> {
.
centerFloat
,
floatingActionButton:
InkWell
(
onTap:
()
{
provider
.
CheckValidations
(
print
(
"clicked"
);
provider
.
PaymentUpdateAPI
(
context
,
Referencecontroller
.
text
,
Amountcontroller
.
text
);
if
(
provider
.
CollectionId
!=
0
)
{
_
showOTPSheetSheet
(
context
);
showOTPSheetSheet
(
context
);
}
},
child:
Container
(
...
...
@@ -524,7 +522,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
}
Future
<
void
>
_
showOTPSheetSheet
(
BuildContext
context
)
{
Future
<
void
>
showOTPSheetSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
...
...
@@ -673,16 +671,46 @@ class _PaymentdetailsState extends State<Paymentdetails> {
onPressed:
()
=>
{
Navigator
.
of
(
context
).
pop
(
false
),
provider
.
OTPVerifyAPI
(
context
),
},
child:
Text
(
"
Submit
"
,
"
Resend
"
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w300
),
),
),
),
InkResponse
(
onTap:
()
{
Navigator
.
of
(
context
).
pop
(
false
);
provider
.
OTPVerifyAPI
(
context
);
},
child:
Container
(
alignment:
Alignment
.
center
,
height:
45
,
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
,
top:
5.0
,
bottom:
5.0
,
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
//1487C9
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
child:
Center
(
child:
Text
(
"Submit"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
),
),
),
),
),
],
),
],
...
...
lib/services/api_calling.dart
View file @
2ccf19cc
...
...
@@ -24,6 +24,7 @@ import 'package:generp/Models/financeModels/paymentRequisitionPaymentsListRespon
import
'package:generp/Models/ordersModels/PendingTPCAgentListResponse.dart'
;
import
'package:generp/Models/ordersModels/TPCAgentDetailsResponse.dart'
;
import
'package:generp/Models/ordersModels/TPCListResponse.dart'
;
import
'package:generp/Models/ordersModels/orderDashboardResponse.dart'
;
import
'package:generp/services/api_names.dart'
;
import
'package:generp/services/api_post_request.dart'
;
import
'package:path_provider/path_provider.dart'
;
...
...
@@ -59,6 +60,10 @@ import '../Models/UpdateComplaintResponse.dart';
import
'../Models/UpdatePasswordResponse.dart'
;
import
'../Models/VersionsResponse.dart'
;
import
'../Models/ViewVisitDetailsResponse.dart'
;
import
'../Models/commonModels/commonAddAccountsSubmitResponse.dart'
;
import
'../Models/crmModels/crmDashboardResponse.dart'
;
import
'../Models/crmModels/crmPendingTasksResponse.dart'
;
import
'../Models/crmModels/crmUniversalSearchResponse.dart'
;
import
'../Models/financeModels/paymentRequestionBankDetailsResponse.dart'
;
import
'../Models/commonModels/commonAccountLedgerFilterResponse.dart'
;
import
'../Models/commonModels/commonAccountLedgerResponse.dart'
;
...
...
@@ -89,12 +94,14 @@ import '../Models/ordersModels/addOrderAccontDetailsResponse.dart';
import
'../Models/ordersModels/addOrderPaymentViewResponse.dart'
;
import
'../Models/ordersModels/addOrderTpcAgentListResponse.dart'
;
import
'../Models/ordersModels/commonResponse.dart'
;
import
'../Models/ordersModels/orderPendingTasksListResponse.dart'
;
import
'../Models/ordersModels/ordersAccessiblePagesResponse.dart'
;
import
'../Models/ordersModels/ordersDetailsByModeResponse.dart'
;
import
'../Models/ordersModels/ordersDetailsDispatchOrderViewResponse.dart'
;
import
'../Models/ordersModels/ordersDetailsEditOrderViewResponse.dart'
;
import
'../Models/ordersModels/ordersListByModeFilterResponse.dart'
;
import
'../Models/ordersModels/ordersListByModeResponse.dart'
;
import
'../Models/ordersModels/ordersPdiIdByEngNumberResponse.dart'
;
import
'../Models/ordersModels/paymentDetailsByModeFilterResponse.dart'
;
import
'../Models/ordersModels/paymentListByModeFilterResponse.dart'
;
import
'../Models/ordersModels/paymentListByModeResponse.dart'
;
...
...
@@ -357,13 +364,13 @@ class ApiCalling {
'location'
:
(
location
).
toString
(),
};
var
res
;
if
(
check_in_pic
!=
null
)
{
//
if (check_in_pic != null) {
res
=
await
postImage
(
data
,
employeeChekInUrl
,
{},
check_in_pic
);
res
=
jsonDecode
(
res
);
}
else
{
res
=
await
post
(
data
,
employeeChekInUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
}
//
} else {
// //
res = await post(data, employeeChekInUrl, {});
// //
res = jsonDecode(res.body);
//
}
if
(
res
!=
null
)
{
return
CheckInResponse
.
fromJson
(
res
);
}
else
{
...
...
@@ -404,7 +411,7 @@ class ApiCalling {
// debugPrint("Null Response");
// return null;
// }
if
(
check_out_pic
!=
null
)
{
//
if (check_out_pic != null) {
res
=
await
postImageNew
(
data
,
{},
...
...
@@ -412,11 +419,14 @@ class ApiCalling {
check_out_pic
,
'check_out_pic'
,
);
if
(
res
!=
null
){
res
=
jsonDecode
(
res
);
}
else
{
res
=
await
post
(
data
,
employeeCheckOutUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
}
// } else {
// res = await post(data, employeeCheckOutUrl, {});
// res = jsonDecode(res.body);
// }
return
CheckOutResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
...
...
@@ -507,7 +517,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
genTrackerGeneratorDetailsUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
debugPrint
(
"gen details:
${
res.body
}
"
);
return
loadGeneratorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -551,6 +561,7 @@ class ApiCalling {
session
,
gen_hash_id
,
location
,
attachment
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
...
...
@@ -559,7 +570,19 @@ class ApiCalling {
'gen_hash_id'
:
(
gen_hash_id
).
toString
(),
'location'
:
(
location
).
toString
(),
};
final
res
=
await
post
(
data
,
genTrackerTagLocationUrl
,
{});
var
res
;
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
genTrackerTagLocationUrl
,
attachment
,
"attachment"
,
);
res
=
jsonDecode
(
res
);
return
TagLocationResponse
.
fromJson
(
res
);
}
else
{
res
=
await
post
(
data
,
genTrackerTagLocationUrl
,
{});
if
(
res
!=
null
)
{
// debugPrint(res.body);
return
TagLocationResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
...
...
@@ -567,6 +590,7 @@ class ApiCalling {
debugPrint
(
"Null Response"
);
return
null
;
}
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
...
...
@@ -675,7 +699,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
inventoryPartDetailsUrl
,
{});
if
(
res
!=
null
)
{
//
debugPrint(res.body);
debugPrint
(
res
.
body
);
return
Inventory_Part_details_response
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -706,7 +730,8 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
inventoryStockUpdateUrl
,
{});
if
(
res
!=
null
)
{
// debugPrint(res.body);
print
(
"Issue Receive
$data
"
);
debugPrint
(
res
.
body
);
return
loadGeneratorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -970,9 +995,13 @@ class ApiCalling {
payment_proof
,
'payment_proof'
,
);
print
(
"Add Payment
$res
"
);
res
=
jsonDecode
(
res
);
return
TechnicianAddPaymentCollectionResponse
.
fromJson
(
res
);
}
else
{
print
(
"Add Payment
$res
"
);
res
=
await
post
(
data
,
technicianAddPaymentCollectionUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
return
TechnicianAddPaymentCollectionResponse
.
fromJson
(
res
);
...
...
@@ -999,7 +1028,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
technicianPaymentCollectionOtpUrl
,
{});
if
(
res
!=
null
)
{
//
debugPrint(res.body);
debugPrint
(
"OTP
${
res.body
}
"
);
return
PaymentCollectionValidateOTPResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
...
...
@@ -1238,7 +1267,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
financeAddFormPagesAccessUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
debugPrint
(
"adjf:
${
res.body
}
"
);
return
financeDashboardPagesResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -1337,6 +1366,7 @@ class ApiCalling {
bank_ifsc_code
,
acc_holder_name
,
bank_upi_id
,
approval_assignee_emp_id
,
attachment
,
)
async
{
try
{
...
...
@@ -1355,6 +1385,7 @@ class ApiCalling {
'bank_ifsc_code'
:
bank_ifsc_code
.
toString
(),
'acc_holder_name'
:
acc_holder_name
.
toString
(),
'bank_upi_id'
:
bank_upi_id
.
toString
(),
'approval_assignee_emp_id'
:
approval_assignee_emp_id
.
toString
(),
};
var
res
;
...
...
@@ -1690,6 +1721,7 @@ class ApiCalling {
session
,
mode
,
payment_reference_number
,
payment_amount
,
payment_request_id
,
payment_account_id
,
processing_remarks
,
...
...
@@ -1702,6 +1734,7 @@ class ApiCalling {
'type'
:
'approve'
.
toString
(),
'mode'
:
mode
.
toString
(),
'payment_reference_number'
:
payment_reference_number
.
toString
(),
'payment_amount'
:
payment_amount
.
toString
(),
'payment_request_id'
:
(
payment_request_id
).
toString
(),
'payment_account_id'
:
payment_account_id
.
toString
(),
'processing_remarks'
:
processing_remarks
.
toString
(),
...
...
@@ -1851,7 +1884,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
commonAccessiblePagesUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
debugPrint
(
"CA:
${
res.body
}
"
);
return
commonAccessiblePagesResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -1965,7 +1998,7 @@ class ApiCalling {
}
}
static
Future
<
commonAddAccounts
View
Response
?>
commonAddAccountSubmitAPI
(
static
Future
<
commonAddAccounts
Submit
Response
?>
commonAddAccountSubmitAPI
(
empId
,
session
,
type
,
...
...
@@ -2012,7 +2045,7 @@ class ApiCalling {
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
commonAddAccounts
View
Response
.
fromJson
(
jsonDecode
(
res
.
body
));
return
commonAddAccounts
Submit
Response
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
...
...
@@ -2125,7 +2158,7 @@ class ApiCalling {
}
///Orders Module
static
Future
<
ordersAccessiblePagesResponse
?>
orders
Dashboard
API
(
static
Future
<
ordersAccessiblePagesResponse
?>
orders
AccesiblePages
API
(
empId
,
session
,
)
async
{
...
...
@@ -2148,6 +2181,56 @@ class ApiCalling {
}
}
static
Future
<
orderPendingTasksListResponse
?>
orderPendingTasksListAPI
(
empId
,
session
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersPendingTasksListUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
return
orderPendingTasksListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
orderDashboardResponse
?>
ordersDashboardAPI
(
empId
,
session
,
mode
,
from
,
to
,
teamemployee
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'from'
:
(
from
).
toString
(),
'to'
:
(
to
).
toString
(),
'teamemployee'
:
(
teamemployee
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersDashboardUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
return
orderDashboardResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
AddOrderViewResponse
?>
addOrderViewAPI
(
empId
,
session
,
...
...
@@ -2359,7 +2442,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
ordersOrderListFilterUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
print
(
"mode:
$
data
"
);
debugPrint
(
res
.
body
);
return
ordersListByModeResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -2385,8 +2468,8 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
ordersOrderDetailsUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
print
(
"Order Details
${
data
}
"
);
print
(
"Order Details
${
res.body
}
"
);
return
ordersDetailsByModeResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -2481,20 +2564,21 @@ class ApiCalling {
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp
Id,
'
:
empId
.
toString
(),
'session
,
'
:
session
.
toString
(),
'order_id
,
'
:
order_id
.
toString
(),
'dispatch_state_id
,
'
:
dispatch_state_id
.
toString
(),
'district
,
'
:
district
.
toString
(),
'sub_locality
,
'
:
sub_locality
.
toString
(),
'dispatch_pincode
,
'
:
dispatch_pincode
.
toString
(),
'dispatch_address
,
'
:
dispatch_address
.
toString
(),
'unloading
,
'
:
unloading
.
toString
(),
'freight
,
'
:
freight
.
toString
(),
'erection
,
'
:
erection
.
toString
(),
'emp
_id
'
:
empId
.
toString
(),
'session
_id
'
:
session
.
toString
(),
'order_id'
:
order_id
.
toString
(),
'dispatch_state_id'
:
dispatch_state_id
.
toString
(),
'district'
:
district
.
toString
(),
'sub_locality'
:
sub_locality
.
toString
(),
'dispatch_pincode'
:
dispatch_pincode
.
toString
(),
'dispatch_address'
:
dispatch_address
.
toString
(),
'unloading'
:
unloading
.
toString
(),
'freight'
:
freight
.
toString
(),
'erection'
:
erection
.
toString
(),
'note'
:
note
.
toString
(),
};
var
res
;
print
(
"Edit Order:
$data
"
);
if
(
attachment_file
!=
null
)
{
res
=
await
postImageNew
(
data
,
...
...
@@ -2523,10 +2607,9 @@ class ApiCalling {
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'empId,'
:
empId
.
toString
(),
'session,'
:
session
.
toString
(),
'order_id,'
:
order_id
.
toString
(),
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'order_id'
:
order_id
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersOrderDetailsDispatchProductsUrl
,
{});
...
...
@@ -2541,6 +2624,31 @@ class ApiCalling {
return
null
;
}
}
static
Future
<
ordersPdiIdByEngNumberResponse
?>
ordersPdiIdByEngNumberUrlAPI
(
empId
,
session
,
engine_number
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'engine_number'
:
engine_number
.
toString
(),
};
final
res
=
await
post
(
data
,
ordersPdiIdByEngNumberUrl
,
{});
if
(
res
!=
null
){
return
ordersPdiIdByEngNumberResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
CommonResponse
?>
ordersDetailsApproveRejectAPI
(
empId
,
...
...
@@ -2579,7 +2687,7 @@ class ApiCalling {
};
final
res
=
await
post
(
data
,
ordersOrderApproveRejectUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
print
(
"DATATATATA::
$
data
"
);
debugPrint
(
res
.
body
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
...
...
@@ -2668,7 +2776,7 @@ class ApiCalling {
'ref_no'
:
ref_no
.
toString
(),
};
var
res
;
print
(
data
);
print
(
"Add Payment:
${
data
}
"
);
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
data
,
...
...
@@ -3004,6 +3112,7 @@ class ApiCalling {
'note'
:
note
.
toString
(),
};
var
res
;
print
(
"add TPC:
$data
"
);
if
(
id_proof
!=
null
)
{
res
=
await
postImageNew
(
data
,
...
...
@@ -3018,6 +3127,7 @@ class ApiCalling {
res
=
jsonDecode
(
res
.
body
);
// return CommonResponse.fromJson(res);
}
print
(
"Add TPC:
${res}
"
);
return
CommonResponse
.
fromJson
(
res
);
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
...
...
@@ -3162,6 +3272,86 @@ class ApiCalling {
}
}
static
Future
<
crmDashboardResponse
?>
crmDashboardAPI
(
empId
,
session
,
mode
,
from
,
to
,
teamemployee
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'from'
:
(
from
).
toString
(),
'to'
:
(
to
).
toString
(),
'teamemployee'
:
(
teamemployee
).
toString
(),
};
final
res
=
await
post
(
data
,
crmDashboardUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
crmDashboardResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
crmPendingTasksResponse
?>
crmPendingTasksAPI
(
empId
,
session
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
};
final
res
=
await
post
(
data
,
crmPendingTasksListUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
crmPendingTasksResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
crmUniversalSearchResponse
?>
crmUniversalSearchAPI
(
empId
,
session
,
q
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'q'
:
(
q
).
toString
(),
};
final
res
=
await
post
(
data
,
crmUnivesalSearchUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
return
crmUniversalSearchResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
LeadListViewResponse
?>
crmLeadListViewAPI
(
empId
,
session
,
...
...
@@ -4103,12 +4293,14 @@ class ApiCalling {
empId
,
session
,
emp_loc
,
radius
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'emp_loc'
:
(
emp_loc
).
toString
(),
'radius'
:
radius
.
toString
()
};
final
res
=
await
post
(
data
,
crmNearbyOpenLeadsUrl
,
{});
if
(
res
!=
null
)
{
...
...
lib/services/api_names.dart
View file @
2ccf19cc
...
...
@@ -86,6 +86,8 @@ const commonAccountLedgerAccountDetails = "${baseUrl_test}common_account_details
///order Module
const
ordersAccessiblePagesUrl
=
"
${baseUrl_test}
crm_order_accessible_pages"
;
const
ordersDashboardUrl
=
"
${baseUrl_test}
order_dashboard"
;
const
ordersPendingTasksListUrl
=
"
${baseUrl_test}
pending_tasks_list"
;
const
ordersOrderListByModeUrl
=
"
${baseUrl_test}
crm_order_list_view"
;
const
ordersOrderListFilterUrl
=
"
${baseUrl_test}
crm_order_list_filter_submit"
;
const
ordersOrderApproveRejectUrl
=
"
${baseUrl_test}
approve_reject_crm_order"
;
...
...
@@ -95,6 +97,7 @@ const ordersOrderDetailsFeedbackSubmitUrl = "${baseUrl_test}crm_order_details_ad
const
ordersOrderDetailsEditOrderUrl
=
"
${baseUrl_test}
crm_edit_order_view"
;
const
ordersOrderDetailsEditOrderSubmitUrl
=
"
${baseUrl_test}
crm_edit_order_submit"
;
const
ordersOrderDetailsDispatchProductsUrl
=
"
${baseUrl_test}
crm_dispatch_products_data"
;
const
ordersPdiIdByEngNumberUrl
=
"
${baseUrl_test}
get_crm_pdi_id_by_engine_number"
;
const
ordersAddOrderViewUrl
=
"
${baseUrl_test}
add_crm_order_view"
;
const
ordersAddOrderAccountDetailsUrl
=
"
${baseUrl_test}
crm_account_details_for_add_order"
;
...
...
@@ -121,6 +124,9 @@ const ordersApprovePendingTPCIssueListUrl = "${baseUrl_test}update_pending_tpc_i
///Crm Module
const
crmAccessiblePagesUrl
=
"
${baseUrl_test}
sales_executive_crm_accessible_pages"
;
const
crmDashboardUrl
=
"
${baseUrl_test}
crm_dashboard"
;
const
crmPendingTasksListUrl
=
"
${baseUrl_test}
pending_tasks_list"
;
const
crmUnivesalSearchUrl
=
"
${baseUrl_test}
crm_universal_search"
;
const
crmLeadListViewUrl
=
"
${baseUrl_test}
crm_lead_list_view"
;
const
crmLeadListFilterSubmitUrl
=
"
${baseUrl_test}
submit_crm_lead_list_filter"
;
const
crmLeadListSourceOnReferenceUrl
=
"
${baseUrl_test}
get_source_on_reference"
;
...
...
pubspec.lock
View file @
2ccf19cc
...
...
@@ -37,10 +37,18 @@ packages:
dependency: transitive
description:
name: async
sha256:
"758e6d74e
971c
3
e5
aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
sha256:
d2872f9c1
97
3
1c
2
e5
f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.13.0"
version: "2.12.0"
auto_size_text:
dependency: "direct main"
description:
name: auto_size_text
sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
barcode:
dependency: transitive
description:
...
...
@@ -285,10 +293,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "
5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44
"
sha256: "
6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc
"
url: "https://pub.dev"
source: hosted
version: "1.3.
3
"
version: "1.3.
2
"
ffi:
dependency: transitive
description:
...
...
@@ -932,26 +940,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256:
"8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
sha256:
c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
source: hosted
version: "1
1
.0.
1
"
version: "1
0
.0.
8
"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256:
"1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
sha256:
f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.
10
"
version: "3.0.
9
"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "
8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1
"
sha256: "
6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3
"
url: "https://pub.dev"
source: hosted
version: "3.0.
2
"
version: "3.0.
1
"
lints:
dependency: transitive
description:
...
...
@@ -1657,10 +1665,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256:
ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
sha256:
"0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "1
5.0.0
"
version: "1
4.3.1
"
web:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
2ccf19cc
...
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.
8
9+9
3
version
:
1.0.9
0
+9
4
environment
:
sdk
:
^3.7.2
...
...
@@ -80,6 +80,7 @@ dependencies:
interactive_slider
:
^0.5.1
tuple
:
^2.0.2
collection
:
^1.19.1
auto_size_text
:
^3.0.0
dev_dependencies
:
flutter_test
:
...
...
Prev
1
2
3
4
5
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