refactor:정산관리 탭 통합 리디자인 (5탭→3탭)

- 수당정산+수당지급 → 수당관리 탭으로 통합
- 서브탭 추가: 영업파트너 수당 / 매니저 수당
- 파트너별 현황 탭 제거
- 수당유형 필터 제거 (서브탭으로 대체)
- 기존 table.blade.php → partner/manager 테이블로 분리

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-19 17:01:44 +09:00
parent 7e9b470554
commit 4a492fde99
4 changed files with 234 additions and 127 deletions

View File

@@ -3,7 +3,7 @@
@section('title', '정산관리')
@section('content')
<div class="px-4 py-6" x-data="{ activeTab: '{{ $initialTab }}' }">
<div class="px-4 py-6" x-data="{ activeTab: '{{ $initialTab }}', commissionSubTab: 'partner' }">
{{-- 페이지 헤더 --}}
<div class="flex flex-col lg:flex-row lg:justify-between lg:items-center gap-4 mb-6">
<div>
@@ -40,25 +40,7 @@ class="inline-flex items-center gap-2 px-4 py-2 bg-gray-600 hover:bg-gray-700 te
<button @click="activeTab = 'commission'"
:class="activeTab === 'commission' ? 'border-indigo-500 text-indigo-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
class="border-b-2 py-3 px-4 text-sm font-medium whitespace-nowrap transition-colors">
수당 정산
</button>
<button @click="activeTab = 'payment'"
hx-get="{{ route('finance.settlement.payment') }}"
hx-target="#payment-content"
hx-trigger="click once"
hx-indicator="#payment-loading"
:class="activeTab === 'payment' ? 'border-indigo-500 text-indigo-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
class="border-b-2 py-3 px-4 text-sm font-medium whitespace-nowrap transition-colors">
수당 지급
</button>
<button @click="activeTab = 'partner'"
hx-get="{{ route('finance.settlement.partner-summary') }}"
hx-target="#partner-content"
hx-trigger="click once"
hx-indicator="#partner-loading"
:class="activeTab === 'partner' ? 'border-indigo-500 text-indigo-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
class="border-b-2 py-3 px-4 text-sm font-medium whitespace-nowrap transition-colors">
파트너별 현황
수당 관리
</button>
<button @click="activeTab = 'customer'"
hx-get="{{ route('finance.settlement.customer') }}"
@@ -81,7 +63,7 @@ class="border-b-2 py-3 px-4 text-sm font-medium whitespace-nowrap transition-col
</nav>
</div>
{{-- 1: 수당 정산 (즉시 렌더링) --}}
{{-- 1: 수당 관리 (즉시 렌더링) --}}
<div x-show="activeTab === 'commission'" x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100">
{{-- 통계 카드 --}}
<div id="commission-stats-container">
@@ -91,50 +73,49 @@ class="border-b-2 py-3 px-4 text-sm font-medium whitespace-nowrap transition-col
{{-- 필터 --}}
@include('finance.settlement.partials.commission.filters', ['filters' => $filters, 'partners' => $partners, 'year' => $year, 'month' => $month])
{{-- 일괄 처리 버튼 --}}
<div class="flex items-center gap-2 mb-4" id="bulk-actions" style="display: none;">
<span class="text-sm text-gray-600"><span id="selected-count">0</span> 선택</span>
<button type="button" onclick="bulkApprove()" class="px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white text-sm rounded-lg transition-colors">
일괄 승인
</button>
<button type="button" onclick="bulkMarkPaid()" class="px-3 py-1.5 bg-green-600 hover:bg-green-700 text-white text-sm rounded-lg transition-colors">
일괄 지급완료
</button>
{{-- 서브탭 --}}
<div class="flex items-center gap-2 mb-4">
<div class="inline-flex rounded-lg bg-gray-100 p-1">
<button @click="commissionSubTab = 'partner'"
:class="commissionSubTab === 'partner' ? 'bg-white text-indigo-600 shadow-sm' : 'text-gray-500 hover:text-gray-700'"
class="px-4 py-1.5 text-sm font-medium rounded-md transition-all">
영업파트너 수당
</button>
<button @click="commissionSubTab = 'manager'"
:class="commissionSubTab === 'manager' ? 'bg-white text-indigo-600 shadow-sm' : 'text-gray-500 hover:text-gray-700'"
class="px-4 py-1.5 text-sm font-medium rounded-md transition-all">
매니저 수당
</button>
</div>
{{-- 일괄 처리 버튼 --}}
<div class="flex items-center gap-2 ml-auto" id="bulk-actions" style="display: none;">
<span class="text-sm text-gray-600"><span id="selected-count">0</span> 선택</span>
<button type="button" onclick="bulkApprove()" class="px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white text-sm rounded-lg transition-colors">
일괄 승인
</button>
<button type="button" onclick="bulkMarkPaid()" class="px-3 py-1.5 bg-green-600 hover:bg-green-700 text-white text-sm rounded-lg transition-colors">
일괄 지급완료
</button>
</div>
</div>
{{-- 정산 테이블 --}}
<div id="commission-table-container">
@include('finance.settlement.partials.commission.table', ['commissions' => $commissions])
{{-- 서브탭 1: 영업파트너 수당 테이블 --}}
<div x-show="commissionSubTab === 'partner'" x-transition:enter="transition ease-out duration-150" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100">
<div id="commission-table-container">
@include('finance.settlement.partials.commission.partner-commission-table', ['commissions' => $commissions])
</div>
</div>
</div>
{{-- 2: 수당 지급 (HTMX lazy load) --}}
<div x-show="activeTab === 'payment'" x-cloak x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100">
<div id="payment-content">
<div id="payment-loading" class="flex items-center justify-center py-12">
<svg class="w-8 h-8 animate-spin text-indigo-600" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
<span class="ml-3 text-gray-500">로딩 ...</span>
{{-- 서브 2: 매니저 수당 테이블 --}}
<div x-show="commissionSubTab === 'manager'" x-transition:enter="transition ease-out duration-150" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100">
<div id="manager-table-container">
@include('finance.settlement.partials.commission.manager-commission-table', ['commissions' => $commissions])
</div>
</div>
</div>
{{-- 3: 파트너별 현황 (HTMX lazy load) --}}
<div x-show="activeTab === 'partner'" x-cloak x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100">
<div id="partner-content">
<div id="partner-loading" class="flex items-center justify-center py-12">
<svg class="w-8 h-8 animate-spin text-indigo-600" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
<span class="ml-3 text-gray-500">로딩 ...</span>
</div>
</div>
</div>
{{-- 4: 고객사정산 (HTMX lazy load) --}}
{{-- 2: 고객사정산 (HTMX lazy load) --}}
<div x-show="activeTab === 'customer'" x-cloak x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100">
<div id="customer-content">
<div id="customer-loading" class="flex items-center justify-center py-12">
@@ -147,7 +128,7 @@ class="border-b-2 py-3 px-4 text-sm font-medium whitespace-nowrap transition-col
</div>
</div>
{{-- 6: 구독관리 (HTMX lazy load) --}}
{{-- 3: 구독관리 (HTMX lazy load) --}}
<div x-show="activeTab === 'subscription'" x-cloak x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100">
<div id="subscription-content">
<div id="subscription-loading" class="flex items-center justify-center py-12">
@@ -391,12 +372,9 @@ function onTenantSelect(managementId) {
});
}
// 초기 탭이 기본(commission)이 아닌 경우 HTMX 콘텐츠 자동 로드
document.addEventListener('DOMContentLoaded', function() {
const initialTab = '{{ $initialTab }}';
const tabRoutes = {
'payment': '{{ route("finance.settlement.payment") }}',
'partner': '{{ route("finance.settlement.partner-summary") }}',
'customer': '{{ route("finance.settlement.customer") }}',
'subscription': '{{ route("finance.settlement.subscription") }}',
};

View File

@@ -53,16 +53,6 @@
</select>
</div>
<div class="w-[calc(50%-6px)] sm:w-auto sm:min-w-[110px]">
<label class="block text-xs font-medium text-gray-500 mb-1">수당유형</label>
<select name="commission_type" class="w-full rounded-lg border-gray-300 text-sm focus:border-emerald-500 focus:ring-emerald-500">
<option value="">전체</option>
<option value="partner" {{ ($filters['commission_type'] ?? '') == 'partner' ? 'selected' : '' }}>파트너수당</option>
<option value="manager" {{ ($filters['commission_type'] ?? '') == 'manager' ? 'selected' : '' }}>매니저수당</option>
<option value="referrer" {{ ($filters['commission_type'] ?? '') == 'referrer' ? 'selected' : '' }}>유치수당</option>
</select>
</div>
<div class="flex items-end gap-1 w-full sm:w-auto">
<button type="submit"
class="flex-1 sm:flex-none px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-white text-sm rounded-lg transition-colors">

View File

@@ -0,0 +1,191 @@
{{-- 매니저 수당 테이블 (2 레이아웃) --}}
<div class="bg-white rounded-lg shadow-sm overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full">
<thead class="bg-gray-50">
<tr>
<th class="w-12 px-4 py-3">
<input type="checkbox" onchange="toggleSelectAll(this)" class="rounded border-gray-300 text-emerald-600 focus:ring-emerald-500">
</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">테넌트</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">입금</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">매니저</th>
<th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">상태</th>
<th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">액션</th>
</tr>
</thead>
<tbody class="bg-white">
@forelse ($commissions as $commission)
@php
$partnerObj = $commission->partner
?? $commission->management?->salesPartner
?? $commission->management?->tenantProspect?->registeredBy?->salesPartner;
$isGroup = $partnerObj?->partner_type === 'corporate';
$mgmt = $commission->management;
$totalFee = $mgmt?->total_registration_fee
?? $mgmt?->contractProducts?->sum('registration_fee')
?? 0;
$calcBase = $totalFee / 2;
$monthlySubscription = $mgmt?->contractProducts?->sum('subscription_fee') ?? 0;
$displayPayment = $commission->payment_amount > 0
? $commission->payment_amount
: ($commission->payment_type === 'deposit'
? ($mgmt?->deposit_amount ?? $calcBase)
: ($mgmt?->balance_amount ?? $calcBase));
$displayManagerComm = $monthlySubscription;
$statusColors = [
'pending' => 'bg-yellow-100 text-yellow-800',
'approved' => 'bg-blue-100 text-blue-800',
'paid' => 'bg-green-100 text-green-800',
'cancelled' => 'bg-red-100 text-red-800',
];
$hqColors = [
'pending' => 'bg-gray-100 text-gray-600',
'review' => 'bg-yellow-100 text-yellow-700',
'planning' => 'bg-blue-100 text-blue-700',
'coding' => 'bg-indigo-100 text-indigo-700',
'dev_test' => 'bg-purple-100 text-purple-700',
'dev_done' => 'bg-teal-100 text-teal-700',
'int_test' => 'bg-cyan-100 text-cyan-700',
'handover' => 'bg-green-100 text-green-700',
];
@endphp
{{-- Row 1: 메인 정보 --}}
<tr class="hover:bg-gray-50/50 border-t border-gray-200">
<td class="px-4 py-2 align-top" rowspan="2">
@if (in_array($commission->status, ['pending', 'approved']))
<input type="checkbox"
value="{{ $commission->id }}"
onchange="updateSelection()"
class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-emerald-500 mt-1">
@endif
</td>
<td class="px-4 py-2">
<div class="text-sm font-medium text-gray-900">
{{ $commission->management?->tenant?->company_name ?? $commission->management?->tenantProspect?->company_name ?? '-' }}
</div>
<div class="flex flex-wrap gap-1 mt-1">
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium {{ $isGroup ? 'bg-purple-100 text-purple-800' : 'bg-sky-100 text-sky-800' }}">{{ $isGroup ? '단체' : '개인' }}</span>
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium {{ $commission->payment_type === 'deposit' ? 'bg-blue-100 text-blue-800' : 'bg-green-100 text-green-800' }}">{{ $commission->payment_type_label }}</span>
@if ($commission->management?->hq_status)
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium {{ $hqColors[$commission->management->hq_status] ?? 'bg-gray-100 text-gray-600' }}">{{ $commission->management->hq_status_label }}</span>
@endif
</div>
</td>
<td class="px-4 py-2">
@if ($displayPayment > 0)
<div class="text-sm font-bold text-gray-900">{{ number_format($displayPayment) }}</div>
@else
<div class="text-sm text-gray-400">-</div>
@endif
<div class="text-xs text-gray-500">{{ $commission->payment_date->format('Y-m-d') }}</div>
</td>
<td class="px-4 py-2">
<div class="text-sm text-gray-900">{{ $commission->manager?->name ?? $commission->management?->manager?->name ?? '-' }} <span class="text-gray-400">(구독1월)</span></div>
<div class="text-sm font-medium text-blue-600">
@if ($displayManagerComm > 0)
{{ number_format($displayManagerComm) }}
@else
<span class="text-gray-400">-</span>
@endif
</div>
</td>
<td class="px-4 py-2 text-center">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium {{ $statusColors[$commission->status] ?? 'bg-gray-100 text-gray-800' }}">
{{ $commission->status_label }}
</span>
</td>
<td class="px-4 py-2 text-center align-top" rowspan="2">
<div class="flex items-center justify-center gap-1">
<button type="button"
onclick="openDetailModal({{ $commission->id }})"
class="p-1 text-gray-400 hover:text-gray-600"
title="상세보기">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
</svg>
</button>
@if ($commission->status === 'pending')
<button type="button"
onclick="approveCommission({{ $commission->id }})"
class="p-1 text-blue-400 hover:text-blue-600"
title="승인">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</button>
<button type="button"
onclick="cancelCommission({{ $commission->id }})"
class="p-1 text-red-400 hover:text-red-600"
title="취소">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</button>
@elseif ($commission->status === 'approved')
<button type="button"
onclick="markPaidCommission({{ $commission->id }})"
class="p-1 text-green-400 hover:text-green-600"
title="지급완료">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
</svg>
</button>
@endif
</div>
</td>
</tr>
{{-- Row 2: 지급 정보 --}}
<tr class="bg-gray-50/50 border-b border-gray-200">
<td colspan="2" class="px-4 py-2">
<div class="flex items-center gap-6 text-xs">
<div class="flex items-center gap-1.5">
<span class="text-gray-500 whitespace-nowrap">지급예정일:</span>
<span class="text-gray-700">{{ $commission->scheduled_payment_date->format('Y-m-d') }}</span>
</div>
<div class="flex items-center gap-1.5">
<span class="text-gray-500 whitespace-nowrap">매니저지급일:</span>
@if($isGroup)
<span class="text-gray-400">-</span>
@else
<input type="date"
class="h-6 text-xs px-1 border border-gray-300 rounded cursor-pointer hover:border-purple-400 focus:outline-none focus:border-purple-500 {{ $commission->manager_paid_at ? 'text-purple-600 font-medium bg-purple-50 border-purple-400' : 'text-gray-500 bg-gray-50' }}"
value="{{ $commission->manager_paid_at?->format('Y-m-d') }}"
onchange="saveSettlementDate({{ $commission->id }}, 'manager_paid_at', this.value)">
@endif
</div>
</div>
</td>
<td></td>{{-- 상태 빈칸 --}}
</tr>
@empty
<tr>
<td colspan="6" class="px-4 py-8 text-center text-gray-500">
등록된 정산 내역이 없습니다.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if ($commissions->hasPages())
<div class="px-4 py-3 border-t border-gray-200">
{{ $commissions->links() }}
</div>
@endif
</div>

View File

@@ -1,4 +1,4 @@
{{-- 수당 정산 테이블 (2 레이아웃) --}}
{{-- 영업파트너 수당 테이블 (2 레이아웃) --}}
<div class="bg-white rounded-lg shadow-sm overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full">
@@ -10,7 +10,6 @@
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">테넌트</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">입금</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">영업파트너</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">매니저</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">유치파트너</th>
<th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">상태</th>
<th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">액션</th>
@@ -19,33 +18,23 @@
<tbody class="bg-white">
@forelse ($commissions as $commission)
@php
// 파트너 타입 판별 (개인/단체)
$partnerObj = $commission->partner
?? $commission->management?->salesPartner
?? $commission->management?->tenantProspect?->registeredBy?->salesPartner;
$isGroup = $partnerObj?->partner_type === 'corporate';
// commission 금액이 0이면 management 데이터로 계산
$mgmt = $commission->management;
$totalFee = $mgmt?->total_registration_fee
?? $mgmt?->contractProducts?->sum('registration_fee')
?? 0;
$calcBase = $totalFee / 2; // 개발비의 50%
$calcBase = $totalFee / 2;
// 구독료 1개월 (매니저수당 기준)
$monthlySubscription = $mgmt?->contractProducts?->sum('subscription_fee') ?? 0;
// 입금액
$displayPayment = $commission->payment_amount > 0
? $commission->payment_amount
: ($commission->payment_type === 'deposit'
? ($mgmt?->deposit_amount ?? $calcBase)
: ($mgmt?->balance_amount ?? $calcBase));
// 수당률
// 파트너: 개인 20%, 단체 30%
// 유치파트너(상위파트너): 개인 5%, 단체 3%
// 매니저: 구독료 1개월 (비율 아님)
if ($commission->partner_rate > 0) {
$pRate = $commission->partner_rate;
} else {
@@ -53,22 +42,18 @@
}
$rRate = $isGroup ? 3 : 5;
// 수당 금액
$displayPartnerComm = $commission->partner_commission > 0
? $commission->partner_commission
: ($calcBase > 0 ? $calcBase * ($pRate / 100) : 0);
$displayManagerComm = $monthlySubscription; // 구독료 1개월
$displayReferrerComm = $commission->referrer_commission > 0
? $commission->referrer_commission
: ($calcBase > 0 ? $calcBase * ($rRate / 100) : 0);
// 영업파트너 이름
$partnerName = $commission->partner?->user?->name
?? $commission->management?->salesPartner?->user?->name
?? $commission->management?->tenantProspect?->registeredBy?->name
?? '-';
// 유치파트너 이름
$referrerName = $commission->referrerPartner?->user?->name;
if (!$referrerName) {
$partnerUser = $commission->partner?->user
@@ -77,11 +62,9 @@
$referrerName = $partnerUser?->parent?->name;
}
// 수당지급일 필드
$paidField = $commission->payment_type === 'deposit' ? 'first_partner_paid_at' : 'second_partner_paid_at';
$paidValue = $commission->$paidField?->format('Y-m-d');
// 상태 색상
$statusColors = [
'pending' => 'bg-yellow-100 text-yellow-800',
'approved' => 'bg-blue-100 text-blue-800',
@@ -89,7 +72,6 @@
'cancelled' => 'bg-red-100 text-red-800',
];
// 개발상태 색상
$hqColors = [
'pending' => 'bg-gray-100 text-gray-600',
'review' => 'bg-yellow-100 text-yellow-700',
@@ -104,7 +86,6 @@
{{-- Row 1: 메인 정보 --}}
<tr class="hover:bg-gray-50/50 border-t border-gray-200">
{{-- 체크박스 (rowspan=2) --}}
<td class="px-4 py-2 align-top" rowspan="2">
@if (in_array($commission->status, ['pending', 'approved']))
<input type="checkbox"
@@ -114,7 +95,6 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
@endif
</td>
{{-- 테넌트: 업체명 + [구분][입금구분][개발상태] 뱃지 --}}
<td class="px-4 py-2">
<div class="text-sm font-medium text-gray-900">
{{ $commission->management?->tenant?->company_name ?? $commission->management?->tenantProspect?->company_name ?? '-' }}
@@ -128,7 +108,6 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
</div>
</td>
{{-- 입금: 금액(볼드) + 날짜(작은글씨) --}}
<td class="px-4 py-2">
@if ($displayPayment > 0)
<div class="text-sm font-bold text-gray-900">{{ number_format($displayPayment) }}</div>
@@ -138,7 +117,6 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
<div class="text-xs text-gray-500">{{ $commission->payment_date->format('Y-m-d') }}</div>
</td>
{{-- 영업파트너: 이름(비율%) + 수당금액 --}}
<td class="px-4 py-2">
<div class="text-sm text-gray-900">{{ $partnerName }} <span class="text-gray-400">({{ $pRate }}%)</span></div>
<div class="text-sm font-medium text-emerald-600">
@@ -150,19 +128,6 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
</div>
</td>
{{-- 매니저: 이름(구독1월) + 수당금액 --}}
<td class="px-4 py-2">
<div class="text-sm text-gray-900">{{ $commission->manager?->name ?? $commission->management?->manager?->name ?? '-' }} <span class="text-gray-400">(구독1월)</span></div>
<div class="text-sm font-medium text-blue-600">
@if ($displayManagerComm > 0)
{{ number_format($displayManagerComm) }}
@else
<span class="text-gray-400">-</span>
@endif
</div>
</td>
{{-- 유치파트너: 이름(비율%) + 수당금액 --}}
<td class="px-4 py-2">
@if ($referrerName)
<div class="text-sm text-gray-900">{{ $referrerName }} <span class="text-gray-400">({{ $rRate }}%)</span></div>
@@ -178,14 +143,12 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
@endif
</td>
{{-- 상태 --}}
<td class="px-4 py-2 text-center">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium {{ $statusColors[$commission->status] ?? 'bg-gray-100 text-gray-800' }}">
{{ $commission->status_label }}
</span>
</td>
{{-- 액션 (rowspan=2) --}}
<td class="px-4 py-2 text-center align-top" rowspan="2">
<div class="flex items-center justify-center gap-1">
<button type="button"
@@ -230,14 +193,12 @@ class="p-1 text-green-400 hover:text-green-600"
{{-- Row 2: 지급 정보 --}}
<tr class="bg-gray-50/50 border-b border-gray-200">
<td colspan="5" class="px-4 py-2">
<td colspan="4" class="px-4 py-2">
<div class="flex items-center gap-6 text-xs">
{{-- 지급예정일 --}}
<div class="flex items-center gap-1.5">
<span class="text-gray-500 whitespace-nowrap">지급예정일:</span>
<span class="text-gray-700">{{ $commission->scheduled_payment_date->format('Y-m-d') }}</span>
</div>
{{-- 수당지급일 --}}
<div class="flex items-center gap-1.5">
<span class="text-gray-500 whitespace-nowrap">수당지급일:</span>
<input type="date"
@@ -245,19 +206,6 @@ class="h-6 text-xs px-1 border border-gray-300 rounded cursor-pointer hover:bord
value="{{ $paidValue }}"
onchange="saveSettlementDate({{ $commission->id }}, '{{ $paidField }}', this.value)">
</div>
{{-- 매니저지급일 --}}
<div class="flex items-center gap-1.5">
<span class="text-gray-500 whitespace-nowrap">매니저지급일:</span>
@if($isGroup)
<span class="text-gray-400">-</span>
@else
<input type="date"
class="h-6 text-xs px-1 border border-gray-300 rounded cursor-pointer hover:border-purple-400 focus:outline-none focus:border-purple-500 {{ $commission->manager_paid_at ? 'text-purple-600 font-medium bg-purple-50 border-purple-400' : 'text-gray-500 bg-gray-50' }}"
value="{{ $commission->manager_paid_at?->format('Y-m-d') }}"
onchange="saveSettlementDate({{ $commission->id }}, 'manager_paid_at', this.value)">
@endif
</div>
{{-- 협업지원금 --}}
<div class="flex items-center gap-1.5">
<span class="text-gray-500 whitespace-nowrap">협업지원금:</span>
@if(!$isGroup)
@@ -277,7 +225,7 @@ class="w-20 h-6 text-xs px-1 border border-gray-300 rounded cursor-pointer hover
</tr>
@empty
<tr>
<td colspan="8" class="px-4 py-8 text-center text-gray-500">
<td colspan="7" class="px-4 py-8 text-center text-gray-500">
등록된 정산 내역이 없습니다.
</td>
</tr>