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

[#39772] Enable view editing in BCF module

Eric Schubertdc49fae30084
diff --git a/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts b/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
index 63034ad8872..4cae7401560 100644
--- a/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
+++ b/frontend/src/app/features/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
@@ -56,6 +56,7 @@ import { RefreshButtonComponent } from 'core-app/features/bim/ifc_models/toolbar
import { ViewerBridgeService } from 'core-app/features/bim/bcf/bcf-viewer-bridge/viewer-bridge.service';
import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
import { QueryResource } from 'core-app/features/hal/resources/query-resource';
+import { WorkPackageSettingsButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/wp-settings-button/wp-settings-button.component';
@Component({
templateUrl: '../../../../work-packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html',
@@ -122,6 +123,14 @@ export class IFCViewerPageComponent extends PartitionedQuerySpacePageComponent i
show: ():boolean => this.viewerBridgeService.shouldShowViewer
&& this.ifcData.allowed('manage_ifc_models'),
},
+ {
+ component: WorkPackageSettingsButtonComponent,
+ containerClasses: 'hidden-for-mobile',
+ show: ():boolean => this.authorisationService.can('query', 'updateImmediately'),
+ inputs: {
+ hideTableOptions: true,
+ },
+ },
];
constructor(readonly ifcData:IfcModelsDataService,
@@ -136,13 +145,6 @@ export class IFCViewerPageComponent extends PartitionedQuerySpacePageComponent i
this.setupChangeObserver(this.bcfView);
- // Add bcf thumbnail to wp table per default, once the columns are available
- this.wpTableColumns.querySpace.available.columns.values$()
- .pipe(this.untilDestroyed())
- .subscribe(() => {
- this.wpTableColumns.addColumn('bcfThumbnail', 2);
- });
-
this.querySpace.query.values$()
.pipe(this.untilDestroyed())
.subscribe((query) => {
diff --git a/frontend/src/app/shared/components/op-view-select/op-static-queries.service.ts b/frontend/src/app/shared/components/op-view-select/op-static-queries.service.ts
index f77ca41fc3a..9bf0d438722 100644
--- a/frontend/src/app/shared/components/op-view-select/op-static-queries.service.ts
+++ b/frontend/src/app/shared/components/op-view-select/op-static-queries.service.ts
@@ -76,8 +76,7 @@ export class StaticQueriesService {
delete queryProps.pa;
const queryPropsString = JSON.stringify(queryProps);
- // TODO: Get module route from query
- const matched = this.getStaticQueriesForView('WorkPackagesTable').find((item) => {
+ const matched = this.staticQueries.find((item) => {
const uiParams = item.uiParams as { query_id:string, query_props:string };
return uiParams && uiParams.query_props === queryPropsString;
});
@@ -135,26 +134,28 @@ export class StaticQueriesService {
},
{
title: this.text.all_open,
- uiSref: 'bim.partitioned.split',
- // TODO: "dr":"splitCards"
- uiParams: { query_id: '', query_props: '' },
+ uiSref: 'bim.partitioned.list',
+ uiParams: {
+ query_id: '',
+ query_props: '{"c":["id","subject","bcfThumbnail","type","status","assignee","updatedAt"],"t":"id:desc"}',
+ },
view: 'Bim',
},
{
title: this.text.latest_activity,
- uiSref: 'bim.partitioned.split',
+ uiSref: 'bim.partitioned.list',
uiParams: {
query_id: '',
- query_props: '{"c":["id","subject","type","status","assignee","updatedAt"],"hi":false,"dr":"splitCards","g":"","t":"updatedAt:desc","f":[{"n":"status","o":"o","v":[]}]}',
+ query_props: '{"c":["id","subject","bcfThumbnail","type","status","assignee","updatedAt"],"t":"updatedAt:desc","f":[{"n":"status","o":"o","v":[]}]}',
},
view: 'Bim',
},
{
title: this.text.recently_created,
- uiSref: 'bim.partitioned.split',
+ uiSref: 'bim.partitioned.list',
uiParams: {
query_id: '',
- query_props: '{"c":["id","subject","type","status","assignee","createdAt"],"hi":false,"dr":"splitCards","g":"","t":"createdAt:desc","f":[{"n":"status","o":"o","v":[]}]}',
+ query_props: '{"c":["id","subject","bcfThumbnail","type","status","assignee","createdAt"],"t":"createdAt:desc","f":[{"n":"status","o":"o","v":[]}]}',
},
view: 'Bim',
},
@@ -232,19 +233,19 @@ export class StaticQueriesService {
},
{
title: this.text.created_by_me,
- uiSref: 'bim.partitioned.split',
+ uiSref: 'bim.partitioned.list',
uiParams: {
query_id: '',
- query_props: '{"c":["id","subject","type","status","assignee","updatedAt"],"hi":false,"dr":"splitCards","g":"","t":"updatedAt:desc,id:asc","f":[{"n":"status","o":"o","v":[]},{"n":"author","o":"=","v":["me"]}]}',
+ query_props: '{"c":["id","subject","bcfThumbnail","type","status","assignee","updatedAt"],"t":"id:desc","f":[{"n":"status","o":"o","v":[]},{"n":"author","o":"=","v":["me"]}]}',
},
view: 'Bim',
},
{
title: this.text.assigned_to_me,
- uiSref: 'bim.partitioned.split',
+ uiSref: 'bim.partitioned.list',
uiParams: {
query_id: '',
- query_props: '{"c":["id","subject","type","status","author","updatedAt"],"hi":false,"dr":"splitCards","g":"","t":"updatedAt:desc,id:asc","f":[{"n":"status","o":"o","v":[]},{"n":"assigneeOrGroup","o":"=","v":["me"]}]}',
+ query_props: '{"c":["id","subject","bcfThumbnail","type","status","author","updatedAt"],"t":"id:desc","f":[{"n":"status","o":"o","v":[]},{"n":"assigneeOrGroup","o":"=","v":["me"]}]}',
},
view: 'Bim',
},
diff --git a/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb b/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb
index 507b170f8b4..8ae2e0dc991 100644
--- a/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb
+++ b/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb
@@ -195,7 +195,7 @@ module Bim
def frontend_redirect(model_ids)
redirect_to bcf_project_frontend_path(models: JSON.dump(Array(model_ids)),
- query_props: '{"t":"id:desc"}')
+ query_props: '{"c":["id","subject","bcfThumbnail","type","status","assignee","updatedAt"],"t":"id:desc"}')
end
def find_all_ifc_models