Browse Source

don't display create and delete project button if user is not staff

pull/1453/head
youichiro 3 years ago
parent
commit
5f161ce241
1 changed files with 3 additions and 1 deletions
  1. 4
      frontend/pages/projects/index.vue

4
frontend/pages/projects/index.vue

@ -1,6 +1,6 @@
<template>
<v-card>
<v-card-title>
<v-card-title v-if="isStaff">
<v-btn
class="text-capitalize"
color="primary"
@ -41,6 +41,7 @@
<script lang="ts">
import Vue from 'vue'
import { mapGetters } from 'vuex'
import ProjectList from '@/components/project/ProjectList.vue'
import { ProjectDTO, ProjectWriteDTO } from '~/services/application/project/projectData'
import FormDelete from '~/components/project/FormDelete.vue'
@ -90,6 +91,7 @@ export default Vue.extend({
},
computed: {
...mapGetters('auth', ['isStaff']),
canDelete(): boolean {
return this.selected.length > 0
},

Loading…
Cancel
Save