Skip to content

Commit

Permalink
Merge pull request #165 from BBMRI-ERIC/fix/not_displaying_attachments
Browse files Browse the repository at this point in the history
Fix issue when attachments are not properly displayed
  • Loading branch information
RadovanTomik committed Mar 16, 2024
2 parents 2fb1e85 + 9f0fcc4 commit ced9c6a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/views/NegotiationPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="row mt-4">
<div class="row-col-2">
<h1 class="text-primary fw-bold">
{{ negotiation ? negotiation.payload.project.title.toUpperCase() : "" }}
{{ negotiation ? negotiation.payload.project.title?.toUpperCase() : "" }}
</h1>
<span
:class="getBadgeColor(negotiation.status)"
Expand Down Expand Up @@ -76,6 +76,7 @@
</span>
<NegotiationAttachment
v-for="attachment in attachments"
v-if="dataReady"
:id="attachment.id"
:key="attachment.id"
class="mb-2"
Expand Down Expand Up @@ -469,14 +470,19 @@ export default {
this.selection[res.id] = { checked: false, type: this.RESOURCE_TYPE }
})

this.attachments = await this.retrieveAttachmentsByNegotiationId({
negotiationId: this.negotiation.id
})
this.negotiationStatusOptions = await this.retrievePossibleEvents({
negotiationId: this.negotiation.id
})
},
async created () {
this.dataReady = false
await this.retrieveAttachmentsByNegotiationId({
negotiationId: this.negotiationId
}).then((response) => {
this.attachments = response
this.dataReady = true
})
},
methods: {
...mapActions([
"retrieveNegotiationById",
Expand Down

0 comments on commit ced9c6a

Please sign in to comment.