diff --git a/src/views/account/AccountView.vue b/src/views/account/AccountView.vue index 6641711..055a1e3 100644 --- a/src/views/account/AccountView.vue +++ b/src/views/account/AccountView.vue @@ -7,7 +7,8 @@ import { useDialog } from '@/composables/dialog' import { appLock } from '@/composables/appLock' import IconBtn from '@/components/ui/IconBtn.vue' import CategoryPicker from '@/components/ui/CategoryPicker.vue' -import ChipSelect from '@/components/ui/ChipSelect.vue' +import SheetSelect from '@/components/ui/SheetSelect.vue' +import BottomSheet from '@/components/ui/BottomSheet.vue' import { imageToBlob, parseReceiptText } from '@/utils/receiptOcr' import { cardNotif } from '@/native/cardNotif' import { CARD_NOTIF_ENABLED } from '@/config/features' @@ -87,6 +88,9 @@ function resetFilters() { const formOpen = ref(false) const editId = ref(null) const form = reactive({ entryDate: '', type: 'EXPENSE', category: '', amount: null, memo: '', walletKind: '', walletId: '', toWalletKind: '', toWalletId: '', principal: null, interest: null, annualFee: null, installmentMonths: '', currency: 'KRW', foreignAmount: null, rate: null }) +// 분류 선택 바텀시트 — 최종 분류가 정해지면 자동 닫힘 +const catSheet = ref(false) +watch(() => form.category, (v) => { if (v) catSheet.value = false }) // ===== 외화 결제 ===== const CURRENCIES = ['KRW', 'USD', 'JPY', 'EUR', 'CNY', 'GBP', 'AUD', 'CAD', 'HKD', 'SGD', 'THB', 'VND', 'TWD', 'PHP', 'MYR'] @@ -441,6 +445,26 @@ function onTypeChange() { } } +// 검색·필터 바텀시트 옵션(맨 앞 '전체'로 해제 가능) +const filterTypeOptions = [ + { value: '', label: '구분 전체' }, + { value: 'INCOME', label: '수입' }, + { value: 'EXPENSE', label: '지출' }, + { value: 'TRANSFER', label: '이체' }, +] +const filterCategoryOptions = computed(() => [ + { value: '', label: '분류 전체' }, + ...allCategoryNames.value.map((c) => ({ value: c, label: c })), +]) +const filterWalletOptions = computed(() => [ + { value: '', label: '계좌 전체' }, + ...wallets.value.map((w) => ({ value: w.id, label: w.name })), +]) +const filterTagOptions = computed(() => [ + { value: '', label: '태그 전체' }, + ...tagOptions.value.map((t) => ({ value: t.id, label: t.name })), +]) + // 태그 (태그 관리에 등록된 태그 선택) const tagOptions = ref([]) // [{ id, name }] const selectedTagIds = ref([]) @@ -1021,24 +1045,10 @@ onMounted(async () => { v-model="filters.keyword" type="text" class="f-keyword" placeholder="메모·분류 검색" @keyup.enter="applyFilters" /> - - - - +