@vendit-dev/thirdparty-adapters 0.7.17 → 0.7.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -122,11 +122,11 @@ function groupByRoomWithTotalCounts(roomAndRoomRateInformations, totalRoomCount)
|
|
|
122
122
|
var groupedRooms = Array(totalRoomCount).fill([]);
|
|
123
123
|
return roomAndRoomRateInformations.reduce(function (acc, curr) {
|
|
124
124
|
var RoomTypeCode = curr.RoomInformation.RoomTypeCode, RoomDate = curr.RoomRateInformation.RoomDate;
|
|
125
|
-
var existingRooms = acc.find(function (
|
|
125
|
+
var existingRooms = acc.find(function (groupedRoom) {
|
|
126
126
|
var _a, _b;
|
|
127
|
-
return
|
|
128
|
-
((_b = (_a =
|
|
129
|
-
!
|
|
127
|
+
return groupedRoom.length > 0 &&
|
|
128
|
+
((_b = (_a = groupedRoom[0]) === null || _a === void 0 ? void 0 : _a.RoomInformation) === null || _b === void 0 ? void 0 : _b.RoomTypeCode) === RoomTypeCode &&
|
|
129
|
+
!groupedRoom.some(function (room) { return room.RoomRateInformation.RoomDate === RoomDate; });
|
|
130
130
|
});
|
|
131
131
|
if (existingRooms) {
|
|
132
132
|
existingRooms.push(curr);
|
|
@@ -341,7 +341,7 @@ var refineReservationData = function (infoTravelXML) {
|
|
|
341
341
|
externalPlatformCode: SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCode,
|
|
342
342
|
externalPlatformName: (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName) ||
|
|
343
343
|
(SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeName),
|
|
344
|
-
cmsOtaNumber: "".concat(BasicInformation.TravelAgencyBookingNumber).concat(isGroupReservation ? "
|
|
344
|
+
cmsOtaNumber: "".concat(BasicInformation.TravelAgencyBookingNumber).concat(isGroupReservation ? "v".concat(index + 1) : ''),
|
|
345
345
|
cmsProductName: roomsSortedByDate[0].RoomInformation.RoomTypeName ||
|
|
346
346
|
BasicInformation.PackagePlanName,
|
|
347
347
|
platform: tl_lincoln_ota_1.TL_LINCOLN_TO_VENDIT_OTA_MAP[(SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName) || 'ANONYMOUS'] || (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName),
|