@extends('layouts.app') @section('title', 'Deals of the Day') @section('content')
Products currently in a deal, with countdown until prices are restored.
@if($activeDeals->isEmpty())No active deals.
@else| Image | Product | Deal applied | Compare discount | Time left | Actions |
|---|---|---|---|---|---|
|
@if($dp->image_url)
|
{{ $dp->title }} |
@if($deal->profit_type === 'percentage')
{{ number_format($deal->profit_value, 0) }}% profit
@else
${{ number_format($deal->profit_value, 2) }} profit
@endif
Cost {{ $dp->cost !== null ? '$' . number_format($dp->cost, 2) : '—' }} Sale ${{ number_format($dp->deal_price, 2) }} |
{{ number_format($deal->compare_discount_percent ?? 0, 0) }}% off | -- | @if($loop->first && Route::has('deals.edit')) Edit @elseif($loop->first) — @else — @endif |
Last 10 deals. Finished deals cannot be edited or deleted; create a new deal instead.
@if($deals->isEmpty())No deals yet.
@else| Deal # | Image | Product | Starts | Ends | Status | Actions |
|---|---|---|---|---|---|---|
| #{{ $deal->id }} |
@if($first && $first->image_url)
|
@if($first)
{{ $first->title }}
@if($deal->dealProducts->count() > 1)
+{{ $deal->dealProducts->count() - 1 }} more @endif @else — @endif |
{{ $deal->starts_at ? $deal->starts_at->copy()->timezone(config('app.deals_display_timezone', 'America/New_York'))->format('m/d/Y g:i A') : '—' }} | {{ $deal->ends_at ? $deal->ends_at->copy()->timezone(config('app.deals_display_timezone', 'America/New_York'))->format('m/d/Y g:i A') : '—' }} | @if($isFinished) Finished @else Running @endif | @if(!$isFinished && Route::has('deals.edit')) Edit @else — @endif |