diff --git a/repositories/match_formation_repository.py b/repositories/match_formation_repository.py index d3989ae..9a486ad 100644 --- a/repositories/match_formation_repository.py +++ b/repositories/match_formation_repository.py @@ -153,7 +153,8 @@ def get_match_formations(match_id: int, team_id: int) -> list[dict]: mf.is_captain, mf.x, mf.y, - p.last_name + p.last_name, + p.position as position_full FROM match_formations mf LEFT JOIN players p ON p.id = mf.player_id WHERE mf.match_id = %s @@ -174,6 +175,7 @@ def get_match_formations(match_id: int, team_id: int) -> list[dict]: "x": float(row[5]), "y": float(row[6]), "last_name": row[7] or "", + "position_full": row[8] or "", } for row in rows ] diff --git a/static/script.js b/static/script.js index 25bc6eb..b5c8edf 100644 --- a/static/script.js +++ b/static/script.js @@ -2098,7 +2098,7 @@ function renderLineupRow(row) { data-vmix-person-type="player" data-side="${escapeHtml(side)}" data-name="${escapeHtml(displayName)}" - data-role="${escapeHtml(player.position || "")}" + data-role="${escapeHtml(player.positionFull || player.position || "")}" >
diff --git a/templates/match_workspace.html b/templates/match_workspace.html index 3c7befe..f7a0b03 100644 --- a/templates/match_workspace.html +++ b/templates/match_workspace.html @@ -355,7 +355,7 @@ data-vmix-person-type="player" data-side="home" data-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}" - data-role="{{ p.pos or '' }}" +data-role="{{ p.position_full or p.position or '' }}" >
{{ p.last_name or p.player_name }} @@ -462,7 +462,7 @@ data-vmix-person-type="player" data-side="home" data-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}" - data-role="{{ p.pos or '' }}" +data-role="{{ p.position_full or p.position or '' }}" >
{{ p.last_name or p.player_name }} @@ -579,7 +579,7 @@ data-vmix-person-type="player" data-side="away" data-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}" - data-role="{{ p.pos or '' }}" +data-role="{{ p.position_full or p.position or '' }}" >
{{ p.last_name or p.player_name }} @@ -686,7 +686,7 @@ data-vmix-person-type="player" data-side="away" data-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}" - data-role="{{ p.position or '' }}" + data-role="{{ p.position_full or p.position or '' }}" >
{{ p.last_name or p.player_name }} @@ -1317,7 +1317,7 @@ if (!rawName) return; - const formattedName = swapNameParts(rawName); + const formattedName = rawName; sendNeutralPersonTitle(formattedName, role, logoUrl); });