AnalogIO / coffeecard_app

Cross-platform coffee card app for Cafe Analog
https://www.cafeanalog.dk/app
MIT License
6 stars 1 forks source link

refactor: opening hours #541

Closed fremartini closed 7 months ago

fremartini commented 7 months ago

Fix opening hours to match the cafe

Uses the flutter-native TimeOfDay class, which has localized time formatting. This has been extended with comparison methods <= and isInTimeslot. Timeslot class simplifies with this change.

Simplify DateService to only contain one getter.

Make sure of fpdart's Option instead of null values. Use None for closed days.

Clean up tests, add more tests, and use NiceMocks for mocking.

ghost commented 7 months ago
👇 Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/AnalogIO/coffeecard_app/541/cfc6d658/539a8eafdba8662ff7a172fe89406e6ba22845ac.svg)](https://app.codesee.io/r/reviews?pr=541&src=https%3A%2F%2Fgithub.com%2FAnalogIO%2Fcoffeecard_app) #### Legend CodeSee Map legend
codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main-prerelease@57e5565). Click here to learn what that means.

:exclamation: Current head 4b47b7b differs from pull request most recent head 539a8ea. Consider uploading reports for the commit 539a8ea to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main-prerelease #541 +/- ## ================================================== Coverage ? 72.56% ================================================== Files ? 130 Lines ? 1578 Branches ? 0 ================================================== Hits ? 1145 Misses ? 433 Partials ? 0 ``` | [Flag](https://app.codecov.io/gh/AnalogIO/coffeecard_app/pull/541/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AnalogIO) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/AnalogIO/coffeecard_app/pull/541/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AnalogIO) | `72.56% <0.00%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AnalogIO#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

marfavi commented 7 months ago

Awaiting dev build to publish so we can smoke test. Otherwise looks OK