%- include('header.html', { pageTitle, extraStyles, extraScripts }) %> <% function formatDateLong(date){ if(!date){ date = new Date()} let sdate = date.toLocaleDateString('es-MX', { year: 'numeric', month: 'long', day: 'numeric' }); return sdate } function formatDate(date){ if(!date){ date = new Date()} let sdate = date.toLocaleDateString('es-MX', { year: 'numeric', month: 'short', day: 'numeric' }); return sdate.toUpperCase() } function formatTime(time){ let hh = time.substr(0,2) let mm = time.substr(3,2) let am = parseInt(hh) > 11 ? 'pm' : 'am' let hr = parseInt(hh) hr = hr > 12 ? hr-12 : hr return `${hr.toString().padStart(2,'0')}:${mm} ${am}` } function showSex(sex){ return {male:'Masculino', female:'Femenino', mixed:'Mixto'}[sex?.toLowerCase() || 'male'] } %>
<%= tournament.description %>
<% } %>No hay categorías definidas
<% } else { %>No hay equipos registrados
<% } else { %>No hay fases definidas
No hay partidos en esta fase
| Fecha | Cancha | Equipo 1 | Equipo 2 | Resultado | Estado |
|---|---|---|---|---|---|
|
<%=formatDate(match.scheduled_date)%> <%=formatTime(match.scheduled_time || '17:00')%> |
<%=match.court_name%> |
<%= match.team1_name || 'TBD' %> <%=match.team1_player1%> / <%=match.team1_player2%> |
<%= match.team2_name || 'TBD' %> <%=match.team2_player1%> / <%=match.team2_player2%> |
<% if (match.status === 'finalizado') { %> <% if (match.scores && match.scores.length > 0) { %> <% match.scores.forEach(function(s, idx) { %> <%= s.team1_points %>-<%= s.team2_points %> <% }) %> <% } else { %> <%= match.team1_score %>-<%= match.team2_score %> <% } %> <% } else { %> - <% } %> | <%= match.status %> |
No hay datos en la tabla de posiciones
<% } else { %>| # | Equipo | Grupo | G | P | SG | SP | PG | PP |
|---|---|---|---|---|---|---|---|---|
| <%= entry.rank %> | <%= entry.team_name %> | <%= entry.group_name || '-' %> | <%= entry.wins %> | <%= entry.losses %> | <%= entry.sets_won %> | <%= entry.sets_lost %> | <%= entry.points_for %> | <%= entry.points_against %> |