@extends('layout.app', ['title' => 'Học sinh | Lịch sử tích điểm']) @push('style') @vite(['resources/css/register.css', 'resources/css/students/student.css']) @endpush @php use App\Enums\CourseType; $breadcrumbs = [ ['active' => false, 'title' => 'Trang Chủ', 'href' => '#'], ['active' => true, 'title' => 'Lịch sử tích diểm'], ]; @endphp @section('content')
@include('students.profile_card')
@include('custom_errors.session-errors')
@if (isset($historyData)) @foreach ($historyData as $data)
@if ($data->type == CourseType::COURSE_SELF_STUDY->value) Hoàn thành bài tập {{ \App\Enums\Subject::tryFrom($data->subject_id)?->name() ?? '' }} - {{ \App\Enums\Grades::tryFrom($data->grade_id)?->name() ?? '' }}, Chương {{ $data->chapter_number }}, Bài {{ $data->unit_number }} @elseif($data->type == CourseType::ABROAD_PROGRAM_STUDY->value) Hoàn thành bài tập {{ $data->course_name }}, Unit {{ $data->chapter_number }}, Topic {{ $data->unit_number }} @endif

{{ $data->type == CourseType::COURSE_SELF_STUDY->value ? 'Level' : '' }} {{ $data->level }}

{{ $data->created_at->format('d-m-Y') }} {{ $data->created_at->format('h:i a') }}
+{{ $data->score }} điểm
{{ $data->point_change }} điểm
@endforeach @endif
@endsection @push('script') @vite('resources/js/student_history.js') @endpush