mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[AAE-10767] Separate core card view logic from content-services and add documentation to reflect the changes (#7952)
This commit is contained in:
@@ -16,8 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AlfrescoApiService, CardViewUpdateService, NodesApiService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, NodesApiService } from '@alfresco/adf-core';
|
||||
import { DialogAspectListService } from './dialog-aspect-list.service';
|
||||
import { CardViewContentUpdateService } from '../../services/card-view-content-update.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -27,14 +28,14 @@ export class NodeAspectService {
|
||||
constructor(private alfrescoApiService: AlfrescoApiService,
|
||||
private nodesApiService: NodesApiService,
|
||||
private dialogAspectListService: DialogAspectListService,
|
||||
private cardViewUpdateService: CardViewUpdateService) {
|
||||
private cardViewContentUpdateService: CardViewContentUpdateService) {
|
||||
}
|
||||
|
||||
updateNodeAspects(nodeId: string, selectorAutoFocusedOnClose?: string) {
|
||||
this.dialogAspectListService.openAspectListDialog(nodeId, selectorAutoFocusedOnClose).subscribe((aspectList) => {
|
||||
this.nodesApiService.updateNode(nodeId, { aspectNames: [...aspectList] }).subscribe((updatedNode) => {
|
||||
this.alfrescoApiService.nodeUpdated.next(updatedNode);
|
||||
this.cardViewUpdateService.updateNodeAspect(updatedNode);
|
||||
this.cardViewContentUpdateService.updateNodeAspect(updatedNode);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user