mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-2948] Add API to fetch the bpm properties (#5610)
* Add the api to fetch the bpm properties * remove useless map * Use latest api * Use the BehaviorSubject * filter the status true
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
AlfrescoApiCompatibility, AlfrescoApiConfig
|
||||
} from '@alfresco/js-api';
|
||||
import { AppConfigService, AppConfigValues } from '../app-config/app-config.service';
|
||||
import { Subject, Observable } from 'rxjs';
|
||||
import { Subject, Observable, BehaviorSubject } from 'rxjs';
|
||||
import { OauthConfigModel } from '../models/oauth-config.model';
|
||||
import { StorageService } from './storage.service';
|
||||
|
||||
@@ -40,7 +40,7 @@ export class AlfrescoApiService {
|
||||
*/
|
||||
nodeUpdated = new Subject<Node>();
|
||||
|
||||
protected alfrescoApiInitializedSubject: Subject<any>;
|
||||
protected alfrescoApiInitializedSubject: BehaviorSubject<any>;
|
||||
alfrescoApiInitialized: Observable<any>;
|
||||
|
||||
protected alfrescoApi: AlfrescoApiCompatibility;
|
||||
@@ -102,7 +102,7 @@ export class AlfrescoApiService {
|
||||
constructor(
|
||||
protected appConfig: AppConfigService,
|
||||
protected storageService: StorageService) {
|
||||
this.alfrescoApiInitializedSubject = new Subject();
|
||||
this.alfrescoApiInitializedSubject = new BehaviorSubject(null);
|
||||
this.alfrescoApiInitialized = this.alfrescoApiInitializedSubject.asObservable();
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ export class AlfrescoApiService {
|
||||
await this.appConfig.load().then(() => {
|
||||
this.storageService.prefix = this.appConfig.get<string>(AppConfigValues.STORAGE_PREFIX, '');
|
||||
this.initAlfrescoApi();
|
||||
this.alfrescoApiInitializedSubject.next();
|
||||
this.alfrescoApiInitializedSubject.next(true);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user