From 670f1c4425f47b265324278432da0de2e1a19d55 Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Thu, 5 Nov 2020 01:12:44 +0500 Subject: [PATCH] fix(web2): task log view --- .gitignore | 1 + web2/src/App.vue | 29 +++++++-- web2/src/components/ItemDialog.vue | 6 +- web2/src/components/TaskLogDialog.vue | 83 ------------------------- web2/src/components/TaskLogView.vue | 22 ++++--- web2/src/views/project/History.vue | 30 ++------- web2/src/views/project/TemplateView.vue | 14 ++--- web2/src/views/project/Templates.vue | 26 ++------ 8 files changed, 61 insertions(+), 150 deletions(-) delete mode 100644 web2/src/components/TaskLogDialog.vue diff --git a/.gitignore b/.gitignore index f1842ba2..81e63bd4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ web/public/js/bundle.js web/public/css/*.* web/public/html/**/*.* web/public/fonts/*.* +web2/dist config.json .DS_Store node_modules/ diff --git a/web2/src/App.vue b/web2/src/App.vue index 4e8da2b7..869f1ad8 100644 --- a/web2/src/App.vue +++ b/web2/src/App.vue @@ -22,11 +22,19 @@ + @@ -419,8 +427,10 @@ export default { projects: null, newProjectDialog: null, userDialog: null, + taskLogDialog: null, - taskId: null, + task: null, + template: null, }; }, @@ -495,7 +505,18 @@ export default { }); EventBus.$on('i-show-task', async (e) => { - this.taskId = e.taskId; + this.task = (await axios({ + method: 'get', + url: `/api/project/${this.projectId}/tasks/${e.taskId}`, + responseType: 'json', + })).data; + + this.template = (await axios({ + method: 'get', + url: `/api/project/${this.projectId}/templates/${this.task.template_id}`, + responseType: 'json', + })).data; + this.taskLogDialog = true; }); diff --git a/web2/src/components/ItemDialog.vue b/web2/src/components/ItemDialog.vue index 37cd3300..baffac1c 100644 --- a/web2/src/components/ItemDialog.vue +++ b/web2/src/components/ItemDialog.vue @@ -7,7 +7,11 @@ :content-class="'item-dialog item-dialog--' + position" > - {{ title }} + + {{ title }} + - - - - mdi-arrow-left - - - Task Templates - > - Task Templates - > - {{ item.id }} - - - - mdi-close - - - - - diff --git a/web2/src/components/TaskLogView.vue b/web2/src/components/TaskLogView.vue index 76e01d38..134d32c2 100644 --- a/web2/src/components/TaskLogView.vue +++ b/web2/src/components/TaskLogView.vue @@ -1,13 +1,13 @@