Compare commits

...

2 Commits

Author SHA1 Message Date
6d9d8a4724
Scans deletion 2023-04-12 21:25:33 +02:00
7d8c68a455
Scan deletion 2023-04-12 21:25:26 +02:00
4 changed files with 20 additions and 4 deletions

View File

@ -229,6 +229,7 @@
...options,
data: current_cards,
}));
$table.resetRowSelection()
}}
>
{$_("delete-cards")}

View File

@ -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")}
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"

View File

@ -481,5 +481,6 @@
"scan-deleted": "Scan gelöscht",
"please-confirm-the-deletion-of-scan": "Bitte bestätige die Löschung des Scans",
"please-confirm-the-deletion-of-card": "Bitte bestätige die Löschung der Karte",
"card": "Läuferkarte"
"card": "Läuferkarte",
"delete-scans": "Scans löschen"
}

View File

@ -481,5 +481,6 @@
"scan-deleted": "scan deleted",
"please-confirm-the-deletion-of-scan": "Please confirm the deletion of scan",
"please-confirm-the-deletion-of-card": "Please confirm the deletion of this card",
"card": "card"
"card": "card",
"delete-scans": "Delete scans"
}