From 42abb6ac1ae9eeffd0ff620ca50b8ae769e004b2 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Mon, 27 Jul 2020 14:25:20 +0900 Subject: [PATCH] Hide check button from annotators --- frontend/layouts/annotation.vue | 3 ++- frontend/store/projects.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/layouts/annotation.vue b/frontend/layouts/annotation.vue index 7e812238..996f2ab6 100644 --- a/frontend/layouts/annotation.vue +++ b/frontend/layouts/annotation.vue @@ -29,6 +29,7 @@ > @@ -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: { diff --git a/frontend/store/projects.js b/frontend/store/projects.js index 979d8c29..7fa48b30 100644 --- a/frontend/store/projects.js +++ b/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'