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
Hide entire BCF group if not allowed to add and is empty
Oliver Günther67eebb27f9cc
diff --git a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component.ts b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component.tsindex f10dce75513..458e359be5e 100644--- a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component.ts+++ b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component.ts@@ -47,6 +47,10 @@ export class BcfNewWpAttributeGroupComponent extends BcfWpAttributeGroupComponenthis.selectViewpointInGallery();}+ shouldShowGroup() {+ return this.createAllowed && this.viewerVisible;+ }+private observeCreation() {this.wpCreate.onNewWorkPackage()diff --git a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.html b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.htmlindex 9bfc6318b73..cc72136e7e0 100644--- a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.html+++ b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.html@@ -1,4 +1,4 @@-<ng-container *ngIf="viewAllowed && (viewpoints.length > 0 || viewerVisible)">+<ng-container *ngIf="shouldShowGroup()"><div class="attributes-group description-group"><div class="attributes-group--header"><div class="attributes-group--header-container">diff --git a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.ts b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.tsindex 100541a76c2..21d950301e2 100644--- a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.ts+++ b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.ts@@ -217,7 +217,7 @@ export class BcfWpAttributeGroupComponent extends UntilDestroyedMixin implements}));this.loadViewpointFromRoute();}-+this.cdRef.detectChanges();});}@@ -313,4 +313,10 @@ export class BcfWpAttributeGroupComponent extends UntilDestroyedMixin implementsprotected get wpProjectId() {return this.workPackage.project.idFromLink;}++ shouldShowGroup() {+ return this.viewAllowed &&+ (this.viewpoints.length > 0 ||+ (this.createAllowed && this.viewerVisible));+ }}