gruene-seele/resources/views/admin/inventory/productions/show.blade.php
Kevin Adametz a8f6fef38e Warenwirtschaft: einheitliches UI-Design (AP-19)
- Zentrale, wiederverwendbare Design-Partial wawi-ui.blade.php (gescoptes Inline-CSS, kein Build noetig)
- Bausteine: Seitenkopf, Kennzahlen-Kacheln, Karten, Toolbar/Suche, aufgeraeumte Tabellen, Status-Pills, Datenblatt-Definitionsliste, Name-Zelle mit fester Icon-Spalte, Leer-Zustaende
- Umgestellt: alle Uebersicht-/Listen- und Detailseiten unter admin/inventory
- Responsive: Detail-Datenblaetter brechen unter 768px gestapelt um (Label oben, Wert linksbuendig); Icon-Spalte verhindert Versatz bei Zeilenumbruch
- Entwicklungsplan um AP-19 + UI-Konvention ergaenzt

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 13:09:55 +00:00

124 lines
5.7 KiB
PHP

@php
/** @var \App\Models\Production $model */
@endphp
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.wawi-ui')
<div class="wawi-page">
<div class="wawi-page-head">
<div>
<h1 class="wawi-page-head__title">{{ __('Produktion') }} #{{ $model->id }}</h1>
<p class="wawi-page-head__subtitle">{{ $model->product?->name ?? '—' }} · {{ $model->produced_at?->format('d.m.Y') }}</p>
</div>
<div class="wawi-page-head__actions">
<a href="{{ route('admin.inventory.productions.edit', $model) }}" class="btn btn-sm btn-primary">{{ __('Bearbeiten') }}</a>
<a href="{{ route('admin.inventory.productions.copy', $model) }}" class="btn btn-sm btn-outline-primary">{{ __('Kopieren') }}</a>
<a href="{{ route('admin.inventory.productions.index') }}" class="btn btn-sm btn-outline-secondary">{{ __('Zurück') }}</a>
</div>
</div>
<div class="card wawi-card mb-3">
<div class="wawi-card__header">{{ __('Übersicht') }}</div>
<div class="card-body">
<div class="wawi-deflist">
<div class="wawi-deflist__item">
<span class="wawi-deflist__label">{{ __('Produkt') }}</span>
<span class="wawi-deflist__value">{{ $model->product?->name ?? '—' }}</span>
</div>
<div class="wawi-deflist__item">
<span class="wawi-deflist__label">{{ __('Produktionsdatum') }}</span>
<span class="wawi-deflist__value">{{ $model->produced_at?->format('d.m.Y') }}</span>
</div>
<div class="wawi-deflist__item">
<span class="wawi-deflist__label">{{ __('Stückzahl') }}</span>
<span class="wawi-deflist__value">{{ $model->quantity }}</span>
</div>
<div class="wawi-deflist__item">
<span class="wawi-deflist__label">{{ __('Standort') }}</span>
<span class="wawi-deflist__value">{{ $model->location?->name ?? '—' }}</span>
</div>
<div class="wawi-deflist__item">
<span class="wawi-deflist__label">{{ __('Erfasst von') }}</span>
<span class="wawi-deflist__value">{{ $model->producedByUser?->getFullName(false) ?: $model->producedByUser?->email ?? '—' }}</span>
</div>
<div class="wawi-deflist__item">
<span class="wawi-deflist__label">{{ __('MHD-Hinweis') }}</span>
<span class="wawi-deflist__value">
@if($model->mhd_warning)
<span class="wawi-pill wawi-pill--warning">{{ __('Rohstoff-MHD kürzer als Produkt-MHD') }}</span>
@else
@endif
</span>
</div>
@if($model->notes)
<div class="wawi-deflist__item wawi-deflist__item--wide">
<span class="wawi-deflist__label">{{ __('Notizen') }}</span>
<span class="wawi-deflist__value">{{ $model->notes }}</span>
</div>
@endif
</div>
</div>
</div>
<div class="card wawi-card mb-3">
<div class="wawi-card__header">{{ __('Rohstoff-Verbrauch (Chargen)') }}</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table wawi-table mb-0">
<thead>
<tr>
<th>{{ __('Inhaltsstoff') }}</th>
<th>{{ __('Charge / Wareneingang') }}</th>
<th>{{ __('Menge (g)') }}</th>
</tr>
</thead>
<tbody>
@foreach($model->productionIngredients as $line)
<tr>
<td>{{ $line->ingredient?->name ?? '—' }}</td>
<td>
#{{ $line->stock_entry_id }}
@if($line->stockEntry?->batch_number)
{{ $line->stockEntry->batch_number }}
@endif
@if($line->stockEntry?->best_before)
(MHD {{ $line->stockEntry->best_before->format('d.m.Y') }})
@endif
</td>
<td>{{ \App\Services\Util::formatNumber($line->quantity_used) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="card wawi-card">
<div class="wawi-card__header">{{ __('Verpackung (Snapshot)') }}</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table wawi-table mb-0">
<thead>
<tr>
<th>{{ __('Artikel') }}</th>
<th>{{ __('Verbrauch (Stk.)') }}</th>
</tr>
</thead>
<tbody>
@foreach($model->productionPackagings as $line)
<tr>
<td>{{ $line->packagingItem?->name ?? '—' }}</td>
<td>{{ $line->quantity_used }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection