Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: questions page, rephrase remaining annotations #69

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/i18n/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"display_images": "Display images",
"annotations": "Annotations",
"last_annotations": "Last annotations",
"remaining_annotations": "Remaining:",
"remaining_annotations": "Remaining questions",
"annotated_annotations": "Annotated",
"filters": {
"short_label": {
Expand Down
9 changes: 5 additions & 4 deletions src/pages/questions/UserData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import Stack from "@mui/material/Stack";
import Link from "@mui/material/Link";

import CheckCircleOutlineIcon from "@mui/icons-material/CheckCircleOutline";
import CancelOutlinedIcon from "@mui/icons-material/CancelOutlined";

import { useTranslation } from "react-i18next";

import offService from "../../off";

const NB_DISPLAYED_QUESTIONS = 30;
const UserData = (props) => {
const { remainingQuestionNb = 0, answers = [] } = props;
const UserData = ({ remainingQuestionNb = 0, answers = [] }) => {
const { t } = useTranslation();

let displayedAnswers = answers.filter(
(question) => question.validationValue !== -1
Expand All @@ -26,7 +27,7 @@ const UserData = (props) => {
return (
<Box>
<Stack spacing={1}>
<Typography sx={{ my: 2 }}>Remaining: {remainingQuestionNb}</Typography>
<Typography sx={{ my: 2 }}>{t("questions.remaining_annotations")}: {remainingQuestionNb}</Typography>
{displayedAnswers.map(
({ insight_id, barcode, value, insight_type, validationValue }) => (
<Stack key={insight_id} direction="row">
Expand Down