@extends('layouts.app') @section('title', 'Ученики') @push('styles') @endpush @section('content')

{{ \App\Support\SessionAuth::user()['name'] ?? '' }}

@if ($role === 'admin') Импорт @endif Добавить
@php $selectedDisciplines = array_map('intval', (array) request('disciplines', [])); @endphp
@php $selectedStatuses = array_map('intval', (array) request('status_ids', [1])); @endphp @foreach ($allStatuses as $st)
id, $selectedStatuses, true) ? 'checked' : '' }} onchange="document.getElementById('filter-form').submit()">
@endforeach
@if (!empty($allTags))
@if ($canManageTags) @endif
@foreach ($allTags as $tag)
id, $selectedTagIds) ? 'checked' : '' }} onchange="document.getElementById('filter-form').submit()">
@endforeach
@else
Метки: @if ($canManageTags) @endif
@endif
Ученики {{ $totalItems }}
@if ($canManageStudents) @endif
@if (!empty($paginatedUnits))
@if ($canManageStudents) @endif @if ($canManageStudents) @endif @foreach ($paginatedUnits as $unit) @if ($canManageStudents) @endif @if ($canManageStudents) @endif @endforeach
ФИО Метки Класс Язык Предметы Баланс Родитель
{{ trim(($unit->last_name ?? '').' '.($unit->first_name ?? '')) ?: 'Без имени' }} @if (!empty($unit->phone))
{{ $unit->phone }} @endif
@foreach ($studentTagsMap[$unit->id] ?? [] as $tag) {{ $tag->name }} @endforeach @if ($canManageTags) @endif
{{ $unit->class_name ?? '—' }} {{ $unit->language_name ?? '—' }} {{ $unit->disciplines ?? '—' }} @php $unitBalance = (float) ($unit->total_paid ?? 0) - (float) ($unit->total_charged ?? 0); $balanceClass = $unitBalance >= 0 ? 'text-success' : 'text-danger'; @endphp {{ number_format($unitBalance, 0, ',', ' ') }} ₸ @if ($invoiceRequest = $openInvoiceRequests[$unit->id] ?? null)
@if ($invoiceRequest->status === 'approved') Родитель подтвердил @else Ждём ответа родителя @endif @endif
@php $agentName = trim(($unit->agent_last_name ?? '').' '.($unit->agent_first_name ?? '')); $agentPhone = $unit->agent_phone_number ?? ''; @endphp {{ $agentName ?: '—' }} @if ($agentPhone)
{{ $agentPhone }} @endif
@else
Ученики не найдены.
@endif @if ($totalPages > 1) @endif
@if ($canManageStudents) @endif @if ($canManageTags) @endif @endsection @push('scripts') @endpush