diff --git a/client/components/NewReportPage/NewReportTable.js b/client/components/NewReportPage/NewReportTable.js index 80735ed..177b034 100644 --- a/client/components/NewReportPage/NewReportTable.js +++ b/client/components/NewReportPage/NewReportTable.js @@ -57,6 +57,7 @@ export default withRouter(({ rows, batchId, history }) => { const graders = useSelector((state) => state.graders.data) const [sent, setSent] = useState(false) const onlyMissingEnrollments = rows.every(({ entry }) => entry.type === 'ENTRY' && entry.missingEnrolment) + const dateHasChanged = rows.some(({ entry, attainmentDate }) => !moment(attainmentDate).isSame(moment(entry.completionDate), 'day')) useEffect(() => { if (sent && !pending && !(error || {}).genericError) { @@ -148,6 +149,15 @@ export default withRouter(({ rows, batchId, history }) => { ) : null + const ChangedDateInfo = () => + dateHasChanged ? ( + + One or more completion date has been changed to match the study right in the enrollment. +
+ The changed dates are marked with a pencil icon. Please check the new dates before approving. +
+ ) : null + const CompletionDate = ({ attainmentDate, completionDate }) => completionDate ? (
@@ -179,6 +189,7 @@ export default withRouter(({ rows, batchId, history }) => { after student enrolls to the course.{' '}

+ {sent && error ? (