From ab6365283062a5b2c27a8925e4393f39a77cac84 Mon Sep 17 00:00:00 2001 From: zumuta Date: Mon, 28 Oct 2024 22:02:16 +0100 Subject: [PATCH] feat: add activeInClub --- frontend/apps/club/src/composables/useTeam.ts | 1 + frontend/apps/club/src/composables/useTeamMember.ts | 2 ++ frontend/apps/club/src/pages/teams/TeamMembersPage.vue | 2 +- frontend/apps/club/src/types/team.ts | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/apps/club/src/composables/useTeam.ts b/frontend/apps/club/src/composables/useTeam.ts index 5cd03d27..7af8d273 100644 --- a/frontend/apps/club/src/composables/useTeam.ts +++ b/frontend/apps/club/src/composables/useTeam.ts @@ -74,6 +74,7 @@ export const transform = (doc: TeamDocument) : Team | Teams => { iso3: nationality.attributes.iso_3, name: nationality.attributes.name, }, + activeInClub: teamMember.attributes.active_in_club, } ); } diff --git a/frontend/apps/club/src/composables/useTeamMember.ts b/frontend/apps/club/src/composables/useTeamMember.ts index f8f9bbb5..9a0ba7b5 100644 --- a/frontend/apps/club/src/composables/useTeamMember.ts +++ b/frontend/apps/club/src/composables/useTeamMember.ts @@ -24,6 +24,7 @@ export const TeamMemberResourceSchema = JsonApiData.extend({ license_end_date: z.string(), gender: z.number(), birthdate: z.string(), + active_in_club: z.boolean(), }), relationships: z.object({ nationality: z.object({ @@ -66,6 +67,7 @@ export const transform = (doc: TeamMemberDocument) : TeamMember | TeamMembers => iso3: nationality.attributes.iso_3, name: nationality.attributes.name, }, + activeInClub: teamMemberResource.attributes.active_in_club, }; }; if (Array.isArray(doc.data)) { diff --git a/frontend/apps/club/src/pages/teams/TeamMembersPage.vue b/frontend/apps/club/src/pages/teams/TeamMembersPage.vue index 858ec30c..7972187f 100644 --- a/frontend/apps/club/src/pages/teams/TeamMembersPage.vue +++ b/frontend/apps/club/src/pages/teams/TeamMembersPage.vue @@ -66,7 +66,7 @@ const year = now().year(); :key="team_member.id" > - + {{ team_member.lastName }} {{ team_member.firstName }} diff --git a/frontend/apps/club/src/types/team.ts b/frontend/apps/club/src/types/team.ts index 5c42fc21..f1a18ced 100644 --- a/frontend/apps/club/src/types/team.ts +++ b/frontend/apps/club/src/types/team.ts @@ -11,6 +11,7 @@ export interface TeamMember { gender: number, birthdate: DateType, nationality: Country, + activeInClub: boolean } export interface Team {