@if ($surveys)

ID Number: {{ $surveys->structure_id ?? 'N/A' }} - {{ $surveys->pap_name ?? 'Unknown' }}

{{-- Name of Occupant --}}
Name of occupant of Structure:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->name_occupant_structure }}
@endforeach @elseif (!empty($surveys->surveyUserCommercial) && $surveys->surveyUserCommercial->isNotEmpty()) @foreach ($surveys->surveyUserCommercial as $surveyCommercial) {{ $surveyCommercial->name_establishment_owner }}
@endforeach @elseif (!empty($surveys->surveyUserOthers) && $surveys->surveyUserOthers->isNotEmpty()) @foreach($surveys->surveyUserOthers as $owner) {{ $owner->name_of_occupant }}
@endforeach @else N/A @endif
{{-- Date --}}
Allotment Date:
@if ($surveys->tempAllotments->isNotEmpty()) @foreach ($surveys->tempAllotments as $owner) {{ $owner->created_at ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Location --}}
Location:
@if ($surveys->tempAllotments->isNotEmpty()) @foreach ($surveys->tempAllotments as $owner) {{ $owner->inventoryBuildingRoom?->location?->location ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Building Name --}}
Building Name:
@if ($surveys->tempAllotments->isNotEmpty()) @foreach ($surveys->tempAllotments as $owner) {{ $owner->inventoryBuildingRoom?->building?->building_name ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Building No --}}
Building No:
@if ($surveys->tempAllotments->isNotEmpty()) @foreach ($surveys->tempAllotments as $owner) {{ $owner->inventoryBuildingRoom?->building?->building_no ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Wing --}}
Wing:
@if ($surveys->tempAllotments->isNotEmpty()) @foreach ($surveys->tempAllotments as $owner) {{ $owner->inventoryBuildingRoom?->wing_name ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Floor --}}
Floor:
@if ($surveys->tempAllotments->isNotEmpty()) @foreach ($surveys->tempAllotments as $owner) {{ $owner->inventoryBuildingRoom?->floor_no ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Room No --}}
Room No:
@if ($surveys->tempAllotments->isNotEmpty()) @foreach ($surveys->tempAllotments as $owner) {{ $owner->inventoryBuildingRoom?->room_no ?? 'N/A' }}
@endforeach @else N/A @endif
@else
No survey found for this project.
@endif