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

Split screen open

Oliver Günther2c6e51d24d17
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
index 1026184f8b8..44f80d39729 100644
--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
@@ -31,6 +31,8 @@ import { WorkPackageCollectionResource } from 'core-app/features/hal/resources/w
import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';
import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
+import { EventClickArg } from '@fullcalendar/common';
+import { splitViewRoute } from 'core-app/features/work-packages/routing/split-view-routes.helper';
@Component({
selector: 'op-team-planner',
@@ -127,8 +129,10 @@ export class TeamPlannerComponent extends UntilDestroyedMixin {
},
events: this.calendarEventsFunction.bind(this) as any,
resources: this.calendarResourcesFunction.bind(this),
+ eventClick: this.openSplitView.bind(this),
resourceLabelContent: (data:any) => this.renderTemplate(this.resourceContent, data.resource.id, data),
resourceLabelWillUnmount: (data:any) => this.unrenderTemplate(data.resource.id),
+ } as CalendarOptions);
});
}
@@ -170,6 +174,15 @@ export class TeamPlannerComponent extends UntilDestroyedMixin {
}
}
+ private openSplitView(event:EventClickArg) {
+ const { workPackage } = event.event.extendedProps;
+
+ this.$state.go(
+ `${splitViewRoute(this.$state)}.tabs`,
+ { workPackageId: workPackage.id, tabIdentifier: 'overview' },
+ );
+ }
+
private setupWorkPackagesListener() {
this.querySpace.results.values$().pipe(
this.untilDestroyed(),