From 201ce8bec8dae48aa26a456a64d75521d6f65320 Mon Sep 17 00:00:00 2001 From: Hamzah Ullah Date: Thu, 12 Sep 2024 12:34:24 -0400 Subject: [PATCH] chore: PR feedback 3 --- .../assignment-modal/AssignmentModalmportantDates.jsx | 8 ++++++-- .../learner-credit-management/data/constants.js | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/learner-credit-management/assignment-modal/AssignmentModalmportantDates.jsx b/src/components/learner-credit-management/assignment-modal/AssignmentModalmportantDates.jsx index bf09625a51..c7ff32add8 100644 --- a/src/components/learner-credit-management/assignment-modal/AssignmentModalmportantDates.jsx +++ b/src/components/learner-credit-management/assignment-modal/AssignmentModalmportantDates.jsx @@ -5,7 +5,11 @@ import PropTypes from 'prop-types'; import dayjs from 'dayjs'; import { - getNormalizedEnrollByDate, getNormalizedStartDate, hasCourseStarted, SHORT_MONTH_DATE_FORMAT, + DATETIME_FORMAT, + getNormalizedEnrollByDate, + getNormalizedStartDate, + hasCourseStarted, + SHORT_MONTH_DATE_FORMAT, } from '../data'; const messages = defineMessages({ @@ -51,7 +55,7 @@ const AssignmentModalImportantDates = ({ courseRun }) => { const intl = useIntl(); const normalizedEnrollByDate = getNormalizedEnrollByDate(courseRun); const enrollByDate = normalizedEnrollByDate - ? dayjs(normalizedEnrollByDate).format(SHORT_MONTH_DATE_FORMAT) + ? dayjs(normalizedEnrollByDate).format(DATETIME_FORMAT) : null; const courseStartDate = getNormalizedStartDate(courseRun); const courseHasStartedLabel = hasCourseStarted(courseStartDate) diff --git a/src/components/learner-credit-management/data/constants.js b/src/components/learner-credit-management/data/constants.js index fcd51b3b65..20739fcf2f 100644 --- a/src/components/learner-credit-management/data/constants.js +++ b/src/components/learner-credit-management/data/constants.js @@ -39,6 +39,7 @@ export const NO_BALANCE_REMAINING_DOLLAR_THRESHOLD = 100; export const DATE_FORMAT = 'MMMM DD, YYYY'; export const SHORT_MONTH_DATE_FORMAT = 'MMM DD, YYYY'; +export const DATETIME_FORMAT = 'MMM D, YYYY h:mma'; export const EXEC_ED_OFFER_TYPE = 'learner_credit';