@extends('layouts.app') @section('title', 'Lab Consumables') @section('content') {{-- Page header removed per UI cleanup; sidebar already names the page. --}}
Lab Catalogue ← Back to Lab
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Tabs --}}
{{-- TAB 1: Stock Levels --}}
@forelse($consumables as $item) @empty @endforelse
Code Consumable Category In Hand Reorder At Unit Cost Linked Tests Status
{{ $item->code }} {{ $item->name }} {{ $item->category }} {{ $item->quantity_in_hand }} {{ $item->reorder_level }} {{ $item->unit_cost > 0 ? number_format($item->unit_cost) : '|' }} @php $linked = $linkedTestNames[$item->id] ?? []; @endphp @if(count($linked)) {{ count($linked) }} test{{ count($linked) > 1 ? 's' : '' }} @else None @endif @if($item->quantity_in_hand <= 0) Out of Stock @elseif($item->quantity_in_hand <= $item->reorder_level) Low Stock @else OK @endif @if(Auth::user()->hasRole('Super Admin') || Auth::user()->hasRole('Hospital Admin'))
@csrf @method('DELETE')
@endif
No consumables found.
{{-- TAB 2: Receive Stock --}} {{-- TAB 3: Link Consumables to Tests --}} {{-- TAB 4: Add New Item --}} @include('partials._tab-state-helper', ['defaultTab' => 'stock']) @endsection