@extends('admin.layouts.app') @section('title', 'Edit Spare Part') @section('content')
{{-- Header --}}

Edit Spare Part

Spare Parts / {{ $sparePart->name }}
ID: {{ $sparePart->id }} {{ $sparePart->created_at?->format('d M Y') }} @if($sparePart->part_number) {{ $sparePart->part_number }} @endif
@if($errors->any())
Please fix:
    @foreach($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif
@csrf @method('PUT')
{{-- LEFT --}}
@error('spare_part_category_id')
{{ $message }}
@enderror
@error('name')
{{ $message }}
@enderror

Rs
Status
Visible to garages
{{-- RIGHT: Preview --}}
Live Preview
@if($sparePart->sparePartCategory) {{ $sparePart->sparePartCategory->icon }} {{ $sparePart->sparePartCategory->name }} @else Select a category @endif
{{ $sparePart->name }}
Rs {{ number_format($sparePart->base_price, 0) }}
{{ $sparePart->is_active ? 'Active' : 'Inactive' }}
@if($sparePart->part_number) {{ $sparePart->part_number }} @else @endif @if($sparePart->brand) {{ $sparePart->brand }} @else @endif @if($sparePart->warranty) {{ $sparePart->warranty }} @else @endif
{{ $sparePart->description }}
Tips
  • Use a unique part number for easy identification
  • Including the brand builds customer confidence
  • A warranty period helps close the sale
  • Inactive parts won't be available to garages
@endsection