draft PR for sticker printing.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2025-01-11 12:04:01 -07:00
parent ad0f7de506
commit 8c557ced85
4 changed files with 24 additions and 0 deletions

View File

@@ -193,6 +193,9 @@
</div>
</div>
</div>
<div class="stickerPrintDiv vehicleDetailTabContainer hideOnPrint">
</div>
<ul class="table-context-menu dropdown-menu" style="display:none;">
<li><a class="context-menu-multiple context-menu-select-all dropdown-item" href="#" onclick="selectAllRows()"><div class="d-flex justify-content-between"><span class="me-5">@translator.Translate(userLanguage, "Select All")</span><i class="bi bi-check-square"></i></div></a></li>
@@ -200,6 +203,9 @@
<li><hr class="context-menu-multiple dropdown-divider"></li>
<li><a class="dropdown-item" href="#" onclick="duplicateRecords(selectedRow, 'ReminderRecord')"><div class="d-flex justify-content-between"><span class="me-5">@translator.Translate(userLanguage, "Duplicate")</span><i class="bi bi-copy"></i></div></a></li>
<li><a class="dropdown-item" href="#" onclick="duplicateRecordsToOtherVehicles(selectedRow, 'ReminderRecord')"><div class="d-flex justify-content-between"><span class="me-5">@translator.Translate(userLanguage, "Duplicate To Vehicle")</span><i class="bi bi-copy"></i></div></a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" onclick="printTabStickers(selectedRow, 'ReminderRecord')"><div class="d-flex justify-content-between"><span class="me-5">@translator.Translate(userLanguage, "Print")</span><i class="bi bi-printer"></i></div></a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item text-danger" href="#" onclick="deleteRecords(selectedRow, 'ReminderRecord')"><div class="d-flex justify-content-between"><span class="me-5">@translator.Translate(userLanguage, "Delete")</span><i class="bi bi-trash"></i></div></a></li>
</ul>

View File

@@ -487,3 +487,7 @@ html[data-bs-theme="light"] .api-method:hover {
border-top: thin solid black;
text-align: center;
}
.stickerPrintDiv {
z-index: 1030;
}

View File

@@ -117,6 +117,9 @@ function generateVehicleHistoryReport() {
$("#vehicleHistoryReport").html(data);
setTimeout(function () {
window.print();
setTimeout(function () {
$("#vehicleHistoryReport").html(""); //clear out the div.
}, 1000)
}, 500);
}
})

View File

@@ -617,6 +617,17 @@ function printTab() {
window.print();
}, 500);
}
function printTabStickers(ids, source) {
$(".stickerPrintDiv").addClass("showOnPrint");
$(".stickerPrintDiv").removeClass("hideOnPrint");
setTimeout(function () {
window.print();
setTimeout(function () {
$(".stickerPrintDiv").removeClass("showOnPrint");
$(".stickerPrintDiv").addClass("hideOnPrint");
}, 1000);
}, 500);
}
function exportVehicleData(mode) {
var vehicleId = GetVehicleId().vehicleId;
$.get('/Vehicle/ExportFromVehicleToCsv', { vehicleId: vehicleId, mode: mode }, function (data) {