Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix linting warnings

Benjamin Bädorf839af7fd9775
diff --git a/frontend/src/app/features/in-app-notifications/center/menu/menu.component.ts b/frontend/src/app/features/in-app-notifications/center/menu/menu.component.ts
index fa21f083406..b51724bf686 100644
--- a/frontend/src/app/features/in-app-notifications/center/menu/menu.component.ts
+++ b/frontend/src/app/features/in-app-notifications/center/menu/menu.component.ts
@@ -14,6 +14,11 @@ import { IanMenuService } from './state/ian-menu.service';
export const ianMenuSelector = 'op-ian-menu';
+const getUiLinkForFilters = (filters:INotificationPageQueryParameters = {}) => ({
+ uiSref: 'notifications.center.show',
+ uiParams: filters,
+});
+
@Component({
selector: ianMenuSelector,
templateUrl: './menu.component.html',
@@ -27,7 +32,7 @@ export class IanMenuComponent implements OnInit {
key: 'inbox',
title: this.I18n.t('js.notifications.menu.inbox'),
icon: 'inbox',
- ...this.getUiLinkForFilters({ filter: '', name: '' }),
+ ...getUiLinkForFilters({ filter: '', name: '' }),
},
];
@@ -36,25 +41,25 @@ export class IanMenuComponent implements OnInit {
key: 'mentioned',
title: this.I18n.t('js.notifications.menu.mentioned'),
icon: 'mention',
- ...this.getUiLinkForFilters({ filter: 'reason', name: 'mentioned' }),
+ ...getUiLinkForFilters({ filter: 'reason', name: 'mentioned' }),
},
{
key: 'assigned',
title: this.I18n.t('js.notifications.menu.assigned'),
icon: 'assigned',
- ...this.getUiLinkForFilters({ filter: 'reason', name: 'assigned' }),
+ ...getUiLinkForFilters({ filter: 'reason', name: 'assigned' }),
},
{
key: 'responsible',
title: this.I18n.t('js.notifications.menu.accountable'),
icon: 'accountable',
- ...this.getUiLinkForFilters({ filter: 'reason', name: 'responsible' }),
+ ...getUiLinkForFilters({ filter: 'reason', name: 'responsible' }),
},
{
key: 'watched',
title: this.I18n.t('js.notifications.menu.watching'),
icon: 'watching',
- ...this.getUiLinkForFilters({ filter: 'reason', name: 'watched' }),
+ ...getUiLinkForFilters({ filter: 'reason', name: 'watched' }),
},
];
@@ -63,7 +68,7 @@ export class IanMenuComponent implements OnInit {
.map((item) => ({
...item,
title: (item.projectHasParent ? '... ' : '') + item.value,
- ...this.getUiLinkForFilters({ filter: 'project', name: idFromLink(item._links.valueLink[0].href) }),
+ ...getUiLinkForFilters({ filter: 'project', name: idFromLink(item._links.valueLink[0].href) }),
}))
.sort((a, b) => {
if (b.projectHasParent && !a.projectHasParent) {
@@ -122,11 +127,4 @@ export class IanMenuComponent implements OnInit {
ngOnInit():void {
this.ianMenuService.reload();
}
-
- private getUiLinkForFilters(filters:INotificationPageQueryParameters = {}) {
- return {
- uiSref: 'notifications.center.show',
- uiParams: filters,
- };
- }
}
diff --git a/frontend/src/app/shared/components/sidemenu/sidemenu.component.ts b/frontend/src/app/shared/components/sidemenu/sidemenu.component.ts
index 7fe38995dca..373ca094b6d 100644
--- a/frontend/src/app/shared/components/sidemenu/sidemenu.component.ts
+++ b/frontend/src/app/shared/components/sidemenu/sidemenu.component.ts
@@ -13,7 +13,7 @@ export interface IOpSidemenuItem {
count?:number;
href?:string;
uiSref?:string;
- uiParams?:any;
+ uiParams?:unknown;
children?:IOpSidemenuItem[];
collapsible?:boolean;
}
@@ -38,7 +38,8 @@ export class OpSidemenuComponent {
constructor(
readonly cdRef:ChangeDetectorRef,
readonly I18n:I18nService,
- ) { }
+ ) {
+ }
toggleCollapsed():void {
this.collapsed = !this.collapsed;