@myclub_se/data-access 2.6.1 → 2.7.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.
- package/esm2020/lib/api-models/api-member/api-other-member-field.mjs +2 -0
- package/esm2020/lib/api-models/api-member/api-other-member.mjs +2 -0
- package/esm2020/lib/api-models/api-member/index.mjs +3 -1
- package/esm2020/lib/api-models/api-search-club.mjs +1 -1
- package/esm2020/lib/models/activity-location-group.mjs +11 -1
- package/esm2020/lib/models/member/index.mjs +3 -1
- package/esm2020/lib/models/member/other-member-field.mjs +8 -0
- package/esm2020/lib/models/member/other-member.mjs +13 -0
- package/esm2020/lib/models/search-club.mjs +3 -2
- package/esm2020/lib/services/activity.service.mjs +42 -1
- package/esm2020/lib/services/factories/index.mjs +3 -1
- package/esm2020/lib/services/factories/other-member-factory.mjs +4 -0
- package/esm2020/lib/services/factories/other-member-field-factory.mjs +3 -0
- package/esm2020/lib/services/factories/search-club-factory.mjs +2 -2
- package/esm2020/lib/services/member.service.mjs +10 -10
- package/fesm2015/myclub_se-data-access.mjs +87 -11
- package/fesm2015/myclub_se-data-access.mjs.map +1 -1
- package/fesm2020/myclub_se-data-access.mjs +87 -11
- package/fesm2020/myclub_se-data-access.mjs.map +1 -1
- package/lib/api-models/api-member/api-other-member-field.d.ts +5 -0
- package/lib/api-models/api-member/api-other-member.d.ts +11 -0
- package/lib/api-models/api-member/index.d.ts +2 -0
- package/lib/api-models/api-search-club.d.ts +1 -0
- package/lib/models/activity-location-group.d.ts +9 -1
- package/lib/models/member/index.d.ts +2 -0
- package/lib/models/member/other-member-field.d.ts +6 -0
- package/lib/models/member/other-member.d.ts +12 -0
- package/lib/models/search-club.d.ts +2 -1
- package/lib/services/activity.service.d.ts +11 -5
- package/lib/services/factories/index.d.ts +2 -0
- package/lib/services/factories/other-member-factory.d.ts +3 -0
- package/lib/services/factories/other-member-field-factory.d.ts +3 -0
- package/lib/services/member.service.d.ts +5 -5
- package/package.json +1 -1
|
@@ -197,6 +197,15 @@ class ActivityLocationGroup {
|
|
|
197
197
|
this.name = name;
|
|
198
198
|
this.locations = locations;
|
|
199
199
|
}
|
|
200
|
+
static asFormGroup(locationGroup) {
|
|
201
|
+
return new FormGroup({
|
|
202
|
+
id: new FormControl(locationGroup?.id || ''),
|
|
203
|
+
club_id: new FormControl(locationGroup?.club_id || '', Validators.required),
|
|
204
|
+
section_id: new FormControl(locationGroup?.section_id || ''),
|
|
205
|
+
name: new FormControl(locationGroup?.name || '', Validators.required),
|
|
206
|
+
active: new FormControl(typeof locationGroup?.active !== 'undefined' ? locationGroup?.active : false),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
200
209
|
}
|
|
201
210
|
|
|
202
211
|
class ActivitySettings {
|
|
@@ -1117,6 +1126,27 @@ class MemberValidationSettings {
|
|
|
1117
1126
|
}
|
|
1118
1127
|
}
|
|
1119
1128
|
|
|
1129
|
+
class OtherMember {
|
|
1130
|
+
constructor(id, country, created, firstName, image, lastName, name, fields) {
|
|
1131
|
+
this.id = id;
|
|
1132
|
+
this.country = country;
|
|
1133
|
+
this.created = created;
|
|
1134
|
+
this.firstName = firstName;
|
|
1135
|
+
this.image = image;
|
|
1136
|
+
this.lastName = lastName;
|
|
1137
|
+
this.name = name;
|
|
1138
|
+
this.fields = fields;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
class OtherMemberField {
|
|
1143
|
+
constructor(displayName, fieldName, value) {
|
|
1144
|
+
this.displayName = displayName;
|
|
1145
|
+
this.fieldName = fieldName;
|
|
1146
|
+
this.value = value;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1120
1150
|
class SearchMember {
|
|
1121
1151
|
constructor(id, club_id, team_id, address1, address2, calendar_url, country, district, email, first_name, image, last_name, mobile_phone, name, zip) {
|
|
1122
1152
|
this.id = id;
|
|
@@ -1324,10 +1354,11 @@ var Role;
|
|
|
1324
1354
|
})(Role || (Role = {}));
|
|
1325
1355
|
|
|
1326
1356
|
class SearchClub {
|
|
1327
|
-
constructor(id, leader_member_search, member_search, name) {
|
|
1357
|
+
constructor(id, leader_member_search, member_search, member_view, name) {
|
|
1328
1358
|
this.id = id;
|
|
1329
1359
|
this.leader_member_search = leader_member_search;
|
|
1330
1360
|
this.member_search = member_search;
|
|
1361
|
+
this.member_view = member_view;
|
|
1331
1362
|
this.name = name;
|
|
1332
1363
|
}
|
|
1333
1364
|
}
|
|
@@ -1654,6 +1685,10 @@ const memberTeamThroughFactory = (apiMemberTeamThrough) => new MemberTeamThrough
|
|
|
1654
1685
|
|
|
1655
1686
|
const newsFactory = (apiNews) => new News(apiNews.id, apiNews.club_id, apiNews.created, apiNews.created_by_id, apiNews.section_id, apiNews.team_id, apiNews.active_to, apiNews.author, apiNews.ingress, apiNews.news_image, apiNews.news_image_text, apiNews.published_date, apiNews.read, apiNews.show_on_my_pages, apiNews.show_on_webpage, apiNews.text, apiNews.title, apiNews.updated, apiNews.urls ? imageUrlsFactory(apiNews.urls) : null);
|
|
1656
1687
|
|
|
1688
|
+
const otherMemberFieldFactory = (apiOtherMemberFieldFactory) => new OtherMemberField(apiOtherMemberFieldFactory.display_name, apiOtherMemberFieldFactory.field_name, apiOtherMemberFieldFactory.value);
|
|
1689
|
+
|
|
1690
|
+
const otherMemberFactory = (apiOtherMember) => new OtherMember(apiOtherMember.id, apiOtherMember.country, apiOtherMember.created, apiOtherMember.first_name, apiOtherMember.image, apiOtherMember.last_name, apiOtherMember.name, apiOtherMember.fields ? apiOtherMember.fields.map((memberField) => otherMemberFieldFactory(memberField)) : []);
|
|
1691
|
+
|
|
1657
1692
|
const paymentAttemptFactory = (apiPaymentAttempt) => {
|
|
1658
1693
|
let paymentAttemptData = null;
|
|
1659
1694
|
if (apiPaymentAttempt.type === 'mondido') {
|
|
@@ -1676,7 +1711,7 @@ const paymentAttemptFactory = (apiPaymentAttempt) => {
|
|
|
1676
1711
|
return new PaymentAttempt(apiPaymentAttempt.id, apiPaymentAttempt.amount, apiPaymentAttempt.error, apiPaymentAttempt.invoice_id, apiPaymentAttempt.paid_date, paymentAttemptData, apiPaymentAttempt.status, apiPaymentAttempt.type);
|
|
1677
1712
|
};
|
|
1678
1713
|
|
|
1679
|
-
const searchClubFactory = (apiSearchClub) => new SearchClub(apiSearchClub.id, apiSearchClub.leader_member_search, apiSearchClub.member_search, apiSearchClub.name);
|
|
1714
|
+
const searchClubFactory = (apiSearchClub) => new SearchClub(apiSearchClub.id, apiSearchClub.leader_member_search, apiSearchClub.member_search, apiSearchClub.member_view, apiSearchClub.name);
|
|
1680
1715
|
|
|
1681
1716
|
const searchMemberCardFactory = (apiSearchMemberCard) => new SearchMemberCard(apiSearchMemberCard.id, apiSearchMemberCard.name, apiSearchMemberCard.notification_count, apiSearchMemberCard.pdf_url);
|
|
1682
1717
|
|
|
@@ -1758,6 +1793,7 @@ const TEAM_CALENDAR_PATH = ':teamId/activities/calendar/';
|
|
|
1758
1793
|
const CLUB_ACTIVITY_LOCATIONS_PATH = ':clubId/activities/locations/';
|
|
1759
1794
|
const CLUB_ACTIVITY_LOCATION_PATH = ':clubId/activities/locations/:locationId/';
|
|
1760
1795
|
const CLUB_ACTIVITY_LOCATION_GROUPS_PATH = ':clubId/activities/locations/groups/';
|
|
1796
|
+
const CLUB_ACTIVITY_LOCATION_GROUP_PATH = ':clubId/activities/locations/groups/:groupId/';
|
|
1761
1797
|
const CLUB_ACTIVITY_LOCATION_TAGS_PATH = ':clubId/activities/locations/tags/';
|
|
1762
1798
|
const CLUB_ACTIVITY_LOCATION_PARTS_PATH = ':clubId/activities/locations/:locationId/parts/';
|
|
1763
1799
|
const TEAM_ACTIVITY_LOCATIONS_PATH = ':teamId/activities/locations/';
|
|
@@ -1767,6 +1803,7 @@ const TEAM_ACTIVITY_LOCATION_PARTS_PATH = ':teamId/activities/locations/:locatio
|
|
|
1767
1803
|
const SECTION_ACTIVITY_LOCATIONS_PATH = ':sectionId/activities/locations/';
|
|
1768
1804
|
const SECTION_ACTIVITY_LOCATION_PATH = ':sectionId/activities/locations/:locationId/';
|
|
1769
1805
|
const SECTION_ACTIVITY_LOCATION_GROUPS_PATH = ':sectionId/activities/locations/groups/';
|
|
1806
|
+
const SECTION_ACTIVITY_LOCATION_GROUP_PATH = ':sectionId/activities/locations/groups/:groupId/';
|
|
1770
1807
|
const SECTION_ACTIVITY_LOCATION_TAGS_PATH = ':sectionId/activities/locations/tags/';
|
|
1771
1808
|
const SECTION_ACTIVITY_LOCATION_PARTS_PATH = ':sectionId/activities/locations/:locationId/parts/';
|
|
1772
1809
|
class ActivityService {
|
|
@@ -1921,6 +1958,45 @@ class ActivityService {
|
|
|
1921
1958
|
return this.apiService
|
|
1922
1959
|
.getCollection(activityLocationGroupFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATION_GROUPS_PATH, { teamId }, { params: { limit: 'null' } });
|
|
1923
1960
|
}
|
|
1961
|
+
updateActivityLocationGroup(role, clubOrSectionOrTeamId, locationGroup) {
|
|
1962
|
+
if (role === Role.ClubAdmin) {
|
|
1963
|
+
return this.updateClubActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
|
|
1964
|
+
}
|
|
1965
|
+
return this.updateSectionActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
|
|
1966
|
+
}
|
|
1967
|
+
updateClubActivityLocationGroup(clubId, locationGroup) {
|
|
1968
|
+
return this.apiService
|
|
1969
|
+
.updateResource(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUP_PATH, {
|
|
1970
|
+
clubId,
|
|
1971
|
+
groupId: locationGroup.id
|
|
1972
|
+
}, locationGroup);
|
|
1973
|
+
}
|
|
1974
|
+
updateSectionActivityLocationGroup(sectionId, locationGroup) {
|
|
1975
|
+
return this.apiService
|
|
1976
|
+
.updateResource(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUP_PATH, {
|
|
1977
|
+
sectionId,
|
|
1978
|
+
groupId: locationGroup.id
|
|
1979
|
+
}, locationGroup);
|
|
1980
|
+
}
|
|
1981
|
+
createActivityLocationGroup(role, clubOrSectionOrTeamId, locationGroup) {
|
|
1982
|
+
if (role === Role.ClubAdmin) {
|
|
1983
|
+
return this.createClubActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
|
|
1984
|
+
}
|
|
1985
|
+
return this.createSectionActivityLocationGroup(clubOrSectionOrTeamId, locationGroup);
|
|
1986
|
+
}
|
|
1987
|
+
createClubActivityLocationGroup(clubId, locationGroup) {
|
|
1988
|
+
delete locationGroup.id;
|
|
1989
|
+
return this.apiService
|
|
1990
|
+
.postResource(activityLocationGroupFactory, Role.ClubAdmin, CLUB_ACTIVITY_LOCATION_GROUPS_PATH, {
|
|
1991
|
+
clubId,
|
|
1992
|
+
}, locationGroup);
|
|
1993
|
+
}
|
|
1994
|
+
createSectionActivityLocationGroup(sectionId, locationGroup) {
|
|
1995
|
+
return this.apiService
|
|
1996
|
+
.postResource(activityLocationGroupFactory, Role.SectionAdmin, SECTION_ACTIVITY_LOCATION_GROUPS_PATH, {
|
|
1997
|
+
sectionId,
|
|
1998
|
+
}, locationGroup);
|
|
1999
|
+
}
|
|
1924
2000
|
getActivityLocationTags(role, clubOrSectionOrTeamId) {
|
|
1925
2001
|
if (role == Role.ClubAdmin) {
|
|
1926
2002
|
return this.getClubActivityLocationTags(clubOrSectionOrTeamId);
|
|
@@ -3338,13 +3414,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
3338
3414
|
}]
|
|
3339
3415
|
}], ctorParameters: function () { return []; } });
|
|
3340
3416
|
|
|
3341
|
-
const MEMBER_OTHER_MEMBER_PATH = ':memberId/others/
|
|
3342
|
-
const MEMBER_OTHER_MEMBER_SEARCH_PATH = ':memberId/others/
|
|
3417
|
+
const MEMBER_OTHER_MEMBER_PATH = ':memberId/others/clubmembersv2/:id/';
|
|
3418
|
+
const MEMBER_OTHER_MEMBER_SEARCH_PATH = ':memberId/others/clubmembersv2/';
|
|
3343
3419
|
const MEMBER_PROFILE_CONTACT_PATH = ':memberId/member-detail/contacts/:contactId/';
|
|
3344
3420
|
const MEMBER_PROFILE_PATH = ':memberId/member-detail/';
|
|
3345
3421
|
const TEAM_MEMBER_CONTACT_PATH = ':teamId/team-members/:memberId/contacts/:contactId/';
|
|
3346
|
-
const TEAM_OTHER_MEMBER_PATH = ':teamId/team-members/
|
|
3347
|
-
const TEAM_OTHER_MEMBER_SEARCH_PATH = ':teamId/team-members/
|
|
3422
|
+
const TEAM_OTHER_MEMBER_PATH = ':teamId/team-members/othersv2/:id/';
|
|
3423
|
+
const TEAM_OTHER_MEMBER_SEARCH_PATH = ':teamId/team-members/othersv2/';
|
|
3348
3424
|
class MemberService {
|
|
3349
3425
|
constructor(apiService) {
|
|
3350
3426
|
this.apiService = apiService;
|
|
@@ -3355,11 +3431,11 @@ class MemberService {
|
|
|
3355
3431
|
}
|
|
3356
3432
|
getMemberOtherMember(memberId, id) {
|
|
3357
3433
|
return this.apiService
|
|
3358
|
-
.getResource(
|
|
3434
|
+
.getResource(otherMemberFactory, Role.MemberAdmin, MEMBER_OTHER_MEMBER_PATH, { memberId, id });
|
|
3359
3435
|
}
|
|
3360
3436
|
getTeamOtherMember(teamId, id) {
|
|
3361
3437
|
return this.apiService
|
|
3362
|
-
.getResource(
|
|
3438
|
+
.getResource(otherMemberFactory, Role.TeamAdmin, TEAM_OTHER_MEMBER_PATH, { teamId, id });
|
|
3363
3439
|
}
|
|
3364
3440
|
removeMemberProfileContact(memberId, contactId) {
|
|
3365
3441
|
return this.apiService
|
|
@@ -3371,11 +3447,11 @@ class MemberService {
|
|
|
3371
3447
|
}
|
|
3372
3448
|
searchMemberOtherMembers(memberId, searchTerm) {
|
|
3373
3449
|
return this.apiService
|
|
3374
|
-
.getCollection(
|
|
3450
|
+
.getCollection(otherMemberFactory, Role.MemberAdmin, MEMBER_OTHER_MEMBER_SEARCH_PATH, { memberId }, { params: { q: searchTerm } });
|
|
3375
3451
|
}
|
|
3376
3452
|
searchTeamOtherMembers(teamId, searchTerm) {
|
|
3377
3453
|
return this.apiService
|
|
3378
|
-
.getCollection(
|
|
3454
|
+
.getCollection(otherMemberFactory, Role.TeamAdmin, TEAM_OTHER_MEMBER_SEARCH_PATH, { teamId }, { params: { q: searchTerm } });
|
|
3379
3455
|
}
|
|
3380
3456
|
updateMemberProfile(memberId, memberProfile) {
|
|
3381
3457
|
return this.apiService
|
|
@@ -4052,5 +4128,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
|
|
|
4052
4128
|
* Generated bundle index. Do not edit.
|
|
4053
4129
|
*/
|
|
4054
4130
|
|
|
4055
|
-
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 };
|
|
4131
|
+
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, OtherMember, OtherMemberField, 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 };
|
|
4056
4132
|
//# sourceMappingURL=myclub_se-data-access.mjs.map
|