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
Include filter button in ifc viewer page
Henriette Dinger2bca7ebe6a58
diff --git a/frontend/src/app/modules/ifc_models/bcf/container/bcf-container.component.ts b/frontend/src/app/modules/ifc_models/bcf/container/bcf-container.component.tsindex 3b63a2d74b4..1cdd33a3b86 100644--- a/frontend/src/app/modules/ifc_models/bcf/container/bcf-container.component.ts+++ b/frontend/src/app/modules/ifc_models/bcf/container/bcf-container.component.ts@@ -1,39 +1,59 @@-import {Component} from "@angular/core";+import {ChangeDetectorRef, Component, Injector, OnInit} from "@angular/core";import {I18nService} from "core-app/modules/common/i18n/i18n.service";import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service";import {CurrentProjectService} from "core-components/projects/current-project.service";import {WorkPackageTableConfigurationObject} from "core-components/wp-table/wp-table-configuration";-import { StateService } from '@uirouter/core';+import {StateService} from '@uirouter/core';import {GonService} from "core-app/modules/common/gon/gon.service";+import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service";+import {InjectField} from "core-app/helpers/angular/inject-field.decorator";+import {WorkPackagesListService} from "core-components/wp-list/wp-list.service";@Component({- templateUrl: './bcf-container.component.html'+ templateUrl: './bcf-container.component.html',+ providers: [+ QueryParamListenerService+ ]})-export class BCFContainerComponent {+export class BCFContainerComponent implements OnInit {+ @InjectField() public queryParamListener:QueryParamListenerService;+ @InjectField() public wpListService:WorkPackagesListService;+public queryProps:{ [key:string]:any };+public configuration:WorkPackageTableConfigurationObject = {actionsColumnEnabled: false,columnMenuEnabled: false,contextMenuEnabled: false,inlineCreateEnabled: false,- withFilters: true,+ withFilters: false,showFilterButton: false,isCardView: true};-private filters:any[] = [];constructor(readonly state:StateService,readonly i18n:I18nService,readonly paths:PathHelperService,readonly currentProject:CurrentProjectService,- readonly gon:GonService) {+ readonly gon:GonService,+ readonly injector:Injector,+ readonly cdRef:ChangeDetectorRef) {+ }- this.applyFilters();+ ngOnInit():void {+ this.wpListService.loadCurrentQueryFromParams( this.currentProject.identifier!).then(() => {+ this.queryProps = this.state.params.query_props || this.defaultQueryProps();+ this.cdRef.detectChanges();+ });++ this.queryParamListener.observe$.pipe().subscribe((queryProps) => {+ this.queryProps = queryProps;+ this.cdRef.detectChanges();+ });}- private applyFilters() {- // TODO: Limit to project+ private defaultQueryProps() {this.filters.push({status: {operator: 'o',@@ -41,7 +61,7 @@ export class BCFContainerComponent {}});- this.queryProps = {+ return {'columns[]': ['id', 'subject'],filters: JSON.stringify(this.filters),sortBy: JSON.stringify([['updatedAt', 'desc']]),diff --git a/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.html b/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.htmlindex ec92e1d9a21..676ba8d0b17 100644--- a/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.html+++ b/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.html@@ -5,6 +5,10 @@</h2></div><ul class="toolbar-items">+ <li class="toolbar-item">+ <wp-filter-button>+ </wp-filter-button>+ </li><li class="toolbar-item"*ngIf="manageAllowed"><a class="button"@@ -22,6 +26,8 @@</div></div>+<filter-container></filter-container>+<div class="ifc-model-viewer--container"ui-view="viewer"></div>diff --git a/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.sass b/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.sassindex 3fce4b6c5ff..3d45b981eda 100644--- a/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.sass+++ b/frontend/src/app/modules/ifc_models/pages/viewer/ifc-viewer-page.component.sass@@ -3,17 +3,17 @@overflow: hiddendisplay: gridgrid-template-columns: 1fr 500px- grid-template-rows: 60px calc(100% - 60px)+ grid-template-rows: 60px auto minmax(200px, 1fr)grid-column-gap: 10px&.-split- grid-template-areas: "header header" "viewer list"+ grid-template-areas: "header header" "filter filter" "viewer list"&.-viewer- grid-template-areas: "header header" "viewer viewer"+ grid-template-areas: "header header" "filter filter" "viewer viewer"&.-list- grid-template-areas: "header header" "list list"+ grid-template-areas: "header header" "filter filter" "list list".toolbar-containergrid-area: header@@ -23,3 +23,6 @@.bcf-table--containergrid-area: list++ filter-container+ grid-area: filter