</eg-grid-toolbar-action>
<eg-grid-column label="ID" path="id" [index]=true [hidden]="true" i18n-label></eg-grid-column>
<eg-grid-column label="Terms taught" name="terms_map" i18n-label [cellTemplate]="termMapLink"></eg-grid-column>
- <eg-grid-column label="Title" name="name" i18n-label></eg-grid-column>
- <eg-grid-column label="CourseNumber" name="course_number" i18n-label></eg-grid-column>
+ <eg-grid-column label="Course Name" name="name" i18n-label></eg-grid-column>
+ <eg-grid-column label="Course Number" name="course_number" i18n-label></eg-grid-column>
<eg-grid-column label="Section Number" name="section_number" i18n-label></eg-grid-column>
<eg-grid-column label="Is Archived?" name="is_archived" i18n-label datatype="bool"></eg-grid-column>
</eg-grid>
-import {Component, Input, ViewChild, OnInit} from '@angular/core';
+import {Component, Input, ViewChild, OnInit, AfterViewInit} from '@angular/core';
import {Router} from '@angular/router';
import {IdlObject} from '@eg/core/idl.service';
import {PcrudService} from '@eg/core/pcrud.service';
templateUrl: './course-list.component.html'
})
-export class CourseListComponent implements OnInit {
+export class CourseListComponent implements OnInit, AfterViewInit {
@ViewChild('editDialog', { static: true }) editDialog: FmRecordEditorComponent;
- @ViewChild('grid', { static: true }) grid: GridComponent;
+ @ViewChild('grid') grid: GridComponent;
@ViewChild('successString', { static: true }) successString: StringComponent;
- @ViewChild('createString', { static: false }) createString: StringComponent;
- @ViewChild('createErrString', { static: false }) createErrString: StringComponent;
- @ViewChild('updateFailedString', { static: false }) updateFailedString: StringComponent;
+ @ViewChild('createString') createString: StringComponent;
+ @ViewChild('createErrString') createErrString: StringComponent;
+ @ViewChild('updateFailedString') updateFailedString: StringComponent;
@ViewChild('deleteFailedString', { static: true }) deleteFailedString: StringComponent;
@ViewChild('deleteSuccessString', { static: true }) deleteSuccessString: StringComponent;
@ViewChild('archiveFailedString', { static: true }) archiveFailedString: StringComponent;
ngOnInit() {
this.getSource();
+ }
+
+ ngAfterViewInit() {
this.grid.onRowActivate.subscribe((course: IdlObject) => {
const idToEdit = course.id();
this.navigateToCoursePage(idToEdit);