Fixed error with numbers sidebaar not updating

This commit is contained in:
2025-09-04 11:23:18 -04:00
parent dc1ee95827
commit 1531b0f240
11 changed files with 67 additions and 42 deletions

View File

@@ -102,7 +102,9 @@ export default defineComponent({
created() {
this.userStatus();
},
mounted() {
this.updatestatus();
},
methods: {
userStatus() {
let path = import.meta.env.VITE_BASE_URL + '/auth/whoami';
@@ -122,9 +124,18 @@ export default defineComponent({
this.$router.push('/login');
}
})
},
updatestatus() {
let path = import.meta.env.VITE_BASE_URL + '/delivery/updatestatus';
axios({
method: 'get',
url: path,
headers: authHeader(),
}).then((response: any) => {
if (response.data.update)
console.log("Updated Status of Deliveries")
})
},
logout() {
console.log("Logging out...");
// Clear auth data