Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
6597c1bd
Commit
6597c1bd
authored
Oct 08, 2021
by
Kai Uwe Broulik
🍇
Browse files
Extract proper real name from Lufthansa and EuroWings pkpass
parent
880a0190
Pipeline
#87045
passed with stage
in 13 minutes and 59 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/lib/scripts/eurowings-pkpass.js
View file @
6597c1bd
...
...
@@ -12,5 +12,12 @@ function main(pass, node)
if
(
pass
.
field
[
"
operatingcarrier
"
])
res
.
reservationFor
.
airline
.
name
=
pass
.
field
[
"
operatingcarrier
"
].
value
;
const
secondary
=
pass
.
secondaryFields
;
const
nameField
=
secondary
.
find
(
item
=>
item
.
key
===
"
name
"
);
if
(
nameField
)
{
res
.
underName
=
JsonLd
.
newObject
(
"
Person
"
);
res
.
underName
.
name
=
nameField
.
value
;
}
return
res
;
}
src/lib/scripts/lufthansa-pkpass.js
View file @
6597c1bd
...
...
@@ -14,5 +14,12 @@ function main(pass, node)
res
.
reservationFor
.
departureAirport
.
name
=
pass
.
field
[
"
origin
"
].
label
;
res
.
reservationFor
.
arrivalAirport
.
name
=
pass
.
field
[
"
destination
"
].
label
;
const
secondary
=
pass
.
secondaryFields
;
const
passengerName
=
secondary
.
find
(
item
=>
item
.
key
===
"
passenger
"
);
if
(
passengerName
)
{
res
.
underName
=
JsonLd
.
newObject
(
"
Person
"
);
res
.
underName
.
name
=
passengerName
.
value
;
}
return
res
;
}
Volker Krause
@vkrause
mentioned in commit
920eb3db
·
Oct 10, 2021
mentioned in commit
920eb3db
mentioned in commit 920eb3db94edfb50f91d23d0931b10e77ff1de80
Toggle commit list
Volker Krause
@vkrause
mentioned in commit
5ae2266b
·
Oct 13, 2021
mentioned in commit
5ae2266b
mentioned in commit 5ae2266b9b3cd6b847d67ce3a6fb69af9aef16bc
Toggle commit list
Write
Preview
Supports
Markdown
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