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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
code improvement
bsatarnejad0564ed36e24f
diff --git a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.tsindex e8e0bff6dda..2b349f0b552 100644--- a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts+++ b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts@@ -126,29 +126,29 @@ export class IanCenterService {}this.query.notifications$.pipe(take(1)).subscribe((notifications) => {if (notifications.length <= 0) {- void this.state.go(- `${(this.state.current.data as BackRouteOptions).baseRoute}`,- );+ void this.state.go(+ `${(this.state.current.data as BackRouteOptions).baseRoute}`,+ );} else {- const index = notificationIndex > notifications.length ? 0 : notificationIndex - 1;- const href = notifications[index][0]._links.resource?.href;- const id = href && HalResource.matchFromLink(href, 'work_packages');- if (id) {- const wp = this- .apiV3Service- .work_packages- .id(id)- .requireAndStream();-- wp.pipe(take(1))- .subscribe((workPackage) => {- void this.state.go(- `${(this.state.current.data as BackRouteOptions).baseRoute}.details.tabs`,- { workPackageId: workPackage.id, tabIdentifier: 'activity' },- );- });- }+ const index = notificationIndex > notifications.length ? 0 : notificationIndex - 1;+ const href = notifications[index][0]._links.resource?.href;+ const id = href && HalResource.matchFromLink(href, 'work_packages');+ if (id) {+ const wp = this+ .apiV3Service+ .work_packages+ .id(id)+ .requireAndStream();++ wp.pipe(take(1))+ .subscribe((workPackage) => {+ void this.state.go(+ `${(this.state.current.data as BackRouteOptions).baseRoute}.details.tabs`,+ { workPackageId: workPackage.id, tabIdentifier: 'activity' },+ );+ });}+ }});}@@ -156,7 +156,7 @@ export class IanCenterService {this.query.notifications$.pipe().subscribe((wpNotifications) => {let counter = 0;wpNotifications.forEach((wpNotification) => {- counter = counter + 1;+ counter += 1;wpNotification.forEach((notification) => {if (notification.id === notificationID) {this.selectedNotificationIndex = counter;