@if ($surveys)

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

{{-- Display Family Photo --}} @if (!empty($surveys->SurveyUserResidential) && count($surveys->SurveyUserResidential) > 0) @php $displayedFamilyPhoto = false; @endphp @foreach ($surveys->SurveyUserResidential as $docs) @if (!$displayedFamilyPhoto && !empty($docs['family_photo'])) @php $imagePath = asset( "storage/uploads/survey/project_{$docs['project_id']}/survey_{$docs['survey_id']}/docs/{$docs['family_photo']}", ); $fileType = pathinfo($imagePath, PATHINFO_EXTENSION); @endphp
Family Photo:
@php $displayedFamilyPhoto = true; @endphp @endif @endforeach @else
No documents available.
@endif
{{-- Display Household Members in Two Columns --}} @if (!empty($surveys->SurveyUserResidentialHouseholdMembers) && count($surveys->SurveyUserResidentialHouseholdMembers) > 0) @foreach ($surveys->SurveyUserResidentialHouseholdMembers as $index => $member)
{{ $index + 1 }}. Household Member Details:
Name:
{{ $member['name'] ?? 'N/A' }}
Relation:
{{ $member['relation']['name'] ?? 'N/A' }}
Age:
{{ $member['age'] ?? 'N/A' }}
Gender:
{{ $member['gender']['name'] ?? 'N/A' }}
Gender Other:
{{ $member['gender_other'] ?? 'N/A' }}
Marital Status:
{{ $member['maritalStatus']['name'] ?? 'N/A' }}
Education:
{{ $member['education']['name'] ?? 'N/A' }}
Education Other:
{{ $member['education_other'] ?? 'N/A' }}
Aadhar Number:
{{ $member['aadhaar_number'] ?? 'N/A' }}
Occupation:
{{ $member['occupation']['name'] ?? 'N/A' }}
Occupation Other:
{{ $member['occupation_other'] ?? 'N/A' }}
Monthly Income Range:
{{ $member['monthyRange']['range'] ?? 'N/A' }}
Secondary (if any other-part time):
{{ $member['secondary_part_time_income'] ?? 'N/A' }}
Hand/Illn:
{{ $member['Hand_llln'] ?? 'N/A' }}
Skill/ Vocational Training:
{{ $member['training']['name'] ?? 'N/A' }}
Skill/ Vocational Training Other:
{{ $member['training_other'] ?? 'N/A' }}
Distance from Place of Employment:
{{ $member['distance_place_employment'] ?? 'N/A' }}
Work Location:
{{ $member['work_location'] ?? 'N/A' }}

@endforeach @else
No household members available.
@endif
@else
No survey found for this project.
@endif