From d5b4c4616350c940e32ca067a1d4c86ef398fb8e Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 6 Jul 2026 02:17:38 +0900 Subject: [PATCH] =?UTF-8?q?feat(stats):=20=EC=98=88=EC=83=81=20=EC=A7=80?= =?UTF-8?q?=EC=B6=9C=2010=EC=9D=BC=EB=B6=80=ED=84=B0=20=EB=85=B8=EC=B6=9C?= =?UTF-8?q?=20=E2=80=94=20=EC=B4=88=EB=B0=98=20=ED=91=9C=EB=B3=B8=EB=B6=80?= =?UTF-8?q?=EC=A1=B1=20=ED=8A=90=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 경과일 < 10 이면 값 대신 '10일부터 표시돼요' 안내. 초반 소표본+일회성으로 과대 추정되던 문제 완화. Co-Authored-By: Claude Opus 4.8 --- src/views/account/AccountDashboardView.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/views/account/AccountDashboardView.vue b/src/views/account/AccountDashboardView.vue index 00bf10c..4768cd2 100644 --- a/src/views/account/AccountDashboardView.vue +++ b/src/views/account/AccountDashboardView.vue @@ -28,6 +28,8 @@ const aiBullets = ref([]) // AI 재무 코멘트(현황 관찰) const aiTips = ref([]) // AI 절약 가이드(실행 제안) const forecast = ref(null) // 월말 예상 지출(결정적 계산, 일회성 큰 지출 제외) const forecastNote = ref('') // 예상 지출 근거 문장 +const forecastHint = ref('') // 초반(표본 부족)엔 값 대신 안내 +const FORECAST_MIN_DAYS = 10 // 이 날짜(경과일)부터 예상 지출 노출(초반 표본 부족·튐 방지) const forecastLoading = ref(false) const aiLoading = ref(false) @@ -97,11 +99,17 @@ function robustDailyRate(days) { async function loadForecast() { forecast.value = null forecastNote.value = '' + forecastHint.value = '' const isCurrent = year.value === now.getFullYear() && month.value === now.getMonth() + 1 if (!isCurrent) return // 과거/미래 달은 추정 불필요 const totalDays = daysInMonth(year.value, month.value) const elapsed = now.getDate() if (elapsed < 1) return + // 초반엔 표본이 적어 추정이 크게 튀므로 일정 경과일 전에는 값 대신 안내만 표시 + if (elapsed < FORECAST_MIN_DAYS) { + forecastHint.value = `${FORECAST_MIN_DAYS}일부터 표시돼요` + return + } forecastLoading.value = true try { const daily = await accountApi.budgetPeriod({ unit: 'DAY', year: year.value, month: month.value }) @@ -468,7 +476,11 @@ onMounted(async () => { {{ expenseDelta.diff >= 0 ? '+' : '' }}{{ won(expenseDelta.diff) }} -
+
+ 예상 지출 {{ forecastHint }} + +
+
예상 지출 계산 중… ···