[AAE-5139] User name style and Discovery service initialization fix (#7010)

* [AAE-5139] User name style fix and Discovery serice fixed

* * fixed unit test

* * fixed test and us latest js-api events

* * tests fixed

* * update js api

* * fixed test and lint
This commit is contained in:
Dharan
2021-05-12 00:10:21 +05:30
committed by GitHub
parent 453198c1e8
commit e603486b00
31 changed files with 34543 additions and 132 deletions

View File

@@ -16,10 +16,10 @@
*/
import { Injectable } from '@angular/core';
import { from, merge, Observable, throwError, Subject } from 'rxjs';
import { from, Observable, throwError, Subject } from 'rxjs';
import { BpmProductVersionModel, EcmProductVersionModel } from '../models/product-version.model';
import { AlfrescoApiService } from './alfresco-api.service';
import { catchError, filter, map, switchMap, take } from 'rxjs/operators';
import { catchError, map, switchMap, filter, take } from 'rxjs/operators';
import { Activiti, SystemPropertiesRepresentation } from '@alfresco/js-api';
import { AuthenticationService } from './authentication.service';
@@ -37,9 +37,10 @@ export class DiscoveryApiService {
private apiService: AlfrescoApiService,
private authenticationService: AuthenticationService) {
merge(this.authenticationService.onTokenExchange.pipe(take(1)), this.authenticationService.onLogin)
this.authenticationService.onLogin
.pipe(
filter(() => this.apiService.getInstance()?.isEcmLoggedIn()),
take(1),
switchMap(() => this.getEcmProductInfo())
)
.subscribe((info) => this.ecmProductInfo$.next(info));