Fix sums row

pull/6346/head
Oliver Günther 6 years ago
parent b3ee35522f
commit b7131581f1
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 9
      frontend/src/app/components/wp-table/wp-table-sums-row/wp-table-sums-row.directive.ts

@ -93,7 +93,7 @@ export class WorkPackageTableSumsRowController implements AfterViewInit {
}
private render(columns:WorkPackageTableColumns, resource:WorkPackageCollectionResource, schema:SchemaResource) {
this.$element[0].classList.add('sum', 'group', 'all', 'issue', 'work_package');
this.elementRef.nativeElement.classList.add('sum', 'group', 'all', 'issue', 'work_package');
// build
columns.getColumns().forEach((column, i:number) => {
@ -114,6 +114,13 @@ export class WorkPackageTableSumsRowController implements AfterViewInit {
private renderContent(sums:any, name:string, fieldSchema:IFieldSchema) {
const div = document.createElement('div');
// The field schema for this element may be undefined
// because it is not summable.
if (!fieldSchema) {
return div;
}
const field = this.displayFieldService.getField(sums, name, fieldSchema);
if (!field.isEmpty()) {

Loading…
Cancel
Save