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

[16.0][FIX] web_calendar_slot_duration: fixing behavior on slot duration #2818

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

imlopes
Copy link

@imlopes imlopes commented May 10, 2024

Convert all to float :
if we use a context like {'calendar_slot_duration': '01:30:00'} we will have on the backend a duration of 10 hour and 30 minutes instead of 1 hour and 30 minutes

image

And using a slot_duration > 1 hour, the calendar view will be adapted to the slot duration but has not a good presentation.
So I'm adding a possibility to adapt or not the calendar view using adapt_view_to_slot_duration on the context too.

@OCA-git-bot
Copy link
Contributor

Hi @yajo,
some modules you are maintaining are being modified, check this out!

@yajo yajo changed the title [16.0][FIX] fixing behavior on slot duration [16.0][FIX] web_calendar_slot_duration: fixing behavior on slot duration May 13, 2024
Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

The float fix is obvious, but the other one isn't.

Comment on lines 15 to 16
this.env.searchModel.context.calendar_slot_duration &&
this.env.searchModel.context.adapt_view_to_slot_duration
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this fix. Could you post some screenshots explaining the problem you're fixing here please? Also, don't you think it would make sense to default to true for adapt_view_to_slot_duration?

Copy link
Author

Choose a reason for hiding this comment

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

Hello @yajo
The adapt_view_to_slot_duration is to solve the way to display the calendar view.
If you check on my screen shot on description, If I put a slot_duration like 30m, on the calendar the view will be adapted to display slots 30min by 30min and IMO it's not very "beautiful".

And yes, I'm agreed with you about the default to true to not change the standard behavior .

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.

None yet

3 participants