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 }} + +
+
예상 지출 계산 중… ···