From c73a1123d2cf8d657f67acc4ffbe6b18ab847ff8 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Sun, 22 Mar 2026 04:26:53 +0000 Subject: [PATCH] Actually do more stuff when we select a communication --- ts/view/Communication.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ts/view/Communication.vue b/ts/view/Communication.vue index 788f0126..fa281727 100644 --- a/ts/view/Communication.vue +++ b/ts/view/Communication.vue @@ -735,7 +735,6 @@ onMounted(() => { // Refs const apiBase = ref("/api"); -const selectedCommunication = ref(null); const messageText = ref(""); const showPhotoModal = ref(false); const selectedId = ref(null); @@ -750,7 +749,16 @@ const mapRef = ref(null); const nuisance = computed(() => { return selectedCommunication.value?.public_report?.nuisance || null; }); - +const selectedCommunication = computed(() => { + if (selectedId.value == null) { + return null; + } + if (communication.all == null) { + return null; + } + const result = communication.all.find((c) => c.id == selectedId.value); + return result; +}); const water = computed(() => { return selectedCommunication.value?.public_report?.water || null; });