Skip to content

Commit

Permalink
fix: change id from run_type to course_uui (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
zamanafzal authored Apr 6, 2022
1 parent 11043ef commit 0c7b9fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/components/program-progress/data/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('<EnrollModal />', () => {
isEnrolled: true,
end: null,
pacingType: 'instructor_paced',
runType: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
uuid: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
certificate_url: null,
},
{
Expand All @@ -56,7 +56,7 @@ describe('<EnrollModal />', () => {
isEnrolled: false,
end: null,
pacingType: 'instructor_paced',
runType: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
uuid: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
certificate_url: 'url',
},
],
Expand Down Expand Up @@ -88,7 +88,7 @@ describe('<EnrollModal />', () => {
isEnrolled: true,
end: null,
pacingType: 'instructor_paced',
runType: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
uuid: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
certificate_url: null,
},
{
Expand All @@ -98,7 +98,7 @@ describe('<EnrollModal />', () => {
isEnrolled: false,
end: null,
pacingType: 'instructor_paced',
runType: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
uuid: '982c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
certificate_url: 'url',
},
],
Expand Down Expand Up @@ -130,7 +130,7 @@ describe('<EnrollModal />', () => {
isEnrolled: true,
end: null,
pacingType: 'instructor_paced',
runType: '282c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
uuid: '282c3c80-6bc5-41c4-aa11-bd6e90c3f55d',
certificate_url: null,
},
{
Expand All @@ -140,7 +140,7 @@ describe('<EnrollModal />', () => {
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,
},
],
Expand All @@ -156,7 +156,7 @@ describe('<EnrollModal />', () => {
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,
},
],
Expand Down

0 comments on commit 0c7b9fc

Please sign in to comment.