blob: fea4c44c74f8ab9ccad44121b6656171c50a1f45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
import {Component, Input} from '@angular/core';
import * as _ from 'lodash';
@Component({
selector: 'model-information',
templateUrl: 'model-information.html',
styleUrls: ['model-information.scss']
})
export class ModelInformationComponent {
private _modelInformationItems: Array<ModelInformationItem>;
get modelInformationItems(): Array<ModelInformationItem> {
return this._modelInformationItems;
}
@Input()
set modelInformationItems(_modelInformationItems: Array<ModelInformationItem>) {
if (_modelInformationItems) {
this._modelInformationItems = _modelInformationItems.filter(x => x.mandatory || (!_.isEmpty(x.values) && !_.isEmpty(x.values[0])));
}
}
}
export class ModelInformationItem {
label: string;
testsId: string;
values: Array<string>;
toolTipText: string;
mandatory: boolean;
constructor(label: string, testsId: string, values: Array<any>, toolTipText: string = "", mandatory: boolean = false,nested:boolean=false) {
this.label = label;
this.testsId = testsId;
this.values = values;
this.toolTipText = toolTipText;
this.mandatory = mandatory;
}
}
|