Merge pull request #70 from AlexisNP/bugfix/events-date

Bugfix/events date
This commit is contained in:
AlexisNP
2025-03-11 13:41:35 +01:00
committed by GitHub
5 changed files with 7 additions and 6 deletions

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
20.12.0

View File

@@ -23,13 +23,13 @@ const isPopoverDetailsOpen = ref<boolean>(false)
function handleDoubleClick() {
isPopoverDetailsOpen.value = false
lastActiveEvent.value = { ...props.event }
lastActiveEvent.value = structuredClone(toRaw(props.event))
revealEditEventModal()
}
function handleDelete() {
isPopoverDetailsOpen.value = false
lastActiveEvent.value = { ...props.event }
lastActiveEvent.value = structuredClone(toRaw(props.event))
revealDeleteEventModal()
}

View File

@@ -43,7 +43,7 @@ function handleJumpToDate(date: RPGDate) {
const commandMenuOpened = ref(false)
function deployEditModal() {
lastActiveEvent.value = { ...props.event }
lastActiveEvent.value = structuredClone(toRaw(props.event))
revealEditEventModal()
commandMenuOpened.value = false
emit("query:close-popover")
@@ -53,7 +53,7 @@ function deployEditModal() {
* Confirm event deletion
*/
function deployDeleteModal() {
lastActiveEvent.value = { ...props.event }
lastActiveEvent.value = structuredClone(toRaw(props.event))
revealDeleteEventModal()
commandMenuOpened.value = false
emit("query:close-popover")

View File

@@ -6,7 +6,7 @@ const isLoading = ref<boolean>(false)
// Watch the popover state
watch(isDeleteEventModalOpen, (hasOpened, _o) => {
if (hasOpened && lastActiveEvent.value) {
eventSkeleton.value = { ...lastActiveEvent.value }
eventSkeleton.value = structuredClone(toRaw(lastActiveEvent.value))
}
})

View File

@@ -5,7 +5,7 @@ const { resetSkeleton } = useCalendar();
// Watch the popover state
watch(isEditEventModalOpen, (hasOpened, _o) => {
if (hasOpened && lastActiveEvent.value) {
eventSkeleton.value = { ...lastActiveEvent.value }
eventSkeleton.value = structuredClone(toRaw(lastActiveEvent.value))
}
})