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 schedule event previews #441

Merged
merged 2 commits into from
May 31, 2024
Merged

Conversation

devmount
Copy link
Collaborator

@devmount devmount commented May 31, 2024

Description of the Change

This change does two things:

  • Extending the preview slots out of the currently shown month for days displayed from the previous/next month
  • Keeping calendar events when creating/saving/toggling availability

image

Benefits

More convenient display of elements in the calendar on availability configuration.

Applicable Issues

Closes #350

@devmount devmount requested a review from MelissaAutumn May 31, 2024 14:17
@devmount devmount self-assigned this May 31, 2024
@@ -87,7 +87,6 @@ const schedules = ref([]);
const firstSchedule = computed(() => (schedules.value?.length > 0 ? schedules.value[0] : null));
const schedulesReady = ref(false);
const getFirstSchedule = async () => {
calendarEvents.value = [];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find any reason to keep this here. This was the cause for calendar events to disappear on schedule save.

@@ -107,6 +106,8 @@ const onDateChange = (dateObj) => {
const start = dj(dateObj.start);
const end = dj(dateObj.end);

activeDate.value = start.add(end.diff(start, 'minutes')/2, 'minutes');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're now updating the selected date on navigation too, to keep the event generation in sync with the view

Copy link
Member

@MelissaAutumn MelissaAutumn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, tested and it works great!

@devmount devmount merged commit e30cef6 into main May 31, 2024
4 checks passed
@devmount devmount deleted the bugs/350-schedule-events-preview branch May 31, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

General Availability toggle hides calendar information and doesn't restore it
2 participants