Skip to content

Commit

Permalink
temp: hide restricted runs before we're ready to show them (#1210)
Browse files Browse the repository at this point in the history
ENT-9505
  • Loading branch information
pwnage101 authored Oct 18, 2024
1 parent b3c1e56 commit 7bef328
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/app/data/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,18 @@ export function getAvailableCourseRuns({ course, lateEnrollmentBufferDays }) {
return today.isBefore(bufferedEnrollDeadline);
};

// lateEnrollmentBufferDays being set is used as a heuristic to determine if the late enrollment feature is enabled.
return course.courseRuns.filter(
const availableCourseRuns = course.courseRuns.filter(
isDefinedAndNotNull(lateEnrollmentBufferDays)
? lateEnrollmentAvailableCourseRunsFilter
: standardAvailableCourseRunsFilter,
);

// ENT-9359 (epic for Custom Presentations/Restricted Runs):
// Temporarily hide all restricted runs unconditionally on the course about
// page during implementation of the overall feature. ENT-9410 is most likely
// the ticket to replace this code with something to actually show restricted
// runs conditionally.
return availableCourseRuns.filter((courseRun) => !courseRun.restrictionType);
}

export function getCatalogsForSubsidyRequests({
Expand Down

0 comments on commit 7bef328

Please sign in to comment.