[WIP] Правка placeholder адреса

This commit is contained in:
megavrilinvv
2022-12-07 14:04:51 +03:00
parent 463a54b7e3
commit a4240f3651
4 changed files with 22 additions and 12 deletions

View File

@@ -104,11 +104,14 @@ export default {
saveEmployeesData(res) {
this.employeesData = res.results;
},
logout() {
localStorage.removeItem("tokenAccess");
this.$router.push("/login");
},
fetchEmployeesData() {
fetchWrapper.get("general/employee/").then((res) => {
if (res.type === "client_error") {
localStorage.removeItem("tokenAccess");
return this.$router.push("/login");
this.logout();
} else this.saveEmployeesData(res);
});
},