diff --git a/Frontend/src/app/models/record.model.ts b/Frontend/src/app/models/record.model.ts index 49c7a1c..0e2e1d5 100644 --- a/Frontend/src/app/models/record.model.ts +++ b/Frontend/src/app/models/record.model.ts @@ -35,10 +35,6 @@ export class Record extends Base { value31?: number; value32?: number; desc1?: string; - desc2?: string; - desc3?: string; - desc4?: string; - desc5?: string; constructor(data: Partial = {}) { super(); @@ -46,8 +42,8 @@ export class Record extends Base { } // 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))); return this; } -} \ No newline at end of file +} diff --git a/Frontend/src/app/modules/layers/layer-detail/layer-detail.component.html b/Frontend/src/app/modules/layers/layer-detail/layer-detail.component.html index 76104bf..fc5e2cb 100644 --- a/Frontend/src/app/modules/layers/layer-detail/layer-detail.component.html +++ b/Frontend/src/app/modules/layers/layer-detail/layer-detail.component.html @@ -250,34 +250,10 @@ - - Description2 - {{row.desc2}} - - - - - Description3 - {{row.desc3}} - - - - - Description4 - {{row.desc4}} - - - - - Description5 - {{row.desc5}} - - - - \ No newline at end of file + diff --git a/Frontend/src/app/modules/layers/layer-detail/layer-detail.component.ts b/Frontend/src/app/modules/layers/layer-detail/layer-detail.component.ts index 8290274..b831320 100644 --- a/Frontend/src/app/modules/layers/layer-detail/layer-detail.component.ts +++ b/Frontend/src/app/modules/layers/layer-detail/layer-detail.component.ts @@ -20,8 +20,8 @@ import { MatCardModule } from '@angular/material/card'; templateUrl: './layer-detail.component.html', styleUrls: ['./layer-detail.component.scss'], standalone: true, - imports: [FormsModule, ReactiveFormsModule, MatCardModule, - MatButtonModule, MatGridListModule, MatFormFieldModule, MatInputModule, + imports: [FormsModule, ReactiveFormsModule, MatCardModule, + MatButtonModule, MatGridListModule, MatFormFieldModule, MatInputModule, NgIf, MatTableModule, MatSortModule, DecimalPipe, JsonPipe, RouterLink], providers: [DatePipe] }) @@ -48,7 +48,7 @@ export class LayerDetailComponent implements OnInit { private route$: ActivatedRoute, private datePipe: DatePipe, private notifications$: NotificationsService - ) { + ) { 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) { - const propertyName = `desc${i}` as keyof typeof record; - if (record[propertyName] !== null) { - this.displayedColumns.push(`desc${i}`); - break; - } + + for (const record of this.document.records) { + if (record.desc1 !== null) { + this.displayedColumns.push(`desc1`); + 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)); this.shortRecords.push(res); } - console.log('shortRecords', this.shortRecords); }); }