Remove unused DESC1-4 from front
This commit is contained in:
@@ -35,10 +35,6 @@ export class Record extends Base {
|
|||||||
value31?: number;
|
value31?: number;
|
||||||
value32?: number;
|
value32?: number;
|
||||||
desc1?: string;
|
desc1?: string;
|
||||||
desc2?: string;
|
|
||||||
desc3?: string;
|
|
||||||
desc4?: string;
|
|
||||||
desc5?: string;
|
|
||||||
|
|
||||||
constructor(data: Partial<Record> = {}) {
|
constructor(data: Partial<Record> = {}) {
|
||||||
super();
|
super();
|
||||||
|
|||||||
@@ -250,30 +250,6 @@
|
|||||||
<td mat-footer-cell *matFooterCellDef></td>
|
<td mat-footer-cell *matFooterCellDef></td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="desc2">
|
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Description2</th>
|
|
||||||
<td mat-cell *matCellDef="let row"> {{row.desc2}} </td>
|
|
||||||
<td mat-footer-cell *matFooterCellDef></td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="desc3">
|
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Description3</th>
|
|
||||||
<td mat-cell *matCellDef="let row"> {{row.desc3}} </td>
|
|
||||||
<td mat-footer-cell *matFooterCellDef></td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="desc4">
|
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Description4</th>
|
|
||||||
<td mat-cell *matCellDef="let row"> {{row.desc4}} </td>
|
|
||||||
<td mat-footer-cell *matFooterCellDef></td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container matColumnDef="desc5">
|
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Description5</th>
|
|
||||||
<td mat-cell *matCellDef="let row"> {{row.desc5}} </td>
|
|
||||||
<td mat-footer-cell *matFooterCellDef></td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns, sticky: true"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedColumns, sticky: true"></tr>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||||
<tr mat-footer-row *matFooterRowDef="displayedColumns"></tr>
|
<tr mat-footer-row *matFooterRowDef="displayedColumns"></tr>
|
||||||
|
|||||||
@@ -80,13 +80,11 @@ export class LayerDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = 1; i < 6; i++) {
|
|
||||||
for (const record of this.document.records) {
|
for (const record of this.document.records) {
|
||||||
const propertyName = `desc${i}` as keyof typeof record;
|
if (record.desc1 !== null) {
|
||||||
if (record[propertyName] !== null) {
|
this.displayedColumns.push(`desc1`);
|
||||||
this.displayedColumns.push(`desc${i}`);
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,7 +141,6 @@ export class LayerDetailComponent implements OnInit {
|
|||||||
//= codes.map(code => this.getRecordValue(this.document.records.find(x => x.code === code)!, i+1));
|
//= codes.map(code => this.getRecordValue(this.document.records.find(x => x.code === code)!, i+1));
|
||||||
this.shortRecords.push(res);
|
this.shortRecords.push(res);
|
||||||
}
|
}
|
||||||
console.log('shortRecords', this.shortRecords);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user