@extends('layouts.admin') @section('title', $sparePart->name) @section('content')

{{ $sparePart->name }}

Images

@if($sparePart->images && count($sparePart->images) > 0) @foreach($sparePart->images as $image) {{ $sparePart->name }} @endforeach @else

No images available

@endif

Description

{{ $sparePart->description }}

Part Details

{{ $sparePart->part_number ?? 'N/A' }}

{{ $sparePart->category->name }}

{{ ucfirst($sparePart->condition) }}

KSh {{ number_format($sparePart->price) }}

{{ $sparePart->quantity }} units

{{ $sparePart->location }}

@if($sparePart->compatible_vehicles)

Compatible Vehicles

{{ $sparePart->compatible_vehicles }}

@endif

Status

Approval: {{ $sparePart->is_approved ? 'Approved' : 'Pending' }}
Availability: {{ $sparePart->is_available ? 'Available' : 'Unavailable' }}
Featured: {{ $sparePart->is_featured ? 'Featured' : 'Regular' }}
Stock Status: {{ $sparePart->quantity > 0 ? 'In Stock' : 'Out of Stock' }}
@if(!$sparePart->is_approved)
@csrf
@endif
@csrf
@csrf

Pricing & Stock

Unit Price: KSh {{ number_format($sparePart->price) }}
Current Stock: {{ $sparePart->quantity }} units
Total Value: KSh {{ number_format($sparePart->price * $sparePart->quantity) }}

Vendor Information

Name: {{ $sparePart->vendor->name }}

Email: {{ $sparePart->vendor->email }}

Location: {{ $sparePart->location }}

Category

{{ $sparePart->category->name }}

{{ $sparePart->category->description ?? 'No description available' }}

Quick Actions

View Public Page
@csrf @method('DELETE')
@endsection