Browse Source

Hide check button from annotators

pull/932/head
Hironsan 4 years ago
parent
commit
42abb6ac1a
2 changed files with 6 additions and 1 deletions
  1. 3
      frontend/layouts/annotation.vue
  2. 4
      frontend/store/projects.js

3
frontend/layouts/annotation.vue

@ -29,6 +29,7 @@
> >
<v-col> <v-col>
<approve-button <approve-button
v-if="canViewApproveButton"
:approved="approved" :approved="approved"
:disabled="currentDoc ? false : true" :disabled="currentDoc ? false : true"
/> />
@ -111,7 +112,7 @@ export default {
}, },
computed: { computed: {
...mapGetters('projects', ['getLink', 'getCurrentUserRole', 'getFilterOption']),
...mapGetters('projects', ['getLink', 'getCurrentUserRole', 'getFilterOption', 'canViewApproveButton']),
...mapState('documents', ['loading', 'total']), ...mapState('documents', ['loading', 'total']),
...mapGetters('documents', ['currentDoc', 'approved']), ...mapGetters('documents', ['currentDoc', 'approved']),
page: { page: {

4
frontend/store/projects.js

@ -17,6 +17,10 @@ export const getters = {
getCurrentUserRole(state) { getCurrentUserRole(state) {
return state.current.current_users_role || {} return state.current.current_users_role || {}
}, },
canViewApproveButton(state) {
const role = state.current.current_users_role
return role && !role.is_annotator
},
getFilterOption(state) { getFilterOption(state) {
if (state.current.project_type === 'DocumentClassification') { if (state.current.project_type === 'DocumentClassification') {
return 'doc_annotations__isnull' return 'doc_annotations__isnull'

Loading…
Cancel
Save