Commit 961c659d authored by VLaroye's avatar VLaroye

feature(sidebar-links-clickable-area): Moved some logic to mixin + Minor fixes

parent caf0af37
Pipeline #4459 passed with stage
in 2 minutes and 5 seconds
......@@ -38,7 +38,7 @@
v-flex
v-layout(justify-end)
v-btn.ma-0(
:v-show="checkViewEditButtonAccessById",
:v-show="checkViewEditButtonAccessById(view._id)",
depressed,
small,
icon,
......@@ -94,11 +94,6 @@ export default {
}
},
},
checkViewEditButtonAccessById() {
return id => (this.checkUpdateViewAccessById(id) ||
this.checkDeleteViewAccessById(this.view._id)) &&
this.isEditingMode;
},
},
mounted() {
this.fetchVersion();
......
......@@ -31,7 +31,7 @@
v-list-tile-title
span {{ view.title }}
v-btn.edit-view-button(
v-show="(checkUpdateViewAccessById(view._id) || checkDeleteViewAccessById(view._id)) && isEditingMode",
v-show="checkViewEditButtonAccessById(view._id)",
color="grey darken-2",
depressed,
small,
......
......@@ -33,6 +33,11 @@ export default {
getAvailableViewsForGroup() {
return group => group.views.filter(view => this.checkReadAccess(view._id));
},
checkViewEditButtonAccessById(viewId) {
return id =>
(this.checkUpdateViewAccessById(id) || this.checkDeleteViewAccessById(viewId)) && this.isEditingMode;
},
},
mounted() {
this.fetchGroupsList();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment