Skip to content

Commit

Permalink
[TBB-194]: Take room_rate_id when there are package_options && clean …
Browse files Browse the repository at this point in the history
…up (#26)

* Reorder the grouping of tests

* Get room rate id from package_option when there is

Co-authored-by: moixons <[email protected]>
  • Loading branch information
moixons and moixons authored Jun 24, 2021
1 parent b2a54f9 commit 0fc432f
Show file tree
Hide file tree
Showing 4 changed files with 368 additions and 385 deletions.
2 changes: 1 addition & 1 deletion compiled/offer/flexiNights.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var generatePackageOption = function generatePackageOption(packageOption, offerP
packageId: packageOption.id || offerPackage.id,
extraNights: extraNights,
roomTypeId: offerPackage.fk_room_type_id || undefined,
roomRateId: offerPackage.fk_room_rate_id || undefined,
roomRateId: packageOption.fk_room_rate_id || offerPackage.fk_room_rate_id || undefined,
name: packageOption.name || offerPackage.name,
duration: calculateDuration(offerPackageDuration, extraNights),
prices: calculatePackagePrices(offerPackagePrices, extraNights)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luxuryescapes/lib-global",
"version": "2.2.8",
"version": "2.2.9",
"description": "Lib for expanding functionality and deduplicating code between services",
"main": "compiled/index.js",
"homepage": "https://github.com/brandsExclusive/lib-global#readme",
Expand Down
2 changes: 1 addition & 1 deletion src/offer/flexiNights.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const generatePackageOption = (packageOption, offerPackage, extraNights) => {
packageId: packageOption.id || offerPackage.id,
extraNights: extraNights,
roomTypeId: offerPackage.fk_room_type_id || undefined,
roomRateId: offerPackage.fk_room_rate_id || undefined,
roomRateId: packageOption.fk_room_rate_id || offerPackage.fk_room_rate_id || undefined,
name: packageOption.name || offerPackage.name,
duration: calculateDuration(offerPackageDuration, extraNights),
prices: calculatePackagePrices(offerPackagePrices, extraNights),
Expand Down
Loading

0 comments on commit 0fc432f

Please sign in to comment.