From: Jane Sandberg Date: Wed, 26 Aug 2020 18:30:02 +0000 (-0700) Subject: LP1849212: Grid improvements X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3419071e7f9781ed31fddefae8a255dfd8b6ce34;p=evergreen%2Fmasslnc.git LP1849212: Grid improvements - Correcting some grid column labels - Correcting ViewChild static flags, allowing grid refresh - Also, remove the static: false flag, since it is no longer necessary Signed-off-by: Jane Sandberg Signed-off-by: Michele Morgan Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.html index e8e470ad9e..13f9932563 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.html @@ -28,8 +28,8 @@ - - + + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.ts index 8459935c2c..4bcca821a4 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.ts @@ -1,4 +1,4 @@ -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'; @@ -21,14 +21,14 @@ import {CourseAssociateUsersComponent 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; @@ -57,6 +57,9 @@ export class CourseListComponent implements OnInit { ngOnInit() { this.getSource(); + } + + ngAfterViewInit() { this.grid.onRowActivate.subscribe((course: IdlObject) => { const idToEdit = course.id(); this.navigateToCoursePage(idToEdit);