File tree Expand file tree Collapse file tree
pages/SettingsPage/UserScheduleSettings/Availability Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Box } from '@mui/system';
22import { Icon } from '@mui/material' ;
33
44interface TimeSlotProps {
5- text ?: string ;
5+ text ?: React . ReactNode ;
66 fontSize ?: string ;
77 backgroundColor ?: string ;
88 icon ?: string ;
@@ -13,6 +13,7 @@ interface TimeSlotProps {
1313 onMouseOver ?: ( ) => void ;
1414 onClick ?: ( ) => void ;
1515 heightOverride ?: string ;
16+ widthOverride ?: string ;
1617 selected ?: boolean ;
1718}
1819
@@ -27,14 +28,15 @@ const TimeSlot: React.FC<TimeSlotProps> = ({
2728 onMouseUp,
2829 onMouseOver,
2930 onClick,
30- heightOverride = undefined ,
31+ heightOverride,
32+ widthOverride,
3133 selected = false
3234} ) => {
3335 return (
3436 < Box
3537 sx = { {
36- height : heightOverride ? heightOverride : small ? '25px' : '4.7vh' ,
37- width : small ? '81px' : '12.2%' ,
38+ height : heightOverride ?? ( small ? '25px' : '4.7vh' ) ,
39+ width : widthOverride ?? ( small ? '81px' : '12.2%' ) ,
3840 backgroundColor,
3941 cursor : onMouseEnter ? 'pointer' : undefined ,
4042 borderStyle : 'solid' ,
Original file line number Diff line number Diff line change @@ -32,7 +32,14 @@ const AvailabilityEditModal: React.FC<DRCEditModalProps> = ({
3232 } ;
3333
3434 return (
35- < NERModal open = { open } onHide = { onCancel } title = { header } onSubmit = { onSubmit } submitText = "Save" >
35+ < NERModal
36+ open = { open }
37+ onHide = { onCancel }
38+ title = { header }
39+ onSubmit = { onSubmit }
40+ submitText = "Save"
41+ paperProps = { { maxWidth : '900px' , maxHeight : '680px' } }
42+ >
3643 < EditAvailability
3744 editedAvailabilities = { confirmedAvailabilities }
3845 setEditedAvailabilities = { setConfirmedAvailabilities }
Original file line number Diff line number Diff line change @@ -129,27 +129,37 @@ const EditAvailability: React.FC<EditAvailabilityProps> = ({
129129 Invert Availability
130130 </ NERButton >
131131 </ Grid >
132- < TimeSlot backgroundColor = { HeatmapColors [ 0 ] } small = { true } heightOverride = "40px " />
132+ < TimeSlot backgroundColor = { HeatmapColors [ 0 ] } widthOverride = "106px" heightOverride = "50px " />
133133 { currentlyDisplayedAvailabilities . map ( ( availability ) => (
134134 < TimeSlot
135135 key = { availability . dateSet . getTime ( ) }
136136 backgroundColor = { HeatmapColors [ 0 ] }
137- small = { true }
138- heightOverride = "40px"
139- text = { getDayOfWeek ( availability . dateSet ) + ' ' + datePipe ( availability . dateSet ) }
140- fontSize = { '12px' }
137+ widthOverride = "106px"
138+ heightOverride = "50px"
139+ text = {
140+ < Typography fontSize = "15px" fontWeight = "bold" >
141+ { getDayOfWeek ( availability . dateSet ) } < br /> { datePipe ( availability . dateSet ) }
142+ </ Typography >
143+ }
141144 />
142145 ) ) }
143146 { enumToArray ( REVIEW_TIMES ) . map ( ( time , timeIndex ) => (
144147 < Grid container item >
145- < TimeSlot backgroundColor = { HeatmapColors [ 0 ] } small = { true } text = { time } fontSize = { '13px' } />
148+ < TimeSlot
149+ backgroundColor = { HeatmapColors [ 0 ] }
150+ widthOverride = "106px"
151+ heightOverride = "32px"
152+ text = { time }
153+ fontSize = { '15px' }
154+ />
146155 { currentlyDisplayedAvailabilities . map ( ( availability , dayIndex ) => {
147156 const backgroundColor = availability . availability . includes ( timeIndex ) ? HeatmapColors [ 3 ] : HeatmapColors [ 0 ] ;
148157 return (
149158 < TimeSlot
150159 key = { timeIndex * enumToArray ( REVIEW_TIMES ) . length + dayIndex }
151160 backgroundColor = { backgroundColor }
152- small = { true }
161+ widthOverride = "106px"
162+ heightOverride = "32px"
153163 onMouseDown = { ( e ) => handleMouseDown ( e , availability , timeIndex ) }
154164 onMouseEnter = { ( e ) => handleMouseEnter ( e , availability , timeIndex ) }
155165 onMouseUp = { handleMouseUp }
You can’t perform that action at this time.
0 commit comments