Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading