-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: [DHIS2-18310] enable non-Gregorian calendars in views & lists & forms #3900
base: master
Are you sure you want to change the base?
feat: [DHIS2-18310] enable non-Gregorian calendars in views & lists & forms #3900
Conversation
8983fd7
to
0294f8d
Compare
src/core_modules/capture-core/components/FiltersForTypes/Date/DateFilter.component.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/FiltersForTypes/Date/DateFilter.component.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/FiltersForTypes/Date/DateFilter.component.js
Outdated
Show resolved
Hide resolved
Hi @alaa-yahia,
Screen.Recording.2024-12-12.at.16.51.40.movIn the video above I used the Ethiopian calendar. Can you have a look? Thank you! |
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.
A good start, but some things we will have to work a bit more on.
In addition to the individual comments we should convert the "last updated" tooltips from ISO to local calendar (I saw this in both the stages and events Widget and the enrollment Widget). Had a very quick look at the stages and events Widget and for now I think you can use something like moment(fromServerDate(updatedAt)).toISOString()
and put the result into the clientToView converter of type DATETIME (we should probably also use the serverToClient converter, but this will be checked and resolved in separate ticket)
src/core_modules/capture-core/components/FiltersForTypes/Date/DateFilter.component.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/D2Form/field/configs/dateField/getDateFieldConfig.js
Outdated
Show resolved
Hide resolved
…ent date (#3905) feat: typing the date when editing enrollment and incident date
da9bf63
to
013db2c
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.
In addition to other comments:
- We should fix the logic in
getDateRangeValidator
andgetDateTimeRangeValidator
. These validators are being used in the search form when using tracked entity attributes of value type date and dateTime. We should replace the parseDate logic and leverage the validation done in the ui library component. - Don't use parseDate on local dates. I think this means that we should remove parseDate from the codebase in its entirety (I didn't see any valid reason to use it anymore, but let me know if I missed something)
src/core_modules/capture-core/utils/converters/date/convertLocalToIsoCalendar.js
Outdated
Show resolved
Hide resolved
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.
Hi @alaa-yahia, I found a few bugs that I hope you can look into. I tested with the Ethiopian and Nepalese calendars. Thank you!
...-core/components/WidgetStagesAndEvents/Stages/Stage/StageOverview/StageOverview.component.js
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetEnrollment/Date/Date.component.js
Outdated
Show resolved
Hide resolved
…non-gregorian-calendars-in-views-and-lists
@simonadomnisoru I've pushed bug fixes addressing your feedbacks. Could you take another look when you have a time? |
src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js
Outdated
Show resolved
Hide resolved
…non-gregorian-calendars-in-views-and-lists
7ba48ab
to
b3bd5ea
Compare
...ore/components/SearchBox/SearchForm/SearchFormElementConverter/SearchFormElementConverter.js
Show resolved
Hide resolved
|
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.
@alaa-yahia, fantastic work on this feature! Well done! 🎉
Implements DHIS2-18310 & DHIS2-18311 & DHIS2-18309 & DHIS2-18868