manejo de usuarios

This commit is contained in:
2022-04-19 20:43:49 -05:00
parent a55f45cafd
commit 153f2da1f7
21 changed files with 922 additions and 56 deletions

View File

@@ -32,8 +32,8 @@ function fechaString() {
let data = new Date();
let year = data.getFullYear();
let month =
data.getMonth() + 1 < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
let day = data.getDate() < 9 ? "0" + data.getDate() : data.getDate();
data.getMonth() + 1 <= 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
let day = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
let dataF = `${year}-${month}-${day}`;
return dataF;
}
@@ -84,7 +84,11 @@ export const actions = {
localStorage.clear();
const auth = {};
this.commit("setAuth", auth);
window.location.href = "/login";
});
},
salir(){
localStorage.clear();
console.log("saliendo")
}
};