@extends('layouts.app') @section('title','Raspored '.$order->number) @section('content')
| Spot | @foreach($blocks as $block) @php($cellPlays=$matrix->get($block->id,collect())) @php($duration=$cellPlays->sum(fn($play)=>(int)ceil(($play->orderItem->spot->duration_ms??0)/1000))+$jingles->durationFor($block)) @php($overLimit=$cellPlays->count()>$block->max_spots||$duration>$block->max_duration_seconds) @php($adWord=$cellPlays->count()===1?'reklama':($cellPlays->count()>=2&&$cellPlays->count()<=4?'reklame':'reklama')){{ $block->time_label }} {{ $overLimit?'⚠ ':'' }}{{ $cellPlays->count() }} {{ $adWord }} · {{ $duration }} s | @endforeachZbroj |
|---|---|---|
| {{ $item->spot->code }} — {{ $item->spot->name }} {{ $item->scheduledPlays->count() }}/{{ $item->total_plays }} ukupno · {{ $item->starts_on->format('d.m.') }}–{{ $item->ends_on->format('d.m.') }} | @foreach($blocks as $block) @php($cellPlays=$matrix->get($block->id,collect())) @php($mine=$cellPlays->firstWhere('order_item_id',$item->id)) @php($allowed=empty($item->allowed_hours)||in_array((int)substr($block->starts_at,0,2),$item->allowed_hours)) @php($dailyCount += $mine?1:0)@endforeach | {{ $dailyCount }} |
| Sadržaj blokova | @foreach($blocks as $block)@foreach($matrix->get($block->id,collect()) as $play){{ $play->orderItem->spot->code }}@endforeach | @endforeach