Skip to content

Commit

Permalink
Merge pull request #241 from BBMRI-ERIC/fix/refresh_page_after_collec…
Browse files Browse the repository at this point in the history
…tion_update

fix: reload page after resource is updated
  • Loading branch information
RadovanTomik authored Jun 21, 2024
2 parents 839127d + 9b03977 commit 78794af
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/views/NegotiationPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -593,17 +593,19 @@ export default {
},
async updateCheckedResourcesStatus (event) {
// For each of the settled resources, update the status to the one chosen in the combo
for (const resource in this.selection) {
if (this.selection[resource].checked === true && this.selection[resource].type === this.RESOURCE_TYPE) {
await this.updateResourceStatus({
negotiationId: this.negotiation.id,
resourceId: resource,
event
}).then(() => {
// update status and status select
location.reload()
})
try {
for (const resource in this.selection) {
if (this.selection[resource].checked === true && this.selection[resource].type === this.RESOURCE_TYPE) {
await this.updateResourceStatus({
negotiationId: this.negotiation.id,
resourceId: resource,
event
})
}
}
} finally {
// update status and status select
location.reload()
}
},
transformStatus (badgeText) {
Expand Down

0 comments on commit 78794af

Please sign in to comment.