fix:영업파트너 승인 메뉴가 없으면 생성하도록 수정

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
pro
2026-01-31 12:01:14 +09:00
parent 0a62f0eb33
commit ee12793e4f

View File

@@ -73,16 +73,29 @@ public function run(): void
$this->command->info('렌딩페이지 → 영업관리 하위로 이동, URL 설정');
}
// 영업파트너 승인 메뉴를 상품관리 바로 뒤로 이동
// 영업파트너 승인 메뉴 (없으면 생성, 있으면 순서 변경)
$approvalMenu = Menu::where('tenant_id', $tenantId)
->where('name', '영업파트너 승인')
->where('parent_id', $salesParentId)
->first();
if ($approvalMenu) {
$approvalMenu->parent_id = $salesParentId;
$approvalMenu->sort_order = 5;
$approvalMenu->save();
$this->command->info('영업파트너 승인 → sort_order 5로 변경');
} else {
// 메뉴 생성
Menu::create([
'tenant_id' => $tenantId,
'parent_id' => $salesParentId,
'name' => '영업파트너 승인',
'url' => '/sales/managers/approvals',
'icon' => 'check-circle',
'sort_order' => 5,
'is_active' => true,
'required_roles' => json_encode(['admin', 'super-admin']),
]);
$this->command->info('영업파트너 승인 메뉴 생성 (sort_order 5)');
}
// 세일즈 사이트를 6으로 변경