@extends('layouts.app') @section('content')

{{ $teacher->full_name }}

{{ $teacher->teacher_code }}

@if (auth()->user()->role === 'admin') แก้ไขข้อมูล @endif
@if (session('status'))
{{ session('status') }}
@endif

ตำแหน่ง: {{ $teacher->position ?? '-' }}

กลุ่มสาระ/งาน: {{ $teacher->subject_group ?? '-' }}

โทรศัพท์: {{ $teacher->phone ?? '-' }}

อีเมล: {{ $teacher->email ?? '-' }}

ที่อยู่: {{ $teacher->address ?? '-' }}

สถานะ: {{ $teacher->is_active ? 'ใช้งานอยู่' : 'ปิดใช้งาน' }}

@if (auth()->user()->role === 'admin')

บัญชีเข้าสู่ระบบ

@if ($account)

Username: {{ $account->username }}

สิทธิ์: {{ role_label($account->role) }}

สถานะบัญชี: {{ $account->is_active ? 'ใช้งานอยู่' : 'ปิดใช้งาน' }}

@else

ยังไม่มีบัญชีเข้าสู่ระบบสำหรับครูคนนี้

@endif
@endif @endsection