From 81770f6b786b2be99df39bc24cfd8155278a6d1a Mon Sep 17 00:00:00 2001 From: Demerson Carvalho Date: Mon, 9 Feb 2026 10:47:00 -0300 Subject: [PATCH] DECAF-26 - fix page directive menu label --- src/lib/components/modal/modal.component.ts | 6 ++++++ src/lib/engine/NgxPageDirective.ts | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/components/modal/modal.component.ts b/src/lib/components/modal/modal.component.ts index a2b4cb91..dc236fc5 100644 --- a/src/lib/components/modal/modal.component.ts +++ b/src/lib/components/modal/modal.component.ts @@ -346,6 +346,12 @@ export class ModalComponent extends NgxParentComponentDirective implements OnIni * @returns {Promise} - A promise that resolves when the event is handled. */ override async handleEvent(event: IBaseCustomEvent): Promise { + // if (event instanceof Event || event.name === ComponentEventNames.Refresh) { + // if (event instanceof Event) { + // event.stopImmediatePropagation(); + // } + // return; + // } if (event instanceof Event) { event.stopImmediatePropagation(); } diff --git a/src/lib/engine/NgxPageDirective.ts b/src/lib/engine/NgxPageDirective.ts index ea21235e..dd32f818 100644 --- a/src/lib/engine/NgxPageDirective.ts +++ b/src/lib/engine/NgxPageDirective.ts @@ -209,8 +209,11 @@ export abstract class NgxPageDirective extends NgxComponentDirective implements if (!menu) menu = this.menu; const activeMenu = menu.find((item) => item?.url?.includes(route)); if (activeMenu) { - const label = `${(activeMenu?.title || activeMenu?.label || '').toLowerCase()}`; - const title = `${await this.translate(label ? 'menu.' + label : label)} ${this.appName ? `- ${this.appName}` : ''}`; + let label = `${(activeMenu?.title || activeMenu?.label || '').toLowerCase()}`; + if (!label.startsWith('menu.')) { + label = `menu.${label}`; + } + const title = `${await this.translate(label)} ${this.appName ? `- ${this.appName}` : ''}`; this.titleService.setTitle(title); if (!this.title) this.title = title; }