Skip to content

Commit 80ecef9

Browse files
committed
prettier
1 parent 17374d6 commit 80ecef9

2 files changed

Lines changed: 286 additions & 90 deletions

File tree

app/utils/dose-schedule.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ const REASON = {
3737
* nextEligibleFrom: Date|null
3838
* }}
3939
*/
40-
export function getScheduleSummary({
41-
vaccinationsGiven = [],
42-
dob,
43-
programme
44-
}) {
40+
export function getScheduleSummary({ vaccinationsGiven = [], dob, programme }) {
4541
const givenDoses = [...vaccinationsGiven].sort(
4642
(a, b) => new Date(a.createdAt) - new Date(b.createdAt)
4743
)
@@ -110,7 +106,10 @@ export function getScheduleSummary({
110106
if (nextSlot <= MMR_MAX_SEQUENCE) {
111107
const minAgeDate = addMonths(dob, MMR_MIN_AGE_MONTHS[nextSlot])
112108
nextEligibleFrom = lastValidCreatedAt
113-
? maxDate([minAgeDate, addDays(lastValidCreatedAt, MMR_MIN_INTERVAL_DAYS)])
109+
? maxDate([
110+
minAgeDate,
111+
addDays(lastValidCreatedAt, MMR_MIN_INTERVAL_DAYS)
112+
])
114113
: minAgeDate
115114
}
116115

0 commit comments

Comments
 (0)