Browse Source

Merge pull request #932 from doccano/fix/#923

Hide check button from annotators
pull/937/head
Hiroki Nakayama 4 years ago
committed by GitHub
parent
commit
589e5ad4d5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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>
<approve-button
v-if="canViewApproveButton"
:approved="approved"
:disabled="currentDoc ? false : true"
/>
@ -111,7 +112,7 @@ export default {
},
computed: {
...mapGetters('projects', ['getLink', 'getCurrentUserRole', 'getFilterOption']),
...mapGetters('projects', ['getLink', 'getCurrentUserRole', 'getFilterOption', 'canViewApproveButton']),
...mapState('documents', ['loading', 'total']),
...mapGetters('documents', ['currentDoc', 'approved']),
page: {

4
frontend/store/projects.js

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

Loading…
Cancel
Save