1
|
import {AfterViewChecked, AfterViewInit, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
2
|
import {ConfiguratorParameter} from '../../../../shared/models/configurator-parameter.interface';
|
3
|
import {Page} from '../../../../shared/models/paging/page.interface';
|
4
|
import {LazyLoadEvent} from 'primeng/api';
|
5
|
|
6
|
@Component({
|
7
|
selector: 'app-configurator-list-of-parameters',
|
8
|
templateUrl: './configurator-list-of-parameters.component.html',
|
9
|
styleUrls: ['./configurator-list-of-parameters.component.scss']
|
10
|
})
|
11
|
export class ConfiguratorListOfParametersComponent implements OnInit {
|
12
|
|
13
|
@Input() parametersListInput: ConfiguratorParameter[];
|
14
|
@Input() loadingInput: boolean;
|
15
|
@Output() editEventRequest = new EventEmitter<ConfiguratorParameter>();
|
16
|
|
17
|
editParameterRequest: ConfiguratorParameter;
|
18
|
parametersList: ConfiguratorParameter[];
|
19
|
selectedParameterRequest: ConfiguratorParameter;
|
20
|
totalRecords: number;
|
21
|
rows = 10;
|
22
|
|
23
|
constructor() { }
|
24
|
|
25
|
ngOnInit(): void {
|
26
|
const initParameter: ConfiguratorParameter = {
|
27
|
configurationId: null,
|
28
|
configurationVariable: null,
|
29
|
variableType: null,
|
30
|
integerValue: null,
|
31
|
stringValue: null
|
32
|
};
|
33
|
this.editEventRequest.emit(initParameter);
|
34
|
}
|
35
|
|
36
|
passSelectedConfigurator(parameter: ConfiguratorParameter) {
|
37
|
this.editEventRequest.emit(parameter);
|
38
|
}
|
39
|
|
40
|
}
|