From 058df2b6a6d0a699bdf7f10f2dc884958f6288f2 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Mon, 4 May 2020 19:24:40 +0100 Subject: [PATCH] Attachments in the story detail page --- src/views/StoryDetail.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/views/StoryDetail.vue b/src/views/StoryDetail.vue index 880c312..173dda7 100644 --- a/src/views/StoryDetail.vue +++ b/src/views/StoryDetail.vue @@ -32,6 +32,13 @@ This story has no tags yet. {{ tag }} +
+

Attachments

+ This story has no attachments yet. +

+ {{ attachment.name }} +

+

Events Timeline and Comments

@@ -54,6 +61,7 @@ export default { }, data () { return { + attachments: [], creator: {}, events: [], story: {}, @@ -73,6 +81,9 @@ export default { this.creator = creator const { data: tasks } = await axios.get(`${baseUrl}/stories/${storyId}/tasks`) this.tasks = tasks + // TODO: Account for the fact that attachment support can be disabled on the API side + const { data: attachments } = await axios.get(`${baseUrl}/stories/${storyId}/attachments`) + this.attachments = attachments const requests = [] tasks.reduce((acc, task) => {