Scan deletion

This commit is contained in:
Nicolai Ort 2023-04-12 21:25:26 +02:00
parent 8f33640bec
commit 7d8c68a455
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -205,12 +205,25 @@
on:click={async () => { on:click={async () => {
const prom = []; const prom = [];
for (const scan of selectedScans) { for (const scan of selectedScans) {
prom.push(deleteScan(scan.id)); prom.push(ScanService.scanControllerRemove(scan.id, true));
} }
await Promise.all(prom); 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")}
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
fill="none" fill="none"