diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index d53927e2..ef9e030b 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -5,12 +5,87 @@ use App\Models\Category; use App\Models\GlobalCategory; use App\Models\Tenants\Tenant; +use App\Models\Tenants\TenantSetting; +use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\View\View; class CategoryController extends Controller { + /** + * 커스텀 그룹 라벨 조회 + */ + private function getCustomGroupLabels(): array + { + $tenantId = session('selected_tenant_id'); + if (! $tenantId) { + return []; + } + + $setting = TenantSetting::withoutGlobalScopes() + ->where('tenant_id', $tenantId) + ->where('setting_group', 'category') + ->where('setting_key', 'custom_group_labels') + ->first(); + + return $setting?->setting_value ?? []; + } + + /** + * 카테고리 그룹 추가 + */ + public function storeGroup(Request $request): RedirectResponse + { + $tenantId = session('selected_tenant_id'); + if (! $tenantId) { + return redirect()->back()->with('error', '테넌트를 먼저 선택해주세요.'); + } + + $validated = $request->validate([ + 'group_code' => ['required', 'string', 'max:50', 'regex:/^[a-z][a-z0-9_]*$/'], + 'group_label' => 'required|string|max:50', + ], [ + 'group_code.regex' => '그룹 코드는 영문 소문자, 숫자, 언더스코어만 사용 가능합니다.', + ]); + + $groupCode = $validated['group_code']; + $groupLabel = $validated['group_label']; + + // DB에 이미 존재하는 그룹인지 체크 + $existsInGlobal = GlobalCategory::whereNull('deleted_at') + ->where('code_group', $groupCode) + ->exists(); + $existsInTenant = Category::where('code_group', $groupCode)->exists(); + + if ($existsInGlobal || $existsInTenant) { + return redirect()->back()->with('error', '이미 존재하는 그룹 코드입니다.'); + } + + // 커스텀 라벨 중복 체크 + $customLabels = $this->getCustomGroupLabels(); + if (isset($customLabels[$groupCode])) { + return redirect()->back()->with('error', '이미 존재하는 커스텀 그룹 코드입니다.'); + } + + $customLabels[$groupCode] = $groupLabel; + + TenantSetting::withoutGlobalScopes()->updateOrCreate( + [ + 'tenant_id' => $tenantId, + 'setting_group' => 'category', + 'setting_key' => 'custom_group_labels', + ], + [ + 'setting_value' => $customLabels, + 'description' => '카테고리 커스텀 그룹 라벨', + ] + ); + + return redirect() + ->route('categories.index', ['group' => $groupCode]) + ->with('success', "'{$groupLabel}' 그룹이 추가되었습니다."); + } /** * 카테고리 관리 페이지 @@ -26,35 +101,64 @@ public function index(Request $request): View|Response $tenant = $tenantId ? Tenant::find($tenantId) : null; $isHQ = $tenantId == 1; - // 모든 code_group 조회 (글로벌 + 테넌트) - $globalGroups = GlobalCategory::whereNull('deleted_at') - ->select('code_group') - ->distinct() - ->pluck('code_group') + // 글로벌 그룹 + description + $globalGroupDescs = GlobalCategory::whereNull('deleted_at') + ->selectRaw('code_group, MIN(description) as description') + ->groupBy('code_group') + ->pluck('description', 'code_group') ->toArray(); - $tenantGroups = []; + // 테넌트 그룹 + description + $tenantGroupDescs = []; if ($tenantId) { - $tenantGroups = Category::where('tenant_id', $tenantId) + $tenantGroupDescs = Category::where('tenant_id', $tenantId) ->whereNull('deleted_at') - ->select('code_group') - ->distinct() - ->pluck('code_group') + ->selectRaw('code_group, MIN(description) as description') + ->groupBy('code_group') + ->pluck('description', 'code_group') ->toArray(); } - $allGroups = array_unique(array_merge($globalGroups, $tenantGroups)); - sort($allGroups); + // 커스텀 그룹 라벨 (빈 그룹용 — TenantSetting) + $customLabels = $this->getCustomGroupLabels(); - $codeGroupLabels = config('categories.code_group_labels', []); + // config 라벨 (하위호환 폴백) + $configLabels = config('categories.code_group_labels', []); + + // 그룹별 스코프 분류 + $allGroupKeys = array_unique(array_merge( + array_keys($globalGroupDescs), + array_keys($tenantGroupDescs), + array_keys($customLabels) + )); + sort($allGroupKeys); $codeGroups = []; - foreach ($allGroups as $group) { - $codeGroups[$group] = $codeGroupLabels[$group] ?? $group; + $groupScopes = []; + foreach ($allGroupKeys as $group) { + $inGlobal = isset($globalGroupDescs[$group]); + $inTenant = isset($tenantGroupDescs[$group]); + + $codeGroups[$group] = ! empty($globalGroupDescs[$group]) + ? $globalGroupDescs[$group] + : (! empty($tenantGroupDescs[$group]) + ? $tenantGroupDescs[$group] + : ($customLabels[$group] ?? $configLabels[$group] ?? $group)); + + if ($inGlobal && $inTenant) { + $groupScopes[$group] = 'both'; + } elseif ($inGlobal) { + $groupScopes[$group] = 'global'; + } elseif ($inTenant) { + $groupScopes[$group] = 'tenant'; + } else { + $groupScopes[$group] = 'custom'; + } } if (empty($codeGroups)) { - $codeGroups['product'] = $codeGroupLabels['product'] ?? 'product'; + $codeGroups['product'] = $configLabels['product'] ?? 'product'; + $groupScopes['product'] = 'custom'; } $selectedGroup = $request->get('group', array_key_first($codeGroups)); @@ -86,7 +190,8 @@ public function index(Request $request): View|Response return view('categories.index', [ 'codeGroups' => $codeGroups, - 'codeGroupLabels' => $codeGroupLabels, + 'groupScopes' => $groupScopes, + 'codeGroupLabels' => $codeGroups, 'selectedGroup' => $selectedGroup, 'globalCategories' => $globalCategories, 'tenantCategories' => $tenantCategories, @@ -123,4 +228,4 @@ private function addChildrenRecursive(&$result, $byParent, $parentId, $depth): v $this->addChildrenRecursive($result, $byParent, $child->id, $depth + 1); } } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/CategorySyncController.php b/app/Http/Controllers/CategorySyncController.php index 16eab094..301b16b9 100644 --- a/app/Http/Controllers/CategorySyncController.php +++ b/app/Http/Controllers/CategorySyncController.php @@ -4,6 +4,7 @@ use App\Models\Category; use App\Models\GlobalCategory; +use App\Models\Tenants\Tenant; use App\Models\Tenants\TenantSetting; use Illuminate\Contracts\View\View; use Illuminate\Http\JsonResponse; @@ -13,6 +14,8 @@ class CategorySyncController extends Controller { + private ?string $remoteTenantName = null; + /** * 현재 선택된 테넌트 ID */ @@ -52,12 +55,16 @@ public function index(Request $request): View|Response $selectedEnv = $request->get('env', 'dev'); $selectedType = $request->get('type', 'global'); // global or tenant + // 로컬 테넌트 정보 + $localTenant = Tenant::find($this->getTenantId()); + // 로컬 카테고리 조회 (타입 필터 적용) $localCategories = $this->getCategoryList($selectedType); // 원격 카테고리 조회 $remoteCategories = []; $remoteError = null; + $this->remoteTenantName = null; if (! empty($environments[$selectedEnv]['url'])) { try { @@ -78,6 +85,8 @@ public function index(Request $request): View|Response 'remoteCategories' => $remoteCategories, 'remoteError' => $remoteError, 'diff' => $diff, + 'localTenantName' => $localTenant?->company_name ?? '알 수 없음', + 'remoteTenantName' => $this->remoteTenantName, ]); } @@ -97,9 +106,12 @@ public function export(Request $request): JsonResponse $type = $request->get('type', 'all'); // global, tenant, or all $categories = $this->getCategoryList($type); + $tenant = Tenant::find($this->getTenantId()); + return response()->json([ 'success' => true, 'environment' => config('app.env'), + 'tenant_name' => $tenant?->company_name ?? '알 수 없음', 'exported_at' => now()->toIso8601String(), 'categories' => $categories, ]); @@ -473,6 +485,8 @@ private function fetchRemoteCategories(array $env, string $type = 'all'): array throw new \Exception('잘못된 응답 형식'); } + $this->remoteTenantName = $data['tenant_name'] ?? null; + return $data['categories']; } @@ -499,4 +513,4 @@ private function calculateDiff(array $localCategories, array $remoteCategories): 'both' => array_values(array_intersect($localKeys, $remoteKeys)), ]; } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/CommonCodeController.php b/app/Http/Controllers/CommonCodeController.php index 96a69ec4..bdfc56ec 100644 --- a/app/Http/Controllers/CommonCodeController.php +++ b/app/Http/Controllers/CommonCodeController.php @@ -4,6 +4,7 @@ use App\Models\Products\CommonCode; use App\Models\Tenants\Tenant; +use App\Models\Tenants\TenantSetting; use Illuminate\Contracts\View\View; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; @@ -14,29 +15,6 @@ class CommonCodeController extends Controller { - /** - * 코드 그룹 라벨 - */ - private const CODE_GROUP_LABELS = [ - 'item_type' => '품목유형', - 'material_type' => '자재유형', - 'client_type' => '거래처유형', - 'order_status' => '주문상태', - 'order_type' => '주문유형', - 'delivery_method' => '배송방법', - 'tenant_type' => '테넌트유형', - 'product_category' => '제품분류', - 'motor_type' => '모터유형', - 'controller_type' => '컨트롤러유형', - 'painting_type' => '도장유형', - 'position_type' => '위치유형', - 'capability_profile' => '생산능력', - 'bad_debt_progress' => '대손진행', - 'height_construction_cost' => '높이시공비', - 'width_construction_cost' => '폭시공비', - 'document_type' => '문서분류', - ]; - /** * 공통코드 관리 페이지 */ @@ -54,16 +32,65 @@ public function index(Request $request): View|Response // 선택된 코드 그룹 (기본: item_type) $selectedGroup = $request->get('group', 'item_type'); - // 코드 그룹 목록 (실제 존재하는 그룹만) - $existingGroups = CommonCode::query() - ->select('code_group') - ->distinct() - ->pluck('code_group') + // 글로벌 그룹 (tenant_id IS NULL) + $globalGroupDescs = CommonCode::query() + ->whereNull('tenant_id') + ->selectRaw('code_group, MIN(description) as description') + ->groupBy('code_group') + ->pluck('description', 'code_group') ->toArray(); - $codeGroups = collect(self::CODE_GROUP_LABELS) - ->filter(fn($label, $group) => in_array($group, $existingGroups)) - ->toArray(); + // 테넌트 그룹 + $tenantGroupDescs = []; + if ($tenantId) { + $tenantGroupDescs = CommonCode::query() + ->where('tenant_id', $tenantId) + ->selectRaw('code_group, MIN(description) as description') + ->groupBy('code_group') + ->pluck('description', 'code_group') + ->toArray(); + } + + // 커스텀 그룹 라벨 (빈 그룹용 — TenantSetting) + $customLabels = $this->getCustomGroupLabels(); + + // 그룹별 스코프 분류 + $allGroupKeys = array_unique(array_merge( + array_keys($globalGroupDescs), + array_keys($tenantGroupDescs), + array_keys($customLabels) + )); + sort($allGroupKeys); + + $codeGroups = []; + $groupScopes = []; + foreach ($allGroupKeys as $group) { + $inGlobal = isset($globalGroupDescs[$group]); + $inTenant = isset($tenantGroupDescs[$group]); + + // 라벨: 글로벌 description 우선 → 테넌트 → 커스텀 → 키 자체 + $codeGroups[$group] = ! empty($globalGroupDescs[$group]) + ? $globalGroupDescs[$group] + : (! empty($tenantGroupDescs[$group]) + ? $tenantGroupDescs[$group] + : ($customLabels[$group] ?? $group)); + + // 스코프: global, both, tenant, custom + if ($inGlobal && $inTenant) { + $groupScopes[$group] = 'both'; + } elseif ($inGlobal) { + $groupScopes[$group] = 'global'; + } elseif ($inTenant) { + $groupScopes[$group] = 'tenant'; + } else { + $groupScopes[$group] = 'custom'; + } + } + + // 선택된 그룹이 목록에 없으면 첫 번째 그룹으로 대체 + if (! isset($codeGroups[$selectedGroup]) && ! empty($codeGroups)) { + $selectedGroup = array_key_first($codeGroups); + } // 선택된 그룹의 코드 목록 $globalCodes = collect(); @@ -92,6 +119,7 @@ public function index(Request $request): View|Response 'tenant' => $tenant, 'isHQ' => $isHQ, 'codeGroups' => $codeGroups, + 'groupScopes' => $groupScopes, 'selectedGroup' => $selectedGroup, 'globalCodes' => $globalCodes, 'tenantCodes' => $tenantCodes, @@ -100,6 +128,80 @@ public function index(Request $request): View|Response ]); } + /** + * 커스텀 그룹 라벨 조회 + */ + private function getCustomGroupLabels(): array + { + $tenantId = session('selected_tenant_id'); + if (! $tenantId) { + return []; + } + + $setting = TenantSetting::withoutGlobalScopes() + ->where('tenant_id', $tenantId) + ->where('setting_group', 'common_code') + ->where('setting_key', 'custom_group_labels') + ->first(); + + return $setting?->setting_value ?? []; + } + + /** + * 코드 그룹 추가 + */ + public function storeGroup(Request $request): RedirectResponse + { + $tenantId = session('selected_tenant_id'); + if (! $tenantId) { + return redirect()->back()->with('error', '테넌트를 먼저 선택해주세요.'); + } + + $validated = $request->validate([ + 'group_code' => ['required', 'string', 'max:50', 'regex:/^[a-z][a-z0-9_]*$/'], + 'group_label' => 'required|string|max:50', + ], [ + 'group_code.regex' => '그룹 코드는 영문 소문자, 숫자, 언더스코어만 사용 가능합니다.', + ]); + + $groupCode = $validated['group_code']; + $groupLabel = $validated['group_label']; + + // DB에 이미 존재하는 그룹인지 체크 + $existsInDb = CommonCode::query() + ->where('code_group', $groupCode) + ->exists(); + + if ($existsInDb) { + return redirect()->back()->with('error', '이미 존재하는 그룹 코드입니다.'); + } + + // 커스텀 라벨 조회 후 중복 체크 + $customLabels = $this->getCustomGroupLabels(); + if (isset($customLabels[$groupCode])) { + return redirect()->back()->with('error', '이미 존재하는 커스텀 그룹 코드입니다.'); + } + + // 커스텀 라벨에 추가 + $customLabels[$groupCode] = $groupLabel; + + TenantSetting::withoutGlobalScopes()->updateOrCreate( + [ + 'tenant_id' => $tenantId, + 'setting_group' => 'common_code', + 'setting_key' => 'custom_group_labels', + ], + [ + 'setting_value' => $customLabels, + 'description' => '공통코드 커스텀 그룹 라벨', + ] + ); + + return redirect() + ->route('common-codes.index', ['group' => $groupCode]) + ->with('success', "'{$groupLabel}' 그룹이 추가되었습니다."); + } + /** * 코드 저장 (신규/수정) */ @@ -623,4 +725,4 @@ public function destroy(Request $request, int $id): RedirectResponse|JsonRespons ->route('common-codes.index', ['group' => $codeGroup]) ->with('success', '코드가 삭제되었습니다.'); } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/CommonCodeSyncController.php b/app/Http/Controllers/CommonCodeSyncController.php index 3623bade..455cc453 100644 --- a/app/Http/Controllers/CommonCodeSyncController.php +++ b/app/Http/Controllers/CommonCodeSyncController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Models\Products\CommonCode; +use App\Models\Tenants\Tenant; use App\Models\Tenants\TenantSetting; use Illuminate\Contracts\View\View; use Illuminate\Http\JsonResponse; @@ -12,6 +13,8 @@ class CommonCodeSyncController extends Controller { + private ?string $remoteTenantName = null; + /** * 현재 선택된 테넌트 ID */ @@ -51,12 +54,16 @@ public function index(Request $request): View|Response $selectedEnv = $request->get('env', 'dev'); $selectedType = $request->get('type', 'global'); // global or tenant + // 로컬 테넌트 정보 + $localTenant = Tenant::find($this->getTenantId()); + // 로컬 코드 조회 (타입 필터 적용) $localCodes = $this->getCodeList($selectedType); // 원격 코드 조회 $remoteCodes = []; $remoteError = null; + $this->remoteTenantName = null; if (! empty($environments[$selectedEnv]['url'])) { try { @@ -77,6 +84,8 @@ public function index(Request $request): View|Response 'remoteCodes' => $remoteCodes, 'remoteError' => $remoteError, 'diff' => $diff, + 'localTenantName' => $localTenant?->company_name ?? '알 수 없음', + 'remoteTenantName' => $this->remoteTenantName, ]); } @@ -96,9 +105,12 @@ public function export(Request $request): JsonResponse $type = $request->get('type', 'all'); // global, tenant, or all $codes = $this->getCodeList($type); + $tenant = Tenant::find($this->getTenantId()); + return response()->json([ 'success' => true, 'environment' => config('app.env'), + 'tenant_name' => $tenant?->company_name ?? '알 수 없음', 'exported_at' => now()->toIso8601String(), 'codes' => $codes, ]); @@ -370,6 +382,8 @@ private function fetchRemoteCodes(array $env, string $type = 'all'): array throw new \Exception('잘못된 응답 형식'); } + $this->remoteTenantName = $data['tenant_name'] ?? null; + return $data['codes']; } @@ -396,4 +410,4 @@ private function calculateDiff(array $localCodes, array $remoteCodes): array 'both' => array_values(array_intersect($localKeys, $remoteKeys)), ]; } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/MenuSyncController.php b/app/Http/Controllers/MenuSyncController.php index 7713356a..2cebb9a4 100644 --- a/app/Http/Controllers/MenuSyncController.php +++ b/app/Http/Controllers/MenuSyncController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Models\Commons\Menu; +use App\Models\Tenants\Tenant; use App\Models\Tenants\TenantSetting; use Illuminate\Contracts\View\View; use Illuminate\Http\JsonResponse; @@ -12,6 +13,8 @@ class MenuSyncController extends Controller { + private ?string $remoteTenantName = null; + /** * 현재 선택된 테넌트 ID */ @@ -50,12 +53,16 @@ public function index(Request $request): View|Response $environments = $this->getEnvironments(); $selectedEnv = $request->get('env', 'dev'); + // 로컬 테넌트 정보 + $localTenant = Tenant::find($this->getTenantId()); + // 로컬 메뉴 조회 (트리 구조) $localMenus = $this->getMenuTree(); // 원격 메뉴 조회 $remoteMenus = []; $remoteError = null; + $this->remoteTenantName = null; if (! empty($environments[$selectedEnv]['url'])) { try { @@ -75,6 +82,8 @@ public function index(Request $request): View|Response 'remoteMenus' => $remoteMenus, 'remoteError' => $remoteError, 'diff' => $diff, + 'localTenantName' => $localTenant?->company_name ?? '알 수 없음', + 'remoteTenantName' => $this->remoteTenantName, ]); } @@ -119,10 +128,12 @@ public function export(Request $request): JsonResponse } $menus = $this->getMenuTree(); + $tenant = Tenant::find($this->getTenantId()); return response()->json([ 'success' => true, 'environment' => config('app.env'), + 'tenant_name' => $tenant?->company_name ?? '알 수 없음', 'exported_at' => now()->toIso8601String(), 'menus' => $menus, ]); @@ -383,6 +394,8 @@ private function fetchRemoteMenus(array $env): array throw new \Exception('잘못된 응답 형식'); } + $this->remoteTenantName = $data['tenant_name'] ?? null; + return $data['menus']; } diff --git a/resources/views/categories/index.blade.php b/resources/views/categories/index.blade.php index 881a7240..80c95550 100644 --- a/resources/views/categories/index.blade.php +++ b/resources/views/categories/index.blade.php @@ -55,19 +55,48 @@ class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg
-
-
- 코드 그룹 +
+
+ 코드 그룹 +
-
+ + + @endsection @push('scripts') @@ -302,6 +371,46 @@ class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm fon const selectedGroup = '{{ $selectedGroup }}'; const csrfToken = '{{ csrf_token() }}'; + // 그룹 스코프 필터 + function filterGroups(filter) { + const items = document.querySelectorAll('.group-item'); + items.forEach(item => { + const scope = item.dataset.scope; + let show = false; + switch (filter) { + case 'all': + show = true; + break; + case 'global-based': + show = (scope === 'global' || scope === 'both'); + break; + case 'tenant-based': + show = (scope === 'tenant' || scope === 'both'); + break; + } + item.style.display = show ? '' : 'none'; + }); + + document.querySelectorAll('.group-filter-btn').forEach(btn => { + if (btn.dataset.scope === filter) { + btn.className = 'group-filter-btn text-[10px] px-1.5 py-0.5 rounded font-medium transition-colors bg-gray-700 text-white'; + } else { + btn.className = 'group-filter-btn text-[10px] px-1.5 py-0.5 rounded font-medium transition-colors bg-gray-100 text-gray-600 hover:bg-gray-200'; + } + }); + } + + // 그룹 모달 + function openGroupModal() { + document.getElementById('groupModal').classList.remove('hidden'); + document.getElementById('groupModal').classList.add('flex'); + } + + function closeGroupModal() { + document.getElementById('groupModal').classList.add('hidden'); + document.getElementById('groupModal').classList.remove('flex'); + } + // 모달 열기 (추가) function openAddModal() { document.getElementById('modalTitle').textContent = '카테고리 추가'; @@ -642,10 +751,16 @@ function deleteGlobalCategory(id, name) { document.getElementById('categoryModal').addEventListener('click', function(e) { if (e.target === this) closeModal(); }); + document.getElementById('groupModal').addEventListener('click', function(e) { + if (e.target === this) closeGroupModal(); + }); // ESC 키로 모달 닫기 document.addEventListener('keydown', function(e) { - if (e.key === 'Escape') closeModal(); + if (e.key === 'Escape') { + closeModal(); + closeGroupModal(); + } }); -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/categories/sync.blade.php b/resources/views/categories/sync.blade.php index cd0828b9..601f1b2f 100644 --- a/resources/views/categories/sync.blade.php +++ b/resources/views/categories/sync.blade.php @@ -150,7 +150,8 @@ class="w-4 h-4 text-green-600 border-gray-300 rounded focus:ring-green-500"> -

로컬 (현재)

+

로컬

+ - {{ $localTenantName }} ({{ count($localCategories) }}개)
@if(!empty($environments[$selectedEnv]['url']) && !$remoteError) @@ -215,6 +216,9 @@ class="w-4 h-4 text-purple-600 border-gray-300 rounded focus:ring-purple-500">

{{ $environments[$selectedEnv]['name'] ?? strtoupper($selectedEnv) }}

+ @if($remoteTenantName) + - {{ $remoteTenantName }} + @endif ({{ count($remoteCategories) }}개)
@if(!empty($environments[$selectedEnv]['url']) && !$remoteError) @@ -391,4 +395,4 @@ function updateSelectedCount(side) { } } -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/common-codes/index.blade.php b/resources/views/common-codes/index.blade.php index 619bb66b..9157b4e0 100644 --- a/resources/views/common-codes/index.blade.php +++ b/resources/views/common-codes/index.blade.php @@ -73,19 +73,48 @@ class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg
-
-
- 코드 그룹 +
+
+ 코드 그룹 +
-
@if(!empty($environments[$selectedEnv]['url']) && !$remoteError) @@ -219,6 +220,9 @@ class="w-4 h-4 text-purple-600 border-gray-300 rounded focus:ring-purple-500">

{{ $environments[$selectedEnv]['name'] ?? strtoupper($selectedEnv) }}

+ @if($remoteTenantName) + - {{ $remoteTenantName }} + @endif ({{ count($remoteCodes) }}개)
@if(!empty($environments[$selectedEnv]['url']) && !$remoteError) @@ -392,4 +396,4 @@ function updateSelectedCount(side) { } } -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/menus/sync.blade.php b/resources/views/menus/sync.blade.php index 2cfed22a..000473b7 100644 --- a/resources/views/menus/sync.blade.php +++ b/resources/views/menus/sync.blade.php @@ -116,7 +116,7 @@ class="w-4 h-4 text-green-600 border-gray-300 rounded focus:ring-green-500"> -

로컬 (현재)

+

로컬 - {{ $localTenantName }}

({{ count($localMenus) }}개 그룹)
@if(!empty($environments[$selectedEnv]['url']) && !$remoteError) @@ -152,7 +152,7 @@ class="w-4 h-4 text-purple-600 border-gray-300 rounded focus:ring-purple-500"> -

{{ $environments[$selectedEnv]['name'] ?? strtoupper($selectedEnv) }}

+

{{ $environments[$selectedEnv]['name'] ?? strtoupper($selectedEnv) }}{{ $remoteTenantName ? ' - ' . $remoteTenantName : '' }}

({{ count($remoteMenus) }}개 그룹)
@if(!empty($environments[$selectedEnv]['url']) && !$remoteError)