@myclub_se/data-access 2.14.0 → 2.15.0

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 (71) hide show
  1. package/esm2020/lib/api-models/api-bookable-group.mjs +2 -0
  2. package/esm2020/lib/api-models/api-bookable-item.mjs +2 -0
  3. package/esm2020/lib/api-models/api-bookable-part.mjs +2 -0
  4. package/esm2020/lib/api-models/api-bookable-tag.mjs +2 -0
  5. package/esm2020/lib/api-models/api-booking-calendar-application-time.mjs +1 -1
  6. package/esm2020/lib/api-models/api-booking-calendar-slot-session.mjs +1 -1
  7. package/esm2020/lib/api-models/api-booking-calendar-slot.mjs +1 -1
  8. package/esm2020/lib/api-models/api-booking-calendar.mjs +1 -1
  9. package/esm2020/lib/api-models/api-overbooked-bookable-item.mjs +2 -0
  10. package/esm2020/lib/api-models/index.mjs +6 -1
  11. package/esm2020/lib/models/activity-location-part.mjs +4 -4
  12. package/esm2020/lib/models/bookable-group.mjs +21 -0
  13. package/esm2020/lib/models/bookable-item.mjs +34 -0
  14. package/esm2020/lib/models/bookable-part.mjs +14 -0
  15. package/esm2020/lib/models/bookable-tag.mjs +17 -0
  16. package/esm2020/lib/models/booking-calendar-application-time.mjs +9 -9
  17. package/esm2020/lib/models/booking-calendar-slot-session.mjs +9 -9
  18. package/esm2020/lib/models/booking-calendar-slot.mjs +5 -5
  19. package/esm2020/lib/models/booking-calendar.mjs +9 -9
  20. package/esm2020/lib/models/index.mjs +6 -1
  21. package/esm2020/lib/models/overbooked-bookable-item.mjs +10 -0
  22. package/esm2020/lib/services/activity.service.mjs +2 -189
  23. package/esm2020/lib/services/bookable.service.mjs +258 -0
  24. package/esm2020/lib/services/booking-calendar.service.mjs +30 -26
  25. package/esm2020/lib/services/factories/bookable-group-factory.mjs +6 -0
  26. package/esm2020/lib/services/factories/bookable-item-factory.mjs +5 -0
  27. package/esm2020/lib/services/factories/bookable-part-factory.mjs +5 -0
  28. package/esm2020/lib/services/factories/bookable-tag-factory.mjs +5 -0
  29. package/esm2020/lib/services/factories/booking-calendar-application-time-factory.mjs +2 -2
  30. package/esm2020/lib/services/factories/booking-calendar-factory.mjs +3 -3
  31. package/esm2020/lib/services/factories/booking-calendar-slot-factory.mjs +2 -2
  32. package/esm2020/lib/services/factories/booking-calendar-slot-session-factory.mjs +2 -2
  33. package/esm2020/lib/services/factories/index.mjs +7 -1
  34. package/esm2020/lib/services/factories/overbooked-bookable-item-factory.mjs +3 -0
  35. package/esm2020/lib/services/index.mjs +2 -1
  36. package/fesm2015/myclub_se-data-access.mjs +422 -245
  37. package/fesm2015/myclub_se-data-access.mjs.map +1 -1
  38. package/fesm2020/myclub_se-data-access.mjs +422 -245
  39. package/fesm2020/myclub_se-data-access.mjs.map +1 -1
  40. package/lib/api-models/api-bookable-group.d.ts +9 -0
  41. package/lib/api-models/api-bookable-item.d.ts +12 -0
  42. package/lib/api-models/api-bookable-part.d.ts +4 -0
  43. package/lib/api-models/api-bookable-tag.d.ts +7 -0
  44. package/lib/api-models/api-booking-calendar-application-time.d.ts +5 -5
  45. package/lib/api-models/api-booking-calendar-slot-session.d.ts +5 -5
  46. package/lib/api-models/api-booking-calendar-slot.d.ts +2 -2
  47. package/lib/api-models/api-booking-calendar.d.ts +2 -2
  48. package/lib/api-models/api-overbooked-bookable-item.d.ts +7 -0
  49. package/lib/api-models/index.d.ts +5 -0
  50. package/lib/models/activity-location-part.d.ts +1 -1
  51. package/lib/models/bookable-group.d.ts +18 -0
  52. package/lib/models/bookable-item.d.ts +22 -0
  53. package/lib/models/bookable-part.d.ts +10 -0
  54. package/lib/models/bookable-tag.d.ts +13 -0
  55. package/lib/models/booking-calendar-application-time.d.ts +8 -8
  56. package/lib/models/booking-calendar-slot-session.d.ts +8 -8
  57. package/lib/models/booking-calendar-slot.d.ts +4 -4
  58. package/lib/models/booking-calendar.d.ts +4 -4
  59. package/lib/models/index.d.ts +5 -0
  60. package/lib/models/overbooked-bookable-item.d.ts +8 -0
  61. package/lib/services/activity.service.d.ts +1 -31
  62. package/lib/services/bookable.service.d.ts +44 -0
  63. package/lib/services/booking-calendar.service.d.ts +6 -5
  64. package/lib/services/factories/bookable-group-factory.d.ts +3 -0
  65. package/lib/services/factories/bookable-item-factory.d.ts +3 -0
  66. package/lib/services/factories/bookable-part-factory.d.ts +3 -0
  67. package/lib/services/factories/bookable-tag-factory.d.ts +3 -0
  68. package/lib/services/factories/index.d.ts +6 -0
  69. package/lib/services/factories/overbooked-bookable-item-factory.d.ts +3 -0
  70. package/lib/services/index.d.ts +1 -0
  71. package/package.json +1 -1
@@ -152,10 +152,10 @@ class ActivityLocationPart {
152
152
  this.id = id;
153
153
  this.name = name;
154
154
  }
155
- static asFormGroup(tag) {
155
+ static asFormGroup(part) {
156
156
  return new FormGroup({
157
- id: new FormControl(tag?.id || ''),
158
- name: new FormControl(tag?.name || '', Validators.required),
157
+ id: new FormControl(part?.id || ''),
158
+ name: new FormControl(part?.name || '', Validators.required),
159
159
  });
160
160
  }
161
161
  }
@@ -319,6 +319,86 @@ class Authentication {
319
319
  }
320
320
  }
321
321
 
322
+ class BookableGroup {
323
+ constructor(id, club_id, section_id, active, name, bookable_items) {
324
+ this.id = id;
325
+ this.club_id = club_id;
326
+ this.section_id = section_id;
327
+ this.active = active;
328
+ this.name = name;
329
+ this.bookable_items = bookable_items;
330
+ }
331
+ static asFormGroup(bookableGroup) {
332
+ return new FormGroup({
333
+ id: new FormControl(bookableGroup?.id || ''),
334
+ club_id: new FormControl(bookableGroup?.club_id || '', Validators.required),
335
+ section_id: new FormControl(bookableGroup?.section_id || ''),
336
+ name: new FormControl(bookableGroup?.name || '', Validators.required),
337
+ active: new FormControl(typeof bookableGroup?.active !== 'undefined' ? bookableGroup?.active : false),
338
+ });
339
+ }
340
+ }
341
+
342
+ class BookableTag {
343
+ constructor(id, club_id, section_id, name, bookable_item_names = []) {
344
+ this.id = id;
345
+ this.club_id = club_id;
346
+ this.section_id = section_id;
347
+ this.name = name;
348
+ this.bookable_item_names = bookable_item_names;
349
+ }
350
+ static asFormGroup(tag) {
351
+ return new FormGroup({
352
+ id: new FormControl(tag?.id || ''),
353
+ name: new FormControl(tag?.name || '', Validators.required),
354
+ });
355
+ }
356
+ }
357
+
358
+ class BookablePart {
359
+ constructor(id, name) {
360
+ this.id = id;
361
+ this.name = name;
362
+ }
363
+ static asFormGroup(part) {
364
+ return new FormGroup({
365
+ id: new FormControl(part?.id || ''),
366
+ name: new FormControl(part?.name || '', Validators.required),
367
+ });
368
+ }
369
+ }
370
+
371
+ class BookableItem {
372
+ constructor(id, club_id, section_id, group_id, active, name, tags, parts) {
373
+ this.id = id;
374
+ this.club_id = club_id;
375
+ this.section_id = section_id;
376
+ this.group_id = group_id;
377
+ this.active = active;
378
+ this.name = name;
379
+ this.tags = tags;
380
+ this.parts = parts;
381
+ }
382
+ static asFormGroup(bookable) {
383
+ const tags = [];
384
+ const parts = [];
385
+ if (bookable?.tags) {
386
+ bookable.tags.forEach((tag) => tags.push(BookableTag.asFormGroup(tag)));
387
+ }
388
+ if (bookable?.parts) {
389
+ bookable.parts.forEach((part) => parts.push(BookablePart.asFormGroup(part)));
390
+ }
391
+ return new FormGroup({
392
+ id: new FormControl(bookable?.id || ''),
393
+ club_id: new FormControl(bookable?.club_id || '', Validators.required),
394
+ active: new FormControl(typeof bookable?.active !== 'undefined' ? bookable?.active : false),
395
+ group_id: new FormControl(bookable?.group_id || ''),
396
+ tags: new FormArray(tags),
397
+ parts: new FormArray(parts),
398
+ });
399
+ }
400
+ }
401
+
322
402
  class SearchTeam {
323
403
  constructor(club, section, id, club_name, name, section_name) {
324
404
  this.club = club;
@@ -337,7 +417,7 @@ class SearchTeam {
337
417
  }
338
418
 
339
419
  class BookingCalendar {
340
- 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) {
420
+ 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, available_for_teams, bookable_groups) {
341
421
  this.id = id;
342
422
  this.club_id = club_id;
343
423
  this.section_id = section_id;
@@ -351,15 +431,15 @@ class BookingCalendar {
351
431
  this.allow_team_export = allow_team_export;
352
432
  this.allow_repeated_bookings = allow_repeated_bookings;
353
433
  this.is_default = is_default;
354
- this.location_groups = location_groups;
355
434
  this.available_for_teams = available_for_teams;
435
+ this.bookable_groups = bookable_groups;
356
436
  }
357
437
  static asFormGroup(calendar) {
358
- const locationGroups = [];
438
+ const bookableGroups = [];
359
439
  const availableForTeams = [];
360
- if (calendar?.location_groups) {
361
- calendar.location_groups.forEach((locationGroup) => {
362
- locationGroups.push(ActivityLocationGroup.asFormGroup(locationGroup));
440
+ if (calendar?.bookable_groups) {
441
+ calendar.bookable_groups.forEach((bookableGroup) => {
442
+ bookableGroups.push(BookableGroup.asFormGroup(bookableGroup));
363
443
  });
364
444
  }
365
445
  if (calendar?.available_for_teams) {
@@ -377,7 +457,7 @@ class BookingCalendar {
377
457
  section_name: new FormControl(calendar?.section_name || ''),
378
458
  team_name: new FormControl(calendar?.team_name || ''),
379
459
  status: new FormControl(calendar?.status || 'preliminary'),
380
- location_groups: new FormArray(locationGroups),
460
+ bookable_groups: new FormArray(bookableGroups),
381
461
  available_for_teams: new FormArray(availableForTeams),
382
462
  max_application_number: new FormControl(calendar?.max_application_number || 0),
383
463
  is_default: new FormControl(calendar?.is_default || false),
@@ -388,7 +468,7 @@ class BookingCalendar {
388
468
  }
389
469
 
390
470
  class BookingCalendarApplicationTime {
391
- constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, location_zones_taken, applicant_comment, reviewer_comment, status, location_part_id, location_part_name, location_id, repeat, activity_type_id, color = null, slot_start_time, slot_end_time, slot_day, slot_number_of_available_sessions, slot_last_repeating_date, created, location_name) {
471
+ constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, applicant_comment, reviewer_comment, status, repeat, activity_type_id, color = null, slot_start_time, slot_end_time, slot_day, slot_number_of_available_sessions, slot_last_repeating_date, created, bookable_zones_taken, bookable_part_id, bookable_part_name, bookable_id, bookable_name) {
392
472
  this.id = id;
393
473
  this.section_id = section_id;
394
474
  this.slot_id = slot_id;
@@ -398,13 +478,9 @@ class BookingCalendarApplicationTime {
398
478
  this.section_name = section_name;
399
479
  this.start_time = start_time;
400
480
  this.team_name = team_name;
401
- this.location_zones_taken = location_zones_taken;
402
481
  this.applicant_comment = applicant_comment;
403
482
  this.reviewer_comment = reviewer_comment;
404
483
  this.status = status;
405
- this.location_part_id = location_part_id;
406
- this.location_part_name = location_part_name;
407
- this.location_id = location_id;
408
484
  this.repeat = repeat;
409
485
  this.activity_type_id = activity_type_id;
410
486
  this.color = color;
@@ -414,7 +490,11 @@ class BookingCalendarApplicationTime {
414
490
  this.slot_number_of_available_sessions = slot_number_of_available_sessions;
415
491
  this.slot_last_repeating_date = slot_last_repeating_date;
416
492
  this.created = created;
417
- this.location_name = location_name;
493
+ this.bookable_zones_taken = bookable_zones_taken;
494
+ this.bookable_part_id = bookable_part_id;
495
+ this.bookable_part_name = bookable_part_name;
496
+ this.bookable_id = bookable_id;
497
+ this.bookable_name = bookable_name;
418
498
  }
419
499
  static asFormGroup(session) {
420
500
  return new FormGroup({
@@ -427,28 +507,26 @@ class BookingCalendarApplicationTime {
427
507
  section_name: new FormControl(session?.section_name || ''),
428
508
  start_time: new FormControl(session?.start_time || '', Validators.required),
429
509
  team_name: new FormControl(session?.team_name || ''),
430
- location_zones_taken: new FormControl(session?.location_zones_taken || 1, [Validators.min(1), Validators.required]),
431
510
  applicant_comment: new FormControl(session?.applicant_comment || null),
432
511
  reviewer_comment: new FormControl(session?.reviewer_comment || null),
433
512
  status: new FormControl(session?.status || ''),
434
- location_part_id: new FormControl(session?.location_part_id || ''),
435
513
  repeat: new FormControl(session?.repeat || false),
436
514
  activity_type_id: new FormControl(session?.activity_type_id || null),
515
+ bookable_zones_taken: new FormControl(session?.bookable_zones_taken || 1, [Validators.min(1), Validators.required]),
516
+ bookable_part_id: new FormControl(session?.bookable_part_id || ''),
437
517
  });
438
518
  }
439
519
  }
440
520
 
441
521
  class BookingCalendarSlot {
442
- constructor(id, calendar_id, calendar_status, location_id, color, day, end_time, group_id, location_name, number_of_available_sessions, sessions, open_sessions, start_time, type, repeat, update_repeating, update_until_date = null, reserved_time_enabled, repeat_num, repeat_to_day, repeat_type, reserved_time, reserved_time_position, application_times, last_repeating_date) {
522
+ constructor(id, calendar_id, calendar_status, color, day, end_time, group_id, number_of_available_sessions, sessions, open_sessions, start_time, type, repeat, update_repeating, update_until_date = null, reserved_time_enabled, repeat_num, repeat_to_day, repeat_type, reserved_time, reserved_time_position, application_times, last_repeating_date, bookable_name, bookable_id) {
443
523
  this.id = id;
444
524
  this.calendar_id = calendar_id;
445
525
  this.calendar_status = calendar_status;
446
- this.location_id = location_id;
447
526
  this.color = color;
448
527
  this.day = day;
449
528
  this.end_time = end_time;
450
529
  this.group_id = group_id;
451
- this.location_name = location_name;
452
530
  this.number_of_available_sessions = number_of_available_sessions;
453
531
  this.sessions = sessions;
454
532
  this.open_sessions = open_sessions;
@@ -465,12 +543,13 @@ class BookingCalendarSlot {
465
543
  this.reserved_time_position = reserved_time_position;
466
544
  this.application_times = application_times;
467
545
  this.last_repeating_date = last_repeating_date;
546
+ this.bookable_name = bookable_name;
547
+ this.bookable_id = bookable_id;
468
548
  }
469
549
  static asFormGroup(slot) {
470
550
  return new FormGroup({
471
551
  id: new FormControl(slot?.id || ''),
472
552
  calendar_id: new FormControl(slot?.calendar_id || '', Validators.required),
473
- location_id: new FormControl(slot?.location_id || '', Validators.required),
474
553
  day: new FormControl(slot?.day || '', Validators.required),
475
554
  end_time: new FormControl(slot?.end_time || '', Validators.required),
476
555
  group_id: new FormControl(slot?.group_id || null, { nonNullable: false }),
@@ -486,12 +565,13 @@ class BookingCalendarSlot {
486
565
  reserved_time_enabled: new FormControl(typeof slot?.reserved_time_enabled !== 'undefined' ? slot?.reserved_time_enabled : false),
487
566
  reserved_time: new FormControl(slot?.reserved_time || '00:00'),
488
567
  reserved_time_position: new FormControl(slot?.reserved_time_position || ''),
568
+ bookable_id: new FormControl(slot?.bookable_id || '', Validators.required),
489
569
  });
490
570
  }
491
571
  }
492
572
 
493
573
  class BookingCalendarSlotSession {
494
- 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) {
574
+ constructor(id, section_id, slot_id, team_id, title, end_time, section_name, start_time, team_name, is_overbooked, last_repeating_date, type, slot_index, comment, day, repeat, activity_type_id, color = null, update_repeating, update_until_date = null, bookable_zones_taken, bookable_part_id, bookable_part_name, bookable_name, bookable_id) {
495
575
  this.id = id;
496
576
  this.section_id = section_id;
497
577
  this.slot_id = slot_id;
@@ -504,19 +584,19 @@ class BookingCalendarSlotSession {
504
584
  this.is_overbooked = is_overbooked;
505
585
  this.last_repeating_date = last_repeating_date;
506
586
  this.type = type;
507
- this.location_zones_taken = location_zones_taken;
508
587
  this.slot_index = slot_index;
509
588
  this.comment = comment;
510
- this.location_part_id = location_part_id;
511
- this.location_part_name = location_part_name;
512
- this.location_name = location_name;
513
- this.location_id = location_id;
514
589
  this.day = day;
515
590
  this.repeat = repeat;
516
591
  this.activity_type_id = activity_type_id;
517
592
  this.color = color;
518
593
  this.update_repeating = update_repeating;
519
594
  this.update_until_date = update_until_date;
595
+ this.bookable_zones_taken = bookable_zones_taken;
596
+ this.bookable_part_id = bookable_part_id;
597
+ this.bookable_part_name = bookable_part_name;
598
+ this.bookable_name = bookable_name;
599
+ this.bookable_id = bookable_id;
520
600
  }
521
601
  static asFormGroup(session) {
522
602
  return new FormGroup({
@@ -532,13 +612,13 @@ class BookingCalendarSlotSession {
532
612
  is_overbooked: new FormControl(session?.is_overbooked || false),
533
613
  last_repeating_date: new FormControl(session?.last_repeating_date || null),
534
614
  type: new FormControl(session?.type || ''),
535
- location_zones_taken: new FormControl(session?.location_zones_taken || 1, [Validators.min(1), Validators.required]),
536
615
  comment: new FormControl(session?.comment || ''),
537
- location_part_id: new FormControl(session?.location_part_id || ''),
538
616
  repeat: new FormControl(session?.repeat || false),
539
617
  activity_type_id: new FormControl(session?.activity_type_id || null),
540
618
  update_repeating: new FormControl(!!session?.update_repeating || false),
541
619
  update_until_date: new FormControl(null),
620
+ bookable_zones_taken: new FormControl(session?.bookable_zones_taken || 1, [Validators.min(1), Validators.required]),
621
+ bookable_part_id: new FormControl(session?.bookable_part_id || ''),
542
622
  });
543
623
  }
544
624
  }
@@ -1512,6 +1592,16 @@ class OptionalFee {
1512
1592
  }
1513
1593
  }
1514
1594
 
1595
+ class OverbookedBookableItem {
1596
+ constructor(start_time, end_time, day, bookable_name, session_names) {
1597
+ this.start_time = start_time;
1598
+ this.end_time = end_time;
1599
+ this.day = day;
1600
+ this.bookable_name = bookable_name;
1601
+ this.session_names = session_names;
1602
+ }
1603
+ }
1604
+
1515
1605
  class OverbookedLocation {
1516
1606
  constructor(start_time, end_time, day, location_name, session_names) {
1517
1607
  this.start_time = start_time;
@@ -1688,19 +1778,33 @@ const authTeamFactory = (apiAuthTeam) => new AuthTeam(apiAuthTeam.id, apiAuthTea
1688
1778
 
1689
1779
  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);
1690
1780
 
1781
+ const bookablePartFactory = (apiBookablePart) => {
1782
+ return new BookablePart(apiBookablePart.id, apiBookablePart.name);
1783
+ };
1784
+
1785
+ const bookableTagFactory = (apiBookableTag) => {
1786
+ return new BookableTag(apiBookableTag.id, apiBookableTag.club_id, apiBookableTag.section_id, apiBookableTag.name, apiBookableTag.bookable_item_names);
1787
+ };
1788
+
1789
+ const bookableItemFactory = (apiBookableItem) => new BookableItem(apiBookableItem.id, apiBookableItem.club_id, apiBookableItem.section_id, apiBookableItem.group_id, apiBookableItem.active, apiBookableItem.name, apiBookableItem.tags && apiBookableItem.tags.length > 0 ? apiBookableItem.tags.map((apiBookableTag) => bookableTagFactory(apiBookableTag)) : [], apiBookableItem.parts && apiBookableItem.parts.length > 0 ? apiBookableItem.parts.map((apiBookablePart) => bookablePartFactory(apiBookablePart)) : []);
1790
+
1791
+ const bookableGroupFactory = (apiBookableGroup) => {
1792
+ return new BookableGroup(apiBookableGroup.id, apiBookableGroup.club_id, apiBookableGroup.section_id, apiBookableGroup.active, apiBookableGroup.name, apiBookableGroup.bookable_items && apiBookableGroup.bookable_items.length ? apiBookableGroup.bookable_items.map((apiBookableItem) => bookableItemFactory(apiBookableItem)) : []);
1793
+ };
1794
+
1691
1795
  const clubFactory = (apiClub) => new Club(apiClub.id, apiClub.name);
1692
1796
 
1693
1797
  const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
1694
1798
 
1695
1799
  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);
1696
1800
 
1697
- 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)) : []);
1801
+ 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.available_for_teams && apiBookingCalendar.available_for_teams.length ? apiBookingCalendar.available_for_teams.map((apiSearchTeam) => searchTeamFactory(apiSearchTeam)) : [], apiBookingCalendar.bookable_groups && apiBookingCalendar.bookable_groups.length ? apiBookingCalendar.bookable_groups.map((apiBookableGroup) => bookableGroupFactory(apiBookableGroup)) : []);
1698
1802
 
1699
- 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);
1803
+ 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.applicant_comment, apiBookingApplicationTime.reviewer_comment, apiBookingApplicationTime.status, 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.bookable_zones_taken, apiBookingApplicationTime.bookable_part_id, apiBookingApplicationTime.bookable_part_name, apiBookingApplicationTime.bookable_id, apiBookingApplicationTime.bookable_name);
1700
1804
 
1701
- 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);
1805
+ 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.slot_index, apiBookingSlotSession.comment, apiBookingSlotSession.day, apiBookingSlotSession.repeat, apiBookingSlotSession.activity_type_id, apiBookingSlotSession.color, apiBookingSlotSession.update_repeating, apiBookingSlotSession.update_until_date, apiBookingSlotSession.bookable_zones_taken, apiBookingSlotSession.bookable_part_id, apiBookingSlotSession.bookable_part_name, apiBookingSlotSession.bookable_name, apiBookingSlotSession.bookable_id);
1702
1806
 
1703
- 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);
1807
+ const bookingCalendarSlotFactory = (apiBookingSlot) => new BookingCalendarSlot(apiBookingSlot.id, apiBookingSlot.calendar_id, apiBookingSlot.calendar_status, apiBookingSlot.color, apiBookingSlot.day, apiBookingSlot.end_time, apiBookingSlot.group_id, 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, apiBookingSlot.bookable_name, apiBookingSlot.bookable_id);
1704
1808
 
1705
1809
  const bookingSettingsFactory = (apiBookingSettings) => new BookingSettings(apiBookingSettings.id, apiBookingSettings.calendar_step, apiBookingSettings.calendar_min_time, apiBookingSettings.calendar_max_time, apiBookingSettings.calendar_session_duration, apiBookingSettings.should_split_booking_into_zones);
1706
1810
 
@@ -1796,6 +1900,8 @@ const optionalFeeFactory = (apiOptionalFee) => new OptionalFee(apiOptionalFee.id
1796
1900
 
1797
1901
  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);
1798
1902
 
1903
+ const overbookedBookableItemFactory = (apiOverbookedBookableItem) => new OverbookedBookableItem(apiOverbookedBookableItem.start_time, apiOverbookedBookableItem.end_time, apiOverbookedBookableItem.day, apiOverbookedBookableItem.bookable_name, apiOverbookedBookableItem.session_names);
1904
+
1799
1905
  const overbookedLocationFactory = (apiOverbookedLocation) => new OverbookedLocation(apiOverbookedLocation.start_time, apiOverbookedLocation.end_time, apiOverbookedLocation.day, apiOverbookedLocation.location_name, apiOverbookedLocation.session_names);
1800
1906
 
1801
1907
  const otherMemberFieldFactory = (apiOtherMemberFieldFactory) => new OtherMemberField(apiOtherMemberFieldFactory.display_name, apiOtherMemberFieldFactory.field_name, apiOtherMemberFieldFactory.value);
@@ -2029,24 +2135,11 @@ const TEAM_ACTIVITY_TYPES_PATH = ':teamId/activities/types/';
2029
2135
  const TEAM_CALENDAR_PATH = ':teamId/activities/calendar/';
2030
2136
  const CLUB_ACTIVITY_LOCATIONS_PATH = ':clubId/activities/locations/';
2031
2137
  const CLUB_ACTIVITY_LOCATION_PATH = ':clubId/activities/locations/:locationId/';
2032
- const CLUB_ACTIVITY_LOCATION_GROUPS_PATH = ':clubId/activities/locations/groups/';
2033
- const CLUB_ACTIVITY_LOCATION_GROUP_PATH = ':clubId/activities/locations/groups/:groupId/';
2034
- const CLUB_ACTIVITY_LOCATION_TAGS_PATH = ':clubId/activities/locations/tags/';
2035
- const CLUB_ACTIVITY_LOCATION_TAG_PATH = ':clubId/activities/locations/tags/:tagId/';
2036
- const CLUB_ACTIVITY_LOCATION_PARTS_PATH = ':clubId/activities/locations/:locationId/parts/';
2037
2138
  const CLUB_ACTIVITY_TYPES_PATH = ':clubId/activities/types/';
2038
2139
  const CLUB_ACTIVITY_TYPE_PATH = ':clubId/activities/types/:typeId/';
2039
2140
  const TEAM_ACTIVITY_LOCATIONS_PATH = ':teamId/activities/locations/';
2040
- const TEAM_ACTIVITY_LOCATION_GROUPS_PATH = ':teamId/activities/locations/groups/';
2041
- const TEAM_ACTIVITY_LOCATION_TAGS_PATH = ':teamId/activities/locations/tags/';
2042
- const TEAM_ACTIVITY_LOCATION_PARTS_PATH = ':teamId/activities/locations/:locationId/parts/';
2043
2141
  const SECTION_ACTIVITY_LOCATIONS_PATH = ':sectionId/activities/locations/';
2044
2142
  const SECTION_ACTIVITY_LOCATION_PATH = ':sectionId/activities/locations/:locationId/';
2045
- const SECTION_ACTIVITY_LOCATION_GROUPS_PATH = ':sectionId/activities/locations/groups/';
2046
- const SECTION_ACTIVITY_LOCATION_GROUP_PATH = ':sectionId/activities/locations/groups/:groupId/';
2047
- const SECTION_ACTIVITY_LOCATION_TAGS_PATH = ':sectionId/activities/locations/tags/';
2048
- const SECTION_ACTIVITY_LOCATION_TAG_PATH = ':sectionId/activities/locations/tags/:tagId/';
2049
- const SECTION_ACTIVITY_LOCATION_PARTS_PATH = ':sectionId/activities/locations/:locationId/parts/';
2050
2143
  const SECTION_ACTIVITY_TYPES_PATH = ':sectionId/activities/types/';
2051
2144
  const SECTION_ACTIVITY_TYPE_PATH = ':sectionId/activities/types/:typeId/';
2052
2145
  class ActivityService {
@@ -2247,179 +2340,6 @@ class ActivityService {
2247
2340
  locationId: location.id
2248
2341
  }, location);
2249
2342
  }
2250
- getActivityLocationGroups(role, clubOrSectionOrTeamId) {
2251
- if (role == Role.ClubAdmin) {
2252
- return this.getClubActivityLocationGroups(clubOrSectionOrTeamId);
2253
- }
2254
- else if (role == Role.SectionAdmin) {
2255
- return this.getSectionActivityLocationGroups(clubOrSectionOrTeamId);
2256
- }
2257
- return this.getTeamActivityLocationGroups(clubOrSectionOrTeamId);
2258
- }
2259
- getClubActivityLocationGroups(clubId) {
2260
- return this.apiService
2261
- .getCollection(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUPS_PATH, { clubId }, { params: { limit: 'null' } });
2262
- }
2263
- getSectionActivityLocationGroups(sectionId) {
2264
- return this.apiService
2265
- .getCollection(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUPS_PATH, { sectionId }, { params: { limit: 'null' } });
2266
- }
2267
- getTeamActivityLocationGroups(teamId) {
2268
- return this.apiService
2269
- .getCollection(activityLocationGroupFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_GROUPS_PATH, { teamId }, { params: { limit: 'null' } });
2270
- }
2271
- updateActivityLocationGroup(role, clubOrSectionOrTeamId, locationGroup) {
2272
- if (role === Role.ClubAdmin) {
2273
- return this.updateClubActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2274
- }
2275
- return this.updateSectionActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2276
- }
2277
- updateClubActivityLocationGroup(clubId, locationGroup) {
2278
- return this.apiService
2279
- .updateResource(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUP_PATH, {
2280
- clubId,
2281
- groupId: locationGroup.id
2282
- }, locationGroup);
2283
- }
2284
- updateSectionActivityLocationGroup(sectionId, locationGroup) {
2285
- return this.apiService
2286
- .updateResource(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUP_PATH, {
2287
- sectionId,
2288
- groupId: locationGroup.id
2289
- }, locationGroup);
2290
- }
2291
- createActivityLocationGroup(role, clubOrSectionOrTeamId, locationGroup) {
2292
- if (role === Role.ClubAdmin) {
2293
- return this.createClubActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2294
- }
2295
- return this.createSectionActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2296
- }
2297
- createClubActivityLocationGroup(clubId, locationGroup) {
2298
- delete locationGroup.id;
2299
- return this.apiService
2300
- .postResource(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUPS_PATH, {
2301
- clubId,
2302
- }, locationGroup);
2303
- }
2304
- createSectionActivityLocationGroup(sectionId, locationGroup) {
2305
- delete locationGroup.id;
2306
- return this.apiService
2307
- .postResource(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUPS_PATH, {
2308
- sectionId,
2309
- }, locationGroup);
2310
- }
2311
- getActivityLocationTags(role, clubOrSectionOrTeamId) {
2312
- if (role == Role.ClubAdmin) {
2313
- return this.getClubActivityLocationTags(clubOrSectionOrTeamId);
2314
- }
2315
- else if (role == Role.SectionAdmin) {
2316
- return this.getSectionActivityLocationTags(clubOrSectionOrTeamId);
2317
- }
2318
- return this.getTeamActivityLocationTags(clubOrSectionOrTeamId);
2319
- }
2320
- getClubActivityLocationTags(clubId) {
2321
- return this.apiService
2322
- .getCollection(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAGS_PATH, { clubId }, { params: { limit: 'null' } });
2323
- }
2324
- getSectionActivityLocationTags(sectionId) {
2325
- return this.apiService
2326
- .getCollection(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAGS_PATH, { sectionId }, { params: { limit: 'null' } });
2327
- }
2328
- getTeamActivityLocationTags(teamId) {
2329
- return this.apiService
2330
- .getCollection(activityLocationTagFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_TAGS_PATH, { teamId }, { params: { limit: 'null' } });
2331
- }
2332
- createActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2333
- if (role == Role.ClubAdmin) {
2334
- return this.createClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2335
- }
2336
- else if (role == Role.SectionAdmin) {
2337
- return this.createSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2338
- }
2339
- return this.createTeamActivityLocationTag(clubOrSectionOrTeamId, tag);
2340
- }
2341
- createClubActivityLocationTag(clubId, tag) {
2342
- delete tag.id;
2343
- return this.apiService
2344
- .postResource(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAGS_PATH, {
2345
- clubId,
2346
- }, tag);
2347
- }
2348
- createSectionActivityLocationTag(sectionId, tag) {
2349
- delete tag.id;
2350
- return this.apiService
2351
- .postResource(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAGS_PATH, {
2352
- sectionId,
2353
- }, tag);
2354
- }
2355
- createTeamActivityLocationTag(teamId, tag) {
2356
- delete tag.id;
2357
- return this.apiService
2358
- .postResource(activityLocationTagFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_TAGS_PATH, {
2359
- teamId,
2360
- }, tag);
2361
- }
2362
- updateActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2363
- if (role == Role.ClubAdmin) {
2364
- return this.updateClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2365
- }
2366
- return this.updateSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2367
- }
2368
- updateClubActivityLocationTag(clubId, tag) {
2369
- return this.apiService
2370
- .updateResource(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAG_PATH, {
2371
- clubId,
2372
- tagId: tag.id,
2373
- }, tag);
2374
- }
2375
- updateSectionActivityLocationTag(sectionId, tag) {
2376
- return this.apiService
2377
- .updateResource(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAG_PATH, {
2378
- sectionId,
2379
- tagId: tag.id,
2380
- }, tag);
2381
- }
2382
- deleteActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2383
- if (role == Role.ClubAdmin) {
2384
- return this.deleteClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2385
- }
2386
- return this.deleteSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2387
- }
2388
- deleteClubActivityLocationTag(clubId, tag) {
2389
- return this.apiService
2390
- .deleteResource(Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAG_PATH, {
2391
- clubId,
2392
- tagId: tag.id,
2393
- });
2394
- }
2395
- deleteSectionActivityLocationTag(sectionId, tag) {
2396
- return this.apiService
2397
- .deleteResource(Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAG_PATH, {
2398
- sectionId,
2399
- tagId: tag.id,
2400
- });
2401
- }
2402
- getActivityLocationParts(role, clubOrSectionOrTeamId, locationId) {
2403
- if (role == Role.ClubAdmin) {
2404
- return this.getClubActivityLocationParts(clubOrSectionOrTeamId, locationId);
2405
- }
2406
- else if (role == Role.SectionAdmin) {
2407
- return this.getSectionActivityLocationParts(clubOrSectionOrTeamId, locationId);
2408
- }
2409
- return this.getTeamActivityLocationParts(clubOrSectionOrTeamId, locationId);
2410
- }
2411
- getClubActivityLocationParts(clubId, locationId) {
2412
- return this.apiService
2413
- .getCollection(activityLocationPartFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_PARTS_PATH, { clubId, locationId }, { params: { limit: 'null' } });
2414
- }
2415
- getSectionActivityLocationParts(sectionId, locationId) {
2416
- return this.apiService
2417
- .getCollection(activityLocationPartFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_PARTS_PATH, { sectionId, locationId }, { params: { limit: 'null' } });
2418
- }
2419
- getTeamActivityLocationParts(teamId, locationId) {
2420
- return this.apiService
2421
- .getCollection(activityLocationPartFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_PARTS_PATH, { teamId, locationId }, { params: { limit: 'null' } });
2422
- }
2423
2343
  getTeamActivityNew(teamId) {
2424
2344
  return this.apiService
2425
2345
  .getResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_NEW_PATH, { teamId });
@@ -2645,6 +2565,259 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
2645
2565
  }]
2646
2566
  }], ctorParameters: function () { return [{ type: ApiService }]; } });
2647
2567
 
2568
+ const CLUB_BOOKABLES_PATH = ':clubId/activities/bookables/';
2569
+ const CLUB_BOOKABLE_PATH = ':clubId/activities/bookables/:bookableId/';
2570
+ const CLUB_BOOKABLE_GROUPS_PATH = ':clubId/activities/bookables/groups/';
2571
+ const CLUB_BOOKABLE_GROUP_PATH = ':clubId/activities/bookables/groups/:groupId/';
2572
+ const CLUB_BOOKABLE_TAGS_PATH = ':clubId/activities/bookables/tags/';
2573
+ const CLUB_BOOKABLE_TAG_PATH = ':clubId/activities/bookables/tags/:tagId/';
2574
+ const CLUB_BOOKABLE_PARTS_PATH = ':clubId/activities/bookables/:bookableId/parts/';
2575
+ const TEAM_BOOKABLES_PATH = ':teamId/activities/bookables/';
2576
+ const TEAM_BOOKABLE_GROUPS_PATH = ':teamId/activities/bookables/groups/';
2577
+ const TEAM_BOOKABLE_TAGS_PATH = ':teamId/activities/bookables/tags/';
2578
+ const TEAM_BOOKABLE_PARTS_PATH = ':teamId/activities/bookables/:bookableId/parts/';
2579
+ const SECTION_BOOKABLES_PATH = ':sectionId/activities/bookables/';
2580
+ const SECTION_BOOKABLE_PATH = ':sectionId/activities/bookables/:bookableId/';
2581
+ const SECTION_BOOKABLE_GROUPS_PATH = ':sectionId/activities/bookables/groups/';
2582
+ const SECTION_BOOKABLE_GROUP_PATH = ':sectionId/activities/bookables/groups/:groupId/';
2583
+ const SECTION_BOOKABLE_TAGS_PATH = ':sectionId/activities/bookables/tags/';
2584
+ const SECTION_BOOKABLE_TAG_PATH = ':sectionId/activities/bookables/tags/:tagId/';
2585
+ const SECTION_BOOKABLE_PARTS_PATH = ':sectionId/activities/bookables/:bookableId/parts/';
2586
+ class BookableService {
2587
+ constructor(apiService) {
2588
+ this.apiService = apiService;
2589
+ }
2590
+ // region Bookable Items
2591
+ getBookableItems(role, clubOrSectionOrTeamId) {
2592
+ if (role == Role.ClubAdmin) {
2593
+ return this.getClubBookableItems(clubOrSectionOrTeamId);
2594
+ }
2595
+ else if (role == Role.SectionAdmin) {
2596
+ return this.getSectionBookableItems(clubOrSectionOrTeamId);
2597
+ }
2598
+ return this.getTeamBookableItems(clubOrSectionOrTeamId);
2599
+ }
2600
+ getTeamBookableItems(teamId) {
2601
+ return this.apiService
2602
+ .getCollection(bookableItemFactory, Role.TeamAdmin, TEAM_BOOKABLES_PATH, { teamId }, { params: { limit: 'null' } });
2603
+ }
2604
+ getClubBookableItems(clubId) {
2605
+ return this.apiService
2606
+ .getCollection(bookableItemFactory, Role.ClubAdmin, CLUB_BOOKABLES_PATH, { clubId }, { params: { limit: 'null' } });
2607
+ }
2608
+ getSectionBookableItems(sectionId) {
2609
+ return this.apiService
2610
+ .getCollection(bookableItemFactory, Role.SectionAdmin, SECTION_BOOKABLES_PATH, { sectionId }, { params: { limit: 'null' } });
2611
+ }
2612
+ updateBookableItem(role, clubOrSectionOrTeamId, bookableItem) {
2613
+ if (role === Role.ClubAdmin) {
2614
+ return this.updateClubBookableItem(clubOrSectionOrTeamId, bookableItem);
2615
+ }
2616
+ return this.updateSectionBookableItem(clubOrSectionOrTeamId, bookableItem);
2617
+ }
2618
+ updateClubBookableItem(clubId, bookableItem) {
2619
+ return this.apiService
2620
+ .updateResource(bookableItemFactory, Role.ClubAdmin, CLUB_BOOKABLE_PATH, {
2621
+ clubId,
2622
+ bookableId: bookableItem.id
2623
+ }, bookableItem);
2624
+ }
2625
+ updateSectionBookableItem(sectionId, bookableItem) {
2626
+ return this.apiService
2627
+ .updateResource(bookableItemFactory, Role.SectionAdmin, SECTION_BOOKABLE_PATH, {
2628
+ sectionId,
2629
+ bookableId: bookableItem.id
2630
+ }, bookableItem);
2631
+ }
2632
+ // endregion
2633
+ // region Bookable Groups
2634
+ getBookableGroups(role, clubOrSectionOrTeamId) {
2635
+ if (role == Role.ClubAdmin) {
2636
+ return this.getClubBookableGroups(clubOrSectionOrTeamId);
2637
+ }
2638
+ else if (role == Role.SectionAdmin) {
2639
+ return this.getSectionBookableGroups(clubOrSectionOrTeamId);
2640
+ }
2641
+ return this.getTeamBookableGroups(clubOrSectionOrTeamId);
2642
+ }
2643
+ getClubBookableGroups(clubId) {
2644
+ return this.apiService
2645
+ .getCollection(bookableGroupFactory, Role.ClubAdmin, CLUB_BOOKABLE_GROUPS_PATH, { clubId }, { params: { limit: 'null' } });
2646
+ }
2647
+ getSectionBookableGroups(sectionId) {
2648
+ return this.apiService
2649
+ .getCollection(bookableGroupFactory, Role.SectionAdmin, SECTION_BOOKABLE_GROUPS_PATH, { sectionId }, { params: { limit: 'null' } });
2650
+ }
2651
+ getTeamBookableGroups(teamId) {
2652
+ return this.apiService
2653
+ .getCollection(bookableGroupFactory, Role.TeamAdmin, TEAM_BOOKABLE_GROUPS_PATH, { teamId }, { params: { limit: 'null' } });
2654
+ }
2655
+ updateBookableGroup(role, clubOrSectionOrTeamId, bookableGroup) {
2656
+ if (role === Role.ClubAdmin) {
2657
+ return this.updateClubBookableGroup(clubOrSectionOrTeamId, bookableGroup);
2658
+ }
2659
+ return this.updateSectionBookableGroup(clubOrSectionOrTeamId, bookableGroup);
2660
+ }
2661
+ updateClubBookableGroup(clubId, bookableGroup) {
2662
+ return this.apiService
2663
+ .updateResource(bookableGroupFactory, Role.ClubAdmin, CLUB_BOOKABLE_GROUP_PATH, {
2664
+ clubId,
2665
+ groupId: bookableGroup.id
2666
+ }, bookableGroup);
2667
+ }
2668
+ updateSectionBookableGroup(sectionId, bookableGroup) {
2669
+ return this.apiService
2670
+ .updateResource(bookableGroupFactory, Role.SectionAdmin, SECTION_BOOKABLE_GROUP_PATH, {
2671
+ sectionId,
2672
+ groupId: bookableGroup.id
2673
+ }, bookableGroup);
2674
+ }
2675
+ createBookableGroup(role, clubOrSectionOrTeamId, bookableGroup) {
2676
+ if (role === Role.ClubAdmin) {
2677
+ return this.createClubBookableGroup(clubOrSectionOrTeamId, bookableGroup);
2678
+ }
2679
+ return this.createSectionBookableGroup(clubOrSectionOrTeamId, bookableGroup);
2680
+ }
2681
+ createClubBookableGroup(clubId, bookableGroup) {
2682
+ delete bookableGroup.id;
2683
+ return this.apiService
2684
+ .postResource(bookableGroupFactory, Role.ClubAdmin, CLUB_BOOKABLE_GROUPS_PATH, {
2685
+ clubId,
2686
+ }, bookableGroup);
2687
+ }
2688
+ createSectionBookableGroup(sectionId, bookableGroup) {
2689
+ delete bookableGroup.id;
2690
+ return this.apiService
2691
+ .postResource(bookableGroupFactory, Role.SectionAdmin, SECTION_BOOKABLE_GROUPS_PATH, {
2692
+ sectionId,
2693
+ }, bookableGroup);
2694
+ }
2695
+ // endregion
2696
+ // region Bookable Tags
2697
+ getBookableTags(role, clubOrSectionOrTeamId) {
2698
+ if (role == Role.ClubAdmin) {
2699
+ return this.getClubBookableTags(clubOrSectionOrTeamId);
2700
+ }
2701
+ else if (role == Role.SectionAdmin) {
2702
+ return this.getSectionBookableTags(clubOrSectionOrTeamId);
2703
+ }
2704
+ return this.getTeamBookableTags(clubOrSectionOrTeamId);
2705
+ }
2706
+ getClubBookableTags(clubId) {
2707
+ return this.apiService
2708
+ .getCollection(bookableTagFactory, Role.ClubAdmin, CLUB_BOOKABLE_TAGS_PATH, { clubId }, { params: { limit: 'null' } });
2709
+ }
2710
+ getSectionBookableTags(sectionId) {
2711
+ return this.apiService
2712
+ .getCollection(bookableTagFactory, Role.SectionAdmin, SECTION_BOOKABLE_TAGS_PATH, { sectionId }, { params: { limit: 'null' } });
2713
+ }
2714
+ getTeamBookableTags(teamId) {
2715
+ return this.apiService
2716
+ .getCollection(bookableTagFactory, Role.TeamAdmin, TEAM_BOOKABLE_TAGS_PATH, { teamId }, { params: { limit: 'null' } });
2717
+ }
2718
+ createBookableTag(role, clubOrSectionOrTeamId, tag) {
2719
+ if (role == Role.ClubAdmin) {
2720
+ return this.createClubBookableTag(clubOrSectionOrTeamId, tag);
2721
+ }
2722
+ else if (role == Role.SectionAdmin) {
2723
+ return this.createSectionBookableTag(clubOrSectionOrTeamId, tag);
2724
+ }
2725
+ return this.createTeamBookableTag(clubOrSectionOrTeamId, tag);
2726
+ }
2727
+ createClubBookableTag(clubId, tag) {
2728
+ delete tag.id;
2729
+ return this.apiService
2730
+ .postResource(bookableTagFactory, Role.ClubAdmin, CLUB_BOOKABLE_TAGS_PATH, {
2731
+ clubId,
2732
+ }, tag);
2733
+ }
2734
+ createSectionBookableTag(sectionId, tag) {
2735
+ delete tag.id;
2736
+ return this.apiService
2737
+ .postResource(bookableTagFactory, Role.SectionAdmin, SECTION_BOOKABLE_TAGS_PATH, {
2738
+ sectionId,
2739
+ }, tag);
2740
+ }
2741
+ createTeamBookableTag(teamId, tag) {
2742
+ delete tag.id;
2743
+ return this.apiService
2744
+ .postResource(bookableTagFactory, Role.TeamAdmin, TEAM_BOOKABLE_TAGS_PATH, {
2745
+ teamId,
2746
+ }, tag);
2747
+ }
2748
+ updateBookableTag(role, clubOrSectionOrTeamId, tag) {
2749
+ if (role == Role.ClubAdmin) {
2750
+ return this.updateClubBookableTag(clubOrSectionOrTeamId, tag);
2751
+ }
2752
+ return this.updateSectionBookableTag(clubOrSectionOrTeamId, tag);
2753
+ }
2754
+ updateClubBookableTag(clubId, tag) {
2755
+ return this.apiService
2756
+ .updateResource(bookableTagFactory, Role.ClubAdmin, CLUB_BOOKABLE_TAG_PATH, {
2757
+ clubId,
2758
+ tagId: tag.id,
2759
+ }, tag);
2760
+ }
2761
+ updateSectionBookableTag(sectionId, tag) {
2762
+ return this.apiService
2763
+ .updateResource(bookableTagFactory, Role.SectionAdmin, SECTION_BOOKABLE_TAG_PATH, {
2764
+ sectionId,
2765
+ tagId: tag.id,
2766
+ }, tag);
2767
+ }
2768
+ deleteBookableTag(role, clubOrSectionOrTeamId, tag) {
2769
+ if (role == Role.ClubAdmin) {
2770
+ return this.deleteClubBookableTag(clubOrSectionOrTeamId, tag);
2771
+ }
2772
+ return this.deleteSectionBookableTag(clubOrSectionOrTeamId, tag);
2773
+ }
2774
+ deleteClubBookableTag(clubId, tag) {
2775
+ return this.apiService
2776
+ .deleteResource(Role.ClubAdmin, CLUB_BOOKABLE_TAG_PATH, {
2777
+ clubId,
2778
+ tagId: tag.id,
2779
+ });
2780
+ }
2781
+ deleteSectionBookableTag(sectionId, tag) {
2782
+ return this.apiService
2783
+ .deleteResource(Role.SectionAdmin, SECTION_BOOKABLE_TAG_PATH, {
2784
+ sectionId,
2785
+ tagId: tag.id,
2786
+ });
2787
+ }
2788
+ // endregion
2789
+ // region Bookable Parts
2790
+ getBookableParts(role, clubOrSectionOrTeamId, bookableId) {
2791
+ if (role == Role.ClubAdmin) {
2792
+ return this.getClubBookableParts(clubOrSectionOrTeamId, bookableId);
2793
+ }
2794
+ else if (role == Role.SectionAdmin) {
2795
+ return this.getSectionBookableParts(clubOrSectionOrTeamId, bookableId);
2796
+ }
2797
+ return this.getTeamBookableParts(clubOrSectionOrTeamId, bookableId);
2798
+ }
2799
+ getClubBookableParts(clubId, bookableId) {
2800
+ return this.apiService
2801
+ .getCollection(bookablePartFactory, Role.ClubAdmin, CLUB_BOOKABLE_PARTS_PATH, { clubId, bookableId }, { params: { limit: 'null' } });
2802
+ }
2803
+ getSectionBookableParts(sectionId, bookableId) {
2804
+ return this.apiService
2805
+ .getCollection(bookablePartFactory, Role.SectionAdmin, SECTION_BOOKABLE_PARTS_PATH, { sectionId, bookableId }, { params: { limit: 'null' } });
2806
+ }
2807
+ getTeamBookableParts(teamId, bookableId) {
2808
+ return this.apiService
2809
+ .getCollection(bookablePartFactory, Role.TeamAdmin, TEAM_BOOKABLE_PARTS_PATH, { teamId, bookableId }, { params: { limit: 'null' } });
2810
+ }
2811
+ }
2812
+ BookableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookableService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2813
+ BookableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookableService, providedIn: 'root' });
2814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BookableService, decorators: [{
2815
+ type: Injectable,
2816
+ args: [{
2817
+ providedIn: 'root'
2818
+ }]
2819
+ }], ctorParameters: function () { return [{ type: ApiService }]; } });
2820
+
2648
2821
  const CLUB_BOOKING_CALENDARS_PATH = ':clubId/activities/calendars/';
2649
2822
  const CLUB_BOOKING_CALENDAR_PATH = ':clubId/activities/calendars/:id/';
2650
2823
  const CLUB_BOOKING_CALENDAR_SLOTS_PATH = ':clubId/activities/slots/';
@@ -2660,8 +2833,8 @@ const CLUB_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':clubId/activities/sessio
2660
2833
  const CLUB_BOOKING_SETTINGS_PATH = ':clubId/activities/booking-settings/';
2661
2834
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':clubId/activities/application-times/:id/';
2662
2835
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':clubId/activities/application-times/';
2663
- const CLUB_BOOKING_OVERBOOKED_LOCATIONS_PATH = ':clubId/activities/overbooked/locations/';
2664
2836
  const CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH = ':clubId/activities/overbooked/sessions/';
2837
+ const CLUB_BOOKING_OVERBOOKED_BOOKABLES_PATH = ':clubId/activities/overbooked/bookables/';
2665
2838
  const SECTION_BOOKING_CALENDARS_PATH = ':sectionId/activities/calendars/';
2666
2839
  const SECTION_BOOKING_CALENDAR_PATH = ':sectionId/activities/calendars/:id/';
2667
2840
  const SECTION_BOOKING_CALENDAR_SLOTS_PATH = ':sectionId/activities/slots/';
@@ -2677,8 +2850,8 @@ const SECTION_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':sectionId/activities/
2677
2850
  const SECTION_BOOKING_SETTINGS_PATH = ':sectionId/activities/booking-settings/';
2678
2851
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':sectionId/activities/application-times/:id/';
2679
2852
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':sectionId/activities/application-times/';
2680
- const SECTION_BOOKING_OVERBOOKED_LOCATIONS_PATH = ':sectionId/activities/overbooked/locations/';
2681
2853
  const SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH = ':sectionId/activities/overbooked/sessions/';
2854
+ const SECTION_BOOKING_OVERBOOKED_BOOKABLES_PATH = ':sectionId/activities/overbooked/bookables/';
2682
2855
  const TEAM_BOOKING_CALENDARS_PATH = ':teamId/activities/calendars/';
2683
2856
  const TEAM_BOOKING_CALENDAR_SLOTS_PATH = ':teamId/activities/slots/';
2684
2857
  const TEAM_BOOKING_CALENDAR_SLOTS_SYNC_PATH = ':teamId/activities/slots/sync/';
@@ -2690,21 +2863,22 @@ const TEAM_BOOKING_CALENDAR_SLOT_PATH = ':teamId/activities/slots/:id/';
2690
2863
  const TEAM_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':teamId/activities/application-times/';
2691
2864
  const TEAM_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':teamId/activities/application-times/:id/';
2692
2865
  class BookingSlotFilter {
2693
- constructor(startDate = null, endDate = null, calendarIds = [], locationIds = [], tagIds = [], teamIds = [], locationGroupIds = [], activityTypeIds = [], hasOpenSessions = null, showApplicationTimes = null, sortBy = null) {
2866
+ constructor(startDate = null, endDate = null, calendarIds = [], locationIds = [], bookableItemIds = [], tagIds = [], teamIds = [], bookableGroupIds = [], activityTypeIds = [], hasOpenSessions = null, showApplicationTimes = null, sortBy = null) {
2694
2867
  this.startDate = startDate;
2695
2868
  this.endDate = endDate;
2696
2869
  this.calendarIds = calendarIds;
2697
2870
  this.locationIds = locationIds;
2871
+ this.bookableItemIds = bookableItemIds;
2698
2872
  this.tagIds = tagIds;
2699
2873
  this.teamIds = teamIds;
2700
- this.locationGroupIds = locationGroupIds;
2874
+ this.bookableGroupIds = bookableGroupIds;
2701
2875
  this.activityTypeIds = activityTypeIds;
2702
2876
  this.hasOpenSessions = hasOpenSessions;
2703
2877
  this.showApplicationTimes = showApplicationTimes;
2704
2878
  this.sortBy = sortBy;
2705
2879
  }
2706
2880
  static fromFilter(filter) {
2707
- return new this(filter.startDate, filter.endDate, filter.calendarIds, filter.locationIds, filter.tagIds, filter.teamIds, filter.locationGroupIds, filter.activityTypeIds, filter.hasOpenSessions, filter.showApplicationTimes, filter.sortBy);
2881
+ return new this(filter.startDate, filter.endDate, filter.calendarIds, filter.locationIds, filter.bookableItemIds, filter.tagIds, filter.teamIds, filter.bookableGroupIds, filter.activityTypeIds, filter.hasOpenSessions, filter.showApplicationTimes, filter.sortBy);
2708
2882
  }
2709
2883
  toParams() {
2710
2884
  const params = { limit: 'null' };
@@ -2720,11 +2894,14 @@ class BookingSlotFilter {
2720
2894
  if (this.locationIds && this.locationIds.length) {
2721
2895
  params['location_id'] = this.locationIds.join(',');
2722
2896
  }
2723
- if (this.locationGroupIds && this.locationGroupIds.length) {
2724
- params['location_group_id'] = this.locationGroupIds.join(',');
2897
+ if (this.bookableItemIds && this.bookableItemIds.length) {
2898
+ params['bookable_id'] = this.bookableItemIds.join(',');
2899
+ }
2900
+ if (this.bookableGroupIds && this.bookableGroupIds.length) {
2901
+ params['bookable_group_id'] = this.bookableGroupIds.join(',');
2725
2902
  }
2726
2903
  if (this.tagIds && this.tagIds.length) {
2727
- params['tag_id'] = this.tagIds.join(',');
2904
+ params['bookable_tag_id'] = this.tagIds.join(',');
2728
2905
  }
2729
2906
  if (this.teamIds && this.teamIds.length) {
2730
2907
  params['team_id'] = this.teamIds.join(',');
@@ -3377,46 +3554,46 @@ class BookingCalendarService {
3377
3554
  });
3378
3555
  }
3379
3556
  // endregion
3380
- // region Overbooked locations
3381
- getOverbookedLocations(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3557
+ // region Overbooked sessions
3558
+ getOverbookedSessions(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3382
3559
  if (role == Role.ClubAdmin) {
3383
- return this.getClubOverbookedLocations(clubOrSectionOrTeamId, bookingSlotFilter);
3560
+ return this.getClubOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3384
3561
  }
3385
- return this.getSectionOverbookedLocations(clubOrSectionOrTeamId, bookingSlotFilter);
3562
+ return this.getSectionOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3386
3563
  }
3387
- getClubOverbookedLocations(clubId, bookingSlotFilter) {
3564
+ getClubOverbookedSessions(clubId, bookingSlotFilter) {
3388
3565
  const params = bookingSlotFilter.toParams();
3389
3566
  return this.apiService
3390
- .getCollection(overbookedLocationFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_LOCATIONS_PATH, { clubId }, {
3567
+ .getCollection(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH, { clubId }, {
3391
3568
  params
3392
3569
  });
3393
3570
  }
3394
- getSectionOverbookedLocations(sectionId, bookingSlotFilter) {
3571
+ getSectionOverbookedSessions(sectionId, bookingSlotFilter) {
3395
3572
  const params = bookingSlotFilter.toParams();
3396
3573
  return this.apiService
3397
- .getCollection(overbookedLocationFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_LOCATIONS_PATH, { sectionId }, {
3574
+ .getCollection(bookingCalendarSlotSessionFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH, { sectionId }, {
3398
3575
  params
3399
3576
  });
3400
3577
  }
3401
3578
  // endregion
3402
- // region Overbooked sessions
3403
- getOverbookedSessions(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3579
+ // region Overbooked bookables
3580
+ getOverbookedBookables(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3404
3581
  if (role == Role.ClubAdmin) {
3405
- return this.getClubOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3582
+ return this.getClubOverbookedBookables(clubOrSectionOrTeamId, bookingSlotFilter);
3406
3583
  }
3407
- return this.getSectionOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3584
+ return this.getSectionOverbookedBookables(clubOrSectionOrTeamId, bookingSlotFilter);
3408
3585
  }
3409
- getClubOverbookedSessions(clubId, bookingSlotFilter) {
3586
+ getClubOverbookedBookables(clubId, bookingSlotFilter) {
3410
3587
  const params = bookingSlotFilter.toParams();
3411
3588
  return this.apiService
3412
- .getCollection(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH, { clubId }, {
3589
+ .getCollection(overbookedBookableItemFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_BOOKABLES_PATH, { clubId }, {
3413
3590
  params
3414
3591
  });
3415
3592
  }
3416
- getSectionOverbookedSessions(sectionId, bookingSlotFilter) {
3593
+ getSectionOverbookedBookables(sectionId, bookingSlotFilter) {
3417
3594
  const params = bookingSlotFilter.toParams();
3418
3595
  return this.apiService
3419
- .getCollection(bookingCalendarSlotSessionFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH, { sectionId }, {
3596
+ .getCollection(overbookedBookableItemFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_BOOKABLES_PATH, { sectionId }, {
3420
3597
  params
3421
3598
  });
3422
3599
  }
@@ -4625,5 +4802,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
4625
4802
  * Generated bundle index. Do not edit.
4626
4803
  */
4627
4804
 
4628
- export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityLocationPart, ActivityLocationTag, ActivityParticipant, 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 };
4805
+ export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityLocationPart, ActivityLocationTag, ActivityParticipant, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookableGroup, BookableItem, BookablePart, BookableService, BookableTag, 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, OverbookedBookableItem, 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 };
4629
4806
  //# sourceMappingURL=myclub_se-data-access.mjs.map