Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: free busy not updating date #6690

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/mixins/EditorMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@ export default {
this.calendarObjectInstanceStore.changeStartDate({
calendarObjectInstance: this.calendarObjectInstance,
startDate,
onlyTime: false,
changeEndDate: false,
})
},
/**
Expand Down
20 changes: 8 additions & 12 deletions src/store/calendarObjectInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -1529,26 +1529,26 @@
calendarObjectInstance,
startDate,
onlyTime = false,
changeEndDate = true,

Check warning on line 1532 in src/store/calendarObjectInstance.js

View check run for this annotation

Codecov / codecov/patch

src/store/calendarObjectInstance.js#L1532

Added line #L1532 was not covered by tests
}) {
if (onlyTime) {
startDate.setFullYear(calendarObjectInstance.startDate.getFullYear(), calendarObjectInstance.startDate.getMonth(), calendarObjectInstance.startDate.getDate())
}

if (!onlyTime) {
startDate.setHours(calendarObjectInstance.startDate.getHours(), calendarObjectInstance.startDate.getMinutes(), calendarObjectInstance.startDate.getSeconds())
}

const difference = startDate.getTime() - calendarObjectInstance.startDate.getTime()
const endDate = new Date(calendarObjectInstance.endDate.getTime() + difference)

this.changeStartDateMutation({
calendarObjectInstance,
startDate,
})
this.changeEndDateMutation({
calendarObjectInstance,
endDate,
})

if (changeEndDate) {
this.changeEndDateMutation({

Check warning on line 1547 in src/store/calendarObjectInstance.js

View check run for this annotation

Codecov / codecov/patch

src/store/calendarObjectInstance.js#L1547

Added line #L1547 was not covered by tests
calendarObjectInstance,
endDate,
})
}
},

/**
Expand Down Expand Up @@ -1591,10 +1591,6 @@
endDate.setFullYear(calendarObjectInstance.endDate.getFullYear(), calendarObjectInstance.endDate.getMonth(), calendarObjectInstance.endDate.getDate())
}

if (!onlyTime) {
endDate.setHours(calendarObjectInstance.endDate.getHours(), calendarObjectInstance.endDate.getMinutes(), calendarObjectInstance.endDate.getSeconds())
}

this.changeEndDateMutation({
calendarObjectInstance,
endDate,
Expand Down
Loading