turf-common 1.2.1-beta.53 → 1.2.1-beta.55
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.
|
@@ -172,7 +172,7 @@ var TurfAvailability = /** @class */ (function () {
|
|
|
172
172
|
return this.getTotalAvailableHours() + this.getTotalNonAvailableHours();
|
|
173
173
|
};
|
|
174
174
|
TurfAvailability.prototype.getCode = function () {
|
|
175
|
-
return "event#".concat(this.dateCodes[0]).concat(this.dateCodes[this.dateCodes.length - 1], "#").concat(this.timeSlotCodesDateWise[this.dateCodes[0]][0].slice(0, 4)).concat(this.timeSlotCodesDateWise[this.dateCodes[0]][this.timeSlotCodesDateWise[this.dateCodes[0]].length - 1].slice(4, 8), "#").concat(this.getPitchIds());
|
|
175
|
+
return "event#".concat(this.dateCodes[0]).concat(this.dateCodes[this.dateCodes.length - 1], "#").concat(this.timeSlotCodesDateWise[this.dateCodes[0]][0].slice(0, 4)).concat(this.timeSlotCodesDateWise[this.dateCodes[0]][this.timeSlotCodesDateWise[this.dateCodes[0]].length - 1].slice(4, 8), "#").concat(this.getPitchIds(), "#").concat(this.weekDays);
|
|
176
176
|
};
|
|
177
177
|
TurfAvailability.prototype.parse = function () {
|
|
178
178
|
var eventCode = this.getCode();
|
|
@@ -186,7 +186,7 @@ var TurfAvailability = /** @class */ (function () {
|
|
|
186
186
|
this.toTimeCode = timeCodeRange.slice(4, 8);
|
|
187
187
|
this.weekDays = Array.from(new Set(this.dateCodes.map(function (dateCode) {
|
|
188
188
|
return booking_code_model_1.BookingCode.getWeekday(Number(dateCode));
|
|
189
|
-
})));
|
|
189
|
+
}))).sort();
|
|
190
190
|
};
|
|
191
191
|
TurfAvailability.parse = function (eventCode) {
|
|
192
192
|
var eventCodes = eventCode.split("#");
|
|
@@ -198,6 +198,7 @@ var TurfAvailability = /** @class */ (function () {
|
|
|
198
198
|
endDateCode: dateCodeRange.slice(6, 12),
|
|
199
199
|
fromTimeCode: timeCodeRange.slice(0, 4),
|
|
200
200
|
toTimeCode: timeCodeRange.slice(4, 8),
|
|
201
|
+
weekDays: eventCodes[4].split(",").map(Number),
|
|
201
202
|
};
|
|
202
203
|
};
|
|
203
204
|
return TurfAvailability;
|