@myclub_se/data-access 3.5.6 → 3.5.7

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 (30) hide show
  1. package/esm2022/lib/api-models/api-booking-calendar-slot-group-item.mjs +2 -0
  2. package/esm2022/lib/api-models/api-booking-calendar-slot-session-group-item.mjs +2 -0
  3. package/esm2022/lib/api-models/api-booking-calendar-slot-session.mjs +1 -1
  4. package/esm2022/lib/api-models/api-booking-calendar-slot.mjs +1 -1
  5. package/esm2022/lib/api-models/index.mjs +3 -1
  6. package/esm2022/lib/models/booking-calendar-slot-session.mjs +5 -11
  7. package/esm2022/lib/models/booking-calendar-slot.mjs +5 -8
  8. package/esm2022/lib/services/booking-calendar.service.mjs +79 -19
  9. package/esm2022/lib/services/factories/booking-calendar-slot-factory.mjs +2 -2
  10. package/esm2022/lib/services/factories/booking-calendar-slot-group-item-factory.mjs +2 -0
  11. package/esm2022/lib/services/factories/booking-calendar-slot-session-factory.mjs +2 -2
  12. package/esm2022/lib/services/factories/booking-calendar-slot-session-group-item-factory.mjs +2 -0
  13. package/esm2022/lib/services/factories/index.mjs +3 -1
  14. package/esm2022/lib/store/actions/booking.actions.mjs +1 -1
  15. package/esm2022/lib/store/effects/booking.effects.mjs +3 -3
  16. package/fesm2022/myclub_se-data-access.mjs +93 -38
  17. package/fesm2022/myclub_se-data-access.mjs.map +1 -1
  18. package/lib/api-models/api-booking-calendar-slot-group-item.d.ts +3 -0
  19. package/lib/api-models/api-booking-calendar-slot-session-group-item.d.ts +3 -0
  20. package/lib/api-models/api-booking-calendar-slot-session.d.ts +1 -3
  21. package/lib/api-models/api-booking-calendar-slot.d.ts +1 -2
  22. package/lib/api-models/index.d.ts +2 -0
  23. package/lib/models/booking-calendar-slot-session.d.ts +3 -7
  24. package/lib/models/booking-calendar-slot.d.ts +3 -5
  25. package/lib/services/booking-calendar.service.d.ts +12 -2
  26. package/lib/services/factories/booking-calendar-slot-group-item-factory.d.ts +2 -0
  27. package/lib/services/factories/booking-calendar-slot-session-group-item-factory.d.ts +2 -0
  28. package/lib/services/factories/index.d.ts +2 -0
  29. package/lib/store/actions/booking.actions.d.ts +4 -4
  30. package/package.json +1 -1
@@ -2228,8 +2228,7 @@ class BookingCalendarSlot {
2228
2228
  start_time;
2229
2229
  type;
2230
2230
  repeat;
2231
- update_repeating;
2232
- update_until_date;
2231
+ update_dates;
2233
2232
  reserved_time_enabled;
2234
2233
  repeat_num;
2235
2234
  repeat_to_day;
@@ -2255,8 +2254,7 @@ class BookingCalendarSlot {
2255
2254
  repeat_num: new FormControl(slot?.repeat_num || 6, Validators.max(24)),
2256
2255
  repeat_to_day: new FormControl(slot?.repeat_to_day ? moment(slot.repeat_to_day, 'YYYY-MM-DD') : null),
2257
2256
  repeat_type: new FormControl(slot?.repeat_type || ''),
2258
- update_repeating: new FormControl(!!slot?.update_repeating || false),
2259
- update_until_date: new FormControl(null),
2257
+ update_dates: new FormControl(null),
2260
2258
  reserved_time_enabled: new FormControl(typeof slot?.reserved_time_enabled !== 'undefined' ? slot?.reserved_time_enabled : false),
2261
2259
  reserved_time: new FormControl(moment(slot?.reserved_time || '00:00', 'HH:mm')),
2262
2260
  reserved_time_position: new FormControl(slot?.reserved_time_position || ''),
@@ -2265,7 +2263,7 @@ class BookingCalendarSlot {
2265
2263
  split: new FormControl('none'),
2266
2264
  });
2267
2265
  }
2268
- 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, price = null) {
2266
+ constructor(id, calendar_id, calendar_status, color, day, end_time, group_id, number_of_available_sessions, sessions, open_sessions, start_time, type, repeat, update_dates = 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, price = null) {
2269
2267
  this.id = id;
2270
2268
  this.calendar_id = calendar_id;
2271
2269
  this.calendar_status = calendar_status;
@@ -2279,8 +2277,7 @@ class BookingCalendarSlot {
2279
2277
  this.start_time = start_time;
2280
2278
  this.type = type;
2281
2279
  this.repeat = repeat;
2282
- this.update_repeating = update_repeating;
2283
- this.update_until_date = update_until_date;
2280
+ this.update_dates = update_dates;
2284
2281
  this.reserved_time_enabled = reserved_time_enabled;
2285
2282
  this.repeat_num = repeat_num;
2286
2283
  this.repeat_to_day = repeat_to_day;
@@ -2311,11 +2308,9 @@ class BookingCalendarSlotSession {
2311
2308
  slot_index;
2312
2309
  comment;
2313
2310
  day;
2314
- repeat;
2315
2311
  activity_type_id;
2316
2312
  color;
2317
- update_repeating;
2318
- update_until_date;
2313
+ update_dates;
2319
2314
  bookable_zones_taken;
2320
2315
  bookable_zones_taken_display;
2321
2316
  bookable_part_id;
@@ -2346,16 +2341,14 @@ class BookingCalendarSlotSession {
2346
2341
  is_overbooked: new FormControl(session?.is_overbooked || false),
2347
2342
  type: new FormControl(session?.type || ''),
2348
2343
  comment: new FormControl(session?.comment || ''),
2349
- repeat: new FormControl(session?.repeat || false),
2350
2344
  activity_type_id: new FormControl(session?.activity_type_id || null),
2351
- update_repeating: new FormControl(!!session?.update_repeating || false),
2352
- update_until_date: new FormControl(null),
2345
+ update_dates: new FormControl(null),
2353
2346
  bookable_zones_taken: new FormControl(session?.bookable_zones_taken || 1, [Validators.min(1), Validators.required]),
2354
2347
  bookable_part_id: new FormControl(session?.bookable_part_id || ''),
2355
2348
  member_id: new FormControl(session?.member_id || '')
2356
2349
  });
2357
2350
  }
2358
- 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_zones_taken_display, bookable_part_id, bookable_part_name, bookable_name, bookable_id, member_id, member_name, member_email, price = 0, payment_order_id, pay_until, is_paid, group_id, calendar_id) {
2351
+ 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, activity_type_id, color = null, update_dates = null, bookable_zones_taken, bookable_zones_taken_display, bookable_part_id, bookable_part_name, bookable_name, bookable_id, member_id, member_name, member_email, price = 0, payment_order_id, pay_until, is_paid, group_id, calendar_id) {
2359
2352
  this.id = id;
2360
2353
  this.section_id = section_id;
2361
2354
  this.slot_id = slot_id;
@@ -2371,11 +2364,9 @@ class BookingCalendarSlotSession {
2371
2364
  this.slot_index = slot_index;
2372
2365
  this.comment = comment;
2373
2366
  this.day = day;
2374
- this.repeat = repeat;
2375
2367
  this.activity_type_id = activity_type_id;
2376
2368
  this.color = color;
2377
- this.update_repeating = update_repeating;
2378
- this.update_until_date = update_until_date;
2369
+ this.update_dates = update_dates;
2379
2370
  this.bookable_zones_taken = bookable_zones_taken;
2380
2371
  this.bookable_zones_taken_display = bookable_zones_taken_display;
2381
2372
  this.bookable_part_id = bookable_part_id;
@@ -4442,9 +4433,13 @@ const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBo
4442
4433
 
4443
4434
  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_zones_taken_display, apiBookingApplicationTime.bookable_part_id, apiBookingApplicationTime.bookable_part_name, apiBookingApplicationTime.bookable_id, apiBookingApplicationTime.bookable_name, apiBookingApplicationTime.member_id, apiBookingApplicationTime.member_name, apiBookingApplicationTime.member_email, apiBookingApplicationTime.price, false);
4444
4435
 
4445
- 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_zones_taken_display, apiBookingSlotSession.bookable_part_id, apiBookingSlotSession.bookable_part_name, apiBookingSlotSession.bookable_name, apiBookingSlotSession.bookable_id, apiBookingSlotSession.member_id, apiBookingSlotSession.member_name, apiBookingSlotSession.member_email, apiBookingSlotSession.price, apiBookingSlotSession.payment_order_id, apiBookingSlotSession.pay_until, apiBookingSlotSession.is_paid, apiBookingSlotSession.group_id, apiBookingSlotSession.calendar_id);
4436
+ 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.activity_type_id, apiBookingSlotSession.color, null, apiBookingSlotSession.bookable_zones_taken, apiBookingSlotSession.bookable_zones_taken_display, apiBookingSlotSession.bookable_part_id, apiBookingSlotSession.bookable_part_name, apiBookingSlotSession.bookable_name, apiBookingSlotSession.bookable_id, apiBookingSlotSession.member_id, apiBookingSlotSession.member_name, apiBookingSlotSession.member_email, apiBookingSlotSession.price, apiBookingSlotSession.payment_order_id, apiBookingSlotSession.pay_until, apiBookingSlotSession.is_paid, apiBookingSlotSession.group_id, apiBookingSlotSession.calendar_id);
4437
+
4438
+ 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', null, 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, apiBookingSlot.price);
4439
+
4440
+ const bookingCalendarSlotGroupItemFactory = (apiItem) => apiItem;
4446
4441
 
4447
- 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, apiBookingSlot.price);
4442
+ const bookingCalendarSlotSessionGroupItemFactory = (apiItem) => apiItem;
4448
4443
 
4449
4444
  const bookingCalendarSlotValidateCopyResultItemFactory = (apiBookingCalendarSlotValidateCopyItem) => new BookingCalendarSlotValidateCopyResultItem(apiBookingCalendarSlotValidateCopyItem.week_start_date, apiBookingCalendarSlotValidateCopyItem.number_of_sessions, apiBookingCalendarSlotValidateCopyItem.number_of_slots);
4450
4445
  const bookingCalendarSlotValidateCopyResultFactory = (apiBookingCalendarSlotValidateCopyResult) => new BookingCalendarSlotValidateCopyResult(apiBookingCalendarSlotValidateCopyResult.weeks && apiBookingCalendarSlotValidateCopyResult.weeks.length ? apiBookingCalendarSlotValidateCopyResult.weeks.map((item) => bookingCalendarSlotValidateCopyResultItemFactory(item)) : []);
@@ -5643,10 +5638,12 @@ const CLUB_BOOKING_CALENDAR_SLOTS_CLEAR_PATH = ':clubId/activities/slots/clear/'
5643
5638
  const CLUB_BOOKING_CALENDAR_SLOTS_SYNC_PATH = ':clubId/activities/slots/sync/';
5644
5639
  const CLUB_BOOKING_CALENDAR_SLOT_PATH = ':clubId/activities/slots/:id/';
5645
5640
  const CLUB_BOOKING_CALENDAR_REPEATABLE_SLOT_PATH = ':clubId/activities/slots/:id/all/';
5641
+ const CLUB_BOOKING_CALENDAR_SLOT_GROUP_PATH = ':clubId/activities/slots/:id/group/';
5646
5642
  const CLUB_BOOKING_CALENDAR_SLOT_SESSIONS_PATH = ':clubId/activities/sessions/';
5647
5643
  const CLUB_BOOKING_CALENDAR_SLOT_SESSIONS_BULK_PATH = ':clubId/activities/sessions/bulk/';
5648
5644
  const CLUB_BOOKING_CALENDAR_SLOT_SESSION_PATH = ':clubId/activities/sessions/:id/';
5649
5645
  const CLUB_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':clubId/activities/sessions/:id/all/';
5646
+ const CLUB_BOOKING_CALENDAR_SESSION_GROUP_PATH = ':clubId/activities/sessions/:id/group/';
5650
5647
  const CLUB_BOOKING_SETTINGS_PATH = ':clubId/activities/booking-settings/';
5651
5648
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':clubId/activities/application-times/:id/';
5652
5649
  const CLUB_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':clubId/activities/application-times/';
@@ -5663,10 +5660,12 @@ const SECTION_BOOKING_CALENDAR_SLOTS_CLEAR_PATH = ':sectionId/activities/slots/c
5663
5660
  const SECTION_BOOKING_CALENDAR_SLOTS_SYNC_PATH = ':sectionId/activities/slots/sync/';
5664
5661
  const SECTION_BOOKING_CALENDAR_SLOT_PATH = ':sectionId/activities/slots/:id/';
5665
5662
  const SECTION_BOOKING_CALENDAR_REPEATABLE_SLOT_PATH = ':sectionId/activities/slots/:id/all/';
5663
+ const SECTION_BOOKING_CALENDAR_SLOT_GROUP_PATH = ':sectionId/activities/slots/:id/group/';
5666
5664
  const SECTION_BOOKING_CALENDAR_SLOT_SESSIONS_PATH = ':sectionId/activities/sessions/';
5667
5665
  const SECTION_BOOKING_CALENDAR_SLOT_SESSIONS_BULK_PATH = ':sectionId/activities/sessions/bulk/';
5668
5666
  const SECTION_BOOKING_CALENDAR_SLOT_SESSION_PATH = ':sectionId/activities/sessions/:id/';
5669
5667
  const SECTION_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':sectionId/activities/sessions/:id/all/';
5668
+ const SECTION_BOOKING_CALENDAR_SESSION_GROUP_PATH = ':sectionId/activities/sessions/:id/group/';
5670
5669
  const SECTION_BOOKING_SETTINGS_PATH = ':sectionId/activities/booking-settings/';
5671
5670
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':sectionId/activities/application-times/:id/';
5672
5671
  const SECTION_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':sectionId/activities/application-times/';
@@ -5682,6 +5681,8 @@ const TEAM_BOOKING_CALENDAR_SLOT_SESSIONS_BULK_PATH = ':teamId/activities/sessio
5682
5681
  const TEAM_BOOKING_CALENDAR_SLOT_SESSION_PATH = ':teamId/activities/sessions/:id/';
5683
5682
  const TEAM_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH = ':teamId/activities/sessions/:id/all/';
5684
5683
  const TEAM_BOOKING_CALENDAR_SLOT_PATH = ':teamId/activities/slots/:id/';
5684
+ const TEAM_BOOKING_CALENDAR_SLOT_GROUP_PATH = ':teamId/activities/slots/:id/group/';
5685
+ const TEAM_BOOKING_CALENDAR_SESSION_GROUP_PATH = ':teamId/activities/sessions/:id/group/';
5685
5686
  const TEAM_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':teamId/activities/application-times/';
5686
5687
  const TEAM_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':teamId/activities/application-times/:id/';
5687
5688
  const MEMBER_BOOKING_CALENDARS_PATH = ':memberId/activities/booking-calendars/';
@@ -5692,6 +5693,8 @@ const MEMBER_BOOKING_CALENDAR_SLOT_SESSIONS_PATH = ':memberId/activities/session
5692
5693
  const MEMBER_BOOKING_CALENDAR_SLOT_SESSIONS_BULK_PATH = ':memberId/activities/sessions/bulk/';
5693
5694
  const MEMBER_BOOKING_CALENDAR_SLOT_SESSION_PATH = ':memberId/activities/sessions/:id/';
5694
5695
  const MEMBER_BOOKING_CALENDAR_SLOT_PATH = ':memberId/activities/slots/:id/';
5696
+ const MEMBER_BOOKING_CALENDAR_SLOT_GROUP_PATH = ':memberId/activities/slots/:id/group/';
5697
+ const MEMBER_BOOKING_CALENDAR_SESSION_GROUP_PATH = ':memberId/activities/sessions/:id/group/';
5695
5698
  const MEMBER_BOOKING_CALENDAR_APPLICATION_TIMES_PATH = ':memberId/activities/application-times/';
5696
5699
  const MEMBER_BOOKING_CALENDAR_APPLICATION_TIME_PATH = ':memberId/activities/application-times/:id/';
5697
5700
  const MEMBER_BOOKING_CALENDAR_BOOKABLE_SLOTS_PATH = ':memberId/activities/bookables/:bookableId/slots/';
@@ -6233,29 +6236,55 @@ class BookingCalendarService {
6233
6236
  id
6234
6237
  }, { body: { send_notification: sendNotification } });
6235
6238
  }
6236
- deleteBookingCalendarSlotRepeatable(role, clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification = false) {
6239
+ deleteBookingCalendarSlotRepeatable(role, clubOrSectionOrTeamId, id, deleteDates, sendNotification = false) {
6237
6240
  switch (role) {
6238
6241
  case Role.ClubAdmin:
6239
- return this.deleteClubBookingCalendarSlotRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
6242
+ return this.deleteClubBookingCalendarSlotRepeatable(clubOrSectionOrTeamId, id, deleteDates, sendNotification);
6240
6243
  case Role.SectionAdmin:
6241
- return this.deleteSectionBookingCalendarSlotRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
6244
+ return this.deleteSectionBookingCalendarSlotRepeatable(clubOrSectionOrTeamId, id, deleteDates, sendNotification);
6242
6245
  default:
6243
6246
  throw invalidRoleError;
6244
6247
  }
6245
6248
  }
6246
- deleteClubBookingCalendarSlotRepeatable(clubId, id, deleteUntilDate, sendNotification = false) {
6249
+ deleteClubBookingCalendarSlotRepeatable(clubId, id, deleteDates, sendNotification = false) {
6247
6250
  return this.apiService
6248
6251
  .deleteResourceWithBody(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_REPEATABLE_SLOT_PATH, {
6249
6252
  clubId,
6250
6253
  id
6251
- }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
6254
+ }, { body: { delete_dates: deleteDates, send_notification: sendNotification } });
6252
6255
  }
6253
- deleteSectionBookingCalendarSlotRepeatable(sectionId, id, deleteUntilDate, sendNotification = false) {
6256
+ deleteSectionBookingCalendarSlotRepeatable(sectionId, id, deleteDates, sendNotification = false) {
6254
6257
  return this.apiService
6255
6258
  .deleteResourceWithBody(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_REPEATABLE_SLOT_PATH, {
6256
6259
  sectionId,
6257
6260
  id
6258
- }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
6261
+ }, { body: { delete_dates: deleteDates, send_notification: sendNotification } });
6262
+ }
6263
+ getSlotGroupItems(role, itemId, id) {
6264
+ switch (role) {
6265
+ case Role.ClubAdmin:
6266
+ return this.getClubSlotGroupItems(itemId, id);
6267
+ case Role.SectionAdmin:
6268
+ return this.getSectionSlotGroupItems(itemId, id);
6269
+ case Role.TeamAdmin:
6270
+ return this.getTeamSlotGroupItems(itemId, id);
6271
+ case Role.MemberAdmin:
6272
+ return this.getMemberSlotGroupItems(itemId, id);
6273
+ default:
6274
+ throw invalidRoleError;
6275
+ }
6276
+ }
6277
+ getClubSlotGroupItems(clubId, id) {
6278
+ return this.apiService.getCollection(bookingCalendarSlotGroupItemFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SLOT_GROUP_PATH, { clubId, id });
6279
+ }
6280
+ getSectionSlotGroupItems(sectionId, id) {
6281
+ return this.apiService.getCollection(bookingCalendarSlotGroupItemFactory, Role.SectionAdmin, SECTION_BOOKING_CALENDAR_SLOT_GROUP_PATH, { sectionId, id });
6282
+ }
6283
+ getTeamSlotGroupItems(teamId, id) {
6284
+ return this.apiService.getCollection(bookingCalendarSlotGroupItemFactory, Role.TeamAdmin, TEAM_BOOKING_CALENDAR_SLOT_GROUP_PATH, { teamId, id });
6285
+ }
6286
+ getMemberSlotGroupItems(memberId, id) {
6287
+ return this.apiService.getCollection(bookingCalendarSlotGroupItemFactory, Role.MemberAdmin, MEMBER_BOOKING_CALENDAR_SLOT_GROUP_PATH, { memberId, id });
6259
6288
  }
6260
6289
  // endregion
6261
6290
  // region Booking calendar slot session
@@ -6435,38 +6464,64 @@ class BookingCalendarService {
6435
6464
  id
6436
6465
  });
6437
6466
  }
6438
- deleteBookingCalendarSlotSessionRepeatable(role, clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification = false) {
6467
+ deleteBookingCalendarSlotSessionRepeatable(role, clubOrSectionOrTeamId, id, deleteDates, sendNotification = false) {
6439
6468
  switch (role) {
6440
6469
  case Role.ClubAdmin:
6441
- return this.deleteClubBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
6470
+ return this.deleteClubBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteDates, sendNotification);
6442
6471
  case Role.SectionAdmin:
6443
- return this.deleteSectionBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
6472
+ return this.deleteSectionBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteDates, sendNotification);
6444
6473
  case Role.TeamAdmin:
6445
- return this.deleteTeamBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteUntilDate, sendNotification);
6474
+ return this.deleteTeamBookingCalendarSlotSessionRepeatable(clubOrSectionOrTeamId, id, deleteDates, sendNotification);
6446
6475
  default:
6447
6476
  throw invalidRoleError;
6448
6477
  }
6449
6478
  }
6450
- deleteClubBookingCalendarSlotSessionRepeatable(clubId, id, deleteUntilDate, sendNotification = false) {
6479
+ deleteClubBookingCalendarSlotSessionRepeatable(clubId, id, deleteDates, sendNotification = false) {
6451
6480
  return this.apiService
6452
6481
  .deleteResourceWithBody(Role.ClubAdmin, CLUB_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH, {
6453
6482
  clubId,
6454
6483
  id
6455
- }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
6484
+ }, { body: { delete_dates: deleteDates, send_notification: sendNotification } });
6456
6485
  }
6457
- deleteSectionBookingCalendarSlotSessionRepeatable(sectionId, id, deleteUntilDate, sendNotification = false) {
6486
+ deleteSectionBookingCalendarSlotSessionRepeatable(sectionId, id, deleteDates, sendNotification = false) {
6458
6487
  return this.apiService
6459
6488
  .deleteResourceWithBody(Role.SectionAdmin, SECTION_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH, {
6460
6489
  sectionId,
6461
6490
  id
6462
- }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
6491
+ }, { body: { delete_dates: deleteDates, send_notification: sendNotification } });
6463
6492
  }
6464
- deleteTeamBookingCalendarSlotSessionRepeatable(teamId, id, deleteUntilDate, sendNotification = false) {
6493
+ deleteTeamBookingCalendarSlotSessionRepeatable(teamId, id, deleteDates, sendNotification = false) {
6465
6494
  return this.apiService
6466
6495
  .deleteResourceWithBody(Role.TeamAdmin, TEAM_BOOKING_CALENDAR_REPEATABLE_SESSION_PATH, {
6467
6496
  teamId,
6468
6497
  id
6469
- }, { body: { delete_until_date: deleteUntilDate, send_notification: sendNotification } });
6498
+ }, { body: { delete_dates: deleteDates, send_notification: sendNotification } });
6499
+ }
6500
+ getSessionGroupItems(role, itemId, id) {
6501
+ switch (role) {
6502
+ case Role.ClubAdmin:
6503
+ return this.getClubSessionGroupItems(itemId, id);
6504
+ case Role.SectionAdmin:
6505
+ return this.getSectionSessionGroupItems(itemId, id);
6506
+ case Role.TeamAdmin:
6507
+ return this.getTeamSessionGroupItems(itemId, id);
6508
+ case Role.MemberAdmin:
6509
+ return this.getMemberSessionGroupItems(itemId, id);
6510
+ default:
6511
+ throw invalidRoleError;
6512
+ }
6513
+ }
6514
+ getClubSessionGroupItems(clubId, id) {
6515
+ return this.apiService.getCollection(bookingCalendarSlotSessionGroupItemFactory, Role.ClubAdmin, CLUB_BOOKING_CALENDAR_SESSION_GROUP_PATH, { clubId, id });
6516
+ }
6517
+ getSectionSessionGroupItems(sectionId, id) {
6518
+ return this.apiService.getCollection(bookingCalendarSlotSessionGroupItemFactory, Role.SectionAdmin, SECTION_BOOKING_CALENDAR_SESSION_GROUP_PATH, { sectionId, id });
6519
+ }
6520
+ getTeamSessionGroupItems(teamId, id) {
6521
+ return this.apiService.getCollection(bookingCalendarSlotSessionGroupItemFactory, Role.TeamAdmin, TEAM_BOOKING_CALENDAR_SESSION_GROUP_PATH, { teamId, id });
6522
+ }
6523
+ getMemberSessionGroupItems(memberId, id) {
6524
+ return this.apiService.getCollection(bookingCalendarSlotSessionGroupItemFactory, Role.MemberAdmin, MEMBER_BOOKING_CALENDAR_SESSION_GROUP_PATH, { memberId, id });
6470
6525
  }
6471
6526
  // endregion
6472
6527
  // region Booking Setting
@@ -8417,7 +8472,7 @@ class BookingEffects {
8417
8472
  deleteBookingCalendarSlot$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarSlotAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, slot, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlot(role, clubOrSectionOrTeamId, slot.id, sendNotification).pipe(mergeMap$1(() => [
8418
8473
  deleteBookingCalendarSlotSuccessAction({ slot: slot }),
8419
8474
  ]), catchError$1((error) => of(deleteBookingCalendarSlotFailureAction({ payload: error })))))));
8420
- deleteBookingCalendarRepeatableSlot$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarRepeatableSlotAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, slot, deleteUntilDate, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlotRepeatable(role, clubOrSectionOrTeamId, slot.id, deleteUntilDate, sendNotification).pipe(mergeMap$1(() => [
8475
+ deleteBookingCalendarRepeatableSlot$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarRepeatableSlotAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, slot, deleteDates, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlotRepeatable(role, clubOrSectionOrTeamId, slot.id, deleteDates, sendNotification).pipe(mergeMap$1(() => [
8421
8476
  deleteBookingCalendarRepeatableSlotSuccessAction({ slot: slot }),
8422
8477
  ]), catchError$1((error) => of(deleteBookingCalendarRepeatableSlotFailureAction({ payload: error })))))));
8423
8478
  createBookingCalendarSlotSession$ = createEffect(() => this.actions$.pipe(ofType(createBookingCalendarSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session }) => this.bookingCalendarService.createBookingCalendarSlotSession(role, clubOrSectionOrTeamId, { ...session }).pipe(mergeMap$1((session) => [
@@ -8432,7 +8487,7 @@ class BookingEffects {
8432
8487
  deleteBookingCalendarSlotSession$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlotSession(role, clubOrSectionOrTeamId, session.id, sendNotification).pipe(mergeMap$1(() => [
8433
8488
  deleteBookingCalendarSlotSessionSuccessAction({ session: session }),
8434
8489
  ]), catchError$1((error) => of(deleteBookingCalendarSlotSessionFailureAction({ payload: error })))))));
8435
- deleteBookingCalendarRepeatableSlotSession$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarRepeatableSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session, deleteUntilDate, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlotSessionRepeatable(role, clubOrSectionOrTeamId, session.id, deleteUntilDate, sendNotification).pipe(mergeMap$1(() => [
8490
+ deleteBookingCalendarRepeatableSlotSession$ = createEffect(() => this.actions$.pipe(ofType(deleteBookingCalendarRepeatableSlotSessionAction), exhaustMap$1(({ role, clubOrSectionOrTeamId, session, deleteDates, sendNotification }) => this.bookingCalendarService.deleteBookingCalendarSlotSessionRepeatable(role, clubOrSectionOrTeamId, session.id, deleteDates, sendNotification).pipe(mergeMap$1(() => [
8436
8491
  deleteBookingCalendarRepeatableSlotSessionSuccessAction({ session: session }),
8437
8492
  ]), catchError$1((error) => of(deleteBookingCalendarRepeatableSlotSessionFailureAction({ payload: error })))))));
8438
8493
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: BookingEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable });