Skip to content

Commit

Permalink
Display course, programme and faculty codes on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
dogamak committed Oct 22, 2021
1 parent 6d938a3 commit f606a7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions services/backend/src/services/trends/statusAttainments.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ const calculateStatusStatistics = async (unixMillis, showByYear) => {

acc[programme.code] = {
type: 'programme',
code: programme.code,
name: programme.name,
drill: courses,
yearly,
Expand Down Expand Up @@ -426,6 +427,7 @@ const calculateStatusStatistics = async (unixMillis, showByYear) => {

acc[facultyCode] = {
type: 'faculty',
code: facultyCode,
drill: {},
name: facultyCodeToFaculty[facultyCode] ? facultyCodeToFaculty[facultyCode].name : null,
yearly,
Expand Down
6 changes: 4 additions & 2 deletions services/frontend/src/components/CoolDataScience/Status.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react'
import { connect } from 'react-redux'
import { Segment, Loader, Dimmer, Icon, Accordion, Checkbox, Message, Form } from 'semantic-ui-react'
import { Segment, Popup, Loader, Dimmer, Icon, Accordion, Checkbox, Message, Form } from 'semantic-ui-react'
import _ from 'lodash'
import moment from 'moment'
import ReactMarkdown from 'react-markdown'
Expand Down Expand Up @@ -106,7 +106,9 @@ const StatusContainer = ({ stats, handleClick, min1, max1, showYearlyValues, sho
overflowWrap: 'break-word',
}}
>
<span className="status-title">{title}</span>
<Popup position="bottom center" size="tiny" trigger={<span className="status-title">{title}</span>}>
{stats.code}
</Popup>
<div style={{ margin: '10px 0' }}>
<Icon
style={{
Expand Down

0 comments on commit f606a7e

Please sign in to comment.