Remove specs + eslind on front
This commit is contained in:
@@ -6,6 +6,7 @@ import { map } from 'rxjs';
|
||||
import { Record } from 'src/app/models/record.model';
|
||||
|
||||
export class Layer extends Base {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
number?: Number;
|
||||
source?: string;
|
||||
name?: string;
|
||||
@@ -16,6 +17,7 @@ export class Layer extends Base {
|
||||
super();
|
||||
Object.assign(this, data);
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
override deserialize(input: any): this {
|
||||
Object.assign(this, Object.assign(this, super.deserialize(input)));
|
||||
if (this.records) { this.records = this.records.map(x => new Record().deserialize(x)); }
|
||||
@@ -47,7 +49,7 @@ export class Layer extends Base {
|
||||
});
|
||||
}
|
||||
loadForm(form: UntypedFormGroup) {
|
||||
for (let field of Object.keys(form.controls)) {
|
||||
for (const field of Object.keys(form.controls)) {
|
||||
this[field as keyof Layer] = form.controls[field].value;
|
||||
}
|
||||
this.createdBy = undefined;
|
||||
@@ -63,6 +65,7 @@ export class Layer extends Base {
|
||||
);
|
||||
});
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
static getList(_http: HttpClient): any {
|
||||
return new Promise((resolve, reject) => {
|
||||
_http.get<Layer[]>(`${environment.api.url}/layers`)
|
||||
@@ -81,7 +84,7 @@ export class Layer extends Base {
|
||||
})
|
||||
});
|
||||
}
|
||||
static parseFile(file: any, _http: HttpClient): Promise<Layer[]> {
|
||||
static parseFile(file: File, _http: HttpClient): Promise<Layer[]> {
|
||||
const formData = new FormData();
|
||||
formData.append(file.name, file);
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user