Commit 5c2142fd authored by Ermolaev Timur's avatar Ermolaev Timur

Merge branch 'task-72-feature/fixed_calendar_hours' into 'development'

#72 Зафиксировал часы сверху

See merge request !46
parents b844c1b0 2728d913
...@@ -31,23 +31,25 @@ function MonthCalendarBody({month, year, tasks, createTaskInCellHandler, current ...@@ -31,23 +31,25 @@ function MonthCalendarBody({month, year, tasks, createTaskInCellHandler, current
return ( return (
<Box style={{marginBottom: '30px'}}> <Box style={{marginBottom: '30px'}}>
<CalendarRow <div style={{position: 'sticky', top: '0px', zIndex: '10', backgroundColor: 'lightgrey'}}>
> <CalendarRow
<CalendarSmallCell xs={1.2}> >
<FormControlLabel <CalendarSmallCell xs={1.2}>
control={<Switch color="primary" checked={hourFormat} onChange={()=>{setHourFormat(()=>!hourFormat)}}/>} <FormControlLabel
label="1 час" control={<Switch color="primary" checked={hourFormat} onChange={()=>{setHourFormat(()=>!hourFormat)}}/>}
labelPlacement="end" label="1 час"
/> labelPlacement="end"
</CalendarSmallCell> />
{hoursInDay?.map((hours, i)=>{ </CalendarSmallCell>
return ( {hoursInDay?.map((hours, i)=>{
<CalendarStandartCell key={i} xs={cellSizes.standarCell}> return (
{hours} <CalendarStandartCell key={i} xs={cellSizes.standarCell}>
</CalendarStandartCell> {hours}
) </CalendarStandartCell>
})} )
</CalendarRow> })}
</CalendarRow>
</div>
{daysInMonth?.map((day, i)=>{ {daysInMonth?.map((day, i)=>{
return ( return (
<CalendarRow <CalendarRow
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment