From d4a230f96dbf414b4b5b6a611a1f2c5ed3ca0aeb Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Fri, 15 Nov 2024 14:06:11 +0100 Subject: [PATCH] AW-6495 Exception editor croppingscheme: do not use 'item' in route --- .../common/src/fm/effects/app-common.effects.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/projects/common/src/fm/effects/app-common.effects.ts b/projects/common/src/fm/effects/app-common.effects.ts index d2570ec..4b19019 100644 --- a/projects/common/src/fm/effects/app-common.effects.ts +++ b/projects/common/src/fm/effects/app-common.effects.ts @@ -139,10 +139,17 @@ export class AppCommonEffects { const itemType = itemtypes[a.item.itemType]; var editor = itemType && itemType.editor ? itemType.editor : editor; } - this.router$.navigate(['/editor',editor,'item', a.item.code]) - return []; - } - ))); + if (editor == 'croppingscheme') { + // Exeception: no 'item' in route + this.router$.navigate(['/editor', editor, a.item.code]) + } + else { + this.router$.navigate(['/editor', editor, 'item', a.item.code]) + } + return []; + } + ) + )); viewItem$ = createEffect(() => this.actions$.pipe( ofType(appCommonActions.VIEWITEM),