@php
$title = admin_trans('offers_expiring_soon');
$description = 'Offers expiring within the next 7 days';
$icon = 'clock';
@endphp
@extends('admin.analytics.base')
@section('analytics-content')
@if($data->isEmpty())
@else
@foreach($data as $offer)
@php
$offerTitle = $offer->translations->first()?->title ?? "Offer #{$offer->id}";
$storeName = $offer->countryStore?->store?->translations->first()?->name ?? "Store #" . ($offer->countryStore?->store_id ?? 'N/A');
@endphp
{{ $offerTitle }}
{{ $storeName }}
{{ $offer->expires_at->format('Y-m-d') }}
@php $daysLeft = now()->diffInDays($offer->expires_at, false); @endphp
{{ max(0, ceil($daysLeft)) }} {{ max(0, ceil($daysLeft)) == 1 ? 'day' : 'days' }}
@endforeach
@if($data->hasPages())
@endif
@endif
@endsection