@golstats/gsc-reports 1.0.0
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 -0
- package/dist/FilterConditions-55d68355-C5NIJbY6-xW04mYhu-DRN4eEO4.js +191 -0
- package/dist/FilterField-59a73e38-DO8nYLqs-Da7H_Fvj-ZuLwDGOM.js +21 -0
- package/dist/FilterSubcategories-a9b32cc9-DlkHni1L-BXid_sIn-BvoU3OqZ.js +42 -0
- package/dist/css/fonts.css +83 -0
- package/dist/fonts/BebasNeue-Bold.otf +0 -0
- package/dist/fonts/BebasNeue-Bold.ttf +0 -0
- package/dist/fonts/BebasNeue-Bold.woff2 +0 -0
- package/dist/fonts/BebasNeue-Book.otf +0 -0
- package/dist/fonts/BebasNeue-Book.ttf +0 -0
- package/dist/fonts/BebasNeue-Book.woff2 +0 -0
- package/dist/fonts/BebasNeue-Light.otf +0 -0
- package/dist/fonts/BebasNeue-Light.ttf +0 -0
- package/dist/fonts/BebasNeue-Light.woff2 +0 -0
- package/dist/fonts/BebasNeue-Regular.otf +0 -0
- package/dist/fonts/BebasNeue-Regular.ttf +0 -0
- package/dist/fonts/BebasNeue-Regular.woff2 +0 -0
- package/dist/fonts/BebasNeue-Thin.otf +0 -0
- package/dist/fonts/BebasNeue-Thin.ttf +0 -0
- package/dist/fonts/BebasNeue-Thin.woff2 +0 -0
- package/dist/fonts/Montserrat-Black.otf +0 -0
- package/dist/fonts/Montserrat-BlackItalic.otf +0 -0
- package/dist/fonts/Montserrat-Bold.otf +0 -0
- package/dist/fonts/Montserrat-BoldItalic.otf +0 -0
- package/dist/fonts/Montserrat-ExtraBold.otf +0 -0
- package/dist/fonts/Montserrat-ExtraBoldItalic.otf +0 -0
- package/dist/fonts/Montserrat-ExtraLight.otf +0 -0
- package/dist/fonts/Montserrat-ExtraLightItalic.otf +0 -0
- package/dist/fonts/Montserrat-Italic.otf +0 -0
- package/dist/fonts/Montserrat-Light.otf +0 -0
- package/dist/fonts/Montserrat-LightItalic.otf +0 -0
- package/dist/fonts/Montserrat-Medium.otf +0 -0
- package/dist/fonts/Montserrat-MediumItalic.otf +0 -0
- package/dist/fonts/Montserrat-Regular.otf +0 -0
- package/dist/fonts/Montserrat-SemiBold.otf +0 -0
- package/dist/fonts/Montserrat-SemiBoldItalic.otf +0 -0
- package/dist/fonts/Montserrat-Thin.otf +0 -0
- package/dist/fonts/Montserrat-ThinItalic.otf +0 -0
- package/dist/fonts/Oswald-Bold.ttf +0 -0
- package/dist/fonts/Oswald-ExtraLight.ttf +0 -0
- package/dist/fonts/Oswald-Light.ttf +0 -0
- package/dist/fonts/Oswald-Medium.ttf +0 -0
- package/dist/fonts/Oswald-Regular.ttf +0 -0
- package/dist/fonts/Oswald-SemiBold.ttf +0 -0
- package/dist/fonts/Poppins-Black.otf +0 -0
- package/dist/fonts/Poppins-BlackItalic.otf +0 -0
- package/dist/fonts/Poppins-Bold.otf +0 -0
- package/dist/fonts/Poppins-BoldItalic.otf +0 -0
- package/dist/fonts/Poppins-ExtraBold.otf +0 -0
- package/dist/fonts/Poppins-ExtraBoldItalic.otf +0 -0
- package/dist/fonts/Poppins-ExtraLight.otf +0 -0
- package/dist/fonts/Poppins-ExtraLightItalic.otf +0 -0
- package/dist/fonts/Poppins-Italic.otf +0 -0
- package/dist/fonts/Poppins-Light.otf +0 -0
- package/dist/fonts/Poppins-LightItalic.otf +0 -0
- package/dist/fonts/Poppins-Medium.otf +0 -0
- package/dist/fonts/Poppins-MediumItalic.otf +0 -0
- package/dist/fonts/Poppins-Regular.otf +0 -0
- package/dist/fonts/Poppins-SemiBold.otf +0 -0
- package/dist/fonts/Poppins-SemiBoldItalic.otf +0 -0
- package/dist/fonts/Poppins-Thin.otf +0 -0
- package/dist/fonts/Poppins-ThinItalic.otf +0 -0
- package/dist/gsc-reports.css +1 -0
- package/dist/gsc-reports.es.js +4 -0
- package/dist/gsc-reports.umd.js +4079 -0
- package/dist/icons/icn-close.svg +5 -0
- package/dist/icons/icn-delete-delete.svg +3 -0
- package/dist/icons/icn-delete.svg +3 -0
- package/dist/icons/icn-download.svg +4 -0
- package/dist/icons/icn-duplicate-white.svg +11 -0
- package/dist/icons/icn-duplicate.svg +11 -0
- package/dist/icons/icn-edit.svg +11 -0
- package/dist/icons/icn-editar-withe.svg +3 -0
- package/dist/icons/icn-rename-white.svg +3 -0
- package/dist/icons/icn-rename.svg +3 -0
- package/dist/icons/icn-report-white.svg +11 -0
- package/dist/icons/icn-report.svg +11 -0
- package/dist/images/background-postmatch-template-01.jpg +0 -0
- package/dist/images/background-postmatch-template-02.jpg +0 -0
- package/dist/images/canchaRPH.svg +30 -0
- package/dist/index-B1R4W2EC.js +128151 -0
- package/dist/reports/background-postmatch-template-01@2x.jpg +0 -0
- package/dist/reports/background-postmatch-template-02@2x.jpg +0 -0
- package/dist/reports/thumbnail-portada-01@2x.png +0 -0
- package/dist/reports/thumbnail-portada-02@2x.png +0 -0
- package/dist/reports/thumbnail-portada-03@2x.png +0 -0
- package/dist/reports/thumbnail-portada-04@2x.png +0 -0
- package/dist/reports/thumbnail-portada-prmatch-01@2x.png +0 -0
- package/dist/reports/thumbnail-portada-prmatch-02@2x.png +0 -0
- package/dist/reports/thumbnail-portada-prmatch-03@2x.png +0 -0
- package/dist/reports/thumbnail-portada-prmatch-04@2x.png +0 -0
- package/dist/thumb1.png +0 -0
- package/dist/thumbnail-portada-01.jpg +0 -0
- package/dist/thumbnail-portada-02.jpg +0 -0
- package/dist/thumbnail-portada-03.jpg +0 -0
- package/dist/thumbnail-portada-04.jpg +0 -0
- package/dist/thumbnail-portada-prmatch-01.jpg +0 -0
- package/dist/thumbnail-portada-prmatch-02.jpg +0 -0
- package/dist/thumbnail-portada-prmatch-03.jpg +0 -0
- package/dist/thumbnail-portada-prmatch-04.jpg +0 -0
- package/package.json +70 -0
- package/src/App.vue +28 -0
- package/src/components/ReportsSection.vue +764 -0
- package/src/components/TemplatesSection.vue +911 -0
- package/src/components/elementsTemplates/ModalCreateTemplate.vue +407 -0
- package/src/components/elementsTemplates/ModalDeleteReport.vue +231 -0
- package/src/components/elementsTemplates/ModalDeleteTemplate.vue +234 -0
- package/src/components/elementsTemplates/ModalGenerarReporte.vue +1151 -0
- package/src/components/elementsTemplates/ModalRenameReporte.vue +315 -0
- package/src/components/elementsTemplates/ModalRenameTemplate.vue +320 -0
- package/src/components/elementsTemplates/ModalSoloEscritorio.vue +83 -0
- package/src/components/elementsTemplates/ModalduplicateTemplate.vue +283 -0
- package/src/components/elementsTemplates/ReportItem.vue +458 -0
- package/src/components/elementsTemplates/TemplateItem.vue +360 -0
- package/src/components/elementsTemplates/TooltipReportOptions.vue +85 -0
- package/src/components/elementsTemplates/TooltipTemplateOptions.vue +141 -0
- package/src/components/filters.vue +935 -0
- package/src/components/gsc-reports.vue +452 -0
- package/src/components/template-report-maker/CoverPage.vue +636 -0
- package/src/components/template-report-maker/CoverSelector.vue +165 -0
- package/src/components/template-report-maker/ReportAndTemplateMaker.vue +675 -0
- package/src/components/template-report-maker/ReportView.vue +66 -0
- package/src/components/template-report-maker/TemplateReportPage.vue +398 -0
- package/src/components/thumbnails-reports/AnalisisPostMatchType1.vue +741 -0
- package/src/components/thumbnails-reports/AnalisisPostMatchType2.vue +743 -0
- package/src/components/thumbnails-reports/AnalisisPostMatchType3.vue +463 -0
- package/src/components/thumbnails-reports/AnalisisPostMatchType4.vue +462 -0
- package/src/components/thumbnails-reports/AnalisisPrematchType1.vue +164 -0
- package/src/components/thumbnails-reports/AnalisisPrematchType2.vue +163 -0
- package/src/components/thumbnails-reports/AnalisisPrematchType3.vue +173 -0
- package/src/components/thumbnails-reports/AnalisisPrematchType4.vue +173 -0
- package/src/index.js +4 -0
- package/src/main.js +4 -0
- package/src/types.d.ts +45 -0
- package/src/utils/dateUtils.js +52 -0
|
@@ -0,0 +1,1151 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="modal-overlay" @click.self="$emit('close')">
|
|
3
|
+
<div class="modal-content">
|
|
4
|
+
<button class="close-btn" @click="$emit('close')">
|
|
5
|
+
<img src="/icons/icn-close.svg" alt="Cerrar" />
|
|
6
|
+
</button>
|
|
7
|
+
<div class="modal-header">
|
|
8
|
+
<img src="/icons/icn-report-white.svg" class="icon-title" alt="icono reporte blanco" />
|
|
9
|
+
<span class="modal-title">Generar reporte</span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="header-separator"></div>
|
|
12
|
+
<div class="modal-body">
|
|
13
|
+
<!-- Mostrar mensaje de error cuando ya existe el reporte -->
|
|
14
|
+
<div v-if="showError409" class="error-message-container">
|
|
15
|
+
<p class="error-text">
|
|
16
|
+
Este reporte ya fue generado previamente<br />
|
|
17
|
+
con este template para el partido seleccionado.
|
|
18
|
+
</p>
|
|
19
|
+
<button class="accept-btn" @click="closeModal">Aceptar</button>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- Mostrar selectores solo cuando no hay error 409 -->
|
|
23
|
+
<div v-else>
|
|
24
|
+
<div class="modal-group">
|
|
25
|
+
<label>1. Elige la liga</label>
|
|
26
|
+
<div
|
|
27
|
+
class="select-wrapper custom-dropdown liga-select"
|
|
28
|
+
tabindex="0"
|
|
29
|
+
@click="showDropdownLigas = !showDropdownLigas"
|
|
30
|
+
@blur="showDropdownLigas = false"
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
class="custom-select-display"
|
|
34
|
+
:class="{ disabled: loading || ligas.length === 0 }"
|
|
35
|
+
>
|
|
36
|
+
<template v-if="loading">
|
|
37
|
+
<span class="placeholder"
|
|
38
|
+
><span class="loading-spinner select-spinner"></span>Cargando ligas...</span
|
|
39
|
+
>
|
|
40
|
+
</template>
|
|
41
|
+
<template v-else>
|
|
42
|
+
<span v-if="!selectedLiga" class="placeholder">Selecciona la liga</span>
|
|
43
|
+
<span v-else>{{ selectedLiga.name }}</span>
|
|
44
|
+
</template>
|
|
45
|
+
<span class="select-chevron" :class="{ open: showDropdownLigas }">
|
|
46
|
+
<svg
|
|
47
|
+
width="16"
|
|
48
|
+
height="16"
|
|
49
|
+
viewBox="0 0 16 16"
|
|
50
|
+
fill="none"
|
|
51
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
+
>
|
|
53
|
+
<path
|
|
54
|
+
d="M5 7L8 10L11 7"
|
|
55
|
+
stroke="white"
|
|
56
|
+
stroke-width="2"
|
|
57
|
+
stroke-linecap="round"
|
|
58
|
+
stroke-linejoin="round"
|
|
59
|
+
/>
|
|
60
|
+
</svg>
|
|
61
|
+
</span>
|
|
62
|
+
</div>
|
|
63
|
+
<div v-if="showDropdownLigas && ligas.length > 0" class="custom-select-dropdown">
|
|
64
|
+
<div
|
|
65
|
+
v-for="liga in ligas"
|
|
66
|
+
:key="liga.name"
|
|
67
|
+
class="custom-select-option"
|
|
68
|
+
@mousedown.prevent="selectLiga(liga)"
|
|
69
|
+
>
|
|
70
|
+
{{ liga.name }}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="modal-row">
|
|
76
|
+
<div class="modal-group">
|
|
77
|
+
<label>2. Elige el torneo</label>
|
|
78
|
+
<div
|
|
79
|
+
class="select-wrapper custom-dropdown torneo-select"
|
|
80
|
+
tabindex="0"
|
|
81
|
+
@click="showDropdownTorneos = !showDropdownTorneos"
|
|
82
|
+
@blur="showDropdownTorneos = false"
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
class="custom-select-display"
|
|
86
|
+
:class="{ disabled: !selectedLiga || torneos.length === 0 || loading }"
|
|
87
|
+
>
|
|
88
|
+
<template v-if="loading">
|
|
89
|
+
<span class="placeholder"
|
|
90
|
+
><span class="loading-spinner select-spinner"></span>Cargando torneos...</span
|
|
91
|
+
>
|
|
92
|
+
</template>
|
|
93
|
+
<template v-else>
|
|
94
|
+
<span v-if="!selectedTorneo" class="placeholder">Elige el torneo</span>
|
|
95
|
+
<span v-else>{{ selectedTorneo.name }}</span>
|
|
96
|
+
</template>
|
|
97
|
+
<span class="select-chevron" :class="{ open: showDropdownTorneos }">
|
|
98
|
+
<svg
|
|
99
|
+
width="16"
|
|
100
|
+
height="16"
|
|
101
|
+
viewBox="0 0 16 16"
|
|
102
|
+
fill="none"
|
|
103
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
104
|
+
>
|
|
105
|
+
<path
|
|
106
|
+
d="M5 7L8 10L11 7"
|
|
107
|
+
stroke="white"
|
|
108
|
+
stroke-width="2"
|
|
109
|
+
stroke-linecap="round"
|
|
110
|
+
stroke-linejoin="round"
|
|
111
|
+
/>
|
|
112
|
+
</svg>
|
|
113
|
+
</span>
|
|
114
|
+
</div>
|
|
115
|
+
<div
|
|
116
|
+
v-if="showDropdownTorneos && torneos.length > 0 && selectedLiga"
|
|
117
|
+
class="custom-select-dropdown"
|
|
118
|
+
>
|
|
119
|
+
<div
|
|
120
|
+
v-for="season in torneos"
|
|
121
|
+
:key="season.id"
|
|
122
|
+
class="custom-select-option"
|
|
123
|
+
@mousedown.prevent="selectTorneo(season)"
|
|
124
|
+
>
|
|
125
|
+
{{ season.name }}
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<div class="modal-group">
|
|
131
|
+
<label>3. Elige la jornada</label>
|
|
132
|
+
<div
|
|
133
|
+
class="select-wrapper custom-dropdown jornada-select"
|
|
134
|
+
tabindex="0"
|
|
135
|
+
@click="showDropdownJornadas = !showDropdownJornadas"
|
|
136
|
+
@blur="showDropdownJornadas = false"
|
|
137
|
+
>
|
|
138
|
+
<div
|
|
139
|
+
class="custom-select-display"
|
|
140
|
+
:class="{ disabled: !selectedTorneo || jornadas.length === 0 || loadingJornadas }"
|
|
141
|
+
>
|
|
142
|
+
<template v-if="loadingJornadas">
|
|
143
|
+
<span class="placeholder"
|
|
144
|
+
><span class="loading-spinner select-spinner"></span>Cargando
|
|
145
|
+
jornadas...</span
|
|
146
|
+
>
|
|
147
|
+
</template>
|
|
148
|
+
<template v-else>
|
|
149
|
+
<span v-if="!selectedJornada" class="placeholder">Elige la jornada</span>
|
|
150
|
+
<span v-else>{{ selectedJornada.name }}</span>
|
|
151
|
+
</template>
|
|
152
|
+
<span class="select-chevron" :class="{ open: showDropdownJornadas }">
|
|
153
|
+
<svg
|
|
154
|
+
width="16"
|
|
155
|
+
height="16"
|
|
156
|
+
viewBox="0 0 16 16"
|
|
157
|
+
fill="none"
|
|
158
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
159
|
+
>
|
|
160
|
+
<path
|
|
161
|
+
d="M5 7L8 10L11 7"
|
|
162
|
+
stroke="white"
|
|
163
|
+
stroke-width="2"
|
|
164
|
+
stroke-linecap="round"
|
|
165
|
+
stroke-linejoin="round"
|
|
166
|
+
/>
|
|
167
|
+
</svg>
|
|
168
|
+
</span>
|
|
169
|
+
</div>
|
|
170
|
+
<div
|
|
171
|
+
v-if="showDropdownJornadas && jornadas.length > 0 && selectedTorneo"
|
|
172
|
+
class="custom-select-dropdown"
|
|
173
|
+
>
|
|
174
|
+
<div
|
|
175
|
+
v-for="jornada in jornadas"
|
|
176
|
+
:key="jornada.id"
|
|
177
|
+
class="custom-select-option"
|
|
178
|
+
@mousedown.prevent="selectJornada(jornada)"
|
|
179
|
+
>
|
|
180
|
+
{{ jornada.name }}
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="modal-group">
|
|
187
|
+
<label>4. Elige el partido</label>
|
|
188
|
+
<div
|
|
189
|
+
class="select-wrapper partido-select"
|
|
190
|
+
tabindex="0"
|
|
191
|
+
@click="showDropdownPartidos = !showDropdownPartidos"
|
|
192
|
+
@blur="showDropdownPartidos = false"
|
|
193
|
+
>
|
|
194
|
+
<div
|
|
195
|
+
class="custom-select-display"
|
|
196
|
+
:class="{ disabled: !selectedJornada || loadingPartidos }"
|
|
197
|
+
>
|
|
198
|
+
<template v-if="loadingPartidos">
|
|
199
|
+
<span class="placeholder"
|
|
200
|
+
><span class="loading-spinner select-spinner"></span>Cargando partidos...</span
|
|
201
|
+
>
|
|
202
|
+
</template>
|
|
203
|
+
<template v-else>
|
|
204
|
+
<span v-if="!selectedPartido" class="placeholder">Selecciona el partido</span>
|
|
205
|
+
<template v-else>
|
|
206
|
+
<img
|
|
207
|
+
v-if="selectedPartido.localLogo"
|
|
208
|
+
:src="selectedPartido.localLogo"
|
|
209
|
+
class="logo-equipo"
|
|
210
|
+
alt="local"
|
|
211
|
+
/>
|
|
212
|
+
<span>{{ selectedPartido.label }}</span>
|
|
213
|
+
<img
|
|
214
|
+
v-if="selectedPartido.visitanteLogo"
|
|
215
|
+
:src="selectedPartido.visitanteLogo"
|
|
216
|
+
class="logo-equipo"
|
|
217
|
+
alt="visitante"
|
|
218
|
+
/>
|
|
219
|
+
</template>
|
|
220
|
+
</template>
|
|
221
|
+
<span class="select-chevron" :class="{ open: showDropdownPartidos }">
|
|
222
|
+
<svg
|
|
223
|
+
width="16"
|
|
224
|
+
height="16"
|
|
225
|
+
viewBox="0 0 16 16"
|
|
226
|
+
fill="none"
|
|
227
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
228
|
+
>
|
|
229
|
+
<path
|
|
230
|
+
d="M5 7L8 10L11 7"
|
|
231
|
+
stroke="white"
|
|
232
|
+
stroke-width="2"
|
|
233
|
+
stroke-linecap="round"
|
|
234
|
+
stroke-linejoin="round"
|
|
235
|
+
/>
|
|
236
|
+
</svg>
|
|
237
|
+
</span>
|
|
238
|
+
</div>
|
|
239
|
+
<div
|
|
240
|
+
v-if="showDropdownPartidos && !loadingPartidos && selectedJornada"
|
|
241
|
+
class="custom-select-dropdown"
|
|
242
|
+
>
|
|
243
|
+
<div
|
|
244
|
+
v-for="partido in partidos"
|
|
245
|
+
:key="partido.label"
|
|
246
|
+
class="custom-select-option"
|
|
247
|
+
@mousedown.prevent="selectPartido(partido)"
|
|
248
|
+
>
|
|
249
|
+
<img :src="partido.localLogo" class="logo-equipo" alt="local" />
|
|
250
|
+
<span>{{ partido.label }}</span>
|
|
251
|
+
<img :src="partido.visitanteLogo" class="logo-equipo" alt="visitante" />
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="header-separator" v-if="!showError409"></div>
|
|
259
|
+
<div class="modal-footer" v-if="!showError409">
|
|
260
|
+
<button class="cancel-btn" @click="$emit('close')">Cancelar</button>
|
|
261
|
+
<button
|
|
262
|
+
class="next-btn"
|
|
263
|
+
:disabled="
|
|
264
|
+
!selectedLiga || !selectedTorneo || !selectedJornada || !selectedPartido || loading
|
|
265
|
+
"
|
|
266
|
+
@click="generarReporte"
|
|
267
|
+
>
|
|
268
|
+
<span v-if="loading" class="loading-spinner select-spinner"></span>
|
|
269
|
+
{{ loading ? 'Generando...' : 'Generar' }}
|
|
270
|
+
</button>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
</template>
|
|
275
|
+
|
|
276
|
+
<script setup>
|
|
277
|
+
import { ref, defineEmits, onMounted } from 'vue'
|
|
278
|
+
import axios from 'axios'
|
|
279
|
+
|
|
280
|
+
const props = defineProps({
|
|
281
|
+
userId: {
|
|
282
|
+
type: String,
|
|
283
|
+
required: true,
|
|
284
|
+
},
|
|
285
|
+
token: {
|
|
286
|
+
type: String,
|
|
287
|
+
required: true,
|
|
288
|
+
},
|
|
289
|
+
templateId: {
|
|
290
|
+
type: String,
|
|
291
|
+
required: true,
|
|
292
|
+
},
|
|
293
|
+
templateType: {
|
|
294
|
+
type: String,
|
|
295
|
+
required: false,
|
|
296
|
+
},
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
const emit = defineEmits(['close', 'generar', 'switch-to-reports'])
|
|
300
|
+
|
|
301
|
+
const ligas = ref([]) // Aquí se guardan los torneos
|
|
302
|
+
const torneos = ref([]) // Aquí se guardan las seasons del torneo seleccionado
|
|
303
|
+
const jornadas = ref([])
|
|
304
|
+
const partidos = ref([])
|
|
305
|
+
|
|
306
|
+
const selectedLiga = ref('') // Aquí se guarda el torneo seleccionado
|
|
307
|
+
const selectedTorneo = ref('') // Aquí se guarda la season seleccionada
|
|
308
|
+
const selectedJornada = ref('')
|
|
309
|
+
const selectedPartido = ref(null)
|
|
310
|
+
|
|
311
|
+
const axiosInstance = axios.create({
|
|
312
|
+
headers: {
|
|
313
|
+
Authorization: props.token,
|
|
314
|
+
},
|
|
315
|
+
})
|
|
316
|
+
const showDropdownPartidos = ref(false)
|
|
317
|
+
const loading = ref(false)
|
|
318
|
+
const loadingPartidos = ref(false)
|
|
319
|
+
const loadingJornadas = ref(false)
|
|
320
|
+
const showError409 = ref(false) // Controla la visualización del mensaje de error 409
|
|
321
|
+
const torneosRaw = ref([]) // Aquí se guarda el response.data completo
|
|
322
|
+
const allPartidos = ref([]) // Guardar todos los partidos de la season seleccionada
|
|
323
|
+
|
|
324
|
+
// Reemplazar los selects de liga, torneo y jornada por dropdowns personalizados:
|
|
325
|
+
// Liga
|
|
326
|
+
const showDropdownLigas = ref(false)
|
|
327
|
+
const showDropdownTorneos = ref(false)
|
|
328
|
+
const showDropdownJornadas = ref(false)
|
|
329
|
+
|
|
330
|
+
function selectLiga(liga) {
|
|
331
|
+
selectedLiga.value = liga
|
|
332
|
+
showDropdownLigas.value = false
|
|
333
|
+
onLigaChange()
|
|
334
|
+
}
|
|
335
|
+
function selectTorneo(season) {
|
|
336
|
+
selectedTorneo.value = season
|
|
337
|
+
showDropdownTorneos.value = false
|
|
338
|
+
onTorneoChange()
|
|
339
|
+
}
|
|
340
|
+
function selectJornada(jornada) {
|
|
341
|
+
selectedJornada.value = jornada
|
|
342
|
+
showDropdownJornadas.value = false
|
|
343
|
+
onJornadaChange()
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Función para cargar los torneos desde el endpoint
|
|
347
|
+
async function cargarTorneos() {
|
|
348
|
+
try {
|
|
349
|
+
loading.value = true
|
|
350
|
+
const response = await axios.get(
|
|
351
|
+
'https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments',
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
if (response.data && Array.isArray(response.data)) {
|
|
355
|
+
torneosRaw.value = response.data
|
|
356
|
+
// Extraer los torneos (ligas) del response y ordenarlos por ID
|
|
357
|
+
ligas.value = response.data
|
|
358
|
+
.map((item) => item.tournament)
|
|
359
|
+
.sort((a, b) => {
|
|
360
|
+
// Si ambos tienen ID, ordenar por ID
|
|
361
|
+
if (a.order && b.order) {
|
|
362
|
+
return a.order - b.order
|
|
363
|
+
}
|
|
364
|
+
// Si solo uno tiene order, poner el que no tiene order al final
|
|
365
|
+
if (a.order && !b.order) {
|
|
366
|
+
return -1
|
|
367
|
+
}
|
|
368
|
+
if (!a.order && b.order) {
|
|
369
|
+
return 1
|
|
370
|
+
}
|
|
371
|
+
// Si ninguno tiene ID, mantener el orden original
|
|
372
|
+
return 0
|
|
373
|
+
})
|
|
374
|
+
// NO seleccionar automáticamente ninguna liga
|
|
375
|
+
selectedLiga.value = ''
|
|
376
|
+
torneos.value = []
|
|
377
|
+
selectedTorneo.value = ''
|
|
378
|
+
jornadas.value = []
|
|
379
|
+
selectedJornada.value = ''
|
|
380
|
+
partidos.value = []
|
|
381
|
+
selectedPartido.value = null
|
|
382
|
+
}
|
|
383
|
+
} catch (error) {
|
|
384
|
+
console.error('Error al cargar torneos:', error)
|
|
385
|
+
// Fallback con datos de ejemplo
|
|
386
|
+
ligas.value = [{ name: 'Concacaf Copa Oro' }, { name: 'Liga MX' }, { name: 'MLS' }]
|
|
387
|
+
torneos.value = []
|
|
388
|
+
jornadas.value = []
|
|
389
|
+
selectedLiga.value = ''
|
|
390
|
+
selectedTorneo.value = ''
|
|
391
|
+
selectedJornada.value = ''
|
|
392
|
+
selectedPartido.value = null
|
|
393
|
+
} finally {
|
|
394
|
+
loading.value = false
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// Al cambiar la liga/torneo, poblar seasons
|
|
399
|
+
function filtrarSeasonsPorTorneo(torneo) {
|
|
400
|
+
// Buscar el objeto en torneosRaw
|
|
401
|
+
const torneoObj = torneosRaw.value.find(
|
|
402
|
+
(item) => item.tournament && item.tournament.name === torneo.name,
|
|
403
|
+
)
|
|
404
|
+
if (torneoObj && Array.isArray(torneoObj.seasons)) {
|
|
405
|
+
torneos.value = torneoObj.seasons
|
|
406
|
+
selectedTorneo.value = ''
|
|
407
|
+
jornadas.value = []
|
|
408
|
+
selectedJornada.value = ''
|
|
409
|
+
partidos.value = []
|
|
410
|
+
selectedPartido.value = null
|
|
411
|
+
} else {
|
|
412
|
+
torneos.value = []
|
|
413
|
+
selectedTorneo.value = ''
|
|
414
|
+
jornadas.value = []
|
|
415
|
+
selectedJornada.value = ''
|
|
416
|
+
partidos.value = []
|
|
417
|
+
selectedPartido.value = null
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function onLigaChange() {
|
|
422
|
+
selectedTorneo.value = ''
|
|
423
|
+
selectedJornada.value = ''
|
|
424
|
+
selectedPartido.value = null
|
|
425
|
+
if (selectedLiga.value) {
|
|
426
|
+
filtrarSeasonsPorTorneo(selectedLiga.value)
|
|
427
|
+
} else {
|
|
428
|
+
torneos.value = []
|
|
429
|
+
jornadas.value = []
|
|
430
|
+
partidos.value = []
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
function onTorneoChange() {
|
|
435
|
+
loadingJornadas.value = true
|
|
436
|
+
selectedJornada.value = ''
|
|
437
|
+
selectedPartido.value = null
|
|
438
|
+
jornadas.value = []
|
|
439
|
+
partidos.value = []
|
|
440
|
+
if (selectedTorneo.value && selectedTorneo.value.id) {
|
|
441
|
+
// Obtener las related_seasons de la temporada seleccionada
|
|
442
|
+
const seasonIds = [selectedTorneo.value.id]
|
|
443
|
+
|
|
444
|
+
// Si la temporada seleccionada tiene related_seasons, agregarlas
|
|
445
|
+
if (
|
|
446
|
+
selectedTorneo.value.related_seasons &&
|
|
447
|
+
Array.isArray(selectedTorneo.value.related_seasons)
|
|
448
|
+
) {
|
|
449
|
+
const relatedIds = selectedTorneo.value.related_seasons
|
|
450
|
+
.map((season) => season.id)
|
|
451
|
+
.filter(Boolean)
|
|
452
|
+
seasonIds.push(...relatedIds)
|
|
453
|
+
console.log('relatedIds', relatedIds)
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
cargarPartidosPorSeason(seasonIds)
|
|
457
|
+
}
|
|
458
|
+
setTimeout(() => {
|
|
459
|
+
loadingJornadas.value = false
|
|
460
|
+
}, 400) // Simula carga
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
async function cargarPartidosPorSeason(seasonIds) {
|
|
464
|
+
loadingPartidos.value = true
|
|
465
|
+
try {
|
|
466
|
+
// Convertir el array de IDs a string separado por comas
|
|
467
|
+
const seasonsQueryString = Array.isArray(seasonIds) ? seasonIds.join('&seasons=') : seasonIds
|
|
468
|
+
|
|
469
|
+
const response = await axiosInstance.get(
|
|
470
|
+
`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?seasons=${seasonsQueryString}`,
|
|
471
|
+
)
|
|
472
|
+
console.log('response.data:: 2', response.data)
|
|
473
|
+
if (response.data.data && Array.isArray(response.data.data)) {
|
|
474
|
+
console.log('response.data:: 4ddd', response.data.data)
|
|
475
|
+
|
|
476
|
+
// Unir todos los arrays de partidos de todas las temporadas
|
|
477
|
+
const todosLosPartidos = response.data.data.reduce((acumulador, temporada) => {
|
|
478
|
+
if (temporada.games && Array.isArray(temporada.games)) {
|
|
479
|
+
return acumulador.concat(temporada.games)
|
|
480
|
+
}
|
|
481
|
+
return acumulador
|
|
482
|
+
}, [])
|
|
483
|
+
|
|
484
|
+
console.log('Todos los partidos unidos:', todosLosPartidos)
|
|
485
|
+
|
|
486
|
+
// Guardar todos los partidos
|
|
487
|
+
allPartidos.value = todosLosPartidos.map((partido) => ({
|
|
488
|
+
label:
|
|
489
|
+
partido.label ||
|
|
490
|
+
`${partido.home_team_acronym || 'Local'} vs ${partido.visiting_team_acronym || 'Visitante'}`,
|
|
491
|
+
localLogo:
|
|
492
|
+
'https://golstatsimages.blob.core.windows.net/teams-80/' + partido.home_team + '.png' ||
|
|
493
|
+
'',
|
|
494
|
+
visitanteLogo:
|
|
495
|
+
'https://golstatsimages.blob.core.windows.net/teams-80/' +
|
|
496
|
+
partido.visiting_team +
|
|
497
|
+
'.png' || '',
|
|
498
|
+
...partido,
|
|
499
|
+
}))
|
|
500
|
+
|
|
501
|
+
// Filtrar partidos según templateType para jornadas válidas
|
|
502
|
+
let partidosValidos = allPartidos.value
|
|
503
|
+
if (props.templateType === '2' || props.templateType === 2) {
|
|
504
|
+
partidosValidos = partidosValidos.filter((p) => p.game_status === 1)
|
|
505
|
+
} else if (props.templateType === '1' || props.templateType === 1) {
|
|
506
|
+
partidosValidos = partidosValidos.filter((p) => p.game_status === 4)
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// Extraer matchdays únicos SOLO de partidos válidos
|
|
510
|
+
const matchdaysUnicos = [
|
|
511
|
+
...new Set(partidosValidos.map((p) => p.matchday_id).filter(Boolean)),
|
|
512
|
+
]
|
|
513
|
+
|
|
514
|
+
// Llenar jornadas con los objetos matchday únicos y ordenar por matchday_id
|
|
515
|
+
jornadas.value = matchdaysUnicos
|
|
516
|
+
.map((id) => {
|
|
517
|
+
const partido = allPartidos.value.find((p) => p.matchday_id && p.matchday_id === id)
|
|
518
|
+
return {
|
|
519
|
+
id,
|
|
520
|
+
name: partido.matchday_name
|
|
521
|
+
.replace('Matchday', 'Jornada')
|
|
522
|
+
.replace('de Final', '')
|
|
523
|
+
.replace('Playoffs 1', 'Cuartos de Final Ida')
|
|
524
|
+
.replace('Playoffs 2', 'Cuartos de Final Vuelta')
|
|
525
|
+
.replace('Playoffs 3', 'Semifinal Ida')
|
|
526
|
+
.replace('Playoffs 4', 'Semifinal Vuelta')
|
|
527
|
+
.replace('Playoffs 5', 'Final Ida')
|
|
528
|
+
.replace('Playoffs 6', 'Final Vuelta'),
|
|
529
|
+
}
|
|
530
|
+
})
|
|
531
|
+
.sort((a, b) => {
|
|
532
|
+
// Solo ordenar por matchday_id si ambos nombres empiezan con "Jornada"
|
|
533
|
+
const aIsJornada = a.name.startsWith('Jornada')
|
|
534
|
+
const bIsJornada = b.name.startsWith('Jornada')
|
|
535
|
+
|
|
536
|
+
if (aIsJornada && bIsJornada) {
|
|
537
|
+
return a.id - b.id // Ordenar jornadas regulares por ID
|
|
538
|
+
} else if (aIsJornada && !bIsJornada) {
|
|
539
|
+
return -1 // Las jornadas regulares van primero
|
|
540
|
+
} else if (!aIsJornada && bIsJornada) {
|
|
541
|
+
return 1 // Las jornadas regulares van primero
|
|
542
|
+
} else {
|
|
543
|
+
return 0 // Mantener orden original para playoffs/finales
|
|
544
|
+
}
|
|
545
|
+
})
|
|
546
|
+
console.log('jornadas: ', jornadas)
|
|
547
|
+
// NO seleccionar automáticamente ninguna jornada
|
|
548
|
+
selectedJornada.value = ''
|
|
549
|
+
partidos.value = []
|
|
550
|
+
selectedPartido.value = null
|
|
551
|
+
} else {
|
|
552
|
+
allPartidos.value = []
|
|
553
|
+
jornadas.value = []
|
|
554
|
+
selectedJornada.value = ''
|
|
555
|
+
partidos.value = []
|
|
556
|
+
selectedPartido.value = null
|
|
557
|
+
}
|
|
558
|
+
} catch (error) {
|
|
559
|
+
console.error('Error al cargar partidos:', error)
|
|
560
|
+
allPartidos.value = []
|
|
561
|
+
jornadas.value = []
|
|
562
|
+
selectedJornada.value = ''
|
|
563
|
+
partidos.value = []
|
|
564
|
+
selectedPartido.value = null
|
|
565
|
+
} finally {
|
|
566
|
+
loadingPartidos.value = false
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
function onJornadaChange() {
|
|
571
|
+
selectedPartido.value = null
|
|
572
|
+
partidos.value = []
|
|
573
|
+
if (selectedJornada.value && selectedJornada.value.id) {
|
|
574
|
+
filtrarPartidosPorJornada(selectedJornada.value)
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
function filtrarPartidosPorJornada(jornada) {
|
|
579
|
+
if (!jornada || !jornada.id) {
|
|
580
|
+
partidos.value = []
|
|
581
|
+
return
|
|
582
|
+
}
|
|
583
|
+
let partidosFiltrados = allPartidos.value.filter((p) => p.matchday_id === jornada.id)
|
|
584
|
+
if (props.templateType === '2' || props.templateType === 2) {
|
|
585
|
+
partidosFiltrados = partidosFiltrados.filter((p) => p.game_status === 1)
|
|
586
|
+
} else if (props.templateType === '1' || props.templateType === 1) {
|
|
587
|
+
partidosFiltrados = partidosFiltrados.filter((p) => p.game_status === 4)
|
|
588
|
+
}
|
|
589
|
+
partidos.value = partidosFiltrados
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
async function generarReporte() {
|
|
593
|
+
try {
|
|
594
|
+
// Mostrar loading
|
|
595
|
+
loading.value = true
|
|
596
|
+
|
|
597
|
+
// Buscar el nombre de la temporada usando el season_id del partido seleccionado
|
|
598
|
+
let seasonName = ''
|
|
599
|
+
if (selectedTorneo.value && selectedTorneo.value.name) {
|
|
600
|
+
seasonName = selectedTorneo.value.name
|
|
601
|
+
}
|
|
602
|
+
// Construir el payload
|
|
603
|
+
const payload = {
|
|
604
|
+
template_id: props.templateId,
|
|
605
|
+
user_id: parseInt(props.userId),
|
|
606
|
+
tournament_id: selectedLiga.value.id || 1,
|
|
607
|
+
tournament_name: selectedLiga.value.name,
|
|
608
|
+
season_id: selectedPartido.value.season_id,
|
|
609
|
+
season_name: seasonName, // Ahora se obtiene correctamente el nombre de la temporada
|
|
610
|
+
game_id: selectedPartido.value.id || selectedPartido.value.game_id,
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// Hacer la llamada POST al endpoint
|
|
614
|
+
const response = await axios.post(
|
|
615
|
+
`https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/reports`,
|
|
616
|
+
payload,
|
|
617
|
+
{
|
|
618
|
+
headers: {
|
|
619
|
+
Authorization: props.token,
|
|
620
|
+
'Content-Type': 'application/json',
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
)
|
|
624
|
+
|
|
625
|
+
console.log('Reporte generado exitosamente:', response.data)
|
|
626
|
+
|
|
627
|
+
// Emitir evento con los datos del reporte generado
|
|
628
|
+
emit('generar', {
|
|
629
|
+
liga: selectedLiga.value,
|
|
630
|
+
torneo: selectedTorneo.value,
|
|
631
|
+
jornada: selectedJornada.value,
|
|
632
|
+
partido: selectedPartido.value,
|
|
633
|
+
reportData: response.data,
|
|
634
|
+
})
|
|
635
|
+
|
|
636
|
+
// Emitir evento para cambiar al tab de reportes
|
|
637
|
+
emit('switch-to-reports')
|
|
638
|
+
|
|
639
|
+
// Cerrar el modal
|
|
640
|
+
emit('close')
|
|
641
|
+
} catch (error) {
|
|
642
|
+
console.error('Error al generar el reporte:', error)
|
|
643
|
+
|
|
644
|
+
// Verificar si es error 409 (Report with same template and game already exists)
|
|
645
|
+
if (error.response && error.response.status === 409) {
|
|
646
|
+
showError409.value = true
|
|
647
|
+
} else {
|
|
648
|
+
// Para otros errores, mostrar alerta genérica
|
|
649
|
+
alert('Error al generar el reporte. Por favor, intenta de nuevo.')
|
|
650
|
+
}
|
|
651
|
+
} finally {
|
|
652
|
+
loading.value = false
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
function selectPartido(partido) {
|
|
657
|
+
selectedPartido.value = partido
|
|
658
|
+
showDropdownPartidos.value = false
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
function closeModal() {
|
|
662
|
+
showError409.value = false
|
|
663
|
+
emit('close')
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
onMounted(() => {
|
|
667
|
+
cargarTorneos()
|
|
668
|
+
})
|
|
669
|
+
</script>
|
|
670
|
+
|
|
671
|
+
<style scoped>
|
|
672
|
+
.modal-overlay {
|
|
673
|
+
position: fixed;
|
|
674
|
+
top: 0;
|
|
675
|
+
left: 0;
|
|
676
|
+
width: 100vw;
|
|
677
|
+
height: 100vh;
|
|
678
|
+
background: rgba(0, 0, 0, 0.45);
|
|
679
|
+
display: flex;
|
|
680
|
+
align-items: center;
|
|
681
|
+
justify-content: center;
|
|
682
|
+
z-index: 3300;
|
|
683
|
+
}
|
|
684
|
+
.modal-content {
|
|
685
|
+
width: 368px;
|
|
686
|
+
background: #2e3b46;
|
|
687
|
+
border-radius: 10px;
|
|
688
|
+
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.18);
|
|
689
|
+
padding: 0;
|
|
690
|
+
position: relative;
|
|
691
|
+
display: flex;
|
|
692
|
+
flex-direction: column;
|
|
693
|
+
font-family: 'Poppins-Regular', 'Montserrat', sans-serif;
|
|
694
|
+
}
|
|
695
|
+
.close-btn {
|
|
696
|
+
position: absolute;
|
|
697
|
+
top: 16px;
|
|
698
|
+
right: 16px;
|
|
699
|
+
background: none;
|
|
700
|
+
border: none;
|
|
701
|
+
cursor: pointer;
|
|
702
|
+
z-index: 2;
|
|
703
|
+
padding: 0;
|
|
704
|
+
display: flex;
|
|
705
|
+
align-items: center;
|
|
706
|
+
justify-content: center;
|
|
707
|
+
}
|
|
708
|
+
.close-btn:hover {
|
|
709
|
+
opacity: 0.7;
|
|
710
|
+
}
|
|
711
|
+
.close-btn img {
|
|
712
|
+
width: 20px;
|
|
713
|
+
height: 20px;
|
|
714
|
+
}
|
|
715
|
+
.header-separator {
|
|
716
|
+
width: 100%;
|
|
717
|
+
height: 1px;
|
|
718
|
+
border-bottom: dashed 1px #58626b;
|
|
719
|
+
margin: 12px 0 0 0;
|
|
720
|
+
}
|
|
721
|
+
.modal-header {
|
|
722
|
+
display: flex;
|
|
723
|
+
align-items: center;
|
|
724
|
+
gap: 8px;
|
|
725
|
+
padding: 20px 24px 0 24px;
|
|
726
|
+
}
|
|
727
|
+
.icon-title {
|
|
728
|
+
width: 16px;
|
|
729
|
+
height: 16px;
|
|
730
|
+
}
|
|
731
|
+
.modal-title {
|
|
732
|
+
font-family: Poppins-Medium;
|
|
733
|
+
font-size: 14px;
|
|
734
|
+
font-weight: 500;
|
|
735
|
+
font-stretch: normal;
|
|
736
|
+
font-style: normal;
|
|
737
|
+
line-height: 1.5;
|
|
738
|
+
letter-spacing: normal;
|
|
739
|
+
text-align: left;
|
|
740
|
+
color: #fff;
|
|
741
|
+
}
|
|
742
|
+
.modal-body {
|
|
743
|
+
flex: 1;
|
|
744
|
+
display: flex;
|
|
745
|
+
flex-direction: column;
|
|
746
|
+
justify-content: center;
|
|
747
|
+
padding: 12px 24px 0 24px;
|
|
748
|
+
margin-bottom: 17px;
|
|
749
|
+
margin-top: 5px;
|
|
750
|
+
gap: 18px;
|
|
751
|
+
}
|
|
752
|
+
.modal-group {
|
|
753
|
+
display: flex;
|
|
754
|
+
flex-direction: column;
|
|
755
|
+
gap: 8px;
|
|
756
|
+
margin-top: 5px;
|
|
757
|
+
}
|
|
758
|
+
.modal-row {
|
|
759
|
+
display: flex;
|
|
760
|
+
gap: 12px;
|
|
761
|
+
}
|
|
762
|
+
.modal-row .modal-group {
|
|
763
|
+
flex: 1 1 50%;
|
|
764
|
+
}
|
|
765
|
+
.modal-row select {
|
|
766
|
+
width: 100%;
|
|
767
|
+
}
|
|
768
|
+
label {
|
|
769
|
+
font-family: Poppins-Regular;
|
|
770
|
+
font-size: 10px;
|
|
771
|
+
font-weight: 500;
|
|
772
|
+
font-stretch: normal;
|
|
773
|
+
font-style: normal;
|
|
774
|
+
line-height: normal;
|
|
775
|
+
letter-spacing: -0.2px;
|
|
776
|
+
text-align: left;
|
|
777
|
+
margin-left: 2px;
|
|
778
|
+
color: rgba(255, 255, 255, 0.6);
|
|
779
|
+
background: none;
|
|
780
|
+
background-color: transparent;
|
|
781
|
+
}
|
|
782
|
+
select {
|
|
783
|
+
background: #2e3b46;
|
|
784
|
+
border: solid 1px rgba(224, 231, 240, 0.5);
|
|
785
|
+
border-radius: 6px;
|
|
786
|
+
color: #fff;
|
|
787
|
+
font-size: 15px;
|
|
788
|
+
padding: 8px 28px 8px 12px;
|
|
789
|
+
font-family: Poppins-Regular;
|
|
790
|
+
outline: none;
|
|
791
|
+
transition: border 0.2s;
|
|
792
|
+
appearance: none;
|
|
793
|
+
-webkit-appearance: none;
|
|
794
|
+
-moz-appearance: none;
|
|
795
|
+
position: relative;
|
|
796
|
+
}
|
|
797
|
+
select::-ms-expand {
|
|
798
|
+
display: none;
|
|
799
|
+
}
|
|
800
|
+
select::after {
|
|
801
|
+
content: '';
|
|
802
|
+
pointer-events: none;
|
|
803
|
+
position: absolute;
|
|
804
|
+
top: 50%;
|
|
805
|
+
right: 17px;
|
|
806
|
+
width: 16px;
|
|
807
|
+
height: 16px;
|
|
808
|
+
transform: translateY(-50%) rotate(0deg);
|
|
809
|
+
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
810
|
+
background: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 7L8 10L11 7" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>')
|
|
811
|
+
no-repeat center/contain;
|
|
812
|
+
z-index: 2;
|
|
813
|
+
}
|
|
814
|
+
select:focus::after {
|
|
815
|
+
transform: translateY(-50%) rotate(180deg);
|
|
816
|
+
background: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 7L8 10L11 7" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>')
|
|
817
|
+
no-repeat center/contain;
|
|
818
|
+
}
|
|
819
|
+
.modal-footer {
|
|
820
|
+
display: flex;
|
|
821
|
+
justify-content: center;
|
|
822
|
+
align-items: center;
|
|
823
|
+
gap: 18px;
|
|
824
|
+
margin-top: 13px;
|
|
825
|
+
padding: 0 24px 12px 24px;
|
|
826
|
+
}
|
|
827
|
+
.cancel-btn {
|
|
828
|
+
background: none;
|
|
829
|
+
border: none;
|
|
830
|
+
color: #b0bec5;
|
|
831
|
+
font-size: 14.9px;
|
|
832
|
+
font-family: Poppins-Medium;
|
|
833
|
+
height: 30px;
|
|
834
|
+
border-radius: 64px;
|
|
835
|
+
display: flex;
|
|
836
|
+
align-items: center;
|
|
837
|
+
justify-content: center;
|
|
838
|
+
cursor: pointer;
|
|
839
|
+
padding: 0 18px;
|
|
840
|
+
transition: color 0.2s;
|
|
841
|
+
text-decoration: underline;
|
|
842
|
+
}
|
|
843
|
+
.cancel-btn:hover {
|
|
844
|
+
color: #fff;
|
|
845
|
+
}
|
|
846
|
+
.next-btn {
|
|
847
|
+
width: 107px;
|
|
848
|
+
height: 30px;
|
|
849
|
+
border-radius: 64px;
|
|
850
|
+
-webkit-backdrop-filter: blur(16px);
|
|
851
|
+
backdrop-filter: blur(16px);
|
|
852
|
+
border: solid 0.8px #cbee6b;
|
|
853
|
+
background-color: rgba(255, 255, 255, 0.06);
|
|
854
|
+
font-family: Poppins-Medium;
|
|
855
|
+
font-size: 14.9px;
|
|
856
|
+
font-weight: 500;
|
|
857
|
+
font-stretch: normal;
|
|
858
|
+
font-style: normal;
|
|
859
|
+
line-height: 1.2;
|
|
860
|
+
letter-spacing: -0.45px;
|
|
861
|
+
text-align: center;
|
|
862
|
+
color: #fff;
|
|
863
|
+
cursor: pointer;
|
|
864
|
+
transition:
|
|
865
|
+
background 0.2s,
|
|
866
|
+
color 0.2s;
|
|
867
|
+
display: flex;
|
|
868
|
+
align-items: center;
|
|
869
|
+
justify-content: center;
|
|
870
|
+
}
|
|
871
|
+
.next-btn:disabled {
|
|
872
|
+
opacity: 0.5;
|
|
873
|
+
cursor: not-allowed;
|
|
874
|
+
}
|
|
875
|
+
.next-btn:not(:disabled):hover {
|
|
876
|
+
background: #cbee6b;
|
|
877
|
+
color: #232e39;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/* Wrapper para el select y la flecha */
|
|
881
|
+
.select-wrapper {
|
|
882
|
+
position: relative;
|
|
883
|
+
width: 100%;
|
|
884
|
+
display: flex;
|
|
885
|
+
align-items: center;
|
|
886
|
+
}
|
|
887
|
+
.select-wrapper select {
|
|
888
|
+
width: 100%;
|
|
889
|
+
padding-right: 28px;
|
|
890
|
+
background: #2e3b46;
|
|
891
|
+
border: solid 1px rgba(224, 231, 240, 0.5);
|
|
892
|
+
border-radius: 6px;
|
|
893
|
+
color: #fff;
|
|
894
|
+
font-size: 15px;
|
|
895
|
+
font-family: Poppins-Regular;
|
|
896
|
+
outline: none;
|
|
897
|
+
transition: border 0.2s;
|
|
898
|
+
appearance: none;
|
|
899
|
+
-webkit-appearance: none;
|
|
900
|
+
-moz-appearance: none;
|
|
901
|
+
}
|
|
902
|
+
.select-wrapper select:focus,
|
|
903
|
+
select:focus {
|
|
904
|
+
border: solid 1px rgba(224, 231, 240, 0.5) !important;
|
|
905
|
+
box-shadow: none !important;
|
|
906
|
+
}
|
|
907
|
+
.select-chevron {
|
|
908
|
+
position: absolute;
|
|
909
|
+
right: 17px;
|
|
910
|
+
top: 50%;
|
|
911
|
+
transform: translateY(-50%) rotate(0deg);
|
|
912
|
+
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
913
|
+
display: flex;
|
|
914
|
+
align-items: center;
|
|
915
|
+
pointer-events: none;
|
|
916
|
+
}
|
|
917
|
+
.select-chevron svg {
|
|
918
|
+
display: block;
|
|
919
|
+
}
|
|
920
|
+
.select-chevron.open {
|
|
921
|
+
transform: translateY(-50%) rotate(180deg);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.partido-select {
|
|
925
|
+
position: relative;
|
|
926
|
+
user-select: none;
|
|
927
|
+
}
|
|
928
|
+
.custom-select-display {
|
|
929
|
+
display: flex;
|
|
930
|
+
align-items: center;
|
|
931
|
+
gap: 8px;
|
|
932
|
+
background: #2e3b46;
|
|
933
|
+
border: solid 1px rgba(224, 231, 240, 0.5);
|
|
934
|
+
border-radius: 6px;
|
|
935
|
+
color: #fff;
|
|
936
|
+
font-size: 15px;
|
|
937
|
+
font-family: Poppins-Regular;
|
|
938
|
+
padding: 8px 17px 8px 12px;
|
|
939
|
+
cursor: pointer;
|
|
940
|
+
min-height: 38px;
|
|
941
|
+
position: relative;
|
|
942
|
+
transition: border 0.2s;
|
|
943
|
+
width: 180px;
|
|
944
|
+
min-width: 180px;
|
|
945
|
+
max-width: 180px;
|
|
946
|
+
box-sizing: border-box;
|
|
947
|
+
}
|
|
948
|
+
.custom-select-display:focus,
|
|
949
|
+
.custom-select-display:active {
|
|
950
|
+
outline: none;
|
|
951
|
+
}
|
|
952
|
+
.partido-select {
|
|
953
|
+
width: 100%;
|
|
954
|
+
}
|
|
955
|
+
.custom-select-dropdown {
|
|
956
|
+
position: absolute;
|
|
957
|
+
left: 0;
|
|
958
|
+
right: 0;
|
|
959
|
+
top: 100%;
|
|
960
|
+
background: #2e3b46;
|
|
961
|
+
border: solid 0.35px rgba(224, 231, 240, 0.1);
|
|
962
|
+
border-radius: 0 0 6px 6px;
|
|
963
|
+
z-index: 10;
|
|
964
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
965
|
+
width: 100%;
|
|
966
|
+
box-sizing: border-box;
|
|
967
|
+
overflow: hidden;
|
|
968
|
+
max-height: 220px; /* Limita la altura del dropdown */
|
|
969
|
+
overflow-y: auto; /* Habilita scroll vertical */
|
|
970
|
+
scrollbar-width: thin;
|
|
971
|
+
scrollbar-color: #cbee6b #2e3b46;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/* Scrollbar para navegadores Webkit */
|
|
975
|
+
.custom-select-dropdown::-webkit-scrollbar {
|
|
976
|
+
width: 8px;
|
|
977
|
+
background: #2e3b46;
|
|
978
|
+
border-radius: 6px;
|
|
979
|
+
}
|
|
980
|
+
.custom-select-dropdown::-webkit-scrollbar-thumb {
|
|
981
|
+
background: #cbee6b;
|
|
982
|
+
border-radius: 6px;
|
|
983
|
+
min-height: 24px;
|
|
984
|
+
}
|
|
985
|
+
.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
|
|
986
|
+
background: #b6d94c;
|
|
987
|
+
}
|
|
988
|
+
.custom-select-option {
|
|
989
|
+
display: flex;
|
|
990
|
+
align-items: center;
|
|
991
|
+
gap: 8px;
|
|
992
|
+
padding: 8px 12px;
|
|
993
|
+
cursor: pointer;
|
|
994
|
+
font-size: 15px;
|
|
995
|
+
font-family: Poppins-Regular;
|
|
996
|
+
color: #fff;
|
|
997
|
+
transition: background 0.2s;
|
|
998
|
+
background: none;
|
|
999
|
+
border: none;
|
|
1000
|
+
width: 100%;
|
|
1001
|
+
box-sizing: border-box;
|
|
1002
|
+
}
|
|
1003
|
+
.custom-select-option:hover {
|
|
1004
|
+
background: rgba(255, 255, 255, 0.08);
|
|
1005
|
+
}
|
|
1006
|
+
.logo-equipo {
|
|
1007
|
+
width: 20px;
|
|
1008
|
+
height: 20px;
|
|
1009
|
+
object-fit: contain;
|
|
1010
|
+
border-radius: 0;
|
|
1011
|
+
background: none;
|
|
1012
|
+
}
|
|
1013
|
+
.placeholder {
|
|
1014
|
+
color: rgba(255, 255, 255, 0.4);
|
|
1015
|
+
font-size: 15px;
|
|
1016
|
+
font-family: Poppins-Regular;
|
|
1017
|
+
overflow: hidden;
|
|
1018
|
+
text-overflow: ellipsis;
|
|
1019
|
+
white-space: nowrap;
|
|
1020
|
+
max-width: 160px;
|
|
1021
|
+
display: inline-block;
|
|
1022
|
+
vertical-align: middle;
|
|
1023
|
+
}
|
|
1024
|
+
.custom-select-display span,
|
|
1025
|
+
.custom-select-display .placeholder {
|
|
1026
|
+
overflow: hidden;
|
|
1027
|
+
text-overflow: ellipsis;
|
|
1028
|
+
white-space: nowrap;
|
|
1029
|
+
max-width: 204px;
|
|
1030
|
+
display: inline-block;
|
|
1031
|
+
vertical-align: middle;
|
|
1032
|
+
}
|
|
1033
|
+
.select-wrapper select:disabled,
|
|
1034
|
+
.custom-select-display.disabled {
|
|
1035
|
+
opacity: 0.5;
|
|
1036
|
+
cursor: not-allowed;
|
|
1037
|
+
background-color: #3a4754;
|
|
1038
|
+
border-color: #58626b;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.custom-select-display.disabled {
|
|
1042
|
+
pointer-events: none;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.loading-container {
|
|
1046
|
+
display: flex;
|
|
1047
|
+
flex-direction: column;
|
|
1048
|
+
align-items: center;
|
|
1049
|
+
justify-content: center;
|
|
1050
|
+
gap: 16px;
|
|
1051
|
+
padding: 40px 20px;
|
|
1052
|
+
color: #fff;
|
|
1053
|
+
font-family: Poppins-Regular;
|
|
1054
|
+
font-size: 14px;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
.loading-spinner {
|
|
1058
|
+
width: 32px;
|
|
1059
|
+
height: 32px;
|
|
1060
|
+
border: 3px solid rgba(255, 255, 255, 0.1);
|
|
1061
|
+
border-top: 3px solid #cbee6b;
|
|
1062
|
+
border-radius: 50%;
|
|
1063
|
+
animation: spin 1s linear infinite;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
@keyframes spin {
|
|
1067
|
+
0% {
|
|
1068
|
+
transform: rotate(0deg);
|
|
1069
|
+
}
|
|
1070
|
+
100% {
|
|
1071
|
+
transform: rotate(360deg);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/* Spinner más pequeño para los selectores */
|
|
1076
|
+
.loading-spinner.select-spinner {
|
|
1077
|
+
width: 18px;
|
|
1078
|
+
height: 18px;
|
|
1079
|
+
border-width: 2px;
|
|
1080
|
+
margin-right: 4px;
|
|
1081
|
+
vertical-align: middle;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/* Agrego clases específicas para los selectores de liga y partidos */
|
|
1085
|
+
.select-wrapper.liga-select .custom-select-display,
|
|
1086
|
+
.select-wrapper.partido-select .custom-select-display {
|
|
1087
|
+
width: 320px;
|
|
1088
|
+
min-width: 320px;
|
|
1089
|
+
max-width: 320px;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/* Dejo el ancho de 180px por defecto para los demás selectores */
|
|
1093
|
+
.custom-select-display {
|
|
1094
|
+
width: 154px;
|
|
1095
|
+
min-width: 154px;
|
|
1096
|
+
max-width: 154px;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
/* Solo los selectores de torneo y jornada tendrán el texto truncado a 100px */
|
|
1100
|
+
.select-wrapper.torneo-select .custom-select-display span,
|
|
1101
|
+
.select-wrapper.torneo-select .custom-select-display .placeholder,
|
|
1102
|
+
.select-wrapper.jornada-select .custom-select-display span,
|
|
1103
|
+
.select-wrapper.jornada-select .custom-select-display .placeholder {
|
|
1104
|
+
max-width: 100px !important;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
/* Estilos para el mensaje de error 409 */
|
|
1108
|
+
.error-message-container {
|
|
1109
|
+
display: flex;
|
|
1110
|
+
flex-direction: column;
|
|
1111
|
+
align-items: center;
|
|
1112
|
+
justify-content: center;
|
|
1113
|
+
text-align: center;
|
|
1114
|
+
padding: 40px 2px;
|
|
1115
|
+
gap: 30px;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.error-icon {
|
|
1119
|
+
font-size: 48px;
|
|
1120
|
+
margin-bottom: 10px;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.error-text {
|
|
1124
|
+
font-family: Poppins-Regular;
|
|
1125
|
+
font-size: 13px;
|
|
1126
|
+
font-weight: 400;
|
|
1127
|
+
line-height: 1.5;
|
|
1128
|
+
color: #fff;
|
|
1129
|
+
margin: 0;
|
|
1130
|
+
margin-top: -15px;
|
|
1131
|
+
max-width: 280px;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
.accept-btn {
|
|
1135
|
+
background: #cbee6b;
|
|
1136
|
+
border: none;
|
|
1137
|
+
border-radius: 64px;
|
|
1138
|
+
color: #232e39;
|
|
1139
|
+
font-family: Poppins-Medium;
|
|
1140
|
+
font-size: 14.9px;
|
|
1141
|
+
font-weight: 500;
|
|
1142
|
+
padding: 8px 24px;
|
|
1143
|
+
cursor: pointer;
|
|
1144
|
+
transition: background 0.2s;
|
|
1145
|
+
min-width: 100px;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
.accept-btn:hover {
|
|
1149
|
+
background: #b6d94c;
|
|
1150
|
+
}
|
|
1151
|
+
</style>
|