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

Ddfform 802 sort openning hours #1247

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Conversation

kasperbirch1
Copy link
Contributor

@kasperbirch1 kasperbirch1 commented May 31, 2024

Link to issue

https://reload.atlassian.net/browse/DDFFORM-802

Description

This pull request implements sorting for opening hours.

Ensure that opening hours are sorted in the correct chronological order based on start_time and end_time when start_time is identical:

Additionally, I identified a redundant date value from groupOpeningHoursByWeekday that was duplicated by the dateTime value.

Test on:

http://varnish.pr-1211.dpl-cms.dplplat01.dpl.reload.dk/test-raekkefolge-af-abningstider

Screenshot of the result

image

This value is not used anywhere and is the same as `dateTime`
LasseStaus
LasseStaus approved these changes Jun 3, 2024
@LasseStaus LasseStaus assigned kasperbirch1 and unassigned LasseStaus Jun 3, 2024
Copy link
Contributor

@LasseStaus LasseStaus left a comment

Choose a reason for hiding this comment

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

Good catch with the date and the sorting.

It is definitely a nice addition with the sorting.

You could consider implementing another sorting, for the end_time if the start_time of two entries are the same.

so in this example :

image

The second "Åbent" would be before "Med betjening" since it ends sooner than "Åbent".

I think that would could be nice also to do if it doesn't take a lot of time. 🚀

Ensure that opening hours are sorted in the correct chronological order based on `start_time` and `end_time` when `start_time` is identical:
- Åbent 06:00 - 22:00
- Åbent 10:00 - 15:00
- Åbent 10:00 - 17:00
- Åbent 12:00 - 13:00
@kasperbirch1 kasperbirch1 force-pushed the DDFFORM-802-sort-openning-hours branch from fad2e73 to 0324e47 Compare June 4, 2024 09:26
@kasperbirch1 kasperbirch1 requested a review from LasseStaus June 4, 2024 09:28
kasperbirch1 added a commit to danskernesdigitalebibliotek/dpl-cms that referenced this pull request Jun 4, 2024
Copy link
Contributor

@LasseStaus LasseStaus left a comment

Choose a reason for hiding this comment

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

Very nice, and 👍 for the comments 🚀

@LasseStaus LasseStaus assigned kasperbirch1 and unassigned LasseStaus Jun 5, 2024
@kasperbirch1 kasperbirch1 removed their assignment Jun 10, 2024
@kasperbirch1 kasperbirch1 merged commit 0a520d0 into develop Jun 14, 2024
20 checks passed
@kasperbirch1 kasperbirch1 deleted the DDFFORM-802-sort-openning-hours branch June 14, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants