e48ef1b755
Mechanic Workflow (Stage 7): - /app/mechanic Filament page filtered to master_id = auth user - Kanban 4 columns (in_work / awaiting_parts / ready / recent), each card shows WO#, plate, client, complaint summary, photo presence - 2 KPI tiles (active now / closed today) - Mobile-responsive grid (auto-fit, minmax 260px) WarehouseService: - issueNow(WorkOrderPart) — consume reservations immediately scoped to one line, without closing the WO (mechanic physically takes part now) - returnPart(WorkOrderPart, qty?, notes?) — refund to stock as new batch at original buy_price, writes `return` event, capped at consumed total WO PartsRelationManager: - "Eliberează" action — visible when active reservation exists - "Restituire" action — visible when consumed reservation exists, with qty modal + notes Scan Center (Stage 14): - PartResource "QR" action — per-part SVG QR with payload PART:<article|id> - BulkAction "Tipărește etichete QR" → /parts/labels?ids=N,M (HTML A4 sheet, 3-col grid, print CSS hides toolbar) - /app/scan Filament page using html5-qrcode 2.3.8 (CDN), auto-picks back camera, decodes → Livewire dispatches scanner-decoded → resolveAndRedirect - Lookup matches PART:N prefix, parts.article, parts.barcode, or numeric id - Manual input fallback for browsers without camera Tests (6 new): - WarehouseIssueReturnTest (3): issueNow consumes immediately; returnPart creates positive batch + return event; over-return is capped - ScannerLookupTest (3): PART: prefix lookup, raw barcode lookup, unknown miss Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
66 lines
2.3 KiB
PHP
66 lines
2.3 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Etichete piese</title>
|
|
<style>
|
|
@page { size: A4; margin: 10mm; }
|
|
* { box-sizing: border-box; }
|
|
body { font-family: system-ui, -apple-system, sans-serif; margin: 0; padding: 12px; }
|
|
|
|
.toolbar {
|
|
display: flex; justify-content: space-between; align-items: center;
|
|
margin-bottom: 16px; padding: 12px;
|
|
background: #f3f4f6; border-radius: 8px;
|
|
}
|
|
@media print { .toolbar { display: none; } }
|
|
.btn {
|
|
padding: 8px 16px; background: #3b82f6; color: #fff;
|
|
border: 0; border-radius: 6px; cursor: pointer; font-size: 14px;
|
|
}
|
|
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 6mm;
|
|
}
|
|
.label {
|
|
border: 1px dashed #cbd5e1; padding: 6mm;
|
|
text-align: center; page-break-inside: avoid;
|
|
min-height: 60mm; display: flex; flex-direction: column;
|
|
align-items: center; justify-content: space-between;
|
|
}
|
|
.label .qr { width: 80%; max-width: 35mm; }
|
|
.label .name { font-size: 10pt; font-weight: 600; margin: 4mm 0 1mm; line-height: 1.2; }
|
|
.label .code { font-family: 'Menlo', 'Consolas', monospace; font-size: 9pt; color: #475569; }
|
|
.label .brand { font-size: 8pt; color: #94a3b8; }
|
|
@media print {
|
|
.label { border-style: solid; border-color: #e2e8f0; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="toolbar">
|
|
<strong>{{ $labels->count() }} etichete</strong>
|
|
<button class="btn" onclick="window.print()">🖨 Tipărește</button>
|
|
</div>
|
|
|
|
<div class="grid">
|
|
@foreach ($labels as $lbl)
|
|
<div class="label">
|
|
<div class="qr">{!! $lbl['svg'] !!}</div>
|
|
<div>
|
|
<div class="name">{{ $lbl['part']->name }}</div>
|
|
@if ($lbl['part']->article)
|
|
<div class="code">{{ $lbl['part']->article }}</div>
|
|
@endif
|
|
@if ($lbl['part']->brand)
|
|
<div class="brand">{{ $lbl['part']->brand }}</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</body>
|
|
</html>
|