Files
sam-manage/resources/views/sales/managers/show.blade.php
pro d39028d92a feat:영업관리 모듈 (salesmanagement) Laravel 마이그레이션
레거시 sales 시스템에서 MNG로 마이그레이션:
- 마이그레이션: sales_managers, sales_prospects, sales_records 등 6개 테이블
- 모델: SalesManager, SalesProspect, SalesRecord 등 6개 모델
- 컨트롤러: SalesManagerController, SalesProspectController, SalesRecordController
- 뷰: managers, prospects, records CRUD 화면
- 라우트: /sales/* 경로 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 11:09:42 +09:00

129 lines
6.1 KiB
PHP

@extends('layouts.app')
@section('title', '영업담당자 상세')
@section('content')
<div class="max-w-4xl mx-auto">
<!-- 페이지 헤더 -->
<div class="mb-6 flex justify-between items-start">
<div>
<a href="{{ route('sales.managers.index') }}" class="text-gray-500 hover:text-gray-700 text-sm mb-2 inline-flex items-center">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
</svg>
목록으로
</a>
<h1 class="text-2xl font-bold text-gray-800">{{ $manager->name }}</h1>
<p class="text-sm text-gray-500 mt-1">
<span class="px-2 py-1 text-xs font-medium rounded-full {{ $manager->role_color }}">
{{ $manager->role_label }}
</span>
</p>
</div>
<a href="{{ route('sales.managers.edit', $manager->id) }}"
class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg transition">
수정
</a>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<!-- 기본 정보 -->
<div class="bg-white rounded-lg shadow-sm p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">기본 정보</h2>
<dl class="space-y-3">
<div class="flex justify-between">
<dt class="text-gray-500">로그인 ID</dt>
<dd class="font-medium text-gray-900">{{ $manager->member_id }}</dd>
</div>
<div class="flex justify-between">
<dt class="text-gray-500">이름</dt>
<dd class="font-medium text-gray-900">{{ $manager->name }}</dd>
</div>
<div class="flex justify-between">
<dt class="text-gray-500">전화번호</dt>
<dd class="font-medium text-gray-900">{{ $manager->phone ?? '-' }}</dd>
</div>
<div class="flex justify-between">
<dt class="text-gray-500">이메일</dt>
<dd class="font-medium text-gray-900">{{ $manager->email ?? '-' }}</dd>
</div>
<div class="flex justify-between">
<dt class="text-gray-500">상위 관리자</dt>
<dd class="font-medium text-gray-900">{{ $manager->parent?->name ?? '-' }}</dd>
</div>
<div class="flex justify-between">
<dt class="text-gray-500">등록일</dt>
<dd class="font-medium text-gray-900">{{ $manager->created_at->format('Y-m-d H:i') }}</dd>
</div>
</dl>
</div>
<!-- 통계 -->
<div class="bg-white rounded-lg shadow-sm p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">활동 통계</h2>
<div class="grid grid-cols-2 gap-4">
<div class="bg-blue-50 rounded-lg p-4 text-center">
<div class="text-2xl font-bold text-blue-800">{{ $manager->registeredProspects->count() }}</div>
<div class="text-sm text-blue-600">등록한 가망고객</div>
</div>
<div class="bg-green-50 rounded-lg p-4 text-center">
<div class="text-2xl font-bold text-green-800">{{ $manager->assignedProspects->count() }}</div>
<div class="text-sm text-green-600">담당 가망고객</div>
</div>
<div class="bg-purple-50 rounded-lg p-4 text-center">
<div class="text-2xl font-bold text-purple-800">{{ $manager->records->count() }}</div>
<div class="text-sm text-purple-600">영업 실적</div>
</div>
<div class="bg-yellow-50 rounded-lg p-4 text-center">
<div class="text-2xl font-bold text-yellow-800">{{ $manager->children->count() }}</div>
<div class="text-sm text-yellow-600">하위 담당자</div>
</div>
</div>
</div>
</div>
<!-- 비고 -->
@if($manager->remarks)
<div class="mt-6 bg-white rounded-lg shadow-sm p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">비고</h2>
<p class="text-gray-700 whitespace-pre-line">{{ $manager->remarks }}</p>
</div>
@endif
<!-- 하위 담당자 목록 -->
@if($manager->children->isNotEmpty())
<div class="mt-6 bg-white rounded-lg shadow-sm p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">하위 담당자</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">이름</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">역할</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">연락처</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
@foreach($manager->children as $child)
<tr>
<td class="px-4 py-3">
<a href="{{ route('sales.managers.show', $child->id) }}" class="text-blue-600 hover:underline">
{{ $child->name }}
</a>
</td>
<td class="px-4 py-3">
<span class="px-2 py-1 text-xs font-medium rounded-full {{ $child->role_color }}">
{{ $child->role_label }}
</span>
</td>
<td class="px-4 py-3 text-gray-500">{{ $child->phone ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
</div>
@endsection