diff --git a/src/components/scans/ScansOverview.svelte b/src/components/scans/ScansOverview.svelte index 486f7cb2..15a56f0e 100644 --- a/src/components/scans/ScansOverview.svelte +++ b/src/components/scans/ScansOverview.svelte @@ -205,12 +205,25 @@ on:click={async () => { const prom = []; for (const scan of selectedScans) { - prom.push(deleteScan(scan.id)); + prom.push(ScanService.scanControllerRemove(scan.id, true)); } await Promise.all(prom); + for (const scan of selectedScans) { + current_scans = current_scans.filter((r) => r.id !== scan.id); + } + options.update((options) => ({ + ...options, + data: current_scans, + })); + $table.resetRowSelection(); + Toastify({ + text: $_("scan-deleted"), + duration: 3500, + backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)", + }).showToast(); }} > - {$_("delete-cards")} + {$_("delete-scans")}