turf-common 1.4.2-beta.28 → 1.4.2-beta.29
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,9 +1,10 @@
|
|
|
1
|
+
import { WeekdayTimeSlot } from "../../@model";
|
|
1
2
|
import { ChargesModel } from "../../models/charge-model";
|
|
2
3
|
import { IBookingDetailsEntity } from "../entity/booking-details-entity.interface";
|
|
3
4
|
export interface IEventBookingDetails {
|
|
4
5
|
startDateCode: number;
|
|
5
6
|
endDateCode: number;
|
|
6
|
-
weekdaySlots:
|
|
7
|
+
weekdaySlots: WeekdayTimeSlot[];
|
|
7
8
|
pitchIds: number[];
|
|
8
9
|
}
|
|
9
10
|
export interface IBookingDetailsModel extends IBookingDetailsEntity {
|
|
@@ -13,6 +13,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.BookingDetailsModel = void 0;
|
|
15
15
|
var booking_entity_model_1 = require("./booking-entity-model");
|
|
16
|
+
var weekday_time_slot_model_1 = require("../weekday-time-slot-model");
|
|
16
17
|
var BookingDetailsModel = /** @class */ (function () {
|
|
17
18
|
function BookingDetailsModel(data) {
|
|
18
19
|
Object.assign(this, data);
|
|
@@ -23,7 +24,7 @@ var BookingDetailsModel = /** @class */ (function () {
|
|
|
23
24
|
var startDateCode = Number(this.type.split("#")[1].split(",")[0]);
|
|
24
25
|
var endDateCode = Number(this.type.split("#")[1].split(",")[1]);
|
|
25
26
|
var pitchIds = this.type.split("#")[3].split(",").map(Number);
|
|
26
|
-
var weekdaySlots = this.type.split("#")[2].split(",").map(
|
|
27
|
+
var weekdaySlots = this.type.split("#")[2].split(",").map(function (weekdayTimeSlotCode) { return new weekday_time_slot_model_1.WeekdayTimeSlot(weekdayTimeSlotCode); });
|
|
27
28
|
return {
|
|
28
29
|
startDateCode: startDateCode,
|
|
29
30
|
endDateCode: endDateCode,
|
|
@@ -11,20 +11,19 @@ var WeekdayTimeSlot = /** @class */ (function () {
|
|
|
11
11
|
}
|
|
12
12
|
WeekdayTimeSlot.prototype.parse = function () {
|
|
13
13
|
this.weekday = parseInt(this.code.slice(0, 1));
|
|
14
|
-
this.
|
|
15
|
-
this.toTimeCode = this.code.slice(5, 9);
|
|
14
|
+
this.timeSlot = new time_slot_model_1.TimeSlot(this.code.slice(1, 5), this.code.slice(5, 9));
|
|
16
15
|
};
|
|
17
16
|
WeekdayTimeSlot.prototype.getWeekday = function () {
|
|
18
17
|
return this.weekday;
|
|
19
18
|
};
|
|
20
19
|
WeekdayTimeSlot.prototype.getFromTimeCode = function () {
|
|
21
|
-
return this.
|
|
20
|
+
return this.timeSlot.fromTime;
|
|
22
21
|
};
|
|
23
22
|
WeekdayTimeSlot.prototype.getToTimeCode = function () {
|
|
24
|
-
return this.
|
|
23
|
+
return this.timeSlot.toTime;
|
|
25
24
|
};
|
|
26
25
|
WeekdayTimeSlot.prototype.getTimeSlot = function () {
|
|
27
|
-
return
|
|
26
|
+
return this.timeSlot;
|
|
28
27
|
};
|
|
29
28
|
return WeekdayTimeSlot;
|
|
30
29
|
}());
|