Record.Values

This commit is contained in:
Michał Zieliński
2023-08-21 13:00:05 +02:00
parent d51abf90ee
commit e8c64059fb
11 changed files with 792 additions and 13 deletions

View File

@@ -55,7 +55,7 @@ export class LayerDetailComponent implements OnInit {
this.form.disable();
this.document.created = `${this.datePipe.transform(this.document.createdAt?.toDate(), 'short')}, ${this.document.createdBy?.userName}`;
this.dataSource.sort.sort({ id: 'code', start: 'desc' } as MatSortable);
this.valueSum = this.document.records.map(t => t.value || 0).reduce((acc, value) => acc + value, 0);
this.valueSum = this.document.records.map(t => t.value1 || 0).reduce((acc, value) => acc + value, 0);
}
private async load(): Promise<Layer> {
return await Layer.getById(this.route$.snapshot.paramMap.get('id') || "", this.http$);