add new event and attendance table with automatic now timestamp
All checks were successful
Build Quasar SPA and Go Backend for memberApp / build-spa (push) Successful in 2m34s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, .exe, windows) (push) Successful in 5m39s
Build Quasar SPA and Go Backend for memberApp / build-backend (amd64, , linux) (push) Successful in 5m46s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm, 6, , linux) (push) Successful in 5m32s
Build Quasar SPA and Go Backend for memberApp / build-backend (arm64, , linux) (push) Successful in 5m35s

This commit is contained in:
Adrian Zürcher
2025-11-04 10:59:56 +01:00
parent 632163d751
commit aec741f094
39 changed files with 1343 additions and 229 deletions

View File

@@ -32,7 +32,7 @@ export function useLogin() {
const resp = await appApi.get('/login/me');
await userStore
.setUser({ id: resp.data.id, username: resp.data.user, role: resp.data.role })
.catch((err) => console.log(err));
.catch((err) => NotifyResponse(err, 'error'));
startRefreshInterval();
return true;
@@ -48,6 +48,7 @@ export function useLogin() {
});
userStore.clearUser();
sessionStorage.clear();
stopRefreshInterval();
}
@@ -60,7 +61,7 @@ export function useLogin() {
.then((resp) => {
userStore
.setUser({ id: resp.data.id, username: resp.data.user, role: resp.data.role })
.catch((err) => console.error(err));
.catch((err) => NotifyResponse(err, 'error'));
if (!intervalId) {
startRefreshInterval();
}
@@ -74,9 +75,6 @@ export function useLogin() {
stopRefreshInterval();
return false;
}
function getUser() {
return userStore.user;
}
function startRefreshInterval() {
intervalId = setInterval(() => {
@@ -90,5 +88,5 @@ export function useLogin() {
}
}
return { login, logout, refresh, getUser };
return { login, logout, refresh };
}