@golstats/gsc-reports 1.0.19 → 1.0.21
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/dist/{FilterConditions-55d68355-BUvCA8gG-ZrW3TbY8-DePX4P2t.js → FilterConditions-55d68355-BUvCA8gG-DOPuF6DO-P9MnDxsi.js} +9 -9
- package/dist/{FilterField-59a73e38-C85AzksG-Bo5B7x1Q-DiSS28Ta.js → FilterField-59a73e38-C85AzksG-DmuvTtAz-CbE6LlTK.js} +3 -3
- package/dist/{FilterSubcategories-a9b32cc9-B7ERo60D-B9UdWWaD-DEIXTcdQ.js → FilterSubcategories-a9b32cc9-B7ERo60D-DtViHC0Z-NjE5EJDL.js} +3 -3
- package/dist/gsc-reports.css +1 -1
- package/dist/gsc-reports.es.js +1 -1
- package/dist/gsc-reports.umd.js +129 -129
- package/dist/{index-BU_OH4qV.js → index-CVXgGOzI.js} +13361 -13291
- package/package.json +2 -2
- package/src/components/TemplatesSection.vue +1 -0
- package/src/components/elementsTemplates/TemplateItem.vue +11 -1
- package/src/components/elementsTemplates/TooltipTemplateOptions.vue +12 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golstats/gsc-reports",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
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.
|
|
50
|
+
"@golstats/gsc-template-report-maker": "^1.0.28",
|
|
51
51
|
"@golstats/gsc-volumetric-field": "^1.0.1",
|
|
52
52
|
"axios": "^1.10.0",
|
|
53
53
|
"gridstack": "^12.1.1",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
</div>
|
|
78
78
|
<TooltipTemplateOptions
|
|
79
79
|
v-if="showTooltip"
|
|
80
|
+
:can-edit="canEditTemplate"
|
|
80
81
|
@click.self="showTooltip = false"
|
|
81
82
|
@mouseleave="showTooltip = false"
|
|
82
83
|
@generar-reporte="onGenerarReporte"
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
</template>
|
|
92
93
|
|
|
93
94
|
<script setup>
|
|
94
|
-
import { ref } from 'vue'
|
|
95
|
+
import { ref, computed } from 'vue'
|
|
95
96
|
import TooltipTemplateOptions from './TooltipTemplateOptions.vue'
|
|
96
97
|
|
|
97
98
|
// Definir la prop template como objeto
|
|
@@ -100,11 +101,20 @@ const props = defineProps({
|
|
|
100
101
|
type: Object,
|
|
101
102
|
required: true,
|
|
102
103
|
},
|
|
104
|
+
userId: {
|
|
105
|
+
type: Number,
|
|
106
|
+
required: true,
|
|
107
|
+
},
|
|
103
108
|
})
|
|
104
109
|
|
|
105
110
|
const emit = defineEmits(['generar-reporte', 'renombrar', 'duplicar', 'eliminar', 'edit-template'])
|
|
106
111
|
const showTooltip = ref(false)
|
|
107
112
|
|
|
113
|
+
// Computed property to check if user can edit this template
|
|
114
|
+
const canEditTemplate = computed(() => {
|
|
115
|
+
return props.userId === props.template.user_id
|
|
116
|
+
})
|
|
117
|
+
|
|
108
118
|
function onGenerarReporte() {
|
|
109
119
|
console.log('generar-reporte')
|
|
110
120
|
showTooltip.value = false
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/>
|
|
10
10
|
Generar reporte
|
|
11
11
|
</li>
|
|
12
|
-
<li class="option" @click="$emit('renombrar')">
|
|
12
|
+
<li v-if="canEdit" class="option" @click="$emit('renombrar')">
|
|
13
13
|
<img
|
|
14
14
|
src="https://golstatsimages.blob.core.windows.net/reports-images/icn-rename.svg"
|
|
15
15
|
alt="Renombrar template"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
/>
|
|
18
18
|
Renombrar template
|
|
19
19
|
</li>
|
|
20
|
-
<li class="option" @click="$emit('editar')">
|
|
20
|
+
<li v-if="canEdit" class="option" @click="$emit('editar')">
|
|
21
21
|
<img
|
|
22
22
|
src="https://golstatsimages.blob.core.windows.net/reports-images/icn-edit.svg"
|
|
23
23
|
alt="Editar template"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
/>
|
|
34
34
|
Duplicar template
|
|
35
35
|
</li>
|
|
36
|
-
<li class="option" @click="$emit('eliminar')">
|
|
36
|
+
<li v-if="canEdit" class="option" @click="$emit('eliminar')">
|
|
37
37
|
<img
|
|
38
38
|
src="https://golstatsimages.blob.core.windows.net/reports-images/icn-delete.svg"
|
|
39
39
|
alt="Eliminar template"
|
|
@@ -46,6 +46,13 @@
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<script setup>
|
|
49
|
+
const props = defineProps({
|
|
50
|
+
canEdit: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true,
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
|
|
49
56
|
const emit = defineEmits(['generar-reporte', 'renombrar', 'editar', 'duplicar', 'eliminar'])
|
|
50
57
|
</script>
|
|
51
58
|
|
|
@@ -55,11 +62,11 @@ const emit = defineEmits(['generar-reporte', 'renombrar', 'editar', 'duplicar',
|
|
|
55
62
|
top: 48px;
|
|
56
63
|
right: 20px;
|
|
57
64
|
width: 215px;
|
|
58
|
-
height:
|
|
65
|
+
height: auto;
|
|
59
66
|
background: #2e3b46;
|
|
60
67
|
border-radius: 10px;
|
|
61
68
|
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.25);
|
|
62
|
-
padding: 8px 0
|
|
69
|
+
padding: 8px 0 8px 0;
|
|
63
70
|
z-index: 3000;
|
|
64
71
|
font-family: Poppins-Regular;
|
|
65
72
|
}
|