{{-- Ports app/Views/student/show.php's renderGroupCard() (legacy, lines 76-282) — see the Phase 8 plan. Stats/tariff/month-grouping are precomputed in StudentProfileController@loadGroupInfo/computeGroupStats/groupCardTariff (Blade partials shouldn't run SQL or business logic), not recomputed here. --}} @php $tariff = $group->tariff; $stats = $group->stats; $uniqueId = $group->uniqueId; @endphp
{{ $group->group_name }}
{{ $group->is_active ? __('Активен') : __('Неактивен') }}

{{ __('Предмет:') }} {{ $group->discipline_name }}

{{ __('Учитель:') }} {{ $group->teacher_name ?? '—' }}

{{ __('С:') }} {{ date('d.m.Y', strtotime($group->joined_at)) }} @if ($group->end_date) {{ __('по') }} {{ date('d.m.Y', strtotime($group->end_date)) }} @endif

@if (!empty($group->schedule))

{{ __('Расписание:') }} @if ((int) ($group->student_weekdays ?? 0) !== 0) {{ __('свои дни') }} @endif @foreach ($group->schedule as $schedule) {{ \App\Support\Weekdays::toString((int) $schedule->weekdays) }} {{ date('H:i', strtotime($schedule->begin_time)) }}–{{ date('H:i', strtotime($schedule->end_time)) }} @if (!empty($schedule->classroom_name)) ({{ $schedule->classroom_name }}) @endif @endforeach

@endif @if ($tariff)
@if ($tariff->source === 'individual') {{ __('Инд. тариф') }} @else {{ __('Общий тариф') }} @endif {{ preg_replace('/^\[manual\]\s*/', '', $tariff->name) }}  ·  @if (!empty($tariff->discounted_price)) {{ number_format((float) $tariff->price, 0, ',', ' ') }} ₸ {{ number_format($tariff->discounted_price, 0, ',', ' ') }} ₸ -{{ $tariff->discount_percent }}% @else {{ number_format((float) $tariff->price, 0, ',', ' ') }} ₸ @endif / {{ __(':n уроков', ['n' => $tariff->lessons_count]) }} @if ($tariff->lessons_count > 0) @php $perLessonBase = $tariff->discounted_price ?? (float) $tariff->price; @endphp ({{ number_format($perLessonBase / $tariff->lessons_count, 0, ',', ' ') }} ₸/{{ __('ур.') }}) @endif
@else
⚠ {{ __('Тариф не назначен') }} — {{ __('назначается в «График оплаты»') }}
@endif @if ($stats)
@foreach (['week' => '📅 '.__('За 7 дней'), 'month' => '📆 '.__('За 30 дней')] as $key => $label) @php $s = $stats[$key]; $pctColor = $s['percent'] < 50 ? 'red' : ($s['percent'] < 80 ? 'warning' : 'green'); $pctHex = ['green' => '#28a745', 'amber' => '#ffc107', 'red' => '#dc3545'][$pctColor] ?? ''; @endphp
{{ $label }}
{{ __('Уроков: :total  |  Посетил: :attended  |  Пропуски: :absences', ['total' => $s['total'], 'attended' => $s['attended'], 'absences' => $s['absences']]) }}
{{ __('Процент:') }} {{ $s['percent'] }}% {{ __(' |  КР: :kravg  |  ДЗ: :dzavg', ['kravg' => $s['krAvg'], 'dzavg' => $s['dzAvg']]) }}
@endforeach
@endif @if (!empty($group->lessons))
{{ __('Уроки и посещаемость:') }}
@foreach ($group->months as $monthKey => $monthLessons) @endforeach
@endif