@php $action = $action ?? 'create'; $isUpdate = ($action === 'update'); // Extract schedule attributes (hỗ trợ cả Eloquent Model hoặc Array) $hasTested = (int) (is_array($schedule ?? null) ? ($schedule['has_tested'] ?? 0) : ($schedule->has_tested ?? 0)); $studentScoreId = is_array($schedule ?? null) ? ($schedule['student_score_id'] ?? null) : ($schedule->student_score_id ?? null); $rawCode = is_array($schedule ?? null) ? ($schedule['code'] ?? null) : ($schedule->code ?? null); $displayCode = ($hasTested === 1 && !empty($studentScoreId)) ? (string) $studentScoreId : ($rawCode ?? ''); $codeLabel = ($hasTested === 1 && !empty($studentScoreId)) ? 'MÃ BÀI THI SPEAKING' : 'MÃ CODE LỊCH THI SPEAKING'; $studentName = is_array($schedule ?? null) ? ($schedule['student_name'] ?? 'Học viên') : ($schedule->student_name ?? 'Học viên'); $studentEmail = is_array($schedule ?? null) ? ($schedule['student_email'] ?? null) : ($schedule->student_email ?? null); $studentPhone = is_array($schedule ?? null) ? ($schedule['student_phone'] ?? null) : ($schedule->student_phone ?? null); $examType = is_array($schedule ?? null) ? ($schedule['exam_type'] ?? null) : ($schedule->exam_type ?? null); $examTypeName = is_array($schedule ?? null) ? ($schedule['exam_type_name'] ?? (\App\Models\SpeakingSchedule::EXAM_TYPE_LABELS[$examType] ?? null)) : ($schedule->exam_type_name ?? (\App\Models\SpeakingSchedule::EXAM_TYPE_LABELS[$examType] ?? null)); $notes = is_array($schedule ?? null) ? ($schedule['notes'] ?? null) : ($schedule->notes ?? null); $rawStartTime = is_array($schedule ?? null) ? ($schedule['start_time'] ?? null) : ($schedule->start_time ?? null); $rawEndTime = is_array($schedule ?? null) ? ($schedule['end_time'] ?? null) : ($schedule->end_time ?? null); $startTimeFormatted = $rawStartTime ? \Carbon\Carbon::parse($rawStartTime)->format('H:i - d/m/Y') : 'Chưa thiết lập'; $endTimeFormatted = $rawEndTime ? \Carbon\Carbon::parse($rawEndTime)->format('H:i - d/m/Y') : 'Chưa thiết lập'; $maxUsage = is_array($schedule ?? null) ? ($schedule['max_usage'] ?? 1) : ($schedule->max_usage ?? 1); $isActive = is_array($schedule ?? null) ? ($schedule['is_active'] ?? 1) : ($schedule->is_active ?? 1); $creatorName = $creatorName ?? (auth()->check() ? auth()->user()->name : 'Vận hành'); $creatorEmail = $creatorEmail ?? (auth()->check() ? auth()->user()->email : null); $operatedAt = $operatedAt ?? \Carbon\Carbon::now()->format('H:i:s d/m/Y'); // Assets & Info $iccLogoSrc = $iccLogoSrc ?? asset('images/logo_icc.png'); $bgMoSrc = $bgMoSrc ?? asset('images/Mo.png'); $heroBgSrc = $heroBgSrc ?? asset('images/speaking_hero_bg.jpg'); $hotline = $hotline ?? '1900 9399 (nhấn phím 2)'; @endphp {{ $isUpdate ? 'Thông Báo Cập Nhật Lịch Thi Speaking' : 'Thông Báo Lịch Thi Speaking' }} – iCANCONNECT
iCANCONNECT

{{ $isUpdate ? 'Thông Báo Cập Nhật Lịch Thi Speaking' : 'Thông Báo Lịch Thi Speaking' }}

@if($isUpdate) Thông tin buổi thi Speaking của học viên đã được điều chỉnh thành công. @else Mã thi trực tuyến đã được cấp và sẵn sàng để Giáo viên thực hiện chấm thi. @endif

Xin chào {{ $creatorName }},
@if($isUpdate) Hệ thống vừa ghi nhận thao tác cập nhật thông tin lịch thi Speaking của bạn. Dưới đây là thông tin mới nhất: @else Hệ thống vừa ghi nhận thao tác tạo mới lịch thi Speaking của bạn. Dưới đây là thông tin chi tiết và mã code phòng thi: @endif
{{ $codeLabel }}
{{ $displayCode }}
Chi tiết thông tin lịch thi
@if(!empty($examTypeName) && $examTypeName !== 'N/A') @endif
Họ và tên học viên: {{ $studentName }}
Email học viên: @if($studentEmail) {{ $studentEmail }} @else Chưa cung cấp @endif
Số điện thoại: @if($studentPhone) {{ $studentPhone }} @else Chưa cung cấp @endif
Loại đề thi: @php $badgeBg = '#eef2ff'; $badgeColor = '#4338ca'; $badgeBorder = '#c7d2fe'; if (str_contains($examTypeName, 'IELTS')) { $badgeBg = '#fdf4ff'; $badgeColor = '#7e22ce'; $badgeBorder = '#f0abfc'; } elseif (str_contains($examTypeName, 'Kids')) { $badgeBg = '#ecfdf5'; $badgeColor = '#047857'; $badgeBorder = '#a7f3d0'; } elseif (str_contains($examTypeName, 'Speak')) { $badgeBg = '#fff7ed'; $badgeColor = '#c2410c'; $badgeBorder = '#ffedd5'; } $badgeStyle = "display: inline-block; background-color: {$badgeBg}; color: {$badgeColor}; font-weight: 700; padding: 3px 12px; border-radius: 6px; font-size: 12px; border: 1px solid {$badgeBorder};"; @endphp {{ $examTypeName }}
Thời gian bắt đầu: {{ $startTimeFormatted }}
Thời gian kết thúc: {{ $endTimeFormatted }}
Người thực hiện: {{ $creatorName }} @if($creatorEmail) ({{ $creatorEmail }}) @endif
Thời điểm thực hiện: {{ \Carbon\Carbon::parse($operatedAt ?? now())->addHours(7)->format('H:i:s d/m/Y') }}
@if(!empty($notes))
📝 Ghi chú từ Vận hành:
"{{ $notes }}"
@endif
📌 Hướng dẫn Giáo viên chấm thi qua mã:
1. Giáo viên đăng nhập hệ thống iCANCONNECT LMS.
2. Truy cập menu "Quản lý bài thi & Chấm thi" > "Lịch thi Speaking".
3. Bấm nút "Nhập mã chấm thi", nhập mã {{ $displayCode }} để mở giao diện chấm điểm.
Trân trọng cảm ơn,
iCANCONNECT
Mọi thông tin chi tiết cần hỗ trợ & giải đáp, vui lòng liên hệ Hotline: {{ $hotline }}
Giải pháp Học tiếng Anh trực tuyến toàn diện được phát triển bởi ICANCONNECT.