- @capacitor/local-notifications 추가, src/native/reminders.js - 매일 설정 시각(기본 21시) 가계부 미기록 시 알림(오늘 기록하면 오늘자 제외, 7일 롤링) - 구독 해지 상태 만료 3일 전 알림 - 설정에 알림 받기 토글 + 시간 선택(앱에서만), 권한 요청 - 앱 시작/홈/내역에서 스케줄 보정 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { RouterLink, useRouter } from 'vue-router'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { useUiStore } from '@/stores/ui'
|
||||
import { accountApi } from '@/api/accountApi'
|
||||
import { reminders } from '@/native/reminders'
|
||||
import { ID_LOGIN_ENABLED } from '@/config/features'
|
||||
import { enterDemo } from '@/demo'
|
||||
|
||||
@@ -125,6 +126,12 @@ async function load() {
|
||||
budgetTotal.value = (status || []).reduce((s, x) => s + (x.monthlyBudget || 0), 0)
|
||||
spentTotal.value = (status || []).reduce((s, x) => s + (x.spent || 0), 0)
|
||||
entries.value = list || []
|
||||
// 오늘 기록 여부로 가계부 리마인더 보정(오늘 기록 있으면 오늘자 알림 제외)
|
||||
if (reminders.isNative()) {
|
||||
const t = new Date()
|
||||
const today = `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, '0')}-${String(t.getDate()).padStart(2, '0')}`
|
||||
reminders.scheduleEntryReminder((list || []).some((e) => e.entryDate === today))
|
||||
}
|
||||
} catch (e) {
|
||||
error.value = e.response?.data?.message || '요약을 불러오지 못했습니다.'
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user