@extends('layouts.admin.home') @section('title') {{ __('admin.pages.products.title') }} @endsection @section('css') @endsection @section('content')
{{ __('admin.pages.products.add_product') }} @include('flash::message') @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
{{ __('admin.pages.products.module_label') }}
{{ __('admin.pages.products.overview') }}

{{ __('admin.pages.products.overview_subtitle') }}

@php $hasActiveFilters = ($search ?? '') !== '' || ($lowStock ?? '') !== ''; @endphp
@if(($search ?? '') !== '') @endif
@if($hasActiveFilters) @endif {{ $products->total() }}
@if($hasActiveFilters)
@if(($search ?? '') !== '') {{ $search }} × @endif @if(($lowStock ?? '') !== '') {{ __('admin.dashboard.low_stock_only') }} × @endif {{ __('admin.pages.common.reset') }}
@endif
@forelse($products as $record) @php $activationClass = $record->is_activate == 1 ? 'bg-success-subtle text-success' : 'bg-danger-subtle text-danger'; $activationLabel = $record->is_activate == 1 ? __('admin.pages.common.active') : __('admin.pages.common.inactive'); $activationTone = $record->is_activate == 1 ? 'is-active' : 'is-inactive'; $stockClass = $record->stockBadgeClass(); @endphp @empty @endforelse
@php $from = $products->firstItem(); $to = $products->lastItem(); $total = $products->total(); @endphp {{ __('admin.pages.common.showing_entries', ['from' => $from, 'to' => $to, 'total' => $total]) }}
@endsection @section('script') @endsection