WIP: upgrade views
This commit is contained in:
@@ -2,7 +2,7 @@ import { DatePipe, NgIf, DecimalPipe } from '@angular/common';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatSort, MatSortable, MatSortModule } from '@angular/material/sort';
|
||||
import { MatSort, MatSortModule } from '@angular/material/sort';
|
||||
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Layer } from 'src/app/models/layer.model';
|
||||
@@ -54,7 +54,7 @@ export class LayerDetailComponent implements OnInit {
|
||||
this.document.fillForm(this.form);
|
||||
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.dataSource.sort.sort({ id: 'code', start: 'desc' } as MatSortable);
|
||||
this.valueSum = this.document.records.map(t => t.value1 || 0).reduce((acc, value) => acc + value, 0);
|
||||
}
|
||||
private async load(): Promise<Layer> {
|
||||
|
||||
Reference in New Issue
Block a user