Skip to content

Commit

Permalink
add new field to modalanswer
Browse files Browse the repository at this point in the history
  • Loading branch information
ranven committed Oct 10, 2024
1 parent 2ce0f6d commit 61a4292
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const ModalAnswer = ({ question, faculty }) => {
const [showAll, setShowAll] = useState(false)
const lightsHistory = facultyAnswers[`${question.id}_lights_history`] || []
const displayedHistory = showAll ? lightsHistory : lightsHistory.slice(Math.max(lightsHistory.length - 4, 0))
const isDoctoral = useSelector(({ filters }) => filters.isDoctoral)

const formatDate = date => {
return new Date(date)
.toLocaleString('en-GB', { day: '2-digit', month: '2-digit', year: 'numeric' })
Expand Down Expand Up @@ -55,6 +57,19 @@ const ModalAnswer = ({ question, faculty }) => {
)}
</div>
</div>
{!isDoctoral && (
<div className="single-row">
<div>
<i>{t(`facultyTracking:selectDegree`)}</i>
<p>
{facultyAnswers[`${question.id}_degree_radio`]
? t(`facultyTracking:${facultyAnswers[`${question.id}_degree_radio`]}`)
: t('facultyTracking:both')}
</p>
</div>
</div>
)}

{['actions', 'responsible_entities'].map(fieldName => {
const labels = {
actions: 'monitoringActionsLabel',
Expand Down
3 changes: 0 additions & 3 deletions client/util/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ export default {
neutral: 'Challenges identified and development underway',
negative: 'Significant measures required/development areas not yet specified',
noColors: '*Questions, without traffic lights are not shown here (e.g. 16 and 17)',
greenFaculty: 'Implemented',
yellowFaculty: 'In progress',
redFaculty: 'Not progressing',
green: 'Green',
yellow: 'Yellow',
red: 'Red',
Expand Down

0 comments on commit 61a4292

Please sign in to comment.