Skip to content

Commit

Permalink
Merge pull request #1599 from gustavomm19/add-delivered-at
Browse files Browse the repository at this point in the history
Add delivered at to deliver modal
  • Loading branch information
tommygonzaleza authored Sep 10, 2024
2 parents be770c4 + ef36010 commit 86d7895
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/locales/en/assignments.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"waiting-for-review": "Waiting for review",
"student-name": "Student {{name}}",
"project-delivered": "Project delivered:",
"delivered-at": "Delivered at:",
"your-teacher-said": "Your teacher said:",
"feedback-will-be-shown-here": "The teacher's feedback will be shown here if it's approved",
"read-code-reviews": "(Read code reviews)",
Expand Down
1 change: 1 addition & 0 deletions public/locales/es/assignments.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"waiting-for-review": "Esperando revisión",
"student-name": "Estudiante {{name}}",
"project-delivered": "Proyecto entregado:",
"delivered-at": "Entregado el:",
"your-teacher-said": "Tu profesor dijo:",
"feedback-will-be-shown-here": "El comentario del profesor se mostrará aquí si es aprobado",
"read-code-reviews": "(Leer revisiones de código)",
Expand Down
8 changes: 8 additions & 0 deletions src/common/components/ReviewModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { useEffect, useState } from 'react';
import { Box, Button, Flex, Link, Textarea, useToast } from '@chakra-ui/react';
import useTranslation from 'next-translate/useTranslation';
import { format } from 'date-fns';
import SimpleModal from '../SimpleModal';
import Text from '../Text';
import useStyle from '../../hooks/useStyle';
Expand Down Expand Up @@ -572,6 +573,13 @@ function ReviewModal({ isExternal, externalFiles, isOpen, isStudent, externalDat
{currentTask?.title}
</Link>
)}
{currentTask?.delivered_at && (
<Text size="md">
{t('code-review.delivered-at')}
{' '}
{format(new Date(currentTask.delivered_at), 'MM/dd/yyyy')}
</Text>
)}
</Flex>

{Array.isArray(fileData) && fileData.length > 0 && (
Expand Down

0 comments on commit 86d7895

Please sign in to comment.