prettier all files

This commit is contained in:
Tim Gröger 2021-01-27 08:16:44 +01:00
parent 91200f277c
commit 693b6a11d3
18 changed files with 126 additions and 198 deletions

View File

@ -9,6 +9,6 @@ export default defineComponent({
name: 'EmptyParent',
setup() {
return {};
},
}
});
</script>

View File

@ -49,18 +49,14 @@ export default defineComponent({
if (props.title.includes('loadFromStore')) {
const startIndex = props.title.indexOf('(') + 1;
const endIndex = props.title.indexOf(')');
const substring = props.title
.substring(startIndex, endIndex)
.replace(/"/g, '');
const substring = props.title.substring(startIndex, endIndex).replace(/"/g, '');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return <string>root.$store.getters[substring];
}
return props.title;
});
const isGranted = computed(() =>
hasPermissions(props.permissions || [], root.$store)
);
const isGranted = computed(() => hasPermissions(props.permissions || [], root.$store));
return { realTitle: title, isGranted };
}

View File

@ -22,9 +22,7 @@ export default defineComponent({
}
},
setup(props, { root }) {
const isGranted = computed(() =>
hasPermissions(props.permissions || [], root.$store)
);
const isGranted = computed(() => hasPermissions(props.permissions || [], root.$store));
return { isGranted };
}
});

View File

@ -49,18 +49,18 @@ export default defineComponent({
name: 'IsoDateInput',
props: {
value: {
required: true,
required: true
},
label: {},
readonly: {
default: false,
default: false
},
type: {
default: 'date',
validator: function(value: string) {
return ['date', 'time', 'datetime'].indexOf(value) !== -1;
},
},
}
}
},
setup(props: Props, { emit }: { emit: any }) {
function getDateTime() {
@ -183,8 +183,8 @@ export default defineComponent({
rules,
timeChanged,
placeholder,
dateTimeChanged,
dateTimeChanged
};
},
}
});
</script>

View File

@ -112,23 +112,23 @@ const links = [
name: 'about',
title: 'Über Flaschengeist',
link: 'about',
icon: 'mdi-information',
},
icon: 'mdi-information'
}
];
const shortcuts = [
{
link: 'about',
icon: 'mdi-information',
icon: 'mdi-information'
},
{
link: 'user',
icon: 'mdi-account',
icon: 'mdi-account'
},
{
link: 'user-plugin1',
icon: 'mdi-account-plus',
},
icon: 'mdi-account-plus'
}
];
declare module 'vue/types/vue' {
@ -146,7 +146,7 @@ export default defineComponent({
const leftDrawerOpen = ref(
computed({
get: () => (leftDrawer.value || Screen.gt.sm ? true : false),
set: (val: boolean) => (leftDrawer.value = val),
set: (val: boolean) => (leftDrawer.value = val)
})
);
const leftDrawerMini = ref(false);
@ -177,9 +177,7 @@ export default defineComponent({
function logout() {
Loading.show({ message: 'Session wird abgemeldet' });
(<Store<StateInterface>>ctx.root.$store)
.dispatch('session/logout')
.finally(() => {
(<Store<StateInterface>>ctx.root.$store).dispatch('session/logout').finally(() => {
Loading.hide();
});
}
@ -191,8 +189,8 @@ export default defineComponent({
links,
pluginChildLinks,
shortcuts,
logout,
logout
};
},
}
});
</script>

View File

@ -49,6 +49,6 @@ import ShortCutLink from 'components/navigation/ShortCutLink.vue';
export default defineComponent({
name: 'OutLayout',
components: { ShortCutLink },
components: { ShortCutLink }
});
</script>

View File

@ -4,11 +4,7 @@
style="grid-auto-rows: 1fr;"
class="fit row justify-around items-start q-col-gutter-sm"
>
<div
v-for="(item, index) in widgets"
:key="index"
class="col-4 full-height col-sm-6 col-xs-12"
>
<div v-for="(item, index) in widgets" :key="index" class="col-4 full-height col-sm-6 col-xs-12">
<component v-bind:is="item" />
</div>
</q-page>
@ -25,15 +21,14 @@ export default defineComponent({
const widgets = ref<Array<AsyncComponentPromise>>([]);
onMounted(() => {
root.$flaschengeistPlugins.widgets.forEach((widget) => {
if (hasPermissions(widget.permissions, root.$store))
widgets.value.push(widget.widget);
root.$flaschengeistPlugins.widgets.forEach(widget => {
if (hasPermissions(widget.permissions, root.$store)) widgets.value.push(widget.widget);
});
});
return {
widgets,
widgets
};
},
}
});
</script>

View File

@ -12,14 +12,16 @@
fill="white"
>
<g>
<circle
cx="87.493"
cy="25.907"
r="25.907"
<circle cx="87.493" cy="25.907" r="25.907" />
<path
d="m194.386,209.531l-42.802-36.895c-1.825-1.573-4.001-2.683-6.345-3.237l-72.533-17.136 47.755,.703v-34.439l-46.525-26.18 50.36,14.829c4.016,1.182 8.356,0.276 11.564-2.414l38.264-32.093c1.1-0.923 2.001-1.994 2.698-3.161 2.656-4.442 2.36-10.26-1.154-14.449-4.437-5.29-12.32-5.981-17.61-1.544l-33.127,27.785-45.605-13.428 41.402,1.292 16.027-13.442-6.021-2.955-3.631,3.945-18.134,2.86h-37.216c-9.665,0-17.501,7.835-17.501,17.501v90.395l.029-.024c0.252,6.569 4.819,12.433 11.527,14.019l68.966,16.292 40.024,34.501c2.834,2.442 6.318,3.639 9.787,3.639 4.213,0 8.402-1.765 11.368-5.206 5.41-6.278 4.708-15.75-1.567-21.158z"
/>
<path
d="m233.888,50.21l-43.49-21.349c-2.17-1.065-4.545-1.612-6.94-1.612-0.861,0-1.724,0.071-2.581,0.213l-13.243,2.2-24.213-11.886c-6.197-3.043-13.688-0.485-16.728,5.713-3.042,6.197-0.484,13.687 5.713,16.729l14.402,7.069 3.539-2.969c4.405-3.694 9.994-5.729 15.738-5.729 7.266,0 14.11,3.192 18.777,8.756 6.702,7.991 7.61,19.371 2.258,28.32-0.529,0.884-1.127,1.717-1.759,2.523l28.035,13.762c0.916,0.45 1.914,0.664 2.967,0.664 5.79,0 13.263-6.495 18.05-16.247 5.66-11.524 5.424-23.236-0.525-26.157z"
/>
<path
d="m102.363,202.426l2.531,6.9-13.835,65.324c-1.716,8.105 3.463,16.065 11.567,17.782 1.048,0.222 2.092,0.328 3.122,0.328 6.936-0.001 13.165-4.839 14.66-11.896l14.265-67.357-5.513-4.752-26.797-6.329z"
/>
<path d="m194.386,209.531l-42.802-36.895c-1.825-1.573-4.001-2.683-6.345-3.237l-72.533-17.136 47.755,.703v-34.439l-46.525-26.18 50.36,14.829c4.016,1.182 8.356,0.276 11.564-2.414l38.264-32.093c1.1-0.923 2.001-1.994 2.698-3.161 2.656-4.442 2.36-10.26-1.154-14.449-4.437-5.29-12.32-5.981-17.61-1.544l-33.127,27.785-45.605-13.428 41.402,1.292 16.027-13.442-6.021-2.955-3.631,3.945-18.134,2.86h-37.216c-9.665,0-17.501,7.835-17.501,17.501v90.395l.029-.024c0.252,6.569 4.819,12.433 11.527,14.019l68.966,16.292 40.024,34.501c2.834,2.442 6.318,3.639 9.787,3.639 4.213,0 8.402-1.765 11.368-5.206 5.41-6.278 4.708-15.75-1.567-21.158z" />
<path d="m233.888,50.21l-43.49-21.349c-2.17-1.065-4.545-1.612-6.94-1.612-0.861,0-1.724,0.071-2.581,0.213l-13.243,2.2-24.213-11.886c-6.197-3.043-13.688-0.485-16.728,5.713-3.042,6.197-0.484,13.687 5.713,16.729l14.402,7.069 3.539-2.969c4.405-3.694 9.994-5.729 15.738-5.729 7.266,0 14.11,3.192 18.777,8.756 6.702,7.991 7.61,19.371 2.258,28.32-0.529,0.884-1.127,1.717-1.759,2.523l28.035,13.762c0.916,0.45 1.914,0.664 2.967,0.664 5.79,0 13.263-6.495 18.05-16.247 5.66-11.524 5.424-23.236-0.525-26.157z" />
<path d="m102.363,202.426l2.531,6.9-13.835,65.324c-1.716,8.105 3.463,16.065 11.567,17.782 1.048,0.222 2.092,0.328 3.122,0.328 6.936-0.001 13.165-4.839 14.66-11.896l14.265-67.357-5.513-4.752-26.797-6.329z" />
</g>
</svg>
</div>
@ -27,7 +29,8 @@
Der Admin is über's Kabel gestolpert!
</div>
<div>
Aktuell kann der Backend Server nicht erreicht werden, wir versuchen es in {{reload}} Sekunden erneut.
Aktuell kann der Backend Server nicht erreicht werden, wir versuchen es in
{{ reload }} Sekunden erneut.
</div>
</div>
</div>
@ -49,6 +52,6 @@ export default defineComponent({
}, 1000);
onUnmounted(() => clearInterval(ival));
return { reload };
},
}
});
</script>

View File

@ -2,12 +2,26 @@
<div class="fullscreen bg-blue text-white text-center q-pa-md flex flex-center">
<div>
<div>
<svg style="max-width: 400px;" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 292.761 292.761" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 292.761 292.761" fill="white">
<svg
style="max-width: 400px;"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 292.761 292.761"
xmlns:xlink="http://www.w3.org/1999/xlink"
enable-background="new 0 0 292.761 292.761"
fill="white"
>
<g>
<circle cx="87.493" cy="25.907" r="25.907" />
<path d="m194.386,209.531l-42.802-36.895c-1.825-1.573-4.001-2.683-6.345-3.237l-72.533-17.136 47.755,.703v-34.439l-46.525-26.18 50.36,14.829c4.016,1.182 8.356,0.276 11.564-2.414l38.264-32.093c1.1-0.923 2.001-1.994 2.698-3.161 2.656-4.442 2.36-10.26-1.154-14.449-4.437-5.29-12.32-5.981-17.61-1.544l-33.127,27.785-45.605-13.428 41.402,1.292 16.027-13.442-6.021-2.955-3.631,3.945-18.134,2.86h-37.216c-9.665,0-17.501,7.835-17.501,17.501v90.395l.029-.024c0.252,6.569 4.819,12.433 11.527,14.019l68.966,16.292 40.024,34.501c2.834,2.442 6.318,3.639 9.787,3.639 4.213,0 8.402-1.765 11.368-5.206 5.41-6.278 4.708-15.75-1.567-21.158z"/>
<path d="m233.888,50.21l-43.49-21.349c-2.17-1.065-4.545-1.612-6.94-1.612-0.861,0-1.724,0.071-2.581,0.213l-13.243,2.2-24.213-11.886c-6.197-3.043-13.688-0.485-16.728,5.713-3.042,6.197-0.484,13.687 5.713,16.729l14.402,7.069 3.539-2.969c4.405-3.694 9.994-5.729 15.738-5.729 7.266,0 14.11,3.192 18.777,8.756 6.702,7.991 7.61,19.371 2.258,28.32-0.529,0.884-1.127,1.717-1.759,2.523l28.035,13.762c0.916,0.45 1.914,0.664 2.967,0.664 5.79,0 13.263-6.495 18.05-16.247 5.66-11.524 5.424-23.236-0.525-26.157z"/>
<path d="m102.363,202.426l2.531,6.9-13.835,65.324c-1.716,8.105 3.463,16.065 11.567,17.782 1.048,0.222 2.092,0.328 3.122,0.328 6.936-0.001 13.165-4.839 14.66-11.896l14.265-67.357-5.513-4.752-26.797-6.329z"/>
<path
d="m194.386,209.531l-42.802-36.895c-1.825-1.573-4.001-2.683-6.345-3.237l-72.533-17.136 47.755,.703v-34.439l-46.525-26.18 50.36,14.829c4.016,1.182 8.356,0.276 11.564-2.414l38.264-32.093c1.1-0.923 2.001-1.994 2.698-3.161 2.656-4.442 2.36-10.26-1.154-14.449-4.437-5.29-12.32-5.981-17.61-1.544l-33.127,27.785-45.605-13.428 41.402,1.292 16.027-13.442-6.021-2.955-3.631,3.945-18.134,2.86h-37.216c-9.665,0-17.501,7.835-17.501,17.501v90.395l.029-.024c0.252,6.569 4.819,12.433 11.527,14.019l68.966,16.292 40.024,34.501c2.834,2.442 6.318,3.639 9.787,3.639 4.213,0 8.402-1.765 11.368-5.206 5.41-6.278 4.708-15.75-1.567-21.158z"
/>
<path
d="m233.888,50.21l-43.49-21.349c-2.17-1.065-4.545-1.612-6.94-1.612-0.861,0-1.724,0.071-2.581,0.213l-13.243,2.2-24.213-11.886c-6.197-3.043-13.688-0.485-16.728,5.713-3.042,6.197-0.484,13.687 5.713,16.729l14.402,7.069 3.539-2.969c4.405-3.694 9.994-5.729 15.738-5.729 7.266,0 14.11,3.192 18.777,8.756 6.702,7.991 7.61,19.371 2.258,28.32-0.529,0.884-1.127,1.717-1.759,2.523l28.035,13.762c0.916,0.45 1.914,0.664 2.967,0.664 5.79,0 13.263-6.495 18.05-16.247 5.66-11.524 5.424-23.236-0.525-26.157z"
/>
<path
d="m102.363,202.426l2.531,6.9-13.835,65.324c-1.716,8.105 3.463,16.065 11.567,17.782 1.048,0.222 2.092,0.328 3.122,0.328 6.936-0.001 13.165-4.839 14.66-11.896l14.265-67.357-5.513-4.752-26.797-6.329z"
/>
</g>
</svg>
</div>
@ -15,7 +29,8 @@
Der Admin war betrunken!!
</div>
<div>
Einige Plugins konnten nicht geladen werden.<br />Sollte diese Seite jemals auftauchen, kontaktiere einen nüchternen Admin.
Einige Plugins konnten nicht geladen werden.<br />Sollte diese Seite jemals auftauchen,
kontaktiere einen nüchternen Admin.
</div>
</div>
</div>
@ -26,9 +41,7 @@ import {defineComponent} from '@vue/composition-api';
export default defineComponent({
name: 'PluginError.vue'
})
});
</script>
<style scoped>
</style>
<style scoped></style>

View File

@ -17,15 +17,13 @@
</div>
</div>
<div class="col-12 text-center q-ma-sm" style="max-width: 600px;">
Flaschengeist ist ein dynamischen Managementsystem für Studentenclubs.
Es ermöglicht unter anderem die Mitgliederverwaltung, Dienstverwaltung,
Arbeitsgruppenverwaltung und vieles meher. Es kann fast alles ermöglich
werden, wenn ein Plugin dafür geschrieben wird. Jeder Club hat die
Möglichkeit sein eigenes Flaschengeist zu hosten. Ziel ist später
Flaschengeist ist ein dynamischen Managementsystem für Studentenclubs. Es ermöglicht unter
anderem die Mitgliederverwaltung, Dienstverwaltung, Arbeitsgruppenverwaltung und vieles
meher. Es kann fast alles ermöglich werden, wenn ein Plugin dafür geschrieben wird. Jeder
Club hat die Möglichkeit sein eigenes Flaschengeist zu hosten. Ziel ist später
Clubübergreifend dezentralisiert miteinander zu arbeiten.
</div>
<q-separator />
<div class="col-12 text-h6 q-pa-sm" v-if="$route.name == 'about'">
Geladene Plugins:
@ -49,9 +47,7 @@
Entwickler:
</div>
<div
class="fit row inline wrap justify-around items-start content-start"
>
<div class="fit row inline wrap justify-around items-start content-start">
<developer
v-for="(developer, index) in developers"
:key="'dev' + index"

View File

@ -3,10 +3,7 @@
<q-page padding v-if="checkMain">
<q-card>
<q-card-section>
<q-list
v-for="(mainRoute, index) in mainRoutes"
:key="'mainRoute' + index"
>
<q-list v-for="(mainRoute, index) in mainRoutes" :key="'mainRoute' + index">
<essential-link
v-for="(route, index2) in mainRoute.children"
:key="'route' + index2"

View File

@ -5,16 +5,10 @@
Benutzereinstellungen
</div>
<div class="col-xs-12 col-sm-6 q-pa-sm">
<UserSelector
:user="user"
@update:user="userUpdated"
/>
<UserSelector :user="user" @update:user="userUpdated" />
</div>
</q-card-section>
<MainUserSettings
:user="user"
@update:user="updateUser"
/>
<MainUserSettings :user="user" @update:user="updateUser" />
</q-card>
</template>
@ -39,7 +33,7 @@ export default defineComponent({
};
function updateUser(value: FG.User) {
store.dispatch('user/updateUser', value).catch((error) => {
store.dispatch('user/updateUser', value).catch(error => {
console.warn(error);
});
}
@ -47,9 +41,9 @@ export default defineComponent({
return {
user,
userUpdated,
updateUser,
updateUser
};
},
}
});
</script>

View File

@ -9,12 +9,16 @@
</div>
</div>
<div class="col-8">
<span class="text-h6">Hallo {{ name }}</span><br />
<span class="text-h6">Hallo {{ name }}</span
><br />
<span v-if="hasBirthday">Herzlichen Glückwunsch zum Geburtstag!<br /></span>
<span v-if="birthday.length > 0">Heute <span v-if="birthday.length === 1">hat </span><span v-else>haben </span><span
v-for="(user, index) in birthday"
v-bind:key="index"
>{{user.display_name}}<span v-if="index < (birthday.length-1)">, </span></span> Geburtstag.</span>
<span v-if="birthday.length > 0"
>Heute <span v-if="birthday.length === 1">hat </span><span v-else>haben </span
><span v-for="(user, index) in birthday" v-bind:key="index"
>{{ user.display_name }}<span v-if="index < birthday.length - 1">, </span></span
>
Geburtstag.</span
>
<span v-else>Heute stehen keine Geburtstage an</span>
</div>
</q-card-section>
@ -22,12 +26,7 @@
</template>
<script lang="ts">
import {
computed,
defineComponent,
onMounted,
ref,
} from '@vue/composition-api';
import { computed, defineComponent, onMounted, ref } from '@vue/composition-api';
import { Store } from 'vuex';
import { StateInterface } from 'src/store';
@ -57,10 +56,10 @@ export default defineComponent({
const birthday = computed(() =>
store.state.user.users
.filter(userHasBirthday)
.filter((user) => user.userid !== store.state.user.currentUser?.userid)
.filter(user => user.userid !== store.state.user.currentUser?.userid)
);
return { avatarLink, name, hasBirthday, birthday };
},
}
});
</script>

View File

@ -2,9 +2,7 @@
<div>
<q-card class="col-12">
<q-form @submit="save" @reset="reset">
<q-card-section
class="fit row justify-start content-center items-center"
>
<q-card-section class="fit row justify-start content-center items-center">
<span class="col-xs-12 col-sm-6 text-center text-h6">
Rollen und Berechtigungen
</span>
@ -26,17 +24,9 @@
/>
</q-card-section>
<q-separator />
<q-card-section
v-if="role"
class="fit row justify-start content-center items-center"
>
<q-card-section v-if="role" class="fit row justify-start content-center items-center">
<q-scroll-area style="height: 20em; width: 100%">
<q-input
filled
v-model="newRoleName"
label="neuer Name"
v-if="role.id != -1"
/>
<q-input filled v-model="newRoleName" label="neuer Name" v-if="role.id != -1" />
<q-option-group
:value="role.permissions"
@input="updatePermissions"
@ -57,12 +47,7 @@
</template>
<script lang="ts">
import {
computed,
defineComponent,
ref,
onBeforeMount,
} from '@vue/composition-api';
import { computed, defineComponent, ref, onBeforeMount } from '@vue/composition-api';
import { Store } from 'vuex';
import { StateInterface } from 'src/store';
@ -72,10 +57,10 @@ export default defineComponent({
const store = <Store<StateInterface>>root.$store;
onBeforeMount(() => {
store.dispatch('user/getRoles').catch((error) => {
store.dispatch('user/getRoles').catch(error => {
console.warn(error);
});
store.dispatch('user/getPermissions').catch((error) => {
store.dispatch('user/getPermissions').catch(error => {
console.warn(error);
});
});
@ -83,20 +68,17 @@ export default defineComponent({
const role = ref<FG.Role | null>(null);
const roles = computed(() => store.state.user.roles);
const permissions = computed(() =>
store.state.user.permissions.map((perm) => {
store.state.user.permissions.map(perm => {
return {
value: perm,
label: perm,
label: perm
};
})
);
const newRoleName = ref<string>('');
function createRole(
name: string,
done: (arg0: string, arg1: string) => void
): void {
function createRole(name: string, done: (arg0: string, arg1: string) => void): void {
role.value = { name: name, permissions: [], id: -1 };
done(name, 'add-unique');
}
@ -116,16 +98,14 @@ export default defineComponent({
role.value = {
id: rl.id,
name: rl.name,
permissions: Array.from(rl.permissions),
permissions: Array.from(rl.permissions)
};
}
function save() {
if (role.value) {
if (role.value.id === -1)
void store
.dispatch('user/newRole', role.value)
.then((createdRole: FG.Role) => {
void store.dispatch('user/newRole', role.value).then((createdRole: FG.Role) => {
console.log(createdRole);
role.value = createdRole;
});
@ -139,9 +119,7 @@ export default defineComponent({
function reset() {
if (role.value && role.value.id !== -1) {
const original = roles.value.find(
(value) => value.name === role.value?.name
);
const original = roles.value.find(value => value.name === role.value?.name);
if (original) updateRole(original);
} else {
role.value = null;
@ -156,7 +134,7 @@ export default defineComponent({
store
.dispatch('user/deleteRole', role.value)
.then(() => (role.value = null))
.catch((error) => console.warn(error));
.catch(error => console.warn(error));
}
}
}
@ -172,8 +150,8 @@ export default defineComponent({
reset,
removeRole,
remove,
newRoleName,
newRoleName
};
},
}
});
</script>

View File

@ -21,19 +21,11 @@
Lebenszeit:
{{ session.lifetime }}
</div>
<div class="col-xs-12 col-sm-6">
Läuft aus: {{ session.expires | dateTime(true) }}
</div>
<div class="col-xs-12 col-sm-6">Läuft aus: {{ session.expires | dateTime(true) }}</div>
</div>
</q-card-section>
<q-card-actions align="right">
<q-btn
flat
round
dense
icon="mdi-delete"
@click="deleteSession(session.token)"
/>
<q-btn flat round dense icon="mdi-delete" @click="deleteSession(session.token)" />
</q-card-actions>
</q-card>
</template>

View File

@ -1,9 +1,6 @@
<template>
<div>
<q-tabs
v-model="tab"
v-if="$q.screen.gt.sm"
>
<q-tabs v-model="tab" v-if="$q.screen.gt.sm">
<q-tab
v-for="(tabindex, index) in tabs"
:key="'tab' + index"
@ -11,23 +8,10 @@
:label="tabindex.label"
/>
</q-tabs>
<div
class="fit row justify-end"
v-else
>
<q-btn
flat
round
icon="mdi-menu"
@click="showDrawer = !showDrawer"
/>
<div class="fit row justify-end" v-else>
<q-btn flat round icon="mdi-menu" @click="showDrawer = !showDrawer" />
</div>
<q-drawer
side="right"
v-model="showDrawer"
@click="showDrawer = !showDrawer"
behavior="mobile"
>
<q-drawer side="right" v-model="showDrawer" @click="showDrawer = !showDrawer" behavior="mobile">
<q-list v-model="tab">
<q-item
v-for="(tabindex, index) in tabs"
@ -40,10 +24,7 @@
</q-item>
</q-list>
</q-drawer>
<q-page
padding
class="fit row justify-center content-start items-start q-gutter-sm"
>
<q-page padding class="fit row justify-center content-start items-start q-gutter-sm">
<q-tab-panels
v-model="tab"
style="background-color: transparent;"
@ -81,9 +62,7 @@ export default defineComponent({
setup(_, { root }) {
const store = <Store<StateInterface>>root.$store;
const canEditRoles = computed(() =>
hasPermission(PERMISSIONS.ROLES_EDIT, store)
);
const canEditRoles = computed(() => hasPermission(PERMISSIONS.ROLES_EDIT, store));
interface Tab {
name: string;
@ -93,7 +72,7 @@ export default defineComponent({
const tabs: Tab[] = [
{ name: 'user', label: 'Mitglieder' },
{ name: 'newUser', label: 'Neues Mitglied' },
{ name: 'roles', label: 'Rollen' },
{ name: 'roles', label: 'Rollen' }
];
const drawer = ref<boolean>(false);
@ -104,7 +83,7 @@ export default defineComponent({
},
set: (val: boolean) => {
drawer.value = val;
},
}
});
const tab = ref<string>('user');
@ -113,8 +92,8 @@ export default defineComponent({
canEditRoles,
showDrawer,
tab,
tabs,
tabs
};
},
}
});
</script>

View File

@ -3,10 +3,7 @@
<q-page padding v-if="checkMain">
<q-card>
<q-card-section>
<q-list
v-for="(mainRoute, index) in mainRoutes"
:key="'mainRoute' + index"
>
<q-list v-for="(mainRoute, index) in mainRoutes" :key="'mainRoute' + index">
<essential-link
v-for="(route, index2) in mainRoute.children"
:key="'route' + index2"

View File

@ -14,12 +14,7 @@
</template>
<script lang="ts">
import {
computed,
defineComponent,
onBeforeMount,
ref
} from '@vue/composition-api';
import { computed, defineComponent, onBeforeMount, ref } from '@vue/composition-api';
import Sessions from '../components/settings/Sessions.vue';
import MainUserSettings from '../components/settings/MainUserSettings.vue';
import { Store } from 'vuex';
@ -40,9 +35,7 @@ export default defineComponent({
const currentUser = ref(<FG.User>store.state.user.currentUser);
const sessions = computed(() => store.state.session.sessions);
const loading = computed(
() => store.state.session.loading || store.state.user.loading > 0
);
const loading = computed(() => store.state.session.loading || store.state.user.loading > 0);
function updateUser(value: FG.User) {
store.dispatch('user/updateUser', value).catch(error => {
console.warn(error);