@extends('layouts.dashboard') @section('content') @php /** @var array $rows @var array $restaurants */ $restaurants = $restaurants ?? []; // This list reads no filters, so the export link needs no query string. $qs = ''; @endphp @php /* .qm-d2: the dashboard density standard (app.css ยง35) */ @endphp
| {{ t_raw('admin.deals.code_label') }} | {{ t_raw('common.title') }} | {{ t_raw('admin.deals.col_discount') }} | {{ t_raw('admin.deals.min_order_label') }} | {{ t_raw('vendor.coupons.col_window') }} | {{ t_raw('admin.deals.col_used') }} | {{ t_raw('common.active') }} | {{ t_raw('common.actions') }} |
|---|---|---|---|---|---|---|---|
| {{ $d['code'] }} |
{{ $d['title'] }}
@if (!empty($d['restaurant_name'])){{ $d['restaurant_name'] }}@endif
|
@php // Percent values are DECIMAL(10,2), so render the real figure - a 12.5% coupon
// must not display as 12%. The trailing .00 is trimmed so whole numbers still
// read "12%". Same idiom as the plan commission on the public partner page.
@endphp
{!! $d['type'] === 'percent' ? e(rtrim(rtrim(number_format((float) $d['value'], 2), '0'), '.')) . '%' : money($d['value']) !!} | {{ money($d['min_order']) }} | @if (!empty($d['starts_at']) || !empty($d['ends_at'])) {!! !empty($d['starts_at']) ? fmt_day($d['starts_at']) : t('vendor.coupons.window_now') !!} → {!! !empty($d['ends_at']) ? fmt_day($d['ends_at']) : t('vendor.coupons.window_no_end') !!} @else{{ t_raw('vendor.coupons.window_always_on') }}@endif | {{ (int) $d['used_count'] }}{{ (int) $d['max_uses'] > 0 ? ' / ' . (int) $d['max_uses'] : '' }} | {!! $d['is_active'] ? t('common.yes') : t('common.no') !!} |