@extends('admin.layouts.app') @section('title', __('admin.promotions.title')) @section('content') @if($errors->any())
@endif
@if(($promotions ?? collect())->isEmpty())
{{ __('admin.promotions.no_promotions') }}
@else @foreach($promotions as $promo) @endforeach
{{ __('common.table.code') }}{{ __('common.table.type') }}{{ __('common.table.value') }}{{ __('admin.promotions.uses') }}{{ __('admin.promotions.expires') }}{{ __('common.table.status') }}{{ __('common.table.actions') }}
{{ $promo->code }} {{ $promo->type }} {{ $promo->type === 'percentage' ? $promo->value . '%' : money_fmt($promo->value) }} {{ $promo->uses ?? 0 }}{{ $promo->max_uses ? ' / ' . $promo->max_uses : '' }} {{ $promo->expiration_date?->format(date_fmt()) ?? __('admin.promotions.never') }} {{ $promo->isValid() ? __('common.status.active') : __('common.status.inactive') }}
@csrf @method('DELETE')
@endif
@foreach($promotions as $promo) @endforeach @if($errors->any()) @endif @endsection