mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[MNT-22754] fix context menus for records (#2706)
* fix context menus for records * fix unit tests * fix unit tests
This commit is contained in:
@@ -86,6 +86,7 @@ describe('evaluators', () => {
|
||||
selection: {
|
||||
file: {
|
||||
entry: {
|
||||
isFile: true,
|
||||
name: 'document.docx',
|
||||
isLocked: false,
|
||||
properties: {},
|
||||
@@ -105,6 +106,7 @@ describe('evaluators', () => {
|
||||
selection: {
|
||||
file: {
|
||||
entry: {
|
||||
isFile: true,
|
||||
name: 'document.docx',
|
||||
isLocked: false,
|
||||
properties: {},
|
||||
|
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
import { RuleContext } from '@alfresco/adf-extensions';
|
||||
import { isNodeRecord } from '@alfresco/aca-shared/rules';
|
||||
import { getFileExtension, supportedExtensions } from './utils';
|
||||
|
||||
export function canOpenWithOffice(context: RuleContext): boolean {
|
||||
@@ -76,7 +77,7 @@ export function canOpenWithOffice(context: RuleContext): boolean {
|
||||
}
|
||||
|
||||
// check if record
|
||||
if (file.entry.aspectNames && (file.entry.aspectNames.includes('rma:declaredRecord') || file.entry.aspectNames.includes('rma:record'))) {
|
||||
if (isNodeRecord(context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user