Skip to content
Snippets Groups Projects
Commit 9215eda6 authored by rhenck's avatar rhenck
Browse files

Use likert-row interface instead of the class in some places

This is to avoid circle imports.
parent 85e83a1a
No related branches found
No related tags found
No related merge requests found
import { InputElement, UIElement } from '../uI-element'; import { InputElement, UIElement } from '../uI-element';
import { LikertRow } from '../../interfaces/UIElementInterfaces';
export class LikertElementRow extends InputElement { export class LikertElementRow extends InputElement implements LikertRow {
text: string = ''; text: string = '';
columnCount: number = 0; columnCount: number = 0;
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
import { Component, Inject, Injectable } from '@angular/core'; import { Component, Inject, Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog'; import { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
import { AnswerOption } from '../../../common/models/uI-element';
import { FileService } from '../../../common/file.service'; import { FileService } from '../../../common/file.service';
import { LikertElementRow } from '../../../common/models/compound-elements/likert-element-row'; import { LikertElementRow } from '../../../common/models/compound-elements/likert-element-row';
import { AnswerOption } from '../../../common/interfaces/UIElementInterfaces';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
......
...@@ -13,7 +13,7 @@ import { InputElement, UIElement } from '../../../common/models/uI-element'; ...@@ -13,7 +13,7 @@ import { InputElement, UIElement } from '../../../common/models/uI-element';
import { TextElement } from '../../../common/models/text-element'; import { TextElement } from '../../../common/models/text-element';
import { LikertElement } from '../../../common/models/compound-elements/likert-element'; import { LikertElement } from '../../../common/models/compound-elements/likert-element';
import { LikertElementRow } from '../../../common/models/compound-elements/likert-element-row'; import { LikertElementRow } from '../../../common/models/compound-elements/likert-element-row';
import { AnswerOption } from '../../../common/interfaces/UIElementInterfaces'; import { AnswerOption, LikertRow } from '../../../common/interfaces/UIElementInterfaces';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -167,7 +167,7 @@ export class UnitService { ...@@ -167,7 +167,7 @@ export class UnitService {
updateElementProperty(elements: UIElement[], property: string, updateElementProperty(elements: UIElement[], property: string,
value: string | number | boolean | string[] | value: string | number | boolean | string[] |
AnswerOption[] | LikertElementRow[] | null): boolean { AnswerOption[] | LikertRow[] | null): boolean {
for (const element of elements) { for (const element of elements) {
if (property === 'id') { if (property === 'id') {
if (!IdService.getInstance().isIdAvailable((value as string))) { // prohibit existing IDs if (!IdService.getInstance().isIdAvailable((value as string))) { // prohibit existing IDs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment