@php $input = 'block w-full min-h-12 text-base rounded-lg border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500'; @endphp

Warranty check

Is the device still under warranty, and what did we repair?

@if ($results !== null) @forelse ($results as $result) @php $device = $result['device']; @endphp

{{ $device->display_name ?: $device->deviceType?->name }}

{{ $device->customer->name }} · {{ $device->customer->phone_display }} @if ($device->serial_number) · {{ $device->serial_number }} @endif

@if ($result['active']) Under warranty @else No active warranty @endif
@if ($result['warranties']->isEmpty())

No warranty found for this device. Warranties are made when an invoice is finalized.

@else
    @foreach ($result['warranties']->groupBy('repair_job_id') as $rows) @php $original = $rows->first()->repairJob; @endphp
  • Repair @if ($original) {{ $original->job_no }} @endif @if ($rows->first()->invoice?->invoice_no) · Invoice {{ $rows->first()->invoice->invoice_no }} @endif @if ($original?->delivered_at) · Delivered {{ $original->delivered_at->format('d M Y') }} @endif

    @if ($original?->diagnosis)

    Fault found: {{ $original->diagnosis }}

    @endif
      @foreach ($rows as $w)
    • {{ $w->description }}

      $w->isActive(), 'text-gray-500' => ! $w->isActive(), 'text-red-700' => $w->status === \App\Enums\WarrantyStatus::Void])> {{ $w->stateLabel() }} · until {{ $w->ends_on->format('d M Y') }} @if ($w->isActive()) ({{ $w->daysLeft() }} {{ $w->daysLeft() === 1 ? 'day' : 'days' }} left) @endif @if ($w->claims->isNotEmpty()) · Claimed before: {{ $w->claims->pluck('job_no')->join(', ') }} @endif

      @if ($w->void_reason)

      {{ $w->void_reason }}

      @endif
      @if ($w->isActive()) Create warranty job @endif
    • @endforeach
  • @endforeach
@endif
@empty

Nothing found for "{{ $q }}". Check the job number (like {{ setting('job_number_prefix', 'RJ') }}-{{ now()->year }}-0001), the invoice number (INV-…), or the IMEI / serial.

@endforelse @endif