diff --git a/static/script.js b/static/script.js index 6f0f02b..6f3f1a1 100644 --- a/static/script.js +++ b/static/script.js @@ -2037,12 +2037,14 @@ function renderLineupRow(row) { const side = row.dataset.side; 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 gkBadge = isGoalkeeperPosition(player.position) ? 'ВР' : ''; const captainBadge = player.isCaptain ? 'К' : ''; const disciplineBadge = player.disciplineType === "yellow_red" @@ -2050,7 +2052,11 @@ function renderLineupRow(row) { : (player.disciplineType === "red" ? 'КК' : ''); - const firstNameHtml = player.firstName ? ` ${escapeHtml(player.firstName)}` : ''; + + const firstNameHtml = player.firstName + ? ` ${escapeHtml(player.firstName)}` + : ''; + const idJs = JSON.stringify(player.id || player.number || ""); const nameJs = JSON.stringify(displayName); @@ -2084,19 +2090,31 @@ function renderLineupRow(row) { } row.innerHTML = ` - ${escapeHtml(player.number)} - -
-
- ${escapeHtml(player.lastName || player.name)}${firstNameHtml} + ${escapeHtml(player.number || "")} + +
+ ${actionsHtml} `; } - function makeDraggable(el) { let dragging = false; @@ -3199,10 +3217,18 @@ function renderLiveCoachBlockForSide(side) { block.innerHTML = source.map(c => `
-
+
+