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>
This commit is contained in:
Kevin Adametz 2026-06-03 13:09:55 +00:00
parent 3ee2d756e9
commit a8f6fef38e
21 changed files with 1609 additions and 955 deletions

View file

@ -1,53 +1,64 @@
@extends('layouts.layout-2')
@section('content')
@include('admin.inventory.partials.table-actions-style')
<div class="card">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Produktionen') }}</span>
<a href="{{ route('admin.inventory.productions.create') }}" class="btn btn-sm btn-primary">{{ __('Neue Produktion') }}</a>
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered wawi-table">
<thead>
<tr>
<th style="max-width: 130px;"></th>
<th>{{ __('Datum') }}</th>
<th>{{ __('Produkt') }}</th>
<th>{{ __('Stück') }}</th>
<th>{{ __('Standort') }}</th>
<th>{{ __('MHD-Hinweis') }}</th>
</tr>
</thead>
<tbody>
@foreach($values as $row)
@include('admin.inventory.partials.wawi-ui')
<div class="wawi-page">
<div class="wawi-page-head">
<div>
<h1 class="wawi-page-head__title">{{ __('Produktionen') }}</h1>
<p class="wawi-page-head__subtitle">{{ __('Erfasste Produktionschargen inkl. Rohstoff- und Verpackungsverbrauch') }}</p>
</div>
<div class="wawi-page-head__actions">
<a href="{{ route('admin.inventory.productions.create') }}" class="btn btn-primary btn-sm">
<span class="fas fa-plus mr-1"></span>{{ __('Neue Produktion') }}
</a>
</div>
</div>
<div class="wawi-card">
<div class="card-datatable table-responsive p-2">
<table class="datatables-style table wawi-table">
<thead>
<tr>
<td class="text-nowrap">
<a href="{{ route('admin.inventory.productions.show', $row) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Ansicht') }}">
<span class="far fa-eye"></span>
</a>
<a href="{{ route('admin.inventory.productions.edit', $row) }}" class="btn icon-btn btn-sm btn-secondary" title="{{ __('Bearbeiten') }}">
<span class="far fa-edit"></span>
</a>
<a href="{{ route('admin.inventory.productions.copy', $row) }}" class="btn icon-btn btn-sm btn-outline-secondary" title="{{ __('Kopieren') }}">
<span class="far fa-copy"></span>
</a>
</td>
<td data-sort="{{ $row->produced_at?->timestamp ?? 0 }}">{{ $row->produced_at?->format('d.m.Y') }}</td>
<td>{{ $row->product?->name ?? '—' }}</td>
<td>{{ $row->quantity }}</td>
<td>{{ $row->location?->name ?? '—' }}</td>
<td>
@if($row->mhd_warning)
<span class="badge badge-warning">{{ __('Ja') }}</span>
@else
<span class="text-muted"></span>
@endif
</td>
<th style="max-width: 130px;"></th>
<th>{{ __('Datum') }}</th>
<th>{{ __('Produkt') }}</th>
<th>{{ __('Stück') }}</th>
<th>{{ __('Standort') }}</th>
<th>{{ __('MHD-Hinweis') }}</th>
</tr>
@endforeach
</tbody>
</table>
</thead>
<tbody>
@foreach($values as $row)
<tr>
<td class="text-nowrap">
<a href="{{ route('admin.inventory.productions.show', $row) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Ansicht') }}">
<span class="far fa-eye"></span>
</a>
<a href="{{ route('admin.inventory.productions.edit', $row) }}" class="btn icon-btn btn-sm btn-secondary" title="{{ __('Bearbeiten') }}">
<span class="far fa-edit"></span>
</a>
<a href="{{ route('admin.inventory.productions.copy', $row) }}" class="btn icon-btn btn-sm btn-outline-secondary" title="{{ __('Kopieren') }}">
<span class="far fa-copy"></span>
</a>
</td>
<td data-sort="{{ $row->produced_at?->timestamp ?? 0 }}">{{ $row->produced_at?->format('d.m.Y') }}</td>
<td><span class="wawi-item-name">{{ $row->product?->name ?? '—' }}</span></td>
<td>{{ $row->quantity }}</td>
<td>{{ $row->location?->name ?? '—' }}</td>
<td>
@if($row->mhd_warning)
<span class="wawi-pill wawi-pill--warning">{{ __('Ja') }}</span>
@else
<span class="text-muted"></span>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<script>

View file

@ -5,50 +5,69 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">{{ __('Produktion') }} #{{ $model->id }}</h4>
<div class="card mb-3">
<h6 class="card-header d-flex justify-content-between align-items-center">
<span>{{ __('Übersicht') }}</span>
@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>
</h6>
</div>
<div class="card wawi-card mb-3">
<div class="wawi-card__header">{{ __('Übersicht') }}</div>
<div class="card-body">
<dl class="row mb-0">
<dt class="col-sm-3">{{ __('Produkt') }}</dt>
<dd class="col-sm-9">{{ $model->product?->name ?? '—' }}</dd>
<dt class="col-sm-3">{{ __('Produktionsdatum') }}</dt>
<dd class="col-sm-9">{{ $model->produced_at?->format('d.m.Y') }}</dd>
<dt class="col-sm-3">{{ __('Stückzahl') }}</dt>
<dd class="col-sm-9">{{ $model->quantity }}</dd>
<dt class="col-sm-3">{{ __('Standort') }}</dt>
<dd class="col-sm-9">{{ $model->location?->name ?? '—' }}</dd>
<dt class="col-sm-3">{{ __('Erfasst von') }}</dt>
<dd class="col-sm-9">{{ $model->producedByUser?->getFullName(false) ?: $model->producedByUser?->email ?? '—' }}</dd>
<dt class="col-sm-3">{{ __('MHD-Hinweis') }}</dt>
<dd class="col-sm-9">
@if($model->mhd_warning)
<span class="badge badge-warning">{{ __('Rohstoff-MHD kürzer als Produkt-MHD') }}</span>
@else
@endif
</dd>
<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)
<dt class="col-sm-3">{{ __('Notizen') }}</dt>
<dd class="col-sm-9">{{ $model->notes }}</dd>
<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
</dl>
</div>
</div>
</div>
<div class="card mb-3">
<h6 class="card-header">{{ __('Rohstoff-Verbrauch (Chargen)') }}</h6>
<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 table-striped mb-0">
<table class="table wawi-table mb-0">
<thead>
<tr>
<th>{{ __('Inhaltsstoff') }}</th>
@ -78,11 +97,11 @@
</div>
</div>
<div class="card">
<h6 class="card-header">{{ __('Verpackung (Snapshot)') }}</h6>
<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 table-striped mb-0">
<table class="table wawi-table mb-0">
<thead>
<tr>
<th>{{ __('Artikel') }}</th>
@ -101,4 +120,5 @@
</div>
</div>
</div>
</div>
@endsection