fix:저장 버튼을 바로빌 API 옆에 주황색으로 배치
- 데이터 행의 바로빌 API (실시간) 옆에 저장 버튼 추가 - 주황색(#fd7e14)으로 눈에 띄게 표시 - 저장 아이콘으로 변경 - "마지막 동기화" → "마지막 저장"으로 텍스트 변경 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -770,32 +770,15 @@ className="px-3 py-2 text-sm border border-[#ced4da] rounded bg-white focus:bord
|
||||
<button onClick={() => handleHalf(2)} className="px-3 py-2 text-xs border-t border-b border-r border-[#ced4da] bg-white hover:bg-[#e9ecef] transition-colors">2기</button>
|
||||
<button onClick={handleYear} className="px-3 py-2 text-xs border border-[#ced4da] bg-white hover:bg-[#e9ecef] transition-colors rounded-r">1년</button>
|
||||
</div>
|
||||
{/* 동기화 + 검색 버튼 */}
|
||||
<div className="ml-auto flex items-center gap-2">
|
||||
<button
|
||||
onClick={handleSync}
|
||||
disabled={syncing}
|
||||
className="px-4 py-2 text-sm bg-[#198754] text-white rounded hover:bg-[#157347] transition-colors font-medium disabled:opacity-50 flex items-center gap-2"
|
||||
title="바로빌에서 데이터를 가져와 로컬 DB에 저장"
|
||||
>
|
||||
{syncing ? (
|
||||
<div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white"></div>
|
||||
) : (
|
||||
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="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>
|
||||
)}
|
||||
동기화
|
||||
</button>
|
||||
<button
|
||||
onClick={loadCurrentTabData}
|
||||
disabled={loading}
|
||||
className="px-5 py-2 text-sm bg-[#0d6efd] text-white rounded hover:bg-[#0b5ed7] transition-colors font-medium disabled:opacity-50 flex items-center gap-2"
|
||||
>
|
||||
{loading && <div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white"></div>}
|
||||
검색
|
||||
</button>
|
||||
</div>
|
||||
{/* 검색 버튼 */}
|
||||
<button
|
||||
onClick={loadCurrentTabData}
|
||||
disabled={loading}
|
||||
className="ml-auto px-5 py-2 text-sm bg-[#0d6efd] text-white rounded hover:bg-[#0b5ed7] transition-colors font-medium disabled:opacity-50 flex items-center gap-2"
|
||||
>
|
||||
{loading && <div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white"></div>}
|
||||
검색
|
||||
</button>
|
||||
</div>
|
||||
{/* 거래처 행 */}
|
||||
<div className="flex flex-wrap items-center gap-3 px-5 py-4 border-b border-[#dee2e6]">
|
||||
@@ -837,10 +820,26 @@ className="w-4 h-4 text-[#0d6efd]"
|
||||
<span className="text-sm text-[#495057]">바로빌 API</span>
|
||||
<span className="text-xs text-[#6c757d]">(실시간)</span>
|
||||
</label>
|
||||
{/* 저장 버튼 - 주황색으로 눈에 띄게 */}
|
||||
<button
|
||||
onClick={handleSync}
|
||||
disabled={syncing}
|
||||
className="px-4 py-1.5 text-sm bg-[#fd7e14] text-white rounded hover:bg-[#e96b0c] transition-colors font-medium disabled:opacity-50 flex items-center gap-2 shadow-sm"
|
||||
title="바로빌에서 데이터를 가져와 로컬 DB에 저장합니다"
|
||||
>
|
||||
{syncing ? (
|
||||
<div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white"></div>
|
||||
) : (
|
||||
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4" />
|
||||
</svg>
|
||||
)}
|
||||
저장
|
||||
</button>
|
||||
</div>
|
||||
{lastSyncAt[activeTab] && (
|
||||
<span className="ml-auto text-xs text-[#6c757d]">
|
||||
마지막 동기화: {lastSyncAt[activeTab]}
|
||||
마지막 저장: {lastSyncAt[activeTab]}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user