Commit 379460f6 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

04-07-2025 By Sai Srinivas

Test cases and Order Module, Crm Module.
parent 2ccf19cc
...@@ -56,12 +56,12 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> { ...@@ -56,12 +56,12 @@ class _PaymentlistsbymodeState extends State<Paymentlistsbymode> {
provider.resetAll, provider.resetAll,
Row( Row(
children: [ children: [
InkResponse( // InkResponse(
onTap: () { // onTap: () {
_showOptionsSheet(context); // _showOptionsSheet(context);
}, // },
child: SvgPicture.asset("assets/svg/ic_download.svg",), // child: SvgPicture.asset("assets/svg/ic_download.svg",),
), // ),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
......
...@@ -51,12 +51,12 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> { ...@@ -51,12 +51,12 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
provider.resetAll, provider.resetAll,
Row( Row(
children: [ children: [
InkResponse( // InkResponse(
onTap: () { // onTap: () {
// _showOptionsSheet(context); // // _showOptionsSheet(context);
}, // },
child: SvgPicture.asset("assets/svg/ic_download.svg",), // child: SvgPicture.asset("assets/svg/ic_download.svg",),
), // ),
], ],
......
...@@ -53,12 +53,12 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> { ...@@ -53,12 +53,12 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
provider.resetAll, provider.resetAll,
Row( Row(
children: [ children: [
InkResponse( // InkResponse(
onTap: () { // onTap: () {
// _showOptionsSheet(context); // // _showOptionsSheet(context);
}, // },
child: SvgPicture.asset("assets/svg/ic_download.svg",), // child: SvgPicture.asset("assets/svg/ic_download.svg",),
), // ),
], ],
......
...@@ -47,7 +47,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -47,7 +47,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(14),
border: border:
searchFocusNode.hasFocus searchFocusNode.hasFocus
? Border.all(color: AppColors.app_blue, width: 0.5) ? Border.all(color: AppColors.app_blue, width: 0.5)
......
...@@ -49,7 +49,13 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -49,7 +49,13 @@ class _VisitdetailsState extends State<Visitdetails> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text("Customer Details"), Container(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Text("Customer Details",style: TextStyle(
fontSize: 14,
color: AppColors.grey_thick,
),),
),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
...@@ -83,7 +89,9 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -83,7 +89,9 @@ class _VisitdetailsState extends State<Visitdetails> {
vertical: 6, vertical: 6,
horizontal: 0, horizontal: 0,
), ),
child: Row( child: Column(
children: [
Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: [ children: [
...@@ -92,7 +100,6 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -92,7 +100,6 @@ class _VisitdetailsState extends State<Visitdetails> {
"assets/svg/se_block_head.svg", "assets/svg/se_block_head.svg",
), ),
SizedBox(width: 5), SizedBox(width: 5),
],
Expanded( Expanded(
child: SizedBox( child: SizedBox(
child: Column( child: Column(
...@@ -100,7 +107,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -100,7 +107,7 @@ class _VisitdetailsState extends State<Visitdetails> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text( Text(
textheads[j].toString(), "${customerDetails.cname}",
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
...@@ -114,7 +121,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -114,7 +121,7 @@ class _VisitdetailsState extends State<Visitdetails> {
child: Text( child: Text(
textSubheads[j] == "" textSubheads[j] == ""
? "-" ? "-"
: textSubheads[j], : customerDetails.aname ?? "-",
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
...@@ -126,14 +133,42 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -126,14 +133,42 @@ class _VisitdetailsState extends State<Visitdetails> {
), ),
), ),
), ),
]else...[
Expanded(
child: Text(textheads[j].toString()),
),
Expanded(
child: SizedBox(
child: Text(
textSubheads[j] == ""
? "-"
: textSubheads[j],
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF818181),
),
),
),
),
],
], ],
), ),
],
)
); );
}), }),
), ),
), ),
Text("Generator Details"), Container(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Text("Generator Details",style: TextStyle(
fontSize: 14,
color: AppColors.grey_thick,
),),
),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
...@@ -149,12 +184,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -149,12 +184,7 @@ class _VisitdetailsState extends State<Visitdetails> {
), ),
child: Column( child: Column(
children: [ children: [
Row( ...List.generate(6, (j) {
children: [
SvgPicture.asset("assetName"),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(6, (j) {
final textheads = [ final textheads = [
"Gen ID", "Gen ID",
"Engine Number", "Engine Number",
...@@ -173,65 +203,47 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -173,65 +203,47 @@ class _VisitdetailsState extends State<Visitdetails> {
]; ];
return Container( return Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 3, vertical: 6,
),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Container(
padding: EdgeInsets.symmetric(
vertical: 3,
horizontal: 0, horizontal: 0,
), ),
child: Column( child: Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
Text( Expanded(
textheads[j].toString(), child: Text(textheads[j].toString()),
), ),
SizedBox( Expanded(
// height:45, child: SizedBox(
width:
MediaQuery.of(
context,
).size.width *
0.8,
child: Text( child: Text(
textSubheads[j] == "" textSubheads[j] == ""
? "-" ? "-"
: textSubheads[j], : textSubheads[j],
maxLines: 2, maxLines: 2,
overflow: overflow: TextOverflow.ellipsis,
TextOverflow
.ellipsis,
style: TextStyle( style: TextStyle(
color: Color( color: Color(0xFF818181),
0xFF818181,
),
),
),
), ),
],
), ),
), ),
],
), ),
], ],
), ),
); );
}), }),
),
],
),
], ],
), ),
), ),
Text("Complaint Details"), Container(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Text(
"Complaint Details",
style: TextStyle(
fontSize: 14,
color: AppColors.grey_thick,
),
),
),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
...@@ -247,11 +259,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -247,11 +259,7 @@ class _VisitdetailsState extends State<Visitdetails> {
), ),
child: Column( child: Column(
children: [ children: [
Row( ...List.generate(4, (j) {
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(4, (j) {
final textheads = [ final textheads = [
"Complaint ID", "Complaint ID",
"Complaint Description", "Complaint Description",
...@@ -265,61 +273,37 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -265,61 +273,37 @@ class _VisitdetailsState extends State<Visitdetails> {
"${complaintDetails.complaintType}", "${complaintDetails.complaintType}",
]; ];
return Container( return Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 6),
vertical: 3, child: Row(
), crossAxisAlignment: CrossAxisAlignment.start,
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Container(
padding: EdgeInsets.symmetric(
vertical: 3,
horizontal: 0,
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Text( Expanded(
textheads[j].toString(), child: Text(textheads[j].toString()),
), ),
SizedBox( Expanded(
child: SizedBox(
// height:45, // height:45,
width: // width:
MediaQuery.of( // MediaQuery.of(
context, // context,
).size.width * // ).size.width *
0.8, // 0.8,
child: Text( child: Text(
textSubheads[j] == "" textSubheads[j] == ""
? "-" ? "-"
: textSubheads[j], : textSubheads[j],
maxLines: 2, maxLines: 2,
overflow: overflow: TextOverflow.ellipsis,
TextOverflow
.ellipsis,
style: TextStyle( style: TextStyle(
color: Color( color: Color(0xFF818181),
0xFF818181,
),
),
),
), ),
],
), ),
), ),
],
), ),
], ],
), ),
); );
}), }),
),
],
),
], ],
), ),
), ),
......
...@@ -105,6 +105,7 @@ import '../Models/ordersModels/ordersPdiIdByEngNumberResponse.dart'; ...@@ -105,6 +105,7 @@ import '../Models/ordersModels/ordersPdiIdByEngNumberResponse.dart';
import '../Models/ordersModels/paymentDetailsByModeFilterResponse.dart'; import '../Models/ordersModels/paymentDetailsByModeFilterResponse.dart';
import '../Models/ordersModels/paymentListByModeFilterResponse.dart'; import '../Models/ordersModels/paymentListByModeFilterResponse.dart';
import '../Models/ordersModels/paymentListByModeResponse.dart'; import '../Models/ordersModels/paymentListByModeResponse.dart';
import '../Models/ordersModels/technicianAddPaymentResendOTPResponse.dart';
import '../Notifiers/financeProvider/approveRejectPaymentRequestResponse.dart'; import '../Notifiers/financeProvider/approveRejectPaymentRequestResponse.dart';
import '../Utils/commonServices.dart'; import '../Utils/commonServices.dart';
...@@ -928,6 +929,7 @@ class ApiCalling { ...@@ -928,6 +929,7 @@ class ApiCalling {
'gen_id': (gen_id).toString(), 'gen_id': (gen_id).toString(),
'account_id': (account_id).toString(), 'account_id': (account_id).toString(),
}; };
print(data);
final res = await post(data, technicianAddPaymentUrl, {}); final res = await post(data, technicianAddPaymentUrl, {});
if (res != null) { if (res != null) {
// debugPrint(res.body); // debugPrint(res.body);
...@@ -986,7 +988,7 @@ class ApiCalling { ...@@ -986,7 +988,7 @@ class ApiCalling {
// debugPrint("Null Response"); // debugPrint("Null Response");
// return null; // return null;
// } // }
print("send otp:${data}");
if (payment_proof != null) { if (payment_proof != null) {
res = await postImageNew( res = await postImageNew(
data, data,
...@@ -998,14 +1000,15 @@ class ApiCalling { ...@@ -998,14 +1000,15 @@ class ApiCalling {
print("Add Payment $res"); print("Add Payment $res");
res = jsonDecode(res); res = jsonDecode(res);
return TechnicianAddPaymentCollectionResponse.fromJson(res);
} else { } else {
print("Add Payment $res"); print("Add Payment $res");
res = await post(data, technicianAddPaymentCollectionUrl, {}); res = await post(data, technicianAddPaymentCollectionUrl, {});
res = jsonDecode(res.body); res = jsonDecode(res.body);
return TechnicianAddPaymentCollectionResponse.fromJson(res); // return TechnicianAddPaymentCollectionResponse.fromJson(res);
} }
return TechnicianAddPaymentCollectionResponse.fromJson(res);
} catch (e) { } catch (e) {
debugPrint('hello bev=bug $e '); debugPrint('hello bev=bug $e ');
return null; return null;
...@@ -1041,6 +1044,33 @@ class ApiCalling { ...@@ -1041,6 +1044,33 @@ class ApiCalling {
return null; return null;
} }
} }
static Future<Technicianaddpaymentresendotpresponse?>
TechnicianPaymentOTPResendAPI(
empId,
session,
payment_collection_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'payment_collection_id': (payment_collection_id).toString(),
};
final res = await post(data, technicianAddPaymentResendOTPUrl, {});
if (res != null) {
debugPrint("OTP${res.body}");
return Technicianaddpaymentresendotpresponse.fromJson(
jsonDecode(res.body),
);
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
}
}
static Future<PaymentCollectionResponse?> paymentCollectionListAPI( static Future<PaymentCollectionResponse?> paymentCollectionListAPI(
empId, empId,
...@@ -1165,9 +1195,10 @@ class ApiCalling { ...@@ -1165,9 +1195,10 @@ class ApiCalling {
'type': (type).toString(), 'type': (type).toString(),
'account_id': (account_id).toString(), 'account_id': (account_id).toString(),
}; };
print(data);
final res = await post(data, technicianAddContactUrl, {}); final res = await post(data, technicianAddContactUrl, {});
if (res != null) { if (res != null) {
// debugPrint(res.body); debugPrint(res.body);
return AddContactResponse.fromJson(jsonDecode(res.body)); return AddContactResponse.fromJson(jsonDecode(res.body));
} else { } else {
debugPrint("Null Response"); debugPrint("Null Response");
...@@ -2073,7 +2104,7 @@ class ApiCalling { ...@@ -2073,7 +2104,7 @@ class ApiCalling {
}; };
final res = await post(data, commonAccountListUrl, {}); final res = await post(data, commonAccountListUrl, {});
if (res != null) { if (res != null) {
debugPrint(res.body); debugPrint("adad:${res.body}");
return commonAccountlistResponse.fromJson(jsonDecode(res.body)); return commonAccountlistResponse.fromJson(jsonDecode(res.body));
} else { } else {
debugPrint("Null Response"); debugPrint("Null Response");
......
...@@ -44,6 +44,7 @@ const technicianMonthlyVisitsUrl= "${baseUrl}home/technician_monthly_visits"; ...@@ -44,6 +44,7 @@ const technicianMonthlyVisitsUrl= "${baseUrl}home/technician_monthly_visits";
const technicianNearbyGeneratorsUrl= "${baseUrl}home/technician_nearby_generators"; const technicianNearbyGeneratorsUrl= "${baseUrl}home/technician_nearby_generators";
const technicianAddPaymentUrl= "${baseUrl}home/technician_add_payment_det"; const technicianAddPaymentUrl= "${baseUrl}home/technician_add_payment_det";
const technicianAddPaymentCollectionUrl= "${baseUrl}home/technician_add_payment_collection"; const technicianAddPaymentCollectionUrl= "${baseUrl}home/technician_add_payment_collection";
const technicianAddPaymentResendOTPUrl= "${baseUrl}home/technician_add_payment_collection_resend_otp";
const technicianPaymentCollectionOtpUrl= "${baseUrl}home/technician_payment_collection_validate_otp"; const technicianPaymentCollectionOtpUrl= "${baseUrl}home/technician_payment_collection_validate_otp";
const technicianPaymentCollectionUrl= "${baseUrl}home/technician_payment_collection_list"; const technicianPaymentCollectionUrl= "${baseUrl}home/technician_payment_collection_list";
const technicianWalletCollectionUrl= "${baseUrl}home/technician_payment_collection_wallet"; const technicianWalletCollectionUrl= "${baseUrl}home/technician_payment_collection_wallet";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment