Fixed sub-headings not following heading order

This commit is contained in:
2025-11-02 23:11:00 +01:00
parent d13b53c8b9
commit 26279ad177
5 changed files with 33 additions and 29 deletions

View File

@@ -193,7 +193,7 @@
<hr class="my-3" />
<!-- Description Section -->
<h6 class="fw-bold">@T["Description"]</h6>
<h4 class="fw-bold">@T["Description"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Type"]</label>
<input type="text" class="form-control" name="Description.Type" />
@@ -211,7 +211,7 @@
<!-- Attributes Section -->
<div class="col-12 mt-3">
<div class="d-flex justify-content-between align-items-center mb-2">
<h6 class="fw-bold mb-0">@T["Attributes"]</h6>
<h4 class="fw-bold mb-0">@T["Attributes"]</h4>
</div>
<div id="attributesContainer" class="d-flex flex-column gap-2">
<!-- Dynamic attribute rows will appear here -->
@@ -224,7 +224,7 @@
<hr class="my-3" />
<!-- Purchase Info -->
<h6 class="fw-bold">@T["Purchase Information"]</h6>
<h4 class="fw-bold">@T["Purchase Information"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Purchase Date"]</label>
<input type="date" class="form-control" name="Description.Purchase.PurchaseDate" />
@@ -418,7 +418,7 @@
<hr class="my-3" />
<h6 class="fw-bold">@T["Description"]</h6>
<h4 class="fw-bold">@T["Description"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Type"]</label>
<input type="text" class="form-control" name="Description.Type" />
@@ -434,7 +434,7 @@
<div class="col-12 mt-3">
<div class="d-flex justify-content-between align-items-center mb-2">
<h6 class="fw-bold mb-0">@T["Attributes"]</h6>
<h4 class="fw-bold mb-0">@T["Attributes"]</h4>
</div>
<div id="updateAttributesContainer" class="d-flex flex-column gap-2"></div>
<button type="button" class="btn btn-sm btn-primary mt-3" id="updateAddAttributeBtn">
@@ -444,7 +444,7 @@
<hr class="my-3" />
<h6 class="fw-bold">@T["Purchase Information"]</h6>
<h4 class="fw-bold">@T["Purchase Information"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Purchase Date"]</label>
<input type="date" class="form-control" name="Description.Purchase.PurchaseDate" />
@@ -683,7 +683,7 @@ function registerRowDetailviewClick(row) {
const html = `
<div class="row g-3">
<h6 class="fw-bold">@T["Barcode"]</h6>
<h4 class="fw-bold">@T["Barcode"]</h4>
<div class="col-md-6">
<svg id="@barcodeType" class="form-control" name="Barcode" />
</div>
@@ -694,7 +694,7 @@ function registerRowDetailviewClick(row) {
</div>
<hr class="my-3" />
<div class="row g-3">
<h6 class="fw-bold">@T["Inventory"]</h6>
<h4 class="fw-bold">@T["Inventory"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Name"]</label>
<input type="text" class="form-control" name="Name" value="${asset.Description.Inventory.PersonUid || ''}" disabled />
@@ -706,7 +706,7 @@ function registerRowDetailviewClick(row) {
</div>
<hr class="my-3" />
<div class="row g-3">
<h6 class="fw-bold">@T["Information"]</h6>
<h4 class="fw-bold">@T["Information"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Name"]</label>
<input type="text" class="form-control" name="Name" value="${asset.Name || ''}" disabled />
@@ -726,7 +726,7 @@ function registerRowDetailviewClick(row) {
</div>
<hr class="my-3" />
<div class="row g-3">
<h6 class="fw-bold">@T["Description"]</h6>
<h4 class="fw-bold">@T["Description"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Type"]</label>
<input type="text" class="form-control" name="Description.Type" value="${asset.Description?.Type || ''}" disabled />
@@ -743,7 +743,7 @@ function registerRowDetailviewClick(row) {
${asset.Description?.Attributes ? `
<hr class="my-3" />
<div class="row g-3">
<h6 class="fw-bold">@T["Attributes"]</h6>
<h4 class="fw-bold">@T["Attributes"]</h4>
${Object.entries(asset.Description.Attributes)
.map(([k,v]) => `
<div class="d-flex gap-2 align-items-center attribute-row">
@@ -756,7 +756,7 @@ function registerRowDetailviewClick(row) {
${asset.Description?.Purchase ? `
<hr class="my-3" />
<div class="row g-3">
<h6 class="fw-bold">@T["Purchase Information"]</h6>
<h4 class="fw-bold">@T["Purchase Information"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Purchase Date"]</label>
<input type="date" class="form-control" name="Description.Purchase.PurchaseDate" value="${asset.Description.Purchase.PurchaseDate || ''}" disabled />

View File

@@ -132,7 +132,7 @@
const html = `
<div class="row g-3">
<h6 class="fw-bold">@T["Barcode"]</h6>
<h4 class="fw-bold">@T["Barcode"]</h4>
<div class="col-md-6">
<svg id="@barcodeType" class="form-control" name="Barcode" />
</div>
@@ -161,7 +161,7 @@
</div>
<hr class="my-3" />
<div class="row g-3">
<h6 class="fw-bold">@T["Description"]</h6>
<h4 class="fw-bold">@T["Description"]</h4>
<div class="col-md-6">
<label class="form-label" for="detailType">@T["Type"]</label>
<input type="text" class="form-control" id="detailType" name="Description.Type" value="${asset.Description?.Type || ''}" disabled />
@@ -178,7 +178,7 @@
${asset.Description?.Attributes ? `
<hr class="my-3" />
<div class="row g-3">
<h6 class="fw-bold">@T["Attributes"]</h6>
<h4 class="fw-bold">@T["Attributes"]</h4>
${Object.entries(asset.Description.Attributes)
.map(([k,v]) => `
<div class="d-flex gap-2 align-items-center attribute-row">
@@ -191,7 +191,7 @@
${asset.Description?.Purchase ? `
<hr class="my-3" />
<div class="row g-3">
<h6 class="fw-bold">@T["Purchase Information"]</h6>
<h4 class="fw-bold">@T["Purchase Information"]</h4>
<div class="col-md-6">
<label class="form-label" for="detailPurchaseDate">@T["Purchase Date"]</label>
<input type="date" class="form-control" id="detailPurchaseDate" name="Description.Purchase.PurchaseDate" value="${asset.Description.Purchase.PurchaseDate || ''}" disabled />
@@ -370,7 +370,7 @@
<hr class="my-3" />
<h6 class="fw-bold">@T["Description"]</h6>
<h4 class="fw-bold">@T["Description"]</h4>
<div class="col-md-6">
<label class="form-label" for="updateType">@T["Type"]</label>
<input type="text" class="form-control" id="updateType" name="Description.Type" />
@@ -386,7 +386,7 @@
<div class="col-12 mt-3">
<div class="d-flex justify-content-between align-items-center mb-2">
<h6 class="fw-bold mb-0">@T["Attributes"]</h6>
<h4 class="fw-bold mb-0">@T["Attributes"]</h4>
</div>
<div id="updateAttributesContainer" class="d-flex flex-column gap-2"></div>
<button type="button" class="btn btn-sm btn-primary mt-3" id="updateAddAttributeBtn">
@@ -396,7 +396,7 @@
<hr class="my-3" />
<h6 class="fw-bold">@T["Purchase Information"]</h6>
<h4 class="fw-bold">@T["Purchase Information"]</h4>
<div class="col-md-6">
<label class="form-label" for="updatePurchaseDate">@T["Purchase Date"]</label>
<input type="date" class="form-control" id="updatePurchaseDate" name="Description.Purchase.PurchaseDate" />

View File

@@ -170,7 +170,7 @@
<input type="hidden" id="updateUid" name="Uid" />
<div class="row g-3">
<h6 class="fw-bold">@T["Personal information"]</h6>
<h4 class="fw-bold">@T["Personal information"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Title"]</label>
<input type="text" id="updateTitle" name="Title" class="form-control" />
@@ -200,7 +200,7 @@
<input type="text" id="updateAddressStreetNr" name="Description.Address.StreetNr" class="form-control" />
</div>
<hr class="my-3">
<h6 class="fw-bold">@T["Workplace & account"]</h6>
<h4 class="fw-bold">@T["Workplace & account"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Workplace"]</label>
<select class="form-select" id="updateWorkplace" name="Description.Workplace">
@@ -454,7 +454,7 @@
<div class="modal-body">
<form id="createForm">
<div class="row g-3">
<h6 class="fw-bold">@T["Personal information"]</h6>
<h4 class="fw-bold">@T["Personal information"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Title"]</label>
<input type="text" name="Title" class="form-control" />
@@ -484,7 +484,7 @@
<input type="text" name="Description.Address.StreetNr" class="form-control" />
</div>
<hr class="my-3">
<h6 class="fw-bold">@T["Workplace & account"]</h6>
<h4 class="fw-bold">@T["Workplace & account"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Workplace"]</label>
<select class="form-select" name="Description.Workplace">
@@ -682,7 +682,7 @@
<input type="text" class="form-control" id="detailBirthdate" value="" disabled />
</div>
<hr class="my-3">
<h6 class="fw-bold">@T["Address"]</h6>
<h4 class="fw-bold">@T["Address"]</h4>
<div class="col-md-4">
<label class="form-label">@T["City"]</label>
<input type="text" class="form-control" id="detailCity" value="" disabled />
@@ -696,7 +696,7 @@
<input type="text" class="form-control" id="detailStreetNr" value="" disabled />
</div>
<hr class="my-3">
<h6 class="fw-bold">@T["Workplace & account"]</h6>
<h4 class="fw-bold">@T["Workplace & account"]</h4>
<div class="col-md-6">
<label class="form-label">@T["Workplace"]</label>
<input type="text" class="form-control" id="detailWorkplace" value="" disabled />

View File

@@ -37,7 +37,7 @@
}
modalBody.innerHTML = `
<div class="row g-3">
<h6 class="fw-bold">@T["Print"]</h6>
<h4 class="fw-bold">@T["Print"]</h4>
<button class="btn btn-primary" onclick="printBatch();" type="button">
@T["Print batch"]
</button>
@@ -50,7 +50,7 @@
</button>
</div>
<hr class="my-3">
<h6 class="fw-bold">@T["Layout"]</h6>
<h4 class="fw-bold">@T["Layout"]</h4>
<br/>
`;
await renderBarcodePreview("printPreviewContainer");
@@ -67,7 +67,7 @@
const asset = json.assetsModel;
assetCard.innerHTML = `
<div class="card-body" data-cn="${asset.Cn}">
<h6 class="card-title"><strong>Asset ${i + 1}:</strong> ${asset.Name}</h6>
<h4 class="card-title"><strong>Asset ${i + 1}:</strong> ${asset.Name}</h4>
<div class="row">
<div class="col-md-5">
<p><strong>@T["Asset ID"]:</strong> ${asset.Cn}</p>
@@ -87,7 +87,7 @@
} else {
assetCard.innerHTML = `
<div class="card-body">
<h6 class="card-title"><strong>Asset ${i + 1}:</strong> @T["Empty"]</h6>
<h4 class="card-title"><strong>Asset ${i + 1}:</strong> @T["Empty"]</h4>
<div class="row">
<div id="printPreviewBatchButtons${i}" class="col-md-1 justify-content-end" style="margin-left: auto; width: auto;">
</div>