@if ($surveys)

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

@if (!empty($surveys->SurveyUserResidential) && count($surveys->SurveyUserResidential) > 0) @foreach ($surveys->SurveyUserResidential as $docs) @if (!empty($docs['residential_user_photo_file_name'])) @php $imagePath = asset( "storage/uploads/survey/project_{$docs['project_id']}/survey_{$docs['survey_id']}/docs/{$docs['residential_user_photo_file_name']}", ); $fileType = pathinfo($imagePath, PATHINFO_EXTENSION); @endphp
Photo:
Residential
@else
N/A
N/A
@endif @endforeach @else
No documents available.
@endif
Survey Date:
{{ $surveys->survey_date ? date('d M Y', strtotime($surveys->survey_date)) : 'N/A' }}
Locality:
{{ $surveys->locality ?? 'N/A' }}
Map No
{{ $surveys->map_id ?? 'N/A' }}
Map Location:
{{ $surveys->map_location ?? 'N/A' }}
GPS Latitude:
{{ $surveys->gps_latitude ?? 'N/A' }}
GPS Longitude:
{{ $surveys->gps_longitude ?? 'N/A' }}
Structure Use:
@switch($surveys->structure_use) @case(1) Residential @break @case(2) Commercial @break @case(3) Residential + Commercial @break @case(4) Others @break @default N/A @endswitch
Name of occupant of Structure:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->name_occupant_structure }}
@endforeach @else

N/A

@endif
Status of present structure holder:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->structureHolder->name ?? 'N/A' }}
@endforeach @else

N/A

@endif
Structure holder Other:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->structure_holder_other ?? 'N/A' }}
@endforeach @else

N/A

@endif
Name of the Structure owner:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->structure_owner_name ?? 'N/A' }}
@endforeach @else

N/A

@endif
Place of Residence if owner is not stays in this structure:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->place_of_residence ?? 'N/A' }}
@endforeach @else

N/A

@endif
Mother Tongue:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->motherTongue->name ?? 'N/A' }}
@endforeach @else

N/A

@endif
Mother Tongue Other:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->mother_tongue_other ?? 'N/A' }}
@endforeach @else

N/A

@endif
Place of Origin:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->place_of_origin ?? 'N/A' }}
@endforeach @else

N/A

@endif
Caste Group:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->casteGroup->name ?? 'N/A' }}
@endforeach @else

N/A

@endif
Religion:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->religion->name ?? 'N/A' }}
@endforeach @else

N/A

@endif
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) @isset ($owner->religion_other)
Religion Other:
{{ $owner->religion_other ?? 'N/A' }}
@endisset @endforeach @endif {{--
BPL Card:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->bpl_card ?? 'N/A' }}
@endforeach @else

N/A

@endif
--}}
No of HH Members:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->no_of_household_members ?? 'N/A' }}
@endforeach @else

N/A

@endif
Total Area(Sq.mtr):
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->total_area ?? 'N/A' }}
@endforeach @else

N/A

@endif
Affected Area(Sq.mtr):
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->affected_area ?? 'N/A' }}
@endforeach @else

N/A

@endif
% Area:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->percentage_area ?? 'N/A' }}
@endforeach @else

N/A

@endif
Balanced Area:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->balanced_area ?? 'N/A' }}
@endforeach @else

N/A

@endif
Year of Settlement:
@if (!empty($surveys->SurveyUserResidential) && $surveys->SurveyUserResidential->isNotEmpty()) @foreach ($surveys->SurveyUserResidential as $owner) {{ $owner->year_of_establishment ?? 'N/A' }}
@endforeach @else

N/A

@endif
@else
No survey found for this project.
@endif