-
Notifications
You must be signed in to change notification settings - Fork 232
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
O3-2476 - Remove unnecessary conversion from date to string back to date #836
Changes from all commits
978e5f9
58cc75a
cf0ec86
e350131
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ const AppointmentDetails: React.FC<AppointmentDetailsProps> = ({ appointment }) | |
<span className={styles.historyGridCount}>{appointmentsCount.cancelledAppointments}</span> | ||
</div> | ||
<div> | ||
<p className={styles.historyGridLabel}>{t('upcomming', 'Upcoming')}</p> | ||
<p className={styles.historyGridLabel}>{t('upcoming', 'Upcoming')}</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure where this came from - this cropped up as message changes when I tried to commit, I noticed this typo, so I fixed it (which enabled us to not lose the existing translations). |
||
<span className={styles.historyGridCount}>{appointmentsCount.upcomingAppointments}</span> | ||
</div> | ||
</div> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ export async function saveQueueEntry( | |
patient: { | ||
uuid: patientUuid, | ||
}, | ||
startedAt: toDateObjectStrict(toOmrsIsoString(new Date())), | ||
startedAt: new Date(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of the changes in this PR are this. Find/replace wherever we are converting from date->string->date and just using the original date instead. |
||
sortWeight: sortWeight, | ||
}, | ||
}, | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -98,10 +98,12 @@ const VisitForm: React.FC<VisitFormProps> = ({ patientUuid, appointment }) => { | |||||||||||||||||
|
||||||||||||||||||
const payload: NewVisitPayload = { | ||||||||||||||||||
patient: patientUuid, | ||||||||||||||||||
startDatetime: toDateObjectStrict( | ||||||||||||||||||
toOmrsIsoString( | ||||||||||||||||||
new Date(dayjs(visitDate).year(), dayjs(visitDate).month(), dayjs(visitDate).date(), hours, minutes), | ||||||||||||||||||
), | ||||||||||||||||||
startDatetime: new Date( | ||||||||||||||||||
dayjs(visitDate).year(), | ||||||||||||||||||
dayjs(visitDate).month(), | ||||||||||||||||||
dayjs(visitDate).date(), | ||||||||||||||||||
hours, | ||||||||||||||||||
minutes, | ||||||||||||||||||
), | ||||||||||||||||||
Comment on lines
+101
to
107
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be easier to write this as:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed that this might be better, but since I haven't tested that, and the current retains the existing approach, I'll leave it for now. |
||||||||||||||||||
visitType: visitType, | ||||||||||||||||||
location: selectedLocation, | ||||||||||||||||||
|
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.
This test started failing after I made the changes described. But this should not have been passing before if I'm understanding right, because a startDatetime with a "Z" at the end indicates UTC, but my computer running these tests is in EDT, so this shows up as 08:34 AM, not 12:34 PM. I've just changed the test to use a locally generated date, so whatever is passed is the same as what is tested. But it seems that this is potentially a fixed bug.