@golstats/gsc-reports 1.0.52 → 1.0.53

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