mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added batch printing to Assets, Moved batch printing to partial view
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
ViewData["Title"] = T["Inventory"];
|
||||
}
|
||||
|
||||
<partial name="_BatchButton"/>
|
||||
|
||||
<div class="container py-4">
|
||||
<h2 class="mb-3">@T["Inventory"]</h2>
|
||||
|
||||
@@ -194,7 +196,7 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button id="downloadBtn" class="form-control my-2 btn btn-primary">@T["Download Barcode"]</button>
|
||||
<button id="printBtn" class="form-control my-2 btn btn-primary">@T["Print Barcode"]</button>
|
||||
<button id="printBtn" class="form-control my-2 btn btn-primary">@T["Add Barcode to print batch"]</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
@@ -278,7 +280,11 @@
|
||||
});
|
||||
|
||||
document.getElementById("downloadBtn").addEventListener("click", () => downloadBarcode("ean13", decodedText));
|
||||
document.getElementById("printBtn").addEventListener("click", () => printBarcode("ean13"));
|
||||
document.getElementById("printBtn").addEventListener("click", () => {
|
||||
addAssetIdToBatch(asset.Cn);
|
||||
showToast("@T["Successfully added barcode to print batch"]", "success");
|
||||
bootstrap.Modal.getInstance('#viewAssetModal').hide();
|
||||
});
|
||||
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
@@ -603,4 +609,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
<partial name="_Batch"/>
|
||||
Reference in New Issue
Block a user