@extends('layouts.admin') @section('content')
{{-- Page Header --}} {{-- Main Content Card --}}
{{-- Table (Desktop) --}} {{-- Card Grid (Mobile) --}}
@forelse ($passCodes as $code)
{{-- Card Header --}}
@if($code->status === 'active' && (!$code->expires_at || $code->expires_at->isFuture()))

{{ $code->code }}

@else

{{ $code->code }}

@endif

{{ $code->name }}

@php $displayStatusMobile = $code->status === 'active' && $code->expires_at?->isPast() ? 'expired' : $code->status; @endphp
{{-- Info Grid --}}

{{ __('Machine') }}

{{ $code->machine->name }}

{{ __('Expires At') }}

{{ $code->expires_at ? $code->expires_at->format('Y-m-d H:i') : __('Permanent') }}

{{-- Action Buttons --}}
@if($code->status === 'active' && (!$code->expires_at || $code->expires_at->isFuture())) @endif @if($code->status === 'active')
@csrf @method('DELETE')
@endif
@empty
@endforelse
{{-- Pagination --}}
{{ $passCodes->links('vendor.pagination.luxury') }}
{{-- Create Modal --}}

{{ __('Add Pass Code') }}

@csrf
@foreach($machines as $machine) @endforeach
{{ __('Days') }}
{{ __('Estimated Expiry') }}

{{ __('Leave empty or 0 for permanent code') }}

{{-- Confirm Cancel Modal --}} {{-- QR Code Modal --}}

{{ __('Pass Code QR') }}

{{ __('Scan this code at the machine to authorize testing or maintenance.') }}

{{-- Copy Link Button --}} {{-- Copy Code Button --}} {{-- Download Image Button --}}
@endsection @push('styles') @endpush