@myclub_se/data-access 2.5.12 → 2.5.14
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.
- package/esm2020/lib/api-models/api-activity-location-part.mjs +2 -0
- package/esm2020/lib/api-models/api-activity-location-tag.mjs +2 -0
- package/esm2020/lib/api-models/api-booking-calendar-application-time.mjs +1 -1
- package/esm2020/lib/api-models/api-booking-calendar-slot-session.mjs +1 -1
- package/esm2020/lib/api-models/api-booking-calendar-slot.mjs +1 -1
- package/esm2020/lib/api-models/api-booking-calendar.mjs +1 -1
- package/esm2020/lib/api-models/api-booking-settings.mjs +1 -1
- package/esm2020/lib/api-models/index.mjs +3 -1
- package/esm2020/lib/models/activity-location-part.mjs +7 -0
- package/esm2020/lib/models/activity-location-tag.mjs +9 -0
- package/esm2020/lib/models/booking-calendar-application-time.mjs +6 -2
- package/esm2020/lib/models/booking-calendar-slot-session.mjs +6 -2
- package/esm2020/lib/models/booking-calendar-slot.mjs +3 -2
- package/esm2020/lib/models/booking-calendar.mjs +5 -3
- package/esm2020/lib/models/booking-settings.mjs +2 -4
- package/esm2020/lib/models/index.mjs +3 -1
- package/esm2020/lib/services/activity.service.mjs +35 -2
- package/esm2020/lib/services/booking-calendar.service.mjs +52 -16
- package/esm2020/lib/services/factories/activity-location-group-factory.mjs +2 -2
- package/esm2020/lib/services/factories/activity-location-part-factory.mjs +5 -0
- package/esm2020/lib/services/factories/activity-location-tag-factory.mjs +5 -0
- package/esm2020/lib/services/factories/booking-calendar-application-time-factory.mjs +2 -2
- package/esm2020/lib/services/factories/booking-calendar-factory.mjs +2 -2
- package/esm2020/lib/services/factories/booking-calendar-slot-factory.mjs +2 -2
- package/esm2020/lib/services/factories/booking-calendar-slot-session-factory.mjs +2 -2
- package/esm2020/lib/services/factories/booking-settings-factory.mjs +2 -2
- package/esm2020/lib/services/factories/index.mjs +2 -1
- package/fesm2015/myclub_se-data-access.mjs +130 -29
- package/fesm2015/myclub_se-data-access.mjs.map +1 -1
- package/fesm2020/myclub_se-data-access.mjs +130 -29
- package/fesm2020/myclub_se-data-access.mjs.map +1 -1
- package/lib/api-models/api-activity-location-part.d.ts +4 -0
- package/lib/api-models/api-activity-location-tag.d.ts +6 -0
- package/lib/api-models/api-booking-calendar-application-time.d.ts +3 -0
- package/lib/api-models/api-booking-calendar-slot-session.d.ts +3 -0
- package/lib/api-models/api-booking-calendar-slot.d.ts +1 -0
- package/lib/api-models/api-booking-calendar.d.ts +1 -0
- package/lib/api-models/api-booking-settings.d.ts +0 -1
- package/lib/api-models/index.d.ts +2 -0
- package/lib/models/activity-location-part.d.ts +5 -0
- package/lib/models/activity-location-tag.d.ts +7 -0
- package/lib/models/booking-calendar-application-time.d.ts +5 -1
- package/lib/models/booking-calendar-slot-session.d.ts +5 -1
- package/lib/models/booking-calendar-slot.d.ts +2 -1
- package/lib/models/booking-calendar.d.ts +3 -1
- package/lib/models/booking-settings.d.ts +1 -3
- package/lib/models/index.d.ts +2 -0
- package/lib/services/activity.service.d.ts +10 -4
- package/lib/services/booking-calendar.service.d.ts +11 -9
- package/lib/services/factories/activity-location-group-factory.d.ts +2 -2
- package/lib/services/factories/activity-location-part-factory.d.ts +3 -0
- package/lib/services/factories/activity-location-tag-factory.d.ts +3 -0
- package/lib/services/factories/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -150,6 +150,22 @@ class ActivityLocationGroup {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
class ActivityLocationTag {
|
|
154
|
+
constructor(id, club_id, section_id, name) {
|
|
155
|
+
this.id = id;
|
|
156
|
+
this.club_id = club_id;
|
|
157
|
+
this.section_id = section_id;
|
|
158
|
+
this.name = name;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
class ActivityLocationPart {
|
|
163
|
+
constructor(id, name) {
|
|
164
|
+
this.id = id;
|
|
165
|
+
this.name = name;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
153
169
|
class ActivitySettings {
|
|
154
170
|
constructor(dayOptions, hourOptions, inviteGroupOptions, inviteSettingsOptions, maxAttendanceOptions, meetUpTimeOptions, remindReceiverOptions, repeatOptions, repeatTypeOptions) {
|
|
155
171
|
this.dayOptions = dayOptions;
|
|
@@ -231,7 +247,7 @@ class Authentication {
|
|
|
231
247
|
}
|
|
232
248
|
|
|
233
249
|
class BookingCalendar {
|
|
234
|
-
constructor(id, club_id, section_id, team_id, club_name, color, name, section_name, team_name) {
|
|
250
|
+
constructor(id, club_id, section_id, team_id, club_name, color, name, section_name, team_name, status) {
|
|
235
251
|
this.id = id;
|
|
236
252
|
this.club_id = club_id;
|
|
237
253
|
this.section_id = section_id;
|
|
@@ -241,6 +257,7 @@ class BookingCalendar {
|
|
|
241
257
|
this.name = name;
|
|
242
258
|
this.section_name = section_name;
|
|
243
259
|
this.team_name = team_name;
|
|
260
|
+
this.status = status;
|
|
244
261
|
}
|
|
245
262
|
static asFormGroup(calendar) {
|
|
246
263
|
return new FormGroup({
|
|
@@ -252,13 +269,14 @@ class BookingCalendar {
|
|
|
252
269
|
color: new FormControl(calendar?.color || '', Validators.required),
|
|
253
270
|
name: new FormControl(calendar?.name || '', Validators.required),
|
|
254
271
|
section_name: new FormControl(calendar?.section_name || ''),
|
|
255
|
-
team_name: new FormControl(calendar?.team_name || '')
|
|
272
|
+
team_name: new FormControl(calendar?.team_name || ''),
|
|
273
|
+
status: new FormControl(calendar?.status || 'preliminary'),
|
|
256
274
|
});
|
|
257
275
|
}
|
|
258
276
|
}
|
|
259
277
|
|
|
260
278
|
class BookingCalendarApplicationTime {
|
|
261
|
-
constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name, location_zones_taken, applicant_comment, reviewer_comment, status) {
|
|
279
|
+
constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name, location_zones_taken, applicant_comment, reviewer_comment, status, location_part_id, location_part_name, location_id) {
|
|
262
280
|
this.id = id;
|
|
263
281
|
this.section_id = section_id;
|
|
264
282
|
this.slot_id = slot_id;
|
|
@@ -271,6 +289,9 @@ class BookingCalendarApplicationTime {
|
|
|
271
289
|
this.applicant_comment = applicant_comment;
|
|
272
290
|
this.reviewer_comment = reviewer_comment;
|
|
273
291
|
this.status = status;
|
|
292
|
+
this.location_part_id = location_part_id;
|
|
293
|
+
this.location_part_name = location_part_name;
|
|
294
|
+
this.location_id = location_id;
|
|
274
295
|
}
|
|
275
296
|
static asFormGroup(session) {
|
|
276
297
|
return new FormGroup({
|
|
@@ -286,14 +307,16 @@ class BookingCalendarApplicationTime {
|
|
|
286
307
|
applicant_comment: new FormControl(session?.applicant_comment || null),
|
|
287
308
|
reviewer_comment: new FormControl(session?.reviewer_comment || null),
|
|
288
309
|
status: new FormControl(session?.status || ''),
|
|
310
|
+
location_part_id: new FormControl(session?.location_part_id || ''),
|
|
289
311
|
});
|
|
290
312
|
}
|
|
291
313
|
}
|
|
292
314
|
|
|
293
315
|
class BookingCalendarSlot {
|
|
294
|
-
constructor(id, calendar_id, location_id, color, day, end_time, group_id, location_name, number_of_available_sessions, sessions, open_sessions, start_time, type, repeat, update_repeating, reserved_time_enabled, repeat_num, repeat_to_day, repeat_type, reserved_time, reserved_time_position, application_times) {
|
|
316
|
+
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, reserved_time_enabled, repeat_num, repeat_to_day, repeat_type, reserved_time, reserved_time_position, application_times) {
|
|
295
317
|
this.id = id;
|
|
296
318
|
this.calendar_id = calendar_id;
|
|
319
|
+
this.calendar_status = calendar_status;
|
|
297
320
|
this.location_id = location_id;
|
|
298
321
|
this.color = color;
|
|
299
322
|
this.day = day;
|
|
@@ -339,7 +362,7 @@ class BookingCalendarSlot {
|
|
|
339
362
|
}
|
|
340
363
|
|
|
341
364
|
class BookingCalendarSlotSession {
|
|
342
|
-
constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name, is_overbooked, type, location_zones_taken, slot_index, comment) {
|
|
365
|
+
constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name, is_overbooked, type, location_zones_taken, slot_index, comment, location_part_id, location_part_name, location_id) {
|
|
343
366
|
this.id = id;
|
|
344
367
|
this.section_id = section_id;
|
|
345
368
|
this.slot_id = slot_id;
|
|
@@ -353,6 +376,9 @@ class BookingCalendarSlotSession {
|
|
|
353
376
|
this.location_zones_taken = location_zones_taken;
|
|
354
377
|
this.slot_index = slot_index;
|
|
355
378
|
this.comment = comment;
|
|
379
|
+
this.location_part_id = location_part_id;
|
|
380
|
+
this.location_part_name = location_part_name;
|
|
381
|
+
this.location_id = location_id;
|
|
356
382
|
}
|
|
357
383
|
static asFormGroup(session) {
|
|
358
384
|
return new FormGroup({
|
|
@@ -368,14 +394,14 @@ class BookingCalendarSlotSession {
|
|
|
368
394
|
type: new FormControl(session?.type || ''),
|
|
369
395
|
location_zones_taken: new FormControl(session?.location_zones_taken || 1, [Validators.min(1), Validators.required]),
|
|
370
396
|
comment: new FormControl(session?.comment || ''),
|
|
397
|
+
location_part_id: new FormControl(session?.location_part_id || ''),
|
|
371
398
|
});
|
|
372
399
|
}
|
|
373
400
|
}
|
|
374
401
|
|
|
375
402
|
class BookingSettings {
|
|
376
|
-
constructor(id,
|
|
403
|
+
constructor(id, calendar_step, calendar_min_time, calendar_max_time, should_split_booking_into_zones) {
|
|
377
404
|
this.id = id;
|
|
378
|
-
this.club_id = club_id;
|
|
379
405
|
this.calendar_step = calendar_step;
|
|
380
406
|
this.calendar_min_time = calendar_min_time;
|
|
381
407
|
this.calendar_max_time = calendar_max_time;
|
|
@@ -384,7 +410,6 @@ class BookingSettings {
|
|
|
384
410
|
static asFormGroup(settings) {
|
|
385
411
|
return new FormGroup({
|
|
386
412
|
id: new FormControl(settings?.id || ''),
|
|
387
|
-
club_id: new FormControl(settings?.club_id || ''),
|
|
388
413
|
calendar_step: new FormControl(settings?.calendar_step || '01:00:00', [Validators.required]),
|
|
389
414
|
calendar_min_time: new FormControl(settings?.calendar_min_time || '00:00:00', [Validators.required]),
|
|
390
415
|
calendar_max_time: new FormControl(settings?.calendar_max_time || '23:00:00', [Validators.required]),
|
|
@@ -1465,6 +1490,10 @@ const activityLocationGroupFactory = (apiActivityLocationGroup) => {
|
|
|
1465
1490
|
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)) : []);
|
|
1466
1491
|
};
|
|
1467
1492
|
|
|
1493
|
+
const activityLocationTagFactory = (apiActivityLocationTag) => {
|
|
1494
|
+
return new ActivityLocationTag(apiActivityLocationTag.id, apiActivityLocationTag.club_id, apiActivityLocationTag.section_id, apiActivityLocationTag.name);
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1468
1497
|
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);
|
|
1469
1498
|
|
|
1470
1499
|
const activityTypeFactory = (apiActivityType) => new ActivityType(apiActivityType.id, apiActivityType.club_id, apiActivityType.section_id, apiActivityType.active, apiActivityType.base_type, apiActivityType.name);
|
|
@@ -1479,15 +1508,15 @@ const authTeamFactory = (apiAuthTeam) => new AuthTeam(apiAuthTeam.id, apiAuthTea
|
|
|
1479
1508
|
|
|
1480
1509
|
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);
|
|
1481
1510
|
|
|
1482
|
-
const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBookingCalendar.id, apiBookingCalendar.club_id, apiBookingCalendar.section_id, apiBookingCalendar.team_id, apiBookingCalendar.club_name, apiBookingCalendar.color, apiBookingCalendar.name, apiBookingCalendar.section_name, apiBookingCalendar.team_name);
|
|
1511
|
+
const bookingCalendarFactory = (apiBookingCalendar) => new BookingCalendar(apiBookingCalendar.id, apiBookingCalendar.club_id, apiBookingCalendar.section_id, apiBookingCalendar.team_id, apiBookingCalendar.club_name, apiBookingCalendar.color, apiBookingCalendar.name, apiBookingCalendar.section_name, apiBookingCalendar.team_name, apiBookingCalendar.status);
|
|
1483
1512
|
|
|
1484
|
-
const bookingCalendarApplicationTimeFactory = (apiBookingApplicationTime) => new BookingCalendarApplicationTime(apiBookingApplicationTime.id, apiBookingApplicationTime.section_id, apiBookingApplicationTime.slot_id, apiBookingApplicationTime.team_id, apiBookingApplicationTime.end_time, apiBookingApplicationTime.section_name, apiBookingApplicationTime.start_time, apiBookingApplicationTime.team_name, apiBookingApplicationTime.location_zones_taken, apiBookingApplicationTime.applicant_comment, apiBookingApplicationTime.reviewer_comment, apiBookingApplicationTime.status);
|
|
1513
|
+
const bookingCalendarApplicationTimeFactory = (apiBookingApplicationTime) => new BookingCalendarApplicationTime(apiBookingApplicationTime.id, apiBookingApplicationTime.section_id, apiBookingApplicationTime.slot_id, apiBookingApplicationTime.team_id, 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);
|
|
1485
1514
|
|
|
1486
|
-
const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name, apiBookingSlotSession.is_overbooked, apiBookingSlotSession.type, apiBookingSlotSession.location_zones_taken, apiBookingSlotSession.slot_index, apiBookingSlotSession.comment);
|
|
1515
|
+
const bookingCalendarSlotSessionFactory = (apiBookingSlotSession) => new BookingCalendarSlotSession(apiBookingSlotSession.id, apiBookingSlotSession.section_id, apiBookingSlotSession.slot_id, apiBookingSlotSession.team_id, apiBookingSlotSession.end_time, apiBookingSlotSession.section_name, apiBookingSlotSession.start_time, apiBookingSlotSession.team_name, apiBookingSlotSession.is_overbooked, apiBookingSlotSession.type, apiBookingSlotSession.location_zones_taken, apiBookingSlotSession.slot_index, apiBookingSlotSession.comment, apiBookingSlotSession.location_part_id, apiBookingSlotSession.location_part_name, apiBookingSlotSession.location_id);
|
|
1487
1516
|
|
|
1488
|
-
const bookingCalendarSlotFactory = (apiBookingSlot) => new BookingCalendarSlot(apiBookingSlot.id, apiBookingSlot.calendar_id, apiBookingSlot.location_id, apiBookingSlot.color, apiBookingSlot.day, apiBookingSlot.end_time, apiBookingSlot.group_id, apiBookingSlot.location_name, apiBookingSlot.number_of_available_sessions, apiBookingSlot.sessions && apiBookingSlot.sessions.length ? apiBookingSlot.sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.open_sessions && apiBookingSlot.open_sessions.length ? apiBookingSlot.open_sessions.map((apiBookingSlotSession) => bookingCalendarSlotSessionFactory(apiBookingSlotSession)) : [], apiBookingSlot.start_time, apiBookingSlot.type, 'none', false, false, 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiBookingSlot.reserved_time, apiBookingSlot.reserved_time_position, apiBookingSlot.application_times && apiBookingSlot.application_times.length ? apiBookingSlot.application_times.map((apiBookingApplicationTime) => bookingCalendarApplicationTimeFactory(apiBookingApplicationTime)) : []);
|
|
1517
|
+
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', false, 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)) : []);
|
|
1489
1518
|
|
|
1490
|
-
const bookingSettingsFactory = (apiBookingSettings) => new BookingSettings(apiBookingSettings.id, apiBookingSettings.
|
|
1519
|
+
const bookingSettingsFactory = (apiBookingSettings) => new BookingSettings(apiBookingSettings.id, apiBookingSettings.calendar_step, apiBookingSettings.calendar_min_time, apiBookingSettings.calendar_max_time, apiBookingSettings.should_split_booking_into_zones);
|
|
1491
1520
|
|
|
1492
1521
|
const imageUrlsFactory = (apiImageUrls) => new ImageUrls(apiImageUrls.lg, apiImageUrls.md, apiImageUrls.raw, apiImageUrls.sm, apiImageUrls.xs);
|
|
1493
1522
|
|
|
@@ -1668,6 +1697,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
1668
1697
|
}]
|
|
1669
1698
|
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1670
1699
|
|
|
1700
|
+
const activityLocationPartFactory = (apiActivityLocationPart) => {
|
|
1701
|
+
return new ActivityLocationPart(apiActivityLocationPart.id, apiActivityLocationPart.name);
|
|
1702
|
+
};
|
|
1703
|
+
|
|
1671
1704
|
const MEMBER_ACTIVITY_INVITE_PATH = ':memberId/activities/:activityInviteId/';
|
|
1672
1705
|
const MEMBER_ACTIVITY_INVITES_PATH = ':memberId/activities/';
|
|
1673
1706
|
const MEMBER_CALENDAR_PATH = ':memberId/activities/calendar/';
|
|
@@ -1685,8 +1718,12 @@ const TEAM_ACTIVITY_TYPES_PATH = ':teamId/activities/types/';
|
|
|
1685
1718
|
const TEAM_CALENDAR_PATH = ':teamId/activities/calendar/';
|
|
1686
1719
|
const CLUB_ACTIVITY_LOCATIONS_PATH = ':clubId/activities/locations/';
|
|
1687
1720
|
const CLUB_ACTIVITY_LOCATION_GROUPS_PATH = ':clubId/activities/locations/groups/';
|
|
1721
|
+
const CLUB_ACTIVITY_LOCATION_TAGS_PATH = ':clubId/activities/locations/tags/';
|
|
1722
|
+
const CLUB_ACTIVITY_LOCATION_PARTS_PATH = ':clubId/activities/locations/:locationId/parts/';
|
|
1688
1723
|
const TEAM_ACTIVITY_LOCATIONS_PATH = ':teamId/activities/locations/';
|
|
1689
1724
|
const TEAM_ACTIVITY_LOCATION_GROUPS_PATH = ':teamId/activities/locations/groups/';
|
|
1725
|
+
const TEAM_ACTIVITY_LOCATION_TAGS_PATH = ':teamId/activities/locations/tags/';
|
|
1726
|
+
const TEAM_ACTIVITY_LOCATION_PARTS_PATH = ':teamId/activities/locations/:locationId/parts/';
|
|
1690
1727
|
class ActivityService {
|
|
1691
1728
|
constructor(apiService) {
|
|
1692
1729
|
this.apiService = apiService;
|
|
@@ -1793,6 +1830,34 @@ class ActivityService {
|
|
|
1793
1830
|
return this.apiService
|
|
1794
1831
|
.getCollection(activityLocationGroupFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_GROUPS_PATH, { teamId }, { params: { limit: 'null' } });
|
|
1795
1832
|
}
|
|
1833
|
+
getActivityLocationTags(role, clubOrTeamId) {
|
|
1834
|
+
if (role == Role.ClubAdmin) {
|
|
1835
|
+
return this.getClubActivityLocationTags(clubOrTeamId);
|
|
1836
|
+
}
|
|
1837
|
+
return this.getTeamActivityLocationTags(clubOrTeamId);
|
|
1838
|
+
}
|
|
1839
|
+
getClubActivityLocationTags(clubId) {
|
|
1840
|
+
return this.apiService
|
|
1841
|
+
.getCollection(activityLocationTagFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_TAGS_PATH, { clubId }, { params: { limit: 'null' } });
|
|
1842
|
+
}
|
|
1843
|
+
getTeamActivityLocationTags(teamId) {
|
|
1844
|
+
return this.apiService
|
|
1845
|
+
.getCollection(activityLocationTagFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_TAGS_PATH, { teamId }, { params: { limit: 'null' } });
|
|
1846
|
+
}
|
|
1847
|
+
getActivityLocationParts(role, clubOrTeamId, locationId) {
|
|
1848
|
+
if (role == Role.ClubAdmin) {
|
|
1849
|
+
return this.getClubActivityLocationParts(clubOrTeamId, locationId);
|
|
1850
|
+
}
|
|
1851
|
+
return this.getTeamActivityLocationParts(clubOrTeamId, locationId);
|
|
1852
|
+
}
|
|
1853
|
+
getClubActivityLocationParts(clubId, locationId) {
|
|
1854
|
+
return this.apiService
|
|
1855
|
+
.getCollection(activityLocationPartFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_PARTS_PATH, { clubId, locationId }, { params: { limit: 'null' } });
|
|
1856
|
+
}
|
|
1857
|
+
getTeamActivityLocationParts(teamId, locationId) {
|
|
1858
|
+
return this.apiService
|
|
1859
|
+
.getCollection(activityLocationPartFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_PARTS_PATH, { teamId, locationId }, { params: { limit: 'null' } });
|
|
1860
|
+
}
|
|
1796
1861
|
getTeamActivityNew(teamId) {
|
|
1797
1862
|
return this.apiService
|
|
1798
1863
|
.getResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_NEW_PATH, { teamId });
|
|
@@ -2001,13 +2066,13 @@ class BookingCalendarService {
|
|
|
2001
2066
|
clubId,
|
|
2002
2067
|
}, slot);
|
|
2003
2068
|
}
|
|
2004
|
-
getBookingCalendarSlots(role, clubOrTeamId, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2069
|
+
getBookingCalendarSlots(role, clubOrTeamId, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2005
2070
|
if (role == Role.ClubAdmin) {
|
|
2006
|
-
return this.getClubBookingCalendarSlots(clubOrTeamId, startDate, endDate, calendarIds, locationIds, teamIds, hasOpenSessions);
|
|
2071
|
+
return this.getClubBookingCalendarSlots(clubOrTeamId, startDate, endDate, calendarIds, locationIds, tagIds, teamIds, hasOpenSessions);
|
|
2007
2072
|
}
|
|
2008
|
-
return this.getTeamBookingCalendarSlots(clubOrTeamId, startDate, endDate, calendarIds, locationIds, teamIds, hasOpenSessions);
|
|
2073
|
+
return this.getTeamBookingCalendarSlots(clubOrTeamId, startDate, endDate, calendarIds, locationIds, tagIds, teamIds, hasOpenSessions);
|
|
2009
2074
|
}
|
|
2010
|
-
getClubBookingCalendarSlots(clubId, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2075
|
+
getClubBookingCalendarSlots(clubId, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2011
2076
|
const params = { limit: 'null' };
|
|
2012
2077
|
if (startDate) {
|
|
2013
2078
|
params['day__gte'] = startDate;
|
|
@@ -2021,6 +2086,9 @@ class BookingCalendarService {
|
|
|
2021
2086
|
if (locationIds && locationIds.length) {
|
|
2022
2087
|
params['location_id'] = locationIds.join(',');
|
|
2023
2088
|
}
|
|
2089
|
+
if (tagIds && tagIds.length) {
|
|
2090
|
+
params['tag_id'] = tagIds.join(',');
|
|
2091
|
+
}
|
|
2024
2092
|
if (teamIds && teamIds.length) {
|
|
2025
2093
|
params['team_id'] = teamIds.join(',');
|
|
2026
2094
|
}
|
|
@@ -2032,7 +2100,7 @@ class BookingCalendarService {
|
|
|
2032
2100
|
params
|
|
2033
2101
|
});
|
|
2034
2102
|
}
|
|
2035
|
-
getTeamBookingCalendarSlots(teamId, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2103
|
+
getTeamBookingCalendarSlots(teamId, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2036
2104
|
const params = { limit: 'null' };
|
|
2037
2105
|
if (startDate) {
|
|
2038
2106
|
params['day__gte'] = startDate;
|
|
@@ -2046,6 +2114,9 @@ class BookingCalendarService {
|
|
|
2046
2114
|
if (locationIds && locationIds.length) {
|
|
2047
2115
|
params['location_id'] = locationIds.join(',');
|
|
2048
2116
|
}
|
|
2117
|
+
if (tagIds && tagIds.length) {
|
|
2118
|
+
params['tag_id'] = tagIds.join(',');
|
|
2119
|
+
}
|
|
2049
2120
|
if (teamIds && teamIds.length) {
|
|
2050
2121
|
params['team_id'] = teamIds.join(',');
|
|
2051
2122
|
}
|
|
@@ -2057,13 +2128,13 @@ class BookingCalendarService {
|
|
|
2057
2128
|
params
|
|
2058
2129
|
});
|
|
2059
2130
|
}
|
|
2060
|
-
getBookingCalendarApplicationTimeSlots(role, clubOrTeamId, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2131
|
+
getBookingCalendarApplicationTimeSlots(role, clubOrTeamId, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2061
2132
|
if (role == Role.ClubAdmin) {
|
|
2062
|
-
return this.getClubBookingCalendarApplicationTimeSlots(clubOrTeamId, startDate, endDate, calendarIds, locationIds, teamIds, hasOpenSessions);
|
|
2133
|
+
return this.getClubBookingCalendarApplicationTimeSlots(clubOrTeamId, startDate, endDate, calendarIds, locationIds, tagIds, teamIds, hasOpenSessions);
|
|
2063
2134
|
}
|
|
2064
|
-
return this.getTeamBookingCalendarApplicationTimeSlots(clubOrTeamId, startDate, endDate, calendarIds, locationIds, teamIds, hasOpenSessions);
|
|
2135
|
+
return this.getTeamBookingCalendarApplicationTimeSlots(clubOrTeamId, startDate, endDate, calendarIds, locationIds, tagIds, teamIds, hasOpenSessions);
|
|
2065
2136
|
}
|
|
2066
|
-
getClubBookingCalendarApplicationTimeSlots(clubId, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2137
|
+
getClubBookingCalendarApplicationTimeSlots(clubId, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2067
2138
|
const params = { limit: 'null' };
|
|
2068
2139
|
if (startDate) {
|
|
2069
2140
|
params['day__gte'] = startDate;
|
|
@@ -2077,6 +2148,9 @@ class BookingCalendarService {
|
|
|
2077
2148
|
if (locationIds && locationIds.length) {
|
|
2078
2149
|
params['location_id'] = locationIds.join(',');
|
|
2079
2150
|
}
|
|
2151
|
+
if (tagIds && tagIds.length) {
|
|
2152
|
+
params['tag_id'] = tagIds.join(',');
|
|
2153
|
+
}
|
|
2080
2154
|
if (teamIds && teamIds.length) {
|
|
2081
2155
|
params['team_id'] = teamIds.join(',');
|
|
2082
2156
|
}
|
|
@@ -2088,7 +2162,7 @@ class BookingCalendarService {
|
|
|
2088
2162
|
params
|
|
2089
2163
|
});
|
|
2090
2164
|
}
|
|
2091
|
-
getTeamBookingCalendarApplicationTimeSlots(teamId, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2165
|
+
getTeamBookingCalendarApplicationTimeSlots(teamId, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2092
2166
|
const params = { limit: 'null' };
|
|
2093
2167
|
if (startDate) {
|
|
2094
2168
|
params['day__gte'] = startDate;
|
|
@@ -2102,6 +2176,9 @@ class BookingCalendarService {
|
|
|
2102
2176
|
if (locationIds && locationIds.length) {
|
|
2103
2177
|
params['location_id'] = locationIds.join(',');
|
|
2104
2178
|
}
|
|
2179
|
+
if (tagIds && tagIds.length) {
|
|
2180
|
+
params['tag_id'] = tagIds.join(',');
|
|
2181
|
+
}
|
|
2105
2182
|
if (teamIds && teamIds.length) {
|
|
2106
2183
|
params['team_id'] = teamIds.join(',');
|
|
2107
2184
|
}
|
|
@@ -2113,7 +2190,7 @@ class BookingCalendarService {
|
|
|
2113
2190
|
params
|
|
2114
2191
|
});
|
|
2115
2192
|
}
|
|
2116
|
-
copyClubBookingCalendarSlots(clubId, weekRelativeIndexes, onlyCopySlots = false, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2193
|
+
copyClubBookingCalendarSlots(clubId, weekRelativeIndexes, onlyCopySlots = false, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2117
2194
|
const params = { limit: 'null' };
|
|
2118
2195
|
if (startDate) {
|
|
2119
2196
|
params['day__gte'] = startDate;
|
|
@@ -2127,6 +2204,9 @@ class BookingCalendarService {
|
|
|
2127
2204
|
if (locationIds && locationIds.length) {
|
|
2128
2205
|
params['location_id'] = locationIds.join(',');
|
|
2129
2206
|
}
|
|
2207
|
+
if (tagIds && tagIds.length) {
|
|
2208
|
+
params['tag_id'] = tagIds.join(',');
|
|
2209
|
+
}
|
|
2130
2210
|
if (teamIds && teamIds.length) {
|
|
2131
2211
|
params['team_id'] = teamIds.join(',');
|
|
2132
2212
|
}
|
|
@@ -2141,7 +2221,7 @@ class BookingCalendarService {
|
|
|
2141
2221
|
params
|
|
2142
2222
|
});
|
|
2143
2223
|
}
|
|
2144
|
-
clearClubBookingCalendarSlots(clubId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions = false, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2224
|
+
clearClubBookingCalendarSlots(clubId, currentWeekStartDate, weekRelativeIndexes, onlyDeleteSessions = false, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null, hasOpenSessions = null) {
|
|
2145
2225
|
const params = { limit: 'null' };
|
|
2146
2226
|
if (startDate) {
|
|
2147
2227
|
params['day__gte'] = startDate;
|
|
@@ -2155,6 +2235,9 @@ class BookingCalendarService {
|
|
|
2155
2235
|
if (locationIds && locationIds.length) {
|
|
2156
2236
|
params['location_id'] = locationIds.join(',');
|
|
2157
2237
|
}
|
|
2238
|
+
if (tagIds && tagIds.length) {
|
|
2239
|
+
params['tag_id'] = tagIds.join(',');
|
|
2240
|
+
}
|
|
2158
2241
|
if (teamIds && teamIds.length) {
|
|
2159
2242
|
params['team_id'] = teamIds.join(',');
|
|
2160
2243
|
}
|
|
@@ -2171,13 +2254,13 @@ class BookingCalendarService {
|
|
|
2171
2254
|
params,
|
|
2172
2255
|
});
|
|
2173
2256
|
}
|
|
2174
|
-
syncBookingCalendarSlots(role, clubOrTeamId, currentWeekStartDate, weekRelativeIndexes, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null) {
|
|
2257
|
+
syncBookingCalendarSlots(role, clubOrTeamId, currentWeekStartDate, weekRelativeIndexes, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null) {
|
|
2175
2258
|
if (role == Role.ClubAdmin) {
|
|
2176
2259
|
return this.syncClubBookingCalendarSlots(clubOrTeamId, currentWeekStartDate, weekRelativeIndexes, startDate, endDate, calendarIds, locationIds, teamIds);
|
|
2177
2260
|
}
|
|
2178
2261
|
return this.syncTeamBookingCalendarSlots(clubOrTeamId, currentWeekStartDate, weekRelativeIndexes, startDate, endDate, calendarIds, locationIds, teamIds);
|
|
2179
2262
|
}
|
|
2180
|
-
syncClubBookingCalendarSlots(clubId, currentWeekStartDate, weekRelativeIndexes, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null) {
|
|
2263
|
+
syncClubBookingCalendarSlots(clubId, currentWeekStartDate, weekRelativeIndexes, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null) {
|
|
2181
2264
|
const params = { limit: 'null' };
|
|
2182
2265
|
if (startDate) {
|
|
2183
2266
|
params['day__gte'] = startDate;
|
|
@@ -2191,6 +2274,9 @@ class BookingCalendarService {
|
|
|
2191
2274
|
if (locationIds && locationIds.length) {
|
|
2192
2275
|
params['location_id'] = locationIds.join(',');
|
|
2193
2276
|
}
|
|
2277
|
+
if (tagIds && tagIds.length) {
|
|
2278
|
+
params['tag_id'] = tagIds.join(',');
|
|
2279
|
+
}
|
|
2194
2280
|
if (teamIds && teamIds.length) {
|
|
2195
2281
|
params['team_id'] = teamIds.join(',');
|
|
2196
2282
|
}
|
|
@@ -2200,7 +2286,7 @@ class BookingCalendarService {
|
|
|
2200
2286
|
week_relative_indexes: weekRelativeIndexes,
|
|
2201
2287
|
}, { params });
|
|
2202
2288
|
}
|
|
2203
|
-
syncTeamBookingCalendarSlots(teamId, currentWeekStartDate, weekRelativeIndexes, startDate = null, endDate = null, calendarIds = null, locationIds = null, teamIds = null) {
|
|
2289
|
+
syncTeamBookingCalendarSlots(teamId, currentWeekStartDate, weekRelativeIndexes, startDate = null, endDate = null, calendarIds = null, locationIds = null, tagIds = null, teamIds = null) {
|
|
2204
2290
|
const params = { limit: 'null' };
|
|
2205
2291
|
if (startDate) {
|
|
2206
2292
|
params['day__gte'] = startDate;
|
|
@@ -2214,6 +2300,9 @@ class BookingCalendarService {
|
|
|
2214
2300
|
if (locationIds && locationIds.length) {
|
|
2215
2301
|
params['location_id'] = locationIds.join(',');
|
|
2216
2302
|
}
|
|
2303
|
+
if (tagIds && tagIds.length) {
|
|
2304
|
+
params['tag_id'] = tagIds.join(',');
|
|
2305
|
+
}
|
|
2217
2306
|
if (teamIds && teamIds.length) {
|
|
2218
2307
|
params['team_id'] = teamIds.join(',');
|
|
2219
2308
|
}
|
|
@@ -2343,12 +2432,24 @@ class BookingCalendarService {
|
|
|
2343
2432
|
return this.apiService
|
|
2344
2433
|
.getResource(bookingSettingsFactory, Role.TeamAdmin, TEAM_BOOKING_SETTINGS_PATH, { teamId });
|
|
2345
2434
|
}
|
|
2435
|
+
updateBookingSettings(role, clubOrTeamId, bookingSettings) {
|
|
2436
|
+
if (role == Role.ClubAdmin) {
|
|
2437
|
+
return this.updateClubBookingSettings(clubOrTeamId, bookingSettings);
|
|
2438
|
+
}
|
|
2439
|
+
return this.updateTeamBookingSettings(clubOrTeamId, bookingSettings);
|
|
2440
|
+
}
|
|
2346
2441
|
updateClubBookingSettings(clubId, bookingSettings) {
|
|
2347
2442
|
return this.apiService
|
|
2348
2443
|
.updateResource(bookingSettingsFactory, Role.ClubAdmin, CLUB_BOOKING_SETTINGS_PATH, {
|
|
2349
2444
|
clubId,
|
|
2350
2445
|
}, bookingSettings);
|
|
2351
2446
|
}
|
|
2447
|
+
updateTeamBookingSettings(teamId, bookingSettings) {
|
|
2448
|
+
return this.apiService
|
|
2449
|
+
.updateResource(bookingSettingsFactory, Role.TeamAdmin, TEAM_BOOKING_SETTINGS_PATH, {
|
|
2450
|
+
teamId,
|
|
2451
|
+
}, bookingSettings);
|
|
2452
|
+
}
|
|
2352
2453
|
// endregion
|
|
2353
2454
|
// region Booking Calendar Application Times
|
|
2354
2455
|
updateClubBookingCalendarApplicationTime(clubId, availableTime) {
|
|
@@ -3486,5 +3587,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
3486
3587
|
* Generated bundle index. Do not edit.
|
|
3487
3588
|
*/
|
|
3488
3589
|
|
|
3489
|
-
export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookingCalendar, BookingCalendarApplicationTime, BookingCalendarService, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, 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, Partner, PaymentAttempt, PaymentAttemptService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
|
|
3590
|
+
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, 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, Partner, PaymentAttempt, PaymentAttemptService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
|
|
3490
3591
|
//# sourceMappingURL=myclub_se-data-access.mjs.map
|