Skip to content
Snippets Groups Projects
Commit eead960f authored by pnogal's avatar pnogal Committed by Paulina Nogal
Browse files

Markup for Add Course to plan sidenav

parent 309bbab1
No related branches found
No related tags found
No related merge requests found
...@@ -2,21 +2,88 @@ ...@@ -2,21 +2,88 @@
<cse-header></cse-header> <cse-header></cse-header>
<cse-navigation></cse-navigation> <cse-navigation></cse-navigation>
</header> </header>
<main> <main>
<mat-sidenav-container class="example-container" hasBackdrop="false"> <mat-sidenav-container class="example-container" hasBackdrop="false">
<mat-sidenav #rightAddCourse2 mode="over" position="end">Drawer content 2 <mat-sidenav #rightAddCourse2 mode="over" position="end">
</mat-sidenav> <mat-toolbar color="primary" class="dialog-toolbar">
<mat-sidenav-content> <button mat-button class="close-btn" (click)="closeSidenav(rightAddCourse2)"><i class="material-icons">clear</i></button>
<mat-sidenav-container> <span class="dialog-toolbar-title">Add course to degree plan</span>
<mat-sidenav #rightAddCourse class="add-sidenav1"mode="over" position="end"> </mat-toolbar>
<div>content Course Details
<button mat-button class="btn-primary" (click)="rightAddCourse2.toggle()">Next side nav</button> <!-- <cse-course-details></cse-course-details> -->
</div> </mat-sidenav>
</mat-sidenav> <mat-sidenav-content>
<mat-sidenav-content> <mat-sidenav-container>
<router-outlet></router-outlet> <mat-sidenav #rightAddCourse class="add-sidenav1" mode="over" position="end">
</mat-sidenav-content> <mat-toolbar color="primary" class="dialog-toolbar">
</mat-sidenav-container> <span class="dialog-toolbar-title">Course Search</span>
</mat-sidenav-content> <button mat-button class="close-btn" (click)="closeSidenav(rightAddCourse)"><i class="material-icons">clear</i></button>
</mat-sidenav-container> </mat-toolbar>
</main> <div fxLayout="column" fxLayoutAlign="space-around none" style="padding: 12px 22px;">
<mat-form-field>
<mat-select placeholder="Term" required>
<mat-option *ngFor="let term of coursesData$ | async" [value]="term">
{{ term[0].termCode | getTermDescription }}
</mat-option>
<!-- <mat-option>Spring 2019</mat-option>
<mat-option>Summer 2019</mat-option>
<mat-option>Fall 2019</mat-option>
<mat-option>Spring 2020</mat-option>
<mat-option>Summer 2020</mat-option> -->
</mat-select>
<!-- <mat-error *ngIf="terms.hasError('required')">Please select term</mat-error> -->
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Subject" [formControl]="" required>
<mat-option>Afro-American Studies</mat-option>
<mat-option>Agricultural and Applied Economics</mat-option>
<mat-option>Agroecology</mat-option>
<mat-option>Agronomy</mat-option>
<mat-option>Air Force Aerospace Studies</mat-option>
<mat-option>American Indian Studies</mat-option>
<mat-option>Anatomy</mat-option>
<mat-option>Anatomy & Physiology</mat-option>
</mat-select>
<!-- <mat-error *ngIf="terms.hasError('required')">Please select an existing subject or 'All'.</mat-error> -->
</mat-form-field>
<mat-form-field class="example-full-width">
<input matInput placeholder="Subject, number" value="">
</mat-form-field>
</div>
<div class="search-results-toolbar mat-typography" fxLayout="row" fxLayoutAlign="space-between center" style="padding: 12px 22px; background-color: #EDF1F3">
<h3 style="margin: 0px;">7 of 7 results</h3>
<span class="mat-button">Reset Search</span>
</div>
<div id="course-search-results" fxLayout="column" fxLayoutAlign="space-around none" style="padding: 12px 22px;">
<mat-form-field>
<mat-select placeholder="Order by">
<mat-option>Relevance</mat-option>
<mat-option>Subject</mat-option>
<mat-option>Catalog Number</mat-option>
</mat-select>
</mat-form-field>
<cse-course-item (click)="rightAddCourse2.toggle()"
style="padding: 8px;
border: solid 1px #FDFDFD;
background-color: #FDFDFD;
border-radius: 5px;
font-family: 'Helvetica Neue', Georgia, Helvetica, Arial, sans-serif;
font-size: 14px;
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.1);
cursor: pointer;">
Chem 101
</cse-course-item>
</div>
</mat-sidenav>
<mat-sidenav-content>
<router-outlet></router-outlet>
</mat-sidenav-content>
</mat-sidenav-container>
</mat-sidenav-content>
</mat-sidenav-container>
</main>
import { SidenavService } from './core/service/sidenav.service'; import { SidenavService } from './core/service/sidenav.service';
import { DataService } from './core/data.service';
import { Component, ViewChild, OnInit } from '@angular/core'; import { Component, ViewChild, OnInit } from '@angular/core';
import { MatSidenav } from '@angular/material'; import { MatSidenav } from '@angular/material';
import { ActivatedRoute } from '@angular/router';
import { DegreePlannerDataService } from './core/service/degree-planner-data.service';
// import { FormBuilder, FormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'cse-root', selector: 'cse-root',
...@@ -14,8 +18,27 @@ export class AppComponent implements OnInit { ...@@ -14,8 +18,27 @@ export class AppComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.sidenavService.setSidenav(this.rightAddCourse); this.sidenavService.setSidenav(this.rightAddCourse);
} }
} coursesData$: any;
selectedDegreePlan: number;
@ViewChild('rightAddCourse') public rightAddCourse: MatSidenav;
constructor(
private dataService: DataService,
private route: ActivatedRoute,
private sidenavService: SidenavService,
private degreePlannerDataSvc: DegreePlannerDataService) {
this.selectedDegreePlan = 520224;
this.coursesData$ = this.degreePlannerDataSvc.getDegreePlanDataById(this.selectedDegreePlan);
}
ngOnInit() {
this.sidenavService.setSidenav(this.rightAddCourse);
}
closeSidenav(id) {
return id.close();
}
}
document.addEventListener('WebComponentsReady', function() { document.addEventListener('WebComponentsReady', function() {
const customEvent = new CustomEvent('myuw-login', { const customEvent = new CustomEvent('myuw-login', {
detail: { detail: {
......
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