Skip to content

Commit

Permalink
Update student table feedback status info text #1094
Browse files Browse the repository at this point in the history
  • Loading branch information
Keskimaki committed Oct 31, 2023
1 parent 014d591 commit 1698e15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
"none": "none"
},
"studentsWithFeedback": {
"cannotShowWhenOpen": "Information about students who have given feedback cannot be shown while the feedback is open.",
"cannotShowBeforeFeedbackEnds": "Information about students who have given feedback cannot be shown before the feedback period has ended.",
"noFeedbackInfo": "Information about students who have given feedback cannot be shown. Either there are less than five students who have given feedback or the list of students who have given feedback is disabled in the programme's settings",
"studentsList": "Students who have given feedback"
},
Expand Down
2 changes: 1 addition & 1 deletion public/locales/fi/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"none": "ei ole"
},
"studentsWithFeedback": {
"cannotShowWhenOpen": "Tietoa palautteen antajista ei voida näyttää palautteen ollessa auki.",
"cannotShowBeforeFeedbackEnds": "Tietoa palautteen antajista ei voida näyttää ennen kuin palautteenantojakso on päättynyt.",
"noFeedbackInfo": "Tietoa palautteen antaneista opiskelijoista ei voida näyttää. Joko palautetta antaneita opiskelijoita on alle viisi, tai palautetta antaneiden opiskelijoiden lista on poissa käytöstä koulutusohjelman asetuksissa",
"studentsList": "Palautteen antaneet opiskelijat"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import StudentTable from './StudentTable'
import useStudentsWithFeedback from '../../../../hooks/useStudentsWithFeedback'
import { LoadingProgress } from '../../../../components/common/LoadingProgress'
import { useFeedbackTargetContext } from '../../FeedbackTargetContext'
import feedbackTargetIsOpen from '../../../../util/feedbackTargetIsOpen'
import feedbackTargetIsEnded from '../../../../util/feedbackTargetIsEnded'

const NoFeedbackAlert = ({ isOpen }) => {
const NoFeedbackAlert = ({ isEnded }) => {
const { t } = useTranslation()

return (
<Box mb={2}>
<Alert severity="info">
{isOpen ? t('studentsWithFeedback:cannotShowWhenOpen') : t('studentsWithFeedback:noFeedbackInfo')}
{isEnded ? t('studentsWithFeedback:noFeedbackInfo') : t('studentsWithFeedback:cannotShowBeforeFeedbackEnds')}
</Alert>
</Box>
)
Expand All @@ -25,7 +25,7 @@ const StudentsWithFeedback = () => {
const { id } = useParams()

const { feedbackTarget } = useFeedbackTargetContext()
const isOpen = feedbackTargetIsOpen(feedbackTarget)
const isEnded = feedbackTargetIsEnded(feedbackTarget)

const { students, isLoading } = useStudentsWithFeedback(id)

Expand All @@ -35,7 +35,7 @@ const StudentsWithFeedback = () => {

return (
<>
{!feedbackStatusAvailable && <NoFeedbackAlert isOpen={isOpen} />}
{!feedbackStatusAvailable && <NoFeedbackAlert isEnded={isEnded} />}
<StudentTable students={students} feedbackTarget={feedbackTarget} />
</>
)
Expand Down

0 comments on commit 1698e15

Please sign in to comment.