{{-- resources/views/admin/promos/index.blade.php --}} @extends('layouts.admin') @section('title', 'Promo Management') @section('page_title', 'Promo Management') @section('icon', 'fa-tags') @section('breadcrumb')
| # | Name | Code | Type | Discount Value | Validity Period | Usage | Status | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $promo['name'] }}
@if($promo['description'])
{{ Str::limit($promo['description'], 50) }} @endif |
@if($promo['code'])
{{ $promo['code'] }}
@else
Auto-apply
@endif
|
@php $typeColors = [ 'percentage' => 'primary', 'fixed' => 'success', 'bogo' => 'warning' ]; $typeColor = $typeColors[$promo['type']] ?? 'secondary'; @endphp {{ ucfirst($promo['type']) }} |
@if($promo['type'] == 'percentage')
{{ $promo['discount_value'] }}%
@elseif($promo['type'] == 'fixed')
Rp {{ number_format($promo['discount_value'], 0, ',', '.') }}
@else
BOGO
@endif
@if($promo['max_discount'])
Max: Rp {{ number_format($promo['max_discount'], 0, ',', '.') }} @endif |
{{ date('d M Y', strtotime($promo['start_date'])) }}
to
{{ date('d M Y', strtotime($promo['end_date'])) }}
@if(strtotime($promo['end_date']) < time())
Expired
@endif
|
{{ $promo['usage_count'] ?? 0 }} uses
@if($promo['min_purchase'])
Min: Rp {{ number_format($promo['min_purchase'], 0, ',', '.') }}
@endif
|
@if($promo['is_active']) Active @else Inactive @endif | |
No promotions foundTry adjusting your search filters or add new promotions |
||||||||