@extends('layouts.admin') @section('title', 'Gift Cards') @section('header', 'Gift Cards') @section('content')
Active Cards

{{ number_format($stats['active'] ?? 0) }}

Cards Created

{{ number_format($giftCards->total()) }}

Total Redemptions

{{ number_format($stats['total_redemptions'] ?? 0) }}

Wallet Value Redeemed

{{ $currencySymbol ?? 'INR ' }}{{ number_format($stats['redeemed_value'] ?? 0, App\Models\AppSetting::currencyDecimals()) }}

Create Gift Card
@csrf
This amount is credited to the customer wallet on redemption.
Recent Redemptions
@forelse($recentRedemptions as $redemption)
{{ $redemption->giftCard?->code ?? 'Gift card removed' }}
{{ $redemption->user?->name ?? 'User removed' }} @if($redemption->user?->email) {{ $redemption->user->email }} @endif
{{ $currencySymbol ?? 'INR ' }}{{ number_format($redemption->amount, App\Models\AppSetting::currencyDecimals()) }}
{{ $redemption->redeemed_at?->format('d M, h:i A') }}
@if($redemption->walletTransaction)
Wallet balance after: {{ $currencySymbol ?? 'INR ' }}{{ number_format($redemption->walletTransaction->balance_after, App\Models\AppSetting::currencyDecimals()) }}
@endif
@empty
No gift cards have been redeemed yet.
@endforelse
@if(request('search')) Clear @endif
@forelse($giftCards as $giftCard) @empty @endforelse
Code Amount Redemptions Expires Status Actions
{{ $giftCard->code }}
{{ $giftCard->title ?: 'Untitled' }}
{{ $currencySymbol ?? 'INR ' }}{{ number_format($giftCard->amount, App\Models\AppSetting::currencyDecimals()) }}
{{ $giftCard->redeemed_count }}{{ $giftCard->max_redemptions ? ' / ' . $giftCard->max_redemptions : '' }}
{{ $currencySymbol ?? 'INR ' }}{{ number_format($giftCard->redemptions_count * $giftCard->amount, App\Models\AppSetting::currencyDecimals()) }} credited
{{ $giftCard->expires_at ? $giftCard->expires_at->format('d M Y, h:i A') : 'Never' }} {{ $giftCard->is_redeemable ? 'Redeemable' : 'Inactive' }}
@csrf @method('DELETE')
@csrf @method('PUT')
is_active ? 'checked' : '' }}>
No gift cards found.
{{ $giftCards->links() }}
@endsection