@golstats/gsc-reports 1.0.54 → 1.0.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golstats/gsc-reports",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "main": "dist/gsc-reports.umd.js",
5
5
  "module": "dist/gsc-reports.es.js",
6
6
  "exports": {
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@golstats/gsc-checkbox": "^1.0.13",
50
- "@golstats/gsc-template-report-maker": "^1.0.73",
50
+ "@golstats/gsc-template-report-maker": "^1.0.78",
51
51
  "axios": "^1.10.0",
52
52
  "gridstack": "^12.1.1",
53
53
  "tiny-emitter": "^2.1.0",
@@ -654,15 +654,27 @@ function onJornadaChange() {
654
654
  }
655
655
 
656
656
  function filtrarPartidosPorJornada(jornada) {
657
+ console.log('LLEga aqui mero ******************************')
657
658
  if (!jornada || !jornada.id) {
658
659
  partidos.value = []
659
660
  return
660
661
  }
661
662
  let partidosFiltrados = allPartidos.value.filter((p) => p.matchday_id === jornada.id)
663
+ console.log(
664
+ '////////////////////LLEga aqui mero partidosFiltrados ******************************',
665
+ partidosFiltrados,
666
+ )
667
+ console.log('El template Type Es: ', props.templateType)
662
668
  if (props.templateType === '2' || props.templateType === 2) {
669
+ console.log('Si es postmatch prematch: el template')
670
+ console.log('partidosFiltrados; ', partidosFiltrados)
663
671
  partidosFiltrados = partidosFiltrados.filter((p) => p.game_status === 1)
672
+ console.log('******************* partidos cvon game estatus 1: ', partidosFiltrados)
664
673
  } else if (props.templateType === '1' || props.templateType === 1) {
674
+ console.log('Si es prematch: el template')
675
+ console.log('partidosFiltrados; ', partidosFiltrados)
665
676
  partidosFiltrados = partidosFiltrados.filter((p) => p.game_status === 4)
677
+ console.log('******************* partidos cvon game estatus 4: ', partidosFiltrados)
666
678
  }
667
679
  partidos.value = partidosFiltrados
668
680
  }
@@ -785,7 +797,7 @@ watch(selectedLiga, (nuevaLiga, anteriorLiga) => {
785
797
  cambioAutomatico.value = true
786
798
  selectedTorneo.value = torneoEncontrado
787
799
  // Ejecutar directamente la función que hace la petición a gamesBySeason
788
- cargarPartidosPorSeason([torneoEncontrado.id])
800
+ // cargarPartidosPorSeason([torneoEncontrado.id])
789
801
  cambioAutomatico.value = false
790
802
  }
791
803
  }
@@ -838,7 +850,7 @@ watch(selectedJornada, (nuevaJornada, anteriorJornada) => {
838
850
  p.game_id === partidoParaConfigurar.value.game_id ||
839
851
  p.id === partidoParaConfigurar.value.game_id,
840
852
  )
841
-
853
+ filtrarPartidosPorJornada(nuevaJornada)
842
854
  if (partidoEncontrado) {
843
855
  selectedPartido.value = partidoEncontrado
844
856
  loadingAutoseteo.value = false
@@ -904,6 +916,10 @@ async function cargarUltimosJuegos() {
904
916
  if (response.data.data.prematch) {
905
917
  loadingAutoseteo.value = true
906
918
  autoseteoActivo.value = true
919
+ // Auto-cargar partidos por season_id para asegurar que los datos estén disponibles
920
+ if (response.data.data.prematch.season_id) {
921
+ await cargarPartidosPorSeason([response.data.data.prematch.season_id])
922
+ }
907
923
  }
908
924
  } else if (props.templateType === '2' || props.templateType === 2) {
909
925
  partidoParaConfigurar.value = response.data.data.postmatch
@@ -911,6 +927,10 @@ async function cargarUltimosJuegos() {
911
927
  if (response.data.data.postmatch) {
912
928
  loadingAutoseteo.value = true
913
929
  autoseteoActivo.value = true
930
+ // Auto-cargar partidos por season_id para asegurar que los datos estén disponibles
931
+ if (response.data.data.postmatch.season_id) {
932
+ await cargarPartidosPorSeason([response.data.data.postmatch.season_id])
933
+ }
914
934
  }
915
935
  }
916
936
  } catch (error) {
@@ -1,21 +0,0 @@
1
- import { ref as t, createElementBlock as a, openBlock as n, createVNode as c, unref as d } from "vue";
2
- import { Y as u, r as f } from "./index-DoXBPhEZ.js";
3
- const i = { class: "filter-field" }, m = {
4
- __name: "FilterField",
5
- setup(s) {
6
- const l = t(Array.from({ length: 16 }, (r, e) => e + 1));
7
- function o() {
8
- }
9
- return (r, e) => (n(), a("div", i, [
10
- c(d(f), {
11
- width: "100%",
12
- "background-color": "#2E3B46",
13
- value: l.value,
14
- "onUpdate:modelValue": o
15
- }, null, 8, ["value"])
16
- ]));
17
- }
18
- }, _ = /* @__PURE__ */ u(m, [["__scopeId", "data-v-8103c3e1"]]);
19
- export {
20
- _ as default
21
- };