Skip to content

Commit

Permalink
Show E-Learning venues as "E-Learning" (#2736)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgzf authored Jul 12, 2020
1 parent f4d2c77 commit 312b11a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion website/src/views/timetable/TimetableCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const TimetableCell: React.FC<Props> = (props) => {
<div>
{LESSON_TYPE_ABBREV[lesson.lessonType]} [{lesson.classNo}]
</div>
<div>{lesson.venue}</div>
<div>{lesson.venue.startsWith('E-Learn') ? 'E-Learning' : lesson.venue}</div>
{weekText && <div>{weekText}</div>}
</div>
</Cell>
Expand Down
3 changes: 2 additions & 1 deletion website/src/views/today/DayEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ const DayEvents = React.memo<Props>((props) => {
<p>
{lesson.lessonType} {lesson.classNo}
</p>
<MapPin className={styles.venueIcon} /> {lesson.venue}
<MapPin className={styles.venueIcon} />{' '}
{lesson.venue.startsWith('E-Learn') ? 'E-Learning' : lesson.venue}
<div>
<EventMapInline
className={styles.map}
Expand Down
4 changes: 3 additions & 1 deletion website/src/views/venues/VenueList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ type Props = {
};

const VenueList: React.FC<Props> = (props) => {
const venueList = groupBy(props.venues, (venue) => venue.charAt(0).toUpperCase());
// Added during the horrible COVID-19 times to hide E-Learning venues
const physicalVenues = props.venues.filter((venue) => !venue.startsWith('E-Learn'));
const venueList = groupBy(physicalVenues, (venue) => venue.charAt(0).toUpperCase());
const sortedVenueList = sortBy(toPairs(venueList), ([key]) => key);

return (
Expand Down

0 comments on commit 312b11a

Please sign in to comment.