@if(isset($error))

{{ $error }}

@elseif($fields->isEmpty())

등록된 필드가 없습니다.

시스템 필드 시딩 또는 커스텀 필드 추가를 해보세요.

@else
@foreach($fields as $field) @php $isSystemField = $field->is_common || $field->storage_type === 'column'; $isDeleted = !is_null($field->deleted_at); $hasOptions = !empty($field->options); $hasProperties = !empty($field->properties); $hasValidation = !empty($field->validation_rules); $hasDisplayCondition = !empty($field->display_condition); $hasAnyJson = $hasOptions || $hasProperties || $hasValidation || $hasDisplayCondition; // 모델에서 이미 캐스팅된 경우 배열, 아니면 문자열 $optionsData = $hasOptions ? (is_array($field->options) ? $field->options : json_decode($field->options, true)) : null; $propertiesData = $hasProperties ? (is_array($field->properties) ? $field->properties : json_decode($field->properties, true)) : null; $validationData = $hasValidation ? (is_array($field->validation_rules) ? $field->validation_rules : json_decode($field->validation_rules, true)) : null; $displayConditionData = $hasDisplayCondition ? (is_array($field->display_condition) ? $field->display_condition : json_decode($field->display_condition, true)) : null; @endphp @if($hasAnyJson) @endif @endforeach
상태 유형 소스 테이블 필드 키 필드명 타입 필수 설정 액션
@if($hasAnyJson) @endif
@if($isDeleted) 삭제됨 @elseif($field->is_active) @else @endif @if($field->is_locked) @endif
@if($isSystemField) 시스템 @else 커스텀 @endif @if(empty($field->source_table)) 미지정 @else {{ $field->source_table }} @endif @if(empty($field->field_key)) 미지정 @else {{ $field->field_key }} @endif
{{ $field->field_name }} @if($field->is_required) * @endif
@if($field->description)
{{ $field->description }}
@endif
@php $typeLabels = [ 'textbox' => ['label' => '텍스트', 'color' => 'gray'], 'number' => ['label' => '숫자', 'color' => 'blue'], 'dropdown' => ['label' => '드롭다운', 'color' => 'purple'], 'checkbox' => ['label' => '체크박스', 'color' => 'green'], 'date' => ['label' => '날짜', 'color' => 'orange'], 'textarea' => ['label' => '텍스트영역', 'color' => 'gray'], ]; $typeInfo = $typeLabels[$field->field_type] ?? ['label' => $field->field_type, 'color' => 'gray']; @endphp {{ $typeInfo['label'] }} @if($field->is_required) @else - @endif
@if($hasOptions) 옵션 @endif @if($hasProperties) 속성 @endif @if($hasValidation) 검증 @endif @if($hasDisplayCondition) 조건 @endif @if(!$hasAnyJson) - @endif
@if($isDeleted) @else @endif
@php // 현재 페이지의 항목으로 통계 계산 $currentItems = $fields->getCollection(); $systemCount = $currentItems->filter(fn($f) => $f->is_common || $f->storage_type === 'column')->count(); $customCount = $currentItems->count() - $systemCount; $activeCount = $currentItems->filter(fn($f) => $f->is_active)->count(); $lockedCount = $currentItems->filter(fn($f) => $f->is_locked)->count(); $withOptionsCount = $currentItems->filter(fn($f) => !empty($f->options))->count(); $deletedCount = $currentItems->filter(fn($f) => !is_null($f->deleted_at))->count(); @endphp 시스템: {{ $systemCount }} 커스텀: {{ $customCount }}
@if($deletedCount > 0) 삭제됨: {{ $deletedCount }}개 @endif @if($activeCount < $currentItems->count()) 비활성: {{ $currentItems->count() - $activeCount }}개 @endif @if($lockedCount > 0) 잠금: {{ $lockedCount }}개 @endif @if($withOptionsCount > 0) 옵션설정: {{ $withOptionsCount }}개 @endif
@include('partials.pagination', [ 'paginator' => $fields, 'target' => '#custom-fields', 'includeForm' => '#customFilterForm' ]) @endif