@extends('backend.layouts.app') @section('title', __('Gift Cards')) @section('content') @php /* * Status registry — drives both the filter
@forelse($giftCards as $card) @php $meta = $statusMap[$card->status] ?? ['label' => ucfirst($card->status), 'cls' => 'secondary']; @endphp @empty @endforelse
{{ __('Code') }} {{ __('Sender') }} {{ __('Recipient') }} {{ __('Amount') }} {{ __('Status') }} {{ __('Created') }} {{ __('Actions') }}
{{ $card->code }}
{{ $card->sender_name }}
{{ $card->recipient_name }} {{ $card->recipient_email }}
{{ $card->currency?->symbol ?? '$' }}{{ number_format($card->amount,siteDecimalPlaces()) }} {{ $meta['label'] }}
{{ $card->created_at->format('M d, Y') }} {{ $card->created_at->diffForHumans() }}
{{ __('View') }} @can('gift-card-manage') @if(in_array($card->status, ['pending', 'scheduled', 'delivered'], true))
@csrf
@endif @endcan
@if($giftCards->hasPages())
{{ $giftCards->links() }}
@endif @push('styles') @endpush @endsection