frontend changes: change shift order display, added config map
This commit is contained in:
@@ -141,10 +141,16 @@ export default function Calendar({
|
||||
const shifts = scheduleData[key] ?? { shift1: [], shift2: [], shift3: [] }
|
||||
const isToday = date.getTime() === today.getTime()
|
||||
const isWeekend = date.getDay() === 0 || date.getDay() === 6
|
||||
// Get next day's shift1 for display
|
||||
const nextDate = addDays(date, 1)
|
||||
const nextKey = toDateKey(nextDate)
|
||||
const nextDayShift1 = scheduleData[nextKey]?.shift1 ?? []
|
||||
// Which shifts on this date are part of the active test window?
|
||||
const activeShifts = new Set()
|
||||
if (key === activeWindow.shift3Date) activeShifts.add(3)
|
||||
if (key === activeWindow.shift1Date) activeShifts.add(1)
|
||||
// Check if next day's shift1 is active
|
||||
const nextDayShift1Active = nextKey === activeWindow.shift1Date
|
||||
return (
|
||||
<DayColumn
|
||||
key={key}
|
||||
@@ -152,6 +158,8 @@ export default function Calendar({
|
||||
isToday={isToday}
|
||||
activeShifts={activeShifts}
|
||||
shifts={shifts}
|
||||
nextDayShift1={nextDayShift1}
|
||||
nextDayShift1Active={nextDayShift1Active}
|
||||
showShift2={isWeekend || (daytimeDateKey !== null && key === daytimeDateKey)}
|
||||
windowLookup={windowLookup}
|
||||
onWindowSelect={onWindowSelect}
|
||||
|
||||
Reference in New Issue
Block a user