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

feat: [DHIS2-14334] edit enrollment date #3350

Merged
merged 44 commits into from
Sep 6, 2023
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1804300
build: upgrade @dhis2/ui version to get calendar
superskip Jun 19, 2023
febf74b
feat: basic editable enrollment date component
superskip Jun 9, 2023
51c1ee3
feat: run rules after updating enrollment date
superskip Jun 9, 2023
3a7907b
feat: enrollment date edit button enable condition
superskip Jun 9, 2023
9907855
feat: auto generated event warning message
superskip Jun 9, 2023
732ee9f
feat: use CalendarInput component from @dhis2/ui
superskip Jun 19, 2023
2130e8f
fix: fix UI layout
superskip Jun 22, 2023
e3addc1
fix: always use input format YYYY-MM-DD in CalendarInput
superskip Jun 26, 2023
d275c0f
chore: add translation string
superskip Jun 26, 2023
da78f8b
chore: linter errors
superskip Jun 26, 2023
6c1d7c8
Merge branch 'master' into DHIS2-14334
superskip Jun 26, 2023
8afb762
fix: cypress tests
superskip Jun 26, 2023
7abb823
Merge branch 'master' into DHIS2-14334
superskip Jun 27, 2023
983988d
fix: missing comma
superskip Jun 27, 2023
3827ee9
refactor: remove unused class name
superskip Jun 27, 2023
7102bf3
fix: change color
superskip Jun 27, 2023
da5de9b
Merge branch 'master' into DHIS2-14334
superskip Jun 27, 2023
1743436
fix: update enrollment date in top bar
superskip Jun 30, 2023
a17138b
feat: simple error handling
superskip Aug 9, 2023
4da0ea7
fix: adjust width of input field
superskip Aug 9, 2023
a2b4f0d
refactor: rename `mayEditDate` -> `readOnlyMode`
superskip Aug 9, 2023
05e8d2b
feat: editable incident date
superskip Aug 10, 2023
dcaeaac
fix: update incident date in redux store
superskip Aug 10, 2023
ddbab8c
Merge branch 'master' into DHIS2-14334
superskip Aug 10, 2023
65b7f4d
fix: prevent UTC conversion on the selected date
superskip Aug 10, 2023
259e5a2
fix: failing cypress tests
superskip Aug 10, 2023
5f5eabf
fix: rename TEI "Launchpad McQuack" -> "Breaking TheGlass"
superskip Aug 10, 2023
40f279f
Merge branch 'TECH-1623' into DHIS2-14334
superskip Aug 10, 2023
d7f5aa3
fix: data-test only works for html elements
superskip Aug 11, 2023
0a078f3
Merge branch 'master' into DHIS2-14334
superskip Aug 11, 2023
71c4cc4
fix: remove double dependency on rules engine
superskip Aug 11, 2023
c983799
Merge branch 'master' into DHIS2-14334
superskip Aug 30, 2023
449577b
refactor: rename prop `error` -> `initError`
superskip Aug 30, 2023
62a2578
refactor: change to optimistic gui
superskip Aug 31, 2023
82d3e94
refactor: refetch enrollment from api rather than maintaining it locally
superskip Aug 31, 2023
6125de4
refactor: rename EnrollmentDate -> Date
superskip Aug 31, 2023
5ca6205
feat: use maxWidth
superskip Aug 31, 2023
3628742
fix: error in the date equality check
superskip Aug 31, 2023
ba03879
style: further renaming of `enrollmentDate` -> `date`
superskip Aug 31, 2023
3d81bc3
fix: display selected date immediately after saving
superskip Aug 31, 2023
a02ea61
refactor: move enrollment update logic into `useEnrollment`
superskip Sep 1, 2023
8f6cadc
fix: condition for displaying auto-generated events warning
superskip Sep 5, 2023
6d89fd0
fix: condition for displaying auto-generated events warning
superskip Sep 5, 2023
e3ad11d
fix: use same date format as server
superskip Sep 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: prevent UTC conversion on the selected date
For the rule engine, which prefers non-UTC formatted values as input to
enrollment_date and incident_date.
  • Loading branch information
superskip committed Aug 10, 2023
commit 65b7f4d4fe507b6076f19789362e44f3158128c2
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const EnrollmentDateComponentPlain = ({
const saveHandler = () => {
// CalendarInput component only supports the YYYY-MM-DD format
// $FlowFixMe[incompatible-use]
const date = selectedDate ? parseDate(selectedDate, 'YYYY-MM-DD').momentDate.toISOString() : enrollmentDate;
const date = selectedDate ? parseDate(selectedDate, 'YYYY-MM-DD').momentDate.toISOString(true) : enrollmentDate;
if (date !== enrollmentDate) {
onSave(date);
}
Expand Down