Unselect report after it's removed from the list

This commit is contained in:
Eli Ribble 2026-03-19 19:32:06 +00:00
parent 429b724cf2
commit f2b7d30a7f
No known key found for this signature in database

View file

@ -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);