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> {
provider.resetAll,
Row(
children: [
InkResponse(
onTap: () {
_showOptionsSheet(context);
},
child: SvgPicture.asset("assets/svg/ic_download.svg",),
),
// InkResponse(
// onTap: () {
// _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
InkResponse(
onTap: () async {
......
......@@ -51,12 +51,12 @@ class _TpcagentissuelistState extends State<Tpcagentissuelist> {
provider.resetAll,
Row(
children: [
InkResponse(
onTap: () {
// _showOptionsSheet(context);
},
child: SvgPicture.asset("assets/svg/ic_download.svg",),
),
// InkResponse(
// onTap: () {
// // _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
......
......@@ -53,12 +53,12 @@ class _TpcagentlistbymodeState extends State<Tpcagentlistbymode> {
provider.resetAll,
Row(
children: [
InkResponse(
onTap: () {
// _showOptionsSheet(context);
},
child: SvgPicture.asset("assets/svg/ic_download.svg",),
),
// InkResponse(
// onTap: () {
// // _showOptionsSheet(context);
// },
// child: SvgPicture.asset("assets/svg/ic_download.svg",),
// ),
],
......
......@@ -47,7 +47,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(16),
borderRadius: BorderRadius.circular(14),
border:
searchFocusNode.hasFocus
? Border.all(color: AppColors.app_blue, width: 0.5)
......
......@@ -49,7 +49,13 @@ class _VisitdetailsState extends State<Visitdetails> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Customer Details"),
Container(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Text("Customer Details",style: TextStyle(
fontSize: 14,
color: AppColors.grey_thick,
),),
),
Container(
margin: EdgeInsets.symmetric(
horizontal: 10,
......@@ -83,7 +89,9 @@ class _VisitdetailsState extends State<Visitdetails> {
vertical: 6,
horizontal: 0,
),
child: Row(
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
......@@ -92,7 +100,6 @@ class _VisitdetailsState extends State<Visitdetails> {
"assets/svg/se_block_head.svg",
),
SizedBox(width: 5),
],
Expanded(
child: SizedBox(
child: Column(
......@@ -100,7 +107,7 @@ class _VisitdetailsState extends State<Visitdetails> {
CrossAxisAlignment.start,
children: [
Text(
textheads[j].toString(),
"${customerDetails.cname}",
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
......@@ -114,7 +121,7 @@ class _VisitdetailsState extends State<Visitdetails> {
child: Text(
textSubheads[j] == ""
? "-"
: textSubheads[j],
: customerDetails.aname ?? "-",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
......@@ -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(
margin: EdgeInsets.symmetric(
horizontal: 10,
......@@ -149,12 +184,7 @@ class _VisitdetailsState extends State<Visitdetails> {
),
child: Column(
children: [
Row(
children: [
SvgPicture.asset("assetName"),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(6, (j) {
...List.generate(6, (j) {
final textheads = [
"Gen ID",
"Engine Number",
......@@ -173,65 +203,47 @@ class _VisitdetailsState extends State<Visitdetails> {
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 3,
),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Container(
padding: EdgeInsets.symmetric(
vertical: 3,
vertical: 6,
horizontal: 0,
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
textheads[j].toString(),
Expanded(
child: Text(textheads[j].toString()),
),
SizedBox(
// height:45,
width:
MediaQuery.of(
context,
).size.width *
0.8,
Expanded(
child: SizedBox(
child: Text(
textSubheads[j] == ""
? "-"
: textSubheads[j],
maxLines: 2,
overflow:
TextOverflow
.ellipsis,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(
0xFF818181,
),
),
),
color: Color(0xFF818181),
),
],
),
),
],
),
],
),
);
}),
),
],
),
],
),
),
Text("Complaint Details"),
Container(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Text(
"Complaint Details",
style: TextStyle(
fontSize: 14,
color: AppColors.grey_thick,
),
),
),
Container(
margin: EdgeInsets.symmetric(
horizontal: 10,
......@@ -247,11 +259,7 @@ class _VisitdetailsState extends State<Visitdetails> {
),
child: Column(
children: [
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(4, (j) {
...List.generate(4, (j) {
final textheads = [
"Complaint ID",
"Complaint Description",
......@@ -265,61 +273,37 @@ class _VisitdetailsState extends State<Visitdetails> {
"${complaintDetails.complaintType}",
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 3,
),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Container(
padding: EdgeInsets.symmetric(
vertical: 3,
horizontal: 0,
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
padding: EdgeInsets.symmetric(vertical: 6),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
textheads[j].toString(),
Expanded(
child: Text(textheads[j].toString()),
),
SizedBox(
Expanded(
child: SizedBox(
// height:45,
width:
MediaQuery.of(
context,
).size.width *
0.8,
// width:
// MediaQuery.of(
// context,
// ).size.width *
// 0.8,
child: Text(
textSubheads[j] == ""
? "-"
: textSubheads[j],
maxLines: 2,
overflow:
TextOverflow
.ellipsis,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(
0xFF818181,
),
),
),
color: Color(0xFF818181),
),
],
),
),
],
),
],
),
);
}),
),
],
),
],
),
),
......
......@@ -105,6 +105,7 @@ import '../Models/ordersModels/ordersPdiIdByEngNumberResponse.dart';
import '../Models/ordersModels/paymentDetailsByModeFilterResponse.dart';
import '../Models/ordersModels/paymentListByModeFilterResponse.dart';
import '../Models/ordersModels/paymentListByModeResponse.dart';
import '../Models/ordersModels/technicianAddPaymentResendOTPResponse.dart';
import '../Notifiers/financeProvider/approveRejectPaymentRequestResponse.dart';
import '../Utils/commonServices.dart';
......@@ -928,6 +929,7 @@ class ApiCalling {
'gen_id': (gen_id).toString(),
'account_id': (account_id).toString(),
};
print(data);
final res = await post(data, technicianAddPaymentUrl, {});
if (res != null) {
// debugPrint(res.body);
......@@ -986,7 +988,7 @@ class ApiCalling {
// debugPrint("Null Response");
// return null;
// }
print("send otp:${data}");
if (payment_proof != null) {
res = await postImageNew(
data,
......@@ -998,14 +1000,15 @@ class ApiCalling {
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);
// return TechnicianAddPaymentCollectionResponse.fromJson(res);
}
return TechnicianAddPaymentCollectionResponse.fromJson(res);
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
......@@ -1041,6 +1044,33 @@ class ApiCalling {
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(
empId,
......@@ -1165,9 +1195,10 @@ class ApiCalling {
'type': (type).toString(),
'account_id': (account_id).toString(),
};
print(data);
final res = await post(data, technicianAddContactUrl, {});
if (res != null) {
// debugPrint(res.body);
debugPrint(res.body);
return AddContactResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
......@@ -2073,7 +2104,7 @@ class ApiCalling {
};
final res = await post(data, commonAccountListUrl, {});
if (res != null) {
debugPrint(res.body);
debugPrint("adad:${res.body}");
return commonAccountlistResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
......
......@@ -44,6 +44,7 @@ const technicianMonthlyVisitsUrl= "${baseUrl}home/technician_monthly_visits";
const technicianNearbyGeneratorsUrl= "${baseUrl}home/technician_nearby_generators";
const technicianAddPaymentUrl= "${baseUrl}home/technician_add_payment_det";
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 technicianPaymentCollectionUrl= "${baseUrl}home/technician_payment_collection_list";
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