[MNT-24637] ADW: Options to edit files marked as records available in Favorites Files list (#10289)

This commit is contained in:
jacekpluta
2024-10-09 08:44:27 +02:00
committed by GitHub
parent a93f0bd069
commit 3d495932fe
3 changed files with 16 additions and 4 deletions

View File

@@ -46,7 +46,9 @@ describe('CustomResourcesService', () => {
title: 'some-title', title: 'some-title',
description: 'some-description' description: 'some-description'
} }
} },
aspectNames: ['aspect-name-1', 'aspect-name-2'],
allowableOperations: ['allowable-operation-1', 'allowable-operation-2']
}) })
} }
] ]
@@ -68,7 +70,9 @@ describe('CustomResourcesService', () => {
properties: { properties: {
'cm:title': 'some-title', 'cm:title': 'some-title',
'cm:description': 'some-description' 'cm:description': 'some-description'
} },
aspectNames: ['aspect-name-1', 'aspect-name-2'],
allowableOperations: ['allowable-operation-1', 'allowable-operation-2']
} }
} as any } as any
]); ]);
@@ -92,7 +96,9 @@ describe('CustomResourcesService', () => {
title: 'some-title', title: 'some-title',
description: 'some-description' description: 'some-description'
} }
} },
aspectNames: ['aspect-name-1', 'aspect-name-2'],
allowableOperations: ['allowable-operation-1', 'allowable-operation-2']
}) })
} }
] ]
@@ -115,7 +121,9 @@ describe('CustomResourcesService', () => {
'cm:title': 'some-title', 'cm:title': 'some-title',
'cm:description': 'some-description', 'cm:description': 'some-description',
'cm:property': 'some-property' 'cm:property': 'some-property'
} },
aspectNames: ['aspect-name-1', 'aspect-name-2'],
allowableOperations: ['allowable-operation-1', 'allowable-operation-2']
} }
} as any } as any
]); ]);

View File

@@ -207,6 +207,8 @@ export class CustomResourcesService {
}), }),
...(entry.properties || {}) ...(entry.properties || {})
}; };
target.aspectNames = entry?.aspectNames ?? [];
target.allowableOperations = entry?.allowableOperations ?? [];
return { return {
entry: target entry: target

View File

@@ -35,6 +35,8 @@ export class Favorite {
* A subset of the target favorite properties, system properties and properties already available in the target are excluded. * A subset of the target favorite properties, system properties and properties already available in the target are excluded.
*/ */
properties?: any; properties?: any;
aspectNames?: string[];
allowableOperations?: string[];
constructor(input?: Partial<Favorite>) { constructor(input?: Partial<Favorite>) {
if (input) { if (input) {