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

set the assignee column width based on screen size

bsatarnejad01c0542a9e2c
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 426fb3625d1..692610fa108 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
@@ -114,6 +114,7 @@ import { ICapability } from 'core-app/core/state/capabilities/capability.model';
import { ToastService } from 'core-app/shared/components/toaster/toast.service';
import { LoadingIndicatorService } from 'core-app/core/loading-indicator/loading-indicator.service';
import { OpWorkPackagesCalendarService } from 'core-app/features/calendar/op-work-packages-calendar.service';
+import { DeviceService } from 'core-app/core/browser/device.service';
@Component({
selector: 'op-team-planner',
@@ -301,6 +302,8 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
shareReplay(1),
);
+ isMobile$ = this.deviceService.isMobile$;
+
constructor(
private $state:StateService,
private configuration:ConfigurationService,
@@ -323,6 +326,7 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
readonly actions$:ActionsService,
readonly toastService:ToastService,
readonly loadingIndicatorService:LoadingIndicatorService,
+ readonly deviceService:DeviceService,
) {
super();
}
@@ -482,7 +486,7 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
},
],
resources: skeletonResources,
- resourceAreaWidth: '180px',
+ resourceAreaWidth: this.isMobile$.getValue() ? '60px' : '180px',
select: this.handleDateClicked.bind(this) as unknown,
resourceLabelContent: (data:ResourceLabelContentArg) => this.renderTemplate(this.resourceContent, data.resource.id, data),
resourceLabelWillUnmount: (data:ResourceLabelContentArg) => this.unrenderTemplate(data.resource.id),