From 810242ecdf2ea3c2bc7068f9fa6f760f17689b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Thu, 5 Mar 2026 15:59:59 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[dashboard]=20=EB=B9=84=EB=B3=B8?= =?UTF-8?q?=EC=82=AC/=EC=98=81=EC=97=85=ED=8C=80/=EC=86=8C=EC=86=8D?= =?UTF-8?q?=EC=97=86=EC=9D=8C=20=EC=82=AC=EC=9A=A9=EC=9E=90=EB=8A=94=20?= =?UTF-8?q?=EC=A3=BC=EA=B0=84=20=EB=82=A0=EC=94=A8=EB=A7=8C=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - HQ(코드브릿지엑스) 테넌트가 아닌 경우 날씨 카드만 노출 - 소속 부서가 없거나 영업팀만 소속인 경우 날씨 카드만 노출 - Quick Actions, 달력, 일정 모달은 본사 직원만 표시 --- resources/views/dashboard/index.blade.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/resources/views/dashboard/index.blade.php b/resources/views/dashboard/index.blade.php index d5c7c09b..c77cd869 100644 --- a/resources/views/dashboard/index.blade.php +++ b/resources/views/dashboard/index.blade.php @@ -4,6 +4,22 @@ @section('page-title', '대시보드') @section('content') + @php + $user = auth()->user(); + $currentTenantId = session('selected_tenant_id'); + $currentTenant = $currentTenantId ? $user->tenants()->find($currentTenantId) : $user->currentTenant(); + $isHQ = $currentTenant && $currentTenant->tenant_type === 'HQ'; + + // 부서 확인 (소속 없음 또는 영업팀이면 제한) + $departments = $currentTenantId ? $user->getDepartmentsForTenant($currentTenantId) : collect(); + $hasDepartment = $departments->isNotEmpty(); + $isSalesOnly = $hasDepartment && $departments->every(fn($d) => $d->name === '영업팀'); + + // 전체 대시보드 표시 조건: HQ 테넌트 + 소속 있음 + 영업팀만이 아닌 경우 + $showFullDashboard = $isHQ && $hasDepartment && !$isSalesOnly; + @endphp + + @if($showFullDashboard)
@@ -39,6 +55,7 @@
+ @endif
@@ -70,6 +87,7 @@
+ @if($showFullDashboard)
+ @endif