Skip to content

Commit

Permalink
CU-8693xmupv: Group meta data is outputted on export, only show Proje…
Browse files Browse the repository at this point in the history
…ctGroup 'grouping' to admin users
  • Loading branch information
tomolopolis committed May 22, 2024
1 parent 4824a41 commit 8e77373
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions webapp/api/api/admin/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def retrieve_project_data(projects: QuerySet) -> Dict[str, List]:
{
"name": "<project_name" # name of the project
"id": "<id>" # the auto-generated id of the project (optional)
"project_group_id": "<id>" # the auto-generated id of the project - nullable
"project_group_name": "<group_name>" # the name of the project group if set.
"project_status": "<project_status>" # status - either annotating, discontinued, complete
"project_locked": "<project_locked>" # locked - for no further annotations
"cuis": ["cui_1", "cui_2" ... ] # the CUI filter for the project, includes those from file / and text-box
"meta_anno_defs": [
# list of meta annotation tasks configured for this project.
Expand Down Expand Up @@ -232,6 +236,8 @@ def retrieve_project_data(projects: QuerySet) -> Dict[str, List]:
out['name'] = project.name
out['id'] = project.id
out['cuis'] = project.cuis
out['project_group_id'] = project.group.id if project.group else None
out['project_group_name'] = project.group.name if project.group else None
out['project_status'] = project.project_status
out['project_locked'] = project.project_locked
out['meta_anno_defs'] = [{'name': t.name, 'values': [v.name for v in t.values.all()]}
Expand Down
2 changes: 1 addition & 1 deletion webapp/frontend/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="full-height">
<login v-if="!loginSuccessful" @login:success="loggedIn()"></login>
<transition name="alert"><div class="alert alert-danger" v-if="routeAlert" role="alert">{{routeAlert}}</div></transition>
<div class="view-bar">
<div class="view-bar" v-if="isAdmin">
<button class="btn btn-outline-primary" @click="projectGroupView = !projectGroupView">
<span v-if="projectGroupView">Single Projects</span>
<span v-if="!projectGroupView">Project Groups</span>
Expand Down

0 comments on commit 8e77373

Please sign in to comment.