@extends('adminlte::page') @section('title', $resort->name) @section('content_header') @if (!isset($is_intranet) || (isset($is_intranet) && !$is_intranet))
{{ $resort->name }}
@can('create', \App\Models\Transaction::class)
@include('share.buttons.create', [ 'routeName' => 'transactions.create', 'params' => $resort, 'text' => 'Bulk action', ])
@endcan
@endif @stop @section('sticky-content') @if (count($notes->whereNull('finished_at')) && Auth::check())

Mensajes importantes

@foreach ($notes->whereNull('finished_at') as $note)
{{ $note->body }}
@endforeach
@endif @endsection @section('content') @if ($categories->count()) @foreach ($dates as $year => $months) @foreach ($months as $month => $data) @php $date = \Carbon\Carbon::parse($data[1][0]['date']); $dates = \Carbon\CarbonPeriod::create($date->copy()->startOfMonth(), $date->copy()->endOfMonth()); @endphp

{{ Str::ucfirst($date->monthName) }} {{ $date->year }}

@php $startOfMonth = $date ->copy() ->startOfMonth() ->toDateString(); $endOfMonth = $date ->copy() ->endOfMonth() ->toDateString(); $notes_by_month = $notes->where('started_at', '<=', $endOfMonth)->where('finished_at', '>=', $startOfMonth); @endphp @if (count($notes_by_month) && Auth::check())

Mensajes

@foreach ($notes_by_month as $note)

{{ $note->body }}

@endforeach
@endif
@for ($i = 1; $i <= 31; $i++) @php $day = null; $date = isset($data[$i][0]) ? \Carbon\Carbon::parse($data[$i][0]['date']) : null; if ($date) { $day = $date->day; $dayOfWeekIso = $date->dayOfWeekIso; if ($dayOfWeekIso >= 5) { $day = $day . Str::ucfirst(Str::substr($date->minDayName, 0, 1)); } } @endphp @endfor @foreach ($categories as $category) @for ($i = 1; $i <= 31; $i++) @php $day = null; $date = isset($data[$i][0]) ? \Carbon\Carbon::parse($data[$i][0]['date']) : null; @endphp @if ($date) @can('resorts.inventory') @php $color = null; $quantity = $data[$i][$category->id]['quantity']; $occupancy = $data[$i][$category->id]['occupancy']; $availability = $occupancy; if (!$category->categories->count()) { $availability = $quantity - $occupancy - $data[$i][$category->id]['locked']; } $restriction = $calendar[$year][$month][$date->day][$category->id][0]['restriction'] ?? null; $lower_limit = $category->lower_limit ?? floor($quantity * 0.1); $upper_limit = $category->upper_limit ?? floor($quantity * 0.15) ?: 1; if ($restriction && $restriction['code'] == 'stop' && $availability >= $upper_limit) { $color = '#28a745'; } if ((!$restriction || ($restriction && $restriction['code'] == 'open')) && $availability <= $lower_limit) { $color = '#ffc107'; } @endphp @endcan @endif @endfor @endforeach @can('resorts.inventory') @for ($i = 1; $i <= 31; $i++) @php $day = null; $date = isset($data[$i][0]) ? \Carbon\Carbon::parse($data[$i][0]['date']) : null; @endphp @if ($date) @endif @endfor @for ($i = 1; $i <= 31; $i++) @php $day = null; $date = isset($data[$i][0]) ? \Carbon\Carbon::parse($data[$i][0]['date']) : null; @endphp @if ($date) @endif @endfor @for ($i = 1; $i <= 31; $i++) @php $day = null; $date = isset($data[$i][0]) ? \Carbon\Carbon::parse($data[$i][0]['date']) : null; @endphp @if ($date) @endif @endfor @endcan
{{ __('Categorias') }} {{ $day }}
{{ $category->name }} @can('categories.index', \App\Models\Category::class) @foreach ($category->rooms as $room) {{ $room->code }} @endforeach @foreach ($category->categories as $chield_category) @endforeach {{-- --}}
@include('admin.categories.includes.index_sum_rooms', [ 'category' => $category, ])
{{-- --}} @endcan
{{ $availability ?? '' }}
 
{{ __('Availability') }} {{ $data[$i][0]['quantity'] - $data[$i][0]['occupancy'] - $data[$i][0]['locked'] }}
{{ __('Locked') }} {{ $data[$i][0]['locked'] ?? 0 }}
{{ __('% Occ gross') }} {{ round(($data[$i][0]['occupancy'] / $data[$i][0]['quantity']) * 100 ?? 0) }}
@endforeach @endforeach
 
@else

No hay datos para mostrar

@endif @stop