Aktualisiere die Version auf 1.8.10 und füge Vereinsrang (QTTR / TTR) zur QTTR-Tabelle hinzu. Implementiere die Logik zur Berechnung und Sortierung der Vereinsränge in den API- und Import-Skripten.
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">
|
||||
Rang
|
||||
Vereinsrang<br>(QTTR / TTR)
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">
|
||||
Spieler
|
||||
@@ -69,7 +69,9 @@
|
||||
:class="isOwnRow(row.playerName) ? 'bg-primary-100' : ''"
|
||||
>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">
|
||||
{{ row.rank ?? '–' }}
|
||||
<span :title="clubRankTitle(row)">
|
||||
{{ formatClubRank(row) }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3">
|
||||
<div :class="['font-medium', getPlayerNameClass(row)]">
|
||||
@@ -133,6 +135,20 @@ function isOwnRow(playerName) {
|
||||
return normalizeName(playerName) === current
|
||||
}
|
||||
|
||||
function formatClubRank(row) {
|
||||
const qttrRank = row.clubQttrRank
|
||||
const ttrRank = row.clubTtrRank
|
||||
if (qttrRank == null) return '–'
|
||||
return ttrRank == null ? String(qttrRank) : `${qttrRank} (${ttrRank})`
|
||||
}
|
||||
|
||||
function clubRankTitle(row) {
|
||||
if (row.clubQttrRank == null) return 'Keine QTTR-Platzierung verfügbar'
|
||||
return row.clubTtrRank == null
|
||||
? `QTTR-Platzierung im Verein: ${row.clubQttrRank}`
|
||||
: `QTTR-Platzierung im Verein: ${row.clubQttrRank}; TTR-Platzierung im Verein: ${row.clubTtrRank}`
|
||||
}
|
||||
|
||||
function getPlayerNameClass(row) {
|
||||
const minor = isMinor(row.birthdate)
|
||||
if (minor && isMaleGender(row.gender)) return 'text-blue-400'
|
||||
|
||||
Reference in New Issue
Block a user