- ItemField 모델 및 SystemFieldDefinitions 상수 클래스 추가 - ItemFieldSeedingService: 시스템 필드 시딩/초기화/커스텀 필드 CRUD - ItemFieldController (API): HTMX 기반 시딩 상태, 커스텀 필드 관리 - 커스텀 필드 수정 기능 (시스템 필드는 source_table/field_key 수정 불가) - 레거시 데이터 표시 개선: 소스 테이블 비어있으면 '미지정' 배지 - 필드 키 정책 변경: 숫자로 시작 허용 (영문/숫자/밑줄) - AI 문의하기: 시딩 오류 보고서 생성 기능 - 사이드바에 품목기준 필드 관리 메뉴 추가
87 lines
4.3 KiB
PHP
87 lines
4.3 KiB
PHP
@if(isset($error))
|
|
<div class="p-8 text-center">
|
|
<div class="text-yellow-600 mb-2">
|
|
<svg class="w-12 h-12 mx-auto" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
|
</svg>
|
|
</div>
|
|
<p class="text-gray-600">{{ $error }}</p>
|
|
</div>
|
|
@elseif(empty($statuses))
|
|
<div class="p-8 text-center text-gray-500">
|
|
시딩 상태 정보가 없습니다.
|
|
</div>
|
|
@else
|
|
<table class="w-full">
|
|
<thead class="bg-gray-50 border-b border-gray-200">
|
|
<tr>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">소스 테이블</th>
|
|
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">시스템 필드 수</th>
|
|
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">현재 등록 수</th>
|
|
<th class="px-6 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">상태</th>
|
|
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">액션</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200">
|
|
@foreach($statuses as $sourceTable => $status)
|
|
<tr class="hover:bg-gray-50">
|
|
<td class="px-6 py-4">
|
|
<div class="font-medium text-gray-900">{{ $status['label'] }}</div>
|
|
<div class="text-xs text-gray-500">{{ $sourceTable }}</div>
|
|
</td>
|
|
<td class="px-6 py-4 text-center text-sm text-gray-500">
|
|
{{ $status['total_count'] }}개
|
|
</td>
|
|
<td class="px-6 py-4 text-center text-sm text-gray-500">
|
|
{{ $status['current_count'] }}개
|
|
</td>
|
|
<td class="px-6 py-4 text-center">
|
|
@if($status['status'] === 'complete')
|
|
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
|
|
완료
|
|
</span>
|
|
@elseif($status['status'] === 'partial')
|
|
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">
|
|
일부
|
|
</span>
|
|
@else
|
|
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800">
|
|
미시딩
|
|
</span>
|
|
@endif
|
|
</td>
|
|
<td class="px-6 py-4 text-right">
|
|
<div class="flex justify-end gap-2">
|
|
@if($status['status'] !== 'complete')
|
|
<button onclick="seedTable('{{ $sourceTable }}')"
|
|
class="text-green-600 hover:text-green-800 text-sm font-medium">
|
|
시딩
|
|
</button>
|
|
@endif
|
|
@if($status['current_count'] > 0)
|
|
<button onclick="resetTable('{{ $sourceTable }}')"
|
|
class="text-red-600 hover:text-red-800 text-sm font-medium">
|
|
초기화
|
|
</button>
|
|
@endif
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<!-- 요약 정보 -->
|
|
<div class="px-6 py-4 bg-gray-50 border-t border-gray-200">
|
|
<div class="flex justify-between items-center text-sm text-gray-600">
|
|
<span>
|
|
총 {{ count($statuses) }}개 테이블 /
|
|
{{ collect($statuses)->where('status', 'complete')->count() }}개 완료
|
|
</span>
|
|
<span class="text-xs text-gray-400">
|
|
* 시딩: 시스템 필드 등록 / 초기화: 삭제 후 재시딩
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@endif
|