Merge branch 'hotfix/myep-overzealous-router-guard' into develop
This commit is contained in:
+7
-1
@@ -1,10 +1,13 @@
|
||||
<template>
|
||||
<panel title="Gebuchte Zusatzleistungen">
|
||||
<ul class="list-group">
|
||||
<ul class="list-group" v-show="hasServiceAssignments">
|
||||
<li class="list-group-item" v-for="(assignment, serviceId) in serviceAssignments">
|
||||
{{ services[serviceId].name }}: {{ assignment.length }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="panel-body" v-show="!hasServiceAssignments">
|
||||
<span>keine</span>
|
||||
</div>
|
||||
</panel>
|
||||
</template>
|
||||
|
||||
@@ -41,6 +44,9 @@
|
||||
}
|
||||
}
|
||||
return assignments;
|
||||
},
|
||||
hasServiceAssignments() {
|
||||
return Object.keys(this.serviceAssignments).length > 0 && this.serviceAssignments.constructor === Object
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ const guard = (to, from, next) => {
|
||||
next({ name: 'login' });
|
||||
} else if (to.meta.requiresTeamer && store.getters.isTeamer === false) {
|
||||
next(false);
|
||||
} else if (to.meta.requiresGroupManager && store.getters.isGroupManager === false) {
|
||||
next(false);
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
@@ -81,7 +79,6 @@ export default new VueRouter({
|
||||
name: 'bookingEdit',
|
||||
path: '/buchung/:id',
|
||||
component: BookingEdit,
|
||||
meta: { requiresGroupManager: true },
|
||||
beforeEnter: guard
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user