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

Edit Teacher Assignment

Update the teacher assignment, teaching responsibility and academic details.

{{-- Optional View Button --}} View Assignment
{{-- ============================================================ Validation Summary ============================================================ --}} @if($errors->any())

Please correct the following information.

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

Assignment Information

Update the academic year, teacher, class and section for this assignment.

{{-- Academic Year --}}
@error('academic_year_id')

{{ $message }}

@enderror

Select the academic year in which this teaching assignment applies.

{{-- Teacher --}}
@error('teacher_id')

{{ $message }}

@enderror

Choose the teacher responsible for this teaching assignment.

{{-- Class --}}
@error('class_id')

{{ $message }}

@enderror

Classes are filtered according to the selected academic year.

{{-- Section --}}
@error('section_id')

{{ $message }}

@enderror

Sections are filtered according to the selected class.

{{-- ==================================================== Teaching Details ==================================================== --}}

Teaching Details

Update the subject, teaching workload and class teacher responsibility.

{{-- Subject --}}
@error('subject_name')

{{ $message }}

@enderror

Enter the subject this teacher teaches in the selected class and section.

{{-- Periods Per Week --}}
@error('periods_per_week')

{{ $message }}

@enderror

Number of teaching periods assigned each week.

{{-- Class Teacher --}}
@error('is_class_teacher')

{{ $message }}

@enderror

Mark Yes if this teacher is responsible for the selected class and section.

{{-- Status --}}
@error('is_active')

{{ $message }}

@enderror

Inactive assignments remain stored but are excluded from active operations.

{{-- ==================================================== Assignment Structure ==================================================== --}}

Assignment Structure

How this assignment connects with the academic and attendance system.

Teacher

Links the selected teacher with their teaching responsibility.

Class & Section

Defines where the teacher performs this teaching assignment.

Subject

Identifies the subject handled by the teacher for this assignment.

{{-- ==================================================== Sidebar ==================================================== --}}
{{-- ==================================================== Update Assignment ==================================================== --}}

Update Assignment

Review the changes before saving.

Changing the academic year, class or section may affect how this teacher assignment is used throughout the system.

Cancel
{{-- ==================================================== Assignment Summary ==================================================== --}}

Assignment Summary

{{-- Teacher --}}

Teacher

{{ $teacherAssignment->teacher?->fullName() ?? 'N/A' }}

{{-- Class --}}

Class & Section

{{ $teacherAssignment->schoolClass?->name ?? 'N/A' }} @if($teacherAssignment->section) — {{ $teacherAssignment->section->name }} @endif

{{-- Subject --}}

Subject

{{ $teacherAssignment->subject_name }}

{{-- ==================================================== Quick Guide ==================================================== --}}

Quick Guide

{{-- Step 1 --}}
1

Review Academic Details

Confirm the academic year, class and section are correct.

{{-- Step 2 --}}
2

Review Teacher

Confirm that the correct teacher is assigned.

{{-- Step 3 --}}
3

Update Teaching Details

Change the subject, workload or class teacher responsibility if needed.

{{-- ==================================================== Record Information ==================================================== --}}

Record Information

Assignment ID #{{ $teacherAssignment->id }}
Created {{ $teacherAssignment->created_at?->format('d M Y') ?? 'N/A' }}
Last Updated {{ $teacherAssignment->updated_at?->format('d M Y') ?? 'N/A' }}
{{-- ==================================================== Current Academic Year ==================================================== --}} @php $currentAcademicYear = $academicYears->firstWhere( 'is_current', true ); @endphp @if($currentAcademicYear)

Current Academic Year

{{ $currentAcademicYear->name }}

@if( $currentAcademicYear->start_date && $currentAcademicYear->end_date )

{{ $currentAcademicYear->start_date->format('d M Y') }} – {{ $currentAcademicYear->end_date->format('d M Y') }}

@endif
@endif
@endsection @push('scripts') @endpush