Skip to content

Commit 31305fa

Browse files
committed
Timetable Frontend Enhancements
1 parent 7393306 commit 31305fa

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

course-matrix/frontend/src/pages/TimetableBuilder/Calendar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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) {

course-matrix/frontend/src/pages/TimetableBuilder/TimetableBuilder.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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}

0 commit comments

Comments
 (0)