Attachments in the story detail page
This commit is contained in:
parent
200a77df28
commit
058df2b6a6
@ -32,6 +32,13 @@
|
||||
<span v-if="!story.tags.length">This story has no tags yet.</span>
|
||||
<span class="tag" v-for="tag in story.tags" :key="tag">{{ tag }}</span>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h2>Attachments</h2>
|
||||
<span v-if="!attachments.length">This story has no attachments yet.</span>
|
||||
<p v-for="attachment in attachments" :key="attachment">
|
||||
{{ attachment.name }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Events Timeline and Comments</h2>
|
||||
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user