Skip to content

Commit

Permalink
feat: add activeInClub
Browse files Browse the repository at this point in the history
  • Loading branch information
zumuta committed Oct 28, 2024
1 parent 4ddd585 commit ab63652
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/apps/club/src/composables/useTeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
);
}
Expand Down
2 changes: 2 additions & 0 deletions frontend/apps/club/src/composables/useTeamMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/apps/club/src/pages/teams/TeamMembersPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const year = now().year();
:key="team_member.id"
>
<KwaiTableCell class="w-12" />
<KwaiTableCell>
<KwaiTableCell :class="{ 'line-through': !team_member.activeInClub }">
{{ team_member.lastName }} {{ team_member.firstName }}
</KwaiTableCell>
<KwaiTableCell>
Expand Down
1 change: 1 addition & 0 deletions frontend/apps/club/src/types/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface TeamMember {
gender: number,
birthdate: DateType,
nationality: Country,
activeInClub: boolean
}

export interface Team {
Expand Down

0 comments on commit ab63652

Please sign in to comment.