Commit c889d1a8 authored by Dhiraj Shrivastava's avatar Dhiraj Shrivastava
Browse files

Bug fix for flight cancellation request

parent f991f72d
......@@ -53,12 +53,12 @@ export class ListingService {
const status_code= "CAN";
const body = {
"request": {
// "request": {
"Flight_Details": fltNumber,
"Flight_Date": dateString,
"Value": status_code,
// "Trans_id":trans_id
}
// }
}
return this.http.post(this.cancel_flight,body,{ observe: 'response' as 'body' })
......
......@@ -95,13 +95,12 @@ export class AdminComponent implements OnInit {
.subscribe(
(data: HttpResponse<any>) => {
console.log("show data show-", data.status)
if (data.status === 201) {
console.log("show data show-", data.status);
this.isFlightCancel = false;
}else{
if (data.body.variables.tpfResponse === 200) {
this.isFlightCancel = true;
console.log("flighe deleted succes");
console.log("Flight cancelled successfully....");
}else{
console.log("show data show-", data.status);
this.isFlightCancel = false;
}
},
error => {
......
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