v0.1.44 - 날짜 기준과 TODO 정리
This commit is contained in:
@@ -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]) => [
|
||||
|
||||
Reference in New Issue
Block a user