@hyper.software/common-helpers 1.0.69 → 1.0.71
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Moment } from 'moment';
|
|
2
|
-
import { IBooking, ICompany, IRoom, IRoomBooking, IRoomTypePricePlan, IRoomTypePricePlanPricingInformation, IRoomTypePricePlanPricingRules } from '@hyper.software/common-models/lib/interfaces';
|
|
2
|
+
import { BOOKING_SOURCE, IBooking, ICompany, IRoom, IRoomBooking, IRoomTypePricePlan, IRoomTypePricePlanPricingInformation, IRoomTypePricePlanPricingRules } from '@hyper.software/common-models/lib/interfaces';
|
|
3
3
|
export declare const getDefaultRoomTypePricePlan: (roomTypePricePlans: IRoomTypePricePlan[]) => IRoomTypePricePlan;
|
|
4
|
+
export declare const getRoomTypePricePlanByType: (roomTypePricePlans: IRoomTypePricePlan[], bookingSource: BOOKING_SOURCE) => IRoomTypePricePlan;
|
|
4
5
|
export declare const getTotalCostForRoomBooking: (roomBooking: IRoomBooking & {
|
|
5
6
|
price?: number;
|
|
6
7
|
pricingRules?: IRoomTypePricePlanPricingRules;
|
|
@@ -9,7 +10,6 @@ export declare const getTotalCostForRoomBooking: (roomBooking: IRoomBooking & {
|
|
|
9
10
|
export declare const getServicesCost: (booking: IBooking) => number;
|
|
10
11
|
export declare const getLengthOfStayRoomBooking: (roomBooking: IRoomBooking) => number;
|
|
11
12
|
export declare const getBreakfastCost: (roomBooking: IRoomBooking) => number;
|
|
12
|
-
export declare const getCompanyDiscount: (company: ICompany, lengthOfStay: any, totalCost: number) => number;
|
|
13
13
|
export declare const getAccommodationCost: (roomBookings: Array<{
|
|
14
14
|
roomId?: string;
|
|
15
15
|
breakfastIncluded?: boolean;
|
|
@@ -18,5 +18,3 @@ export declare const getAccommodationCost: (roomBookings: Array<{
|
|
|
18
18
|
personsPayingBreakfast?: number;
|
|
19
19
|
room?: IRoom;
|
|
20
20
|
}>, _checkinDate: Moment, _checkoutDate: Moment, numberOfAdults: number, booking?: IBooking, company?: ICompany) => number;
|
|
21
|
-
export declare const ensureValueIsNumber: (value: string | number, isDouble?: boolean) => number | null;
|
|
22
|
-
export declare const removeInvalidCharacters: (value: string, isDouble: boolean) => string;
|
|
@@ -35,7 +35,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
35
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.
|
|
38
|
+
exports.getAccommodationCost = exports.getBreakfastCost = exports.getLengthOfStayRoomBooking = exports.getServicesCost = exports.getTotalCostForRoomBooking = exports.getRoomTypePricePlanByType = exports.getDefaultRoomTypePricePlan = void 0;
|
|
39
39
|
var moment_1 = __importDefault(require("moment"));
|
|
40
40
|
var helpers_1 = require("../../helpers");
|
|
41
41
|
var interfaces_1 = require("@hyper.software/common-models/lib/interfaces");
|
|
@@ -48,6 +48,14 @@ var getDefaultRoomTypePricePlan = function (roomTypePricePlans) {
|
|
|
48
48
|
roomTypePricePlans.find(function (roomTypePricePlan) { return roomTypePricePlan.type === interfaces_1.CHANNEL_TYPE.DEFAULT; }));
|
|
49
49
|
};
|
|
50
50
|
exports.getDefaultRoomTypePricePlan = getDefaultRoomTypePricePlan;
|
|
51
|
+
var getRoomTypePricePlanByType = function (roomTypePricePlans, bookingSource) {
|
|
52
|
+
if (!Array.isArray(roomTypePricePlans)) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return (roomTypePricePlans.find(function (roomTypePricePlan) { return roomTypePricePlan.type === bookingSource; }) ||
|
|
56
|
+
(0, exports.getDefaultRoomTypePricePlan)(roomTypePricePlans));
|
|
57
|
+
};
|
|
58
|
+
exports.getRoomTypePricePlanByType = getRoomTypePricePlanByType;
|
|
51
59
|
var getTotalCostForRoomBooking = function (roomBooking, checkinDate, checkoutDate, numberOfAdults) {
|
|
52
60
|
var _a, _b, _c;
|
|
53
61
|
if (!roomBooking) {
|
|
@@ -72,7 +80,7 @@ var getTotalCostForRoomBooking = function (roomBooking, checkinDate, checkoutDat
|
|
|
72
80
|
}
|
|
73
81
|
var pricingInfo = roomBooking.pricingInformation || {};
|
|
74
82
|
var dateKey = checkinDate.format(helpers_1.DATE_FORMATS.YYYY_MM_DD);
|
|
75
|
-
var cost = roomBooking.pricePerNight ||
|
|
83
|
+
var cost = roomBooking.pricePerNight || ensureValueIsNumber(pricingInfo[dateKey]);
|
|
76
84
|
var calculation = actualNumberOfAdults === maxNumberOfAdults || !(discountOrIncrease === null || discountOrIncrease === void 0 ? void 0 : discountOrIncrease.value)
|
|
77
85
|
? cost
|
|
78
86
|
: (discountOrIncrease === null || discountOrIncrease === void 0 ? void 0 : discountOrIncrease.type) === interfaces_1.DISCOUNT_TYPE.PERCENTAGE
|
|
@@ -156,7 +164,6 @@ var getCompanyDiscount = function (company, lengthOfStay, totalCost) {
|
|
|
156
164
|
}
|
|
157
165
|
return totalCost;
|
|
158
166
|
};
|
|
159
|
-
exports.getCompanyDiscount = getCompanyDiscount;
|
|
160
167
|
var getAccommodationCost = function (roomBookings, _checkinDate, _checkoutDate, numberOfAdults, booking, company) {
|
|
161
168
|
if (!_checkinDate || !_checkoutDate) {
|
|
162
169
|
return null;
|
|
@@ -170,7 +177,7 @@ var getAccommodationCost = function (roomBookings, _checkinDate, _checkoutDate,
|
|
|
170
177
|
totalCost += costForRoomBooking;
|
|
171
178
|
if (company) {
|
|
172
179
|
var lengthOfStay = checkoutDate.diff(checkinDate, 'days');
|
|
173
|
-
totalCost =
|
|
180
|
+
totalCost = getCompanyDiscount(company, lengthOfStay, totalCost);
|
|
174
181
|
}
|
|
175
182
|
if (booking && company) {
|
|
176
183
|
totalCost += calculateTourismTaxCost(booking, company);
|
|
@@ -190,12 +197,11 @@ var ensureValueIsNumber = function (value, isDouble) {
|
|
|
190
197
|
if (value === '-') {
|
|
191
198
|
return null;
|
|
192
199
|
}
|
|
193
|
-
if (!isNaN(parseFloat(
|
|
194
|
-
return parseFloat(
|
|
200
|
+
if (!isNaN(parseFloat(removeInvalidCharacters(value, isDouble)))) {
|
|
201
|
+
return parseFloat(removeInvalidCharacters(value, isDouble));
|
|
195
202
|
}
|
|
196
203
|
return null;
|
|
197
204
|
};
|
|
198
|
-
exports.ensureValueIsNumber = ensureValueIsNumber;
|
|
199
205
|
var removeInvalidCharacters = function (value, isDouble) {
|
|
200
206
|
var valWithNoInvalidChars = (value || '')
|
|
201
207
|
.replace(/[^0-9,.-]/g, '')
|
|
@@ -206,5 +212,4 @@ var removeInvalidCharacters = function (value, isDouble) {
|
|
|
206
212
|
}
|
|
207
213
|
return valWithNoInvalidChars.replace(/,/g, '');
|
|
208
214
|
};
|
|
209
|
-
exports.removeInvalidCharacters = removeInvalidCharacters;
|
|
210
215
|
//# sourceMappingURL=bookingsService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookingsService.js","sourceRoot":"","sources":["../../../src/services/bookingService/bookingsService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuC;AACvC,yCAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"bookingsService.js","sourceRoot":"","sources":["../../../src/services/bookingService/bookingsService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAuC;AACvC,yCAAqD;AACrD,2EAYqD;AACrD,sEAAyD;AAElD,IAAM,2BAA2B,GAAG,UAAC,kBAAwC;IAClF,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;QACtC,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,CACL,kBAAkB,CAAC,IAAI,CAAC,UAAC,iBAAiB,IAAK,OAAA,iBAAiB,CAAC,IAAI,KAAK,yBAAY,CAAC,OAAO,EAA/C,CAA+C,CAAC;QAC/F,kBAAkB,CAAC,I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