@extends('layouts.app') @section('title', 'Edit Parent') @section('content')
{{-- ============================================================ Page Header ============================================================ --}}

Edit Parent

Update parent, guardian and communication information.

@can('parents.view') View Parent @endcan
{{-- ============================================================ Validation Summary ============================================================ --}} @if($errors->any())

Please correct the following information.

    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{-- ============================================================ Form ============================================================ --}}
@csrf @method('PUT')
{{-- ==================================================== Main Content ==================================================== --}}
{{-- ================================================= Parent Information ================================================= --}}

Parent Information

Update the student's primary parent information.

{{-- Father Name --}}
@error('father_name')

{{ $message }}

@enderror
{{-- Mother Name --}}
@error('mother_name')

{{ $message }}

@enderror
{{-- ================================================= Guardian Information ================================================= --}}

Guardian Information

Update guardian details when someone other than the parents is responsible for the student.

{{-- Guardian Name --}}
@error('guardian_name')

{{ $message }}

@enderror
{{-- Guardian Relation --}}
@error('guardian_relation')

{{ $message }}

@enderror
{{-- Guardian Phone --}}
@error('guardian_phone')

{{ $message }}

@enderror
{{-- Guardian Email --}}
@error('guardian_email')

{{ $message }}

@enderror
{{-- ================================================= Contact Information ================================================= --}}

Contact Information

Update the contact details used by the school for communication.

{{-- Primary Phone --}}
@error('primary_phone')

{{ $message }}

@enderror

This is the family's primary contact number.

{{-- Alternate Phone --}}
@error('alternate_phone')

{{ $message }}

@enderror
{{-- Email --}}
@error('email')

{{ $message }}

@enderror
{{-- ================================================= Address ================================================= --}}

Address

Update the residential or correspondence address.

0 / 1000
@error('address')

{{ $message }}

@enderror
{{-- ================================================= Linked Students ================================================= --}}

Linked Students

Students currently associated with this parent record.

{{ $studentParent->students()->count() }} Students
@php $linkedStudents = $studentParent->students() ->with([ 'schoolClass', 'section', ]) ->orderBy('first_name') ->limit(5) ->get(); @endphp @if($linkedStudents->isNotEmpty())
@foreach($linkedStudents as $student)
{{ mb_strtoupper(mb_substr($student->first_name, 0, 1)) }}

{{ $student->fullName() }}

{{ $student->schoolClass?->name ?? 'No Class' }} @if($student->section) • {{ $student->section->name }} @endif

@can('students.view') @endcan
@endforeach
@if($studentParent->students()->count() > 5)

Showing 5 of {{ $studentParent->students()->count() }} linked students.

@endif @else

No students linked

Students can be linked to this parent from the student module.

@endif
{{-- ==================================================== Sidebar ==================================================== --}}
{{-- ================================================= Update ================================================= --}}

Update Parent

Save changes made to this record.

Updating this record will also update the parent information displayed for linked students.

Cancel
{{-- ================================================= Record Overview ================================================= --}}

Record Overview

Parent {{ $studentParent->displayName() }}
Students {{ $studentParent->students()->count() }}
Created {{ $studentParent->created_at?->format('d M Y') ?? '—' }}
Last Updated {{ $studentParent->updated_at?->format('d M Y') ?? '—' }}
{{-- ================================================= Communication ================================================= --}}

Communication

Manage communication preferences.

{{-- SMS --}}

Send SMS to the primary phone.

@error('sms_enabled')

{{ $message }}

@enderror
{{-- Email --}}

Send notices by primary email.

@error('email_enabled')

{{ $message }}

@enderror
{{-- ================================================= Status ================================================= --}}

Record Status

@error('is_active')

{{ $message }}

@enderror

Inactive records remain stored but should not be used for new student assignments.

{{-- ================================================= Danger Zone ================================================= --}} @can('parents.delete')

Danger Zone

Permanent record actions.

@if($studentParent->students()->exists())

Parent cannot be deleted

This record has students assigned to it. Reassign those students before deleting the parent.

@else

Delete this parent record if it is no longer required. This action cannot be undone from the application interface.

@endif
@endcan
{{-- ================================================================ Delete Form ================================================================ --}} @can('parents.delete') @if(!$studentParent->students()->exists()) @endif @endcan @endsection @push('scripts') @endpush