@extends('adminlte::page') @section('title', $resort->name) @section('content_header') @if (!isset($is_intranet) || (isset($is_intranet) && !$is_intranet))
{{ $note->body }}
| {{ __('Categorias') }} | @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{{ $day }} | @endfor||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $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,
])
|
@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
{{ $availability ?? '' }} | @endif @endfor||||||||||||||||||||||||||||||
| {{ __('Availability') }} | @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){{ $data[$i][0]['quantity'] - $data[$i][0]['occupancy'] - $data[$i][0]['locked'] }} | @endif @endfor||||||||||||||||||||||||||||||
| {{ __('Locked') }} | @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){{ $data[$i][0]['locked'] ?? 0 }} | @endif @endfor||||||||||||||||||||||||||||||
| {{ __('% Occ gross') }} | @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){{ round(($data[$i][0]['occupancy'] / $data[$i][0]['quantity']) * 100 ?? 0) }} | @endif @endfor||||||||||||||||||||||||||||||