diff --git a/components/admin/registros/cuestionarios.vue b/components/admin/registros/cuestionarios.vue index 92524cd..5456e30 100644 --- a/components/admin/registros/cuestionarios.vue +++ b/components/admin/registros/cuestionarios.vue @@ -5,7 +5,9 @@ + + @@ -15,6 +17,7 @@ + @@ -40,24 +43,17 @@ import fileDownload from 'js-file-download' export default { data() { return { - years: [], - selectedYear: '', selectedCuestionario: '', + selectedYear: '', } }, props: { + years: { type: Array, required: true }, admin: { type: Object, required: true }, - imprimirMensaje: { type: Function, required: true }, - imprimirWarning: { type: Function, required: true }, imprimirError: { type: Function, required: true }, updateIsLoading: { type: Function, required: true }, }, methods: { - obtenerYears() { - const now = new Date() - - for (let i = 2020; i <= now.getFullYear(); i++) this.years.push(i) - }, descargar() { this.updateIsLoading(true) axios @@ -80,9 +76,6 @@ export default { }) }, }, - created() { - if (this.admin.idTipoUsuario === 1) this.obtenerYears() - }, } diff --git a/components/admin/registros/gustavoBazPrada.vue b/components/admin/registros/gustavoBazPrada.vue index 6c553fe..acb7588 100644 --- a/components/admin/registros/gustavoBazPrada.vue +++ b/components/admin/registros/gustavoBazPrada.vue @@ -5,6 +5,7 @@ + @@ -30,23 +31,16 @@ import fileDownload from 'js-file-download' export default { data() { return { - years: [], selectedYearGustavoBaz: '', } }, props: { + years: { type: Array, required: true }, admin: { type: Object, required: true }, - imprimirMensaje: { type: Function, required: true }, - imprimirWarning: { type: Function, required: true }, imprimirError: { type: Function, required: true }, updateIsLoading: { type: Function, required: true }, }, methods: { - obtenerYears() { - const now = new Date() - - for (let i = 2020; i <= now.getFullYear(); i++) this.years.push(i) - }, descargar() { this.updateIsLoading(true) axios @@ -68,9 +62,6 @@ export default { }) }, }, - created() { - if (this.admin.idTipoUsuario === 1) this.obtenerYears() - }, } diff --git a/components/admin/registros/reporte.vue b/components/admin/registros/reporte.vue index 9a4ce9b..1fe5185 100644 --- a/components/admin/registros/reporte.vue +++ b/components/admin/registros/reporte.vue @@ -40,16 +40,14 @@ import fileDownload from 'js-file-download' export default { data() { return { - selectedInicio: [], selectedFin: [], - minDate: new Date('January 1, 2020'), + selectedInicio: [], maxDate: new Date(), + minDate: new Date('January 1, 2020'), } }, props: { admin: { type: Object, required: true }, - imprimirMensaje: { type: Function, required: true }, - imprimirWarning: { type: Function, required: true }, imprimirError: { type: Function, required: true }, updateIsLoading: { type: Function, required: true }, }, diff --git a/pages/admin/casos_especiales/caso_especial/editar/index.vue b/pages/admin/casos_especiales/caso_especial/editar/index.vue index 3ad0b3c..9eb52f1 100644 --- a/pages/admin/casos_especiales/caso_especial/editar/index.vue +++ b/pages/admin/casos_especiales/caso_especial/editar/index.vue @@ -23,8 +23,8 @@ export default { }, data() { return { - admin: {}, isLoading: false, + admin: {}, } }, methods: { diff --git a/pages/admin/registros/index.vue b/pages/admin/registros/index.vue index 6698dfa..901f8c4 100644 --- a/pages/admin/registros/index.vue +++ b/pages/admin/registros/index.vue @@ -5,25 +5,23 @@

Reportes

@@ -35,26 +33,32 @@