Skip to content

Commit 05df603

Browse files
Add missing code cleanup (#82)
1 parent 04a08a6 commit 05df603

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/lib/generators/clinic-generator.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@ const generateClinicsForBSU = ({ date, breastScreeningUnit }) => {
197197
// Check if this is today's generation
198198
const isToday = dayjs(date).startOf('day').isSame(dayjs().startOf('day'))
199199

200+
200201
// Check if this is the first clinic of today - used to assign a specific ID
201202
let isFirstClinicOfToday = isToday // Only track this for today
203+
const firstClinicHardcodedId = 'wtrl7jud' // Hardcoded ID for the first clinic of today
202204

203205
// Generate clinics for each selected location
204206
return selectedLocations.flatMap((location, locationIndex) => {
@@ -216,7 +218,7 @@ const generateClinicsForBSU = ({ date, breastScreeningUnit }) => {
216218
breastScreeningUnit,
217219
selectedPattern.sessions[0],
218220
isToday && locationIndex === 0 ? { clinicType: 'screening' } : null,
219-
isFirstClinicOfToday ? 'wtrl7jud' : null
221+
isFirstClinicOfToday ? firstClinicHardcodedId : null
220222
)
221223
isFirstClinicOfToday = false
222224
return [clinic]
@@ -229,7 +231,7 @@ const generateClinicsForBSU = ({ date, breastScreeningUnit }) => {
229231
breastScreeningUnit,
230232
selectedPattern.sessions[0],
231233
isToday && locationIndex === 0 ? { clinicType: 'screening' } : null,
232-
isFirstClinicOfToday ? 'wtrl7jud' : null
234+
isFirstClinicOfToday ? firstClinicHardcodedId : null
233235
)
234236
isFirstClinicOfToday = false
235237
return clinic

0 commit comments

Comments
 (0)