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
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:
@@ -9,7 +9,7 @@
|
||||
:no-data-label="$t('noDataAvailable')"
|
||||
:loading-label="$t('loading')"
|
||||
:rows-per-page-label="$t('recordsPerPage')"
|
||||
:selected-rows-label="(val) => val + $t('recordSelected')"
|
||||
:selected-rows-label="(val) => val + ' ' + $t('recordSelected')"
|
||||
:rows="roles"
|
||||
:columns="columns"
|
||||
row-key="id"
|
||||
@@ -151,7 +151,6 @@ import EditAllDialog from 'src/components/RoleEditAllDialog.vue';
|
||||
import OkDialog from 'src/components/dialog/OkDialog.vue';
|
||||
import { useNotify } from 'src/vueLib/general/useNotify';
|
||||
import { useRoleTable } from './RoleTable';
|
||||
import { useLogin } from 'src/vueLib/login/useLogin';
|
||||
import { i18n } from 'src/boot/lang';
|
||||
import { QTable } from 'quasar';
|
||||
import { useUserStore } from 'src/vueLib/login/userStore';
|
||||
@@ -173,9 +172,8 @@ const { roles, pagination, loading, columns, updateRoles } = useRoleTable();
|
||||
//load on mounting page
|
||||
onMounted(() => {
|
||||
loading.value = true;
|
||||
const login = useLogin();
|
||||
currentUser.value = login.getUser();
|
||||
updateRoles().catch((err) => console.error(err));
|
||||
currentUser.value = user.user;
|
||||
updateRoles().catch((err) => NotifyResponse(err, 'error'));
|
||||
});
|
||||
|
||||
function autorized(role: Role): boolean {
|
||||
@@ -217,12 +215,12 @@ function removeRole(...removeRoles: Roles) {
|
||||
|
||||
appApi
|
||||
.post('roles/delete?role=' + currentUser.value.role, { roles: roles })
|
||||
.then((resp) => {
|
||||
updateRoles().catch((err) => console.error(err));
|
||||
.then(() => {
|
||||
updateRoles().catch((err) => NotifyResponse(err, 'error'));
|
||||
if (roles.length === 1) {
|
||||
NotifyResponse("'" + roles[0] + "' " + i18n.global.t('deleted'), 'warning');
|
||||
} else {
|
||||
NotifyResponse(resp.data, 'warning');
|
||||
NotifyResponse(i18n.global.t('deleteRoles'), 'warning');
|
||||
}
|
||||
selected.value = [];
|
||||
})
|
||||
@@ -231,15 +229,6 @@ function removeRole(...removeRoles: Roles) {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function getSelected(): Roles {
|
||||
if (selected.value.length === 0) return [];
|
||||
return selected.value;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getSelected,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user