diff --git a/src/components/program-progress/data/utils.jsx b/src/components/program-progress/data/utils.jsx index ad77390d05..7d41503afb 100644 --- a/src/components/program-progress/data/utils.jsx +++ b/src/components/program-progress/data/utils.jsx @@ -79,15 +79,15 @@ export function getNotStartedCourseDetails(courses) { courseRunDate = cRun?.end ? `${courseRunDate} - ${moment(cRun.end).format('MMMM Do, YYYY')}` : courseRunDate; multipleCourseRuns.push({ - courseRunDate: [courseRunDate], title: course.title, key: course?.key, runType: cRun.runType, + courseRunDate: [courseRunDate], title: course.title, key: course?.key, uuid: course.uuid, }); }) )); // eslint-disable-next-line array-callback-return multipleCourseRuns.map((e) => { - const key = e.runType; - const i = courseWithMultipleCourseRun.findIndex(r => r.runType === key); + const key = e.uuid; + const i = courseWithMultipleCourseRun.findIndex(r => r.uuid === key); if (i >= 0) { courseWithMultipleCourseRun[i].courseRunDate.push(e.courseRunDate[0]); } else { diff --git a/src/components/program-progress/tests/ProgramProgressCourses.test.jsx b/src/components/program-progress/tests/ProgramProgressCourses.test.jsx index 6be597d198..3d39e544fd 100644 --- a/src/components/program-progress/tests/ProgramProgressCourses.test.jsx +++ b/src/components/program-progress/tests/ProgramProgressCourses.test.jsx @@ -46,7 +46,7 @@ describe('', () => { isEnrolled: true, end: null, pacingType: 'instructor_paced', - runType: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d', + uuid: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d', certificate_url: null, }, { @@ -56,7 +56,7 @@ describe('', () => { isEnrolled: false, end: null, pacingType: 'instructor_paced', - runType: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d', + uuid: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d', certificate_url: 'url', }, ], @@ -88,7 +88,7 @@ describe('', () => { isEnrolled: true, end: null, pacingType: 'instructor_paced', - runType: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d', + uuid: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d', certificate_url: null, }, { @@ -98,7 +98,7 @@ describe('', () => { isEnrolled: false, end: null, pacingType: 'instructor_paced', - runType: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d', + uuid: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d', certificate_url: 'url', }, ], @@ -130,7 +130,7 @@ describe('', () => { isEnrolled: true, end: null, pacingType: 'instructor_paced', - runType: '282c3c80-6bc5-41c4-aa11-bd6e90c3f55d', + uuid: '282c3c80-6bc5-41c4-aa11-bd6e90c3f55d', certificate_url: null, }, { @@ -140,7 +140,7 @@ describe('', () => { isEnrolled: false, end: '2024-10-15T00:00:00Z', pacingType: 'instructor_paced', - runType: '282c3c80-6bc5-41c4-aa11-bd6e90c3f55d', + uuid: '282c3c80-6bc5-41c4-aa11-bd6e90c3f55d', certificate_url: null, }, ], @@ -156,7 +156,7 @@ describe('', () => { isEnrolled: false, end: '2024-10-15T00:00:00Z', pacingType: 'instructor_paced', - runType: '182c3c80-6bc5-41c4-aa11-bd6e90c3f534', + uuid: '182c3c80-6bc5-41c4-aa11-bd6e90c3f534', certificate_url: null, }, ],