From 0a053d32ce226050fc2ad010c2b5af831debd392 Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:32:37 -0500 Subject: [PATCH] feat: add missing transcript setting update date (#793) --- .../videos-page/data/thunks.js | 1 + .../OrderTranscriptForm.jsx | 21 ++++++++++++++++++- .../transcript-settings/messages.js | 7 ++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/files-and-videos/videos-page/data/thunks.js b/src/files-and-videos/videos-page/data/thunks.js index 713e8ce0d..d04403629 100644 --- a/src/files-and-videos/videos-page/data/thunks.js +++ b/src/files-and-videos/videos-page/data/thunks.js @@ -339,6 +339,7 @@ export function clearAutomatedTranscript({ courseId }) { try { await deleteTranscriptPreferences(courseId); + dispatch(updateTranscriptPreferenceSuccess({ modified: new Date() })); dispatch(updateEditStatus({ editType: 'transcript', status: RequestStatus.SUCCESSFUL })); } catch (error) { dispatch(updateErrors({ error: 'transcript', message: 'Failed to update order transcripts settings.' })); diff --git a/src/files-and-videos/videos-page/transcript-settings/OrderTranscriptForm.jsx b/src/files-and-videos/videos-page/transcript-settings/OrderTranscriptForm.jsx index 085708ae4..758a47ace 100644 --- a/src/files-and-videos/videos-page/transcript-settings/OrderTranscriptForm.jsx +++ b/src/files-and-videos/videos-page/transcript-settings/OrderTranscriptForm.jsx @@ -1,6 +1,11 @@ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; -import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n'; +import { + FormattedMessage, + FormattedDate, + injectIntl, + intlShape, +} from '@edx/frontend-platform/i18n'; import { Button, SelectableBox, Stack } from '@edx/paragon'; import { ErrorAlert } from '@edx/frontend-lib-content-components'; import Cielo24Form from './Cielo24Form'; @@ -143,6 +148,19 @@ const OrderTranscriptForm = ({ + {activeTranscriptPreferences?.modified && ( +