diff --git a/lib/content-services/src/lib/content-type/content-type-dialog.component.html b/lib/content-services/src/lib/content-type/content-type-dialog.component.html index 13749d1500..27bd67b774 100644 --- a/lib/content-services/src/lib/content-type/content-type-dialog.component.html +++ b/lib/content-services/src/lib/content-type/content-type-dialog.component.html @@ -12,8 +12,8 @@ {{'CORE.METADATA.CONTENT_TYPE.DIALOG.VIEW_DETAILS' | translate}} - +
diff --git a/lib/content-services/src/lib/content-type/content-type-dialog.component.spec.ts b/lib/content-services/src/lib/content-type/content-type-dialog.component.spec.ts index 01d19807ec..c9e00f7f95 100644 --- a/lib/content-services/src/lib/content-type/content-type-dialog.component.spec.ts +++ b/lib/content-services/src/lib/content-type/content-type-dialog.component.spec.ts @@ -29,9 +29,20 @@ const elementCustom: TypeEntry = { entry: { id: 'ck:pippobaudo', title: 'PIPPO-BAUDO', + model: { id: 'what', namespacePrefix: 'ck' }, description: 'Doloro reaepgfihawpefih peahfa powfj p[qwofhjaq[ fq[owfj[qowjf[qowfgh[qowh f[qowhfj [qwohf', parentId: 'cm:content', properties: [ + { + id: 'lm:PropA', + dataType: 'lm:notshowed', + defaultValue: 'I NEVER show uP', + description: 'A inherited property', + isMandatory: false, + isMandatoryEnforced: false, + isMultiValued: false, + title: 'PropertyHidden' + }, { id: 'ck:PropA', dataType: 'ck:propA', @@ -135,7 +146,7 @@ describe('Content Type Dialog Component', () => { fixture.detectChanges(); }); - it('should show the property of the aspect', async () => { + it('should show the property with the aspect prefix not the inherited ones', async () => { const showPropertyAccordon: HTMLButtonElement = fixture.nativeElement.querySelector('.adf-content-type-accordion .mat-expansion-panel-header'); expect(showPropertyAccordon).toBeDefined(); showPropertyAccordon.click(); diff --git a/lib/content-services/src/lib/content-type/content-type-dialog.component.ts b/lib/content-services/src/lib/content-type/content-type-dialog.component.ts index e284fe45be..e12b970ef6 100644 --- a/lib/content-services/src/lib/content-type/content-type-dialog.component.ts +++ b/lib/content-services/src/lib/content-type/content-type-dialog.component.ts @@ -35,6 +35,7 @@ export class ContentTypeDialogComponent implements OnInit { confirmMessage: string; currentContentType: TypeEntry; + typeProperties: any[] = []; propertyColumns: string[] = ['name', 'title', 'dataType']; @@ -48,6 +49,7 @@ export class ContentTypeDialogComponent implements OnInit { this.contentTypeService.getContentTypeByPrefix(this.nodeType).subscribe((contentTypeEntry) => { this.currentContentType = contentTypeEntry; + this.typeProperties = this.currentContentType.entry.properties.filter((property) => property.id.startsWith(this.currentContentType.entry.model.namespacePrefix)); }); }
{{'CORE.METADATA.CONTENT_TYPE.DIALOG.PROPERTY.NAME' | translate}}