{{-- ตั้งค่า base URL ของแอป ให้ React fetch() ต่อ path ได้ถูกต้อง แม้เว็บจะรันอยู่ใต้ subdirectory (เช่น /consultingcenter/public) --}} @yield('title') | Time Attendance {{-- โหลด CSS/JS ที่ compile จาก Vite (จำเป็นสำหรับ React component เช่น กราฟต่างๆ) --}} @vite(['resources/css/app.css', 'resources/js/app.jsx']) @yield('style')
{{-- แถบ "✨ SIIT Click here" วางไว้บนสุด เหนือ header (แสดงเฉพาะหน้าแรก หรือหน้าที่ส่ง $showTopBanner) --}} @if(!empty($showTopBanner) || request()->is('/'))

✨ SIIT Click here

@endif {{-- จุดที่ 1: วาง Header หลักไว้ตรงนี้ --}} @include('layouts.header') {{-- แสดงข้อความแจ้งเตือนจาก redirect()->with('success', ...) / ->with('error', ...) ทำไว้ที่ layout กลางเพื่อให้ทุกหน้าที่ extends 'layouts.master' ได้ใช้งานทันที (ถ้าหน้าไหนมี modal ของตัวเองสำหรับแสดงข้อความอยู่แล้ว เช่น #modal01 ใน quotation_list ให้เลือกใช้อย่างใดอย่างหนึ่ง จะได้ไม่ขึ้นซ้ำซ้อนกัน) --}} @if(session('success') || session('error') || session('warning') || session('info'))
@if(session('success')) @endif @if(session('error')) @endif @if(session('warning')) @endif @if(session('info')) @endif
@endif @yield('content')
{{-- จุดที่ 2: วาง Footer หลักไว้ตรงนี้ --}} @include('layouts.footer') {{-- --}} @yield('script')