@myclub_se/data-access 2.2.2 → 2.2.3

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.
@@ -258,7 +258,7 @@ class BookingCalendar {
258
258
  }
259
259
 
260
260
  class BookingCalendarSlot {
261
- constructor(id, calendar_id, location_id, color, day, end_time, group_id, location_name, number_of_available_sessions, sessions, open_sessions, start_time, type, repeat, update_repeating, reserved_time_enabled, repeat_num, repeat_to_day, repeat_type, reserved_time, reserved_time_type, reserved_time_position) {
261
+ constructor(id, calendar_id, location_id, color, day, end_time, group_id, location_name, number_of_available_sessions, sessions, open_sessions, start_time, type, repeat, update_repeating, reserved_time_enabled, available_location_zones, repeat_num, repeat_to_day, repeat_type, reserved_time, reserved_time_type, reserved_time_position) {
262
262
  this.id = id;
263
263
  this.calendar_id = calendar_id;
264
264
  this.location_id = location_id;
@@ -275,6 +275,7 @@ class BookingCalendarSlot {
275
275
  this.repeat = repeat;
276
276
  this.update_repeating = update_repeating;
277
277
  this.reserved_time_enabled = reserved_time_enabled;
278
+ this.available_location_zones = available_location_zones;
278
279
  this.repeat_num = repeat_num;
279
280
  this.repeat_to_day = repeat_to_day;
280
281
  this.repeat_type = repeat_type;
@@ -302,12 +303,13 @@ class BookingCalendarSlot {
302
303
  reserved_time: new FormControl(slot?.reserved_time || '00:00'),
303
304
  reserved_time_type: new FormControl(slot?.reserved_time_type || ''),
304
305
  reserved_time_position: new FormControl(slot?.reserved_time_position || ''),
306
+ available_location_zones: new FormControl(slot?.available_location_zones || 1, [Validators.min(1), Validators.required]),
305
307
  });
306
308
  }
307
309
  }
308
310
 
309
311
  class BookingCalendarSlotSession {
310
- constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name, is_overbooked, type) {
312
+ constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name, is_overbooked, type, location_zones_taken) {
311
313
  this.id = id;
312
314
  this.section_id = section_id;
313
315
  this.slot_id = slot_id;
@@ -318,6 +320,7 @@ class BookingCalendarSlotSession {
318
320
  this.team_name = team_name;
319
321
  this.is_overbooked = is_overbooked;
320
322
  this.type = type;
323
+ this.location_zones_taken = location_zones_taken;
321
324
  }
322
325
  static asFormGroup(session) {
323
326
  return new FormGroup({
@@ -330,7 +333,8 @@ class BookingCalendarSlotSession {
330
333
  start_time: new FormControl(session?.start_time || '', Validators.required),
331
334
  team_name: new FormControl(session?.team_name || ''),
332
335
  is_overbooked: new FormControl(session?.is_overbooked || false),
333
- type: new FormControl(session?.type || '')
336
+ type: new FormControl(session?.type || ''),
337
+ location_zones_taken: new FormControl(session?.location_zones_taken || 1, [Validators.min(1), Validators.required])
334
338
  });
335
339
  }
336
340
  }
@@ -1047,11 +1051,12 @@ class MemberPublicForm {
1047
1051
  }
1048
1052
 
1049
1053
  class MemberTeam {
1050
- constructor(club, section, id, email, name, phone, section_name) {
1054
+ constructor(club, section, id, email, has_extra_members, name, phone, section_name) {
1051
1055
  this.club = club;
1052
1056
  this.section = section;
1053
1057
  this.id = id;
1054
1058
  this.email = email;
1059
+ this.has_extra_members = has_extra_members;
1055
1060
  this.name = name;
1056
1061
  this.phone = phone;
1057
1062
  this.section_name = section_name;
@@ -1399,7 +1404,7 @@ const memberPublicFormFactory = (apiMemberPublicForm) => new MemberPublicForm(ap
1399
1404
 
1400
1405
  const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
1401
1406
 
1402
- const memberTeamFactory = (apiMemberTeam) => new MemberTeam(clubFactory(apiMemberTeam.club), apiMemberTeam.section ? sectionFactory(apiMemberTeam.section) : null, apiMemberTeam.id, apiMemberTeam.email, apiMemberTeam.name, apiMemberTeam.phone, apiMemberTeam.section_name);
1407
+ const memberTeamFactory = (apiMemberTeam) => new MemberTeam(clubFactory(apiMemberTeam.club), apiMemberTeam.section ? sectionFactory(apiMemberTeam.section) : null, apiMemberTeam.id, apiMemberTeam.email, apiMemberTeam.has_extra_members, apiMemberTeam.name, apiMemberTeam.phone, apiMemberTeam.section_name);
1403
1408
 
1404
1409
  const memberTeamThroughFactory = (apiMemberTeamThrough) => new MemberTeamThrough(apiMemberTeamThrough.id, apiMemberTeamThrough.created, apiMemberTeamThrough.date_hidden, apiMemberTeamThrough.image, apiMemberTeamThrough.leader, memberFactory(apiMemberTeamThrough.member), apiMemberTeamThrough.role_id, apiMemberTeamThrough.show_on_web, apiMemberTeamThrough.updated);
1405
1410
 
@@ -1731,9 +1736,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
1731
1736
 
1732
1737
  const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBookingCalendar.id, apiBookingCalendar.club_id, apiBookingCalendar.section_id, apiBookingCalendar.team_id, apiBookingCalendar.club_name, apiBookingCalendar.color, apiBookingCalendar.name, apiBookingCalendar.section_name, apiBookingCalendar.team_name);
1733
1738
 
1734
- const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name, apiBookingSlotSession.is_overbooked, apiBookingSlotSession.type);
1739
+ const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name, apiBookingSlotSession.is_overbooked, apiBookingSlotSession.type, apiBookingSlotSession.location_zones_taken);
1735
1740
 
1736
- 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_type, apiBookingSlot.reserved_time_position);
1741
+ 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, apiBookingSlot.available_location_zones, 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiBookingSlot.reserved_time, apiBookingSlot.reserved_time_type, apiBookingSlot.reserved_time_position);
1737
1742
 
1738
1743
  const CLUB_BOOKING_CALENDARS_PATH = ':clubId/activities/calendars/';
1739
1744
  const CLUB_BOOKING_CALENDAR_PATH = ':clubId/activities/calendars/:id/';