@extends('layouts.admin') @php $routeName = request()->route()->getName(); $baseRoute = 'admin.data-config.advertisements'; @endphp @section('content')
{{ $ad->company ? $ad->company->name : __('System') }}
{{ __('Type') }}
{{ $ad->type === 'video' ? __('Video') : __('Image') }}
{{ __('Duration') }}
{{ $ad->duration }} {{ __('sec') }}
| {{ __('Preview') }} | {{ __('Name') }} | @if(auth()->user()->isSystemAdmin()){{ __('Company Name') }} | @endif{{ __('Type') }} | {{ __('Duration') }} | {{ __('Status') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|---|
|
@if($ad->type === 'image')
|
{{ $ad->name }} | @if(auth()->user()->isSystemAdmin()){{ $ad->company->name ?? __('System Default') }} | @endif{{ __($ad->type) }} | {{ $ad->duration }}s |
@php
$now = now();
$isStarted = !$ad->start_at || $ad->start_at <= $now; $isExpired=$ad->end_at &&
$ad->end_at < $now; $isPlaying=$ad->is_active && $isStarted && !$isExpired;
@endphp
@if(!$ad->is_active)
|
@if($ad->is_active)
@else
@endif
|
{{ __('Please confirm the details below') }}