style: Pint 포맷팅 적용
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Barobill\AccountCode;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* 더존 표준 계정과목 시더
|
||||
@@ -34,7 +34,7 @@ public function run(): void
|
||||
]);
|
||||
}
|
||||
|
||||
$this->command->info("계정과목 " . count($accountCodes) . "개 생성 완료");
|
||||
$this->command->info('계정과목 '.count($accountCodes).'개 생성 완료');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,8 +21,9 @@ public function run(): void
|
||||
->whereNull('parent_id')
|
||||
->value('id');
|
||||
|
||||
if (!$salesParentId) {
|
||||
if (! $salesParentId) {
|
||||
$this->command->error('영업관리 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -42,6 +43,7 @@ public function run(): void
|
||||
|
||||
if ($existingMenu) {
|
||||
$this->command->info('영업파트너 고객관리 메뉴가 이미 존재합니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -56,7 +58,7 @@ public function run(): void
|
||||
'is_active' => true,
|
||||
]);
|
||||
|
||||
$this->command->info('영업파트너 고객관리 메뉴 생성 완료 (sort_order: ' . $sortOrder . ')');
|
||||
$this->command->info('영업파트너 고객관리 메뉴 생성 완료 (sort_order: '.$sortOrder.')');
|
||||
|
||||
// 결과 출력
|
||||
$this->command->info('');
|
||||
|
||||
@@ -46,11 +46,11 @@ public function run(): void
|
||||
'parent_id' => $aiGroup->id,
|
||||
'sort_order' => 1,
|
||||
]);
|
||||
$this->command->info("AI 설정 메뉴를 AI 관리 그룹으로 이동 완료");
|
||||
$this->command->info('AI 설정 메뉴를 AI 관리 그룹으로 이동 완료');
|
||||
} elseif (! $aiConfig) {
|
||||
$this->command->warn("AI 설정 메뉴가 존재하지 않습니다. (건너뜀)");
|
||||
$this->command->warn('AI 설정 메뉴가 존재하지 않습니다. (건너뜀)');
|
||||
} else {
|
||||
$this->command->info("AI 설정 메뉴가 이미 AI 관리 그룹에 있습니다.");
|
||||
$this->command->info('AI 설정 메뉴가 이미 AI 관리 그룹에 있습니다.');
|
||||
}
|
||||
|
||||
// 3. AI 토큰 사용량 메뉴 생성 또는 이동
|
||||
@@ -65,7 +65,7 @@ public function run(): void
|
||||
'parent_id' => $aiGroup->id,
|
||||
'sort_order' => 2,
|
||||
]);
|
||||
$this->command->info("AI 토큰 사용량 메뉴를 AI 관리 그룹으로 이동 완료");
|
||||
$this->command->info('AI 토큰 사용량 메뉴를 AI 관리 그룹으로 이동 완료');
|
||||
} elseif (! $aiToken) {
|
||||
Menu::withoutGlobalScopes()->create([
|
||||
'tenant_id' => $tenantId,
|
||||
@@ -76,9 +76,9 @@ public function run(): void
|
||||
'sort_order' => 2,
|
||||
'is_active' => true,
|
||||
]);
|
||||
$this->command->info("AI 토큰 사용량 메뉴 생성 완료");
|
||||
$this->command->info('AI 토큰 사용량 메뉴 생성 완료');
|
||||
} else {
|
||||
$this->command->info("AI 토큰 사용량 메뉴가 이미 AI 관리 그룹에 있습니다.");
|
||||
$this->command->info('AI 토큰 사용량 메뉴가 이미 AI 관리 그룹에 있습니다.');
|
||||
}
|
||||
|
||||
// 4. AI 음성녹음 메뉴 생성 또는 이동
|
||||
@@ -93,7 +93,7 @@ public function run(): void
|
||||
'parent_id' => $aiGroup->id,
|
||||
'sort_order' => 3,
|
||||
]);
|
||||
$this->command->info("AI 음성녹음 메뉴를 AI 관리 그룹으로 이동 완료");
|
||||
$this->command->info('AI 음성녹음 메뉴를 AI 관리 그룹으로 이동 완료');
|
||||
} elseif (! $aiVoice) {
|
||||
Menu::withoutGlobalScopes()->create([
|
||||
'tenant_id' => $tenantId,
|
||||
@@ -104,9 +104,9 @@ public function run(): void
|
||||
'sort_order' => 3,
|
||||
'is_active' => true,
|
||||
]);
|
||||
$this->command->info("AI 음성녹음 메뉴 생성 완료");
|
||||
$this->command->info('AI 음성녹음 메뉴 생성 완료');
|
||||
} else {
|
||||
$this->command->info("AI 음성녹음 메뉴가 이미 AI 관리 그룹에 있습니다.");
|
||||
$this->command->info('AI 음성녹음 메뉴가 이미 AI 관리 그룹에 있습니다.');
|
||||
}
|
||||
|
||||
// 결과 출력
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Barobill\BarobillPricingPolicy;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BarobillPricingPolicySeeder extends Seeder
|
||||
{
|
||||
|
||||
@@ -63,6 +63,7 @@ protected function seedPricesFromItems(): void
|
||||
|
||||
if ($salesPrice <= 0) {
|
||||
$skipped++;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -79,7 +80,7 @@ protected function seedPricesFromItems(): void
|
||||
'sales_price' => $salesPrice,
|
||||
'updated_by' => 1,
|
||||
]);
|
||||
$this->command->line(" 업데이트: {$item->code} => " . number_format($salesPrice));
|
||||
$this->command->line(" 업데이트: {$item->code} => ".number_format($salesPrice));
|
||||
} else {
|
||||
// 새 단가 생성
|
||||
Price::create([
|
||||
@@ -102,10 +103,10 @@ protected function seedPricesFromItems(): void
|
||||
'created_by' => 1,
|
||||
]);
|
||||
$created++;
|
||||
$this->command->line(" 생성: {$item->code} => " . number_format($salesPrice));
|
||||
$this->command->line(" 생성: {$item->code} => ".number_format($salesPrice));
|
||||
}
|
||||
}
|
||||
|
||||
$this->command->info(" 생성: {$created}개, 스킵(단가없음): {$skipped}개");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,9 @@ public function run(): void
|
||||
->whereNull('parent_id')
|
||||
->value('id');
|
||||
|
||||
if (!$salesParentId) {
|
||||
if (! $salesParentId) {
|
||||
$this->command->error('영업관리 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,6 +35,7 @@ public function run(): void
|
||||
|
||||
if ($existingMenu) {
|
||||
$this->command->info('개발 승인 메뉴가 이미 존재합니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,9 @@ public function run(): void
|
||||
->whereNull('parent_id')
|
||||
->first();
|
||||
|
||||
if (!$targetGroup) {
|
||||
if (! $targetGroup) {
|
||||
$this->command->error('고객/거래처/채권관리 그룹을 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -41,10 +42,12 @@ public function run(): void
|
||||
->where('name', $name)
|
||||
->where('is_active', true)
|
||||
->first();
|
||||
if ($menu) break;
|
||||
if ($menu) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$menu) {
|
||||
if (! $menu) {
|
||||
// 이미 이동된 경우 확인
|
||||
$existing = Menu::withoutGlobalScopes()
|
||||
->where('tenant_id', $tenantId)
|
||||
@@ -55,8 +58,9 @@ public function run(): void
|
||||
if ($existing) {
|
||||
$this->command->info(" 이미 이동됨: {$newName} (id: {$existing->id})");
|
||||
} else {
|
||||
$this->command->warn(" 메뉴 없음: " . implode(' / ', $searchNames));
|
||||
$this->command->warn(' 메뉴 없음: '.implode(' / ', $searchNames));
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,6 @@ public function run(): void
|
||||
// 데이터 삽입
|
||||
DB::table('fund_schedules')->insert($schedules);
|
||||
|
||||
$this->command->info('FundScheduleSeeder 완료: 자금계획일정 ' . count($schedules) . '개 생성');
|
||||
$this->command->info('FundScheduleSeeder 완료: 자금계획일정 '.count($schedules).'개 생성');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,9 @@ public function run(): void
|
||||
->where('name', '시스템 관리')
|
||||
->first();
|
||||
|
||||
if (!$parentMenu) {
|
||||
if (! $parentMenu) {
|
||||
$this->command->error('시스템 관리 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -29,6 +30,7 @@ public function run(): void
|
||||
|
||||
if ($existingMenu) {
|
||||
$this->command->info('달력 휴일 관리 메뉴가 이미 존재합니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ public function run(): void
|
||||
|
||||
if ($salesMenus->isEmpty()) {
|
||||
$this->command->error('영업관리 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,6 +35,7 @@ public function run(): void
|
||||
|
||||
if ($exists) {
|
||||
$this->command->info("[{$label}] 인터뷰 시나리오 메뉴가 이미 존재합니다.");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,9 @@ public function run(): void
|
||||
->where('name', '일일자금일보')
|
||||
->first();
|
||||
|
||||
if (!$dailyFundMenu) {
|
||||
if (! $dailyFundMenu) {
|
||||
$this->command->error('일일자금일보 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,6 +34,7 @@ public function run(): void
|
||||
|
||||
if ($existingMenu) {
|
||||
$this->command->info('일반전표입력 메뉴가 이미 존재합니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public function run(): void
|
||||
|
||||
if ($existingParent) {
|
||||
$this->command->info('주일기업 기획 메뉴가 이미 존재합니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public function run(): void
|
||||
$menu = Menu::where('tenant_id', $tenantId)
|
||||
->where(function ($q) {
|
||||
$q->where('name', '협력사관리')
|
||||
->orWhere('name', '협력사 관리');
|
||||
->orWhere('name', '협력사 관리');
|
||||
})
|
||||
->first();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public function run(): void
|
||||
$menu = Menu::where('tenant_id', $tenantId)
|
||||
->where(function ($q) {
|
||||
$q->where('name', '채무관리')
|
||||
->orWhere('name', '채무 관리');
|
||||
->orWhere('name', '채무 관리');
|
||||
})
|
||||
->first();
|
||||
|
||||
|
||||
@@ -375,4 +375,4 @@ private function cleanupExisting(string $name): void
|
||||
DocumentTemplateApprovalLine::where('template_id', $existing->id)->delete();
|
||||
$existing->forceDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,6 @@ public function run(): void
|
||||
);
|
||||
}
|
||||
|
||||
$this->command->info('QuoteFormulaCategorySeeder: ' . count($categories) . '개 카테고리 생성 완료');
|
||||
$this->command->info('QuoteFormulaCategorySeeder: '.count($categories).'개 카테고리 생성 완료');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,8 +168,8 @@ public function run(): void
|
||||
]));
|
||||
}
|
||||
|
||||
$this->command->info('QuoteFormulaItemSeeder: ' . count($formulaItems) . '개 품목 매핑 생성 완료');
|
||||
$this->command->info(' - FG-SCR-001: ' . (isset($products['FG-SCR-001']) ? '14개 품목' : '미생성'));
|
||||
$this->command->info(' - FG-STL-001: ' . (isset($products['FG-STL-001']) ? '10개 품목' : '미생성'));
|
||||
$this->command->info('QuoteFormulaItemSeeder: '.count($formulaItems).'개 품목 매핑 생성 완료');
|
||||
$this->command->info(' - FG-SCR-001: '.(isset($products['FG-SCR-001']) ? '14개 품목' : '미생성'));
|
||||
$this->command->info(' - FG-STL-001: '.(isset($products['FG-STL-001']) ? '10개 품목' : '미생성'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,9 +128,9 @@ public function run(): void
|
||||
]));
|
||||
}
|
||||
|
||||
$this->command->info('QuoteFormulaRangeSeeder: ' . count($ranges) . '개 범위 조건 생성 완료');
|
||||
$this->command->info(' - 모터 선택: ' . (isset($rangeFormulas['MOTOR']) ? '4개' : '0개'));
|
||||
$this->command->info(' - 가이드레일 선택: ' . (isset($rangeFormulas['GUIDE']) ? '4개' : '0개'));
|
||||
$this->command->info(' - 케이스 선택: ' . (isset($rangeFormulas['CASE']) ? '4개' : '0개'));
|
||||
$this->command->info('QuoteFormulaRangeSeeder: '.count($ranges).'개 범위 조건 생성 완료');
|
||||
$this->command->info(' - 모터 선택: '.(isset($rangeFormulas['MOTOR']) ? '4개' : '0개'));
|
||||
$this->command->info(' - 가이드레일 선택: '.(isset($rangeFormulas['GUIDE']) ? '4개' : '0개'));
|
||||
$this->command->info(' - 케이스 선택: '.(isset($rangeFormulas['CASE']) ? '4개' : '0개'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,9 +274,9 @@ public function run(): void
|
||||
]));
|
||||
}
|
||||
|
||||
$this->command->info('QuoteFormulaSeeder: ' . count($formulas) . '개 수식 생성 완료');
|
||||
$this->command->info(' - 입력변수: ' . count($inputVars) . '개');
|
||||
$this->command->info(' - 계산변수: ' . count($calcVars) . '개');
|
||||
$this->command->info(' - 범위선택: ' . count($rangeVars) . '개');
|
||||
$this->command->info('QuoteFormulaSeeder: '.count($formulas).'개 수식 생성 완료');
|
||||
$this->command->info(' - 입력변수: '.count($inputVars).'개');
|
||||
$this->command->info(' - 계산변수: '.count($calcVars).'개');
|
||||
$this->command->info(' - 범위선택: '.count($rangeVars).'개');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public function run(): void
|
||||
$menu = Menu::where('tenant_id', $tenantId)
|
||||
->where(function ($q) {
|
||||
$q->where('name', '채권관리')
|
||||
->orWhere('name', '채권 관리');
|
||||
->orWhere('name', '채권 관리');
|
||||
})
|
||||
->first();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public function run(): void
|
||||
$menu = Menu::where('tenant_id', $tenantId)
|
||||
->where(function ($q) {
|
||||
$q->where('name', '환불관리')
|
||||
->orWhere('name', '환불 관리');
|
||||
->orWhere('name', '환불 관리');
|
||||
})
|
||||
->first();
|
||||
|
||||
|
||||
@@ -15,8 +15,9 @@ public function run(): void
|
||||
->where('name', 'R&D Labs')
|
||||
->first();
|
||||
|
||||
if (!$menu) {
|
||||
if (! $menu) {
|
||||
$this->command->warn('R&D Labs 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@ public function run(): void
|
||||
// 1. 새 대분류 그룹 생성
|
||||
// ==============================
|
||||
$newGroups = [
|
||||
'재무/자금관리' => ['icon' => 'currency-dollar', 'sort' => 6],
|
||||
'회계/세무관리' => ['icon' => 'calculator', 'sort' => 7],
|
||||
'카드/차량관리' => ['icon' => 'credit-card', 'sort' => 8],
|
||||
'정산관리' => ['icon' => 'cash', 'sort' => 9],
|
||||
'고객/거래처/채권관리' => ['icon' => 'users', 'sort' => 10],
|
||||
'영업/매출관리' => ['icon' => 'briefcase', 'sort' => 11],
|
||||
'시스템/설정/내부관리' => ['icon' => 'settings', 'sort' => 12],
|
||||
'재무/자금관리' => ['icon' => 'currency-dollar', 'sort' => 6],
|
||||
'회계/세무관리' => ['icon' => 'calculator', 'sort' => 7],
|
||||
'카드/차량관리' => ['icon' => 'credit-card', 'sort' => 8],
|
||||
'정산관리' => ['icon' => 'cash', 'sort' => 9],
|
||||
'고객/거래처/채권관리' => ['icon' => 'users', 'sort' => 10],
|
||||
'영업/매출관리' => ['icon' => 'briefcase', 'sort' => 11],
|
||||
'시스템/설정/내부관리' => ['icon' => 'settings', 'sort' => 12],
|
||||
];
|
||||
|
||||
$parentIds = [];
|
||||
@@ -56,37 +56,37 @@ public function run(): void
|
||||
// [현재 이름 => [새 부모 그룹, 새 sort_order, 새 이름(null이면 변경 없음), 새 URL(null이면 변경 없음)]]
|
||||
$menuMoves = [
|
||||
// --- 재무/자금관리 ---
|
||||
'재무 대시보드' => ['재무/자금관리', 1, null, null],
|
||||
'일일자금일보' => ['재무/자금관리', 2, null, null],
|
||||
'자금계획일정' => ['재무/자금관리', 3, null, null],
|
||||
'보유계좌관리' => ['재무/자금관리', 4, null, null],
|
||||
'계좌입출금내역' => ['재무/자금관리', 5, null, null],
|
||||
'재무 대시보드' => ['재무/자금관리', 1, null, null],
|
||||
'일일자금일보' => ['재무/자금관리', 2, null, null],
|
||||
'자금계획일정' => ['재무/자금관리', 3, null, null],
|
||||
'보유계좌관리' => ['재무/자금관리', 4, null, null],
|
||||
'계좌입출금내역' => ['재무/자금관리', 5, null, null],
|
||||
|
||||
// --- 회계/세무관리 ---
|
||||
'일반전표입력' => ['회계/세무관리', 1, null, null],
|
||||
'전자세금계산서' => ['회계/세무관리', 2, null, null],
|
||||
'일반전표입력' => ['회계/세무관리', 1, null, null],
|
||||
'전자세금계산서' => ['회계/세무관리', 2, null, null],
|
||||
'홈택스 매출/매입' => ['회계/세무관리', 3, '홈택스매출/매입', null],
|
||||
'부가세관리' => ['회계/세무관리', 4, null, null],
|
||||
'부가세관리' => ['회계/세무관리', 4, null, null],
|
||||
|
||||
// --- 카드/차량관리 ---
|
||||
'법인카드관리' => ['카드/차량관리', 1, null, null],
|
||||
'카드사용내역' => ['카드/차량관리', 2, null, null],
|
||||
'법인차량관리' => ['카드/차량관리', 3, '차량목록', '/finance/corporate-vehicles'],
|
||||
'법인카드관리' => ['카드/차량관리', 1, null, null],
|
||||
'카드사용내역' => ['카드/차량관리', 2, null, null],
|
||||
'법인차량관리' => ['카드/차량관리', 3, '차량목록', '/finance/corporate-vehicles'],
|
||||
// 차량일지는 아래에서 별도 생성
|
||||
'차량정비이력' => ['카드/차량관리', 5, '정비이력', null],
|
||||
'차량정비이력' => ['카드/차량관리', 5, '정비이력', null],
|
||||
|
||||
// --- 정산관리 ---
|
||||
'영업수수료 정산' => ['정산관리', 1, '영업수수료정산', null],
|
||||
'컨설팅비용 정산' => ['정산관리', 2, '컨설팅비용정산', null],
|
||||
'고객사 정산' => ['정산관리', 3, '고객사정산', null],
|
||||
'구독료 정산' => ['정산관리', 4, '구독료정산', null],
|
||||
'영업수수료 정산' => ['정산관리', 1, '영업수수료정산', null],
|
||||
'컨설팅비용 정산' => ['정산관리', 2, '컨설팅비용정산', null],
|
||||
'고객사 정산' => ['정산관리', 3, '고객사정산', null],
|
||||
'구독료 정산' => ['정산관리', 4, '구독료정산', null],
|
||||
|
||||
// --- 고객/거래처/채권관리 ---
|
||||
'거래처 관리' => ['고객/거래처/채권관리', 1, '거래처관리', null],
|
||||
'고객사관리' => ['고객/거래처/채권관리', 2, null, null],
|
||||
'채권관리' => ['고객/거래처/채권관리', 3, '미수금관리', null],
|
||||
'채무관리' => ['고객/거래처/채권관리', 4, '미지급금관리', null],
|
||||
'환불관리' => ['고객/거래처/채권관리', 5, '환불/해지관리', null],
|
||||
'거래처 관리' => ['고객/거래처/채권관리', 1, '거래처관리', null],
|
||||
'고객사관리' => ['고객/거래처/채권관리', 2, null, null],
|
||||
'채권관리' => ['고객/거래처/채권관리', 3, '미수금관리', null],
|
||||
'채무관리' => ['고객/거래처/채권관리', 4, '미지급금관리', null],
|
||||
'환불관리' => ['고객/거래처/채권관리', 5, '환불/해지관리', null],
|
||||
|
||||
// --- 영업/매출관리 --- (영업관리의 자식 중)
|
||||
// 대시보드는 이름이 겹칠 수 있으므로 ID로 처리
|
||||
@@ -106,8 +106,9 @@ public function run(): void
|
||||
->where('is_active', true)
|
||||
->first();
|
||||
|
||||
if (!$menu) {
|
||||
if (! $menu) {
|
||||
$this->command->warn("메뉴 없음: {$currentName}");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -142,7 +143,7 @@ public function run(): void
|
||||
'parent_id' => $parentIds['카드/차량관리'],
|
||||
'sort_order' => 4,
|
||||
]);
|
||||
$this->command->info(" 이동: 차량일지 → 카드/차량관리 (sort: 4)");
|
||||
$this->command->info(' 이동: 차량일지 → 카드/차량관리 (sort: 4)');
|
||||
} else {
|
||||
Menu::create([
|
||||
'tenant_id' => $tenantId,
|
||||
@@ -153,7 +154,7 @@ public function run(): void
|
||||
'sort_order' => 4,
|
||||
'is_active' => true,
|
||||
]);
|
||||
$this->command->info(" 신규: 차량일지 → 카드/차량관리 (sort: 4)");
|
||||
$this->command->info(' 신규: 차량일지 → 카드/차량관리 (sort: 4)');
|
||||
}
|
||||
|
||||
// ==============================
|
||||
@@ -212,7 +213,7 @@ public function run(): void
|
||||
'parent_id' => $parentIds['영업/매출관리'],
|
||||
'sort_order' => $nextSort++,
|
||||
]);
|
||||
$this->command->info(" 이동(잔여): {$child->name} → 영업/매출관리 (sort: " . ($nextSort - 1) . ")");
|
||||
$this->command->info(" 이동(잔여): {$child->name} → 영업/매출관리 (sort: ".($nextSort - 1).')');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +257,7 @@ public function run(): void
|
||||
'url' => '/barobill/ecard',
|
||||
'sort_order' => 1,
|
||||
]);
|
||||
$this->command->info(" 변환: 바로빌본사 → 시스템/설정/내부관리/바로빌본사 (sort: 1)");
|
||||
$this->command->info(' 변환: 바로빌본사 → 시스템/설정/내부관리/바로빌본사 (sort: 1)');
|
||||
}
|
||||
|
||||
// 바로빌(15504)의 자식들 이동
|
||||
@@ -269,7 +270,7 @@ public function run(): void
|
||||
if ($barobillTenant) {
|
||||
$tenantMoves = [
|
||||
'사용량조회' => 4,
|
||||
'과금관리' => 5,
|
||||
'과금관리' => 5,
|
||||
];
|
||||
|
||||
$barobillChildren = Menu::withoutGlobalScopes()
|
||||
@@ -311,7 +312,7 @@ public function run(): void
|
||||
'parent_id' => $sysGroupId,
|
||||
'sort_order' => $nextSort++,
|
||||
]);
|
||||
$this->command->info(" 이동: {$child->name} → 시스템/설정/내부관리 (sort: " . ($nextSort - 1) . ")");
|
||||
$this->command->info(" 이동: {$child->name} → 시스템/설정/내부관리 (sort: ".($nextSort - 1).')');
|
||||
}
|
||||
|
||||
$sysOld->update(['is_active' => false]);
|
||||
|
||||
@@ -43,8 +43,9 @@ public function run(): void
|
||||
->whereNull('parent_id')
|
||||
->value('id');
|
||||
|
||||
if (!$salesParentId) {
|
||||
if (! $salesParentId) {
|
||||
$this->command->error('영업관리 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -482,4 +482,4 @@ private function buildBomJson(int $tenantId, array $bomItems): string
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,9 @@ public function run(): void
|
||||
->where('name', '법인차량관리')
|
||||
->first();
|
||||
|
||||
if (!$vehicleMenu) {
|
||||
if (! $vehicleMenu) {
|
||||
$this->command->error('법인차량관리 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,6 +34,7 @@ public function run(): void
|
||||
|
||||
if ($existingMenu) {
|
||||
$this->command->info('차량일지 메뉴가 이미 존재합니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,9 @@ public function run(): void
|
||||
->where('name', '법인차량관리')
|
||||
->first();
|
||||
|
||||
if (!$parentMenu) {
|
||||
if (! $parentMenu) {
|
||||
$this->command->error('법인차량관리 메뉴를 찾을 수 없습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -28,23 +29,25 @@ public function run(): void
|
||||
$maintenanceMenu = Menu::where('tenant_id', $tenantId)
|
||||
->where(function ($q) {
|
||||
$q->where('name', '차량정비이력')
|
||||
->orWhere('name', '차량정비');
|
||||
->orWhere('name', '차량정비');
|
||||
})
|
||||
->first();
|
||||
|
||||
if (!$maintenanceMenu) {
|
||||
if (! $maintenanceMenu) {
|
||||
$this->command->error('차량정비이력 메뉴를 찾을 수 없습니다.');
|
||||
Menu::where('tenant_id', $tenantId)
|
||||
->whereNull('parent_id')
|
||||
->orderBy('sort_order')
|
||||
->get(['id', 'name', 'url'])
|
||||
->each(fn ($m) => $this->command->line(" - [{$m->id}] {$m->name} ({$m->url})"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// 이미 법인차량관리 하위에 있는지 확인
|
||||
if ($maintenanceMenu->parent_id == $parentMenu->id) {
|
||||
$this->command->info('차량정비이력은 이미 법인차량관리 하위에 있습니다.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user