change meseje of bannerss image

This commit is contained in:
2021-01-12 18:05:28 -06:00
parent 76537e91b2
commit 2e7f9b5055
10 changed files with 40 additions and 11 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" type=image/png href=assets/icono.png><title>Portal Editorial Acatlán</title><link href=css/app.477deb9f.css rel=preload as=style><link href=css/chunk-vendors.138628b4.css rel=preload as=style><link href=js/app.fc7b6a75.js rel=preload as=script><link href=js/chunk-vendors.67046eec.js rel=preload as=script><link href=css/chunk-vendors.138628b4.css rel=stylesheet><link href=css/app.477deb9f.css rel=stylesheet></head><body><noscript><strong>We're sorry but portal doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.67046eec.js></script><script src=js/app.fc7b6a75.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" type=image/png href=assets/icono.png><title>Portal Editorial Acatlán</title><link href=css/app.f5c9348e.css rel=preload as=style><link href=css/chunk-vendors.138628b4.css rel=preload as=style><link href=js/app.8ca3399d.js rel=preload as=script><link href=js/chunk-vendors.67046eec.js rel=preload as=script><link href=css/chunk-vendors.138628b4.css rel=stylesheet><link href=css/app.f5c9348e.css rel=stylesheet></head><body><noscript><strong>We're sorry but portal doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.67046eec.js></script><script src=js/app.8ca3399d.js></script></body></html>
+2
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
+11 -2
View File
@@ -66,7 +66,7 @@ export default {
await axios.post( `${config.api}/eliminarImagenCarrusel`,{nombre: nombreImagenBanner} );
await swalWithBootstrapButtons.fire(
'Eliminado!',
'Se ha eliminado la imagen con exito.',
'Se ha eliminado la imagen con éxito.',
'success'
);
location.reload();
@@ -87,10 +87,19 @@ export default {
try{
let formData = new FormData();
let imagenBanner = document.querySelector('#nuevaImagenBanner');
console.log('tamaño: ',imagenBanner.files.length);
if(imagenBanner.files.length === 0){
Swal.fire(
'¿Aún no has seleccionado la imagen?',
'',
'question'
);
return;
}
formData.append("imagen", imagenBanner.files[0]);
await axios.post( `${config.api}/agregarImagenCarrusel`, formData ,{ headers: {'Content-Type': 'multipart/form-data'}} );
await Swal.fire(
'Imagen agregada con exito',
'Imagen agregada con éxito',
'',
'success'
);
+1 -1
View File
@@ -65,7 +65,7 @@ export default {
await axios.post( `${config.api}/eliminarLibro`,{idLibro: idLibro} );
await swalWithBootstrapButtons.fire(
'Eliminado!',
'Se ha eliminado el libro con exito.',
'Se ha eliminado el libro con éxito.',
'success'
);
location.reload();
+1 -1
View File
@@ -279,7 +279,7 @@ export default {
formData.append("type", 'editarLibro');
await axios.post( `${config.api}/actualizarLibro`, formData ,{ headers: { 'Content-Type': 'multipart/form-data' } });
await Swal.fire(
'Libro actualizado con exito',
'Libro actualizado con éxito',
'',
'success'
);
+22 -2
View File
@@ -51,14 +51,34 @@
</div>
</template>
<script>
import Swal from 'sweetalert2'
export default {
props:{
user: String
},
methods:{
cerrarSesion(){
localStorage.clear();
this.$router.replace('/login')
const swalWithBootstrapButtons = Swal.mixin({
customClass: {
confirmButton: 'btn btn-outline-success',
cancelButton: 'btn btn-outline-danger'
},
buttonsStyling: false
})
swalWithBootstrapButtons.fire({
title: '¿Estás seguro de que quieres cerrar la sesión?',
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'Si, salir',
cancelButtonText: 'No',
reverseButtons: true
}).then(async (result) => {
if (result.isConfirmed) {
localStorage.clear();
this.$router.replace('/login');
}
});
}
}
}