import { Component, OnInit, ViewChild } from '@angular/core';
import { DialogComponent } from '@syncfusion/ej2-angular-popups';
import { DocumentService } from '../../service/data/document.service';
@Component({
selector: 'app-perform-checks',
templateUrl: './perform-checks.component.html',
styleUrls: ['./perform-checks.component.css']
})
export class PerformChecksComponent implements OnInit {
@ViewChild('matchupTemplateDialog') matchupTemplateDialog: DialogComponent;
attributeName1=[];
tesData112 = [];
checklistData=[];
constructor(private documentService: DocumentService) { }
ngOnInit() {
this.checkList();
}
updateMatchupClick() {
this.matchupTemplateDialog.show();
}
checkList() {
this.documentService.getAllCheckListData().subscribe(response => {
this.checklistData = response;
for(let i=0;i<this.checklistData.length;i++)
{
this.attributeName1=this.checklistData[i].attributeName1;
console.log(this.attributeName1+"kkkkkkkkkkkkk")
}
})
}
}
<div class="col-md-12">
<button ejs-button cssClass="e-info" (click)="updateMatchupClick()">Perform Checks</button>
</div>
<ejs-dialog showCloseIcon='true' #matchupTemplateDialog width='600px' height='auto' isModal='true' [visible]='false'>
<form id="ngFormID" #runMatchup="ngForm" novalidate>
<div class="card">
<div class="card-body">
<ng-template #header>
RUN CHECKS
</ng-template>
<ng-template #content>
<div fxFlexFill class="flex-container" fxLayout="row" fxLayout.xs="column" fxLayoutGap="20px"
fxLayoutAlign="start" [style.margin-bottom]="'20px'">
<div fxFlex class="child-1">
<ejs-multiselect floatLabelType="Always" id='multiselect-checkbox' name='parentAgreementType' #checkbox
[dataSource]='dataTest' placeholder='Select Child Document' [fields]='checkFields' [mode]='mode'
[popupHeight]='popHeight' [showDropDownIcon]='true' showSelectAll='true'
[filterBarPlaceholder]='filterPlaceholder' ngModel>
</ejs-multiselect>
</div>
<div fxFlex class="child-2">
<ejs-dropdownlist floatLabelType="Always" id='attributeName1' name="attributeName1"
[dataSource]='checklistData' placeholder='Select Attribute Name' popupHeight='200px' ngModel>
</ejs-dropdownlist>
</div>
</div>
<div fxFlexFill class="flex-container" fxLayout="row" fxLayout.xs="column" fxLayoutGap="20px"
fxLayoutAlign="start" [style.margin-bottom]="'20px'">
<div fxFlex class="child-3">
<ejs-dropdownlist floatLabelType="Always" id='parentDocument' name="parentDocument"
[dataSource]='agreementTypeDatas1' placeholder='Select Child Parent Document' popupHeight='200px'
ngModel>
</ejs-dropdownlist>
</div>
</div>
</ng-template>
<ng-template #footerTemplate>
<div style="text-align: center;">
<button ejs-button cssClass="e-primary" content="Run Matchup" type="submit"
(click)="onRunMatchupClick(runMatchup)">Run Matchup</button>
</div>
</ng-template>
</div>
</div>
</form>
</ejs-dialog>
<br><br>
<!-- Syncfusion grid data -->
<div class="control-section">
<ejs-grid #grid >
<e-columns>
<e-column id='checkName' field='checkName' headerText='Check Name'
[allowFiltering]='true' [ignoreAccent]='true' filterBarPlaceholder='e.g: 10001'>
</e-column>
<e-column field='date' headerText='Date' width='180' [allowEditing]="false"></e-column>
<e-column field='status' headerText='Status' width='100' [allowEditing]="false"></e-column>
</e-columns>
</ejs-grid>
</div>