v0.1.44 - 날짜 기준과 TODO 정리

This commit is contained in:
2026-04-24 10:10:34 +09:00
parent a38714dfe4
commit 684413a098
9 changed files with 33 additions and 38 deletions

View File

@@ -29,7 +29,6 @@ import { deletePlannerEntry, fetchPlannerEntries, savePlannerEntry } from './lib
import {
createInitialPlannerRecords,
persistPlannerState,
readPlannerStorageState,
restorePlannerUiState,
} from './lib/plannerStorage'
@@ -1965,16 +1964,8 @@ function replacePlannerRecords(nextRecords) {
function restoreLocalPlannerRecords() {
replacePlannerRecords(createInitialPlannerRecords(plannerSeed, normalizeRecord))
const savedState = readPlannerStorageState()
if (savedState.selectedDate) {
selectedDate.value = toDateValue(savedState.selectedDate, selectedDate.value)
}
if (savedState.calendarViewDate) {
calendarViewDate.value = toDateValue(savedState.calendarViewDate, selectedDate.value)
}
selectedDate.value = new Date()
calendarViewDate.value = new Date(selectedDate.value)
}
function findRecordKey(record) {

View File

@@ -40,16 +40,8 @@ export function restorePlannerUiState({
toDateValue,
}) {
const savedState = readStorageState()
if (savedState.selectedDate) {
selectedDate.value = toDateValue(savedState.selectedDate, selectedDate.value)
}
if (savedState.calendarViewDate) {
calendarViewDate.value = toDateValue(savedState.calendarViewDate, selectedDate.value)
} else {
calendarViewDate.value = new Date(selectedDate.value)
}
selectedDate.value = toDateValue(new Date(), selectedDate.value)
calendarViewDate.value = new Date(selectedDate.value)
if (savedState.statsRangeStart) {
statsRangeStart.value = savedState.statsRangeStart
@@ -75,12 +67,13 @@ export function persistPlannerState({
const previousState = readStorageState()
const nextState = {
...previousState,
selectedDate: selectedDate.toISOString(),
calendarViewDate: calendarViewDate.toISOString(),
statsRangeStart,
statsRangeEnd,
}
delete nextState.selectedDate
delete nextState.calendarViewDate
if (includeRecords) {
nextState.records = Object.fromEntries(
Object.entries(plannerRecords).map(([key, record]) => [