This commit is contained in:
dineshkumarkannan 2018-11-04 12:40:50 +05:30
commit c826296f63
2 changed files with 66 additions and 0 deletions

View File

@ -22,6 +22,14 @@
</mat-list>
</mat-expansion-panel>
<mat-list *ngFor="let formButton of categoryFormButtons">
<mat-list-item class="custm-list-item" (click)="OnSelectDirectForms(formButton)">
<span class="mt-0">{{ (formButton.form_name.length>15)? (formButton.form_name | slice:0:15)+'..':(formButton.form_name) }}</span>
</mat-list-item>
</mat-list>
</mat-sidenav>
<mat-toolbar color="primary" fxHide="false" fxHide.gt-sm>
<button (click)="mailnav.toggle()" mat-icon-button>
@ -49,12 +57,14 @@
</div>
</mat-card-content>
<hr>
<div *ngIf="!formsCategoryEnable">
<mat-card-content style="min-height: 240px;" *ngIf="selectedCategory.length==0">
<!-- <h6 class="mt-0">About</h6> -->
<p>No Records Found..</p>
</mat-card-content>
<!-- check type of questions -->
<ng-container [ngSwitch]="selectedCategory.fk_question_answertype">
<!-- start options type questions section -->
<ng-container *ngSwitchCase="1">
@ -359,8 +369,33 @@
</ng-container>
</ng-container>
</div>
<!-- end check box questions section -->
<!-- start forms based questions -->
<div *ngIf="formsCategoryEnable">
<ng-container [ngSwitch]="selectedFormsCategory.form_id">
<!-- start supplier type questions section -->
<ng-container *ngSwitchCase="1">
<p>supplier</p>
</ng-container>
<!-- end supplier type questions -->
<!-- start client type questions -->
<ng-container *ngSwitchCase="2">
<p>client</p>
</ng-container>
<!-- end client type questions -->
<!-- start personal type questions -->
<ng-container *ngSwitchCase="3">
<p>Personal</p>
</ng-container>
<!-- end personal type questions -->
</ng-container>
</div>
<!-- end form based questions -->
</figure>
</div>
</mat-sidenav-container>

View File

@ -29,6 +29,28 @@ selectedQuestionIndex:number;
getQuestionsLength:number;
answerList:any=[];
ansPDList:any=[];
// category static form buttons
categoryFormButtons : any=[
{
"form_id":1,
"form_name":"Supplier Details"
},
{
"form_id":2,
"form_name":"Client Details",
},
{
"form_id":3,
"form_name":"Personal Details",
},
];
formsCategoryEnable:boolean=false;
selectedFormsCategory:any;
// create values for status check
pdStatusCheck :any={
"DRAFT" :'DRAFT',
@ -106,6 +128,7 @@ loadTemplates(startID:string){
}
OnSelectDirectQuestions(selectedQuestions: any, categoryIndex:number,questionsIndex:number){
this.formsCategoryEnable=false;
this.selectedCategory=selectedQuestions;
this.selectedCategoryIndex=categoryIndex;
this.selectedQuestionIndex=questionsIndex;
@ -425,6 +448,14 @@ optionsMapItems(items) {
});
}
// direct form based questions
OnSelectDirectForms(details:any){
this.formsCategoryEnable = true;
this.selectedFormsCategory = details;
}
// load pd view component
loadPdViewCompoent(){
this.router.navigate([ '../../viewpd',this.startPD], { relativeTo: this.route });