From 315a0904eecc4ccfdc43e479440f1b72990188f2 Mon Sep 17 00:00:00 2001 From: tfhuhtal Date: Thu, 31 Oct 2024 14:12:48 +0200 Subject: [PATCH] modifying homepage --- client/components/Generic/Homepage.js | 3 +++ client/components/Homepage/index.js | 20 ++++++++++---------- client/util/locales/en.js | 1 + client/util/locales/fi.js | 1 + client/util/locales/se.js | 1 + 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/client/components/Generic/Homepage.js b/client/components/Generic/Homepage.js index 103922ce..9f6df47d 100644 --- a/client/components/Generic/Homepage.js +++ b/client/components/Generic/Homepage.js @@ -22,6 +22,8 @@ export const DateItem = ({ timestamp, t }) => { const month = date.getUTCMonth() + 1 // getUTCMonth() returns 0-11 const day = date.getUTCDate() + console.log(date) + let hours = date.getUTCHours() if (hours.toString().length === 1) hours = `0${hours.toString()}` let minutes = date.getUTCMinutes() @@ -63,6 +65,7 @@ export const FormCard = ({ item, dl, t }) => ( {item.parent} + {item.content && item.content} diff --git a/client/components/Homepage/index.js b/client/components/Homepage/index.js index e0ee0e09..ace3956e 100644 --- a/client/components/Homepage/index.js +++ b/client/components/Homepage/index.js @@ -1,6 +1,7 @@ /* eslint-disable no-nested-ternary */ import React, { Fragment, useEffect, useState } from 'react' import { useSelector } from 'react-redux' +import { Link } from 'react-router-dom' import NoPermissions from 'Components/Generic/NoPermissions' import { useTranslation } from 'react-i18next' import { Container, Header, Grid, Divider, Loader, List } from 'semantic-ui-react' @@ -75,24 +76,23 @@ const Homepage = () => { { show: false, title: t('metaevaluation'), - content: ( -
-

{t('metaevaluationText')}

-
- ), links: ['/meta-evaluation'], forms: [7], thumbnail: powerlineImage, parent: t('evaluation'), }, { - hide: true, show: false, title: t('facultymonitoring'), content: ( -
-

{t('facultymonitoringText')}

-
+ <> + + {t('metaevaluation')} + + +

{t('facultymonitoringText')}

+
+ ), links: ['/faculty-monitoring'], forms: [8], @@ -140,7 +140,7 @@ const Homepage = () => { {deadlineInfo.length > 0 ? ( deadlineInfo.map(dl => { const item = getItem(dl.form) - return !item.hide && + return }) ) : (
{t('noTimesensitive')}
diff --git a/client/util/locales/en.js b/client/util/locales/en.js index 6254f8de..b13ff0da 100644 --- a/client/util/locales/en.js +++ b/client/util/locales/en.js @@ -120,6 +120,7 @@ export default { overview: 'Owerview', startDateEndDateError: 'The start time cannot be later than the estimated end time', modifyLights: 'Modify lights', + facultymonitoringText: 'The answers are available/ The deadline for filling in the form was October 30, 2024', }, aboutPage: { diff --git a/client/util/locales/fi.js b/client/util/locales/fi.js index 32838387..a0515a51 100644 --- a/client/util/locales/fi.js +++ b/client/util/locales/fi.js @@ -125,6 +125,7 @@ export default { noSelections: 'Ei valittuja toimenpiteitä', startDateEndDateError: 'Alkamisaika ei voi olla arvioitua päättymisaikaa myöhemmin', confirmRemoveLight: 'Haluatko varmasti poistaa', + facultymonitoringText: 'Vastaukset ovat luettavissa / Lomakkeen täyttäminen päättyi 30.10.2024', }, aboutPage: { diff --git a/client/util/locales/se.js b/client/util/locales/se.js index 93471681..b2bac0e5 100644 --- a/client/util/locales/se.js +++ b/client/util/locales/se.js @@ -37,6 +37,7 @@ export default { programmeFilter: 'Sök utbildningsprogram', facultyFilter: 'Hitta fakulteter', find: 'Sök', + facultymonitoringText: 'Svar finns tillgängliga / Sista dagen för att fylla i formuläret var 30.10.2024', noData: 'Ingen data tillgänglig för dessa urval', noDataForFaculty: 'Ingen data tillgänglig för vald fakultet',