diff --git a/src/plugins/balance/components/BalanceAdd.vue b/src/plugins/balance/components/BalanceAdd.vue index a7e7d90..767cdd8 100644 --- a/src/plugins/balance/components/BalanceAdd.vue +++ b/src/plugins/balance/components/BalanceAdd.vue @@ -1,67 +1,59 @@ diff --git a/src/plugins/balance/routes/index.ts b/src/plugins/balance/routes/index.ts index e84aa82..358c7b0 100644 --- a/src/plugins/balance/routes/index.ts +++ b/src/plugins/balance/routes/index.ts @@ -7,32 +7,32 @@ const mainRoutes: FG_Plugin.PluginRouteConfig[] = [ icon: 'mdi-cash-100', path: 'balance', name: 'balance', - redirect: { name: 'balance-add' }, + redirect: { name: 'balance-view' }, meta: { permissions: ['user'] }, children: [ { - title: 'Anschreiben', + title: 'Übersicht', icon: 'mdi-cash-plus', - path: 'add', - name: 'balance-add', - shortcut: true, - meta: { permissions: [permissions.DEBIT_OWN, permissions.SHOW] }, - component: () => import('../pages/Add.vue') + path: 'overview', + name: 'balance-view', + meta: { permissions: [permissions.SHOW] }, + component: () => import('../pages/Overview.vue') }, { - title: 'Übertragen', - icon: 'mdi-cash-refund', - path: 'transfer', - name: 'balance-transfer', - meta: { permissions: [permissions.SEND] }, - component: () => import('../pages/Transfer.vue') + title: 'Buchen', + icon: 'mdi-cash-plus', + path: 'change', + name: 'balance-change', + shortcut: true, + meta: { permissions: [permissions.DEBIT_OWN, permissions.SHOW] }, + component: () => import('../pages/MainPage.vue') }, { title: 'Verwaltung', icon: 'mdi-account-cash', path: 'admin', name: 'balance-admin', - meta: { permissions: [permissions.DEBIT_OWN, permissions.SHOW] }, + meta: { permissions: [permissions.SET_LIMIT, permissions.SHOW_OTHER] }, component: () => import('../pages/Admin.vue') } ] diff --git a/src/plugins/schedule/routes/index.ts b/src/plugins/schedule/routes/index.ts index 5a02182..e172fff 100644 --- a/src/plugins/schedule/routes/index.ts +++ b/src/plugins/schedule/routes/index.ts @@ -1,25 +1,5 @@ import { FG_Plugin } from 'src/plugins'; -/*const permissions = { - // Show own and others balance - SHOW: 'balance_show', - SHOW_OTHER: 'balance_show_others', - // Credit balance (give) - CREDIT: 'balance_credit', - // Debit balance (take) - DEBIT: 'balance_debit', - // Debit own balance only - DEBIT_OWN: 'balance_debit_own', - // Send from to other - SEND: 'balance_send', - // Send from other to another - SEND_OTHER: 'balance_send_others', - // Can set limit for users - SET_LIMIT: 'balance_set_limit', - //Allow sending / sub while exceeding the set limit - EXCEED_LIMIT: 'balance_exceed_limit' -};*/ - const mainRoutes: FG_Plugin.PluginRouteConfig[] = [ { title: 'Dienste', diff --git a/src/plugins/user/components/settings/Sessions.vue b/src/plugins/user/components/settings/Sessions.vue index c609bef..77fc6e5 100644 --- a/src/plugins/user/components/settings/Sessions.vue +++ b/src/plugins/user/components/settings/Sessions.vue @@ -31,12 +31,7 @@ label="Zeit" filled /> - + @@ -59,10 +54,10 @@ export default defineComponent({ name: 'Sessions', props: { session: { - required: true, - }, + required: true + } }, - setup(props: {session: FG.Session}, { root }) { + setup(props: { session: FG.Session }, { root }) { const store = >root.$store; const options = ref(['Minuten', 'Stunden', 'Tage']); const option = ref(options.value[0]); @@ -92,7 +87,7 @@ export default defineComponent({ } function deleteSession(token: string) { - store.dispatch('session/deleteSession', token).catch((error) => { + store.dispatch('session/deleteSession', token).catch(error => { console.warn(error); }); } @@ -113,7 +108,7 @@ export default defineComponent({ return (lifetime.value / (60 * 60 * 24)).toFixed(2); } }, - set: (val) => { + set: val => { if (val) { switch (option.value) { case options.value[0]: @@ -127,7 +122,7 @@ export default defineComponent({ break; } } - }, + } }); function edit(value: boolean) { @@ -139,11 +134,8 @@ export default defineComponent({ console.log(lifetime.value); isEdit.value = false; void store - .dispatch( - 'session/updateSession', - {lifetime: lifetime.value, token: props.session.token} - ) - .catch((error) => { + .dispatch('session/updateSession', { lifetime: lifetime.value, token: props.session.token }) + .catch(error => { console.log(error); }); } @@ -159,8 +151,8 @@ export default defineComponent({ option, lifetime, computedLifetime, - save, + save }; - }, + } });