@vendit-dev/thirdparty-adapters 0.7.8 → 0.7.9
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.
|
@@ -51,9 +51,10 @@ function jsonToXml(json) {
|
|
|
51
51
|
}
|
|
52
52
|
exports.jsonToXml = jsonToXml;
|
|
53
53
|
function xmlToJson(xml) {
|
|
54
|
+
// 
 문자는 제거하고 파싱합니다.
|
|
54
55
|
try {
|
|
55
56
|
var parser = new fast_xml_parser_1.XMLParser();
|
|
56
|
-
return parser.parse(xml);
|
|
57
|
+
return parser.parse(xml.replace(/
/g, ''));
|
|
57
58
|
}
|
|
58
59
|
catch (e) {
|
|
59
60
|
console.error("xmlToJson failed: ".concat(e));
|
|
@@ -120,29 +121,40 @@ var getMealConditionText = function (_mealCondition) {
|
|
|
120
121
|
};
|
|
121
122
|
var formattedNameForMealCondition = function (mealCondition, specificMealCondition) {
|
|
122
123
|
var _a;
|
|
123
|
-
return "".concat(getMealConditionText(mealCondition)).concat(((_a = getSpecificMealConditionText(specificMealCondition)) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
124
|
-
.join(', '), ")")
|
|
124
|
+
return "".concat(getMealConditionText(mealCondition)).concat(((_a = getSpecificMealConditionText(specificMealCondition)) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
125
|
+
? "(".concat(getSpecificMealConditionText(specificMealCondition).join(', '), ")")
|
|
126
|
+
: '');
|
|
125
127
|
};
|
|
126
128
|
exports.formattedNameForMealCondition = formattedNameForMealCondition;
|
|
127
129
|
var formattedPaxCountText = function (roomInformation, genderDivision) {
|
|
128
130
|
if ('RoomPaxMaleCount' in roomInformation) {
|
|
129
131
|
var _a = roomInformation, _b = _a.RoomPaxMaleCount, RoomPaxMaleCount = _b === void 0 ? 0 : _b, _c = _a.RoomPaxFemaleCount, RoomPaxFemaleCount = _c === void 0 ? 0 : _c, _d = _a.RoomChildA70Count, RoomChildA70Count = _d === void 0 ? 0 : _d, _e = _a.RoomChildB50Count, RoomChildB50Count = _e === void 0 ? 0 : _e, _f = _a.RoomChildC30Count, RoomChildC30Count = _f === void 0 ? 0 : _f, _g = _a.RoomChildDNoneCount, RoomChildDNoneCount = _g === void 0 ? 0 : _g, _h = _a.RoomChildOtherCount, RoomChildOtherCount = _h === void 0 ? 0 : _h;
|
|
130
132
|
return "".concat([
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
genderDivision
|
|
134
|
+
? "\uB0A8 ".concat(RoomPaxMaleCount, "\uBA85, \uC5EC ").concat(RoomPaxFemaleCount, "\uBA85")
|
|
135
|
+
: "\uC131\uC778 ".concat(RoomPaxMaleCount + RoomPaxFemaleCount, "\uBA85"),
|
|
134
136
|
RoomChildA70Count ? "\uD559\uC0DD ".concat(RoomChildA70Count, "\uBA85") : '',
|
|
135
|
-
RoomChildB50Count || RoomChildC30Count || RoomChildOtherCount
|
|
137
|
+
RoomChildB50Count || RoomChildC30Count || RoomChildOtherCount
|
|
138
|
+
? "\uC544\uB3D9 ".concat(RoomChildB50Count + RoomChildC30Count + RoomChildOtherCount, "\uBA85")
|
|
139
|
+
: '',
|
|
136
140
|
RoomChildDNoneCount ? "\uC720\uC544 ".concat(RoomChildDNoneCount, "\uBA85") : '',
|
|
137
|
-
]
|
|
141
|
+
]
|
|
142
|
+
.filter(Boolean)
|
|
143
|
+
.join(', '));
|
|
138
144
|
}
|
|
139
145
|
var _j = roomInformation, _k = _j.TotalPaxMaleCount, TotalPaxMaleCount = _k === void 0 ? 0 : _k, _l = _j.TotalPaxFemaleCount, TotalPaxFemaleCount = _l === void 0 ? 0 : _l, _m = _j.TotalChildA70Count, TotalChildA70Count = _m === void 0 ? 0 : _m, _o = _j.TotalChildB50Count, TotalChildB50Count = _o === void 0 ? 0 : _o, _p = _j.TotalChildC30Count, TotalChildC30Count = _p === void 0 ? 0 : _p, _q = _j.TotalChildDNoneCount, TotalChildDNoneCount = _q === void 0 ? 0 : _q, _r = _j.TotalChildOtherCount, TotalChildOtherCount = _r === void 0 ? 0 : _r;
|
|
140
146
|
return "".concat([
|
|
141
|
-
genderDivision
|
|
147
|
+
genderDivision
|
|
148
|
+
? "\uB0A8 ".concat(TotalPaxMaleCount, "\uBA85, \uC5EC ").concat(TotalPaxFemaleCount, "\uBA85")
|
|
149
|
+
: "\uC131\uC778 ".concat(TotalPaxMaleCount + TotalPaxFemaleCount, "\uBA85"),
|
|
142
150
|
TotalChildA70Count ? "\uD559\uC0DD ".concat(TotalChildA70Count, "\uBA85") : '',
|
|
143
|
-
TotalChildB50Count || TotalChildC30Count || TotalChildOtherCount
|
|
151
|
+
TotalChildB50Count || TotalChildC30Count || TotalChildOtherCount
|
|
152
|
+
? "\uC544\uB3D9 ".concat(TotalChildB50Count + TotalChildC30Count + TotalChildOtherCount, "\uBA85")
|
|
153
|
+
: '',
|
|
144
154
|
TotalChildDNoneCount ? "\uC720\uC544 ".concat(TotalChildDNoneCount, "\uBA85") : '',
|
|
145
|
-
]
|
|
155
|
+
]
|
|
156
|
+
.filter(Boolean)
|
|
157
|
+
.join(', '));
|
|
146
158
|
};
|
|
147
159
|
exports.formattedPaxCountText = formattedPaxCountText;
|
|
148
160
|
function formatPhoneNumber(text) {
|
|
@@ -154,7 +166,16 @@ var makePaymentInfo = function (_a) {
|
|
|
154
166
|
return datas.reduce(function (paymentInput, _a) {
|
|
155
167
|
var _b, _c, _d;
|
|
156
168
|
var RoomInfo = _a.RoomInformation, RoomRateInformation = _a.RoomRateInformation;
|
|
157
|
-
var roomAmount = (RoomRateInformation === null || RoomRateInformation === void 0 ? void 0 : RoomRateInformation.TotalPerRoomRate)
|
|
169
|
+
var roomAmount = (RoomRateInformation === null || RoomRateInformation === void 0 ? void 0 : RoomRateInformation.TotalPerRoomRate)
|
|
170
|
+
|| ((RoomRateInformation === null || RoomRateInformation === void 0 ? void 0 : RoomRateInformation.PerMaleRate) || 0)
|
|
171
|
+
* (RoomInfo.RoomPaxMaleCount || 0)
|
|
172
|
+
+ ((RoomRateInformation === null || RoomRateInformation === void 0 ? void 0 : RoomRateInformation.PerFemaleRate)
|
|
173
|
+
|| (RoomRateInformation === null || RoomRateInformation === void 0 ? void 0 : RoomRateInformation.PerMaleRate)
|
|
174
|
+
|| 0)
|
|
175
|
+
* (RoomInfo.RoomPaxFemaleCount || 0)
|
|
176
|
+
|| (RoomRateInformation === null || RoomRateInformation === void 0 ? void 0 : RoomRateInformation.TotalPerRoomRate)
|
|
177
|
+
|| basicRateInformation.TotalAccommodationCharge
|
|
178
|
+
|| 0;
|
|
158
179
|
paymentInput.amount += roomAmount;
|
|
159
180
|
(_b = paymentInput.segments) === null || _b === void 0 ? void 0 : _b.push({
|
|
160
181
|
amount: roomAmount,
|
|
@@ -162,7 +183,8 @@ var makePaymentInfo = function (_a) {
|
|
|
162
183
|
referenceType: 'RESERVATION',
|
|
163
184
|
referenceSubType: reservationType,
|
|
164
185
|
});
|
|
165
|
-
if (basicInformation.MealCondition !== 'Other'
|
|
186
|
+
if (basicInformation.MealCondition !== 'Other'
|
|
187
|
+
&& basicInformation.MealCondition !== 'WithoutMeal') {
|
|
166
188
|
paymentInput.amount += (RoomRateInformation === null || RoomRateInformation === void 0 ? void 0 : RoomRateInformation.TotalPerRoomServiceFee) || 0;
|
|
167
189
|
(_c = paymentInput.segments) === null || _c === void 0 ? void 0 : _c.push({
|
|
168
190
|
amount: (RoomRateInformation === null || RoomRateInformation === void 0 ? void 0 : RoomRateInformation.TotalPerRoomServiceFee) || 0,
|
|
@@ -184,7 +206,9 @@ var makePaymentInfo = function (_a) {
|
|
|
184
206
|
type: 'platform',
|
|
185
207
|
externalRoomTypeCode: roomsSortedByDate[0].RoomInformation.NetRmTypeGroupCode,
|
|
186
208
|
externalRoomTypeName: roomsSortedByDate[0].RoomInformation.RoomTypeName,
|
|
187
|
-
useStartAt: "".concat(CheckInDate).concat((basicInformation === null || basicInformation === void 0 ? void 0 : basicInformation.CheckInTime)
|
|
209
|
+
useStartAt: "".concat(CheckInDate).concat((basicInformation === null || basicInformation === void 0 ? void 0 : basicInformation.CheckInTime)
|
|
210
|
+
? " ".concat(basicInformation === null || basicInformation === void 0 ? void 0 : basicInformation.CheckInTime)
|
|
211
|
+
: ''),
|
|
188
212
|
});
|
|
189
213
|
}, {
|
|
190
214
|
amount: 0,
|
|
@@ -204,7 +228,9 @@ var refineReservationData = function (infoTravelXML) {
|
|
|
204
228
|
var isGroupReservation = BasicInformation.TotalRoomCount > 1;
|
|
205
229
|
var RisaplsCommonInformation = RisaplsInformation.RisaplsCommonInformation, AgentNativeInformation = RisaplsInformation.AgentNativeInformation;
|
|
206
230
|
var RoomAndRoomRateInformation = RisaplsCommonInformation.RoomAndRoomRateInformation, Allotment = RisaplsCommonInformation.Allotment, Member = RisaplsCommonInformation.Member, OtherInfo = RisaplsCommonInformation.OtherInfo, Basic = RisaplsCommonInformation.Basic, BasicRate = RisaplsCommonInformation.BasicRate, Option = RisaplsCommonInformation.Option;
|
|
207
|
-
var isFullyPaid = !!((_a = AgentNativeInformation === null || AgentNativeInformation === void 0 ? void 0 : AgentNativeInformation.Extendmytrip) === null || _a === void 0 ? void 0 : _a.SettlementDiv)
|
|
231
|
+
var isFullyPaid = !!((_a = AgentNativeInformation === null || AgentNativeInformation === void 0 ? void 0 : AgentNativeInformation.Extendmytrip) === null || _a === void 0 ? void 0 : _a.SettlementDiv)
|
|
232
|
+
&& !((_b = AgentNativeInformation === null || AgentNativeInformation === void 0 ? void 0 : AgentNativeInformation.Extend) === null || _b === void 0 ? void 0 : _b.AmountClaimed)
|
|
233
|
+
&& (BasicRateInformation === null || BasicRateInformation === void 0 ? void 0 : BasicRateInformation.Payment) !== 'Hotel Collect';
|
|
208
234
|
var roomAndRoomRateInformations = (0, tl_lincoln_types_1.makeArray)(RoomAndRoomRateInformation);
|
|
209
235
|
var groupedRooms = (0, function_1.groupBy)(roomAndRoomRateInformations, 'RoomInformation.RoomByRoomConfirmationNumber');
|
|
210
236
|
var status = getReservationStatusFromDataClassification(TransactionType.DataClassification);
|
|
@@ -225,25 +251,47 @@ var refineReservationData = function (infoTravelXML) {
|
|
|
225
251
|
name: BasicInformation.GuestOrGroupNameKanjiName,
|
|
226
252
|
email: Member === null || Member === void 0 ? void 0 : Member.UserMailAddr,
|
|
227
253
|
reservedBy: SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName,
|
|
228
|
-
memo: "".concat((Member === null || Member === void 0 ? void 0 : Member.UserKana)
|
|
254
|
+
memo: "".concat((Member === null || Member === void 0 ? void 0 : Member.UserKana)
|
|
255
|
+
|| (Member === null || Member === void 0 ? void 0 : Member.UserName)
|
|
256
|
+
|| "".concat(BasicInformation.GuestOrGroupNameKanjiName), " ").concat(BasicInformation === null || BasicInformation === void 0 ? void 0 : BasicInformation.PackagePlanName, "\n").concat((OtherInfo === null || OtherInfo === void 0 ? void 0 : OtherInfo.GuestRequest)
|
|
257
|
+
? "[\uC694\uCCAD\uC0AC\uD56D]\n".concat(OtherInfo.GuestRequest)
|
|
258
|
+
: '', "\n").concat((OtherInfo === null || OtherInfo === void 0 ? void 0 : OtherInfo.AdditionalInformation)
|
|
259
|
+
? "[\uCD94\uAC00\uC815\uBCF4]\n".concat(OtherInfo.AdditionalInformation)
|
|
260
|
+
: '', "\n").concat((0, exports.formattedPaxCountText)(BasicInformation), "\n[\uACB0\uC81C\uC815\uBCF4]\n\uC9C0\uBD88\uC218\uB2E8: ").concat(BasicRateInformation.Payment || '정보 없음', "\n").concat(BasicRateInformation.Payment === 'CreditCard'
|
|
261
|
+
? "\uCE74\uB4DC\uC0AC\uBA85: ".concat(BasicRateInformation.CreditCardAuthority, "\n\uCE74\uB4DC\uBC88\uD638: ").concat(BasicRateInformation.CreditCardNumber, "\n\uC720\uD6A8\uAE30\uAC04: ").concat(BasicRateInformation.ExpireDate, "\n\uC18C\uC9C0\uC790\uBA85: ").concat(BasicRateInformation.CardHolderName, "\n\uC774\uC804 \uCDE8\uC18C\uAE08\uC561: ").concat(BasicRateInformation.CancellationCharge, "\n")
|
|
262
|
+
: '', "\n\uC218\uC218\uB8CC\uC728: ").concat(BasicRateInformation.CommissionPercentage
|
|
263
|
+
? "".concat(BasicRateInformation.CommissionPercentage, "%")
|
|
264
|
+
: '정보 없음', "\n\uC218\uC218\uB8CC \uCD1D\uC561: ").concat(BasicRateInformation.TotalAccommodationCommissionAmount
|
|
265
|
+
? "".concat(BasicRateInformation.TotalAccommodationCommissionAmount, "\uC6D0")
|
|
266
|
+
: '정보 없음', "\n[\uD560\uC778\uC815\uBCF4]\n").concat((PointDiscountList === null || PointDiscountList === void 0 ? void 0 : PointDiscountList.length) > 0
|
|
267
|
+
? "".concat(PointDiscountList.map(function (point) { return "".concat(point.PointsDiscountName, ": ").concat(point.PointsDiscount); }).join('\n'))
|
|
268
|
+
: ''),
|
|
229
269
|
status: 'reserved',
|
|
230
270
|
phone: formatPhoneNumber("".concat((Member === null || Member === void 0 ? void 0 : Member.UserTel) || Basic.PhoneNumber || '')),
|
|
231
271
|
useExpireAt: useExpireAt,
|
|
232
272
|
useStartAt: useStartAt,
|
|
233
273
|
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),
|
|
234
274
|
externalPlatformCode: SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCode,
|
|
235
|
-
externalPlatformName: (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName)
|
|
275
|
+
externalPlatformName: (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName)
|
|
276
|
+
|| (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeName),
|
|
236
277
|
},
|
|
237
|
-
reservations: Object.keys(groupedRooms)
|
|
238
|
-
.map(function (key, index) {
|
|
278
|
+
reservations: Object.keys(groupedRooms).map(function (key, index) {
|
|
239
279
|
var _a, _b, _c, _d;
|
|
240
280
|
var datas = groupedRooms[key];
|
|
241
|
-
var roomsSortedByDate = datas.sort(function (a, b) {
|
|
242
|
-
|
|
281
|
+
var roomsSortedByDate = datas.sort(function (a, b) {
|
|
282
|
+
return new Date(a.RoomRateInformation.RoomDate).valueOf()
|
|
283
|
+
- new Date(b.RoomRateInformation.RoomDate).valueOf();
|
|
284
|
+
});
|
|
285
|
+
var reservationType = Number(Allotment.UseDiv) === 1
|
|
286
|
+
&& BasicInformation.CheckInDate === BasicInformation.CheckOutDate
|
|
287
|
+
? 'rent'
|
|
288
|
+
: 'lodge';
|
|
243
289
|
var CheckInDate = roomsSortedByDate[0].RoomRateInformation.RoomDate;
|
|
244
290
|
var CheckOutDate = (_a = (0, moment_1.default)(CheckInDate)
|
|
245
291
|
.add(BasicInformation === null || BasicInformation === void 0 ? void 0 : BasicInformation.Nights, 'days')) === null || _a === void 0 ? void 0 : _a.format('YYYY-MM-DD');
|
|
246
|
-
var OptionList = Option
|
|
292
|
+
var OptionList = Option
|
|
293
|
+
? (0, tl_lincoln_types_1.makeArray)(Option)
|
|
294
|
+
: [];
|
|
247
295
|
var DepositList = (BasicRate === null || BasicRate === void 0 ? void 0 : BasicRate.DepositList) && (0, tl_lincoln_types_1.makeArray)(BasicRate.DepositList);
|
|
248
296
|
var paymentInfo = makePaymentInfo({
|
|
249
297
|
datas: datas,
|
|
@@ -255,14 +303,22 @@ var refineReservationData = function (infoTravelXML) {
|
|
|
255
303
|
roomsSortedByDate: roomsSortedByDate,
|
|
256
304
|
});
|
|
257
305
|
return {
|
|
258
|
-
useStartAt: "".concat(CheckInDate).concat((BasicInformation === null || BasicInformation === void 0 ? void 0 : BasicInformation.CheckInTime)
|
|
259
|
-
|
|
306
|
+
useStartAt: "".concat(CheckInDate).concat((BasicInformation === null || BasicInformation === void 0 ? void 0 : BasicInformation.CheckInTime)
|
|
307
|
+
? " ".concat(BasicInformation === null || BasicInformation === void 0 ? void 0 : BasicInformation.CheckInTime)
|
|
308
|
+
: ''),
|
|
309
|
+
useExpireAt: "".concat(CheckOutDate).concat((BasicInformation === null || BasicInformation === void 0 ? void 0 : BasicInformation.CheckOutTime)
|
|
310
|
+
? " ".concat(BasicInformation === null || BasicInformation === void 0 ? void 0 : BasicInformation.CheckOutTime)
|
|
311
|
+
: ''),
|
|
260
312
|
sleeps: (_c = (_b = roomsSortedByDate[0]) === null || _b === void 0 ? void 0 : _b.RoomInformation) === null || _c === void 0 ? void 0 : _c.PerRoomPaxCount,
|
|
261
|
-
guestName: "".concat(BasicInformation.GuestOrGroupNameSingleByte
|
|
313
|
+
guestName: "".concat(BasicInformation.GuestOrGroupNameSingleByte
|
|
314
|
+
|| BasicInformation.GuestOrGroupNameKanjiName
|
|
315
|
+
|| 'Anonymous').concat(isGroupReservation ? " ".concat(index + 1) : ''),
|
|
262
316
|
externalPlatformCode: SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCode,
|
|
263
|
-
externalPlatformName: (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName)
|
|
317
|
+
externalPlatformName: (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeCompanyName)
|
|
318
|
+
|| (SalesOfficeInformation === null || SalesOfficeInformation === void 0 ? void 0 : SalesOfficeInformation.SalesOfficeName),
|
|
264
319
|
cmsOtaNumber: "".concat(BasicInformation.TravelAgencyBookingNumber).concat(isGroupReservation ? "-v".concat(index + 1) : ''),
|
|
265
|
-
cmsProductName: roomsSortedByDate[0].RoomInformation.RoomTypeName
|
|
320
|
+
cmsProductName: roomsSortedByDate[0].RoomInformation.RoomTypeName
|
|
321
|
+
|| BasicInformation.PackagePlanName,
|
|
266
322
|
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),
|
|
267
323
|
otaNumber: "".concat(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), "|").concat((_d = "".concat(BasicInformation.TravelAgencyBookingNumber)) === null || _d === void 0 ? void 0 : _d.slice(-4)),
|
|
268
324
|
externalRoomTypeCode: roomsSortedByDate[0].RoomInformation.NetRmTypeGroupCode,
|
|
@@ -270,11 +326,21 @@ var refineReservationData = function (infoTravelXML) {
|
|
|
270
326
|
type: reservationType,
|
|
271
327
|
phone: formatPhoneNumber("".concat((Member === null || Member === void 0 ? void 0 : Member.UserTel) || Basic.PhoneNumber || '')),
|
|
272
328
|
status: status,
|
|
273
|
-
memoContent: "".concat((Member === null || Member === void 0 ? void 0 : Member.UserKana)
|
|
329
|
+
memoContent: "".concat((Member === null || Member === void 0 ? void 0 : Member.UserKana)
|
|
330
|
+
|| (Member === null || Member === void 0 ? void 0 : Member.UserName)
|
|
331
|
+
|| "".concat(BasicInformation.GuestOrGroupNameKanjiName), " ").concat(roomsSortedByDate[0].RoomInformation.RoomTypeName
|
|
332
|
+
|| BasicInformation.PackagePlanName, "\n").concat((OtherInfo === null || OtherInfo === void 0 ? void 0 : OtherInfo.GuestRequest)
|
|
333
|
+
? "[\uC694\uCCAD\uC0AC\uD56D]\n".concat(OtherInfo.GuestRequest)
|
|
334
|
+
: '', "\n").concat((OtherInfo === null || OtherInfo === void 0 ? void 0 : OtherInfo.AdditionalInformation)
|
|
335
|
+
? "[\uCD94\uAC00\uC815\uBCF4]\n".concat(OtherInfo.AdditionalInformation)
|
|
336
|
+
: '', "\n[\uC778\uC6D0\uC815\uBCF4]\n").concat((0, exports.formattedPaxCountText)(roomsSortedByDate[0].RoomInformation), "\n").concat((OptionList === null || OptionList === void 0 ? void 0 : OptionList.length) > 0
|
|
337
|
+
? "[\uC635\uC158]\n".concat(OptionList.map(function (option) { return "".concat(option.Name, ": ").concat(option.OptionCount, "(").concat(option.OptionDate, ")"); }).join('\n'))
|
|
338
|
+
: ''),
|
|
274
339
|
paymentInfo: Object.assign(paymentInfo, !isFullyPaid && {
|
|
275
340
|
amount: (DepositList === null || DepositList === void 0 ? void 0 : DepositList.reduce(function (acc, deposit) { return acc + ((deposit === null || deposit === void 0 ? void 0 : deposit.DepositAmount) || 0); }, 0)) || 0,
|
|
276
341
|
isFullyPaid: false,
|
|
277
|
-
outstandingAmount: paymentInfo.amount
|
|
342
|
+
outstandingAmount: paymentInfo.amount
|
|
343
|
+
- ((DepositList === null || DepositList === void 0 ? void 0 : DepositList.reduce(function (acc, deposit) { return acc + ((deposit === null || deposit === void 0 ? void 0 : deposit.DepositAmount) || 0); }, 0)) || 0),
|
|
278
344
|
}),
|
|
279
345
|
};
|
|
280
346
|
}),
|
|
@@ -296,7 +362,9 @@ var withAsyncBandwidth = function (array, asyncMapper, _a) {
|
|
|
296
362
|
var currentEntry = entries.pop();
|
|
297
363
|
var currentIndex = index;
|
|
298
364
|
var beforeResponse = chainedResponses[iterator];
|
|
299
|
-
chainedResponses[iterator] = beforeResponse.then(function () {
|
|
365
|
+
chainedResponses[iterator] = beforeResponse.then(function () {
|
|
366
|
+
return asyncMapper(currentEntry, currentIndex);
|
|
367
|
+
});
|
|
300
368
|
index += 1;
|
|
301
369
|
if (iterator < bandwidth - 1) {
|
|
302
370
|
iterator += 1;
|
|
@@ -59,6 +59,7 @@ var TlLincolnOta;
|
|
|
59
59
|
TlLincolnOta["MYREALTRIP"] = "Myrealtrip";
|
|
60
60
|
TlLincolnOta["YANOLJA"] = "Yanolja";
|
|
61
61
|
TlLincolnOta["T_MON"] = "T-mon";
|
|
62
|
+
TlLincolnOta["TRIPDOTCOM"] = "Trip.com Group(new)";
|
|
62
63
|
})(TlLincolnOta || (TlLincolnOta = {}));
|
|
63
64
|
exports.TL_LINCOLN_TO_VENDIT_OTA_MAP = (_a = {},
|
|
64
65
|
_a[TlLincolnOta.JEJU_COM] = 'Jeju.com',
|
|
@@ -116,4 +117,5 @@ exports.TL_LINCOLN_TO_VENDIT_OTA_MAP = (_a = {},
|
|
|
116
117
|
_a[TlLincolnOta.MYREALTRIP] = 'MYREALTRIP',
|
|
117
118
|
_a[TlLincolnOta.YANOLJA] = 'YANOLJA',
|
|
118
119
|
_a[TlLincolnOta.T_MON] = 'TMON',
|
|
120
|
+
_a[TlLincolnOta.TRIPDOTCOM] = 'TRIPDOTCOM',
|
|
119
121
|
_a);
|