diff --git a/components/responsable/cartaAceptacion.vue b/components/responsable/cartaAceptacion.vue index 65f0232..77cadc3 100644 --- a/components/responsable/cartaAceptacion.vue +++ b/components/responsable/cartaAceptacion.vue @@ -10,6 +10,7 @@

{{ file.name || "Arrastra aquí tu archivo o da click para buscar"}}

+

Tamaño máximo para el archivo: 20MB

@@ -32,6 +33,27 @@ export default { return { file: '' } + }, + methods: { + validarTamaño () { + const TamMax = 20000000 + const archivo = this.file + if (archivo.size > TamMax) { + this.toast() + this.file = '' + } + }, + toast () { + this.$buefy.toast.open({ + message: 'El archivo excede el tamaño permitido', + type: 'is-danger' + }) + } + }, + watch: { + file: function (newFile, oldFile) { + this.validarTamaño() + } } } diff --git a/components/responsable/cartaTermino.vue b/components/responsable/cartaTermino.vue index 54dd2aa..2f78a4b 100644 --- a/components/responsable/cartaTermino.vue +++ b/components/responsable/cartaTermino.vue @@ -5,12 +5,13 @@
-
+

{{ file.name || "Arrastra aquí tu archivo o da click para buscar"}}

-
+

Tamaño máximo para el archivo: 20MB

+
@@ -21,7 +22,9 @@ class="border-info my-5 is-medium" type="is-info" tag="router-link" - to="/responsable">Enviar + to="/responsable"> + Enviar + @@ -33,6 +36,27 @@ export default { return { file: '' } + }, + methods: { + validarTamaño () { + const TamMax = 20000000 + const archivo = this.file + if (archivo.size > TamMax) { + this.toast() + this.file = '' + } + }, + toast () { + this.$buefy.toast.open({ + message: 'El archivo excede el tamaño permitido', + type: 'is-danger' + }) + } + }, + watch: { + file: function (newFile, oldFile) { + this.validarTamaño() + } } } diff --git a/components/responsable/inputTable.vue b/components/responsable/inputTable.vue index 7e54298..5d10c85 100644 --- a/components/responsable/inputTable.vue +++ b/components/responsable/inputTable.vue @@ -80,16 +80,16 @@ {{ props.row.carrera}} - {{ fecha(props.row.fechaInicio) }} + {{props.row.fechaInicio}} {{ fecha(props.row.fechaInicio) }} - {{ fecha(props.row.fechaFin) }} + {{props.row.fechaFin}} {{ fecha(props.row.fechaFin) }} - {{ fecha(props.row.fechaFin) }} - {{ props.row.status}} + {{ props.row.status }} + {{ props.row.status}} diff --git a/pages/admin/index.vue b/pages/admin/index.vue index cfbcd92..8417ae0 100644 --- a/pages/admin/index.vue +++ b/pages/admin/index.vue @@ -3,7 +3,9 @@
- + Ver programas