@php use App\Models\User; use App\Models\SchoolHealthPhysician; use App\Models\NutritionistHistoryEvaluationSection; use App\Models\PsychologistHistoryAssessmentSection; use App\Models\form_entry; use App\Models\FormData; use Illuminate\Support\Collection; use App\Models\StudentBiodata; @endphp @extends('admin.main') @section('content')
@php $queryString = !empty($details) && !empty($details['id']) ? 'screeningFormId=' . $details['id'] : 0; $queryString .= !empty($details) && !empty($details['gr_number']) ? '&gr_number=' . $details['gr_number'] : ''; $queryString .= !empty($details) && !empty($details['class']) ? '&class=' . $details['class'] : ''; $queryString .= !empty($details) && !empty($details['name']) ? '&name=' . $details['name'] : ''; $queryString .= !empty($details) && !empty($details['dob']) ? '&dob=' . $details['dob'] : ''; $queryString .= !empty($details) && !empty($details['age']) ? '&age=' . $details['age'] : ''; $queryString .= !empty($details) && !empty($details['gender']) ? '&gender=' . $details['gender'] : ''; $queryString .= !empty($details) && !empty($details['school']) ? '&school=' . $details['school'] : ''; $queryString .= !empty($details) && !empty($details['any_known_medical_condition']) ? '&any_known_medical_condition=' . $details['any_known_medical_condition'] : ''; $queryString .= !empty($details) && !empty($details['bio_data_comment']) ? '&bio_data_comment=' . urlencode($details['bio_data_comment']) : ''; $queryString .= !empty($details) && !empty($details['address']) ? '&address=' . $details['address'] : ''; $queryString .= !empty($details) && !empty($details['emergency_contact_number']) ? '&emergency_contact_number=' . $details['emergency_contact_number'] : ''; if (!empty($area)) { foreach ($area as $item) { if (!empty($details) && !empty($details['area']) && $details['area'] == $item->id) { $queryString .= !empty($details) && !empty($details['area']) ? '&area=' . $item->id : ''; } } } if (!empty($area)) { foreach ($city as $item) { if (!empty($details) && !empty($details['city']) && $details['city'] == $item->id) { $queryString .= !empty($details) && !empty($details['city']) ? '&city=' . $item->id : ''; } } } $queryString .= !empty($details) && !empty($details['guardianname']) ? '&guardianname=' . $details['guardianname'] : ''; $queryString .= !empty($details) && !empty($details['blood_group']) ? '&blood_group=' . $details['blood_group'] : ''; $classLabels1 = [ '0' => 'Play group', '00' => 'KG-1', '000' => 'KG-2', ]; $queryStringClass = $classLabels1[$details['class']] ?? $details['class']; $classLabels = [ '0' => 'Play group', '00' => 'KG-1', '000' => 'KG-2', '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', ]; $selectedClass = old('class', $details['class'] ?? ''); $queryString .= !empty($details) ? '&class=' . $selectedClass : ''; @endphp @if (auth()->guard('admin')->check() && (auth()->guard('admin')->user()->role == 1 || auth()->guard('admin')->user()->role == 2)) @endif       @if (auth()->guard('admin')->check() && (auth()->guard('admin')->user()->role == 1 || auth()->guard('admin')->user()->role == 2)) @endif       @if (auth()->guard('admin')->check() && (auth()->guard('admin')->user()->role == 1 || auth()->guard('admin')->user()->role == 2)) @endif @if (auth()->guard('admin')->check() && (auth()->guard('admin')->user()->role == 1 || auth()->guard('admin')->user()->role == 2)) {{-- --}} @endif {{-- --}} {{-- --}} {{-- --}} {{--

Student Details

@if (Session::has('error_message')) @endif @if (Session::has('success_message')) @endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@php // Define the default image path $defaultImage = asset('uploads/student/profile_images/default.png'); // Check if the profile image exists $profileImagePath = $details['profile_image'] ?? null; $imagePath = public_path("uploads/student/profile_images/{$profileImagePath}"); $profileImageUrl = file_exists($imagePath) ? asset('uploads/student/profile_images/' . $profileImagePath) : $defaultImage; @endphp Profile Image
{{-- --}}
@php $renderAge = ''; if (!empty($details['dob'])) { $dob = \Carbon\Carbon::parse($details['dob']); $now = \Carbon\Carbon::now(); $diff = $dob->diff($now); $years = $diff->y; $months = $diff->m; $renderAge = $years . ':' . str_pad($months, 2, '0', STR_PAD_LEFT); } else { $renderAge = isset($details['age']) && $details['age'] !== '' ? $details['age'] . ':00' : ''; } @endphp
@php $classLabels = [ '0' => 'Play group', '00' => 'KG-1', '000' => 'KG-2', ]; @endphp
{{-- --}}

Screening

{{-- --}} @php $form_entry_screening = form_entry::where('screeningFormId', $form_id)->get()->toArray(); @endphp @if (!empty($form_entry_screening)) @foreach ($form_entry_screening as $key => $value) @endforeach @endif

Medical History

@if ($medical_history_id->isNotEmpty()) @foreach ($medical_history_id as $medical_id)