Skip to content
Snippets Groups Projects
term-container.component.html 2.27 KiB
Newer Older
<mat-card class="term-container">
    <div class="term-inner">
        <div fxLayout="row" class="term-header" fxLayoutAlign="space-between center">
            <h2>{{ term.termCode | getTermDescription }}</h2>
            <div fxLayout="row" fxLayoutAlign="end center">
                <p class="text-right semi-bold credits">{{getTotalCredits()}} Cr</p>
                <button mat-icon-button>
                    <mat-icon aria-label="Open dialog with notes in this term" class="add-note-icon" (click)="openNotesDialog(false, term.termCode)" matTooltip="Add Note" matTooltipPosition="above">note_add</mat-icon>
                    <!-- <mat-icon aria-label="Open dialog with notes in this term" class="add-note-icon" (click)="openNotesDialog(false, term.termCode)" matTooltip="Edit Note" matTooltipPosition="above">insert_drive_file</mat-icon> -->
                 </button>
            </div>
        </div>
        <div
            cdkDropList
            id="term-{{term.termCode}}"
            [cdkDropListData]="courses"
            [cdkDropListConnectedTo]="termCodes"
            class="course-list"
            (cdkDropListDropped)="drop($event)">
            <ng-container *ngFor="let note of notes | async">
                <div *ngIf="note.termCode == term.termCode" class="note-item" (click)="openNotesDialog(note, term.termCode)" >
                    <p class="semi-bold">Note</p>
                    <p class="note-excerpt">{{ note.note }}</p>
                </div>
            </ng-container>
            <div class="course-wrapper" [cdkDragData]="course" *ngFor="let course of courses" cdkDrag>
                <div class="course-wrapper-inner">
                    <cse-course-item 
                        [course]="course"
                        [courses]="courses"
                        [term]="term"
                        [favoriteCourses]="favoriteCourses"
                        [termsByAcademicYear]="termsByAcademicYear"
                        [status]="'in-progress'"
                        [subject]="subjectsMap[course.subjectCode]"
                    ></cse-course-item>
                </div>
            </div>
        </div>
    </div>
    <div class="add-new-wrapper">
        <button mat-raised-button  (click)="openAddSidenav()">+ Add Course</button>
    </div>
</mat-card>