@golstats/gsc-reports 1.0.55 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{FilterConditions-55d68355-zHMe0Dyg-CrLqkkfP-BaX3BGxl.js → FilterConditions-55d68355-DMqzcKBO-CgZ2Bws6-BA3vKTMH.js} +11 -11
- package/dist/FilterField-59a73e38-CNaE03Ge-D6Qm0WVk-CYhTlEKz.js +21 -0
- package/dist/{FilterSubcategories-a9b32cc9-BjvvEE_X-DQe88zvC-BCPYEIqn.js → FilterSubcategories-a9b32cc9-_h5FCZ4r-BJzGxe0g-Cy8PlaUW.js} +1 -1
- package/dist/css/fonts.css +83 -83
- package/dist/gsc-reports.css +1 -1
- package/dist/gsc-reports.es.js +1 -1
- package/dist/gsc-reports.umd.js +258 -258
- package/dist/{index-BMnmRJrj.js → index-B9F2yNJu.js} +73610 -73472
- package/package.json +2 -2
- package/src/components/elementsTemplates/ModalDeleteReport.vue +246 -246
- package/src/components/elementsTemplates/ModalDeleteTemplate.vue +249 -249
- package/src/components/elementsTemplates/ModalRenameReporte.vue +330 -330
- package/src/components/elementsTemplates/ModalRenameTemplate.vue +337 -337
- package/src/components/elementsTemplates/ModalSoloEscritorio.vue +83 -83
- package/src/components/elementsTemplates/ModalduplicateTemplate.vue +300 -300
- package/src/components/elementsTemplates/TooltipReportOptions.vue +97 -97
- package/src/components/elementsTemplates/TooltipTemplateOptions.vue +168 -168
- package/src/components/filters.vue +935 -935
- package/src/components/thumbnails-reports/AnalisisPostMatchType1.vue +741 -741
- package/src/components/thumbnails-reports/AnalisisPostMatchType2.vue +743 -743
- package/src/components/thumbnails-reports/AnalisisPostMatchType3.vue +441 -441
- package/src/components/thumbnails-reports/AnalisisPostMatchType4.vue +440 -440
- package/src/components/thumbnails-reports/AnalisisPrematchType1.vue +232 -232
- package/src/components/thumbnails-reports/AnalisisPrematchType2.vue +231 -231
- package/src/components/thumbnails-reports/AnalisisPrematchType3.vue +173 -173
- package/src/components/thumbnails-reports/AnalisisPrematchType4.vue +173 -173
- package/src/index.js +4 -4
- package/src/types.d.ts +45 -45
- package/src/utils/dateUtils.js +52 -52
- package/dist/FilterField-59a73e38-DtNZKbqt-BMRKmoBk-pUUn67tu.js +0 -21
|
@@ -1,441 +1,441 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="prematch-bg">
|
|
3
|
-
<!-- Escudos de fondo -->
|
|
4
|
-
|
|
5
|
-
<div class="title">Análisis <span class="highlight">Postmatch</span></div>
|
|
6
|
-
<div class="subtitle">
|
|
7
|
-
<span class="jornada">Jornada {{ traducirJornada(report.game.matchday_name) }}</span>
|
|
8
|
-
<span class="fecha"> - {{ formatDate(report.game.date_time_utc) }}</span>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="teams-row">
|
|
11
|
-
<div class="team team-local">
|
|
12
|
-
<div class="team-header">
|
|
13
|
-
<span class="escudo-svg">
|
|
14
|
-
<img
|
|
15
|
-
width="55px"
|
|
16
|
-
:src="
|
|
17
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
18
|
-
report.game.home_team +
|
|
19
|
-
'.png'
|
|
20
|
-
"
|
|
21
|
-
/>
|
|
22
|
-
</span>
|
|
23
|
-
<div class="score">{{ report.game.score[0] }}</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="players-list">
|
|
26
|
-
<!-- Todos los eventos del equipo local -->
|
|
27
|
-
<div
|
|
28
|
-
v-for="(event, index) in homeEvents"
|
|
29
|
-
:key="`home-event-${index}`"
|
|
30
|
-
class="player-item"
|
|
31
|
-
>
|
|
32
|
-
<span class="player-name">{{ event }} </span>
|
|
33
|
-
<span class="player-icon">
|
|
34
|
-
<!-- Icono de gol -->
|
|
35
|
-
<svg
|
|
36
|
-
width="12"
|
|
37
|
-
height="12"
|
|
38
|
-
viewBox="0 0 20 20"
|
|
39
|
-
fill="none"
|
|
40
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
-
>
|
|
42
|
-
<path
|
|
43
|
-
fill-rule="evenodd"
|
|
44
|
-
clip-rule="evenodd"
|
|
45
|
-
d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z"
|
|
46
|
-
stroke="white"
|
|
47
|
-
stroke-width="1.36665"
|
|
48
|
-
stroke-linecap="round"
|
|
49
|
-
stroke-linejoin="round"
|
|
50
|
-
/>
|
|
51
|
-
<path
|
|
52
|
-
fill-rule="evenodd"
|
|
53
|
-
clip-rule="evenodd"
|
|
54
|
-
d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z"
|
|
55
|
-
stroke="white"
|
|
56
|
-
stroke-width="1.36665"
|
|
57
|
-
stroke-linecap="round"
|
|
58
|
-
stroke-linejoin="round"
|
|
59
|
-
/>
|
|
60
|
-
</svg>
|
|
61
|
-
</span>
|
|
62
|
-
</div>
|
|
63
|
-
<!-- Indicador de más eventos para equipo local -->
|
|
64
|
-
<div v-if="hasMoreHomeEvents" class="more-events-indicator">
|
|
65
|
-
<span class="more-events-text">...</span>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
<div class="divider-line">
|
|
71
|
-
<div class="dotted-line"></div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div class="team team-visitor">
|
|
75
|
-
<div class="team-header">
|
|
76
|
-
<div class="score">{{ report.game.score[1] }}</div>
|
|
77
|
-
<span class="escudo-svg">
|
|
78
|
-
<img
|
|
79
|
-
width="55px"
|
|
80
|
-
:src="
|
|
81
|
-
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
82
|
-
report.game.visiting_team +
|
|
83
|
-
'.png'
|
|
84
|
-
"
|
|
85
|
-
/>
|
|
86
|
-
</span>
|
|
87
|
-
</div>
|
|
88
|
-
<div class="players-list">
|
|
89
|
-
<!-- Todos los eventos del equipo visitante -->
|
|
90
|
-
<div
|
|
91
|
-
v-for="(event, index) in visitingEvents"
|
|
92
|
-
:key="`visiting-event-${index}`"
|
|
93
|
-
class="player-item"
|
|
94
|
-
>
|
|
95
|
-
<span class="player-icon">
|
|
96
|
-
<!-- Icono de gol -->
|
|
97
|
-
<svg
|
|
98
|
-
width="12"
|
|
99
|
-
height="12"
|
|
100
|
-
viewBox="0 0 20 20"
|
|
101
|
-
fill="none"
|
|
102
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
103
|
-
>
|
|
104
|
-
<path
|
|
105
|
-
fill-rule="evenodd"
|
|
106
|
-
clip-rule="evenodd"
|
|
107
|
-
d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z"
|
|
108
|
-
stroke="white"
|
|
109
|
-
stroke-width="1.36665"
|
|
110
|
-
stroke-linecap="round"
|
|
111
|
-
stroke-linejoin="round"
|
|
112
|
-
/>
|
|
113
|
-
<path
|
|
114
|
-
fill-rule="evenodd"
|
|
115
|
-
clip-rule="evenodd"
|
|
116
|
-
d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z"
|
|
117
|
-
stroke="white"
|
|
118
|
-
stroke-width="1.36665"
|
|
119
|
-
stroke-linecap="round"
|
|
120
|
-
stroke-linejoin="round"
|
|
121
|
-
/>
|
|
122
|
-
</svg>
|
|
123
|
-
</span>
|
|
124
|
-
<span class="player-name">
|
|
125
|
-
{{ extraerMinutosYNombre(event).minutos }} <span
|
|
126
|
-
v-if="extraerMinutosYNombre(event).nombre"
|
|
127
|
-
>
|
|
128
|
-
{{ extraerMinutosYNombre(event).nombre }}</span
|
|
129
|
-
>
|
|
130
|
-
</span>
|
|
131
|
-
</div>
|
|
132
|
-
<!-- Indicador de más eventos para equipo visitante -->
|
|
133
|
-
<div v-if="hasMoreVisitingEvents" class="more-events-indicator">
|
|
134
|
-
<span class="more-events-text">...</span>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</template>
|
|
141
|
-
|
|
142
|
-
<script setup>
|
|
143
|
-
import { formatDate } from '../../utils/dateUtils.js'
|
|
144
|
-
import { computed } from 'vue'
|
|
145
|
-
|
|
146
|
-
function traducirJornada(jornada) {
|
|
147
|
-
if (!jornada) return ''
|
|
148
|
-
return jornada
|
|
149
|
-
.replace('Matchday', 'J')
|
|
150
|
-
.replace('de Final', '')
|
|
151
|
-
.replace('Playoffs 1', 'CFI')
|
|
152
|
-
.replace('Playoffs 2', 'CFV')
|
|
153
|
-
.replace('Playoffs 3', 'SI')
|
|
154
|
-
.replace('Playoffs 4', 'SV')
|
|
155
|
-
.replace('Playoffs 5', 'FI')
|
|
156
|
-
.replace('Playoffs 6', 'FV')
|
|
157
|
-
}
|
|
158
|
-
// Aquí puedes agregar props si quieres que los nombres de equipos y jornada sean dinámicos
|
|
159
|
-
const props = defineProps({
|
|
160
|
-
report: {
|
|
161
|
-
type: Object,
|
|
162
|
-
default: () => ({}),
|
|
163
|
-
},
|
|
164
|
-
})
|
|
165
|
-
|
|
166
|
-
// Debug: ver qué datos llegan
|
|
167
|
-
console.log('Props report: ', props.report)
|
|
168
|
-
console.log('Game minutes: ', props.report?.game?.report_minutes)
|
|
169
|
-
|
|
170
|
-
// Función para obtener todos los eventos del equipo local limitados a 5
|
|
171
|
-
const homeEvents = computed(() => {
|
|
172
|
-
// Ahora los eventos ya vienen en el formato correcto, solo mostrar los primeros 5
|
|
173
|
-
return (props.report?.game?.report_minutes?.home_goals_minutes || []).slice(0, 5)
|
|
174
|
-
})
|
|
175
|
-
|
|
176
|
-
// Función para obtener todos los eventos del equipo visitante limitados a 5
|
|
177
|
-
const visitingEvents = computed(() => {
|
|
178
|
-
// Ahora los eventos ya vienen en el formato correcto, solo mostrar los primeros 5
|
|
179
|
-
return (props.report?.game?.report_minutes?.visiting_goals_minutes || []).slice(0, 5)
|
|
180
|
-
})
|
|
181
|
-
|
|
182
|
-
// Función para extraer minutos y nombre para el visitante
|
|
183
|
-
function extraerMinutosYNombre(evento) {
|
|
184
|
-
// Buscar todos los patrones de minutos (ej: 62', 90 + 4')
|
|
185
|
-
const minutos = Array.from(evento.matchAll(/\d+\s*\+*\s*\d*'/g))
|
|
186
|
-
.map((m) => m[0])
|
|
187
|
-
.join(', ')
|
|
188
|
-
// El nombre es lo que queda antes del primer minuto
|
|
189
|
-
const nombreMatch = evento.match(/^(.*?)\s*\d+'/)
|
|
190
|
-
const nombre = nombreMatch ? ' ' + nombreMatch[1].trim() : ''
|
|
191
|
-
return { minutos, nombre }
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// Funciones computadas para verificar si hay más de 5 eventos
|
|
195
|
-
const hasMoreHomeEvents = computed(() => {
|
|
196
|
-
const totalEvents = props.report?.game?.report_minutes?.home_goals_minutes?.length || 0
|
|
197
|
-
return totalEvents > 5
|
|
198
|
-
})
|
|
199
|
-
|
|
200
|
-
const hasMoreVisitingEvents = computed(() => {
|
|
201
|
-
const totalEvents = props.report?.game?.report_minutes?.visiting_goals_minutes?.length || 0
|
|
202
|
-
return totalEvents > 5
|
|
203
|
-
})
|
|
204
|
-
</script>
|
|
205
|
-
|
|
206
|
-
<style scoped>
|
|
207
|
-
.prematch-bg {
|
|
208
|
-
width: 100%;
|
|
209
|
-
height: 222px;
|
|
210
|
-
/* height: 100vh; */
|
|
211
|
-
background: url('https://golstatsimages.blob.core.windows.net/reports-images/background-postmatch-template-01.jpg');
|
|
212
|
-
background-size: cover;
|
|
213
|
-
background-repeat: no-repeat;
|
|
214
|
-
display: flex;
|
|
215
|
-
flex-direction: column;
|
|
216
|
-
justify-content: center;
|
|
217
|
-
align-items: center;
|
|
218
|
-
position: relative;
|
|
219
|
-
overflow: hidden;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.background-shields {
|
|
223
|
-
position: absolute;
|
|
224
|
-
top: 0;
|
|
225
|
-
left: 0;
|
|
226
|
-
width: 100%;
|
|
227
|
-
height: 100%;
|
|
228
|
-
pointer-events: none;
|
|
229
|
-
z-index: 1;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.shield-left {
|
|
233
|
-
position: absolute;
|
|
234
|
-
left: -80px;
|
|
235
|
-
top: 50%;
|
|
236
|
-
transform: translateY(-50%);
|
|
237
|
-
opacity: 0.09;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.shield-left img {
|
|
241
|
-
width: 170px;
|
|
242
|
-
height: 170px;
|
|
243
|
-
object-fit: contain;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.shield-right {
|
|
247
|
-
position: absolute;
|
|
248
|
-
right: -80px;
|
|
249
|
-
top: 50%;
|
|
250
|
-
transform: translateY(-50%);
|
|
251
|
-
opacity: 0.09;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.shield-right img {
|
|
255
|
-
width: 170px;
|
|
256
|
-
height: 170px;
|
|
257
|
-
object-fit: contain;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.header {
|
|
261
|
-
padding: 24px 32px;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.logo {
|
|
265
|
-
height: 40px;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.main-content {
|
|
269
|
-
display: flex;
|
|
270
|
-
flex-direction: column;
|
|
271
|
-
align-items: center;
|
|
272
|
-
/* Elimina el margin-top para centrar verticalmente */
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.title {
|
|
276
|
-
font-size: 0.8rem;
|
|
277
|
-
color: #fff;
|
|
278
|
-
font-family: Poppins-Regular;
|
|
279
|
-
position: relative;
|
|
280
|
-
z-index: 2;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.highlight {
|
|
284
|
-
font-family: Poppins-Bold;
|
|
285
|
-
color: #fff;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.subtitle {
|
|
289
|
-
font-family: Poppins-Regular;
|
|
290
|
-
margin-top: -8px;
|
|
291
|
-
font-size: 1.1rem;
|
|
292
|
-
color: #e0e0e0;
|
|
293
|
-
position: relative;
|
|
294
|
-
z-index: 2;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.jornada {
|
|
298
|
-
font-family: Poppins-Medium;
|
|
299
|
-
color: #fff;
|
|
300
|
-
font-size: 0.4rem;
|
|
301
|
-
line-height: 2.2;
|
|
302
|
-
letter-spacing: 0.2px;
|
|
303
|
-
opacity: 0.8;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.fecha {
|
|
307
|
-
font-family: Poppins-Regular;
|
|
308
|
-
color: #e0e0e0;
|
|
309
|
-
opacity: 0.8;
|
|
310
|
-
line-height: 2.2;
|
|
311
|
-
letter-spacing: 0.2px;
|
|
312
|
-
font-size: 0.4rem;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.teams-row {
|
|
316
|
-
display: flex;
|
|
317
|
-
justify-content: center;
|
|
318
|
-
align-items: flex-start;
|
|
319
|
-
gap: 15px;
|
|
320
|
-
margin-top: 10px;
|
|
321
|
-
position: relative;
|
|
322
|
-
z-index: 2;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.team {
|
|
326
|
-
display: flex;
|
|
327
|
-
flex-direction: column;
|
|
328
|
-
justify-content: flex-start;
|
|
329
|
-
align-items: center;
|
|
330
|
-
gap: 8px;
|
|
331
|
-
min-height: 120px;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.team-header {
|
|
335
|
-
display: flex;
|
|
336
|
-
align-items: center;
|
|
337
|
-
gap: 8px;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.divider-line {
|
|
341
|
-
display: flex;
|
|
342
|
-
justify-content: center;
|
|
343
|
-
align-items: flex-start;
|
|
344
|
-
height: 60px;
|
|
345
|
-
margin-top: 0;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.dotted-line {
|
|
349
|
-
width: 2px;
|
|
350
|
-
height: 60px;
|
|
351
|
-
background: repeating-linear-gradient(
|
|
352
|
-
to bottom,
|
|
353
|
-
#fff 0,
|
|
354
|
-
#fff 4px,
|
|
355
|
-
transparent 4px,
|
|
356
|
-
transparent 8px
|
|
357
|
-
);
|
|
358
|
-
opacity: 0.5;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.escudo-svg {
|
|
362
|
-
display: flex;
|
|
363
|
-
justify-content: center;
|
|
364
|
-
align-items: center;
|
|
365
|
-
width: 55px;
|
|
366
|
-
height: 55px;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.players-list {
|
|
370
|
-
display: flex;
|
|
371
|
-
flex-direction: column;
|
|
372
|
-
gap: 2px;
|
|
373
|
-
align-items: center;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/* Alinear eventos del equipo local hacia la derecha */
|
|
377
|
-
.team-local .players-list {
|
|
378
|
-
align-items: flex-end;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/* Alinear eventos del equipo visitante hacia la izquierda */
|
|
382
|
-
.team-visitor .players-list {
|
|
383
|
-
align-items: flex-start;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.player-item {
|
|
387
|
-
display: flex;
|
|
388
|
-
align-items: center;
|
|
389
|
-
gap: 4px;
|
|
390
|
-
font-size: 0.35rem;
|
|
391
|
-
color: #fff;
|
|
392
|
-
font-family: Poppins-Regular;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.player-name {
|
|
396
|
-
font-size: 0.35rem;
|
|
397
|
-
color: #fff;
|
|
398
|
-
font-family: Poppins-Regular;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.player-time {
|
|
402
|
-
font-size: 0.35rem;
|
|
403
|
-
color: #fff;
|
|
404
|
-
font-family: Poppins-Regular;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
.player-icon svg {
|
|
408
|
-
width: 8px;
|
|
409
|
-
height: 8px;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.score {
|
|
413
|
-
font-size: 2.5rem;
|
|
414
|
-
font-family: BebasNeue-Bold;
|
|
415
|
-
font-weight: 700;
|
|
416
|
-
color: #fff;
|
|
417
|
-
margin: 0;
|
|
418
|
-
letter-spacing: 1px;
|
|
419
|
-
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/* Estilos específicos para el equipo visitante */
|
|
423
|
-
.team-visitor .player-item {
|
|
424
|
-
/* El orden ya está correcto en el HTML: icono-minuto-nombre */
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/* Estilos para el indicador de más eventos */
|
|
428
|
-
.more-events-indicator {
|
|
429
|
-
display: flex;
|
|
430
|
-
justify-content: center;
|
|
431
|
-
align-items: center;
|
|
432
|
-
margin-top: 2px;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.more-events-text {
|
|
436
|
-
font-size: 0.4rem;
|
|
437
|
-
color: #fff;
|
|
438
|
-
font-family: Poppins-Regular;
|
|
439
|
-
opacity: 0.8;
|
|
440
|
-
}
|
|
441
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="prematch-bg">
|
|
3
|
+
<!-- Escudos de fondo -->
|
|
4
|
+
|
|
5
|
+
<div class="title">Análisis <span class="highlight">Postmatch</span></div>
|
|
6
|
+
<div class="subtitle">
|
|
7
|
+
<span class="jornada">Jornada {{ traducirJornada(report.game.matchday_name) }}</span>
|
|
8
|
+
<span class="fecha"> - {{ formatDate(report.game.date_time_utc) }}</span>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="teams-row">
|
|
11
|
+
<div class="team team-local">
|
|
12
|
+
<div class="team-header">
|
|
13
|
+
<span class="escudo-svg">
|
|
14
|
+
<img
|
|
15
|
+
width="55px"
|
|
16
|
+
:src="
|
|
17
|
+
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
18
|
+
report.game.home_team +
|
|
19
|
+
'.png'
|
|
20
|
+
"
|
|
21
|
+
/>
|
|
22
|
+
</span>
|
|
23
|
+
<div class="score">{{ report.game.score[0] }}</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="players-list">
|
|
26
|
+
<!-- Todos los eventos del equipo local -->
|
|
27
|
+
<div
|
|
28
|
+
v-for="(event, index) in homeEvents"
|
|
29
|
+
:key="`home-event-${index}`"
|
|
30
|
+
class="player-item"
|
|
31
|
+
>
|
|
32
|
+
<span class="player-name">{{ event }} </span>
|
|
33
|
+
<span class="player-icon">
|
|
34
|
+
<!-- Icono de gol -->
|
|
35
|
+
<svg
|
|
36
|
+
width="12"
|
|
37
|
+
height="12"
|
|
38
|
+
viewBox="0 0 20 20"
|
|
39
|
+
fill="none"
|
|
40
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
+
>
|
|
42
|
+
<path
|
|
43
|
+
fill-rule="evenodd"
|
|
44
|
+
clip-rule="evenodd"
|
|
45
|
+
d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z"
|
|
46
|
+
stroke="white"
|
|
47
|
+
stroke-width="1.36665"
|
|
48
|
+
stroke-linecap="round"
|
|
49
|
+
stroke-linejoin="round"
|
|
50
|
+
/>
|
|
51
|
+
<path
|
|
52
|
+
fill-rule="evenodd"
|
|
53
|
+
clip-rule="evenodd"
|
|
54
|
+
d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z"
|
|
55
|
+
stroke="white"
|
|
56
|
+
stroke-width="1.36665"
|
|
57
|
+
stroke-linecap="round"
|
|
58
|
+
stroke-linejoin="round"
|
|
59
|
+
/>
|
|
60
|
+
</svg>
|
|
61
|
+
</span>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- Indicador de más eventos para equipo local -->
|
|
64
|
+
<div v-if="hasMoreHomeEvents" class="more-events-indicator">
|
|
65
|
+
<span class="more-events-text">...</span>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div class="divider-line">
|
|
71
|
+
<div class="dotted-line"></div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div class="team team-visitor">
|
|
75
|
+
<div class="team-header">
|
|
76
|
+
<div class="score">{{ report.game.score[1] }}</div>
|
|
77
|
+
<span class="escudo-svg">
|
|
78
|
+
<img
|
|
79
|
+
width="55px"
|
|
80
|
+
:src="
|
|
81
|
+
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
82
|
+
report.game.visiting_team +
|
|
83
|
+
'.png'
|
|
84
|
+
"
|
|
85
|
+
/>
|
|
86
|
+
</span>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="players-list">
|
|
89
|
+
<!-- Todos los eventos del equipo visitante -->
|
|
90
|
+
<div
|
|
91
|
+
v-for="(event, index) in visitingEvents"
|
|
92
|
+
:key="`visiting-event-${index}`"
|
|
93
|
+
class="player-item"
|
|
94
|
+
>
|
|
95
|
+
<span class="player-icon">
|
|
96
|
+
<!-- Icono de gol -->
|
|
97
|
+
<svg
|
|
98
|
+
width="12"
|
|
99
|
+
height="12"
|
|
100
|
+
viewBox="0 0 20 20"
|
|
101
|
+
fill="none"
|
|
102
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
103
|
+
>
|
|
104
|
+
<path
|
|
105
|
+
fill-rule="evenodd"
|
|
106
|
+
clip-rule="evenodd"
|
|
107
|
+
d="M10.0268 2.83594C6.09038 2.83594 2.89844 6.01986 2.89844 9.94705C2.89844 13.8742 6.09038 17.0582 10.0268 17.0582C13.9632 17.0582 17.1551 13.8742 17.1551 9.94705C17.1551 6.01986 13.9632 2.83594 10.0268 2.83594V2.83594Z"
|
|
108
|
+
stroke="white"
|
|
109
|
+
stroke-width="1.36665"
|
|
110
|
+
stroke-linecap="round"
|
|
111
|
+
stroke-linejoin="round"
|
|
112
|
+
/>
|
|
113
|
+
<path
|
|
114
|
+
fill-rule="evenodd"
|
|
115
|
+
clip-rule="evenodd"
|
|
116
|
+
d="M8.0826 12.9597L6.87109 9.2304L10.0401 6.92578L13.2097 9.2304L11.9995 12.9597H8.0826Z"
|
|
117
|
+
stroke="white"
|
|
118
|
+
stroke-width="1.36665"
|
|
119
|
+
stroke-linecap="round"
|
|
120
|
+
stroke-linejoin="round"
|
|
121
|
+
/>
|
|
122
|
+
</svg>
|
|
123
|
+
</span>
|
|
124
|
+
<span class="player-name">
|
|
125
|
+
{{ extraerMinutosYNombre(event).minutos }} <span
|
|
126
|
+
v-if="extraerMinutosYNombre(event).nombre"
|
|
127
|
+
>
|
|
128
|
+
{{ extraerMinutosYNombre(event).nombre }}</span
|
|
129
|
+
>
|
|
130
|
+
</span>
|
|
131
|
+
</div>
|
|
132
|
+
<!-- Indicador de más eventos para equipo visitante -->
|
|
133
|
+
<div v-if="hasMoreVisitingEvents" class="more-events-indicator">
|
|
134
|
+
<span class="more-events-text">...</span>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<script setup>
|
|
143
|
+
import { formatDate } from '../../utils/dateUtils.js'
|
|
144
|
+
import { computed } from 'vue'
|
|
145
|
+
|
|
146
|
+
function traducirJornada(jornada) {
|
|
147
|
+
if (!jornada) return ''
|
|
148
|
+
return jornada
|
|
149
|
+
.replace('Matchday', 'J')
|
|
150
|
+
.replace('de Final', '')
|
|
151
|
+
.replace('Playoffs 1', 'CFI')
|
|
152
|
+
.replace('Playoffs 2', 'CFV')
|
|
153
|
+
.replace('Playoffs 3', 'SI')
|
|
154
|
+
.replace('Playoffs 4', 'SV')
|
|
155
|
+
.replace('Playoffs 5', 'FI')
|
|
156
|
+
.replace('Playoffs 6', 'FV')
|
|
157
|
+
}
|
|
158
|
+
// Aquí puedes agregar props si quieres que los nombres de equipos y jornada sean dinámicos
|
|
159
|
+
const props = defineProps({
|
|
160
|
+
report: {
|
|
161
|
+
type: Object,
|
|
162
|
+
default: () => ({}),
|
|
163
|
+
},
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
// Debug: ver qué datos llegan
|
|
167
|
+
console.log('Props report: ', props.report)
|
|
168
|
+
console.log('Game minutes: ', props.report?.game?.report_minutes)
|
|
169
|
+
|
|
170
|
+
// Función para obtener todos los eventos del equipo local limitados a 5
|
|
171
|
+
const homeEvents = computed(() => {
|
|
172
|
+
// Ahora los eventos ya vienen en el formato correcto, solo mostrar los primeros 5
|
|
173
|
+
return (props.report?.game?.report_minutes?.home_goals_minutes || []).slice(0, 5)
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
// Función para obtener todos los eventos del equipo visitante limitados a 5
|
|
177
|
+
const visitingEvents = computed(() => {
|
|
178
|
+
// Ahora los eventos ya vienen en el formato correcto, solo mostrar los primeros 5
|
|
179
|
+
return (props.report?.game?.report_minutes?.visiting_goals_minutes || []).slice(0, 5)
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
// Función para extraer minutos y nombre para el visitante
|
|
183
|
+
function extraerMinutosYNombre(evento) {
|
|
184
|
+
// Buscar todos los patrones de minutos (ej: 62', 90 + 4')
|
|
185
|
+
const minutos = Array.from(evento.matchAll(/\d+\s*\+*\s*\d*'/g))
|
|
186
|
+
.map((m) => m[0])
|
|
187
|
+
.join(', ')
|
|
188
|
+
// El nombre es lo que queda antes del primer minuto
|
|
189
|
+
const nombreMatch = evento.match(/^(.*?)\s*\d+'/)
|
|
190
|
+
const nombre = nombreMatch ? ' ' + nombreMatch[1].trim() : ''
|
|
191
|
+
return { minutos, nombre }
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Funciones computadas para verificar si hay más de 5 eventos
|
|
195
|
+
const hasMoreHomeEvents = computed(() => {
|
|
196
|
+
const totalEvents = props.report?.game?.report_minutes?.home_goals_minutes?.length || 0
|
|
197
|
+
return totalEvents > 5
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
const hasMoreVisitingEvents = computed(() => {
|
|
201
|
+
const totalEvents = props.report?.game?.report_minutes?.visiting_goals_minutes?.length || 0
|
|
202
|
+
return totalEvents > 5
|
|
203
|
+
})
|
|
204
|
+
</script>
|
|
205
|
+
|
|
206
|
+
<style scoped>
|
|
207
|
+
.prematch-bg {
|
|
208
|
+
width: 100%;
|
|
209
|
+
height: 222px;
|
|
210
|
+
/* height: 100vh; */
|
|
211
|
+
background: url('https://golstatsimages.blob.core.windows.net/reports-images/background-postmatch-template-01.jpg');
|
|
212
|
+
background-size: cover;
|
|
213
|
+
background-repeat: no-repeat;
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
justify-content: center;
|
|
217
|
+
align-items: center;
|
|
218
|
+
position: relative;
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.background-shields {
|
|
223
|
+
position: absolute;
|
|
224
|
+
top: 0;
|
|
225
|
+
left: 0;
|
|
226
|
+
width: 100%;
|
|
227
|
+
height: 100%;
|
|
228
|
+
pointer-events: none;
|
|
229
|
+
z-index: 1;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.shield-left {
|
|
233
|
+
position: absolute;
|
|
234
|
+
left: -80px;
|
|
235
|
+
top: 50%;
|
|
236
|
+
transform: translateY(-50%);
|
|
237
|
+
opacity: 0.09;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.shield-left img {
|
|
241
|
+
width: 170px;
|
|
242
|
+
height: 170px;
|
|
243
|
+
object-fit: contain;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.shield-right {
|
|
247
|
+
position: absolute;
|
|
248
|
+
right: -80px;
|
|
249
|
+
top: 50%;
|
|
250
|
+
transform: translateY(-50%);
|
|
251
|
+
opacity: 0.09;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.shield-right img {
|
|
255
|
+
width: 170px;
|
|
256
|
+
height: 170px;
|
|
257
|
+
object-fit: contain;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.header {
|
|
261
|
+
padding: 24px 32px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.logo {
|
|
265
|
+
height: 40px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.main-content {
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: column;
|
|
271
|
+
align-items: center;
|
|
272
|
+
/* Elimina el margin-top para centrar verticalmente */
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.title {
|
|
276
|
+
font-size: 0.8rem;
|
|
277
|
+
color: #fff;
|
|
278
|
+
font-family: Poppins-Regular;
|
|
279
|
+
position: relative;
|
|
280
|
+
z-index: 2;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.highlight {
|
|
284
|
+
font-family: Poppins-Bold;
|
|
285
|
+
color: #fff;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.subtitle {
|
|
289
|
+
font-family: Poppins-Regular;
|
|
290
|
+
margin-top: -8px;
|
|
291
|
+
font-size: 1.1rem;
|
|
292
|
+
color: #e0e0e0;
|
|
293
|
+
position: relative;
|
|
294
|
+
z-index: 2;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.jornada {
|
|
298
|
+
font-family: Poppins-Medium;
|
|
299
|
+
color: #fff;
|
|
300
|
+
font-size: 0.4rem;
|
|
301
|
+
line-height: 2.2;
|
|
302
|
+
letter-spacing: 0.2px;
|
|
303
|
+
opacity: 0.8;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.fecha {
|
|
307
|
+
font-family: Poppins-Regular;
|
|
308
|
+
color: #e0e0e0;
|
|
309
|
+
opacity: 0.8;
|
|
310
|
+
line-height: 2.2;
|
|
311
|
+
letter-spacing: 0.2px;
|
|
312
|
+
font-size: 0.4rem;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.teams-row {
|
|
316
|
+
display: flex;
|
|
317
|
+
justify-content: center;
|
|
318
|
+
align-items: flex-start;
|
|
319
|
+
gap: 15px;
|
|
320
|
+
margin-top: 10px;
|
|
321
|
+
position: relative;
|
|
322
|
+
z-index: 2;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.team {
|
|
326
|
+
display: flex;
|
|
327
|
+
flex-direction: column;
|
|
328
|
+
justify-content: flex-start;
|
|
329
|
+
align-items: center;
|
|
330
|
+
gap: 8px;
|
|
331
|
+
min-height: 120px;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.team-header {
|
|
335
|
+
display: flex;
|
|
336
|
+
align-items: center;
|
|
337
|
+
gap: 8px;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.divider-line {
|
|
341
|
+
display: flex;
|
|
342
|
+
justify-content: center;
|
|
343
|
+
align-items: flex-start;
|
|
344
|
+
height: 60px;
|
|
345
|
+
margin-top: 0;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.dotted-line {
|
|
349
|
+
width: 2px;
|
|
350
|
+
height: 60px;
|
|
351
|
+
background: repeating-linear-gradient(
|
|
352
|
+
to bottom,
|
|
353
|
+
#fff 0,
|
|
354
|
+
#fff 4px,
|
|
355
|
+
transparent 4px,
|
|
356
|
+
transparent 8px
|
|
357
|
+
);
|
|
358
|
+
opacity: 0.5;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.escudo-svg {
|
|
362
|
+
display: flex;
|
|
363
|
+
justify-content: center;
|
|
364
|
+
align-items: center;
|
|
365
|
+
width: 55px;
|
|
366
|
+
height: 55px;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.players-list {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-direction: column;
|
|
372
|
+
gap: 2px;
|
|
373
|
+
align-items: center;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/* Alinear eventos del equipo local hacia la derecha */
|
|
377
|
+
.team-local .players-list {
|
|
378
|
+
align-items: flex-end;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/* Alinear eventos del equipo visitante hacia la izquierda */
|
|
382
|
+
.team-visitor .players-list {
|
|
383
|
+
align-items: flex-start;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.player-item {
|
|
387
|
+
display: flex;
|
|
388
|
+
align-items: center;
|
|
389
|
+
gap: 4px;
|
|
390
|
+
font-size: 0.35rem;
|
|
391
|
+
color: #fff;
|
|
392
|
+
font-family: Poppins-Regular;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.player-name {
|
|
396
|
+
font-size: 0.35rem;
|
|
397
|
+
color: #fff;
|
|
398
|
+
font-family: Poppins-Regular;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.player-time {
|
|
402
|
+
font-size: 0.35rem;
|
|
403
|
+
color: #fff;
|
|
404
|
+
font-family: Poppins-Regular;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.player-icon svg {
|
|
408
|
+
width: 8px;
|
|
409
|
+
height: 8px;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.score {
|
|
413
|
+
font-size: 2.5rem;
|
|
414
|
+
font-family: BebasNeue-Bold;
|
|
415
|
+
font-weight: 700;
|
|
416
|
+
color: #fff;
|
|
417
|
+
margin: 0;
|
|
418
|
+
letter-spacing: 1px;
|
|
419
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/* Estilos específicos para el equipo visitante */
|
|
423
|
+
.team-visitor .player-item {
|
|
424
|
+
/* El orden ya está correcto en el HTML: icono-minuto-nombre */
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* Estilos para el indicador de más eventos */
|
|
428
|
+
.more-events-indicator {
|
|
429
|
+
display: flex;
|
|
430
|
+
justify-content: center;
|
|
431
|
+
align-items: center;
|
|
432
|
+
margin-top: 2px;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.more-events-text {
|
|
436
|
+
font-size: 0.4rem;
|
|
437
|
+
color: #fff;
|
|
438
|
+
font-family: Poppins-Regular;
|
|
439
|
+
opacity: 0.8;
|
|
440
|
+
}
|
|
441
|
+
</style>
|