turf-common 1.1.1-beta.23 → 1.1.1-beta.24
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.
|
@@ -6,12 +6,13 @@ import { ITimeFormatter } from "../interface/time-formatter.interface";
|
|
|
6
6
|
export declare class BookingCode {
|
|
7
7
|
code: string;
|
|
8
8
|
turfId: string;
|
|
9
|
-
|
|
9
|
+
pitchCode: string;
|
|
10
10
|
slot: string;
|
|
11
11
|
fromTimeCode: string;
|
|
12
12
|
toTimeCode: string;
|
|
13
13
|
dateCode: string;
|
|
14
14
|
cost: string;
|
|
15
|
+
pitchNumber: number;
|
|
15
16
|
constructor(code: string, cost?: string);
|
|
16
17
|
parse(): BookingCode;
|
|
17
18
|
getBookingTimeInMinutes(): number;
|
|
@@ -39,7 +39,8 @@ var BookingCode = /** @class */ (function () {
|
|
|
39
39
|
this.slot = matches[3];
|
|
40
40
|
this.fromTimeCode = matches[3].slice(0, 4);
|
|
41
41
|
this.toTimeCode = matches[3].slice(4, 8);
|
|
42
|
-
this.
|
|
42
|
+
this.pitchCode = matches[4];
|
|
43
|
+
this.pitchNumber = Number(matches[4]);
|
|
43
44
|
return this;
|
|
44
45
|
};
|
|
45
46
|
BookingCode.prototype.getBookingTimeInMinutes = function () {
|
|
@@ -51,7 +52,7 @@ var BookingCode = /** @class */ (function () {
|
|
|
51
52
|
return toHours * 60 + toMinutes - (fromHours * 60 + fromMinutes);
|
|
52
53
|
};
|
|
53
54
|
BookingCode.prototype.getPitchNo = function () {
|
|
54
|
-
return parseInt(this.
|
|
55
|
+
return parseInt(this.pitchCode);
|
|
55
56
|
};
|
|
56
57
|
BookingCode.prototype.getHalfHourTimeCodes = function () {
|
|
57
58
|
return new time_slot_model_1.TimeSlot(this.fromTimeCode, this.toTimeCode).getHalfHourTimeCodes();
|
|
@@ -101,7 +102,7 @@ var BookingCode = /** @class */ (function () {
|
|
|
101
102
|
return "".concat(this.dateCode).concat(this.fromTimeCode);
|
|
102
103
|
};
|
|
103
104
|
BookingCode.prototype.getCodeWithoutTurfCode = function () {
|
|
104
|
-
return "".concat(this.dateCode).concat(this.slot).concat(this.
|
|
105
|
+
return "".concat(this.dateCode).concat(this.slot).concat(this.pitchCode);
|
|
105
106
|
};
|
|
106
107
|
BookingCode.sortByCode = function (bookingCodes) {
|
|
107
108
|
bookingCodes.sort(function (_a, _b) {
|