@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->allotments->isNotEmpty()) @foreach ($surveys->allotments as $owner) {{ $owner->created_at ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Location --}}
Location:
@if ($surveys->allotments->isNotEmpty()) @foreach ($surveys->allotments as $owner) {{ $owner->inventoryBuildingRoom?->location?->location ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Building Name --}}
Building Name:
@if ($surveys->allotments->isNotEmpty()) @foreach ($surveys->allotments as $owner) {{ $owner->inventoryBuildingRoom?->building?->building_name ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Building No --}}
Building No:
@if ($surveys->allotments->isNotEmpty()) @foreach ($surveys->allotments as $owner) {{ $owner->inventoryBuildingRoom?->building?->building_no ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Wing --}}
Wing:
@if ($surveys->allotments->isNotEmpty()) @foreach ($surveys->allotments as $owner) {{ $owner->inventoryBuildingRoom?->wing_name ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Floor --}}
Floor:
@if ($surveys->allotments->isNotEmpty()) @foreach ($surveys->allotments as $owner) {{ $owner->inventoryBuildingRoom?->floor_no ?? 'N/A' }}
@endforeach @else N/A @endif
{{-- Room No --}}
Room No:
@if ($surveys->allotments->isNotEmpty()) @foreach ($surveys->allotments as $owner) {{ $owner->inventoryBuildingRoom?->room_no ?? 'N/A' }}
@endforeach @else N/A @endif
@if (count($surveys->allotments)) @foreach ($surveys->allotments as $allotment) {{-- @php $allotment = $surveys->allotments->first(); @endphp --}}

Documents

@if (isset($allotment->indemnity_bond))
@if (isset($allotment->signed_taba))
@endif @endif
@if (!isset($allotment->indemnity_bond))
@csrf

Upload Indemnity Bond

@error('indemnityBond')
{{ $message }}
@enderror
@endif @if (isset($allotment->indemnity_bond) && !isset($allotment->signed_taba))
@csrf

Upload Signed Taba

@error('signedTaba')
{{ $message }}
@enderror
@endif @endforeach @endif @else
No survey found for this project.
@endif