fix:홈택스 조회 버튼 스타일 개선 및 loaded 플래그 초기화
This commit is contained in:
@@ -471,6 +471,10 @@ className="flex items-center gap-2 px-3 py-1.5 bg-blue-100 text-blue-700 rounded
|
||||
|
||||
// 현재 탭 데이터 로드 (조회 버튼용)
|
||||
const loadCurrentTabData = () => {
|
||||
// loaded 플래그 초기화 (탭 전환 시에도 새 날짜로 재조회되도록)
|
||||
setSalesData(prev => ({ ...prev, loaded: false }));
|
||||
setPurchaseData(prev => ({ ...prev, loaded: false }));
|
||||
|
||||
if (activeTab === 'sales') {
|
||||
loadSalesData();
|
||||
} else {
|
||||
@@ -830,14 +834,18 @@ className={`px-3 py-2 text-xs border-t border-b border-r border-[#ced4da] transi
|
||||
className={`px-3 py-2 text-xs border border-[#ced4da] transition-colors rounded-r ${selectedPeriod === 'year' ? 'bg-[#0d6efd] text-white border-[#0d6efd]' : 'bg-white hover:bg-[#e9ecef]'}`}
|
||||
>1년</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"
|
||||
className="px-4 py-1.5 text-sm bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 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>}
|
||||
검색
|
||||
{loading ? (
|
||||
<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="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /></svg>
|
||||
)}
|
||||
조회
|
||||
</button>
|
||||
</div>
|
||||
{/* 거래처 행 */}
|
||||
|
||||
Reference in New Issue
Block a user