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();
|
||||||
@@ -46,8 +42,8 @@ export class Record extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
override deserialize(input: any): this {
|
override deserialize(input: any): this {
|
||||||
Object.assign(this, Object.assign(this, super.deserialize(input)));
|
Object.assign(this, Object.assign(this, super.deserialize(input)));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,34 +250,10 @@
|
|||||||
<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>
|
||||||
</table>
|
</table>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import { MatCardModule } from '@angular/material/card';
|
|||||||
templateUrl: './layer-detail.component.html',
|
templateUrl: './layer-detail.component.html',
|
||||||
styleUrls: ['./layer-detail.component.scss'],
|
styleUrls: ['./layer-detail.component.scss'],
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [FormsModule, ReactiveFormsModule, MatCardModule,
|
imports: [FormsModule, ReactiveFormsModule, MatCardModule,
|
||||||
MatButtonModule, MatGridListModule, MatFormFieldModule, MatInputModule,
|
MatButtonModule, MatGridListModule, MatFormFieldModule, MatInputModule,
|
||||||
NgIf, MatTableModule, MatSortModule, DecimalPipe, JsonPipe, RouterLink],
|
NgIf, MatTableModule, MatSortModule, DecimalPipe, JsonPipe, RouterLink],
|
||||||
providers: [DatePipe]
|
providers: [DatePipe]
|
||||||
})
|
})
|
||||||
@@ -48,7 +48,7 @@ export class LayerDetailComponent implements OnInit {
|
|||||||
private route$: ActivatedRoute,
|
private route$: ActivatedRoute,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private notifications$: NotificationsService
|
private notifications$: NotificationsService
|
||||||
) {
|
) {
|
||||||
this.form = Layer.getForm(this.fb$);
|
this.form = Layer.getForm(this.fb$);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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