From f2b7d30a7f8c8acb377dcedf4e2ee1a0404151f4 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 19 Mar 2026 19:32:06 +0000 Subject: [PATCH] Unselect report after it's removed from the list --- html/template/sync/communication-root.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/html/template/sync/communication-root.html b/html/template/sync/communication-root.html index 87eec006..c23cb262 100644 --- a/html/template/sync/communication-root.html +++ b/html/template/sync/communication-root.html @@ -160,9 +160,11 @@ this.selectedCommunication.id, ); try { + const report_id = this.selectedCommunication.id; const payload = { - reportID: this.selectedCommunication.id, + reportID: report_id, }; + this.removeCurrentFromList(); const response = await fetch(`api/publicreport/signal`, { method: "POST", headers: { @@ -175,10 +177,8 @@ } this.showNotification( "Report Marked Signal", - `Report #${this.selectedCommunication.id} has been marked as useful signal`, + `Report #${report_id} has been marked as useful signal`, ); - // Remove from list after creating lead - this.removeCurrentFromList(); this.fetchCommunications(); } catch (err) { this.error = err.message; @@ -214,7 +214,7 @@ (c) => c.id === this.selectedCommunication.id, ); if (index > -1) { - this.communications = this.communications.splice(index, 1); + this.communications.splice(index, 1); } if (this.communications.length > 0) { const nextIndex = Math.min(index, this.communications.length - 1);