merge changes : kms
This commit is contained in:
parent
2364d53218
commit
3d05553993
@ -2,7 +2,7 @@
|
|||||||
<div class="form-bg">
|
<div class="form-bg">
|
||||||
<div fxLayout="row" fxLayoutAlign="center" class="pt-2">
|
<div fxLayout="row" fxLayoutAlign="center" class="pt-2">
|
||||||
<!-- <p>SINEEDGE Login Details</p> -->
|
<!-- <p>SINEEDGE Login Details</p> -->
|
||||||
<h3><img [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 50px;;"> <span> SINEEDGE </span>
|
<h3 class="page-title"><img [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 50px;;"> <span> SINEEDGE </span>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="center start" class="pt-2">
|
<div fxLayout="row" fxLayoutAlign="center start" class="pt-2">
|
||||||
@ -11,7 +11,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<h2 class="base-border">Login</h2>
|
<h2 class="base-border">Login</h2>
|
||||||
<!-- <p>Enter Your Login Details</p> -->
|
<!-- <p>Enter Your Login Details</p> -->
|
||||||
<br>
|
|
||||||
<form #form="ngForm" (ngSubmit)="login()">
|
<form #form="ngForm" (ngSubmit)="login()">
|
||||||
<div fxLayout="column" fxLayoutAlign="start stretch">
|
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
@ -22,11 +21,12 @@
|
|||||||
<input matInput placeholder="Password" minlength= "8" type="password" name="password" required [(ngModel)]="password">
|
<input matInput placeholder="Password" minlength= "8" type="password" name="password" required [(ngModel)]="password">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button class="mat-green" mat-raised-button>SIGN IN</button><br/>
|
<button class="mat-green" mat-raised-button>SIGN IN</button><br/>
|
||||||
<div *ngIf="email">
|
<div>
|
||||||
<a class="mat-text-warn mb-0" (click)="forgotpassword();">Forgot password?</a></div>
|
<a *ngIf="email" class="mat-text-warn mb-0" (click)="forgotpassword();">Forgot password?</a></div>
|
||||||
<!-- <p class="mb-0">Don't have an account? <a [routerLink]="['/register']" class="mat-text-primary">Register Here</a></p> -->
|
<!-- <p class="mb-0">Don't have an account? <a [routerLink]="['/register']" class="mat-text-primary">Register Here</a></p> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<footer class="page-footer">
|
<footer class="page-footer">
|
||||||
|
|
||||||
<!-- © Copyright -->
|
<!-- © Copyright -->
|
||||||
<div class="footer-copyright text-center py-1">© 2018
|
<div class="footer-copyright text-center">© 2018
|
||||||
<a href="http://www.sineedge.com" target="_blank"> SineEdge Consulting Pvt Ltd. </a> All rights are reserved
|
<a href="http://www.sineedge.com" target="_blank"> SineEdge Consulting Pvt Ltd. </a> All rights are reserved
|
||||||
</div>
|
</div>
|
||||||
<!-- © Copyright -->
|
<!-- © Copyright -->
|
||||||
|
|||||||
@ -2,15 +2,15 @@
|
|||||||
//background-image:url('http://www.ssa.sineedge.com/beta/assets/images/login.jpg') !important;
|
//background-image:url('http://www.ssa.sineedge.com/beta/assets/images/login.jpg') !important;
|
||||||
//background-image: url(../../../assets/images/login_o.jpg);
|
//background-image: url(../../../assets/images/login_o.jpg);
|
||||||
//background-color: #F44336;
|
//background-color: #F44336;
|
||||||
background: url(../../../assets/images/bg.png) repeat-x 0 0 #E00201;
|
background: url(../../../assets/images/bg.png) repeat-x 0 0 #ffffff;
|
||||||
height: 100vh !important;
|
//height: 100vh !important;
|
||||||
background-position: center !important;
|
background-position: center !important;
|
||||||
min-height: calc(0vh + 0px) !important;
|
min-height: calc(90vh + 90px) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signin-page{
|
.signin-page{
|
||||||
float: left;
|
float: left;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
padding-bottom: 40px;
|
padding-bottom: 40px;
|
||||||
}
|
}
|
||||||
// .form-bg {
|
// .form-bg {
|
||||||
@ -25,11 +25,16 @@
|
|||||||
.form-bg::after{
|
.form-bg::after{
|
||||||
background-color: #E00201;
|
background-color: #E00201;
|
||||||
}
|
}
|
||||||
h3, .page-footer{
|
.page-title{
|
||||||
color:#E00201;
|
color:#E00201;
|
||||||
background-color:#ffffff;
|
background-color:#ffffff;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.page-footer{
|
||||||
|
color:#E00201;
|
||||||
|
background-color:#ffffff;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
.bottom-sec,.mat-green{
|
.bottom-sec,.mat-green{
|
||||||
color:white !important;
|
color:white !important;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<div fxLayout="row wrap" fxLayoutAlign="end">
|
<div fxLayout="row wrap" fxLayoutAlign="end" style="padding-top:1%">
|
||||||
<button mat-fab class="mr-1 mb-1" color="primary" matTooltip="Add More Billing Information" matTooltipPosition="above" (click)="editDetails(null); false"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" color="primary" matTooltip="Add More Billing Information" matTooltipPosition="above" (click)="editDetails(null); false"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<mat-card *ngFor="let data of entityBillingInfoRecord">
|
<mat-card *ngFor="let data of entityBillingInfoRecord">
|
||||||
@ -8,17 +8,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxFlex="50%">
|
<div fxFlex="50%">
|
||||||
<div>
|
<div>
|
||||||
{{data.addressline2}}, {{data.addressline3}}
|
{{data.addressline2}}<span *ngIf="data.addressline3">, {{data.addressline3}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Pan: {{data.pan}}, Gst: {{data.gstno}}
|
<span *ngIf="data.pan">Pan: {{data.pan}}</span> <span *ngIf="data.gstno">, Gst: {{data.gstno}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div *ngFor="let conts of data.contacts; let last = last">{{conts.contact_person}} - {{conts.contact_email}} - {{conts.contact_mobile_no}} <span *ngIf="!last">,</span></div>
|
<div *ngFor="let conts of data.contacts; let last = last">{{conts.contact_person}} - {{conts.contact_email}} - {{conts.contact_mobile_no}} <span *ngIf="!last">,</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="20%">
|
<div fxFlex="20%">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="editDetails(data)"><mat-icon>edit</mat-icon></button>
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editDetails(data)"><mat-icon>edit</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -1,6 +1,7 @@
|
|||||||
<form [formGroup]="_editEntityRegionFrom" (submit)="onSubmit()">
|
<form [formGroup]="_editEntityRegionFrom" (submit)="onSubmit()">
|
||||||
<div formArrayName="region_lender" class="example-full-width">
|
<div formArrayName="region_lender" class="example-full-width">
|
||||||
<mat-card *ngFor="let region of _editEntityRegionFrom.controls.region_lender['controls']; let i=index">
|
<mat-card *ngFor="let region of _editEntityRegionFrom.controls.region_lender['controls']; let i=index">
|
||||||
|
<mat-card-content>
|
||||||
<div [formGroupName]="i">
|
<div [formGroupName]="i">
|
||||||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%" fxLayoutAlign="center center">
|
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%" fxLayoutAlign="center center">
|
||||||
<mat-form-field fxFlex="30%">
|
<mat-form-field fxFlex="30%">
|
||||||
@ -31,7 +32,7 @@
|
|||||||
<mat-error *ngIf="submitted && region['controls'].fk_branch_id.hasError('required')" class="mat-text-warn">Branch Required.!</mat-error>
|
<mat-error *ngIf="submitted && region['controls'].fk_branch_id.hasError('required')" class="mat-text-warn">Branch Required.!</mat-error>
|
||||||
</mat-form-field>-->
|
</mat-form-field>-->
|
||||||
|
|
||||||
<div fxFlex="30%">
|
<div fxFlex="30%" style="text-align:center;">
|
||||||
<mat-checkbox *ngIf="region.get('entity_region_map_id').value != null" formControlName="isactive" [ngModel]="region.get('isactive').value == 1 ? true : region.get('isactive').value == 0 ? false : null"
|
<mat-checkbox *ngIf="region.get('entity_region_map_id').value != null" formControlName="isactive" [ngModel]="region.get('isactive').value == 1 ? true : region.get('isactive').value == 0 ? false : null"
|
||||||
(ngModelChange)="region.get('isactive').value = $event ? 1 : 0"></mat-checkbox>
|
(ngModelChange)="region.get('isactive').value = $event ? 1 : 0"></mat-checkbox>
|
||||||
|
|
||||||
@ -41,6 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="text-align:right;">
|
<div class="row" style="text-align:right;">
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<div style="overflow: auto;">
|
<div >
|
||||||
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="end">
|
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="end">
|
||||||
<div style="text-align:right;">
|
<div style="text-align:right;">
|
||||||
<button mat-raised-button mat-icon-button color="primary" class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"
|
<button mat-raised-button mat-icon-button color="primary" class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="end" style="padding-top:1%">
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="end" style="padding-top:1%">
|
||||||
<div fxFlex="20%">
|
<div fxFlex="20%" style="text-align:right;">
|
||||||
<button mat-fab class="mr-1 mb-1" color="primary"matTooltip="Add New Tat Details" matTooltipPosition="above" (click)="addNewTatDetails()"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" color="primary"matTooltip="Add More TAT Details" matTooltipPosition="above" (click)="addNewTatDetails()"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
{{data.tatVal2}}
|
{{data.tatVal2}}
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="18%">
|
<div fxFlex="18%">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="editDetails(data)"><mat-icon>edit</mat-icon></button>
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editDetails(data)"><mat-icon>edit</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -8,7 +8,40 @@
|
|||||||
<button mat-fab class="mr-1 mb-1" color="primary"matTooltip="Add New Entity" matTooltipPosition="above" (click)="addNewEntity()"><mat-icon>add</mat-icon></button>
|
<button mat-fab class="mr-1 mb-1" color="primary"matTooltip="Add New Entity" matTooltipPosition="above" (click)="addNewEntity()"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<mat-card-content>
|
||||||
<ng-container *ngIf="enityList.length > 0">
|
<ng-container *ngIf="enityList.length > 0">
|
||||||
|
<mat-table [dataSource]="dataSource">
|
||||||
|
|
||||||
|
<ng-container matColumnDef="entity_name">
|
||||||
|
<mat-cell fxFlex="20%" class="cell" *matCellDef="let product;">
|
||||||
|
<span *ngIf="product.entity_name" mat-line>{{ product.entity_name }}</span>
|
||||||
|
</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="name">
|
||||||
|
<mat-cell fxFlex="20%" class="cell" *matCellDef="let product;">
|
||||||
|
<div> {{ product.full_name }} ({{product.short_name}})</div>
|
||||||
|
<div> {{ product.branch_name }} </div>
|
||||||
|
<div> {{product.city_name}}<span *ngIf="product.state_name">,</span> {{product.state_name}} </div>
|
||||||
|
</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="contact">
|
||||||
|
<mat-cell fxFlex="20%" class="cell" *matCellDef="let product;">
|
||||||
|
<div> {{ product.phone_number }}</div>
|
||||||
|
<div> {{ product.official_email }}</div></mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="actions">
|
||||||
|
<mat-cell fxFlex="20%" class="cell" *matCellDef="let product;">
|
||||||
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editEntity(product)"><mat-icon>edit</mat-icon></button>
|
||||||
|
|
||||||
|
</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||||
|
</mat-row>
|
||||||
|
</mat-table>
|
||||||
|
</ng-container>
|
||||||
|
</mat-card-content>
|
||||||
|
<!----<ng-container *ngIf="enityList.length > 0">
|
||||||
<div style="padding: 0 12px;">
|
<div style="padding: 0 12px;">
|
||||||
<mat-card class="product-card" *ngFor="let product of dataSource.connect() | async">
|
<mat-card class="product-card" *ngFor="let product of dataSource.connect() | async">
|
||||||
<div fxLayout="row" fxLayoutAlign="start start">
|
<div fxLayout="row" fxLayoutAlign="start start">
|
||||||
@ -38,13 +71,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>-->
|
||||||
<mat-card *ngIf="noQuesMasterRecrdFound">
|
<mat-card *ngIf="noQuesMasterRecrdFound">
|
||||||
|
<mat-card-content>
|
||||||
<div class="no-record-found">No Record Found ... </div>
|
<div class="no-record-found">No Record Found ... </div>
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-paginator #paginator class="mat-elevation-z1" [length]="enityList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
<div *ngIf="enityList.length > 0">
|
||||||
|
<mat-paginator [length]="enityList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||||
[pageSizeOptions]="[5, 10, 25, 50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
[pageSizeOptions]="[5, 10, 25, 50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
||||||
</mat-paginator>
|
</mat-paginator>
|
||||||
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -1,55 +1,71 @@
|
|||||||
<div style="max-height: 580px;">
|
<!--<pre> {{ m_group | json}}</pre>-->
|
||||||
|
|
||||||
|
<h2 mat-dialog-title>{{pageTitle}}</h2>
|
||||||
|
<mat-dialog-content class="mat-typography">
|
||||||
<mat-card style="width: 580px; padding: 6px;">
|
<mat-card style="width: 580px; padding: 6px;">
|
||||||
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()" novalidate>
|
||||||
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<div style="width: 20%;"></div>
|
<div fxFlex="50">
|
||||||
<div style="width: 30%;text-align:right;">
|
<mat-form-field>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
|
||||||
<!--<div class="form-group">-->
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
|
||||||
<mat-select placeholder="Select Category" formControlName="fk_question_category">
|
<mat-select placeholder="Select Category" formControlName="fk_question_category">
|
||||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div fxFlex="50">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Select 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-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_question_group_id.hasError('required')" class="mat-text-warn">You must Select Group.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<div class="example-full-width">
|
||||||
|
<mat-form-field fxFill>
|
||||||
<textarea matInput placeholder="Question" formControlName="question"></textarea>
|
<textarea matInput placeholder="Question" formControlName="question"></textarea>
|
||||||
<mat-error *ngIf="submitted && f.question.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>
|
<mat-error *ngIf="submitted && f.question.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<div class="example-full-width">
|
||||||
|
<mat-form-field fxFill>
|
||||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
||||||
<mat-error *ngIf="submitted && f.description.hasError('required')" class="mat-text-warn">You must Include Description.</mat-error>
|
<mat-error *ngIf="submitted && f.description.hasError('required')" class="mat-text-warn">You must Include Description.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<div>
|
||||||
|
<mat-form-field>
|
||||||
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
||||||
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div formArrayName="answers" class="example-full-width">
|
<div formArrayName="answers" fxFill>
|
||||||
<div *ngFor="let answ of _addQuesFrom.controls.answers['controls']; let i=index">
|
<div *ngFor="let answ of _addQuesFrom.controls.answers['controls']; let i=index">
|
||||||
<div [formGroupName]="i">
|
<div [formGroupName]="i">
|
||||||
<div fxLayout="row" style="width: 100%">
|
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
|
||||||
<div style="width: 80%">
|
<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>-->
|
|
||||||
<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-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:20%">
|
<div fxFlex="30">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Select 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-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="20">
|
||||||
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||||
</span>
|
</span>
|
||||||
@ -57,22 +73,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||||
<!-- <button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage($event); false">Add More</button> -->
|
class="mr-1 mb-1 hover-icon" (click)="addLanguage($event); false"><mat-icon>add</mat-icon></button>
|
||||||
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--Error List Shown Here-->
|
|
||||||
<!--<ul>
|
|
||||||
<li *ngFor="let err of errorMessage">
|
|
||||||
<mat-error>{{err.err}}</mat-error>
|
|
||||||
</li>
|
|
||||||
</ul>-->
|
|
||||||
<div class="row" style="text-align:right;">
|
<div class="row" style="text-align:right;">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<!--</div>-->
|
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</mat-dialog-content>
|
||||||
|
<mat-dialog-actions align="end">
|
||||||
|
<button mat-button mat-dialog-close>Cancel</button>
|
||||||
|
</mat-dialog-actions>
|
||||||
@ -39,6 +39,7 @@ export class AddComponent implements OnInit {
|
|||||||
public submitted = false;
|
public submitted = false;
|
||||||
public categories: any = [];
|
public categories: any = [];
|
||||||
public questionsOptions: any = [];
|
public questionsOptions: any = [];
|
||||||
|
public m_group: any = [];
|
||||||
errorMessage: string;
|
errorMessage: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,6 +63,7 @@ export class AddComponent implements OnInit {
|
|||||||
question: [null, Validators.compose([Validators.required])],
|
question: [null, Validators.compose([Validators.required])],
|
||||||
description: [null, Validators.compose([Validators.required])],
|
description: [null, Validators.compose([Validators.required])],
|
||||||
fk_question_category: [null, Validators.compose([Validators.required])],
|
fk_question_category: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_question_group_id: [null, Validators.compose([Validators.required])],
|
||||||
fk_question_answertype: [null, Validators.compose([Validators.required])],
|
fk_question_answertype: [null, Validators.compose([Validators.required])],
|
||||||
answers: this._formBuilder.array([
|
answers: this._formBuilder.array([
|
||||||
this.initAnswers(),
|
this.initAnswers(),
|
||||||
@ -70,6 +72,7 @@ export class AddComponent implements OnInit {
|
|||||||
// OnInit Load Category and Question Type Masters
|
// OnInit Load Category and Question Type Masters
|
||||||
this.getCategoryListMaster();
|
this.getCategoryListMaster();
|
||||||
this.getQuestionOptionsMaster();
|
this.getQuestionOptionsMaster();
|
||||||
|
this.getQuestionGroupMaster();
|
||||||
}
|
}
|
||||||
|
|
||||||
// convenience getter for easy access to form fields
|
// convenience getter for easy access to form fields
|
||||||
@ -78,7 +81,8 @@ export class AddComponent implements OnInit {
|
|||||||
// Dynamic Form field creation Functionality : START ===>
|
// Dynamic Form field creation Functionality : START ===>
|
||||||
initAnswers() {
|
initAnswers() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
answer: ['', Validators.compose([Validators.required])]
|
answer: ['', Validators.compose([Validators.required])],
|
||||||
|
fk_question_group_id: ['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
addLanguage(e) {
|
addLanguage(e) {
|
||||||
@ -103,6 +107,19 @@ export class AddComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getQuestionGroupMaster() {
|
||||||
|
this.masterService.getAllMasterData('QUESTIONGROUP').subscribe(
|
||||||
|
data => {
|
||||||
|
this.m_group = data.records;
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
this.notifier.notify('warning', 'No Question Group Records Found.!');
|
||||||
|
this.errorMessage = "No Question Group Records Found.";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
getQuestionOptionsMaster() {
|
getQuestionOptionsMaster() {
|
||||||
this.masterService.getAllMasterData('QUESTIONANSWERTYPE').subscribe(
|
this.masterService.getAllMasterData('QUESTIONANSWERTYPE').subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
|||||||
@ -1,63 +1,77 @@
|
|||||||
<div style="max-height: 480px;">
|
<h2 mat-dialog-title>{{pageTitle}}</h2>
|
||||||
|
<mat-dialog-content class="mat-typography">
|
||||||
<mat-card style="width: 580px; padding: 6px;">
|
<mat-card style="width: 580px; padding: 6px;">
|
||||||
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
|
|
||||||
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
|
|
||||||
<div style="width: 20%;"></div>
|
|
||||||
<div style="width: 30%;text-align:right;">
|
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
<form [formGroup]="_addQuesFrom" (submit)="onSubmit()">
|
||||||
<!--<div class="form-group">-->
|
<!--<div class="form-group">-->
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<div fxFlex="50">
|
||||||
|
<mat-form-field>
|
||||||
<mat-select placeholder="Select Category" formControlName="fk_question_category">
|
<mat-select placeholder="Select Category" formControlName="fk_question_category">
|
||||||
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
<mat-option *ngFor="let ct of categories" [value]="ct.question_category_id">{{ ct.category_name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div fxFlex="50">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Select 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-select>
|
||||||
|
<mat-error *ngIf="submitted && f.fk_question_group_id.hasError('required')" class="mat-text-warn">You must Select Group.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<div class="example-full-width">
|
||||||
|
<mat-form-field fxFill>
|
||||||
<textarea matInput placeholder="Question" formControlName="question"></textarea>
|
<textarea matInput placeholder="Question" formControlName="question"></textarea>
|
||||||
<mat-error *ngIf="submitted && f.question.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>
|
<mat-error *ngIf="submitted && f.question.hasError('required')" class="mat-text-warn">You must Include Question.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<div class="example-full-width">
|
||||||
|
<mat-form-field fxFill>
|
||||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
||||||
<mat-error *ngIf="submitted && f.description.hasError('required')" class="mat-text-warn">You must Include Description.</mat-error>
|
<mat-error *ngIf="submitted && f.description.hasError('required')" class="mat-text-warn">You must Include Description.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<div>
|
||||||
|
<mat-form-field>
|
||||||
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
<mat-select placeholder="Select Answer Type" formControlName="fk_question_answertype">
|
||||||
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
<mat-option *ngFor="let ans of questionsOptions" [value]="ans.question_answer_type_id">{{ ans.answer_type_name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
<mat-error *ngIf="submitted && f.fk_question_answertype.hasError('required')" class="mat-text-warn">You must Select Answer Type.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
|
|
||||||
<!--<mat-checkbox formControlName="isactive" [ngModel]="f.isactive.value === 1 ? true : false"
|
<!--<mat-checkbox formControlName="isactive" [ngModel]="f.isactive.value === 1 ? true : false"
|
||||||
(ngModelChange)="f.isactive.value = $event ? 1 : 0">Active/InActive</mat-checkbox>
|
(ngModelChange)="f.isactive.value = $event ? 1 : 0">Active/InActive</mat-checkbox>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div formArrayName="answers" class="example-full-width">
|
<div formArrayName="answers" fxFill>
|
||||||
<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" style="width: 100%">
|
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
|
||||||
<div style="width: 80%">
|
<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 style="width:20%">
|
<div fxFlex="30">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Select 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-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="20">
|
||||||
<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)">
|
||||||
@ -67,12 +81,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, $event); false"><mat-icon>add</mat-icon></button>
|
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||||
|
class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, $event); false"><mat-icon>add</mat-icon></button>
|
||||||
<!-- <button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage(null, null, null, $event); false">Add More</button> -->
|
<!-- <button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage(null, null, null, $event); false">Add More</button> -->
|
||||||
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--Error List Shown Here-->
|
<!--Error List Shown Here-->
|
||||||
<!--<ul>
|
<!--<ul>
|
||||||
<li *ngFor="let err of errorMessage">
|
<li *ngFor="let err of errorMessage">
|
||||||
@ -87,6 +101,8 @@
|
|||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</mat-dialog-content>
|
||||||
|
<mat-dialog-actions align="end">
|
||||||
|
<button mat-button mat-dialog-close>Cancel</button>
|
||||||
|
</mat-dialog-actions>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
@ -39,6 +39,7 @@ export class EditComponent implements OnInit {
|
|||||||
public _addQuesFrom: FormGroup;
|
public _addQuesFrom: FormGroup;
|
||||||
public submitted = false;
|
public submitted = false;
|
||||||
public categories: any = [];
|
public categories: any = [];
|
||||||
|
public m_group: any = [];
|
||||||
public questionsOptions: any = [];
|
public questionsOptions: any = [];
|
||||||
errorMessage: string;
|
errorMessage: string;
|
||||||
|
|
||||||
@ -60,15 +61,16 @@ export class EditComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.loadFormData();
|
this.loadFormData();
|
||||||
if (this.data["0"].length > 0) {
|
// if (this.data["0"].length > 0) {
|
||||||
for (let val of this.data["0"]) {
|
// for (let val of this.data["0"]) {
|
||||||
// alert(JSON.stringify(val));
|
// // alert(JSON.stringify(val));
|
||||||
let vals = val;
|
// let vals = val;
|
||||||
this.addLanguage(vals['answer'], vals['question_answer_id'], vals['isactive'], null);
|
// this.addLanguage(vals['answer'], vals['question_answer_id'], vals['isactive'], null);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// OnInit Load Category and Question Type Masters
|
// OnInit Load Category and Question Type Masters
|
||||||
this.getCategoryListMaster();
|
this.getCategoryListMaster();
|
||||||
|
this.getQuestionGroupMaster();
|
||||||
this.getQuestionOptionsMaster();
|
this.getQuestionOptionsMaster();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +80,7 @@ export class EditComponent implements OnInit {
|
|||||||
for (let val of this.data["0"]) {
|
for (let val of this.data["0"]) {
|
||||||
// alert(JSON.stringify(val));
|
// alert(JSON.stringify(val));
|
||||||
let vals = val;
|
let vals = val;
|
||||||
this.addLanguage(vals['answer'], vals['question_answer_id'], vals['isactive'], null);
|
this.addLanguage(vals['answer'], vals['question_answer_id'], vals['fk_question_group_id'], vals['isactive'], null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,6 +93,7 @@ export class EditComponent implements OnInit {
|
|||||||
question: [this.data.question, Validators.compose([Validators.required])],
|
question: [this.data.question, Validators.compose([Validators.required])],
|
||||||
description: [this.data.description, Validators.compose([Validators.required])],
|
description: [this.data.description, Validators.compose([Validators.required])],
|
||||||
fk_question_category: [this.data.fk_question_category, Validators.compose([Validators.required])],
|
fk_question_category: [this.data.fk_question_category, Validators.compose([Validators.required])],
|
||||||
|
fk_question_group_id: [this.data.fk_question_group_id, Validators.compose([Validators.required])],
|
||||||
fk_question_answertype: [this.data.fk_question_answertype, Validators.compose([Validators.required])],
|
fk_question_answertype: [this.data.fk_question_answertype, Validators.compose([Validators.required])],
|
||||||
isactive: [this.data.isactive],
|
isactive: [this.data.isactive],
|
||||||
answers: this._formBuilder.array([
|
answers: this._formBuilder.array([
|
||||||
@ -107,17 +110,18 @@ export class EditComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
// Dynamic Form field creation Functionality : START ===>
|
// Dynamic Form field creation Functionality : START ===>
|
||||||
initAnswers(ans, fk_id, isAct) {
|
initAnswers(ans, fk_id, fk_question_group_id, isAct) {
|
||||||
isAct = isAct == null ? 1 : isAct;
|
isAct = isAct == null ? 1 : isAct;
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
answer: [ans, Validators.compose([Validators.required])],
|
answer: [ans, Validators.compose([Validators.required])],
|
||||||
question_answer_id: [fk_id],
|
question_answer_id: [fk_id],
|
||||||
|
fk_question_group_id: [fk_question_group_id],
|
||||||
isactive: [isAct]
|
isactive: [isAct]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
addLanguage(ans, fk_id, isAct, e) {
|
addLanguage(ans, fk_id, fk_question_group_id, isAct, e) {
|
||||||
const control = <FormArray>this._addQuesFrom.controls['answers'];
|
const control = <FormArray>this._addQuesFrom.controls['answers'];
|
||||||
control.push(this.initAnswers(ans, fk_id, isAct));
|
control.push(this.initAnswers(ans, fk_id, fk_question_group_id, isAct));
|
||||||
}
|
}
|
||||||
removeLanguage(i: number) {
|
removeLanguage(i: number) {
|
||||||
const control = <FormArray>this._addQuesFrom.controls['answers'];
|
const control = <FormArray>this._addQuesFrom.controls['answers'];
|
||||||
@ -137,6 +141,18 @@ export class EditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getQuestionGroupMaster() {
|
||||||
|
this.masterService.getAllMasterData('QUESTIONGROUP').subscribe(
|
||||||
|
data => {
|
||||||
|
this.m_group = data.records;
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
this.notifier.notify('warning', 'No Question Group Records Found.!');
|
||||||
|
this.errorMessage = "No Question Group Records Found.";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
getQuestionOptionsMaster() {
|
getQuestionOptionsMaster() {
|
||||||
this.masterService.getAllMasterData('QUESTIONANSWERTYPE').subscribe(
|
this.masterService.getAllMasterData('QUESTIONANSWERTYPE').subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
|||||||
@ -25,31 +25,33 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--</mat-card-content>-->
|
<!--</mat-card-content>-->
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-table [dataSource]="dataSource" matSort *ngIf="productList.length > 0" >
|
<ng-container *ngIf="productList.length > 0">
|
||||||
|
<mat-table [dataSource]="dataSource">
|
||||||
|
|
||||||
<ng-container matColumnDef="category_name">
|
<ng-container matColumnDef="category_name">
|
||||||
<mat-cell fxFlex="25%" class="cell" *matCellDef="let product;" style="width:20% !important;">
|
<mat-cell fxFlex="20%" class="cell" *matCellDef="let product;" >
|
||||||
<span *ngIf="product.category_name" mat-line>{{ product.category_name }}</span>
|
<span *ngIf="product.category_name" mat-line>{{ product.category_name }}</span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="question">
|
<ng-container matColumnDef="question">
|
||||||
<mat-cell fxFlex="65%" class="cell" *matCellDef="let product;" style="width:70% !important;">
|
<mat-cell fxFlex="70%" class="cell" *matCellDef="let product;" >
|
||||||
<span *ngIf="product.question" mat-line>{{ product.question }}</span>
|
<span *ngIf="product.question" mat-line>{{ product.question }}</span>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="actions">
|
<ng-container matColumnDef="actions">
|
||||||
<mat-cell fxFlex="10%" class="cell" *matCellDef="let product;" style="width:10% !important;">
|
<mat-cell fxFlex="10%" class="cell" *matCellDef="let product;">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editQuestion(product)"><mat-icon>edit</mat-icon></button>
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="editQuestion(product)"><mat-icon>edit</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||||
</mat-row>
|
</mat-row>
|
||||||
</mat-table>
|
</mat-table>
|
||||||
|
</ng-container>
|
||||||
|
<div *ngIf="productList.length > 0">
|
||||||
<mat-paginator #paginator class="mat-elevation-z1" [length]="productList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
<mat-paginator [length]="productList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||||
[pageSizeOptions]="[5, 10, 25, 50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
[pageSizeOptions]="[5, 10, 25, 50, 100]" (page)="pageEvent = $event; pageChange($event)" showFirstLastButtons>
|
||||||
</mat-paginator>
|
</mat-paginator>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!---- <ng-container *ngIf="productList.length > 0">
|
<!---- <ng-container *ngIf="productList.length > 0">
|
||||||
@ -79,7 +81,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-container>-->
|
</ng-container>-->
|
||||||
<mat-card *ngIf="noQuesMasterRecrdFound">
|
<mat-card *ngIf="noQuesMasterRecrdFound">
|
||||||
|
<mat-card-content>
|
||||||
<div class="no-record-found">No Record Found ... </div>
|
<div class="no-record-found">No Record Found ... </div>
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user