Merge pull request #7811 from opf/fix/31487-Seed-data-of-project-overview-seem-wrong

[31487] Error when moving widget based on seed data
pull/7813/head
ulferts 5 years ago committed by GitHub
commit 041ffe2e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      frontend/src/app/modules/grids/grid/area.service.ts
  2. 9
      frontend/src/app/modules/grids/grid/grid.component.ts
  3. 6
      modules/overviews/config/locales/en.seeders.bim.yml
  4. 4
      modules/overviews/config/locales/en.seeders.standard.yml

@ -49,7 +49,8 @@ export class GridAreaService {
}
public cleanupUnusedAreas() {
let unusedRows = Array.from(Array(this.numRows + 1).keys()).slice(1);
// array containing Numbers from this.numRows to 1
let unusedRows = _.range(this.numRows, 0, -1);
this.widgetAreas.forEach(widget => {
unusedRows = unusedRows.filter(item => item !== widget.startRow);
@ -61,7 +62,7 @@ export class GridAreaService {
}
});
let unusedColumns = Array.from(Array(this.numColumns + 1).keys()).slice(1);
let unusedColumns = _.range(this.numColumns, 0, -1);
this.widgetAreas.forEach(widget => {
unusedColumns = unusedColumns.filter(item => item !== widget.startColumn);

@ -112,19 +112,10 @@ export class GridComponent implements OnDestroy, OnInit {
return this.sanitization.bypassSecurityTrustStyle(style);
}
// array containing Numbers from 1 to this.numColumns
public get columnNumbers() {
return Array.from(Array(this.layout.numColumns + 1).keys()).slice(1);
}
public get gridRowStyle() {
return this.sanitization.bypassSecurityTrustStyle(`repeat(${this.layout.numRows}, ${this.GRID_AREA_HEIGHT})`);
}
public get rowNumbers() {
return Array.from(Array(this.layout.numRows + 1).keys()).slice(1);
}
public identifyGridArea(index:number, area:GridArea) {
return area.guid;
}

@ -32,7 +32,7 @@ en:
projects:
demo-construction-project:
project-overview:
row_count: 4
row_count: 5
column_count: 2
widgets:
- identifier: 'custom_text'
@ -101,7 +101,7 @@ en:
queryId: '##query.id:"Milestones"'
demo-planning-constructing-project:
project-overview:
row_count: 4
row_count: 5
column_count: 2
widgets:
- identifier: 'custom_text'
@ -166,7 +166,7 @@ en:
queryId: '##query.id:"Milestones"'
demo-bim-project:
project-overview:
row_count: 4
row_count: 5
column_count: 2
widgets:
- identifier: 'custom_text'

@ -32,7 +32,7 @@ en:
projects:
demo-project:
project-overview:
row_count: 4
row_count: 5
column_count: 2
widgets:
- identifier: 'custom_text'
@ -97,7 +97,7 @@ en:
queryId: '##query.id:"Milestones"'
scrum-project:
project-overview:
row_count: 4
row_count: 5
column_count: 2
widgets:
- identifier: 'custom_text'

Loading…
Cancel
Save