Commit dc0a973c authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Fix parameter types in canvas definition component

parent 85638a78
...@@ -2,7 +2,10 @@ import { Component, OnDestroy } from '@angular/core'; ...@@ -2,7 +2,10 @@ import { Component, OnDestroy } from '@angular/core';
import { CanvasDefinition } from '../../../canvas-meta-model/canvas-definition'; import { CanvasDefinition } from '../../../canvas-meta-model/canvas-definition';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { CanvasDefinitionService } from '../../../canvas-meta-model/canvas-definition.service'; import { CanvasDefinitionService } from '../../../canvas-meta-model/canvas-definition.service';
import { CanvasDefinitionRowFormService } from '../../form-services/canvas-definition-row-form.service'; import {
CanvasDefinitionCellFormValue,
CanvasDefinitionRowFormService,
} from '../../form-services/canvas-definition-row-form.service';
import { CanvasDefinitionCell } from '../../../canvas-meta-model/canvas-definition-cell'; import { CanvasDefinitionCell } from '../../../canvas-meta-model/canvas-definition-cell';
import { CanvasDefinitionLoaderService } from '../canvas-definition-loader.service'; import { CanvasDefinitionLoaderService } from '../canvas-definition-loader.service';
...@@ -29,7 +32,7 @@ export class CanvasDefinitionComponent implements OnDestroy { ...@@ -29,7 +32,7 @@ export class CanvasDefinitionComponent implements OnDestroy {
} }
} }
async submitRowForm(value: any): Promise<void> { async submitRowForm(value: CanvasDefinitionCellFormValue[][]): Promise<void> {
const rows = this.canvasDefinitionRowFormService.get(value); const rows = this.canvasDefinitionRowFormService.get(value);
await this.canvasDefinitionService.updateRows( await this.canvasDefinitionService.updateRows(
this.canvasDefinition._id, this.canvasDefinition._id,
...@@ -37,7 +40,9 @@ export class CanvasDefinitionComponent implements OnDestroy { ...@@ -37,7 +40,9 @@ export class CanvasDefinitionComponent implements OnDestroy {
); );
} }
toCanvasDefinitionRows(value: any): CanvasDefinitionCell[][] { toCanvasDefinitionRows(value: {
rows: CanvasDefinitionCellFormValue[][];
}): CanvasDefinitionCell[][] {
if (value == null) { if (value == null) {
return this.canvasDefinition.rows; return this.canvasDefinition.rows;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment