fix(board): 테넌트 게시판 메뉴 우선순위 및 라우트 수정

- 테넌트 게시판 부모 메뉴 우선순위 변경: /boards → /customer-center
- 테넌트 게시판 리다이렉트 라우트 추가: /boards/{code} → /boards/{id}/posts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-27 23:40:33 +09:00
parent e241b96c72
commit 12f5d9e280
2 changed files with 21 additions and 6 deletions

View File

@@ -1173,13 +1173,10 @@ public function copyFromGlobal(int $tenantId, array $menuIds): array
*/
public function findParentMenuForBoard(bool $isSystem, ?int $tenantId = null): ?int
{
// 우선순위 URL 목록
$priorityUrls = ['/customer-center'];
if ($isSystem) {
// 시스템 게시판: global_menus에서 찾기
$priorityUrls[] = '/system-boards';
$priorityUrls[] = '/boards';
// 우선순위: /customer-center → /system-boards → /boards → null
$priorityUrls = ['/customer-center', '/system-boards', '/boards'];
foreach ($priorityUrls as $url) {
$menu = GlobalMenu::where('url', $url)
@@ -1194,7 +1191,8 @@ public function findParentMenuForBoard(bool $isSystem, ?int $tenantId = null): ?
return null; // 최상위로 추가
} else {
// 테넌트 게시판: menus에서 찾기
$priorityUrls[] = '/boards';
// 우선순위: /boards → /customer-center → null
$priorityUrls = ['/boards', '/customer-center'];
foreach ($priorityUrls as $url) {
$query = Menu::where('url', $url)