Initial commit
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
@model PowderCoating.Application.DTOs.Inventory.InventoryItemDto
|
||||
@{
|
||||
ViewData["Title"] = $"Label — {Model.Name}";
|
||||
Layout = null; // standalone print page
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Inventory Label — @Model.Name</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: #f0f0f0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 24px 16px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.screen-controls {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 8px 20px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.btn-primary { background: #6f42c1; color: #fff; }
|
||||
.btn-secondary { background: #6c757d; color: #fff; }
|
||||
|
||||
/* ── Label card ─────────────────────────────────────── */
|
||||
.label-card {
|
||||
background: #fff;
|
||||
border: 2px solid #333;
|
||||
border-radius: 8px;
|
||||
width: 3.5in;
|
||||
padding: 14px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
.label-logo {
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
letter-spacing: .08em;
|
||||
text-transform: uppercase;
|
||||
color: #6f42c1;
|
||||
}
|
||||
|
||||
.label-qr img {
|
||||
display: block;
|
||||
width: 1.6in;
|
||||
height: 1.6in;
|
||||
}
|
||||
|
||||
.label-name {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
line-height: 1.3;
|
||||
max-width: 3in;
|
||||
}
|
||||
|
||||
.label-sku {
|
||||
font-size: 11px;
|
||||
color: #555;
|
||||
letter-spacing: .04em;
|
||||
}
|
||||
|
||||
.label-color {
|
||||
font-size: 11px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.label-scan-hint {
|
||||
font-size: 9px;
|
||||
color: #888;
|
||||
text-align: center;
|
||||
border-top: 1px dashed #ccc;
|
||||
padding-top: 6px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* ── Print styles ───────────────────────────────────── */
|
||||
@@media print {
|
||||
body { background: #fff; padding: 0; }
|
||||
.screen-controls { display: none; }
|
||||
.label-card {
|
||||
border: 2px solid #333;
|
||||
box-shadow: none;
|
||||
width: 3.5in;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="screen-controls">
|
||||
<button class="btn btn-primary" onclick="window.print()">
|
||||
🖶 Print Label
|
||||
</button>
|
||||
<a class="btn btn-secondary" href="/Inventory/Details/@Model.Id">
|
||||
← Back to Item
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="label-card">
|
||||
<div class="label-logo">Powder Coating Logix</div>
|
||||
|
||||
<div class="label-qr">
|
||||
<img src="/Inventory/QrCode/@Model.Id?size=8" alt="QR Code for @Model.Name" />
|
||||
</div>
|
||||
|
||||
<div class="label-name">@Model.Name</div>
|
||||
|
||||
<div class="label-sku">SKU: @Model.SKU</div>
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.ColorName))
|
||||
{
|
||||
<div class="label-color">
|
||||
@Model.ColorName
|
||||
@if (!string.IsNullOrEmpty(Model.Finish))
|
||||
{
|
||||
<span> — @Model.Finish</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.Manufacturer))
|
||||
{
|
||||
<div class="label-sku" style="color:#777">@Model.Manufacturer</div>
|
||||
}
|
||||
|
||||
<div class="label-scan-hint">
|
||||
Scan to log usage • Powder Coating Logix
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user