fix(board-menu): 게시판 삭제/복원 시 메뉴 연동 로직 개선
- BoardController: *Board() → *AnyBoard() 메서드로 변경하여 메뉴 연동 활성화 - MenuService: restoreMenuForBoard() 메서드 추가 - soft-deleted 메뉴 있으면 복원 - 활성 메뉴가 이미 있으면 스킵 (중복 방지) - 둘 다 없으면 새로 생성 - BoardService: restoreAnyBoard()에서 board name 전달하도록 수정 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -531,14 +531,14 @@ public function restoreAnyBoard(int $id): bool
|
||||
// 게시판 복원
|
||||
$result = $board->restore();
|
||||
|
||||
// 메뉴가 없으면 다시 생성
|
||||
// 연결된 메뉴도 복원 (없으면 생성)
|
||||
if ($result) {
|
||||
$this->menuService->createMenuForBoard([
|
||||
'board_code' => $board->board_code,
|
||||
'name' => $board->name,
|
||||
'is_system' => $board->is_system,
|
||||
'tenant_id' => $board->tenant_id,
|
||||
]);
|
||||
$this->menuService->restoreMenuForBoard(
|
||||
$board->board_code,
|
||||
$board->name,
|
||||
$board->is_system,
|
||||
$board->tenant_id
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user