refactor:수당 테이블 2행→1행 레이아웃 변경 + 계약일 열 추가
- rowspan 2행 구조를 단일 행으로 변경 - 테넌트 다음에 계약일(contracted_at) 열 추가 - 지급예정일/수당지급일/협업지원금/매니저지급일을 독립 열로 표시 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{-- 매니저 수당 테이블 (2행 레이아웃) --}}
|
||||
{{-- 매니저 수당 테이블 (1행 레이아웃) --}}
|
||||
<div class="bg-white rounded-lg shadow-sm overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full">
|
||||
@@ -8,8 +8,11 @@
|
||||
<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-center 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>
|
||||
<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>
|
||||
@@ -57,17 +60,18 @@
|
||||
];
|
||||
@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">
|
||||
{{-- 체크박스 --}}
|
||||
<td class="px-4 py-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">
|
||||
class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-emerald-500">
|
||||
@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 ?? '-' }}
|
||||
@@ -81,6 +85,12 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{{-- 계약일 --}}
|
||||
<td class="px-4 py-2 text-center">
|
||||
<span class="text-sm text-gray-600">{{ $mgmt?->contracted_at?->format('Y-m-d') ?? '-' }}</span>
|
||||
</td>
|
||||
|
||||
{{-- 입금 --}}
|
||||
<td class="px-4 py-2">
|
||||
@if ($displayPayment > 0)
|
||||
<div class="text-sm font-bold text-gray-900">{{ number_format($displayPayment) }}</div>
|
||||
@@ -90,6 +100,7 @@ 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">{{ $commission->manager?->name ?? $commission->management?->manager?->name ?? '-' }} <span class="text-gray-400">(구독1월)</span></div>
|
||||
<div class="text-sm font-medium text-blue-600">
|
||||
@@ -101,13 +112,32 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{{-- 지급예정일 --}}
|
||||
<td class="px-4 py-2 text-center">
|
||||
<span class="text-sm text-gray-600">{{ $commission->scheduled_payment_date->format('Y-m-d') }}</span>
|
||||
</td>
|
||||
|
||||
{{-- 매니저지급일 --}}
|
||||
<td class="px-4 py-2 text-center">
|
||||
@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
|
||||
</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">
|
||||
{{-- 액션 --}}
|
||||
<td class="px-4 py-2 text-center">
|
||||
<div class="flex items-center justify-center gap-1">
|
||||
<button type="button"
|
||||
onclick="openDetailModal({{ $commission->id }})"
|
||||
@@ -148,33 +178,9 @@ class="p-1 text-green-400 hover:text-green-600"
|
||||
</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 colspan="9" class="px-4 py-8 text-center text-gray-500">
|
||||
등록된 정산 내역이 없습니다.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{-- 영업파트너 수당 테이블 (2행 레이아웃) --}}
|
||||
{{-- 영업파트너 수당 테이블 (1행 레이아웃) --}}
|
||||
<div class="bg-white rounded-lg shadow-sm overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full">
|
||||
@@ -8,9 +8,13 @@
|
||||
<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-center 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>
|
||||
<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>
|
||||
<th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase tracking-wider">액션</th>
|
||||
</tr>
|
||||
@@ -84,17 +88,18 @@
|
||||
];
|
||||
@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">
|
||||
{{-- 체크박스 --}}
|
||||
<td class="px-4 py-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">
|
||||
class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-emerald-500">
|
||||
@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 ?? '-' }}
|
||||
@@ -108,6 +113,12 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{{-- 계약일 --}}
|
||||
<td class="px-4 py-2 text-center">
|
||||
<span class="text-sm text-gray-600">{{ $mgmt?->contracted_at?->format('Y-m-d') ?? '-' }}</span>
|
||||
</td>
|
||||
|
||||
{{-- 입금 --}}
|
||||
<td class="px-4 py-2">
|
||||
@if ($displayPayment > 0)
|
||||
<div class="text-sm font-bold text-gray-900">{{ number_format($displayPayment) }}</div>
|
||||
@@ -117,6 +128,7 @@ 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">
|
||||
@@ -128,6 +140,7 @@ class="commission-checkbox rounded border-gray-300 text-emerald-600 focus:ring-e
|
||||
</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>
|
||||
@@ -143,13 +156,42 @@ 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="text-sm text-gray-600">{{ $commission->scheduled_payment_date->format('Y-m-d') }}</span>
|
||||
</td>
|
||||
|
||||
{{-- 수당지급일 --}}
|
||||
<td class="px-4 py-2 text-center">
|
||||
<input type="date"
|
||||
class="h-6 text-xs px-1 border border-gray-300 rounded cursor-pointer hover:border-blue-400 focus:outline-none focus:border-blue-500 {{ $paidValue ? 'text-blue-600 font-medium bg-blue-50 border-blue-400' : 'text-gray-500 bg-gray-50' }}"
|
||||
value="{{ $paidValue }}"
|
||||
onchange="saveSettlementDate({{ $commission->id }}, '{{ $paidField }}', this.value)">
|
||||
</td>
|
||||
|
||||
{{-- 협업지원금 --}}
|
||||
<td class="px-4 py-2 text-center">
|
||||
@if(!$isGroup)
|
||||
<input type="number"
|
||||
class="w-20 h-6 text-xs px-1 border border-gray-300 rounded cursor-pointer hover:border-orange-400 focus:outline-none focus:border-orange-500 {{ ($commission->referrer_commission ?? 0) > 0 ? 'text-orange-600 font-medium bg-orange-50 border-orange-400' : 'text-gray-500 bg-gray-50' }}"
|
||||
value="{{ ($commission->referrer_commission ?? 0) > 0 ? intval($commission->referrer_commission) : '' }}"
|
||||
placeholder="0"
|
||||
min="0"
|
||||
onchange="saveSettlementDate({{ $commission->id }}, 'referrer_commission', this.value)">
|
||||
@else
|
||||
<span class="text-gray-400">-</span>
|
||||
@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>
|
||||
|
||||
<td class="px-4 py-2 text-center align-top" rowspan="2">
|
||||
{{-- 액션 --}}
|
||||
<td class="px-4 py-2 text-center">
|
||||
<div class="flex items-center justify-center gap-1">
|
||||
<button type="button"
|
||||
onclick="openDetailModal({{ $commission->id }})"
|
||||
@@ -190,42 +232,9 @@ class="p-1 text-green-400 hover:text-green-600"
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- Row 2: 지급 정보 --}}
|
||||
<tr class="bg-gray-50/50 border-b border-gray-200">
|
||||
<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"
|
||||
class="h-6 text-xs px-1 border border-gray-300 rounded cursor-pointer hover:border-blue-400 focus:outline-none focus:border-blue-500 {{ $paidValue ? 'text-blue-600 font-medium bg-blue-50 border-blue-400' : 'text-gray-500 bg-gray-50' }}"
|
||||
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)
|
||||
<input type="number"
|
||||
class="w-20 h-6 text-xs px-1 border border-gray-300 rounded cursor-pointer hover:border-orange-400 focus:outline-none focus:border-orange-500 {{ ($commission->referrer_commission ?? 0) > 0 ? 'text-orange-600 font-medium bg-orange-50 border-orange-400' : 'text-gray-500 bg-gray-50' }}"
|
||||
value="{{ ($commission->referrer_commission ?? 0) > 0 ? intval($commission->referrer_commission) : '' }}"
|
||||
placeholder="0"
|
||||
min="0"
|
||||
onchange="saveSettlementDate({{ $commission->id }}, 'referrer_commission', this.value)">
|
||||
@else
|
||||
<span class="text-gray-400">-</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>{{-- 상태 빈칸 --}}
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-8 text-center text-gray-500">
|
||||
<td colspan="11" class="px-4 py-8 text-center text-gray-500">
|
||||
등록된 정산 내역이 없습니다.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user