@extends('layouts.app') @section('title', 'Lab Test Catalogue') @section('content') {{-- Page header removed per UI cleanup; sidebar already names the page. --}}
Lab Consumables ← Back to Lab
@if(session('success'))
{{ session('success') }}
@endif {{-- Search & Filter bar --}}
Clear
@if($q !== '' || $category !== '' || $outsourced !== '' || $status !== 'active')
Showing {{ $tests->total() }} result{{ $tests->total() === 1 ? '' : 's' }} @if($q !== '') for "{{ $q }}"@endif @if($category !== '') in {{ $category }}@endif @if($outsourced !== '') · {{ ucfirst($outsourced) }}@endif @if($status !== 'active') · {{ ucfirst($status) }}@endif
@endif
@if(Auth::user()->hasRole('Super Admin') || Auth::user()->hasRole('Hospital Admin')) @endif @forelse($tests as $test) @if(Auth::user()->hasRole('Super Admin') || Auth::user()->hasRole('Hospital Admin')) @endif @empty @endforelse
Code Test Name Category Sample Price Buy Price TAT Outsourced Consumable StatusActions
{{ $test->code }} {{ $test->name }} {{ $test->category }} {{ $test->sample_type ?? '-' }} {{ $test->price ? number_format($test->price) : '-' }} @if($test->is_outsourced && $test->outsource_buy_price) {{ number_format($test->outsource_buy_price) }} @else @endif {{ $test->turnaround_hours ?? '-' }}h @if($test->is_outsourced) {{ $test->outsource_lab ?? 'Yes' }} @else In-house @endif @if($test->consumableItem) {{ $test->consumableItem->name }} @else | @endif {{ $test->is_active ? 'Active' : 'Off' }}
@csrf @method('DELETE')
@if($q !== '' || $category !== '' || $outsourced !== '' || $status !== 'active') No tests match your filters. Clear filters @else No lab tests configured. @endif
{{ $tests->links() }}
@if(Auth::user()->hasRole('Super Admin') || Auth::user()->hasRole('Hospital Admin')) @endif @endsection