From ca803272c4ca6742e3e3975949afe8b5687a091f Mon Sep 17 00:00:00 2001 From: ByungCheol Date: Sat, 27 Jun 2026 14:59:09 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=8B=A0=EA=B7=9C=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=EB=8A=94=20'=EC=9E=90=EC=A3=BC=20=EC=93=B0=EB=8A=94=20?= =?UTF-8?q?=EB=82=B4=EC=97=AD=20=EB=B6=88=EB=9F=AC=EC=98=A4=EA=B8=B0',=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EC=9D=80=20'=EC=A0=80=EC=9E=A5'=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B6=84=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 신규 추가 폼: 자주 쓰는 내역 선택해 폼 채우기(불러오기) 셀렉트 - '자주 쓰는 내역으로 저장' 버튼은 수정(editId) 시에만 노출 Co-Authored-By: Claude Opus 4.8 --- src/views/account/AccountView.vue | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/views/account/AccountView.vue b/src/views/account/AccountView.vue index d88a5e1..3f3eb94 100644 --- a/src/views/account/AccountView.vue +++ b/src/views/account/AccountView.vue @@ -690,6 +690,25 @@ async function removeQuick(q) { flash(e.response?.data?.message || '삭제에 실패했습니다.') } } +// 신규 추가 시: 자주 쓰는 내역을 폼에 불러오기(채움, 저장은 사용자가) +function applyQuick(q) { + if (!q) return + form.type = q.type + form.category = q.category || '' + form.amount = q.amount + form.memo = q.memo || '' + if (q.walletId) { + form.walletId = q.walletId + form.walletKind = walletKindOf(q.walletId) || form.walletKind + } + syncCategoryMajor() +} +function onQuickPick(e) { + const id = Number(e.target.value) + e.target.value = '' // 다시 선택 가능하게 초기화 + const q = quickEntries.value.find((x) => x.id === id) + if (q) applyQuick(q) +} // 현재 폼 값을 자주 쓰는 내역으로 저장 async function saveAsQuick() { if (form.type !== 'INCOME' && form.type !== 'EXPENSE') return @@ -960,6 +979,16 @@ onMounted(async () => { + + +