@extends('layouts.app') @section('title', 'Suppliers') @section('content') @php $isAdmin = auth()->user()->hasAnyRole('Super Admin', 'Hospital Admin'); @endphp

Suppliers

Managed payee list — receptionists pick from these when posting expenses

@if($isAdmin) @endif
@if(session('success'))
{{ session('success') }}
@endif @if(session('warning'))
{{ session('warning') }}
@endif
{{-- Filter bar --}}
@foreach([ ['active','Active',$counts['active']], ['inactive','Inactive',$counts['inactive']], ['all','All',$counts['active']+$counts['inactive']], ] as [$val,$label,$count]) {{ $label }} ({{ $count }}) @endforeach
@if(request()->hasAny(['q','show']))Clear@endif
{{-- Table --}}
@if($isAdmin)@endif @forelse($suppliers as $s) @if($isAdmin) @endif @empty @endforelse
Name Contact Person Phone KRA PIN Category StatusActions
{{ $s->name }} {{ $s->contact_person ?? '-' }} {{ $s->phone ?? '-' }} {{ $s->kra_pin ?? '-' }} {{ $s->category ?? '-' }} @if($s->is_active) Active @else Inactive @endif
@csrf
No suppliers found. @if($isAdmin && !request('q'))Click + Add Supplier to create one.@endif
@if($suppliers->hasPages())
{{ $suppliers->links() }}
@endif
@if($isAdmin) {{-- Add / Edit modal --}} @endif @endsection