Skip to content
Snippets Groups Projects
Commit e49f7aae authored by Isaac Evavold's avatar Isaac Evavold Committed by Isaac Evavold
Browse files

ROENROLL-1385

parent 726d0cae
No related branches found
No related tags found
No related merge requests found
Pipeline #32643 passed
<mat-sidenav-container id="plans-container">
<mat-sidenav-container id="plans-container" *ngIf="hasLoadedDegreePlan$ | async">
<!-- Menu side nav -->
<mat-sidenav #rightMenu position="end" [mode]="mobileView.matches ? 'over' : 'side'" [opened]="mobileView.matches ? false : true">
<cse-sidenav-menu-item></cse-sidenav-menu-item>
......
......@@ -20,6 +20,7 @@ import {
firstActiveTermCode,
getAllVisibleTermsByYear,
getVisibleDegreePlan,
hasLoadedDegreePlan,
} from '@app/degree-planner/store/selectors';
// Actions
......@@ -40,6 +41,7 @@ export class DegreePlannerComponent implements OnInit {
public mobileView: MediaQueryList;
public coursesData$: any;
public hasLoadedDegreePlan$: Observable<boolean>;
public visibleRoadmapId$: Observable<number | undefined>;
public visibleDegreePlan$: Observable<DegreePlan | undefined>;
public allDegreePlans$: Observable<DegreePlan[]>;
......@@ -55,6 +57,7 @@ export class DegreePlannerComponent implements OnInit {
}
public ngOnInit() {
this.hasLoadedDegreePlan$ = this.store.pipe(select(hasLoadedDegreePlan));
this.visibleRoadmapId$ = this.store.pipe(select(getVisibleRoadmapId));
this.visibleDegreePlan$ = this.store.pipe(select(getVisibleDegreePlan));
this.allDegreePlans$ = this.store.pipe(select(getAllDegreePlans));
......
......@@ -13,6 +13,11 @@ export const getDegreePlannerState = ({ degreePlanner }: GlobalState) => {
return degreePlanner;
};
export const hasLoadedDegreePlan = createSelector(
getDegreePlannerState,
state => state.visibleDegreePlan !== undefined,
);
export const getSavedForLaterCourses = createSelector(
getDegreePlannerState,
state => state.savedForLaterCourses,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment