Skip to content

Commit

Permalink
modifying homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
tfhuhtal committed Oct 31, 2024
1 parent f29f6f5 commit 315a090
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
3 changes: 3 additions & 0 deletions client/components/Generic/Homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -63,6 +65,7 @@ export const FormCard = ({ item, dl, t }) => (
<Item.Content>
<ItemHeader as="h2">{item.parent}</ItemHeader>
<ItemMeta>
<span>{item.content && item.content}</span>
<span>
<DateItem timestamp={dl.date} t={t} />
</span>
Expand Down
20 changes: 10 additions & 10 deletions client/components/Homepage/index.js
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -75,24 +76,23 @@ const Homepage = () => {
{
show: false,
title: t('metaevaluation'),
content: (
<div>
<p>{t('metaevaluationText')}</p>
</div>
),
links: ['/meta-evaluation'],
forms: [7],
thumbnail: powerlineImage,
parent: t('evaluation'),
},
{
hide: true,
show: false,
title: t('facultymonitoring'),
content: (
<div>
<p>{t('facultymonitoringText')}</p>
</div>
<>
<span>
<Link to="meta-evaluation">{t('metaevaluation')}</Link>
</span>
<span>
<p>{t('facultymonitoringText')}</p>
</span>
</>
),
links: ['/faculty-monitoring'],
forms: [8],
Expand Down Expand Up @@ -140,7 +140,7 @@ const Homepage = () => {
{deadlineInfo.length > 0 ? (
deadlineInfo.map(dl => {
const item = getItem(dl.form)
return !item.hide && <FormCard key={dl.form} item={item} dl={dl} t={t} />
return <FormCard key={dl.form} item={item} dl={dl} t={t} />
})
) : (
<Header as="h3">{t('noTimesensitive')}</Header>
Expand Down
1 change: 1 addition & 0 deletions client/util/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions client/util/locales/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
1 change: 1 addition & 0 deletions client/util/locales/se.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 315a090

Please sign in to comment.