-
Notifications
You must be signed in to change notification settings - Fork 46
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
front: fix blank page when train schedule with no arrival date #8140
front: fix blank page when train schedule with no arrival date #8140
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #8140 +/- ##
============================================
+ Coverage 28.12% 28.16% +0.04%
- Complexity 2112 2120 +8
============================================
Files 1296 1300 +4
Lines 158660 158820 +160
Branches 3164 3180 +16
============================================
+ Hits 44621 44730 +109
- Misses 112137 112183 +46
- Partials 1902 1907 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR.
I have some structural remarks on this code (before the PR) and on the fix (the PR itself).
It's important to revamp the logic of this code to make it more robust.
front/src/modules/trainschedule/components/TimetableV2/utils.ts
Outdated
Show resolved
Hide resolved
5f1404b
to
4d4ad31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments were not taken into account.
1d0fb12
to
0912716
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, bug is fixed
0912716
to
ff02097
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay.
Note
The date management requires a code refactoring.
The transformation process is weird, for example the train.startTime
process is as follows 🤯:
- String ISO8601
- Dayjs obj
- String custom
DD/MM/YYYY HH:mm:ss
- Date obj
- Dayjs obj
- String custom
DD/MM HH:mm:ss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I created a enhancement to refacto this later : #8166
Closes #8112