diff --git a/package.json b/package.json index 63437c6..413b90b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gallery-ui", - "version": "1.4.2", + "version": "1.4.3-rc1", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/src/app/components/archive/archive.component.ts b/src/app/components/archive/archive.component.ts index e00f0a8..8a0dfb1 100755 --- a/src/app/components/archive/archive.component.ts +++ b/src/app/components/archive/archive.component.ts @@ -38,7 +38,6 @@ import { ComnSettingsService } from '@cmusei/crucible-common'; }) export class ArchiveComponent implements OnDestroy { @Input() showAdminButton: boolean; - @Input() teamList$: Observable; @Output() changeTeam = new EventEmitter(); apiIsSick = false; apiMessage = 'The GALLERY API web service is not responding.'; @@ -97,6 +96,7 @@ export class ArchiveComponent implements OnDestroy { ) { this._document.getElementById('appFavicon').setAttribute('href', '/assets/img/archive-blue.png'); this._document.getElementById('appTitle').innerHTML = this.settingsService.settings.AppTitle + ' Archive'; + // subscribe to userArticles this.userArticleQuery.selectAll().pipe(takeUntil(this.unsubscribe$)).subscribe(userArticles => { this.userArticleList = []; this.filteredUserArticleList = []; @@ -121,6 +121,7 @@ export class ArchiveComponent implements OnDestroy { this.settingsService.settings.AppTitle + ' Archive (' + unreadCount.toString() + ')'; } }); + // subscribe to cards this.cardQuery.selectAll().pipe(takeUntil(this.unsubscribe$)).subscribe(cards => { this.cardList = []; cards.forEach(card => { @@ -129,6 +130,7 @@ export class ArchiveComponent implements OnDestroy { this.sortChanged(this.sort); this.setCardLists(); }); + // subscribe to active exhibit (this.exhibitQuery.selectActive() as Observable).pipe(takeUntil(this.unsubscribe$)).subscribe(e => { if (!e) { if (this.exhibitId) { @@ -138,6 +140,7 @@ export class ArchiveComponent implements OnDestroy { this.exhibit = e; } }); + // subscribe to url query parameters this.activatedRoute.queryParamMap .pipe(takeUntil(this.unsubscribe$)) .subscribe((params) => { @@ -155,12 +158,14 @@ export class ArchiveComponent implements OnDestroy { this.cardId = cardId ? cardId : 'all'; this.sortChanged(this.sort); }); + // subscribe to filter control changes this.filterControl.valueChanges .pipe(takeUntil(this.unsubscribe$)) .subscribe((term) => { this.filterString = term; this.sortChanged(this.sort); }); + // subscribe to teamCards this.teamCardQuery.selectAll() .pipe(takeUntil(this.unsubscribe$)) .subscribe(teamCards => { @@ -168,6 +173,10 @@ export class ArchiveComponent implements OnDestroy { this.setCardLists(); this.sortChanged(this.sort); }); + // subscribe to teams + this.teamQuery.selectAll().pipe(takeUntil(this.unsubscribe$)).subscribe(teams => { + this.teamList = teams; + }); } getCardName(id: string) { diff --git a/src/app/components/home-app/home-app.component.html b/src/app/components/home-app/home-app.component.html index b3fa1bd..c99c6ac 100755 --- a/src/app/components/home-app/home-app.component.html +++ b/src/app/components/home-app/home-app.component.html @@ -57,7 +57,6 @@

If the problem persists, please contact the site administrator.

@@ -66,7 +65,6 @@

If the problem persists, please contact the site administrator.

diff --git a/src/app/components/home-app/home-app.component.ts b/src/app/components/home-app/home-app.component.ts index 9ff06cd..4c0ba38 100755 --- a/src/app/components/home-app/home-app.component.ts +++ b/src/app/components/home-app/home-app.component.ts @@ -48,7 +48,6 @@ export class HomeAppComponent implements OnDestroy, OnInit { allExhibits: Exhibit[] = []; exhibitList: Exhibit[] = []; teamList: Team[] = []; - teamList$ = new BehaviorSubject([]); selectedTeamId = ''; isContentDeveloper$ = this.userDataService.isContentDeveloper.asObservable(); isAuthorizedUser = false; diff --git a/src/app/components/wall/wall.component.ts b/src/app/components/wall/wall.component.ts index 662674a..d0443f2 100755 --- a/src/app/components/wall/wall.component.ts +++ b/src/app/components/wall/wall.component.ts @@ -21,7 +21,6 @@ import { ComnSettingsService } from '@cmusei/crucible-common'; }) export class WallComponent implements OnDestroy { @Input() showAdminButton: boolean; - @Input() teamList$: Observable; @Output() changeTeam = new EventEmitter(); isLoading = false; cardList: Card[] = [];