@extends('layouts.layout-2') @php $total = $rows->count(); $criticalCount = $rows->where('status', 'critical')->count(); $warningCount = $rows->where('status', 'warning')->count(); $okCount = $total - $criticalCount - $warningCount; @endphp @section('content') @include('admin.inventory.partials.wawi-ui')

{{ __('Produktbestand') }}

{{ __('Aktueller Lagerbestand aller aktiven Produkte') }}

{{ $total }}
{{ __('Produkte') }}
{{ $okCount }}
{{ __('Bestand OK') }}
{{ $warningCount }}
{{ __('Niedrig') }}
{{ $criticalCount }}
{{ __('Kritisch') }}
@forelse($rows as $row) @php $product = $row['product']; $rowClass = $row['status'] === 'critical' ? 'is-danger' : ($row['status'] === 'warning' ? 'is-warning' : ''); $stockClass = $row['status'] === 'critical' ? 'text-danger font-weight-bold' : ($row['status'] === 'warning' ? 'text-warning font-weight-bold' : ''); @endphp @empty @endforelse
{{ __('Name') }} {{ __('Bestand') }} {{ __('Verbrauch/Monat') }} {{ __('Status') }} {{ __('Aktion') }}
@if ($product->images->count()) @else @endif
{{ $product->name }}
@if (!empty($product->number))
{{ $product->number }}
@endif
{{ \App\Services\Util::formatNumber($row['stock'], 0) }} {{ __('Stück') }} @if ($row['monthly_consumption'] > 0) {{ \App\Services\Util::formatNumber($row['monthly_consumption'], 1) }} {{ __('Stück') }} @else @endif @if ($row['status'] === 'critical') {{ __('Kritisch') }} @elseif ($row['status'] === 'warning') {{ __('Niedrig') }} @else {{ __('OK') }} @endif
@if (Auth::user()->isAdmin()) @endif {{ __('Produzieren') }}
{{ __('Keine Produkte vorhanden.') }}
@if (Auth::user()->isAdmin()) @endif @endsection