Fix vue3 refresh for name, address cards in profile view

This commit is contained in:
Lance Edgar 2024-06-03 16:51:29 -05:00
parent ab523719a6
commit 9243edf7af

View file

@ -78,7 +78,9 @@
</%def>
<%def name="render_personal_name_card()">
<div class="card personal">
<div class="card personal"
## nb. hack to force refresh for vue3
:key="refreshPersonalCard">
<header class="card-header">
<p class="card-header-title">Name</p>
</header>
@ -184,7 +186,9 @@
</%def>
<%def name="render_personal_address_card()">
<div class="card personal">
<div class="card personal"
## nb. hack to force refresh for vue3
:key="refreshAddressCard">
<header class="card-header">
<p class="card-header-title">Address</p>
</header>
@ -1822,6 +1826,10 @@
let PersonalTabData = {
refreshTabURL: '${url('people.profile_tab_personal', uuid=person.uuid)}',
// nb. hack to force refresh for vue3
refreshPersonalCard: 1,
refreshAddressCard: 1,
% if request.has_perm('people_profile.edit_person'):
editNameShowDialog: false,
editNameFirst: null,
@ -1971,6 +1979,8 @@
this.editNameShowDialog = false
this.refreshTab()
this.editNameSaving = false
// nb. hack to force refresh for vue3
this.refreshPersonalCard += 1
}, response => {
this.editNameSaving = false
})
@ -2002,6 +2012,8 @@
this.$emit('profile-changed', response.data)
this.editAddressShowDialog = false
this.refreshTab()
// nb. hack to force refresh for vue3
this.refreshAddressCard += 1
})
},