- TenantProspectController에 modalShow, modalEdit 메서드 추가 - prospects 라우트에 modal-show, modal-edit 엔드포인트 추가 - index.blade.php에 모달 컨테이너 및 JavaScript 추가 - partials/show-modal.blade.php, edit-modal.blade.php 신규 생성 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
110 lines
5.9 KiB
PHP
110 lines
5.9 KiB
PHP
{{-- 고객 수정 모달 내용 --}}
|
|
<div class="p-6 max-h-[80vh] overflow-y-auto">
|
|
<!-- 헤더 -->
|
|
<div class="flex justify-between items-start mb-6">
|
|
<div>
|
|
<h2 class="text-xl font-bold text-gray-800">고객 정보 수정</h2>
|
|
<p class="text-sm text-gray-500 mt-1">{{ $prospect->company_name }} ({{ $prospect->business_number }})</p>
|
|
</div>
|
|
<button type="button" data-close-modal class="text-gray-400 hover:text-gray-600">
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- 폼 -->
|
|
<form action="{{ route('sales.prospects.update', $prospect->id) }}" method="POST" enctype="multipart/form-data">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<!-- 사업자번호 (수정 불가) -->
|
|
<div class="mb-4">
|
|
<label class="block text-xs font-medium text-gray-700 mb-1">사업자번호</label>
|
|
<input type="text" value="{{ $prospect->business_number }}" disabled
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg bg-gray-100 text-gray-500 text-sm">
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-700 mb-1">회사명 <span class="text-red-500">*</span></label>
|
|
<input type="text" name="company_name" value="{{ $prospect->company_name }}" required
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-700 mb-1">대표자명</label>
|
|
<input type="text" name="ceo_name" value="{{ $prospect->ceo_name }}"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-700 mb-1">연락처</label>
|
|
<input type="text" name="contact_phone" value="{{ $prospect->contact_phone }}"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-700 mb-1">이메일</label>
|
|
<input type="email" name="contact_email" value="{{ $prospect->contact_email }}"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<label class="block text-xs font-medium text-gray-700 mb-1">주소</label>
|
|
<input type="text" name="address" value="{{ $prospect->address }}"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm">
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<label class="block text-xs font-medium text-gray-700 mb-1">명함 이미지</label>
|
|
@if($prospect->hasBusinessCard())
|
|
<div class="mb-2 p-2 bg-gray-50 rounded-lg flex items-center gap-3" id="prospect_card_preview">
|
|
<img src="{{ $prospect->business_card_url }}" alt="현재 명함" class="h-16 rounded">
|
|
<span class="text-xs text-gray-500">새 이미지 업로드 시 교체됨</span>
|
|
</div>
|
|
@endif
|
|
<input type="file" name="business_card" accept="image/*"
|
|
class="w-full text-sm text-gray-500 file:mr-2 file:py-1.5 file:px-3 file:rounded-lg file:border-0 file:text-sm file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<label class="block text-xs font-medium text-gray-700 mb-1">메모</label>
|
|
<textarea name="memo" rows="2"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm">{{ $prospect->memo }}</textarea>
|
|
</div>
|
|
|
|
<!-- 영업권 상태 정보 -->
|
|
<div class="bg-gray-50 border border-gray-200 rounded-lg p-3 mb-4">
|
|
<h3 class="text-xs font-medium text-gray-800 mb-2">영업권 상태</h3>
|
|
<div class="grid grid-cols-2 gap-2 text-xs">
|
|
<div class="text-gray-500">상태</div>
|
|
<div>
|
|
<span class="px-2 py-0.5 text-xs font-medium rounded-full {{ $prospect->status_color }}">
|
|
{{ $prospect->status_label }}
|
|
</span>
|
|
</div>
|
|
<div class="text-gray-500">등록일</div>
|
|
<div class="font-medium">{{ $prospect->registered_at->format('Y-m-d') }}</div>
|
|
<div class="text-gray-500">만료일</div>
|
|
<div class="font-medium">{{ $prospect->expires_at->format('Y-m-d') }}</div>
|
|
<div class="text-gray-500">등록자</div>
|
|
<div class="font-medium">{{ $prospect->registeredBy?->name ?? '-' }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 푸터 버튼 -->
|
|
<div class="flex justify-end gap-3">
|
|
<button type="button" data-close-modal
|
|
class="px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition text-sm">
|
|
취소
|
|
</button>
|
|
<button type="submit"
|
|
class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition text-sm">
|
|
수정
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|