Files
sam-manage/resources/views/partials/tenant-console-sidebar.blade.php
강영보 d03c7ed870 feat: [bending] 절곡품 관리 MNG 화면
- 기초관리: 목록(13컬럼) + 폼(기본정보 + 케이스전용 + 절곡테이블 + 이미지)
- 절곡품: 가이드레일/케이스/하단마감재 타입별 목록 + 폼
- 부품 추가(기초관리 검색 모달) + 삭제 + 수량/품명/재질 편집
- 절곡테이블 inline 편집 + 재질별 폭합 자동계산
- 작업지시서 레거시 포맷 인쇄 모달
- 원본수정 버튼 sam_item_id 직접 링크
- DB 메뉴 등록 (기초관리 + 절곡품 + 케이스 + 하단마감재)
2026-03-19 21:08:57 +09:00

71 lines
2.7 KiB
PHP

{{-- 테넌트 콘솔 전용 사이드바 (DB 동적 메뉴) --}}
@php
$tenantId = $consoleTenantId ?? 0;
$baseUrl = "/tenant-console/{$tenantId}";
@endphp
<aside class="w-64 bg-white border-r border-gray-200 flex flex-col shrink-0">
{{-- 테넌트 정보 헤더 --}}
<div class="flex items-center h-16 border-b border-gray-200 px-3">
<a href="{{ $baseUrl }}" class="flex items-center gap-2 text-gray-800 hover:text-blue-600 transition">
<i class="ri-building-line text-xl text-blue-600"></i>
<div class="min-w-0">
<div class="font-semibold text-sm truncate">{{ $consoleTenant->company_name ?? '테넌트' }}</div>
<div class="text-xs text-gray-500">관리 콘솔</div>
</div>
</a>
</div>
{{-- 메뉴 영역: DB 동적 메뉴 사용 --}}
<nav class="flex-1 overflow-y-auto p-4">
<ul class="space-y-1">
@if(isset($consoleMenus) && $consoleMenus->isNotEmpty())
<x-sidebar.menu-tree :menus="$consoleMenus" />
@else
<li class="px-3 py-2 text-sm text-gray-400">메뉴가 없습니다.</li>
@endif
</ul>
</nav>
{{-- 하단: 메인으로 돌아가기 --}}
<div class="px-4 py-3 border-t border-gray-200">
<a href="/tenants" target="_opener"
class="flex items-center gap-2 text-sm text-gray-500 hover:text-gray-700 transition">
<i class="ri-arrow-go-back-line"></i>
테넌트 목록으로
</a>
</div>
</aside>
{{-- 메뉴 그룹 토글 스크립트 --}}
<script>
function toggleMenuGroup(groupId) {
const group = document.getElementById(groupId);
const icon = document.getElementById(groupId + '-icon');
if (!group) return;
const isHidden = window.getComputedStyle(group).display === 'none';
if (isHidden) {
group.style.display = 'block';
if (icon) icon.style.transform = 'rotate(180deg)';
localStorage.setItem('menu-group-' + groupId, 'visible');
} else {
group.style.display = 'none';
if (icon) icon.style.transform = 'rotate(0deg)';
localStorage.setItem('menu-group-' + groupId, 'hidden');
}
}
// 페이지 로드 시 저장된 상태 복원
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('[id^="menu-group-"]').forEach(function(group) {
const saved = localStorage.getItem('menu-group-' + group.id);
const icon = document.getElementById(group.id + '-icon');
if (saved === 'hidden') {
group.style.display = 'none';
if (icon) icon.style.transform = 'rotate(0deg)';
}
});
});
</script>