@extends('layouts.app') @section('title', 'Equipment Search') @section('content')
Equipment Search
@if(!empty($search)) @endif Scan
@if(isset($results) && $results->count() > 0)
Equipment Found
{{ $results->count() }} result{{ $results->count() > 1 ? 's' : '' }}
@foreach($results as $device)
Master ID {{ $device->rental_device_code }}
Matched Equipment {{ $device->matched_type ?? '-' }}
Serial Number {{ $device->matched_value ?? '-' }}@if($device->isEquipmentVerified($device->matched_type, $device->matched_value))✅@endif
Status @switch($device->status) @case('IN_STOCK') IN STOCK @break @case('DEPLOYED') DEPLOYED @break @case('RENTED') RENTED @break @case('MAINTENANCE') MAINTENANCE @break @case('RETURNED') RETURNED @break @case('LOST') LOST @break @default {{ $device->status }} @endswitch
Customer {{ $device->customer->customer_name ?? '-' }}
Location Type {{ $device->location_type }}
Location @if($device->location_type === 'WAREHOUSE') {{ $device->warehouse->warehouse_name ?? '-' }} {{ $device->zone ? '/ ' . $device->zone->zone_code : '' }} {{ $device->rack ? '/ Rack ' . $device->rack->rack_code : '' }} {{ $device->shelf ? '/ Shelf ' . $device->shelf->shelf_code : '' }} @else {{ $device->site->site_name ?? '-' }} @endif
Last Updated {{ $device->updated_at->format('d M Y H:i') }}
Movement History
@if($device->movements && $device->movements->count() > 0) {{ $device->movements->count() }} movement{{ $device->movements->count() > 1 ? 's' : '' }} @endif
@forelse($device->movements ?? [] as $movement) @empty @endforelse
Date Equipment / Action Serial Number From To Status By Notes Actions
{{ $movement->created_at ? $movement->created_at->format('d M Y H:i') : '-' }} {{ $movement->equipment_type ?? 'Full Package' }} @if($movement->serial_number) {{ $movement->serial_number }} @else - @endif {{ $movement->fromWarehouse->warehouse_name ?? $movement->fromSite->site_name ?? '-' }} {{ $movement->toWarehouse->warehouse_name ?? $movement->toSite->site_name ?? '-' }} @switch(strtoupper($movement->status ?? '')) @case('APPROVED') @case('COMPLETED') {{ ucfirst(strtolower($movement->status)) }} @break @case('PENDING') Pending @break @case('REJECTED') Rejected @break @default {{ $movement->status ?? '-' }} @endswitch {{ $movement->requester->name ?? '-' }} {{ $movement->reason ?? '-' }} @if(auth()->user()?->isAdmin() || auth()->user()?->isManager() || ($movement->requested_by === auth()->id() && $movement->status === 'PENDING'))
@csrf @method('DELETE')
@endif
No movement history for this equipment.
@endforeach
@elseif(isset($search) && $search)
No Results Found

No equipment matches "{{ $search }}".

Create New Master ID
@else
Scan or Search for Equipment

Enter a serial number, Master ID, or customer name to find equipment

@endif
@endsection