@extends('backend.partials.master') @section('title') {{ ___('modules.Promotions') }} @endsection @section('maincontent') @if(hasPermission('campaign_create')) {{ ___('label.add') }} @endif @if(!empty($analytics)) @endif @foreach($items as $p) @php $live = $p->status === 'active' && (! $p->starts_at || $p->starts_at->isPast()) && (! $p->ends_at || $p->ends_at->isFuture()); $available = $p->isAvailable(); @endphp @if($p->imageUrl())@endif {{ $p->title }}@if($p->badge) {{ $p->badge }}@endif {{ ___('modules.' . (\App\Models\Promotion::TARGETS[$p->target_type]['label'] ?? $p->target_type)) }} @if($p->target_type !== 'url') {{ $p->targetItem()?->title ?? $p->targetItem()?->name ?? $p->targetItem()?->country ?? '—' }}@else {{ $p->url }}@endif @unless($available){{ ___('modules.Hidden: its target is unavailable or its module is off.') }}@endunless {{ ___('admin.promotion_channel_' . $p->channel) }} {{ $p->starts_at?->format('d M Y') ?? ___('modules.Now') }} → {{ $p->ends_at?->format('d M Y') ?? ___('modules.No end') }} {{ $p->sort_order }} {{ $live && $available ? ___('modules.Live') : admin_label(ucfirst($p->status)) }}
@if(hasPermission('campaign_update')) @endif @if(hasPermission('campaign_delete')) @endif
@endforeach
@endsection @push('scripts') @endpush