Skip to content

Commit

Permalink
[ACS-6831] Correctly pass stored displayAspect to metadata component (#…
Browse files Browse the repository at this point in the history
…3663)

* [ACS-6831] Correctly pass stored displayAspect to metadata component

* [ACS-6831] Bump ADF version
  • Loading branch information
MichalKinas authored Feb 26, 2024
1 parent 8ca0d69 commit 8c45ab9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 38 deletions.
60 changes: 30 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "6.7.0-8009374031",
"@alfresco/adf-core": "6.7.0-8009374031",
"@alfresco/adf-extensions": "6.7.0-8009374031",
"@alfresco/eslint-plugin-eslint-angular": "6.7.0-8009374031",
"@alfresco/js-api": "7.6.0-8009374031",
"@alfresco/adf-content-services": "6.7.0-8045358395",
"@alfresco/adf-core": "6.7.0-8045358395",
"@alfresco/adf-extensions": "6.7.0-8045358395",
"@alfresco/eslint-plugin-eslint-angular": "6.7.0-8045358395",
"@alfresco/js-api": "7.6.0-8045358395",
"@angular/animations": "14.1.3",
"@angular/cdk": "14.1.3",
"@angular/common": "14.1.3",
Expand Down Expand Up @@ -66,7 +66,7 @@
"zone.js": "0.11.8"
},
"devDependencies": {
"@alfresco/adf-cli": "6.7.0-8009374031",
"@alfresco/adf-cli": "6.7.0-8045358395",
"@angular-devkit/build-angular": "14.2.11",
"@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import { Component, Input, ViewEncapsulation, OnInit, OnDestroy } from '@angular/core';
import { Node } from '@alfresco/js-api';
import { NodePermissionService, isLocked, AppExtensionService } from '@alfresco/aca-shared';
import { EditOfflineAction, NodeActionTypes } from '@alfresco/aca-shared/store';
import { AppStore, EditOfflineAction, NodeActionTypes, infoDrawerMetadataAspect } from '@alfresco/aca-shared/store';
import { AppConfigService, NotificationService } from '@alfresco/adf-core';
import { Observable, Subject } from 'rxjs';
import {
Expand All @@ -38,6 +38,7 @@ import {
import { filter, map, takeUntil } from 'rxjs/operators';
import { CommonModule } from '@angular/common';
import { Actions, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';

@Component({
standalone: true,
Expand All @@ -51,6 +52,7 @@ import { Actions, ofType } from '@ngrx/effects';
[customPanels]="customPanels | async"
[displayCategories]="displayCategories"
[displayTags]="displayTags"
[displayAspect]="metadataAspect"
>
</adf-content-metadata>
`,
Expand All @@ -67,6 +69,7 @@ export class MetadataTabComponent implements OnInit, OnDestroy {

readOnly = false;
customPanels: Observable<ContentMetadataCustomPanel[]>;
metadataAspect: string;

get displayCategories(): boolean {
return this._displayCategories;
Expand All @@ -83,7 +86,8 @@ export class MetadataTabComponent implements OnInit, OnDestroy {
private contentMetadataService: ContentMetadataService,
private actions$: Actions,
private tagService: TagService,
private categoryService: CategoryService
private categoryService: CategoryService,
private store: Store<AppStore>
) {
if (this.extensions.contentMetadata) {
this.appConfig.config['content-metadata'].presets = this.extensions.contentMetadata.presets;
Expand Down Expand Up @@ -115,6 +119,10 @@ export class MetadataTabComponent implements OnInit, OnDestroy {
}),
takeUntil(this.onDestroy$)
);
this.store
.select(infoDrawerMetadataAspect)
.pipe(takeUntil(this.onDestroy$))
.subscribe((metadataAspect) => (this.metadataAspect = metadataAspect));
}

ngOnDestroy() {
Expand Down

0 comments on commit 8c45ab9

Please sign in to comment.