Unselect report after it's removed from the list
This commit is contained in:
parent
429b724cf2
commit
f2b7d30a7f
1 changed files with 5 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue