@extends('admin.layouts.app') @section('title', 'Spare Parts') @section('content') @push('styles') @include('shared.admin-summary-ui-styles') @endpush

Spare Parts

Master: spare_parts · Per garage: garage_parts + garage_id

@if(session('success')) @endif
{{ $stats['total'] }}
Total Parts
{{ $stats['active'] }}
Active
{{ $stats['inactive'] }}
Inactive
Rs {{ number_format($stats['avg_price'], 0) }}
Avg. Price
{{-- Filters --}}
@if(request()->hasAny(['search','category','status'])) Clear @endif
Catalog {{ $parts->total() }} {{ $parts->firstItem() ?? 0 }}–{{ $parts->lastItem() ?? 0 }} of {{ $parts->total() }}
@forelse($parts as $part) @empty @endforelse
Inv no. Part name Category Part no. Brand Price Warranty Status Act.
{{ $part->inventory_code ?? '—' }}
{{ $part->name }}
@if($part->description)
{{ Str::limit($part->description, 48) }}
@endif
@if($part->sparePartCategory) {{ $part->sparePartCategory->icon }} {{ $part->sparePartCategory->name }} @else @endif @if($part->part_number) {{ $part->part_number }} @else @endif @if($part->brand) {{ $part->brand }} @else @endif Rs {{ number_format($part->base_price, 0) }} @if($part->warranty) {{ $part->warranty }} @else @endif @if($part->is_active) Active @else Inactive @endif
No spare parts
@if(request()->hasAny(['search','category','status']))

Adjust filters or clear.

Clear @else

Add your first catalog item.

@endif
@if($parts->hasPages())
Page {{ $parts->currentPage() }} / {{ $parts->lastPage() }} {{ $parts->links('vendor.pagination.bootstrap-5') }}
@endif
@push('styles') @include('shared.admin-spare-parts-modal-styles') @endpush @push('scripts') @endpush @endsection