From: Jane Sandberg Date: Sat, 12 Sep 2020 15:08:46 +0000 (-0700) Subject: Angular component properties must be public to be used in a template X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fe55067d2189edde4c874575eaef1ad7e87b3557;p=Evergreen.git Angular component properties must be public to be used in a template The JIT compiler (used in ng build) doesn't mind when private properties are used in templates. The AOT compiler (used in ng build --prod) does, though. Marking these two properties as public allows ng build --prod to complete. Also removes some unnecessary imports. Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts index 7eb6899aa0..159bcb92ec 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts @@ -1,11 +1,9 @@ import {Component, OnInit, AfterViewInit, ViewChild, ChangeDetectorRef, OnDestroy} from '@angular/core'; import {filter, takeUntil} from 'rxjs/operators'; import {Subject, Observable, of} from 'rxjs'; -import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; import {Router, ActivatedRoute, ParamMap, RouterEvent, NavigationEnd} from '@angular/router'; -import {StaffCommonModule} from '@eg/staff/common.module'; -import {IdlService, IdlObject} from '@eg/core/idl.service'; -import {PcrudService} from '@eg/core/pcrud.service'; +import {IdlService} from '@eg/core/idl.service'; import {AcqProviderSummaryPaneComponent} from './summary-pane.component'; import {ProviderDetailsComponent} from './provider-details.component'; import {ProviderHoldingsComponent} from './provider-holdings.component'; @@ -51,9 +49,8 @@ export class AcqProviderComponent implements OnInit, AfterViewInit, OnDestroy { private router: Router, private route: ActivatedRoute, private auth: AuthService, - private pcrud: PcrudService, private idl: IdlService, - private providerRecord: ProviderRecordService, + public providerRecord: ProviderRecordService, private toast: ToastService, private store: StoreService, private changeDetector: ChangeDetectorRef diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-record.service.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-record.service.ts index 4f46b512c9..99e5d78db0 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-record.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-record.service.ts @@ -1,10 +1,9 @@ import {Injectable} from '@angular/core'; -import {Observable, from} from 'rxjs'; -import {empty, throwError, Subject} from 'rxjs'; +import {Observable} from 'rxjs'; +import {Subject} from 'rxjs'; import {map, defaultIfEmpty} from 'rxjs/operators'; import {PcrudService} from '@eg/core/pcrud.service'; import {IdlService, IdlObject} from '@eg/core/idl.service'; -import {NetService} from '@eg/core/net.service'; import {PermService} from '@eg/core/perm.service'; export class ProviderSummary { @@ -27,7 +26,7 @@ export class ProviderRecord { @Injectable() export class ProviderRecordService { - private currentProvider: ProviderRecord; + public currentProvider: ProviderRecord; private currentProviderId: number = null; private providerUpdatedSource = new Subject(); @@ -38,7 +37,6 @@ export class ProviderRecordService { constructor( private idl: IdlService, - private net: NetService, private pcrud: PcrudService, private perm: PermService ) {