@@ -54,6 +54,7 @@ import { Section } from './core/layout/models/section.model';
5454import { NOTIFICATIONS_RECITER_SUGGESTION_PATH } from './admin/admin-notifications/admin-notifications-routing-paths' ;
5555import { ConfigurationDataService } from './core/data/configuration-data.service' ;
5656import { ConfigurationProperty } from './core/shared/configuration-property.model' ;
57+ import { HardRedirectService } from './core/services/hard-redirect.service' ;
5758
5859/**
5960 * Creates all of the app's menus
@@ -73,6 +74,7 @@ export class MenuResolver implements Resolve<boolean> {
7374 protected scriptDataService : ScriptDataService ,
7475 protected sectionDataService : SectionDataService ,
7576 protected configService : ConfigurationDataService ,
77+ private hardRedirectService : HardRedirectService ,
7678 ) {
7779 }
7880
@@ -625,12 +627,15 @@ export class MenuResolver implements Resolve<boolean> {
625627 id : 'loginmiur_dlexporter_url' ,
626628 parentID : 'export' ,
627629 active : false ,
628- visible : authorized && hasValue ( url ) ,
630+ visible : authorized && ( hasValue ( url ) && url . length > 0 ) ,
629631 model : {
630- type : MenuItemType . EXTERNAL ,
631- link : url ,
632+ type : MenuItemType . ONCLICK ,
632633 text : 'menu.section.loginmiur_dlexporter_url' ,
633- } as LinkMenuItemModel ,
634+ function : ( ) => {
635+ // redirect to external URL
636+ this . hardRedirectService . redirect ( url ) ;
637+ }
638+ } as OnClickMenuItemModel ,
634639 shouldPersistOnRouteChange : true
635640 } ) ;
636641 } ) ;
0 commit comments