@myclub_se/data-access 2.5.11 → 2.5.12

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.
@@ -373,12 +373,13 @@ class BookingCalendarSlotSession {
373
373
  }
374
374
 
375
375
  class BookingSettings {
376
- constructor(id, club_id, calendar_step, calendar_min_time, calendar_max_time) {
376
+ constructor(id, club_id, calendar_step, calendar_min_time, calendar_max_time, should_split_booking_into_zones) {
377
377
  this.id = id;
378
378
  this.club_id = club_id;
379
379
  this.calendar_step = calendar_step;
380
380
  this.calendar_min_time = calendar_min_time;
381
381
  this.calendar_max_time = calendar_max_time;
382
+ this.should_split_booking_into_zones = should_split_booking_into_zones;
382
383
  }
383
384
  static asFormGroup(settings) {
384
385
  return new FormGroup({
@@ -387,6 +388,7 @@ class BookingSettings {
387
388
  calendar_step: new FormControl(settings?.calendar_step || '01:00:00', [Validators.required]),
388
389
  calendar_min_time: new FormControl(settings?.calendar_min_time || '00:00:00', [Validators.required]),
389
390
  calendar_max_time: new FormControl(settings?.calendar_max_time || '23:00:00', [Validators.required]),
391
+ should_split_booking_into_zones: new FormControl(typeof settings?.should_split_booking_into_zones !== 'undefined' ? settings?.should_split_booking_into_zones : true, [Validators.required]),
390
392
  });
391
393
  }
392
394
  }
@@ -1485,7 +1487,7 @@ const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new Booking
1485
1487
 
1486
1488
  const bookingCalendarSlotFactory = (apiBookingSlot) => new BookingCalendarSlot(apiBookingSlot.id, apiBookingSlot.calendar_id, apiBookingSlot.location_id, apiBookingSlot.color, apiBookingSlot.day, apiBookingSlot.end_time, apiBookingSlot.group_id, apiBookingSlot.location_name, apiBookingSlot.number_of_available_sessions, apiBookingSlot.sessions && apiBookingSlot.sessions.length ? apiBookingSlot.sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.open_sessions && apiBookingSlot.open_sessions.length ? apiBookingSlot.open_sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.start_time, apiBookingSlot.type, 'none', false, false, 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiBookingSlot.reserved_time, apiBookingSlot.reserved_time_position, apiBookingSlot.application_times && apiBookingSlot.application_times.length ? apiBookingSlot.application_times.map((apiBookingApplicationTime) => bookingCalendarApplicationTimeFactory(apiBookingApplicationTime)) : []);
1487
1489
 
1488
- const bookingSettingsFactory = (apiBookingSettings) => new BookingSettings(apiBookingSettings.id, apiBookingSettings.club_id, apiBookingSettings.calendar_step, apiBookingSettings.calendar_min_time, apiBookingSettings.calendar_max_time);
1490
+ const bookingSettingsFactory = (apiBookingSettings) => new BookingSettings(apiBookingSettings.id, apiBookingSettings.club_id, apiBookingSettings.calendar_step, apiBookingSettings.calendar_min_time, apiBookingSettings.calendar_max_time, apiBookingSettings.should_split_booking_into_zones);
1489
1491
 
1490
1492
  const imageUrlsFactory = (apiImageUrls) => new ImageUrls(apiImageUrls.lg, apiImageUrls.md, apiImageUrls.raw, apiImageUrls.sm, apiImageUrls.xs);
1491
1493