File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
course-matrix/frontend/src/pages/TimetableBuilder Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -201,8 +201,7 @@ const Calendar = React.memo<CalendarProps>(
201201 ) ,
202202 ) ,
203203 ] . length ;
204- const allOfferingSectionsHaveBeenSelected =
205- totalNumberOfSelectedSections === totalNumberOfRequiredSections ;
204+ const allOfferingSectionsHaveBeenSelected = isEditingTimetable ? ! numberOfSectionsData || ! offeringsData || totalNumberOfSelectedSections === totalNumberOfRequiredSections : totalNumberOfSelectedSections === totalNumberOfRequiredSections ;
206205
207206 useEffect ( ( ) => {
208207 if ( ! isEditingTimetable ) {
Original file line number Diff line number Diff line change @@ -362,13 +362,13 @@ const TimetableBuilder = () => {
362362 < Button size = "sm" variant = "outline" onClick = { handleReset } >
363363 Reset
364364 </ Button >
365- < Button
365+ { isEditingTimetable && < Button
366366 size = "sm"
367367 variant = "outline"
368368 onClick = { ( ) => setOpenShareDialog ( true ) }
369369 >
370370 Share
371- </ Button >
371+ </ Button > }
372372 { isEditingTimetable && (
373373 < ShareDialog
374374 open = { openShareDialog }
You can’t perform that action at this time.
0 commit comments