From 810a5d9380c1394cefa22a51b70bc101146a5daf Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 6 Jul 2026 23:06:17 +0900 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=EA=B3=B5=ED=86=B5=20ChipSelect=20+?= =?UTF-8?q?=20=EA=B3=84=EC=A2=8C=20=EC=84=A0=ED=83=9D=EC=9D=84=20=EC=B9=A9?= =?UTF-8?q?(2=EC=97=B4)=EC=9C=BC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit select 대체 ChipSelect 컴포넌트(cols 지원) 신설. 계좌 선택 드롭다운을 칩(한 줄 2개)으로 교체: - AccountView 출금·입금·상환대상 계좌 - RecurringView 출금·입금 계좌 계좌 종류 뱃지로 이미 걸러지고 무료 한도(종류별 2개)라 칩 수도 적당. Co-Authored-By: Claude Opus 4.8 --- src/components/ui/ChipSelect.vue | 84 +++++++++++++++++++++++++++++ src/views/account/AccountView.vue | 61 ++++++++++++++------- src/views/account/RecurringView.vue | 35 +++++++----- 3 files changed, 148 insertions(+), 32 deletions(-) create mode 100644 src/components/ui/ChipSelect.vue diff --git a/src/components/ui/ChipSelect.vue b/src/components/ui/ChipSelect.vue new file mode 100644 index 0000000..530219a --- /dev/null +++ b/src/components/ui/ChipSelect.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/views/account/AccountView.vue b/src/views/account/AccountView.vue index fb25143..202561f 100644 --- a/src/views/account/AccountView.vue +++ b/src/views/account/AccountView.vue @@ -7,6 +7,7 @@ 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 { imageToBlob, parseReceiptText } from '@/utils/receiptOcr' import { cardNotif } from '@/native/cardNotif' import { CARD_NOTIF_ENABLED } from '@/config/features' @@ -355,6 +356,20 @@ const TYPES = [ ] const walletsOfKind = computed(() => wallets.value.filter((w) => w.type === form.walletKind)) const toWalletsOfKind = computed(() => wallets.value.filter((w) => w.type === form.toWalletKind)) +// 칩 선택용 옵션(계좌 선택을 select→칩으로) +function walletOpts(list) { + return list.map((w) => ({ value: w.id, label: w.name || w.issuer })) +} +// 출금/결제 계좌: 현금 지출·수입은 '미지정' 선택 허용 +const fromWalletOptions = computed(() => { + const opts = walletOpts(walletsOfKind.value) + if (form.walletKind === 'CASH' && (form.type === 'INCOME' || form.type === 'EXPENSE')) { + opts.unshift({ value: '', label: '현금(미지정)' }) + } + return opts +}) +const toWalletOptions = computed(() => walletOpts(toWalletsOfKind.value)) +const repayTargetOptions = computed(() => walletOpts(liabilityWallets.value)) // 선택한 계좌 종류 라벨(계좌/현금/카드/대출/증권) — 셀렉트 안내문에 사용 const walletKindLabel = computed(() => WALLET_KINDS.find((k) => k.value === form.walletKind)?.label || '계좌') function walletKindOf(id) { @@ -1139,12 +1154,14 @@ onMounted(async () => { {{ k.label }} - +