@golstats/gsc-reports 1.0.68 → 1.0.69

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.68",
3
+ "version": "1.0.69",
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.96",
50
+ "@golstats/gsc-template-report-maker": "^1.0.97",
51
51
  "axios": "^1.10.0",
52
52
  "gridstack": "^12.1.1",
53
53
  "tiny-emitter": "^2.1.0",
@@ -340,13 +340,11 @@ const toggleSortDropdown = () => {
340
340
  }
341
341
 
342
342
  const selectSortOption = (option) => {
343
- console.log('Ordenando por:', option)
344
343
  selectedSortOption.value = option
345
344
  showSortDropdown.value = false
346
345
  }
347
346
 
348
347
  function onOpenReport(report) {
349
- console.log('reports section onOpenReport', report)
350
348
  // Emitir un evento o manejar la lógica para abrir el reporte
351
349
  // Por ejemplo, podrías redirigir a una página de reporte específica
352
350
  // router.push(`/reports/${report.id}`)
@@ -363,7 +361,6 @@ const onRenombrarReporte = (nombre, reportId) => {
363
361
  }
364
362
 
365
363
  const onAcceptRenameReporte = (nuevoNombre) => {
366
- console.log('Renombrar reporte de', renameReporteName.value, 'a', nuevoNombre)
367
364
  showModalRenameReporte.value = false
368
365
 
369
366
  // Actualizar el nombre del reporte en la lista local
@@ -387,7 +384,6 @@ const onReportDeleted = (reportId) => {
387
384
  }
388
385
 
389
386
  function onDownloadReport(report) {
390
- console.log('Descargando reporte:', report)
391
387
  emit('download-report', report)
392
388
  // Aquí podrías implementar la lógica para descargar el reporte
393
389
  // Por ejemplo, redirigir a una URL de descarga o abrir un modal de descarga
@@ -390,7 +390,6 @@ onMounted(async () => {
390
390
  })
391
391
 
392
392
  function onOpenModalNewTemplate(data) {
393
- console.log('onOpenModalNewTemplate template section, called with data:', data)
394
393
  emit('open-modal-new-template', data)
395
394
  }
396
395
 
@@ -71,8 +71,6 @@ const handleDelete = async () => {
71
71
  `https://m9qip57rsh.execute-api.us-east-2.amazonaws.com/prod/users/${props.userId}/reports/${props.reportId}`,
72
72
  )
73
73
 
74
- console.log('Reporte eliminado exitosamente:', response.data)
75
-
76
74
  // Emitir evento de eliminación exitosa
77
75
  emit('reportDeleted', props.reportId)
78
76
 
@@ -654,27 +654,16 @@ function onJornadaChange() {
654
654
  }
655
655
 
656
656
  function filtrarPartidosPorJornada(jornada) {
657
- console.log('LLEga aqui mero ******************************')
658
657
  if (!jornada || !jornada.id) {
659
658
  partidos.value = []
660
659
  return
661
660
  }
662
661
  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
663
  if (props.templateType === '2' || props.templateType === 2) {
669
- console.log('Si es postmatch prematch: el template')
670
- console.log('partidosFiltrados; ', partidosFiltrados)
671
664
  partidosFiltrados = partidosFiltrados.filter((p) => p.game_status === 1)
672
- console.log('******************* partidos cvon game estatus 1: ', partidosFiltrados)
673
665
  } else if (props.templateType === '1' || props.templateType === 1) {
674
- console.log('Si es prematch: el template')
675
- console.log('partidosFiltrados; ', partidosFiltrados)
676
666
  partidosFiltrados = partidosFiltrados.filter((p) => p.game_status === 4)
677
- console.log('******************* partidos cvon game estatus 4: ', partidosFiltrados)
678
667
  }
679
668
  partidos.value = partidosFiltrados
680
669
  }
@@ -98,9 +98,7 @@ onUnmounted(() => {
98
98
  })
99
99
 
100
100
  async function acceptRename() {
101
- console.log('acceptRename')
102
101
  if (newName.value.trim().length < 3) return
103
- console.log('acceptRename 22')
104
102
 
105
103
  isLoading.value = true
106
104
  errorMessage.value = ''
@@ -179,32 +179,27 @@ function onOpenReport() {
179
179
  }
180
180
 
181
181
  function onRenombrar() {
182
- console.log('renombrar')
183
182
  showTooltip.value = false
184
183
  // Emitir el evento con el nombre del reporte y el ID
185
184
  emit('renombrar', props.report.report_name || 'Reporte', props.report.id)
186
185
  }
187
186
 
188
187
  function onEditar() {
189
- console.log('editar')
190
188
  showTooltip.value = false
191
189
  emit('edit-template', props.report)
192
190
  }
193
191
 
194
192
  function onDuplicar() {
195
- console.log('duplicar')
196
193
  showTooltip.value = false
197
194
  }
198
195
 
199
196
  function onEliminar() {
200
- console.log('eliminar')
201
197
  showTooltip.value = false
202
198
  // Emitir el evento con el objeto reporte completo
203
199
  emit('eliminar', props.report)
204
200
  }
205
201
 
206
202
  function onDescargar() {
207
- console.log('descargar')
208
203
  emit('download-report', props.report)
209
204
  showTooltip.value = false
210
205
  }
@@ -116,34 +116,28 @@ const canEditTemplate = computed(() => {
116
116
  })
117
117
 
118
118
  function onGenerarReporte() {
119
- console.log('generar-reporte')
120
119
  showTooltip.value = false
121
120
  emit('generar-reporte')
122
121
  }
123
122
  function onRenombrar() {
124
- console.log('renombrar')
125
123
  showTooltip.value = false
126
124
  const nombre = props.template.name || ''
127
125
  emit('renombrar', nombre)
128
126
  }
129
127
  function onEditar() {
130
- console.log('editar')
131
128
  showTooltip.value = false
132
129
  emit('edit-template', props.template)
133
130
  }
134
131
  function onDuplicar() {
135
- console.log('duplicar')
136
132
  showTooltip.value = false
137
133
  const nombre = props.template.name || ''
138
134
  emit('duplicar', nombre)
139
135
  }
140
136
  function onEliminar() {
141
- console.log('eliminar')
142
137
  showTooltip.value = false
143
138
  emit('eliminar', props.template)
144
139
  }
145
140
  function onToggleAutogen(val) {
146
- console.log('toggle-autogen', val)
147
141
  }
148
142
  </script>
149
143
 
@@ -203,18 +203,12 @@ onBeforeUnmount(() => {
203
203
  })
204
204
 
205
205
  function onOpenModalNewTemplate(template) {
206
- console.log('onOpenModalNewTemplate, gsc-reports:', template)
207
206
  onEditTemplate(template)
208
207
  }
209
208
 
210
209
  function onEditTemplate(template) {
211
- console.log('onEditTemplate, template:', template)
212
210
  //if (reportTemplateMaker.value) {
213
- console.log('Edicion es: ')
214
- console.log({
215
- template: template,
216
- isTemplateMode: true,
217
- })
211
+
218
212
  reportTemplateMaker.value.show({
219
213
  template: template,
220
214
  isTemplateMode: true,
@@ -231,7 +225,6 @@ const clearSearchReports = () => {
231
225
  }
232
226
 
233
227
  function onOpenReport(report) {
234
- console.log('gsc-report onOpenReport, report:', report)
235
228
  if (reportTemplateMaker.value) {
236
229
  reportTemplateMaker.value.show({
237
230
  template: report,
@@ -26,7 +26,6 @@ const isCoverTypeOne = computed(() => {
26
26
  })
27
27
 
28
28
  const isBackgroundImageTypeOne = computed(() => {
29
- console.log('coverId', props.coverId)
30
29
  return [1, 3].includes(props.coverId)
31
30
  })
32
31
 
@@ -112,11 +111,9 @@ const callback = (entries) => {
112
111
 
113
112
  emit('intersection-changed', entry.isIntersecting)
114
113
  /*if (entry.isIntersecting) {
115
- console.log('Element is in the viewport!');
116
114
  emit('intersection-changed', true)
117
115
  // Perform actions when the element is visible
118
116
  } else {
119
- console.log('Element is out of the viewport!');
120
117
  // Perform actions when the element is not visible
121
118
  emit('intersection-changed', entry.isIntersecting && entry.isVisible)
122
119
  }*/
@@ -71,7 +71,6 @@ function getTwoDigitNumber(num) {
71
71
 
72
72
  function onSelectCover(cover) {
73
73
  coverSelected.value = cover
74
- console.log('coverSelected.value', coverSelected.value)
75
74
  }
76
75
 
77
76
  function onClickAddPage(index) {
@@ -112,14 +111,12 @@ function onIntersectionChanged(isVisible, pageIndex) {
112
111
  }
113
112
 
114
113
  function show(initialConfig) {
115
- console.log('show, initialConfig', initialConfig)
116
114
  isTemplateMode.value = initialConfig.isTemplateMode
117
115
  if (initialConfig.isTemplateMode) {
118
116
  templateToEdit.value = initialConfig.template
119
117
  templateAux.value = JSON.parse(JSON.stringify(initialConfig.template)) // Deep copy
120
118
  isPostMatch.value = templateToEdit.value.template_type === 2
121
119
  const cover = templateToEdit.value.pages.find((page) => page.is_front_page)
122
- console.log('cover')
123
120
  coverId.value = cover ? cover.type : 1
124
121
  pages.value = templateToEdit.value.pages.reduce((acc, page) => {
125
122
  if (!page.is_front_page) {
@@ -169,8 +166,6 @@ defineExpose({
169
166
  show,
170
167
  })
171
168
  emitter.on('add-page-view', ({ pageId, view, grid }) => {
172
- console.log('++++++++++++++++++++++++++++++++++++++++++++++')
173
- console.log('view', view)
174
169
  const page = pages.value.find((p) => p.id === pageId)
175
170
  if (page) {
176
171
  if (!page.items) {
@@ -182,7 +177,6 @@ emitter.on('add-page-view', ({ pageId, view, grid }) => {
182
177
  grid.makeWidget(el)
183
178
  })
184
179
  }
185
- console.log('page', page)
186
180
  })
187
181
 
188
182
  function onClickClose() {
@@ -164,8 +164,6 @@ const props = defineProps({
164
164
  })
165
165
 
166
166
  // Debug: ver qué datos llegan
167
- console.log('Props report: ', props.report)
168
- console.log('Game minutes: ', props.report?.game?.report_minutes)
169
167
 
170
168
  // Función para obtener todos los eventos del equipo local limitados a 5
171
169
  const homeEvents = computed(() => {
@@ -163,8 +163,6 @@ const props = defineProps({
163
163
  })
164
164
 
165
165
  // Debug: ver qué datos llegan
166
- console.log('Props report: ', props.report)
167
- console.log('Game minutes: ', props.report?.game?.report_minutes)
168
166
 
169
167
  // Función para obtener todos los eventos del equipo local limitados a 5
170
168
  const homeEvents = computed(() => {