diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index e99b31c..2bb463d 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -52,10 +52,11 @@ export function Sidebar({ isMobile = false, onClose }: SidebarProps) { // Selalu pakai site_uuid dari DB (mereka tidak bisa ganti site). const globalRoles = ['SUPER_ADMIN', 'EXECUTIVE', 'SOC_ANALYST', 'ENGINEER']; const isGlobalRole = globalRoles.includes(data.user.role || ''); - const storedSiteUuid = localStorage.getItem('backone_site_uuid'); if (isGlobalRole) { - const siteToUse = storedSiteUuid || 'all'; + // Karena UI site selector sudah diganti menjadi Agent Selector (View As), + // Global roles harus selalu diset ke 'all' agar tidak tersangkut di filter site sebelumnya (dari akun lain). + const siteToUse = 'all'; localStorage.setItem('backone_site_uuid', siteToUse); setSelectedSite(siteToUse); } else if (data.user.site_uuid) {