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:
parent
3ee2d756e9
commit
a8f6fef38e
21 changed files with 1609 additions and 955 deletions
|
|
@ -1,86 +1,97 @@
|
|||
@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>{{ __('Wareneingang') }}</span>
|
||||
@if(Auth::user()->isAdmin())
|
||||
<a href="{{ route('admin.inventory.stock-entries.create') }}" class="btn btn-sm btn-primary">{{ __('Neuer Einkauf') }}</a>
|
||||
@endif
|
||||
</h6>
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered wawi-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 90px;"></th>
|
||||
<th>{{ __('Status') }}</th>
|
||||
<th>{{ __('Bestellt') }}</th>
|
||||
<th>{{ __('Art') }}</th>
|
||||
<th>{{ __('Artikel') }}</th>
|
||||
<th>{{ __('Lieferant') }}</th>
|
||||
<th>{{ __('Menge') }}</th>
|
||||
<th style="max-width: 60px;"></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">{{ __('Einkauf & Wareneingang') }}</h1>
|
||||
<p class="wawi-page-head__subtitle">{{ __('Bestellungen und Wareneingänge von Rohstoffen und Verpackung') }}</p>
|
||||
</div>
|
||||
<div class="wawi-page-head__actions">
|
||||
@if(Auth::user()->isAdmin())
|
||||
<a href="{{ route('admin.inventory.stock-entries.create') }}" class="btn btn-primary btn-sm">
|
||||
<span class="fas fa-plus mr-1"></span>{{ __('Neuer Einkauf') }}
|
||||
</a>
|
||||
@endif
|
||||
</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.stock-entries.show', $row) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Ansicht') }}">
|
||||
<span class="far fa-eye"></span>
|
||||
</a>
|
||||
@if(Auth::user()->isAdmin() && $row->status === 'pending')
|
||||
<a href="{{ route('admin.inventory.stock-entries.edit', $row) }}" class="btn icon-btn btn-sm btn-secondary" title="{{ __('Bearbeiten') }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</a>
|
||||
@endif
|
||||
@if(Auth::user()->isAdmin())
|
||||
<a href="{{ route('admin.inventory.stock-entries.copy', $row) }}" class="btn icon-btn btn-sm btn-info" title="{{ __('Duplizieren') }}">
|
||||
<span class="far fa-copy"></span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $row->status === 'pending' ? 0 : 1 }}">
|
||||
@if($row->status === 'pending')
|
||||
<span class="badge badge-warning">{{ __('Offen') }}</span>
|
||||
@else
|
||||
<span class="badge badge-success">{{ __('Eingegangen') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $row->ordered_at?->timestamp ?? 0 }}">{{ $row->ordered_at?->format('d.m.Y') }}</td>
|
||||
<td>{{ $entryTypeLabels[$row->entry_type] ?? $row->entry_type }}</td>
|
||||
<td>
|
||||
@if($row->entry_type === 'ingredient' && $row->ingredient)
|
||||
{{ $row->ingredient->name }}
|
||||
@elseif($row->packagingItem)
|
||||
{{ $row->packagingItem->name }}
|
||||
@else
|
||||
—
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $row->supplier?->name ?? '—' }}</td>
|
||||
<td>
|
||||
@if($row->unit === 'gram')
|
||||
{{ \App\Services\Util::formatNumber($row->ordered_quantity) }} g
|
||||
@else
|
||||
{{ \App\Services\Util::formatNumber($row->ordered_quantity, 0) }} {{ __('Stk.') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(Auth::user()->isAdmin() && $row->status === 'pending')
|
||||
<form action="{{ route('admin.inventory.stock-entries.destroy', $row) }}" method="post" class="d-inline"
|
||||
onsubmit="return confirm(@json(__('Eintrag wirklich löschen?')));">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-link text-danger p-0" title="{{ __('Löschen') }}"><i class="far fa-trash-alt"></i></button>
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
<th style="max-width: 90px;"></th>
|
||||
<th>{{ __('Status') }}</th>
|
||||
<th>{{ __('Bestellt') }}</th>
|
||||
<th>{{ __('Art') }}</th>
|
||||
<th>{{ __('Artikel') }}</th>
|
||||
<th>{{ __('Lieferant') }}</th>
|
||||
<th>{{ __('Menge') }}</th>
|
||||
<th style="max-width: 60px;"></th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $row)
|
||||
<tr>
|
||||
<td class="text-nowrap">
|
||||
<a href="{{ route('admin.inventory.stock-entries.show', $row) }}" class="btn icon-btn btn-sm btn-primary" title="{{ __('Ansicht') }}">
|
||||
<span class="far fa-eye"></span>
|
||||
</a>
|
||||
@if(Auth::user()->isAdmin() && $row->status === 'pending')
|
||||
<a href="{{ route('admin.inventory.stock-entries.edit', $row) }}" class="btn icon-btn btn-sm btn-secondary" title="{{ __('Bearbeiten') }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</a>
|
||||
@endif
|
||||
@if(Auth::user()->isAdmin())
|
||||
<a href="{{ route('admin.inventory.stock-entries.copy', $row) }}" class="btn icon-btn btn-sm btn-info" title="{{ __('Duplizieren') }}">
|
||||
<span class="far fa-copy"></span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $row->status === 'pending' ? 0 : 1 }}">
|
||||
@if($row->status === 'pending')
|
||||
<span class="wawi-pill wawi-pill--warning">{{ __('Offen') }}</span>
|
||||
@else
|
||||
<span class="wawi-pill wawi-pill--ok">{{ __('Eingegangen') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $row->ordered_at?->timestamp ?? 0 }}">{{ $row->ordered_at?->format('d.m.Y') }}</td>
|
||||
<td>{{ $entryTypeLabels[$row->entry_type] ?? $row->entry_type }}</td>
|
||||
<td>
|
||||
@if($row->entry_type === 'ingredient' && $row->ingredient)
|
||||
<span class="wawi-item-name">{{ $row->ingredient->name }}</span>
|
||||
@elseif($row->packagingItem)
|
||||
<span class="wawi-item-name">{{ $row->packagingItem->name }}</span>
|
||||
@else
|
||||
—
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $row->supplier?->name ?? '—' }}</td>
|
||||
<td>
|
||||
@if($row->unit === 'gram')
|
||||
{{ \App\Services\Util::formatNumber($row->ordered_quantity) }} g
|
||||
@else
|
||||
{{ \App\Services\Util::formatNumber($row->ordered_quantity, 0) }} {{ __('Stk.') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(Auth::user()->isAdmin() && $row->status === 'pending')
|
||||
<form action="{{ route('admin.inventory.stock-entries.destroy', $row) }}" method="post" class="d-inline"
|
||||
onsubmit="return confirm(@json(__('Eintrag wirklich löschen?')));">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-link text-danger p-0" title="{{ __('Löschen') }}"><i class="far fa-trash-alt"></i></button>
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue