@extends('layouts.admin') @php $slotSelectConfig = [ "placeholder" => __("Select Slot"), "hasSearch" => true, "searchPlaceholder" => __("Search Slot..."), "isHidePlaceholder" => false, "searchClasses" => "block w-[calc(100%-16px)] mx-2 py-2 px-3 text-sm border-slate-200 dark:border-white/10 rounded-lg focus:border-cyan-500 focus:ring-cyan-500 bg-slate-50 dark:bg-slate-900/50 dark:text-slate-200 placeholder:text-slate-400 dark:placeholder:text-slate-500", "searchWrapperClasses" => "sticky top-0 bg-white/95 dark:bg-slate-900/95 backdrop-blur-md p-2 z-10", "toggleClasses" => "hs-select-toggle luxury-select-toggle", "toggleTemplate" => '', "dropdownClasses" => "hs-select-menu w-full bg-white dark:bg-slate-900 border border-slate-200 dark:border-white/10 rounded-xl shadow-[0_20px_50px_rgba(0,0,0,0.3)] mt-2 z-[150] animate-luxury-in", "optionClasses" => "hs-select-option py-2.5 px-3 mb-0.5 text-sm text-slate-800 dark:text-slate-300 cursor-pointer hover:bg-slate-100 dark:hover:bg-cyan-500/10 dark:hover:text-cyan-400 rounded-lg flex items-center justify-between transition-all duration-300", "optionTemplate" => '
| {{ __('Code') }} | {{ __('Machine') }} | {{ __('Product / Slot') }} | {{ __('Expires At') }} | {{ __('Status') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|
| @if($code->status === 'active' && $code->expires_at->isFuture()) code }}'; activeTicketUrl = '{{ $code->ticket_url }}'; showQrModal = true" class="text-lg font-black font-mono text-cyan-600 dark:text-cyan-400 tracking-widest bg-cyan-50 dark:bg-cyan-500/10 px-4 py-1.5 rounded-xl border border-cyan-100 dark:border-cyan-500/20 shadow-sm cursor-pointer hover:bg-cyan-100 dark:hover:bg-cyan-500/20 transition-all"> {{ $code->code }} @else {{ $code->code }} @endif |
{{ $code->machine->name }}
{{
$code->machine->serial_no }}
|
@php
$slot = $code->machine->slots->where('slot_no', $code->slot_no)->first();
$productName = $slot ? ($slot->product?->name ?? __('Empty')) : __('Empty');
@endphp
{{ $productName
}}
{{ __('Slot')
}}: {{ $code->slot_no }}
|
{{ $code->expires_at->format('Y-m-d H:i') }}
{{
$code->expires_at->diffForHumans() }}
|
@php
$displayStatus = $code->status === 'active' && $code->expires_at->isPast() ? 'expired' :
$code->status;
@endphp
|
@if($code->status === 'active' && $code->expires_at->isFuture())
{{-- View QR Code Button --}}
@endif
@if($code->status === 'active' && $code->expires_at->isFuture())
@endif
|
{{ $code->machine->name }}
{{ __('Slot') }}
{{ $code->slot_no }} @php $slotMobile = $code->machine->slots->where('slot_no', $code->slot_no)->first(); $prodMobile = $slotMobile ? ($slotMobile->product?->name ?? __('Empty')) : __('Empty'); @endphp ({{ $prodMobile }})
{{ __('Expires At') }}
{{ $code->expires_at->format('Y-m-d H:i') }}
{{ __('Pickup Code') }}:
{{ __('Scan this code at the machine or share the link with the customer.') }}