{{-- #36995 — SCR-01「アカウント情報自動更新確認モーダル」(modal xác nhận tự động cập nhật tên LOA & ảnh account) Render GLOBAL ở tầng app-shell (footer của mọi layout có bot active) — KHÔNG gắn route /admin/bot-edit (spec-dev-FE mục 0/1.3, QA-dev-04). Owner-only (BR-03 / QA-spec-06): CHỈ 主管理者 (bots.admin_id) mới render + gọi EP-14. 副管理人/Staff → KHÔNG mount component, KHÔNG phát request (không phải ẩn bằng CSS — mục 4 FE spec). --}} @php use App\Bots; use Illuminate\Support\Facades\Auth; $aauUserId = Auth::id(); $aauBotId = getBotId(); $aauOwnerId = null; if (!empty($aauBotId)) { if (isset($getBotInfo) && !empty($getBotInfo) && (int) $getBotInfo->id === (int) $aauBotId) { // Tái dùng bot đã load ở layout — không query thêm $aauOwnerId = $getBotInfo->admin_id; } else { $aauOwnerId = Bots::where('id', $aauBotId)->where('is_deleted', 0)->value('admin_id'); } } $aauIsOwner = !empty($aauUserId) && !empty($aauOwnerId) && (int) $aauOwnerId === (int) $aauUserId; @endphp @if ($aauIsOwner)