feat(tournament): enhance age class display in TournamentClassList
- Updated the age class badge logic to display both minimum and maximum birth years when applicable, improving clarity for tournament participants. - Added conditional rendering for cases where only minimum or maximum birth years are defined, ensuring comprehensive age class information is presented.
This commit is contained in:
@@ -20,8 +20,16 @@
|
||||
<span v-if="classItem.gender" class="class-gender-badge" :class="'gender-' + classItem.gender">
|
||||
{{ classItem.gender === 'male' ? $t('members.genderMale') : classItem.gender === 'female' ? $t('members.genderFemale') : $t('tournaments.genderMixed') }}
|
||||
</span>
|
||||
<span v-if="classItem.minBirthYear" class="class-birth-year-badge">
|
||||
≥ {{ classItem.minBirthYear }}
|
||||
<span v-if="classItem.minBirthYear || classItem.maxBirthYear" class="class-birth-year-badge">
|
||||
<template v-if="classItem.minBirthYear && classItem.maxBirthYear">
|
||||
{{ classItem.minBirthYear }}–{{ classItem.maxBirthYear }}
|
||||
</template>
|
||||
<template v-else-if="classItem.maxBirthYear">
|
||||
≤ {{ classItem.maxBirthYear }}
|
||||
</template>
|
||||
<template v-else>
|
||||
≥ {{ classItem.minBirthYear }}
|
||||
</template>
|
||||
</span>
|
||||
<button @click.stop="editClass(classItem)" class="btn-edit-small" :title="$t('tournaments.edit')">✏️</button>
|
||||
<button @click.stop="deleteClass(classItem)" class="trash-btn-small" :title="$t('tournaments.delete')">🗑️</button>
|
||||
|
||||
Reference in New Issue
Block a user