Scan deletion
This commit is contained in:
parent
8f33640bec
commit
7d8c68a455
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user