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 --> <!-- Menu side nav -->
<mat-sidenav #rightMenu position="end" [mode]="mobileView.matches ? 'over' : 'side'" [opened]="mobileView.matches ? false : true"> <mat-sidenav #rightMenu position="end" [mode]="mobileView.matches ? 'over' : 'side'" [opened]="mobileView.matches ? false : true">
<cse-sidenav-menu-item></cse-sidenav-menu-item> <cse-sidenav-menu-item></cse-sidenav-menu-item>
......
...@@ -20,6 +20,7 @@ import { ...@@ -20,6 +20,7 @@ import {
firstActiveTermCode, firstActiveTermCode,
getAllVisibleTermsByYear, getAllVisibleTermsByYear,
getVisibleDegreePlan, getVisibleDegreePlan,
hasLoadedDegreePlan,
} from '@app/degree-planner/store/selectors'; } from '@app/degree-planner/store/selectors';
// Actions // Actions
...@@ -40,6 +41,7 @@ export class DegreePlannerComponent implements OnInit { ...@@ -40,6 +41,7 @@ export class DegreePlannerComponent implements OnInit {
public mobileView: MediaQueryList; public mobileView: MediaQueryList;
public coursesData$: any; public coursesData$: any;
public hasLoadedDegreePlan$: Observable<boolean>;
public visibleRoadmapId$: Observable<number | undefined>; public visibleRoadmapId$: Observable<number | undefined>;
public visibleDegreePlan$: Observable<DegreePlan | undefined>; public visibleDegreePlan$: Observable<DegreePlan | undefined>;
public allDegreePlans$: Observable<DegreePlan[]>; public allDegreePlans$: Observable<DegreePlan[]>;
...@@ -55,6 +57,7 @@ export class DegreePlannerComponent implements OnInit { ...@@ -55,6 +57,7 @@ export class DegreePlannerComponent implements OnInit {
} }
public ngOnInit() { public ngOnInit() {
this.hasLoadedDegreePlan$ = this.store.pipe(select(hasLoadedDegreePlan));
this.visibleRoadmapId$ = this.store.pipe(select(getVisibleRoadmapId)); this.visibleRoadmapId$ = this.store.pipe(select(getVisibleRoadmapId));
this.visibleDegreePlan$ = this.store.pipe(select(getVisibleDegreePlan)); this.visibleDegreePlan$ = this.store.pipe(select(getVisibleDegreePlan));
this.allDegreePlans$ = this.store.pipe(select(getAllDegreePlans)); this.allDegreePlans$ = this.store.pipe(select(getAllDegreePlans));
......
...@@ -13,6 +13,11 @@ export const getDegreePlannerState = ({ degreePlanner }: GlobalState) => { ...@@ -13,6 +13,11 @@ export const getDegreePlannerState = ({ degreePlanner }: GlobalState) => {
return degreePlanner; return degreePlanner;
}; };
export const hasLoadedDegreePlan = createSelector(
getDegreePlannerState,
state => state.visibleDegreePlan !== undefined,
);
export const getSavedForLaterCourses = createSelector( export const getSavedForLaterCourses = createSelector(
getDegreePlannerState, getDegreePlannerState,
state => state.savedForLaterCourses, 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