@extends('layouts.admin') @section('title', 'Warranty Lookup') @section('subtitle', 'Verify product warranty status by scanning or entering IMEI') @section('content')
{{-- Search Input Panel --}}
🔍
@if($search) @if($item) {{-- Result Found Panel --}}
{{-- Header status banner --}} @if($warrantyStatus === 'active')
đŸ›Ąī¸

Warranty Active

This phone is currently under active store warranty coverage.

Valid
@elseif($warrantyStatus === 'expired')
âš ī¸

Warranty Expired

The warranty coverage period for this phone has expired.

Expired
@elseif($warrantyStatus === 'none')
đŸšĢ

No Warranty

This item was sold without warranty coverage.

None
@else
❓

Warranty Period: {{ $item->warranty_period }}

Custom warranty terms apply. Verify with the invoice.

Custom
@endif
{{-- Left Column: Product & Warranty Details --}}

Product Information

Product Name

{{ $item->product_name }}

Barcode

{{ $item->product_barcode ?? '-' }}

Condition

@if($item->condition === 'new') Brand New @elseif($item->condition === 'used') Used @else Refurbished @endif

IMEI Number(s)

{{ $item->imei_numbers }}

Warranty Status Details

Warranty Term: {{ $item->warranty_period ?? 'No Warranty' }}
Sold Date: {{ $item->invoice->created_at->format('M d, Y') }}
@if($expiryDate)
Expiry Date: {{ $expiryDate->format('M d, Y') }}
Coverage Duration: @if($warrantyStatus === 'active') {{ $expiryDate->diffForHumans(['parts' => 2]) }} remaining @else Expired {{ $expiryDate->diffForHumans(['parts' => 2]) }} @endif
@endif
{{-- Right Column: Invoice & Purchase Info --}}

Sale & Buyer Details

Invoice Number

{{ $item->invoice->invoice_number }}

📄 View Invoice →
Customer Name

{{ $item->invoice->customer_name ?? 'Walk-in Customer' }}

Phone Number

{{ $item->invoice->customer_phone ?? '-' }}

@if($item->invoice->customer_company)
Shop / Company

{{ $item->invoice->customer_company }}

@endif @if($item->invoice->customer_address)
Address

{{ $item->invoice->customer_address }}

@endif
Sold By (Cashier)

{{ $item->invoice->user->name ?? '-' }}

Branch Location

{{ $item->invoice->branch->name ?? '-' }}

@if($warrantyStatus === 'active')

✨ Warranty action is available

If the device is faulty, you can redirect the customer to issue a replacement, initiate a refund invoice, or register a repair ticket.

@endif
@elseif($items && $items->count() > 0) {{-- Multiple Results Found Panel --}}

Multiple matching items found

We found {{ $items->count() }} items matching your search: "{{ $search }}". Select an item to check its warranty details.

@foreach($items as $matchingItem) @endforeach
Invoice # Customer Product / IMEI Actions
#{{ $matchingItem->invoice->invoice_number }}

{{ $matchingItem->invoice->customer_name ?? 'Walk-in Customer' }}

{{ $matchingItem->invoice->customer_phone ?? '-' }}

{{ $matchingItem->product_name }}

IMEI: {{ $matchingItem->imei_numbers }}

Select & View →
@else {{-- No Result Found --}}

đŸšĢ

No Record Found

We couldn't find any sold phone listing matching: "{{ $search }}". Double check the input value or barcode scan.

@endif @endif
@endsection