Newer
Older
<mat-sidenav-container id="plans-container" *ngIf="(visibleDegreePlan$ | async) as degreePlan">
<mat-sidenav #rightMenu position="end" [mode]="mobileView.matches ? 'over' : 'side'" [opened]="mobileView.matches ? false : true">
Isaac Evavold
committed
<cse-sidenav-menu-item></cse-sidenav-menu-item>
<div fxLayout="row" fxLayout.lt-sm="column" fxLayoutGap="20px" fxLayoutAlign="start center" style="margin: 24px 0px 24px 24px;">
<mat-form-field>
<mat-select
placeholder="Degree Plans"
[value]="visibleRoadmapId$ | async"
[disableOptionCentering]="true"
(selectionChange)="handleDegreePlanChange($event)">
<!-- Render the name of the currently visible degree plan. -->
<mat-icon class="primary-star" *ngIf="degreePlan.primary">star_rate</mat-icon>
<span class="plan-name">{{degreePlan.name}}</span>
</mat-select-trigger>
<!-- Show all degree plans in the dropdown list and ddd a star next to the user's primary plan. -->
<mat-option *ngFor="let degreePlan of (allDegreePlans$ | async)" [value]="degreePlan.roadmapId">
<mat-icon class="primary-star" *ngIf="degreePlan.primary">star_rate</mat-icon>
<span class="plan-name">{{degreePlan.name}}</span>
</mat-option>
</mat-select>
</mat-form-field>
<button mat-icon-button [matMenuTriggerFor]="degreePlanMenu">
<mat-icon>settings</mat-icon>
<button mat-menu-item (click)="onCreatePlanClick()">Create new plan</button>
<button mat-menu-item (click)="onRenamePlanClick(degreePlan)">Rename plan</button>
<button mat-menu-item (click)="onDeletePlanClick(degreePlan)" [disabled]="degreePlan.primary">Delete plan</button>
<button mat-menu-item (click)="onMakePrimayClick(degreePlan)" [disabled]="degreePlan.primary">Make primary</button>
<button mat-menu-item (click)="onPrintPlanClick(degreePlan)">Print plan</button>
<button mat-menu-item (click)="onSharePlanClick(degreePlan)">Share plan</button>
<div fxLayout="column" fxLayoutGap="20px" fxLayoutAlign="start stretch" style="margin: 24px">
<mat-accordion multi="true" *ngIf="(firstActiveTermCode$ | async) as cutoffTermCode">
<ng-container *ngFor="let year of termsByYear$ | async">
<mat-expansion-panel class="year-container" [expanded]="year.expandedState" (opened)="handleAcademicYearToggle(year)" (closed)="handleAcademicYearToggle(year)">
<mat-expansion-panel-header>
<mat-panel-title>
{{ year.twoDigitYearCode | academicYearState:cutoffTermCode }}
</mat-panel-title>
</mat-expansion-panel-header>
<div fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutAlign="start stretch" class="term-container-wrapper">
<cse-term-container
id="term-{{year.fall.termCode}}"
fxFlex="33%"
[term]="year.fall"></cse-term-container>
<cse-term-container
id="term-{{year.spring.termCode}}"
fxFlex="33%"
[term]="year.spring"></cse-term-container>
<cse-term-container
id="term-{{year.summer.termCode}}"
fxFlex="33%"
[term]="year.summer"></cse-term-container>
</div>
</mat-expansion-panel>
</ng-container>
</mat-accordion>
</mat-sidenav-content>
</mat-sidenav-container>