diff --git a/repositories/match_lineup_repository.py b/repositories/match_lineup_repository.py
index c3e4f9c..1bd4665 100644
--- a/repositories/match_lineup_repository.py
+++ b/repositories/match_lineup_repository.py
@@ -58,7 +58,7 @@ def _player_to_editor_dict(p: dict) -> dict:
"first_name": p.get("first_name", "") or "",
"number": str(p.get("number", "") or ""),
"position": p.get("position", "") or "",
- "position_full": p.get("position_full", "") or p.get("position", "") or "",
+ "position_full": p.get("position_full", "") or "",
"is_captain": bool(p.get("is_captain")),
}
diff --git a/static/script.js b/static/script.js
index b5c8edf..eec975e 100644
--- a/static/script.js
+++ b/static/script.js
@@ -2038,12 +2038,8 @@ function renderLineupRow(row) {
const role = row.dataset.role;
const player = getRowPlayer(row);
- const fullName = (player.name || `${player.lastName || ""} ${player.firstName || ""}`).trim();
- const displayName = buildPersonDisplayName(
- player.firstName,
- player.lastName,
- player.name || fullName
- );
+ const displayName = String(player.name || "").trim()
+ || buildPersonDisplayName(player.firstName, player.lastName, "");
const gkBadge = isGoalkeeperPosition(player.position) ? 'ВР' : '';
const captainBadge = player.isCaptain ? 'К' : '';
diff --git a/templates/match_workspace.html b/templates/match_workspace.html
index f7a0b03..53fde46 100644
--- a/templates/match_workspace.html
+++ b/templates/match_workspace.html
@@ -341,7 +341,7 @@
data-side="home"
data-role="starting"
data-player-id="{{ p.player_id | default(p.number) }}"
- data-player-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}"
+ data-player-name="{{ p.player_name or '' }}"
data-player-last="{{ p.last_name or p.player_name or '' }}"
data-player-first="{{ p.first_name or '' }}"
data-player-number="{{ p.number or '' }}"
@@ -354,7 +354,7 @@
class="player-inline vmix-person-trigger player-link"
data-vmix-person-type="player"
data-side="home"
- data-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}"
+ data-name="{{ p.player_name or '' }}"
data-role="{{ p.position_full or p.position or '' }}"
>
@@ -448,7 +448,7 @@ data-role="{{ p.position_full or p.position or '' }}"
data-side="home"
data-role="bench"
data-player-id="{{ p.player_id | default(p.number) }}"
- data-player-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}"
+ data-player-name="{{ p.player_name or '' }}"
data-player-last="{{ p.last_name or p.player_name or '' }}"
data-player-first="{{ p.first_name or '' }}"
data-player-number="{{ p.number or '' }}"
@@ -461,7 +461,7 @@ data-role="{{ p.position_full or p.position or '' }}"
class="player-inline vmix-person-trigger player-link"
data-vmix-person-type="player"
data-side="home"
- data-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}"
+ data-name="{{ p.player_name or '' }}"
data-role="{{ p.position_full or p.position or '' }}"
>
@@ -565,7 +565,7 @@ data-role="{{ p.position_full or p.position or '' }}"
data-side="away"
data-role="starting"
data-player-id="{{ p.player_id | default(p.number) }}"
- data-player-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}"
+ data-player-name="{{ p.player_name or '' }}"
data-player-last="{{ p.last_name or p.player_name or '' }}"
data-player-first="{{ p.first_name or '' }}"
data-player-number="{{ p.number or '' }}"
@@ -578,7 +578,7 @@ data-role="{{ p.position_full or p.position or '' }}"
class="player-inline vmix-person-trigger player-link"
data-vmix-person-type="player"
data-side="away"
- data-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}"
+ data-name="{{ p.player_name or '' }}"
data-role="{{ p.position_full or p.position or '' }}"
>
@@ -672,7 +672,7 @@ data-role="{{ p.position_full or p.position or '' }}"
data-side="away"
data-role="bench"
data-player-id="{{ p.player_id | default(p.number) }}"
- data-player-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}"
+ data-player-name="{{ p.player_name or '' }}"
data-player-last="{{ p.last_name or p.player_name or '' }}"
data-player-first="{{ p.first_name or '' }}"
data-player-number="{{ p.number or '' }}"
@@ -685,7 +685,7 @@ data-role="{{ p.position_full or p.position or '' }}"
class="player-inline vmix-person-trigger player-link"
data-vmix-person-type="player"
data-side="away"
- data-name="{{ ((p.last_name or p.player_name or '') ~ ' ' ~ (p.first_name or '')) | trim }}"
+ data-name="{{ p.player_name or '' }}"
data-role="{{ p.position_full or p.position or '' }}"
>