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

Hide table body lines when team planner is empty

Henriette Dargeb5fe9f680075
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
index 747082c791c..492d0b3763f 100644
--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
@@ -16,13 +16,14 @@
*ngIf="calendarOptions"
[options]="calendarOptions"
class="op-team-planner--calendar"
+ [ngClass]="{'op-team-planner--calendar_empty': (isEmpty$ | async)}"
></full-calendar>
<div
[textContent]="calendar.tooManyResultsText"
class="op-wp-calendar--notification"></div>
<div
- *ngIf="!(principalIds$ | async)?.length && !(showAddAssignee$ | async)"
+ *ngIf="isEmpty$ | async"
class="op-team-planner--no-data">
<span [textContent]="text.noData"></span>
</div>
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.sass b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.sass
index ee1789da9e3..ed9b908824e 100644
--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.sass
+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.sass
@@ -28,7 +28,7 @@
&--no-data
grid-area: noData
min-height: 250px
- background-color: lightgray
+ background-color: #F3F3F3
display: flex
justify-content: center
align-items: center
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 55ffb9bc208..f0138601ea7 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
@@ -83,7 +83,7 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
showAddExistingPane = new BehaviorSubject<boolean>(false);
- showAddAssignee$ = new Subject<boolean>();
+ showAddAssignee$ = new BehaviorSubject<boolean>(false);
private principalIds$ = this.wpTableFilters
.live$()
@@ -104,6 +104,13 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
}) as ApiV3ListParameters),
);
+ isEmpty$ = combineLatest([
+ this.principalIds$,
+ this.showAddAssignee$,
+ ]).pipe(
+ map(([principals, showAddAssignee]) => !principals.length && !showAddAssignee),
+ );
+
assignees:HalResource[] = [];
text = {
diff --git a/frontend/src/global_styles/content/modules/_team_planner.sass b/frontend/src/global_styles/content/modules/_team_planner.sass
index 39d9793a7a2..3bf3f3aafcf 100644
--- a/frontend/src/global_styles/content/modules/_team_planner.sass
+++ b/frontend/src/global_styles/content/modules/_team_planner.sass
@@ -3,3 +3,9 @@
.router--team-planner
#content
height: 100%
+
+.op-team-planner
+ &--calendar_empty
+ .fc-scrollgrid-section-body,
+ .fc-scrollgrid-section-footer
+ display: none