File indexing completed on 2024-12-29 04:51:05

0001 /*
0002    SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org>
0003    SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 
0006 function extractPass(pass) {
0007     let res = JsonLd.newEventReservation();
0008     res.reservationFor.startDate = pass.relevantDate;
0009     res.reservationFor.name = pass.field['TicketTitle'].value;
0010     res.reservationFor.location.name = pass.organizationName;
0011     const addr = pass.field['Back8'].value.split('\n');
0012     res.reservationFor.location.address.streetAddress = addr[1];
0013     res.reservationFor.location.address.addressLocality = addr[2];
0014     res.reservationFor.location.geo.latitude = pass.locations[0].latitude;
0015     res.reservationFor.location.geo.longitude = pass.locations[0].longitude;
0016     res.reservedTicket.ticketToken = 'qrCode:' + pass.barcodes[0].message;
0017     res.reservedTicket.ticketedSeat.seatSection = pass.field['Theatre'].value;
0018     res.reservedTicket.ticketedSeat.seatNumber = pass.field['Seats'].value;
0019     return res;
0020 }