@myclub_se/data-access 2.12.1 → 2.13.1

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.
Files changed (31) hide show
  1. package/esm2020/lib/api-models/api-booking-calendar-slot-session.mjs +1 -1
  2. package/esm2020/lib/api-models/api-booking-calendar.mjs +1 -1
  3. package/esm2020/lib/api-models/api-overbooked-location.mjs +2 -0
  4. package/esm2020/lib/api-models/index.mjs +2 -1
  5. package/esm2020/lib/models/booking-calendar-slot-session.mjs +6 -2
  6. package/esm2020/lib/models/booking-calendar.mjs +13 -2
  7. package/esm2020/lib/models/index.mjs +3 -1
  8. package/esm2020/lib/models/overbooked-location.mjs +10 -0
  9. package/esm2020/lib/models/search-team.mjs +8 -1
  10. package/esm2020/lib/services/booking-calendar.service.mjs +50 -2
  11. package/esm2020/lib/services/factories/booking-calendar-factory.mjs +3 -2
  12. package/esm2020/lib/services/factories/booking-calendar-slot-session-factory.mjs +2 -2
  13. package/esm2020/lib/services/factories/index.mjs +2 -1
  14. package/esm2020/lib/services/factories/overbooked-location-factory.mjs +3 -0
  15. package/fesm2015/myclub_se-data-access.mjs +113 -33
  16. package/fesm2015/myclub_se-data-access.mjs.map +1 -1
  17. package/fesm2020/myclub_se-data-access.mjs +113 -33
  18. package/fesm2020/myclub_se-data-access.mjs.map +1 -1
  19. package/lib/api-models/api-booking-calendar-slot-session.d.ts +3 -0
  20. package/lib/api-models/api-booking-calendar.d.ts +3 -0
  21. package/lib/api-models/api-overbooked-location.d.ts +7 -0
  22. package/lib/api-models/index.d.ts +1 -0
  23. package/lib/models/booking-calendar-slot-session.d.ts +5 -1
  24. package/lib/models/booking-calendar.d.ts +6 -1
  25. package/lib/models/index.d.ts +2 -0
  26. package/lib/models/overbooked-location.d.ts +8 -0
  27. package/lib/models/search-team.d.ts +5 -0
  28. package/lib/services/booking-calendar.service.d.ts +6 -0
  29. package/lib/services/factories/index.d.ts +1 -0
  30. package/lib/services/factories/overbooked-location-factory.d.ts +3 -0
  31. package/package.json +1 -1
@@ -307,8 +307,25 @@ class Authentication {
307
307
  }
308
308
  }
309
309
 
310
+ class SearchTeam {
311
+ constructor(club, section, id, club_name, name, section_name) {
312
+ this.club = club;
313
+ this.section = section;
314
+ this.id = id;
315
+ this.club_name = club_name;
316
+ this.name = name;
317
+ this.section_name = section_name;
318
+ }
319
+ static asFormGroup(team) {
320
+ return new FormGroup({
321
+ id: new FormControl(team?.id || ''),
322
+ name: new FormControl(team?.name || '', Validators.required),
323
+ });
324
+ }
325
+ }
326
+
310
327
  class BookingCalendar {
311
- constructor(id, club_id, section_id, team_id, club_name, name, section_name, team_name, status, max_application_number, allow_team_export, allow_repeated_bookings, location_groups) {
328
+ constructor(id, club_id, section_id, team_id, club_name, name, section_name, team_name, status, max_application_number, allow_team_export, allow_repeated_bookings, is_default, location_groups, available_for_teams) {
312
329
  this.id = id;
313
330
  this.club_id = club_id;
314
331
  this.section_id = section_id;
@@ -321,15 +338,23 @@ class BookingCalendar {
321
338
  this.max_application_number = max_application_number;
322
339
  this.allow_team_export = allow_team_export;
323
340
  this.allow_repeated_bookings = allow_repeated_bookings;
341
+ this.is_default = is_default;
324
342
  this.location_groups = location_groups;
343
+ this.available_for_teams = available_for_teams;
325
344
  }
326
345
  static asFormGroup(calendar) {
327
346
  const locationGroups = [];
347
+ const availableForTeams = [];
328
348
  if (calendar?.location_groups) {
329
349
  calendar.location_groups.forEach((locationGroup) => {
330
350
  locationGroups.push(ActivityLocationGroup.asFormGroup(locationGroup));
331
351
  });
332
352
  }
353
+ if (calendar?.available_for_teams) {
354
+ calendar.available_for_teams.forEach((team) => {
355
+ availableForTeams.push(SearchTeam.asFormGroup(team));
356
+ });
357
+ }
333
358
  return new FormGroup({
334
359
  id: new FormControl(calendar?.id || ''),
335
360
  club_id: new FormControl(calendar?.club_id || ''),
@@ -341,7 +366,9 @@ class BookingCalendar {
341
366
  team_name: new FormControl(calendar?.team_name || ''),
342
367
  status: new FormControl(calendar?.status || 'preliminary'),
343
368
  location_groups: new FormArray(locationGroups),
369
+ available_for_teams: new FormArray(availableForTeams),
344
370
  max_application_number: new FormControl(calendar?.max_application_number || 0),
371
+ is_default: new FormControl(calendar?.is_default || false),
345
372
  allow_team_export: new FormControl(calendar?.allow_team_export || false),
346
373
  allow_repeated_bookings: new FormControl(calendar?.allow_repeated_bookings || false)
347
374
  });
@@ -452,7 +479,7 @@ class BookingCalendarSlot {
452
479
  }
453
480
 
454
481
  class BookingCalendarSlotSession {
455
- constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, is_overbooked, type, location_zones_taken, slot_index, comment, location_part_id, location_part_name, location_id, repeat, activity_type_id, color = null, update_repeating, update_until_date = null) {
482
+ constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, is_overbooked, last_repeating_date, type, location_zones_taken, slot_index, comment, location_part_id, location_part_name, location_name, location_id, day, repeat, activity_type_id, color = null, update_repeating, update_until_date = null) {
456
483
  this.id = id;
457
484
  this.section_id = section_id;
458
485
  this.slot_id = slot_id;
@@ -463,13 +490,16 @@ class BookingCalendarSlotSession {
463
490
  this.start_time = start_time;
464
491
  this.team_name = team_name;
465
492
  this.is_overbooked = is_overbooked;
493
+ this.last_repeating_date = last_repeating_date;
466
494
  this.type = type;
467
495
  this.location_zones_taken = location_zones_taken;
468
496
  this.slot_index = slot_index;
469
497
  this.comment = comment;
470
498
  this.location_part_id = location_part_id;
471
499
  this.location_part_name = location_part_name;
500
+ this.location_name = location_name;
472
501
  this.location_id = location_id;
502
+ this.day = day;
473
503
  this.repeat = repeat;
474
504
  this.activity_type_id = activity_type_id;
475
505
  this.color = color;
@@ -488,6 +518,7 @@ class BookingCalendarSlotSession {
488
518
  start_time: new FormControl(session?.start_time || '', Validators.required),
489
519
  team_name: new FormControl(session?.team_name || ''),
490
520
  is_overbooked: new FormControl(session?.is_overbooked || false),
521
+ last_repeating_date: new FormControl(session?.last_repeating_date || null),
491
522
  type: new FormControl(session?.type || ''),
492
523
  location_zones_taken: new FormControl(session?.location_zones_taken || 1, [Validators.min(1), Validators.required]),
493
524
  comment: new FormControl(session?.comment || ''),
@@ -1457,6 +1488,27 @@ class OpenActivity {
1457
1488
  }
1458
1489
  }
1459
1490
 
1491
+ class OptionalFee {
1492
+ constructor(id, activity_id, fee_id, amount, text) {
1493
+ this.id = id;
1494
+ this.activity_id = activity_id;
1495
+ this.fee_id = fee_id;
1496
+ this.amount = amount;
1497
+ this.text = text;
1498
+ this.checked = false;
1499
+ }
1500
+ }
1501
+
1502
+ class OverbookedLocation {
1503
+ constructor(start_time, end_time, day, location_name, session_names) {
1504
+ this.start_time = start_time;
1505
+ this.end_time = end_time;
1506
+ this.day = day;
1507
+ this.location_name = location_name;
1508
+ this.session_names = session_names;
1509
+ }
1510
+ }
1511
+
1460
1512
  class Partner {
1461
1513
  constructor(id, image, name, url) {
1462
1514
  this.id = id;
@@ -1509,17 +1561,6 @@ class SearchClub {
1509
1561
  }
1510
1562
  }
1511
1563
 
1512
- class SearchTeam {
1513
- constructor(club, section, id, club_name, name, section_name) {
1514
- this.club = club;
1515
- this.section = section;
1516
- this.id = id;
1517
- this.club_name = club_name;
1518
- this.name = name;
1519
- this.section_name = section_name;
1520
- }
1521
- }
1522
-
1523
1564
  class Section {
1524
1565
  constructor(id, name) {
1525
1566
  this.id = id;
@@ -1632,11 +1673,17 @@ const authTeamFactory = (apiAuthTeam) => new AuthTeam(apiAuthTeam.id, apiAuthTea
1632
1673
 
1633
1674
  const authFactory = (apiAuth) => new Auth(apiAuth.id, apiAuth.name, apiAuth.club_admin, apiAuth.is_section_club, apiAuth.members.map((apiAuthMember) => authMemberFactory(apiAuthMember)), apiAuth.registration_enabled, apiAuth.sections.map((apiAuthSection) => authSectionFactory(apiAuthSection)), apiAuth.site_enabled, apiAuth.teams.map((apiAuthTeam) => authTeamFactory(apiAuthTeam)), apiAuth.user_name);
1634
1675
 
1635
- const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBookingCalendar.id, apiBookingCalendar.club_id, apiBookingCalendar.section_id, apiBookingCalendar.team_id, apiBookingCalendar.club_name, apiBookingCalendar.name, apiBookingCalendar.section_name, apiBookingCalendar.team_name, apiBookingCalendar.status, apiBookingCalendar.max_application_number, apiBookingCalendar.allow_team_export, apiBookingCalendar.allow_repeated_bookings, apiBookingCalendar.location_groups && apiBookingCalendar.location_groups.length ? apiBookingCalendar.location_groups.map((apiActivityLocationGroup) => activityLocationGroupFactory(apiActivityLocationGroup)) : []);
1676
+ const clubFactory = (apiClub) => new Club(apiClub.id, apiClub.name);
1677
+
1678
+ const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
1679
+
1680
+ const searchTeamFactory = (apiSearchTeam) => new SearchTeam(apiSearchTeam.club ? clubFactory(apiSearchTeam.club) : undefined, apiSearchTeam.section ? sectionFactory(apiSearchTeam.section) : undefined, apiSearchTeam.id, apiSearchTeam.club_name, apiSearchTeam.name, apiSearchTeam.section_name);
1681
+
1682
+ const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBookingCalendar.id, apiBookingCalendar.club_id, apiBookingCalendar.section_id, apiBookingCalendar.team_id, apiBookingCalendar.club_name, apiBookingCalendar.name, apiBookingCalendar.section_name, apiBookingCalendar.team_name, apiBookingCalendar.status, apiBookingCalendar.max_application_number, apiBookingCalendar.allow_team_export, apiBookingCalendar.allow_repeated_bookings, apiBookingCalendar.is_default, apiBookingCalendar.location_groups && apiBookingCalendar.location_groups.length ? apiBookingCalendar.location_groups.map((apiActivityLocationGroup) => activityLocationGroupFactory(apiActivityLocationGroup)) : [], apiBookingCalendar.available_for_teams && apiBookingCalendar.available_for_teams.length ? apiBookingCalendar.available_for_teams.map((apiSearchTeam) => searchTeamFactory(apiSearchTeam)) : []);
1636
1683
 
1637
1684
  const bookingCalendarApplicationTimeFactory = (apiBookingApplicationTime) => new BookingCalendarApplicationTime(apiBookingApplicationTime.id, apiBookingApplicationTime.section_id, apiBookingApplicationTime.slot_id, apiBookingApplicationTime.team_id, apiBookingApplicationTime.title, apiBookingApplicationTime.end_time, apiBookingApplicationTime.section_name, apiBookingApplicationTime.start_time, apiBookingApplicationTime.team_name, apiBookingApplicationTime.location_zones_taken, apiBookingApplicationTime.applicant_comment, apiBookingApplicationTime.reviewer_comment, apiBookingApplicationTime.status, apiBookingApplicationTime.location_part_id, apiBookingApplicationTime.location_part_name, apiBookingApplicationTime.location_id, apiBookingApplicationTime.repeat, apiBookingApplicationTime.activity_type_id, apiBookingApplicationTime.color, apiBookingApplicationTime.slot_start_time, apiBookingApplicationTime.slot_end_time, apiBookingApplicationTime.slot_day, apiBookingApplicationTime.slot_number_of_available_sessions, apiBookingApplicationTime.slot_last_repeating_date, apiBookingApplicationTime.created, apiBookingApplicationTime.location_name);
1638
1685
 
1639
- const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.title, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name, apiBookingSlotSession.is_overbooked, apiBookingSlotSession.type, apiBookingSlotSession.location_zones_taken, apiBookingSlotSession.slot_index, apiBookingSlotSession.comment, apiBookingSlotSession.location_part_id, apiBookingSlotSession.location_part_name, apiBookingSlotSession.location_id, apiBookingSlotSession.repeat, apiBookingSlotSession.activity_type_id, apiBookingSlotSession.color, apiBookingSlotSession.update_repeating, apiBookingSlotSession.update_until_date);
1686
+ const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.title, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name, apiBookingSlotSession.is_overbooked, apiBookingSlotSession.last_repeating_date, apiBookingSlotSession.type, apiBookingSlotSession.location_zones_taken, apiBookingSlotSession.slot_index, apiBookingSlotSession.comment, apiBookingSlotSession.location_part_id, apiBookingSlotSession.location_part_name, apiBookingSlotSession.location_name, apiBookingSlotSession.location_id, apiBookingSlotSession.day, apiBookingSlotSession.repeat, apiBookingSlotSession.activity_type_id, apiBookingSlotSession.color, apiBookingSlotSession.update_repeating, apiBookingSlotSession.update_until_date);
1640
1687
 
1641
1688
  const bookingCalendarSlotFactory = (apiBookingSlot) => new BookingCalendarSlot(apiBookingSlot.id, apiBookingSlot.calendar_id, apiBookingSlot.calendar_status, 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', apiBookingSlot.update_repeating, apiBookingSlot.update_until_date, 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)) : [], apiBookingSlot.last_repeating_date);
1642
1689
 
@@ -1666,8 +1713,6 @@ const cardTicketLocationFactory = (apiCardTicketLocation) => new CardTicketLocat
1666
1713
 
1667
1714
  const cardTicketFactory = (apiCardTicket) => new CardTicket(apiCardTicket.id, apiCardTicket.activation_end_hours, apiCardTicket.activation_end_time, apiCardTicket.activation_start_hours, apiCardTicket.activation_start_time, apiCardTicket.away_team, apiCardTicket.card_member_ticket ? cardMemberTicketFactory(apiCardTicket.card_member_ticket) : null, apiCardTicket.description, apiCardTicket.event_time, apiCardTicket.home_team ? homeTeamFactory(apiCardTicket.home_team) : null, apiCardTicket.image ? generalImageFactory(apiCardTicket.image) : null, cardTicketLocationFactory(apiCardTicket.location), apiCardTicket.name, apiCardTicket.ticket_type, apiCardTicket.ticket_type_nice, apiCardTicket.uses_pin);
1668
1715
 
1669
- const clubFactory = (apiClub) => new Club(apiClub.id, apiClub.name);
1670
-
1671
1716
  const clubImageFactory = (apiClubImage) => new ClubImage(apiClubImage.club_id, apiClubImage.section_id, apiClubImage.comment, apiClubImage.created, apiClubImage.image, apiClubImage.image_sm_path, apiClubImage.image_lg_path, apiClubImage.in_use, apiClubImage.is_logo, apiClubImage.original_height, apiClubImage.original_width, apiClubImage.title, apiClubImage.updated);
1672
1717
 
1673
1718
  const clubSectionFactory = (apiSection) => new ClubSection(apiSection.id, apiSection.name);
@@ -1698,10 +1743,6 @@ const memberInvoiceRowFactory = (apiMemberInvoiceRow) => new MemberInvoiceRow(ap
1698
1743
 
1699
1744
  const memberInvoiceFactory = (apiMemberInvoice) => new MemberInvoice(apiMemberInvoice.id, apiMemberInvoice.amount, apiMemberInvoice.amount_paid, apiMemberInvoice.balance, apiMemberInvoice.club_bill_id, apiMemberInvoice.club_name, apiMemberInvoice.credit_card ? creditCardFactory(apiMemberInvoice.credit_card) : null, apiMemberInvoice.date_paid, apiMemberInvoice.due_date, apiMemberInvoice.giro ? giroFactory(apiMemberInvoice.giro) : null, apiMemberInvoice.invoice_rows.map((row) => memberInvoiceRowFactory(row)), apiMemberInvoice.invoice_text, apiMemberInvoice.is_paid, apiMemberInvoice.member_id, apiMemberInvoice.organisation_name, apiMemberInvoice.payee, apiMemberInvoice.payment_url, apiMemberInvoice.reference, apiMemberInvoice.swish ? swishFactory(apiMemberInvoice.swish) : null, apiMemberInvoice.zimpler ? zimplerFactory(apiMemberInvoice.zimpler) : null);
1700
1745
 
1701
- const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
1702
-
1703
- const searchTeamFactory = (apiSearchTeam) => new SearchTeam(apiSearchTeam.club ? clubFactory(apiSearchTeam.club) : undefined, apiSearchTeam.section ? sectionFactory(apiSearchTeam.section) : undefined, apiSearchTeam.id, apiSearchTeam.club_name, apiSearchTeam.name, apiSearchTeam.section_name);
1704
-
1705
1746
  const memberPublicFormFieldOptionFactory = (apiMemberPublicFormFieldOption) => new MemberPublicFormFieldOption(apiMemberPublicFormFieldOption.id, apiMemberPublicFormFieldOption.name, apiMemberPublicFormFieldOption.selected, apiMemberPublicFormFieldOption.default);
1706
1747
 
1707
1748
  const memberPublicFormFieldFactory = (apiMemberPublicFormField) => new MemberPublicFormField(apiMemberPublicFormField.all_choice_options && apiMemberPublicFormField.all_choice_options.length ?
@@ -1736,21 +1777,12 @@ const memberTeamThroughFactory = (apiMemberTeamThrough) => new MemberTeamThrough
1736
1777
 
1737
1778
  const newsFactory = (apiNews) => new News(apiNews.id, apiNews.club_id, apiNews.created, apiNews.created_by_id, apiNews.section_id, apiNews.team_id, apiNews.active_to, apiNews.author, apiNews.ingress, apiNews.news_image, apiNews.news_image_text, apiNews.published_date, apiNews.read, apiNews.show_on_my_pages, apiNews.show_on_webpage, apiNews.text, apiNews.title, apiNews.updated, apiNews.urls ? imageUrlsFactory(apiNews.urls) : null);
1738
1779
 
1739
- class OptionalFee {
1740
- constructor(id, activity_id, fee_id, amount, text) {
1741
- this.id = id;
1742
- this.activity_id = activity_id;
1743
- this.fee_id = fee_id;
1744
- this.amount = amount;
1745
- this.text = text;
1746
- this.checked = false;
1747
- }
1748
- }
1749
-
1750
1780
  const optionalFeeFactory = (apiOptionalFee) => new OptionalFee(apiOptionalFee.id, apiOptionalFee.activity_id, apiOptionalFee.fee_id, apiOptionalFee.amount, apiOptionalFee.text);
1751
1781
 
1752
1782
  const openActivityFactory = (apiOpenActivity) => new OpenActivity(apiOpenActivity.id, apiOpenActivity.activity_group_id, apiOpenActivity.activity_type_id, apiOpenActivity.club_id, apiOpenActivity.location_id, apiOpenActivity.member_id, apiOpenActivity.team_id, apiOpenActivity.activity_location, apiOpenActivity.activity_type_name, apiOpenActivity.allow_maybe, apiOpenActivity.calendar_name, apiOpenActivity.created, apiOpenActivity.current_num_attendants, apiOpenActivity.day, apiOpenActivity.default_fee, apiOpenActivity.description, apiOpenActivity.end, apiOpenActivity.end_time, apiOpenActivity.file, apiOpenActivity.invitation_text, apiOpenActivity.invite_first_days, [], apiOpenActivity.invite_hide_before_sent, apiOpenActivity.invite_last_response_date, apiOpenActivity.invite_remind, apiOpenActivity.invite_remind_receivers, apiOpenActivity.invite_second_days, 'same_as_last', (apiOpenActivity.invited_members && apiOpenActivity.invited_members.length) ? apiOpenActivity.invited_members.map((invitedMember) => memberActivityInviteFactory(invitedMember)) : [], apiOpenActivity.last_response_date, apiOpenActivity.location_name, apiOpenActivity.max_num_attendants, apiOpenActivity.max_num_attendants_type, apiOpenActivity.meet_up_place, apiOpenActivity.meet_up_time, apiOpenActivity.meet_up_time_display, apiOpenActivity.meet_up_time_show, apiOpenActivity.member_invoice, apiOpenActivity.member_name, apiOpenActivity.open_activity, (apiOpenActivity.optional_fees && apiOpenActivity.optional_fees.length) ? apiOpenActivity.optional_fees.map((fee) => optionalFeeFactory(fee)) : [], apiOpenActivity.optional_fee_required, apiOpenActivity.optional_fee_type, 'none', 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiOpenActivity.show_other_invited, apiOpenActivity.start, apiOpenActivity.start_time, apiOpenActivity.status, apiOpenActivity.title, apiOpenActivity.updated, apiOpenActivity.use_invite, false);
1753
1783
 
1784
+ const overbookedLocationFactory = (apiOverbookedLocation) => new OverbookedLocation(apiOverbookedLocation.start_time, apiOverbookedLocation.end_time, apiOverbookedLocation.day, apiOverbookedLocation.location_name, apiOverbookedLocation.session_names);
1785
+
1754
1786
  const otherMemberFieldFactory = (apiOtherMemberFieldFactory) => new OtherMemberField(apiOtherMemberFieldFactory.display_name, apiOtherMemberFieldFactory.field_name, apiOtherMemberFieldFactory.value);
1755
1787
 
1756
1788
  const otherMemberFactory = (apiOtherMember) => new OtherMember(apiOtherMember.id, apiOtherMember.country, apiOtherMember.created, apiOtherMember.first_name, apiOtherMember.image, apiOtherMember.last_name, apiOtherMember.name, apiOtherMember.fields ? apiOtherMember.fields.map((memberField) => otherMemberFieldFactory(memberField)) : []);
@@ -2613,6 +2645,8 @@ const CLUB_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':clubId/activities/sessio
2613
2645
  const CLUB_BOOKING_SETTINGS_PATH = ':clubId/activities/booking-settings/';
2614
2646
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':clubId/activities/application-times/:id/';
2615
2647
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':clubId/activities/application-times/';
2648
+ const CLUB_BOOKING_OVERBOOKED_LOCATIONS_PATH = ':clubId/activities/overbooked/locations/';
2649
+ const CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH = ':clubId/activities/overbooked/sessions/';
2616
2650
  const SECTION_BOOKING_CALENDARS_PATH = ':sectionId/activities/calendars/';
2617
2651
  const SECTION_BOOKING_CALENDAR_PATH = ':sectionId/activities/calendars/:id/';
2618
2652
  const SECTION_BOOKING_CALENDAR_SLOTS_PATH = ':sectionId/activities/slots/';
@@ -2628,6 +2662,8 @@ const SECTION_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':sectionId/activities/
2628
2662
  const SECTION_BOOKING_SETTINGS_PATH = ':sectionId/activities/booking-settings/';
2629
2663
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':sectionId/activities/application-times/:id/';
2630
2664
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':sectionId/activities/application-times/';
2665
+ const SECTION_BOOKING_OVERBOOKED_LOCATIONS_PATH = ':sectionId/activities/overbooked/locations/';
2666
+ const SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH = ':sectionId/activities/overbooked/sessions/';
2631
2667
  const TEAM_BOOKING_CALENDARS_PATH = ':teamId/activities/calendars/';
2632
2668
  const TEAM_BOOKING_CALENDAR_SLOTS_PATH = ':teamId/activities/slots/';
2633
2669
  const TEAM_BOOKING_CALENDAR_SLOTS_SYNC_PATH = ':teamId/activities/slots/sync/';
@@ -3325,6 +3361,50 @@ class BookingCalendarService {
3325
3361
  id
3326
3362
  });
3327
3363
  }
3364
+ // endregion
3365
+ // region Overbooked locations
3366
+ getOverbookedLocations(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3367
+ if (role == Role.ClubAdmin) {
3368
+ return this.getClubOverbookedLocations(clubOrSectionOrTeamId, bookingSlotFilter);
3369
+ }
3370
+ return this.getSectionOverbookedLocations(clubOrSectionOrTeamId, bookingSlotFilter);
3371
+ }
3372
+ getClubOverbookedLocations(clubId, bookingSlotFilter) {
3373
+ const params = bookingSlotFilter.toParams();
3374
+ return this.apiService
3375
+ .getCollection(overbookedLocationFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_LOCATIONS_PATH, { clubId }, {
3376
+ params
3377
+ });
3378
+ }
3379
+ getSectionOverbookedLocations(sectionId, bookingSlotFilter) {
3380
+ const params = bookingSlotFilter.toParams();
3381
+ return this.apiService
3382
+ .getCollection(overbookedLocationFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_LOCATIONS_PATH, { sectionId }, {
3383
+ params
3384
+ });
3385
+ }
3386
+ // endregion
3387
+ // region Overbooked sessions
3388
+ getOverbookedSessions(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3389
+ if (role == Role.ClubAdmin) {
3390
+ return this.getClubOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3391
+ }
3392
+ return this.getSectionOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3393
+ }
3394
+ getClubOverbookedSessions(clubId, bookingSlotFilter) {
3395
+ const params = bookingSlotFilter.toParams();
3396
+ return this.apiService
3397
+ .getCollection(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH, { clubId }, {
3398
+ params
3399
+ });
3400
+ }
3401
+ getSectionOverbookedSessions(sectionId, bookingSlotFilter) {
3402
+ const params = bookingSlotFilter.toParams();
3403
+ return this.apiService
3404
+ .getCollection(bookingCalendarSlotSessionFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH, { sectionId }, {
3405
+ params
3406
+ });
3407
+ }
3328
3408
  }
3329
3409
  BookingCalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookingCalendarService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
3330
3410
  BookingCalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookingCalendarService, providedIn: 'root' });
@@ -4530,5 +4610,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
4530
4610
  * Generated bundle index. Do not edit.
4531
4611
  */
4532
4612
 
4533
- export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityLocationPart, ActivityLocationTag, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookingCalendar, BookingCalendarApplicationTime, BookingCalendarService, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, BookingSlotFilter, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, GroupRole, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, MaintenanceModeService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormField, MemberPublicFormFieldOption, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberType, MemberValidationSettings, News, NewsService, OpenActivity, OtherMember, OtherMemberField, Partner, PaymentAttempt, PaymentAttemptService, PublicAuthentication, RegistrationQRCode, RegistrationQRCodeService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
4613
+ export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityLocationPart, ActivityLocationTag, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookingCalendar, BookingCalendarApplicationTime, BookingCalendarService, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, BookingSlotFilter, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, GroupRole, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, MaintenanceModeService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormField, MemberPublicFormFieldOption, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberType, MemberValidationSettings, News, NewsService, OpenActivity, OptionalFee, OtherMember, OtherMemberField, OverbookedLocation, Partner, PaymentAttempt, PaymentAttemptService, PublicAuthentication, RegistrationQRCode, RegistrationQRCodeService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
4534
4614
  //# sourceMappingURL=myclub_se-data-access.mjs.map