From 9e88ff61137c30f68935ef04e3e1220de83542b6 Mon Sep 17 00:00:00 2001 From: voltsrage Date: Fri, 26 Jun 2026 03:02:15 +0800 Subject: [PATCH] fix: Acknowledge closing on alert polling update --- .../src/components/patient/AlertsList.vue | 1 + vigilcare-dashboard/src/stores/alerts.js | 1 - vigilcare-dashboard/src/views/AlertCenter.vue | 13 ++++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/vigilcare-dashboard/src/components/patient/AlertsList.vue b/vigilcare-dashboard/src/components/patient/AlertsList.vue index 38b5e42..e379b6a 100644 --- a/vigilcare-dashboard/src/components/patient/AlertsList.vue +++ b/vigilcare-dashboard/src/components/patient/AlertsList.vue @@ -24,6 +24,7 @@ const { alerts, loading } = storeToRefs(alertStore) const confirmingAlert = ref(null) function loadEncounterAlerts() { + if (confirmingAlert.value) return return alertStore.loadAlerts(props.encounterId) } diff --git a/vigilcare-dashboard/src/stores/alerts.js b/vigilcare-dashboard/src/stores/alerts.js index 4adde40..d6adf27 100644 --- a/vigilcare-dashboard/src/stores/alerts.js +++ b/vigilcare-dashboard/src/stores/alerts.js @@ -65,7 +65,6 @@ export const useAlertStore = defineStore('alerts', () => { async function pollOpenAlerts() { try { const items = await alertsApi.fetchAllOpenAlerts() - alerts.value = items return applyPollResults(items) } catch (e) { console.error('Failed to poll alerts', e) diff --git a/vigilcare-dashboard/src/views/AlertCenter.vue b/vigilcare-dashboard/src/views/AlertCenter.vue index 051262e..17d47fb 100644 --- a/vigilcare-dashboard/src/views/AlertCenter.vue +++ b/vigilcare-dashboard/src/views/AlertCenter.vue @@ -1,5 +1,5 @@