Layer detail refactor

This commit is contained in:
Michał Zieliński
2023-08-22 21:13:47 +02:00
parent dd64b34fa3
commit d019189ec1
6 changed files with 33 additions and 44 deletions

View File

@@ -6,7 +6,7 @@ import { map } from 'rxjs';
import { Record } from 'src/app/models/record.model';
export enum LayerType {
Ipmort,
Import,
Processed,
Administration,
Dictionary
@@ -19,7 +19,7 @@ export class Layer extends Base {
name?: string;
records: Record[] = [];
created?: string;
type?: LayerType = LayerType.Ipmort;
type?: LayerType;
constructor(data: Partial<Layer> = {}) {
super();
@@ -28,8 +28,6 @@ export class Layer extends Base {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
override deserialize(input: any): this {
Object.assign(this, Object.assign(this, super.deserialize(input)));
console.log(input.type);
console.log(this.type);
if (this.records) { this.records = this.records.map(x => new Record().deserialize(x)); }
return this;
}