@extends('layouts.app')
@section('title', __('Информация о преподавателе'))
{{--
Ports app/Views/admin/teachers/show.php (legacy) + the render() payload
from App\Controllers\TeacherController::show() — see the Phase 42 plan.
All 4 write actions (update_info/update_price/update_password/delete)
post to this same URL with a hidden _action field, dispatched server-side
by TeacherController::dispatchAction() — mirroring the legacy closure
route exactly. None of the three edit modals repopulate old input on a
validation failure (confirmed: legacy's own view never references
Old:: for these fields) — only a plain flash message is shown, matching
legacy exactly.
Schedule grid: see the comment above the «Расписание преподавателя» card.
--}}
@section('content')
{{-- «Ставки»: per-group rate overriding the default «Ставка» above for
lessons this teacher conducts in that group (teacher_group_rates).
Blank = use the default. Saved via _action=update_group_rates.
Only where MODULE_TEACHER_GROUP_RATES is on (Nomad) — $groupRates is
null everywhere else. --}}
@if ($groupRates !== null)
{{ __('Ставки') }}
{{ __('Ставка за урок в каждой группе. Пустое поле — используется основная ставка (:price_value).', ['price_value' => $teacher['price_value'] !== null ? $teacher['price_value'].__(' тг') : __('не указана')]) }}
@else
{{-- Wrapper is required, not cosmetic: the layout sets body { overflow-x: hidden },
so without a scrollable ancestor the later days are clipped on a phone. --}}
{{ __('Время') }}
@foreach ($daysOfWeek as $index => $day)
$index === $todayIndex])>{{ $day }}
@endforeach
@foreach ($visibleSlots as $slotStart => $slotLabel)
{{-- «Передать группы» — _action=reassign_groups. Only active groups are
offered, all ticked; past lessons stay with whoever conducted them. --}}
@if (! empty($reassignTeachers) && ! empty($activeGroups))
@endif
{{-- «Уволен / ушёл» — _action=teacher_left, admin only. Every active group
closes on the picked date (TeacherController::teacherLeftAction() →
GroupDeactivation); the teacher's account itself isn't touched. --}}
@if (\App\Support\SessionAuth::role() === 'admin' && ! empty($activeGroups))