@php use App\Support\ParentChildPresenter; $defaultClassUuid = old('class_uuid', $classes->first()?->uuid ?? ''); $favouriteSubjects = old('favourite_subjects', []); $detailsLocked = $createdChild && ! $accessSaved; $accessEnabled = (bool) $createdChild; $signInEmail = $createdChild ? ParentChildPresenter::signInEmail($createdChild) : null; @endphp @extends('layouts.parent') @section('title', 'Add child ยท '.config('brand.name')) @section('content')
View all children
@if ($detailsLocked) Child details @else Child details @endif @if ($accessEnabled) Account access @else Account access @endif
@if ($tab === 'details')
Add your child

Save their details first. Next you will set the email and password they use to sign in.

@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf
Favourite subjects (optional)

Add more than one. Pick from this class or type a name.

    @foreach ($favouriteSubjects as $index => $subject) @endforeach
    @else
    Account access

    Set how {{ $createdChild->first_name }} signs in. This is not your parent password.

    @if ($accessSaved)

    {{ $createdChild->full_name }} can now sign in.

    @if ($signInEmail)

    Sign-in email: {{ $signInEmail }}

    @endif
    @else @if ($errors->any())
      @foreach ($errors->all() as $error)
    • {{ $error }}
    • @endforeach
    @endif

    {{ $createdChild->full_name }}

    @csrf @method('PUT')
    @endif @endif
    @endsection @section('scripts') @endsection