@golstats/gsc-reports 1.0.36 → 1.0.38

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.36",
3
+ "version": "1.0.38",
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.47",
50
+ "@golstats/gsc-template-report-maker": "^1.0.50",
51
51
  "@golstats/gsc-volumetric-field": "^1.0.1",
52
52
  "axios": "^1.10.0",
53
53
  "gridstack": "^12.1.1",
@@ -399,6 +399,11 @@ onBeforeUnmount(() => {
399
399
  window.removeEventListener('resize', updateContainerWidth)
400
400
  }
401
401
  })
402
+
403
+ // Exponer el método obtenerTemplates para que pueda ser llamado desde el componente padre
404
+ defineExpose({
405
+ obtenerTemplates,
406
+ })
402
407
  </script>
403
408
 
404
409
  <style scoped>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <GSCTemplateReportMaker ref="reportTemplateMaker" :token="token" />
2
+ <GSCTemplateReportMaker ref="reportTemplateMaker" :token="token" @close="closeReport" />
3
3
  <div ref="containerRef" class="reports-container">
4
4
  <ModalSoloEscritorio v-if="showMobileWarning" @toHome="toHome" />
5
5
  <h1 class="title">Mis reportes</h1>
@@ -96,6 +96,7 @@
96
96
  </div>
97
97
  </div>
98
98
  <TemplatesSection
99
+ ref="templatesSectionRef"
99
100
  v-if="activeTab === 'templates'"
100
101
  :userId="userId"
101
102
  :token="token"
@@ -162,6 +163,7 @@ const showModalCreateTemplate = ref(false)
162
163
  const searchQuery = ref('')
163
164
  const searchQueryReports = ref('')
164
165
  const reportTemplateMaker = ref(null)
166
+ const templatesSectionRef = ref(null)
165
167
 
166
168
  const emit = defineEmits(['toHome', 'download-report'])
167
169
 
@@ -238,14 +240,21 @@ function onDownloadReport(report) {
238
240
  function toHome() {
239
241
  emit('toHome')
240
242
  }
243
+
244
+ function closeReport() {
245
+ // Actualizar los templates cuando se cierra el reporte
246
+ if (templatesSectionRef.value) {
247
+ templatesSectionRef.value.obtenerTemplates()
248
+ }
249
+ }
241
250
  </script>
242
251
  <style>
243
252
  .grid-stack-item-content {
244
- //background: #3498db;
245
- //color: white;
246
- //text-align: center;
247
- //padding: 20px;
248
- //box-sizing: border-box;
253
+ background: #3498db;
254
+ color: white;
255
+ text-align: center;
256
+ padding: 20px;
257
+ box-sizing: border-box;
249
258
  overflow-y: hidden !important;
250
259
  overflow-x: hidden !important;
251
260
  box-shadow: 0 3px 14px 0 rgba(0, 0, 0, 0.25);