feat(WEB): 회계/설정/카드 관리 페이지 대규모 기능 추가 및 리팩토링
- 일반전표입력, 상품권관리, 세금계산서 발행/조회 신규 페이지 추가 - 바로빌 연동 설정 페이지 추가 - 카드관리/계좌관리 리스트 UniversalListPage 공통 구조로 전환 - 카드거래조회/은행거래조회 리팩토링 (모달 분리, 액션 확장) - 계좌 상세 폼(AccountDetailForm) 신규 구현 - 카드 상세(CardDetail) 신규 구현 + CardNumberInput 적용 - DateRangeSelector, StatCards, IntegratedListTemplateV2 공통 컴포넌트 개선 - 레거시 파일 정리 (CardManagementUnified, cardConfig, _legacy 등) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,13 +9,16 @@ import { ScrollableButtonGroup } from '@/components/atoms/ScrollableButtonGroup'
|
||||
/**
|
||||
* 날짜 범위 프리셋 타입
|
||||
*/
|
||||
export type DatePreset = 'thisYear' | 'twoMonthsAgo' | 'lastMonth' | 'thisMonth' | 'yesterday' | 'today';
|
||||
export type DatePreset = 'thisYear' | 'fiveMonthsAgo' | 'fourMonthsAgo' | 'threeMonthsAgo' | 'twoMonthsAgo' | 'lastMonth' | 'thisMonth' | 'yesterday' | 'today';
|
||||
|
||||
/**
|
||||
* 프리셋 레이블 (한국어)
|
||||
*/
|
||||
const PRESET_LABELS: Record<DatePreset, string> = {
|
||||
thisYear: '당해년도',
|
||||
fiveMonthsAgo: 'D-5월',
|
||||
fourMonthsAgo: 'D-4월',
|
||||
threeMonthsAgo: 'D-3월',
|
||||
twoMonthsAgo: '전전월',
|
||||
lastMonth: '전월',
|
||||
thisMonth: '당월',
|
||||
@@ -39,6 +42,8 @@ interface DateRangeSelectorProps {
|
||||
onEndDateChange: (date: string) => void;
|
||||
/** 표시할 프리셋 목록 (기본: 전체) */
|
||||
presets?: DatePreset[];
|
||||
/** 프리셋 레이블 커스텀 오버라이드 */
|
||||
presetLabels?: Partial<Record<DatePreset, string>>;
|
||||
/** 추가 액션 (엑셀 다운로드, 등록 버튼 등) */
|
||||
extraActions?: ReactNode;
|
||||
/** 프리셋 버튼 숨김 */
|
||||
@@ -78,6 +83,7 @@ export function DateRangeSelector({
|
||||
onStartDateChange,
|
||||
onEndDateChange,
|
||||
presets = DEFAULT_PRESETS,
|
||||
presetLabels: customLabels,
|
||||
extraActions,
|
||||
hidePresets = false,
|
||||
hideDateInputs = false,
|
||||
@@ -120,6 +126,24 @@ export function DateRangeSelector({
|
||||
onStartDateChange(format(today, 'yyyy-MM-dd'));
|
||||
onEndDateChange(format(today, 'yyyy-MM-dd'));
|
||||
break;
|
||||
case 'threeMonthsAgo': {
|
||||
const threeMonthsAgo = subMonths(today, 3);
|
||||
onStartDateChange(format(startOfMonth(threeMonthsAgo), 'yyyy-MM-dd'));
|
||||
onEndDateChange(format(endOfMonth(threeMonthsAgo), 'yyyy-MM-dd'));
|
||||
break;
|
||||
}
|
||||
case 'fourMonthsAgo': {
|
||||
const fourMonthsAgo = subMonths(today, 4);
|
||||
onStartDateChange(format(startOfMonth(fourMonthsAgo), 'yyyy-MM-dd'));
|
||||
onEndDateChange(format(endOfMonth(fourMonthsAgo), 'yyyy-MM-dd'));
|
||||
break;
|
||||
}
|
||||
case 'fiveMonthsAgo': {
|
||||
const fiveMonthsAgo = subMonths(today, 5);
|
||||
onStartDateChange(format(startOfMonth(fiveMonthsAgo), 'yyyy-MM-dd'));
|
||||
onEndDateChange(format(endOfMonth(fiveMonthsAgo), 'yyyy-MM-dd'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}, [onStartDateChange, onEndDateChange]);
|
||||
|
||||
@@ -136,7 +160,7 @@ export function DateRangeSelector({
|
||||
onClick={() => handlePresetClick(preset)}
|
||||
className="shrink-0 text-xs sm:text-sm px-2 sm:px-3"
|
||||
>
|
||||
{PRESET_LABELS[preset]}
|
||||
{customLabels?.[preset] || PRESET_LABELS[preset]}
|
||||
</Button>
|
||||
))}
|
||||
</ScrollableButtonGroup>
|
||||
|
||||
Reference in New Issue
Block a user