@php $j = 0 @endphp @foreach($compartments as $num => $each) @if (!$num) @continue @endif

CPT - {{ $num }}

@lang("content.weight") (KGs)

CPM: {{ isset($each->weight) && $each->weight ? $each->weight : "-" }}

LDM: {{ $flight->{"cmp_".$num."_wt"} ? $flight->{"cmp_".$num."_wt"} : "-" }}

@php $j++ @endphp @endforeach
@if (count($flightContainers)) @php $cmp5has1container = false @endphp @if (isset($compartments[5]) && count($compartments[5]->containers) == 1) @php $cmp5has1container = true @endphp @endif
@if (isset($compartments[5]))
@endif @php $openColumn = false @endphp @foreach($flightContainers as $i => $each) @if (!$each->row_number) @continue @endif @php $compartmentNum = substr($each->row_number, 0, 1); @endphp @php $class = getUldContainerClass($each->position, $compartmentNum, $cmp5has1container) @endphp @php $emptyPerc = 100 * ($each->vr / 4) @endphp @php $occupiedPerc = 100 - $emptyPerc @endphp @php $bgColor = getUldContainerBgColor($each->loaded_type) @endphp @if ($each->loaded_type == "N" || starts_with($each->loaded_type, "N") || $compartmentNum == 5) @php $occupiedPerc = 100 @endphp @endif @if ($openColumn && $each->position != RIGHT) @php $openColumn = false @endphp @php $mPosition = "R" @endphp @php $mNumberAndPosition = $rowNumber.$mPosition @endphp @php $mClass = getUldContainerClass($mPosition) @endphp @php $mBgColor = getUldContainerBgColor("N") @endphp

{{ $mNumberAndPosition }}

-

-

N

@endif @if ($each->position == LEFT) @php $openColumn = true @endphp
@endif @php $container = "-" @endphp @if ($each->loaded_type == "N" || starts_with($each->loaded_type, "N") || $compartmentNum == 5) @php $container = "-" @endphp @elseif ($each->container) @php $container = $each->container->type ? $each->container->type->name : "" @endphp @php $container .= $each->container->num @endphp @if ($each->container->airline) @php $container .= $each->container->airline->iata @endphp @else @php $container .= $each->container->owner @endphp @endif @endif @php $rowNumber = $each->row_number @endphp @php $position = $each->position @endphp @php $numberAndPosition = $rowNumber.($position ? $position : "") @endphp

{{ $numberAndPosition }}

{{--Exclude Container in CPT-5--}} @if ($compartmentNum == 5)

{!! ($each->weight ? $each->weight : "-")."
KGs" !!}

@else

{{ $each->container_matched ? "-" : $container }}

{{ $each->weight ? "(".$each->weight." KGs)" : "-" }}

@endif

{{ $each->loaded_type }}

@if ($each->position == RIGHT) @php $openColumn = false @endphp
@endif @endforeach
@endif