fix:협력사관리 메뉴명을 거래처 관리로 변경

This commit is contained in:
김보곤
2026-02-04 22:03:18 +09:00
parent 0fbeabc892
commit 2a5a10e2c5
2 changed files with 19 additions and 10 deletions

View File

@@ -6,8 +6,8 @@
use Illuminate\Database\Seeder;
/**
* 영업파트너 관리 메뉴 이름 변경 시더
* - "영업파트너 관리" → "파트너 관리"
* 메뉴 이름 변경 시더
* - "협력사관리" / "협력사 관리" → "거래처 관리"
*/
class PartnerMenuRenameSeeder extends Seeder
{
@@ -15,17 +15,26 @@ public function run(): void
{
$tenantId = 1;
// "영업파트너 관리" 메뉴 찾아서 이름 변경
// "협력사관리" 또는 "협력사 관리" 메뉴 찾아서 이름 변경
$menu = Menu::where('tenant_id', $tenantId)
->where('name', '영업파트너 관리')
->where(function ($q) {
$q->where('name', '협력사관리')
->orWhere('name', '협력사 관리');
})
->first();
if ($menu) {
$menu->name = '파트너 관리';
$oldName = $menu->name;
$menu->name = '거래처 관리';
$menu->save();
$this->command->info('메뉴 이름 변경: 영업파트너 관리 → 파트너 관리');
$this->command->info("메뉴 이름 변경: {$oldName} → 거래처 관리");
} else {
$this->command->warn('영업파트너 관리 메뉴를 찾을 수 없습니다.');
$this->command->warn('협력사관리 메뉴를 찾을 수 없습니다. 현재 메뉴 목록:');
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})"));
}
}
}

View File

@@ -1,6 +1,6 @@
@extends('layouts.app')
@section('title', '일반 거래처')
@section('title', '거래처 관리')
@push('styles')
<style>
@@ -108,7 +108,7 @@ function PartnersManagement() {
const handleDelete = (id) => { if (confirm('정말 삭제하시겠습니까?')) { setPartners(prev => prev.filter(item => item.id !== id)); setShowModal(false); } };
const handleDownload = () => {
const rows = [['일반 거래처'], [], ['거래처명', '유형', '분류', '사업자번호', '연락처', '이메일', '담당자', '상태'],
const rows = [['거래처 관리'], [], ['거래처명', '유형', '분류', '사업자번호', '연락처', '이메일', '담당자', '상태'],
...filteredPartners.map(item => [item.name, item.type === 'vendor' ? '공급업체' : '프리랜서', item.category, item.bizNo, item.contact, item.email, item.manager, item.status === 'active' ? '활성' : '비활성'])];
const csvContent = rows.map(row => row.join(',')).join('\n');
const blob = new Blob(['\uFEFF' + csvContent], { type: 'text/csv;charset=utf-8;' });
@@ -124,7 +124,7 @@ function PartnersManagement() {
<div className="px-6 py-4 flex items-center justify-between">
<div className="flex items-center gap-4">
<div className="p-2 bg-emerald-100 rounded-xl"><Building2 className="w-6 h-6 text-emerald-600" /></div>
<div><h1 className="text-xl font-bold text-gray-900">일반 거래처</h1><p className="text-sm text-gray-500">Partners / Vendors</p></div>
<div><h1 className="text-xl font-bold text-gray-900">거래처 관리</h1><p className="text-sm text-gray-500">Partners / Vendors</p></div>
</div>
<div className="flex items-center gap-3">
<button onClick={handleDownload} className="flex items-center gap-2 px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-lg"><Download className="w-4 h-4" /><span className="text-sm">Excel</span></button>