Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmale committed Jan 9, 2024
1 parent 1f391d9 commit 9919cc3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ const ImmunizationsForm: React.FC<DefaultWorkspaceProps> = ({ patientUuid, close
useEffect(() => {
const sub = immunizationFormSub.subscribe((props) => {
if (props) {
const vaccinationDateOrNow = props.vaccinationDate || new Date();
reset({
vaccineUuid: props.vaccineUuid,
vaccinationDate: props.vaccinationDate,
vaccinationTime: dayjs(props.vaccinationDate).format('hh:mm'),
timeFormat: props.vaccinationDate.getHours() >= 12 ? 'PM' : 'AM',
vaccinationDate: vaccinationDateOrNow,
vaccinationTime: dayjs(vaccinationDateOrNow).format('hh:mm'),
timeFormat: vaccinationDateOrNow.getHours() >= 12 ? 'PM' : 'AM',
doseNumber: props.doseNumber,
expirationDate: props.expirationDate,
lotNumber: props.lotNumber,
Expand Down

0 comments on commit 9919cc3

Please sign in to comment.