Use access rights mixin in Equipment view

This commit is contained in:
D. Berge
2025-07-25 13:36:16 +02:00
parent 890e48e078
commit 8db2c8ce25

View File

@@ -8,7 +8,7 @@
@input="closeDialog" @input="closeDialog"
> >
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
<v-btn v-if="writeaccess" <v-btn v-if="writeaccess()"
small small
color="primary" color="primary"
v-bind="attrs" v-bind="attrs"
@@ -182,7 +182,7 @@
</v-container> </v-container>
</v-card-text> </v-card-text>
<v-card-actions> <v-card-actions>
<v-btn v-if="writeaccess" <v-btn v-if="writeaccess()"
small small
text text
color="primary" color="primary"
@@ -205,7 +205,7 @@
</v-btn> </v-btn>
</v-btn-toggle> </v-btn-toggle>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn v-if="writeaccess" <v-btn v-if="writeaccess()"
small small
dark dark
color="red" color="red"
@@ -247,7 +247,7 @@
</v-card-text> </v-card-text>
<v-card-actions> <v-card-actions>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn v-if="writeaccess" <v-btn v-if="writeaccess()"
small small
dark dark
color="red" color="red"
@@ -303,10 +303,15 @@
<script> <script>
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters } from 'vuex';
import AccessMixin from '@/mixins/access';
export default { export default {
name: "Equipment", name: "Equipment",
mixins: [
AccessMixin
],
data () { data () {
return { return {
latest: [], latest: [],
@@ -395,7 +400,7 @@ export default {
return null; return null;
}, },
...mapGetters(['user', 'writeaccess', 'loading', 'serverEvent']) ...mapGetters(['user', 'loading', 'serverEvent'])
}, },