@myclub_se/data-access 2.13.1 → 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 (82) hide show
  1. package/esm2020/lib/api-models/api-activity-participant.mjs +2 -0
  2. package/esm2020/lib/api-models/api-bookable-group.mjs +2 -0
  3. package/esm2020/lib/api-models/api-bookable-item.mjs +2 -0
  4. package/esm2020/lib/api-models/api-bookable-part.mjs +2 -0
  5. package/esm2020/lib/api-models/api-bookable-tag.mjs +2 -0
  6. package/esm2020/lib/api-models/api-booking-calendar-application-time.mjs +1 -1
  7. package/esm2020/lib/api-models/api-booking-calendar-slot-session.mjs +1 -1
  8. package/esm2020/lib/api-models/api-booking-calendar-slot.mjs +1 -1
  9. package/esm2020/lib/api-models/api-booking-calendar.mjs +1 -1
  10. package/esm2020/lib/api-models/api-event.mjs +1 -1
  11. package/esm2020/lib/api-models/api-overbooked-bookable-item.mjs +2 -0
  12. package/esm2020/lib/api-models/index.mjs +7 -1
  13. package/esm2020/lib/models/activity-location-part.mjs +4 -4
  14. package/esm2020/lib/models/activity-participant.mjs +12 -0
  15. package/esm2020/lib/models/bookable-group.mjs +21 -0
  16. package/esm2020/lib/models/bookable-item.mjs +34 -0
  17. package/esm2020/lib/models/bookable-part.mjs +14 -0
  18. package/esm2020/lib/models/bookable-tag.mjs +17 -0
  19. package/esm2020/lib/models/booking-calendar-application-time.mjs +9 -9
  20. package/esm2020/lib/models/booking-calendar-slot-session.mjs +9 -9
  21. package/esm2020/lib/models/booking-calendar-slot.mjs +5 -5
  22. package/esm2020/lib/models/booking-calendar.mjs +9 -9
  23. package/esm2020/lib/models/event.mjs +3 -2
  24. package/esm2020/lib/models/index.mjs +7 -1
  25. package/esm2020/lib/models/overbooked-bookable-item.mjs +10 -0
  26. package/esm2020/lib/services/activity.service.mjs +2 -189
  27. package/esm2020/lib/services/bookable.service.mjs +258 -0
  28. package/esm2020/lib/services/booking-calendar.service.mjs +30 -26
  29. package/esm2020/lib/services/factories/activity-participant-factory.mjs +3 -0
  30. package/esm2020/lib/services/factories/bookable-group-factory.mjs +6 -0
  31. package/esm2020/lib/services/factories/bookable-item-factory.mjs +5 -0
  32. package/esm2020/lib/services/factories/bookable-part-factory.mjs +5 -0
  33. package/esm2020/lib/services/factories/bookable-tag-factory.mjs +5 -0
  34. package/esm2020/lib/services/factories/booking-calendar-application-time-factory.mjs +2 -2
  35. package/esm2020/lib/services/factories/booking-calendar-factory.mjs +3 -3
  36. package/esm2020/lib/services/factories/booking-calendar-slot-factory.mjs +2 -2
  37. package/esm2020/lib/services/factories/booking-calendar-slot-session-factory.mjs +2 -2
  38. package/esm2020/lib/services/factories/event-factory.mjs +3 -2
  39. package/esm2020/lib/services/factories/index.mjs +8 -1
  40. package/esm2020/lib/services/factories/overbooked-bookable-item-factory.mjs +3 -0
  41. package/esm2020/lib/services/index.mjs +2 -1
  42. package/fesm2015/myclub_se-data-access.mjs +439 -247
  43. package/fesm2015/myclub_se-data-access.mjs.map +1 -1
  44. package/fesm2020/myclub_se-data-access.mjs +439 -247
  45. package/fesm2020/myclub_se-data-access.mjs.map +1 -1
  46. package/lib/api-models/api-activity-participant.d.ts +9 -0
  47. package/lib/api-models/api-bookable-group.d.ts +9 -0
  48. package/lib/api-models/api-bookable-item.d.ts +12 -0
  49. package/lib/api-models/api-bookable-part.d.ts +4 -0
  50. package/lib/api-models/api-bookable-tag.d.ts +7 -0
  51. package/lib/api-models/api-booking-calendar-application-time.d.ts +5 -5
  52. package/lib/api-models/api-booking-calendar-slot-session.d.ts +5 -5
  53. package/lib/api-models/api-booking-calendar-slot.d.ts +2 -2
  54. package/lib/api-models/api-booking-calendar.d.ts +2 -2
  55. package/lib/api-models/api-event.d.ts +2 -0
  56. package/lib/api-models/api-overbooked-bookable-item.d.ts +7 -0
  57. package/lib/api-models/index.d.ts +6 -0
  58. package/lib/models/activity-location-part.d.ts +1 -1
  59. package/lib/models/activity-participant.d.ts +10 -0
  60. package/lib/models/bookable-group.d.ts +18 -0
  61. package/lib/models/bookable-item.d.ts +22 -0
  62. package/lib/models/bookable-part.d.ts +10 -0
  63. package/lib/models/bookable-tag.d.ts +13 -0
  64. package/lib/models/booking-calendar-application-time.d.ts +8 -8
  65. package/lib/models/booking-calendar-slot-session.d.ts +8 -8
  66. package/lib/models/booking-calendar-slot.d.ts +4 -4
  67. package/lib/models/booking-calendar.d.ts +4 -4
  68. package/lib/models/event.d.ts +3 -1
  69. package/lib/models/index.d.ts +6 -0
  70. package/lib/models/overbooked-bookable-item.d.ts +8 -0
  71. package/lib/services/activity.service.d.ts +1 -31
  72. package/lib/services/bookable.service.d.ts +44 -0
  73. package/lib/services/booking-calendar.service.d.ts +6 -5
  74. package/lib/services/factories/activity-participant-factory.d.ts +3 -0
  75. package/lib/services/factories/bookable-group-factory.d.ts +3 -0
  76. package/lib/services/factories/bookable-item-factory.d.ts +3 -0
  77. package/lib/services/factories/bookable-part-factory.d.ts +3 -0
  78. package/lib/services/factories/bookable-tag-factory.d.ts +3 -0
  79. package/lib/services/factories/index.d.ts +7 -0
  80. package/lib/services/factories/overbooked-bookable-item-factory.d.ts +3 -0
  81. package/lib/services/index.d.ts +1 -0
  82. 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
  }
@@ -213,6 +213,18 @@ class ActivityLocationGroup {
213
213
  }
214
214
  }
215
215
 
216
+ class ActivityParticipant {
217
+ constructor(id, activityId, memberId, teamId, memberEmail, memberName, rfLeader) {
218
+ this.id = id;
219
+ this.activityId = activityId;
220
+ this.memberId = memberId;
221
+ this.teamId = teamId;
222
+ this.memberEmail = memberEmail;
223
+ this.memberName = memberName;
224
+ this.rfLeader = rfLeader;
225
+ }
226
+ }
227
+
216
228
  class ActivitySettings {
217
229
  constructor(dayOptions, hourOptions, inviteGroupOptions, inviteSettingsOptions, maxAttendanceOptions, meetUpTimeOptions, remindReceiverOptions, repeatOptions, repeatTypeOptions) {
218
230
  this.dayOptions = dayOptions;
@@ -307,6 +319,86 @@ class Authentication {
307
319
  }
308
320
  }
309
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
+
310
402
  class SearchTeam {
311
403
  constructor(club, section, id, club_name, name, section_name) {
312
404
  this.club = club;
@@ -325,7 +417,7 @@ class SearchTeam {
325
417
  }
326
418
 
327
419
  class BookingCalendar {
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) {
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) {
329
421
  this.id = id;
330
422
  this.club_id = club_id;
331
423
  this.section_id = section_id;
@@ -339,15 +431,15 @@ class BookingCalendar {
339
431
  this.allow_team_export = allow_team_export;
340
432
  this.allow_repeated_bookings = allow_repeated_bookings;
341
433
  this.is_default = is_default;
342
- this.location_groups = location_groups;
343
434
  this.available_for_teams = available_for_teams;
435
+ this.bookable_groups = bookable_groups;
344
436
  }
345
437
  static asFormGroup(calendar) {
346
- const locationGroups = [];
438
+ const bookableGroups = [];
347
439
  const availableForTeams = [];
348
- if (calendar?.location_groups) {
349
- calendar.location_groups.forEach((locationGroup) => {
350
- locationGroups.push(ActivityLocationGroup.asFormGroup(locationGroup));
440
+ if (calendar?.bookable_groups) {
441
+ calendar.bookable_groups.forEach((bookableGroup) => {
442
+ bookableGroups.push(BookableGroup.asFormGroup(bookableGroup));
351
443
  });
352
444
  }
353
445
  if (calendar?.available_for_teams) {
@@ -365,7 +457,7 @@ class BookingCalendar {
365
457
  section_name: new FormControl(calendar?.section_name || ''),
366
458
  team_name: new FormControl(calendar?.team_name || ''),
367
459
  status: new FormControl(calendar?.status || 'preliminary'),
368
- location_groups: new FormArray(locationGroups),
460
+ bookable_groups: new FormArray(bookableGroups),
369
461
  available_for_teams: new FormArray(availableForTeams),
370
462
  max_application_number: new FormControl(calendar?.max_application_number || 0),
371
463
  is_default: new FormControl(calendar?.is_default || false),
@@ -376,7 +468,7 @@ class BookingCalendar {
376
468
  }
377
469
 
378
470
  class BookingCalendarApplicationTime {
379
- 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) {
380
472
  this.id = id;
381
473
  this.section_id = section_id;
382
474
  this.slot_id = slot_id;
@@ -386,13 +478,9 @@ class BookingCalendarApplicationTime {
386
478
  this.section_name = section_name;
387
479
  this.start_time = start_time;
388
480
  this.team_name = team_name;
389
- this.location_zones_taken = location_zones_taken;
390
481
  this.applicant_comment = applicant_comment;
391
482
  this.reviewer_comment = reviewer_comment;
392
483
  this.status = status;
393
- this.location_part_id = location_part_id;
394
- this.location_part_name = location_part_name;
395
- this.location_id = location_id;
396
484
  this.repeat = repeat;
397
485
  this.activity_type_id = activity_type_id;
398
486
  this.color = color;
@@ -402,7 +490,11 @@ class BookingCalendarApplicationTime {
402
490
  this.slot_number_of_available_sessions = slot_number_of_available_sessions;
403
491
  this.slot_last_repeating_date = slot_last_repeating_date;
404
492
  this.created = created;
405
- 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;
406
498
  }
407
499
  static asFormGroup(session) {
408
500
  return new FormGroup({
@@ -415,28 +507,26 @@ class BookingCalendarApplicationTime {
415
507
  section_name: new FormControl(session?.section_name || ''),
416
508
  start_time: new FormControl(session?.start_time || '', Validators.required),
417
509
  team_name: new FormControl(session?.team_name || ''),
418
- location_zones_taken: new FormControl(session?.location_zones_taken || 1, [Validators.min(1), Validators.required]),
419
510
  applicant_comment: new FormControl(session?.applicant_comment || null),
420
511
  reviewer_comment: new FormControl(session?.reviewer_comment || null),
421
512
  status: new FormControl(session?.status || ''),
422
- location_part_id: new FormControl(session?.location_part_id || ''),
423
513
  repeat: new FormControl(session?.repeat || false),
424
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 || ''),
425
517
  });
426
518
  }
427
519
  }
428
520
 
429
521
  class BookingCalendarSlot {
430
- 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) {
431
523
  this.id = id;
432
524
  this.calendar_id = calendar_id;
433
525
  this.calendar_status = calendar_status;
434
- this.location_id = location_id;
435
526
  this.color = color;
436
527
  this.day = day;
437
528
  this.end_time = end_time;
438
529
  this.group_id = group_id;
439
- this.location_name = location_name;
440
530
  this.number_of_available_sessions = number_of_available_sessions;
441
531
  this.sessions = sessions;
442
532
  this.open_sessions = open_sessions;
@@ -453,12 +543,13 @@ class BookingCalendarSlot {
453
543
  this.reserved_time_position = reserved_time_position;
454
544
  this.application_times = application_times;
455
545
  this.last_repeating_date = last_repeating_date;
546
+ this.bookable_name = bookable_name;
547
+ this.bookable_id = bookable_id;
456
548
  }
457
549
  static asFormGroup(slot) {
458
550
  return new FormGroup({
459
551
  id: new FormControl(slot?.id || ''),
460
552
  calendar_id: new FormControl(slot?.calendar_id || '', Validators.required),
461
- location_id: new FormControl(slot?.location_id || '', Validators.required),
462
553
  day: new FormControl(slot?.day || '', Validators.required),
463
554
  end_time: new FormControl(slot?.end_time || '', Validators.required),
464
555
  group_id: new FormControl(slot?.group_id || null, { nonNullable: false }),
@@ -474,12 +565,13 @@ class BookingCalendarSlot {
474
565
  reserved_time_enabled: new FormControl(typeof slot?.reserved_time_enabled !== 'undefined' ? slot?.reserved_time_enabled : false),
475
566
  reserved_time: new FormControl(slot?.reserved_time || '00:00'),
476
567
  reserved_time_position: new FormControl(slot?.reserved_time_position || ''),
568
+ bookable_id: new FormControl(slot?.bookable_id || '', Validators.required),
477
569
  });
478
570
  }
479
571
  }
480
572
 
481
573
  class BookingCalendarSlotSession {
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) {
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) {
483
575
  this.id = id;
484
576
  this.section_id = section_id;
485
577
  this.slot_id = slot_id;
@@ -492,19 +584,19 @@ class BookingCalendarSlotSession {
492
584
  this.is_overbooked = is_overbooked;
493
585
  this.last_repeating_date = last_repeating_date;
494
586
  this.type = type;
495
- this.location_zones_taken = location_zones_taken;
496
587
  this.slot_index = slot_index;
497
588
  this.comment = comment;
498
- this.location_part_id = location_part_id;
499
- this.location_part_name = location_part_name;
500
- this.location_name = location_name;
501
- this.location_id = location_id;
502
589
  this.day = day;
503
590
  this.repeat = repeat;
504
591
  this.activity_type_id = activity_type_id;
505
592
  this.color = color;
506
593
  this.update_repeating = update_repeating;
507
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;
508
600
  }
509
601
  static asFormGroup(session) {
510
602
  return new FormGroup({
@@ -520,13 +612,13 @@ class BookingCalendarSlotSession {
520
612
  is_overbooked: new FormControl(session?.is_overbooked || false),
521
613
  last_repeating_date: new FormControl(session?.last_repeating_date || null),
522
614
  type: new FormControl(session?.type || ''),
523
- location_zones_taken: new FormControl(session?.location_zones_taken || 1, [Validators.min(1), Validators.required]),
524
615
  comment: new FormControl(session?.comment || ''),
525
- location_part_id: new FormControl(session?.location_part_id || ''),
526
616
  repeat: new FormControl(session?.repeat || false),
527
617
  activity_type_id: new FormControl(session?.activity_type_id || null),
528
618
  update_repeating: new FormControl(!!session?.update_repeating || false),
529
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 || ''),
530
622
  });
531
623
  }
532
624
  }
@@ -835,7 +927,7 @@ class Email {
835
927
  }
836
928
 
837
929
  class Event {
838
- constructor(id, activity_id, activity_type, base_background_color, base_color, base_name, calendar_name, description, end, invitation_id, invitation_response, invited_members, location, meet_up_place, meet_up_time, member_id, open_activity, start, title, type) {
930
+ constructor(id, activity_id, activity_type, base_background_color, base_color, base_name, calendar_name, description, end, invitation_id, invitation_response, invited_members, location, meet_up_place, meet_up_time, member_id, open_activity, participants, start, title, type) {
839
931
  this.id = id;
840
932
  this.activity_id = activity_id;
841
933
  this.activity_type = activity_type;
@@ -853,6 +945,7 @@ class Event {
853
945
  this.meet_up_time = meet_up_time;
854
946
  this.member_id = member_id;
855
947
  this.open_activity = open_activity;
948
+ this.participants = participants;
856
949
  this.start = start;
857
950
  this.title = title;
858
951
  this.type = type;
@@ -1499,6 +1592,16 @@ class OptionalFee {
1499
1592
  }
1500
1593
  }
1501
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
+
1502
1605
  class OverbookedLocation {
1503
1606
  constructor(start_time, end_time, day, location_name, session_names) {
1504
1607
  this.start_time = start_time;
@@ -1659,6 +1762,8 @@ const activityLocationGroupFactory = (apiActivityLocationGroup) => {
1659
1762
  return new ActivityLocationGroup(apiActivityLocationGroup.id, apiActivityLocationGroup.club_id, apiActivityLocationGroup.section_id, apiActivityLocationGroup.active, apiActivityLocationGroup.name, apiActivityLocationGroup.locations && apiActivityLocationGroup.locations.length ? apiActivityLocationGroup.locations.map((apiActivityLocation) => activityLocationFactory(apiActivityLocation)) : []);
1660
1763
  };
1661
1764
 
1765
+ const activityParticipantFactory = (apiActivityParticipant) => new ActivityParticipant(apiActivityParticipant.id, apiActivityParticipant.activity_id, apiActivityParticipant.member_id, apiActivityParticipant.team_id, apiActivityParticipant.member_email, apiActivityParticipant.member_name, apiActivityParticipant.rf_leader);
1766
+
1662
1767
  const activitySettingsFactory = (apiActivitySettings) => new ActivitySettings(apiActivitySettings.day_options, apiActivitySettings.hour_options, apiActivitySettings.invite_group_options, apiActivitySettings.invite_settings_options, apiActivitySettings.max_attendance_options, apiActivitySettings.meet_up_time_options, apiActivitySettings.remind_receiver_options, apiActivitySettings.repeat_options, apiActivitySettings.repeat_type_options);
1663
1768
 
1664
1769
  const activityTypeFactory = (apiActivityType) => new ActivityType(apiActivityType.id, apiActivityType.club_id, apiActivityType.section_id, apiActivityType.active, apiActivityType.base_type, apiActivityType.name, apiActivityType.is_available_for_booking, apiActivityType.color);
@@ -1673,19 +1778,33 @@ const authTeamFactory = (apiAuthTeam) => new AuthTeam(apiAuthTeam.id, apiAuthTea
1673
1778
 
1674
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);
1675
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
+
1676
1795
  const clubFactory = (apiClub) => new Club(apiClub.id, apiClub.name);
1677
1796
 
1678
1797
  const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
1679
1798
 
1680
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);
1681
1800
 
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)) : []);
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)) : []);
1683
1802
 
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);
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);
1685
1804
 
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);
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);
1687
1806
 
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);
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);
1689
1808
 
1690
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);
1691
1810
 
@@ -1723,7 +1842,7 @@ const fileFactory = (file) => new FileObject(file.id, file.created, null, typeof
1723
1842
 
1724
1843
  const directoryFactory = (directory) => new Directory(directory.id, directory.club_id, directory.section_id, directory.team_id, directory.created, directory.files.map((file) => fileFactory(file)), directory.name, directory.location_name, directory.updated);
1725
1844
 
1726
- const eventFactory = (apiEvent) => new Event(apiEvent.id, apiEvent.activity_id, apiEvent.activity_type, apiEvent.base_background_color, apiEvent.base_color, apiEvent.base_name, apiEvent.calendar_name, apiEvent.description, apiEvent.end, apiEvent.invitation_id, apiEvent.invitation_response, (apiEvent.invited_members && apiEvent.invited_members.length) ? apiEvent.invited_members.map((invitedMember) => memberActivityInviteFactory(invitedMember)) : [], apiEvent.location, apiEvent.meet_up_place, apiEvent.meet_up_time, apiEvent.member_id, apiEvent.open_activity, apiEvent.start, apiEvent.title, apiEvent.type);
1845
+ const eventFactory = (apiEvent) => new Event(apiEvent.id, apiEvent.activity_id, apiEvent.activity_type, apiEvent.base_background_color, apiEvent.base_color, apiEvent.base_name, apiEvent.calendar_name, apiEvent.description, apiEvent.end, apiEvent.invitation_id, apiEvent.invitation_response, (apiEvent.invited_members && apiEvent.invited_members.length) ? apiEvent.invited_members.map((invitedMember) => memberActivityInviteFactory(invitedMember)) : [], apiEvent.location, apiEvent.meet_up_place, apiEvent.meet_up_time, apiEvent.member_id, apiEvent.open_activity, (apiEvent.participants && apiEvent.participants.length) ? apiEvent.participants.map((participant) => activityParticipantFactory(participant)) : [], apiEvent.start, apiEvent.title, apiEvent.type);
1727
1846
 
1728
1847
  const externalLinkFactory = (apiExternalLink) => new ExternalLink(apiExternalLink.text, apiExternalLink.value);
1729
1848
 
@@ -1781,6 +1900,8 @@ const optionalFeeFactory = (apiOptionalFee) => new OptionalFee(apiOptionalFee.id
1781
1900
 
1782
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);
1783
1902
 
1903
+ const overbookedBookableItemFactory = (apiOverbookedBookableItem) => new OverbookedBookableItem(apiOverbookedBookableItem.start_time, apiOverbookedBookableItem.end_time, apiOverbookedBookableItem.day, apiOverbookedBookableItem.bookable_name, apiOverbookedBookableItem.session_names);
1904
+
1784
1905
  const overbookedLocationFactory = (apiOverbookedLocation) => new OverbookedLocation(apiOverbookedLocation.start_time, apiOverbookedLocation.end_time, apiOverbookedLocation.day, apiOverbookedLocation.location_name, apiOverbookedLocation.session_names);
1785
1906
 
1786
1907
  const otherMemberFieldFactory = (apiOtherMemberFieldFactory) => new OtherMemberField(apiOtherMemberFieldFactory.display_name, apiOtherMemberFieldFactory.field_name, apiOtherMemberFieldFactory.value);
@@ -2014,24 +2135,11 @@ const TEAM_ACTIVITY_TYPES_PATH = ':teamId/activities/types/';
2014
2135
  const TEAM_CALENDAR_PATH = ':teamId/activities/calendar/';
2015
2136
  const CLUB_ACTIVITY_LOCATIONS_PATH = ':clubId/activities/locations/';
2016
2137
  const CLUB_ACTIVITY_LOCATION_PATH = ':clubId/activities/locations/:locationId/';
2017
- const CLUB_ACTIVITY_LOCATION_GROUPS_PATH = ':clubId/activities/locations/groups/';
2018
- const CLUB_ACTIVITY_LOCATION_GROUP_PATH = ':clubId/activities/locations/groups/:groupId/';
2019
- const CLUB_ACTIVITY_LOCATION_TAGS_PATH = ':clubId/activities/locations/tags/';
2020
- const CLUB_ACTIVITY_LOCATION_TAG_PATH = ':clubId/activities/locations/tags/:tagId/';
2021
- const CLUB_ACTIVITY_LOCATION_PARTS_PATH = ':clubId/activities/locations/:locationId/parts/';
2022
2138
  const CLUB_ACTIVITY_TYPES_PATH = ':clubId/activities/types/';
2023
2139
  const CLUB_ACTIVITY_TYPE_PATH = ':clubId/activities/types/:typeId/';
2024
2140
  const TEAM_ACTIVITY_LOCATIONS_PATH = ':teamId/activities/locations/';
2025
- const TEAM_ACTIVITY_LOCATION_GROUPS_PATH = ':teamId/activities/locations/groups/';
2026
- const TEAM_ACTIVITY_LOCATION_TAGS_PATH = ':teamId/activities/locations/tags/';
2027
- const TEAM_ACTIVITY_LOCATION_PARTS_PATH = ':teamId/activities/locations/:locationId/parts/';
2028
2141
  const SECTION_ACTIVITY_LOCATIONS_PATH = ':sectionId/activities/locations/';
2029
2142
  const SECTION_ACTIVITY_LOCATION_PATH = ':sectionId/activities/locations/:locationId/';
2030
- const SECTION_ACTIVITY_LOCATION_GROUPS_PATH = ':sectionId/activities/locations/groups/';
2031
- const SECTION_ACTIVITY_LOCATION_GROUP_PATH = ':sectionId/activities/locations/groups/:groupId/';
2032
- const SECTION_ACTIVITY_LOCATION_TAGS_PATH = ':sectionId/activities/locations/tags/';
2033
- const SECTION_ACTIVITY_LOCATION_TAG_PATH = ':sectionId/activities/locations/tags/:tagId/';
2034
- const SECTION_ACTIVITY_LOCATION_PARTS_PATH = ':sectionId/activities/locations/:locationId/parts/';
2035
2143
  const SECTION_ACTIVITY_TYPES_PATH = ':sectionId/activities/types/';
2036
2144
  const SECTION_ACTIVITY_TYPE_PATH = ':sectionId/activities/types/:typeId/';
2037
2145
  class ActivityService {
@@ -2232,179 +2340,6 @@ class ActivityService {
2232
2340
  locationId: location.id
2233
2341
  }, location);
2234
2342
  }
2235
- getActivityLocationGroups(role, clubOrSectionOrTeamId) {
2236
- if (role == Role.ClubAdmin) {
2237
- return this.getClubActivityLocationGroups(clubOrSectionOrTeamId);
2238
- }
2239
- else if (role == Role.SectionAdmin) {
2240
- return this.getSectionActivityLocationGroups(clubOrSectionOrTeamId);
2241
- }
2242
- return this.getTeamActivityLocationGroups(clubOrSectionOrTeamId);
2243
- }
2244
- getClubActivityLocationGroups(clubId) {
2245
- return this.apiService
2246
- .getCollection(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUPS_PATH, { clubId }, { params: { limit: 'null' } });
2247
- }
2248
- getSectionActivityLocationGroups(sectionId) {
2249
- return this.apiService
2250
- .getCollection(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUPS_PATH, { sectionId }, { params: { limit: 'null' } });
2251
- }
2252
- getTeamActivityLocationGroups(teamId) {
2253
- return this.apiService
2254
- .getCollection(activityLocationGroupFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_GROUPS_PATH, { teamId }, { params: { limit: 'null' } });
2255
- }
2256
- updateActivityLocationGroup(role, clubOrSectionOrTeamId, locationGroup) {
2257
- if (role === Role.ClubAdmin) {
2258
- return this.updateClubActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2259
- }
2260
- return this.updateSectionActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2261
- }
2262
- updateClubActivityLocationGroup(clubId, locationGroup) {
2263
- return this.apiService
2264
- .updateResource(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUP_PATH, {
2265
- clubId,
2266
- groupId: locationGroup.id
2267
- }, locationGroup);
2268
- }
2269
- updateSectionActivityLocationGroup(sectionId, locationGroup) {
2270
- return this.apiService
2271
- .updateResource(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUP_PATH, {
2272
- sectionId,
2273
- groupId: locationGroup.id
2274
- }, locationGroup);
2275
- }
2276
- createActivityLocationGroup(role, clubOrSectionOrTeamId, locationGroup) {
2277
- if (role === Role.ClubAdmin) {
2278
- return this.createClubActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2279
- }
2280
- return this.createSectionActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
2281
- }
2282
- createClubActivityLocationGroup(clubId, locationGroup) {
2283
- delete locationGroup.id;
2284
- return this.apiService
2285
- .postResource(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUPS_PATH, {
2286
- clubId,
2287
- }, locationGroup);
2288
- }
2289
- createSectionActivityLocationGroup(sectionId, locationGroup) {
2290
- delete locationGroup.id;
2291
- return this.apiService
2292
- .postResource(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUPS_PATH, {
2293
- sectionId,
2294
- }, locationGroup);
2295
- }
2296
- getActivityLocationTags(role, clubOrSectionOrTeamId) {
2297
- if (role == Role.ClubAdmin) {
2298
- return this.getClubActivityLocationTags(clubOrSectionOrTeamId);
2299
- }
2300
- else if (role == Role.SectionAdmin) {
2301
- return this.getSectionActivityLocationTags(clubOrSectionOrTeamId);
2302
- }
2303
- return this.getTeamActivityLocationTags(clubOrSectionOrTeamId);
2304
- }
2305
- getClubActivityLocationTags(clubId) {
2306
- return this.apiService
2307
- .getCollection(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAGS_PATH, { clubId }, { params: { limit: 'null' } });
2308
- }
2309
- getSectionActivityLocationTags(sectionId) {
2310
- return this.apiService
2311
- .getCollection(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAGS_PATH, { sectionId }, { params: { limit: 'null' } });
2312
- }
2313
- getTeamActivityLocationTags(teamId) {
2314
- return this.apiService
2315
- .getCollection(activityLocationTagFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_TAGS_PATH, { teamId }, { params: { limit: 'null' } });
2316
- }
2317
- createActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2318
- if (role == Role.ClubAdmin) {
2319
- return this.createClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2320
- }
2321
- else if (role == Role.SectionAdmin) {
2322
- return this.createSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2323
- }
2324
- return this.createTeamActivityLocationTag(clubOrSectionOrTeamId, tag);
2325
- }
2326
- createClubActivityLocationTag(clubId, tag) {
2327
- delete tag.id;
2328
- return this.apiService
2329
- .postResource(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAGS_PATH, {
2330
- clubId,
2331
- }, tag);
2332
- }
2333
- createSectionActivityLocationTag(sectionId, tag) {
2334
- delete tag.id;
2335
- return this.apiService
2336
- .postResource(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAGS_PATH, {
2337
- sectionId,
2338
- }, tag);
2339
- }
2340
- createTeamActivityLocationTag(teamId, tag) {
2341
- delete tag.id;
2342
- return this.apiService
2343
- .postResource(activityLocationTagFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_TAGS_PATH, {
2344
- teamId,
2345
- }, tag);
2346
- }
2347
- updateActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2348
- if (role == Role.ClubAdmin) {
2349
- return this.updateClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2350
- }
2351
- return this.updateSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2352
- }
2353
- updateClubActivityLocationTag(clubId, tag) {
2354
- return this.apiService
2355
- .updateResource(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAG_PATH, {
2356
- clubId,
2357
- tagId: tag.id,
2358
- }, tag);
2359
- }
2360
- updateSectionActivityLocationTag(sectionId, tag) {
2361
- return this.apiService
2362
- .updateResource(activityLocationTagFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAG_PATH, {
2363
- sectionId,
2364
- tagId: tag.id,
2365
- }, tag);
2366
- }
2367
- deleteActivityLocationTag(role, clubOrSectionOrTeamId, tag) {
2368
- if (role == Role.ClubAdmin) {
2369
- return this.deleteClubActivityLocationTag(clubOrSectionOrTeamId, tag);
2370
- }
2371
- return this.deleteSectionActivityLocationTag(clubOrSectionOrTeamId, tag);
2372
- }
2373
- deleteClubActivityLocationTag(clubId, tag) {
2374
- return this.apiService
2375
- .deleteResource(Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAG_PATH, {
2376
- clubId,
2377
- tagId: tag.id,
2378
- });
2379
- }
2380
- deleteSectionActivityLocationTag(sectionId, tag) {
2381
- return this.apiService
2382
- .deleteResource(Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_TAG_PATH, {
2383
- sectionId,
2384
- tagId: tag.id,
2385
- });
2386
- }
2387
- getActivityLocationParts(role, clubOrSectionOrTeamId, locationId) {
2388
- if (role == Role.ClubAdmin) {
2389
- return this.getClubActivityLocationParts(clubOrSectionOrTeamId, locationId);
2390
- }
2391
- else if (role == Role.SectionAdmin) {
2392
- return this.getSectionActivityLocationParts(clubOrSectionOrTeamId, locationId);
2393
- }
2394
- return this.getTeamActivityLocationParts(clubOrSectionOrTeamId, locationId);
2395
- }
2396
- getClubActivityLocationParts(clubId, locationId) {
2397
- return this.apiService
2398
- .getCollection(activityLocationPartFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_PARTS_PATH, { clubId, locationId }, { params: { limit: 'null' } });
2399
- }
2400
- getSectionActivityLocationParts(sectionId, locationId) {
2401
- return this.apiService
2402
- .getCollection(activityLocationPartFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_PARTS_PATH, { sectionId, locationId }, { params: { limit: 'null' } });
2403
- }
2404
- getTeamActivityLocationParts(teamId, locationId) {
2405
- return this.apiService
2406
- .getCollection(activityLocationPartFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_PARTS_PATH, { teamId, locationId }, { params: { limit: 'null' } });
2407
- }
2408
2343
  getTeamActivityNew(teamId) {
2409
2344
  return this.apiService
2410
2345
  .getResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_NEW_PATH, { teamId });
@@ -2630,6 +2565,259 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
2630
2565
  }]
2631
2566
  }], ctorParameters: function () { return [{ type: ApiService }]; } });
2632
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
+
2633
2821
  const CLUB_BOOKING_CALENDARS_PATH = ':clubId/activities/calendars/';
2634
2822
  const CLUB_BOOKING_CALENDAR_PATH = ':clubId/activities/calendars/:id/';
2635
2823
  const CLUB_BOOKING_CALENDAR_SLOTS_PATH = ':clubId/activities/slots/';
@@ -2645,8 +2833,8 @@ const CLUB_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':clubId/activities/sessio
2645
2833
  const CLUB_BOOKING_SETTINGS_PATH = ':clubId/activities/booking-settings/';
2646
2834
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':clubId/activities/application-times/:id/';
2647
2835
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':clubId/activities/application-times/';
2648
- const CLUB_BOOKING_OVERBOOKED_LOCATIONS_PATH = ':clubId/activities/overbooked/locations/';
2649
2836
  const CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH = ':clubId/activities/overbooked/sessions/';
2837
+ const CLUB_BOOKING_OVERBOOKED_BOOKABLES_PATH = ':clubId/activities/overbooked/bookables/';
2650
2838
  const SECTION_BOOKING_CALENDARS_PATH = ':sectionId/activities/calendars/';
2651
2839
  const SECTION_BOOKING_CALENDAR_PATH = ':sectionId/activities/calendars/:id/';
2652
2840
  const SECTION_BOOKING_CALENDAR_SLOTS_PATH = ':sectionId/activities/slots/';
@@ -2662,8 +2850,8 @@ const SECTION_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':sectionId/activities/
2662
2850
  const SECTION_BOOKING_SETTINGS_PATH = ':sectionId/activities/booking-settings/';
2663
2851
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':sectionId/activities/application-times/:id/';
2664
2852
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':sectionId/activities/application-times/';
2665
- const SECTION_BOOKING_OVERBOOKED_LOCATIONS_PATH = ':sectionId/activities/overbooked/locations/';
2666
2853
  const SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH = ':sectionId/activities/overbooked/sessions/';
2854
+ const SECTION_BOOKING_OVERBOOKED_BOOKABLES_PATH = ':sectionId/activities/overbooked/bookables/';
2667
2855
  const TEAM_BOOKING_CALENDARS_PATH = ':teamId/activities/calendars/';
2668
2856
  const TEAM_BOOKING_CALENDAR_SLOTS_PATH = ':teamId/activities/slots/';
2669
2857
  const TEAM_BOOKING_CALENDAR_SLOTS_SYNC_PATH = ':teamId/activities/slots/sync/';
@@ -2675,21 +2863,22 @@ const TEAM_BOOKING_CALENDAR_SLOT_PATH = ':teamId/activities/slots/:id/';
2675
2863
  const TEAM_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':teamId/activities/application-times/';
2676
2864
  const TEAM_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':teamId/activities/application-times/:id/';
2677
2865
  class BookingSlotFilter {
2678
- 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) {
2679
2867
  this.startDate = startDate;
2680
2868
  this.endDate = endDate;
2681
2869
  this.calendarIds = calendarIds;
2682
2870
  this.locationIds = locationIds;
2871
+ this.bookableItemIds = bookableItemIds;
2683
2872
  this.tagIds = tagIds;
2684
2873
  this.teamIds = teamIds;
2685
- this.locationGroupIds = locationGroupIds;
2874
+ this.bookableGroupIds = bookableGroupIds;
2686
2875
  this.activityTypeIds = activityTypeIds;
2687
2876
  this.hasOpenSessions = hasOpenSessions;
2688
2877
  this.showApplicationTimes = showApplicationTimes;
2689
2878
  this.sortBy = sortBy;
2690
2879
  }
2691
2880
  static fromFilter(filter) {
2692
- 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);
2693
2882
  }
2694
2883
  toParams() {
2695
2884
  const params = { limit: 'null' };
@@ -2705,11 +2894,14 @@ class BookingSlotFilter {
2705
2894
  if (this.locationIds && this.locationIds.length) {
2706
2895
  params['location_id'] = this.locationIds.join(',');
2707
2896
  }
2708
- if (this.locationGroupIds && this.locationGroupIds.length) {
2709
- 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(',');
2710
2902
  }
2711
2903
  if (this.tagIds && this.tagIds.length) {
2712
- params['tag_id'] = this.tagIds.join(',');
2904
+ params['bookable_tag_id'] = this.tagIds.join(',');
2713
2905
  }
2714
2906
  if (this.teamIds && this.teamIds.length) {
2715
2907
  params['team_id'] = this.teamIds.join(',');
@@ -3362,46 +3554,46 @@ class BookingCalendarService {
3362
3554
  });
3363
3555
  }
3364
3556
  // endregion
3365
- // region Overbooked locations
3366
- getOverbookedLocations(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3557
+ // region Overbooked sessions
3558
+ getOverbookedSessions(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3367
3559
  if (role == Role.ClubAdmin) {
3368
- return this.getClubOverbookedLocations(clubOrSectionOrTeamId, bookingSlotFilter);
3560
+ return this.getClubOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3369
3561
  }
3370
- return this.getSectionOverbookedLocations(clubOrSectionOrTeamId, bookingSlotFilter);
3562
+ return this.getSectionOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3371
3563
  }
3372
- getClubOverbookedLocations(clubId, bookingSlotFilter) {
3564
+ getClubOverbookedSessions(clubId, bookingSlotFilter) {
3373
3565
  const params = bookingSlotFilter.toParams();
3374
3566
  return this.apiService
3375
- .getCollection(overbookedLocationFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_LOCATIONS_PATH, { clubId }, {
3567
+ .getCollection(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH, { clubId }, {
3376
3568
  params
3377
3569
  });
3378
3570
  }
3379
- getSectionOverbookedLocations(sectionId, bookingSlotFilter) {
3571
+ getSectionOverbookedSessions(sectionId, bookingSlotFilter) {
3380
3572
  const params = bookingSlotFilter.toParams();
3381
3573
  return this.apiService
3382
- .getCollection(overbookedLocationFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_LOCATIONS_PATH, { sectionId }, {
3574
+ .getCollection(bookingCalendarSlotSessionFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH, { sectionId }, {
3383
3575
  params
3384
3576
  });
3385
3577
  }
3386
3578
  // endregion
3387
- // region Overbooked sessions
3388
- getOverbookedSessions(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3579
+ // region Overbooked bookables
3580
+ getOverbookedBookables(role, clubOrSectionOrTeamId, bookingSlotFilter) {
3389
3581
  if (role == Role.ClubAdmin) {
3390
- return this.getClubOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3582
+ return this.getClubOverbookedBookables(clubOrSectionOrTeamId, bookingSlotFilter);
3391
3583
  }
3392
- return this.getSectionOverbookedSessions(clubOrSectionOrTeamId, bookingSlotFilter);
3584
+ return this.getSectionOverbookedBookables(clubOrSectionOrTeamId, bookingSlotFilter);
3393
3585
  }
3394
- getClubOverbookedSessions(clubId, bookingSlotFilter) {
3586
+ getClubOverbookedBookables(clubId, bookingSlotFilter) {
3395
3587
  const params = bookingSlotFilter.toParams();
3396
3588
  return this.apiService
3397
- .getCollection(bookingCalendarSlotSessionFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_SESSIONS_PATH, { clubId }, {
3589
+ .getCollection(overbookedBookableItemFactory, Role.ClubAdmin, CLUB_BOOKING_OVERBOOKED_BOOKABLES_PATH, { clubId }, {
3398
3590
  params
3399
3591
  });
3400
3592
  }
3401
- getSectionOverbookedSessions(sectionId, bookingSlotFilter) {
3593
+ getSectionOverbookedBookables(sectionId, bookingSlotFilter) {
3402
3594
  const params = bookingSlotFilter.toParams();
3403
3595
  return this.apiService
3404
- .getCollection(bookingCalendarSlotSessionFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_SESSIONS_PATH, { sectionId }, {
3596
+ .getCollection(overbookedBookableItemFactory, Role.SectionAdmin, SECTION_BOOKING_OVERBOOKED_BOOKABLES_PATH, { sectionId }, {
3405
3597
  params
3406
3598
  });
3407
3599
  }
@@ -4610,5 +4802,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
4610
4802
  * Generated bundle index. Do not edit.
4611
4803
  */
4612
4804
 
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 };
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 };
4614
4806
  //# sourceMappingURL=myclub_se-data-access.mjs.map