@extends('layouts.main_dashboard.app') @section('title', app()->getLocale() === 'ar' ? 'مخزون العيادة' : 'Clinic Inventory') @section('skip_page_hero', true) @php $isArabic = app()->getLocale() === 'ar'; @endphp @section('content')
{{ $isArabic ? 'إجمالي العناصر' : 'Total items' }}
{{ $items->total() }}
{{ $isArabic ? 'مخزون منخفض' : 'Low stock' }}
{{ $lowStockItems }}
{{ $isArabic ? 'قريب الانتهاء' : 'Expiring soon' }}
{{ $expiringItems }}

{{ $isArabic ? 'عناصر مخزون العيادة' : 'Clinic inventory items' }}

@foreach($items as $item) @php $isLow = $item->quantity <= $item->reorder_level; $isExpiring = $item->expires_on && $item->expires_on->lte(now()->addDays(30)); @endphp
{{ $item->item_name }}
{{ $item->category }} • {{ $item->quantity }} {{ $item->unit }} • {{ $item->storage_location ?: ($isArabic ? 'بدون موقع' : 'No location') }}
{{ $isArabic ? 'الصلاحية:' : 'Expiry:' }} {{ $item->expires_on?->format('Y-m-d') ?: '—' }}
@if($isLow) {{ $isArabic ? 'إعادة طلب' : 'Reorder' }} @endif @if($isExpiring) {{ $isArabic ? 'قرب الانتهاء' : 'Expiring' }} @endif
@endforeach @if($items->isEmpty())
{{ $isArabic ? 'لا توجد عناصر مخزون مسجلة.' : 'No inventory items recorded.' }}
@endif
{{ $items->links() }}
@csrf

{{ $isArabic ? 'إضافة عنصر' : 'Add item' }}

@endsection