feat:영업관리 대시보드 탭 내 새로고침 버튼 추가
- 내 활동/유치 파트너 현황 탭에 개별 새로고침 버튼 추가 - HTMX로 탭 콘텐츠만 새로고침 (페이지 전체 리로드 없음) - 로딩 중 스피너 애니메이션 표시 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,20 @@
|
||||
.htmx-request.htmx-indicator {
|
||||
display: inline-flex;
|
||||
}
|
||||
/* 새로고침 버튼 아이콘 상태 */
|
||||
.refresh-btn [data-refresh-spin] {
|
||||
display: none;
|
||||
}
|
||||
.refresh-btn [data-refresh-icon] {
|
||||
display: inline-block;
|
||||
}
|
||||
/* 로딩 중: 스피너 표시, 아이콘 숨김 */
|
||||
.refresh-btn.htmx-request [data-refresh-spin] {
|
||||
display: inline-block;
|
||||
}
|
||||
.refresh-btn.htmx-request [data-refresh-icon] {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@@ -52,32 +66,67 @@ class="inline-flex items-center justify-center w-8 h-8 rounded-full bg-blue-100
|
||||
|
||||
<!-- 탭 네비게이션 -->
|
||||
<div class="border-b border-gray-200">
|
||||
<nav class="flex gap-4" aria-label="Tabs">
|
||||
<nav class="flex items-center justify-between" aria-label="Tabs">
|
||||
<div class="flex gap-4">
|
||||
<button type="button"
|
||||
@click="activeTab = 'my-activity'"
|
||||
:class="activeTab === 'my-activity'
|
||||
? 'border-blue-500 text-blue-600'
|
||||
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
|
||||
class="whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm transition-colors flex items-center gap-2">
|
||||
<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 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
|
||||
</svg>
|
||||
내 활동
|
||||
</button>
|
||||
<button type="button"
|
||||
@click="activeTab = 'partner-activity'"
|
||||
hx-get="{{ route('sales.salesmanagement.dashboard.partner-activity') }}"
|
||||
hx-target="#partner-activity-content"
|
||||
hx-trigger="click once"
|
||||
hx-swap="innerHTML"
|
||||
:class="activeTab === 'partner-activity'
|
||||
? 'border-blue-500 text-blue-600'
|
||||
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
|
||||
class="whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm transition-colors flex items-center gap-2">
|
||||
<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="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
|
||||
</svg>
|
||||
유치 파트너 현황
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 새로고침 버튼 -->
|
||||
<button type="button"
|
||||
@click="activeTab = 'my-activity'"
|
||||
:class="activeTab === 'my-activity'
|
||||
? 'border-blue-500 text-blue-600'
|
||||
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
|
||||
class="whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm transition-colors flex items-center gap-2">
|
||||
<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 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
|
||||
x-show="activeTab === 'my-activity'"
|
||||
hx-get="{{ route('sales.salesmanagement.dashboard.refresh') }}"
|
||||
hx-target="#dashboard-data"
|
||||
hx-swap="innerHTML"
|
||||
class="refresh-btn inline-flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="새로고침">
|
||||
<svg data-refresh-spin class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
내 활동
|
||||
<svg data-refresh-icon class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
<span class="hidden sm:inline">새로고침</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
@click="activeTab = 'partner-activity'"
|
||||
x-show="activeTab === 'partner-activity'"
|
||||
x-cloak
|
||||
hx-get="{{ route('sales.salesmanagement.dashboard.partner-activity') }}"
|
||||
hx-target="#partner-activity-content"
|
||||
hx-trigger="click once"
|
||||
hx-swap="innerHTML"
|
||||
:class="activeTab === 'partner-activity'
|
||||
? 'border-blue-500 text-blue-600'
|
||||
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
|
||||
class="whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm transition-colors flex items-center gap-2">
|
||||
<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="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
|
||||
class="refresh-btn inline-flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="새로고침">
|
||||
<svg data-refresh-spin class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
유치 파트너 현황
|
||||
<svg data-refresh-icon class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
<span class="hidden sm:inline">새로고침</span>
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user