Question Maters add and Edit UI

This commit is contained in:
saravanakumarkandasami 2018-11-14 18:45:48 +05:30
parent 69cc149b87
commit 780cfd2fa5
2 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option> <mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div>--> </div>-->
<div fxFlex="20" style="text-align:right;"> <div fxFlex="20" style="text-align:right;">
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)"> <span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button> <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>

View File

@ -58,21 +58,21 @@
<div *ngFor="let answ of f_ans.controls; let i=index"> <div *ngFor="let answ of f_ans.controls; let i=index">
<div [formGroupName]="i"> <div [formGroupName]="i">
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none"> <div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
<div fxFlex="60"> <div fxFlex="80">
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<!--<span>Answer {{i + 1}} </span>--> <!--<span>Answer {{i + 1}} </span>-->
<textarea matInput placeholder="Answer" formControlName="answer"></textarea> <textarea matInput placeholder="Answer" formControlName="answer"></textarea>
<!--<mat-error *ngIf="submitted && answer.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>--> <!--<mat-error *ngIf="submitted && answer.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>-->
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex="30"> <!----<div fxFlex="30">
<mat-form-field style="margin-top: 7%;"> <mat-form-field style="margin-top: 7%;">
<mat-select placeholder="Group" formControlName="fk_question_group_id"> <mat-select placeholder="Group" formControlName="fk_question_group_id">
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option> <mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>-->
<div fxFlex="10"> <div fxFlex="20" style="text-align:right;">
<mat-checkbox *ngIf="answ.get('question_answer_id').value != null" formControlName="isactive" [ngModel]="answ.get('isactive').value == 1 ? true : answ.get('isactive').value == 0 ? false : null" <mat-checkbox *ngIf="answ.get('question_answer_id').value != null" formControlName="isactive" [ngModel]="answ.get('isactive').value == 1 ? true : answ.get('isactive').value == 0 ? false : null"
(ngModelChange)="answ.get('isactive').value = $event ? 1 : 0"></mat-checkbox> (ngModelChange)="answ.get('isactive').value = $event ? 1 : 0"></mat-checkbox>
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)"> <span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">