|
|
@@ -27,18 +27,22 @@ parce que le accessProfile a été modifié dans un autre onglet).
|
|
|
<script setup lang="ts">
|
|
|
import { useAccessProfileStore } from '~/stores/accessProfile'
|
|
|
|
|
|
-const showRefreshNeededDialog = ref(false)
|
|
|
+const accessProfileUpdated = ref(false)
|
|
|
|
|
|
const accessProfileStore = useAccessProfileStore()
|
|
|
+const pageStore = usePageStore()
|
|
|
+
|
|
|
+const showRefreshNeededDialog = computed(() => accessProfileUpdated.value && !pageStore.loading)
|
|
|
|
|
|
onMounted(() => {
|
|
|
accessProfileStore.$subscribe(() => {
|
|
|
- showRefreshNeededDialog.value = true
|
|
|
+ accessProfileUpdated.value = true
|
|
|
})
|
|
|
})
|
|
|
|
|
|
|
|
|
const refreshPage = () => {
|
|
|
+ pageStore.loading = true
|
|
|
window.location.reload()
|
|
|
}
|
|
|
</script>
|