fix(WEB): 매출관리 MobileFilter 빈 값 crash 수정 및 페이지 안정성 강화

- MobileFilter: 단일선택/다중선택 모두 빈 value 필터링 추가 (crash 근본 원인)
- types.ts: vendorName 빈 문자열 → '(거래처 미지정)' 기본값으로 방어
- SalesDetail: 거래처 Select에 빈 id 필터링 추가
- page.tsx: mode=new 분기를 로딩 전으로 이동 (불필요한 API 호출 방지)
- index.tsx: getSales API 직접 호출, 페이지네이션, 자동 로드 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-14 22:17:38 +09:00
parent e4b25e2648
commit 95c9686597
5 changed files with 82 additions and 23 deletions

View File

@@ -289,7 +289,7 @@ export function MobileFilter({
<SelectItem value="all">
{field.allOptionLabel || '전체'}
</SelectItem>
{field.options.map((option) => (
{field.options.filter(opt => opt.value !== '').map((option) => (
<SelectItem key={option.value} value={option.value}>
{option.label}
</SelectItem>
@@ -299,10 +299,12 @@ export function MobileFilter({
) : (
// 다중선택: MultiSelectCombobox
<MultiSelectCombobox
options={field.options.map((opt) => ({
value: opt.value,
label: opt.label,
}))}
options={field.options
.filter(opt => opt.value !== '')
.map((opt) => ({
value: opt.value,
label: opt.label,
}))}
value={(values[field.key] as string[]) || []}
onChange={(value) => onChange(field.key, value)}
placeholder="전체"