mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added different barcodes
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
@using Microsoft.AspNetCore.Mvc.Localization
|
||||
@inject IViewLocalizer T
|
||||
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
string barcodeType = Configuration["BarcodeType"] ?? "EAN13";
|
||||
}
|
||||
|
||||
<!-- Print Modal -->
|
||||
<div class="modal fade" id="printModal" tabindex="-1" aria-labelledby="printModalLabel" aria-hidden="true">
|
||||
@@ -17,6 +20,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const BARCODE_TYPE = '@barcodeType';
|
||||
const printModal = document.getElementById('printModal');
|
||||
printModal.addEventListener('show.bs.modal', async () => {
|
||||
var assetIds = getAssetIdsFromBatch();
|
||||
@@ -198,8 +202,8 @@
|
||||
cell.appendChild(svg);
|
||||
|
||||
grid.appendChild(cell);
|
||||
JsBarcode(svg, idToEAN13(asset.Cn), {
|
||||
format: "EAN13",
|
||||
JsBarcode(svg, getBarcodeValue(BARCODE_TYPE, asset.Cn), {
|
||||
format: BARCODE_TYPE,
|
||||
lineColor: "#000",
|
||||
width: isMobileM ? 1 : (isMobileS ? 0.5 : 2),
|
||||
height: isMobileM ? 20 : (isMobileS ? 20 : 40),
|
||||
@@ -389,8 +393,8 @@
|
||||
grid.appendChild(cell);
|
||||
|
||||
// Generate barcode
|
||||
printWindow.JsBarcode(`#barcode_${i}`, idToEAN13(asset.Cn), {
|
||||
format: "EAN13",
|
||||
printWindow.JsBarcode(`#barcode_${i}`, getBarcodeValue(BARCODE_TYPE, asset.Cn), {
|
||||
format: BARCODE_TYPE,
|
||||
lineColor: "#000",
|
||||
width: 2,
|
||||
height: 50,
|
||||
|
||||
Reference in New Issue
Block a user