fix: 자주 쓰는 내역 저장 안내를 수정 모달 안에 표시
CI / build (push) Failing after 14m9s

- 페이지 상단 flash → 모달 내 formInfo(성공 메시지)로 변경(모달에 가려 안 보이던 문제)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-27 15:08:59 +09:00
parent ca803272c4
commit eeea19e20b
+13 -1
View File
@@ -95,6 +95,7 @@ const installmentMonthly = computed(() => {
const liabilityWallets = computed(() => wallets.value.filter((w) => w.type === 'LOAN' || w.type === 'CARD'))
const submitting = ref(false)
const formError = ref(null)
const formInfo = ref('') // 모달 내 안내(예: 자주 쓰는 내역 저장됨)
// 영수증 OCR (온디바이스)
const receiptInput = ref(null)
@@ -444,6 +445,7 @@ function openCreate() {
syncCategoryMajor()
cancelAddCategory()
formError.value = null
formInfo.value = ''
formOpen.value = true
tryClipboardOnOpen() // 문자/푸시 클립보드 자동 감지(있으면 배너)
}
@@ -477,6 +479,7 @@ function openEdit(e) {
pasteDetected.value = null
pasteOpen.value = false
formError.value = null
formInfo.value = ''
formOpen.value = true
}
@@ -713,6 +716,7 @@ function onQuickPick(e) {
async function saveAsQuick() {
if (form.type !== 'INCOME' && form.type !== 'EXPENSE') return
const amount = Number(form.amount)
formInfo.value = ''
if (!amount || amount <= 0) {
formError.value = '금액을 올바르게 입력하세요.'
return
@@ -727,7 +731,8 @@ async function saveAsQuick() {
walletId: form.walletId || null,
})
await loadQuick()
flash('자주 쓰는 내역으로 저장했습니다.')
formError.value = null
formInfo.value = '자주 쓰는 내역으로 저장했습니다.'
} catch (e) {
formError.value = e.response?.data?.message || '저장에 실패했습니다.'
}
@@ -1100,6 +1105,7 @@ onMounted(async () => {
</div>
<p v-if="formError" class="msg error">{{ formError }}</p>
<p v-if="formInfo" class="msg ok">{{ formInfo }}</p>
<button
v-if="editId && form.type !== 'REPAYMENT'"
@@ -1478,6 +1484,12 @@ button.primary {
.msg.error {
color: #c0392b;
}
.msg.ok {
margin: 0.5rem 0;
color: hsla(160, 100%, 30%, 1);
font-weight: 600;
font-size: 0.88rem;
}
/* 모달 */
.modal-backdrop {