db4b73013a
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
164 lines
4.6 KiB
Plaintext
164 lines
4.6 KiB
Plaintext
@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;
|
|
}
|
|
|
|
body.embedded {
|
|
padding-top: 24px;
|
|
min-height: auto;
|
|
}
|
|
|
|
.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-location {
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
color: #111;
|
|
}
|
|
|
|
/* ── 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 class="@((bool)(ViewBag.IsEmbed ?? false) ? "embedded" : "")">
|
|
|
|
@if (!(bool)(ViewBag.IsEmbed ?? false))
|
|
{
|
|
<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 • Scan to log usage</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) && !string.Equals(Model.ColorName, Model.Name, StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
<div class="label-color">
|
|
@Model.ColorName
|
|
@if (!string.IsNullOrEmpty(Model.Finish) && Model.Name.IndexOf(Model.Finish, StringComparison.OrdinalIgnoreCase) < 0)
|
|
{
|
|
<span> — @Model.Finish</span>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
<div class="label-sku" style="color:#777">@Model.Manufacturer</div>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.Location))
|
|
{
|
|
<div class="label-location">Location: @Model.Location</div>
|
|
}
|
|
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|