@myclub_se/data-access 2.5.2 → 2.5.4

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.
@@ -305,7 +305,7 @@ class BookingCalendarSlot {
305
305
  }
306
306
 
307
307
  class BookingCalendarSlotSession {
308
- constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name, is_overbooked, type, location_zones_taken) {
308
+ constructor(id, section_id, slot_id, team_id, end_time, section_name, start_time, team_name, is_overbooked, type, location_zones_taken, slot_index) {
309
309
  this.id = id;
310
310
  this.section_id = section_id;
311
311
  this.slot_id = slot_id;
@@ -317,6 +317,7 @@ class BookingCalendarSlotSession {
317
317
  this.is_overbooked = is_overbooked;
318
318
  this.type = type;
319
319
  this.location_zones_taken = location_zones_taken;
320
+ this.slot_index = slot_index;
320
321
  }
321
322
  static asFormGroup(session) {
322
323
  return new FormGroup({
@@ -1069,7 +1070,7 @@ class MemberActivityInvite {
1069
1070
  }
1070
1071
 
1071
1072
  class MemberPublicForm {
1072
- constructor(id, active_form, active_to, userToken, comment, dataprotection_policy_choice, dataprotection_policy_url, fields, full_text, has_nationality_field, max_members_per_team, max_registered_in_form_total, member_types, member_type_help_text, name, num_chars_birth_date, num_registered, role_help_text, roles, team_help_text, teams, url) {
1073
+ constructor(id, active_form, active_to, userToken, comment, dataprotection_policy_choice, dataprotection_policy_url, fields, full_text, has_nationality_field, max_members_per_team, max_registered_in_form_total, member_fields, member_types, member_type_help_text, name, num_chars_birth_date, num_registered, registered, register_family, role_help_text, roles, team_help_text, teams, url) {
1073
1074
  this.id = id;
1074
1075
  this.active_form = active_form;
1075
1076
  this.active_to = active_to;
@@ -1082,11 +1083,14 @@ class MemberPublicForm {
1082
1083
  this.has_nationality_field = has_nationality_field;
1083
1084
  this.max_members_per_team = max_members_per_team;
1084
1085
  this.max_registered_in_form_total = max_registered_in_form_total;
1086
+ this.member_fields = member_fields;
1085
1087
  this.member_types = member_types;
1086
1088
  this.member_type_help_text = member_type_help_text;
1087
1089
  this.name = name;
1088
1090
  this.num_chars_birth_date = num_chars_birth_date;
1089
1091
  this.num_registered = num_registered;
1092
+ this.registered = registered;
1093
+ this.register_family = register_family;
1090
1094
  this.role_help_text = role_help_text;
1091
1095
  this.roles = roles;
1092
1096
  this.team_help_text = team_help_text;
@@ -1436,7 +1440,7 @@ const authFactory = (apiAuth) => new Auth(apiAuth.id, apiAuth.name, apiAuth.club
1436
1440
 
1437
1441
  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);
1438
1442
 
1439
- 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);
1443
+ 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);
1440
1444
 
1441
1445
  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);
1442
1446
 
@@ -1511,14 +1515,21 @@ const memberTypeFactory = (apiMemberType) => new MemberType(apiMemberType.id, ap
1511
1515
 
1512
1516
  const memberPublicFormFactory = (apiMemberPublicForm) => {
1513
1517
  const fields = new Map();
1518
+ const member_fields = new Map();
1519
+ if (apiMemberPublicForm.member_fields) {
1520
+ Object.entries(apiMemberPublicForm.member_fields)
1521
+ .forEach(([key, field]) => {
1522
+ member_fields.set(key, memberPublicFormFieldFactory(field));
1523
+ });
1524
+ }
1514
1525
  if (apiMemberPublicForm.fields) {
1515
1526
  Object.entries(apiMemberPublicForm.fields)
1516
1527
  .forEach(([key, field]) => {
1517
1528
  fields.set(key, memberPublicFormFieldFactory(field));
1518
1529
  });
1519
1530
  }
1520
- return new MemberPublicForm(apiMemberPublicForm.id, apiMemberPublicForm.active_from, apiMemberPublicForm.active_to, apiMemberPublicForm.user_token, apiMemberPublicForm.comment, apiMemberPublicForm.dataprotection_policy_choice, apiMemberPublicForm.dataprotection_policy_url, fields, apiMemberPublicForm.full_text, apiMemberPublicForm.has_nationality_field, apiMemberPublicForm.max_members_per_team, apiMemberPublicForm.max_registered_in_form_total, apiMemberPublicForm.member_types && apiMemberPublicForm.member_types.length ?
1521
- apiMemberPublicForm.member_types.map((memberType) => memberTypeFactory(memberType)) : [], apiMemberPublicForm.member_type_help_text, apiMemberPublicForm.name, apiMemberPublicForm.num_chars_birth_date, apiMemberPublicForm.num_registered, apiMemberPublicForm.role_help_text, apiMemberPublicForm.roles && apiMemberPublicForm.roles.length
1531
+ return new MemberPublicForm(apiMemberPublicForm.id, apiMemberPublicForm.active_from, apiMemberPublicForm.active_to, apiMemberPublicForm.user_token, apiMemberPublicForm.comment, apiMemberPublicForm.dataprotection_policy_choice, apiMemberPublicForm.dataprotection_policy_url, fields, apiMemberPublicForm.full_text, apiMemberPublicForm.has_nationality_field, apiMemberPublicForm.max_members_per_team, apiMemberPublicForm.max_registered_in_form_total, member_fields, apiMemberPublicForm.member_types && apiMemberPublicForm.member_types.length ?
1532
+ apiMemberPublicForm.member_types.map((memberType) => memberTypeFactory(memberType)) : [], apiMemberPublicForm.member_type_help_text, apiMemberPublicForm.name, apiMemberPublicForm.num_chars_birth_date, apiMemberPublicForm.num_registered, apiMemberPublicForm.registered, apiMemberPublicForm.register_family, apiMemberPublicForm.role_help_text, apiMemberPublicForm.roles && apiMemberPublicForm.roles.length
1522
1533
  ? apiMemberPublicForm.roles.map((role) => groupRoleFactory(role)) : [], apiMemberPublicForm.team_help_text, apiMemberPublicForm.teams && apiMemberPublicForm.teams.length
1523
1534
  ? apiMemberPublicForm.teams.map((team) => searchTeamFactory(team)) : [], apiMemberPublicForm.url);
1524
1535
  };