Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Sign in
Toggle navigation
Menu
Open sidebar
tpf-modernization
demo-frontend
Commits
c889d1a8
Commit
c889d1a8
authored
Jul 27, 2020
by
Dhiraj Shrivastava
Browse files
Bug fix for flight cancellation request
parent
f991f72d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/_services/listing-schedule-service/listing.component.service.ts
View file @
c889d1a8
...
...
@@ -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
'
})
...
...
src/app/admin/admin.component.ts
View file @
c889d1a8
...
...
@@ -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
=>
{
...
...
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