turf-common 1.4.2-beta.5 → 1.4.2-beta.7

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.
@@ -157,7 +157,7 @@ var BookingCode = /** @class */ (function () {
157
157
  discount = parseFloat(couponCode) * totalBookingHours;
158
158
  }
159
159
  }
160
- discountedCost = totalCost - discount;
160
+ discountedCost = totalCost - Math.round(discount);
161
161
  return Math.round(discountedCost);
162
162
  };
163
163
  BookingCode.getDiscountAmount = function (couponCode, totalCost) {
@@ -11,4 +11,5 @@ export declare class PitchSlabModelV2 implements IPitchSlabV2 {
11
11
  from: number;
12
12
  to: number;
13
13
  constructor(data: IPitchSlabV2);
14
+ getRange(): string;
14
15
  }
@@ -27,6 +27,21 @@ var PitchSlabModelV2 = /** @class */ (function () {
27
27
  this.to = data.to;
28
28
  // this.discount = data.discount;
29
29
  }
30
+ // public getDiscount(): number {
31
+ // if (this.discount.indexOf("P") > -1) {
32
+ // return parseFloat(this.discount.replace("P", ""));
33
+ // }
34
+ // return 0;
35
+ // }
36
+ // public getBasePrice(basePrice: number): number {
37
+ // return basePrice * (1 - this.getDiscount() / 100);
38
+ // }
39
+ PitchSlabModelV2.prototype.getRange = function () {
40
+ if (this.to >= 99) {
41
+ return "".concat(this.from - 1, "+");
42
+ }
43
+ return "".concat(this.from, "-").concat(this.to);
44
+ };
30
45
  return PitchSlabModelV2;
31
46
  }());
32
47
  exports.PitchSlabModelV2 = PitchSlabModelV2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.4.2-beta.5",
3
+ "version": "1.4.2-beta.7",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",