e4a256a6c4
Subscription expiry (SubscriptionExpiryBackgroundService): - Trials with no grace period now go directly Active -> Expired instead of briefly entering GracePeriod for a day, which was causing repeated 'Grace Period Started' admin notification emails - Remove redundant isTrial variable (query already filters to non-Stripe companies, so all processed companies are trials by definition) - Save per-company inside the loop so a single SaveChangesAsync failure no longer discards all other companies' status changes and notification log entries (which was the other cause of repeated emails) HTML entities in page titles (33 views): - Replace – / — with plain ' - ' in ViewData["Title"] C# strings; Razor HTML-encodes these when rendering @ViewData["Title"], causing browsers to display the literal text '–' instead of a dash Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
179 lines
4.8 KiB
Plaintext
179 lines
4.8 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;
|
|
}
|
|
|
|
.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 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</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>
|
|
}
|
|
|
|
@if (!string.IsNullOrEmpty(Model.Location))
|
|
{
|
|
<div class="label-location">Location: @Model.Location</div>
|
|
}
|
|
|
|
<div class="label-scan-hint">
|
|
Scan to log usage • Powder Coating Logix
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|