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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
1 deletions
-
frontend/layouts/annotation.vue
-
frontend/store/projects.js
|
|
@ -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: { |
|
|
|
|
|
@ -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' |
|
|
|