Bug 32030: Refetch agreement when linking to the same component - beforeRouteUpdate

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-05-16 17:48:19 +02:00 committed by Tomas Cohen Arazi
parent 8044314bc4
commit 335feef423
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -274,6 +274,9 @@ export default {
vm.getAgreement(to.params.agreement_id) vm.getAgreement(to.params.agreement_id)
}) })
}, },
beforeRouteUpdate(to, from) {
this.agreement = this.getAgreement(to.params.agreement_id)
},
methods: { methods: {
async getAgreement(agreement_id) { async getAgreement(agreement_id) {
const agreement = await fetchAgreement(agreement_id) const agreement = await fetchAgreement(agreement_id)