Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
7ee8150429
@ -9,52 +9,53 @@
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:20%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:20%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()" matTooltip="Search"
|
||||
matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
@ -64,13 +65,9 @@
|
||||
|
||||
<ng-container matColumnDef="PDType">
|
||||
|
||||
<mat-cell fxFlex="15" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||
|
||||
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'"
|
||||
class="mr-1 mb-1 hover-icon commonPDType" [matTooltip]="details.pd_type_name" matTooltipPosition="above">
|
||||
<strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong>
|
||||
</div>
|
||||
|
||||
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
|
||||
<small mat-line>{{details.pd_type_name}}</small>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Name">
|
||||
|
||||
@ -13,40 +13,4 @@
|
||||
}
|
||||
.fontsize{
|
||||
font-size:14px;
|
||||
}
|
||||
// .pd_circle {
|
||||
// border: 5px red !important;
|
||||
// width: 50px;
|
||||
// height: 50px;
|
||||
// border-radius: 50px !important;
|
||||
// // font-size: 18px;
|
||||
// // color: red;
|
||||
// // line-height: 50px;
|
||||
// // text-align: center;
|
||||
// background: #fff;
|
||||
// }
|
||||
.commonPDType{
|
||||
display:flex;
|
||||
justify-content:flex-end;
|
||||
color: #ffffff;
|
||||
margin-top:4px;
|
||||
margin-bottom:4px;
|
||||
width: 95px;
|
||||
height: 95px;
|
||||
justify-content:center;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
line-height: 95px;
|
||||
}
|
||||
.fullPD{
|
||||
background:#009688;
|
||||
border: 2px #009688;
|
||||
}
|
||||
.smartPD{
|
||||
background:#673ab7;
|
||||
border: 2px #673ab7;
|
||||
}
|
||||
.telePD{
|
||||
background:#2196f3;
|
||||
border: 2px #2196f3;
|
||||
}
|
||||
@ -9,52 +9,53 @@
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<!-- <mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
@ -64,12 +65,10 @@
|
||||
<mat-table [dataSource]="dataSourceTab4" matSort *ngIf="completedPdListData.length > 0" >
|
||||
|
||||
<ng-container matColumnDef="PDType">
|
||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||
<!-- <button *ngIf="details.fk_pd_type != null" [matTooltip]="details.fk_pd_type == '1' ? 'Full PD' : details.fk_pd_type == '2' ? 'Smart PD' : details.fk_pd_type == '3' ? 'Tele PD' : '' " mat-button mat-icon-button class="mr-1 mb-1 hover-icon pd_circle" type="button"
|
||||
matTooltipPosition="above"><strong>{{(details.pd_type_name | slice:0:1)}}</strong></button> -->
|
||||
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'" class="mr-1 mb-1 hover-icon commonPDType"
|
||||
[matTooltip]="details.pd_type_name" matTooltipPosition="above"><strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong></div>
|
||||
</mat-cell>
|
||||
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
|
||||
<small mat-line>{{details.pd_type_name}}</small>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Name">
|
||||
<mat-cell class="cell" *matCellDef="let details;">
|
||||
|
||||
@ -14,50 +14,3 @@
|
||||
.fontsize{
|
||||
font-size:14px;
|
||||
}
|
||||
// .pd_circle {
|
||||
// width: 60px !important;
|
||||
// height: 60px;
|
||||
// border-radius: 50%;
|
||||
// font-size: 18px;
|
||||
// color: #ffffff;
|
||||
// text-align: center;
|
||||
// background: red
|
||||
// }
|
||||
// .FullPD-Class{
|
||||
// background:lightcoral;
|
||||
// border: 2px lightcoral;
|
||||
// }
|
||||
// .SmartPD-Class{
|
||||
// background:thistle;
|
||||
// border: 2px thistle;
|
||||
// }
|
||||
// .TelePD-Class{
|
||||
// background:lawngreen;
|
||||
// border: 2px lawngreen;
|
||||
// }
|
||||
|
||||
.commonPDType{
|
||||
display:flex;
|
||||
justify-content:flex-end;
|
||||
color: #ffffff;
|
||||
margin-top:4px;
|
||||
margin-bottom:4px;
|
||||
width: 95px;
|
||||
height: 95px;
|
||||
justify-content:center;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
line-height: 95px;
|
||||
}
|
||||
.fullPD{
|
||||
background:#009688;
|
||||
border: 2px #009688;
|
||||
}
|
||||
.smartPD{
|
||||
background:#673ab7;
|
||||
border: 2px #673ab7;
|
||||
}
|
||||
.telePD{
|
||||
background:#2196f3;
|
||||
border: 2px #2196f3;
|
||||
}
|
||||
@ -52,7 +52,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type:[null],
|
||||
pd_status:[null],
|
||||
pd_status:['COMPLETED'],
|
||||
pd_from_date:[null],
|
||||
pd_to_date:[null],
|
||||
pd_city:[null],
|
||||
|
||||
@ -8,52 +8,53 @@
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<!-- <mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
@ -61,12 +62,10 @@
|
||||
<br/>
|
||||
<mat-table [dataSource]="dataSourceTab2" matSort *ngIf="progressPdListData.length > 0" >
|
||||
<ng-container matColumnDef="PDType">
|
||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||
<!-- <button *ngIf="details.fk_pd_type != null" [matTooltip]="details.fk_pd_type == '1' ? 'Full PD' : details.fk_pd_type == '2' ? 'Smart PD' : details.fk_pd_type == '3' ? 'Tele PD' : '' " mat-button mat-icon-button class="mr-1 mb-1 hover-icon pd_circle" type="button"
|
||||
matTooltipPosition="above"><strong>{{(details.pd_type_name | slice:0:1)}}</strong></button> -->
|
||||
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'" class="mr-1 mb-1 hover-icon commonPDType"
|
||||
[matTooltip]="details.pd_type_name" matTooltipPosition="above"><strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong></div>
|
||||
</mat-cell>
|
||||
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
|
||||
<small mat-line>{{details.pd_type_name}}</small>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Name">
|
||||
<mat-cell class="cell" *matCellDef="let details;">
|
||||
|
||||
@ -13,39 +13,4 @@
|
||||
}
|
||||
.fontsize{
|
||||
font-size:14px;
|
||||
}
|
||||
// .pd_circle {
|
||||
// width: 50px !important;
|
||||
// height: 50px;
|
||||
// border-radius: 50%;
|
||||
// font-size: 18px;
|
||||
// color: #ffffff;
|
||||
// line-height: 50px;
|
||||
// text-align: center;
|
||||
// background: red
|
||||
// }
|
||||
.commonPDType{
|
||||
display:flex;
|
||||
justify-content:flex-end;
|
||||
color: #ffffff;
|
||||
margin-top:4px;
|
||||
margin-bottom:4px;
|
||||
width: 95px;
|
||||
height: 95px;
|
||||
justify-content:center;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
line-height: 95px;
|
||||
}
|
||||
.fullPD{
|
||||
background:#009688;
|
||||
border: 2px #009688;
|
||||
}
|
||||
.smartPD{
|
||||
background:#673ab7;
|
||||
border: 2px #673ab7;
|
||||
}
|
||||
.telePD{
|
||||
background:#2196f3;
|
||||
border: 2px #2196f3;
|
||||
}
|
||||
@ -46,7 +46,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type:[null],
|
||||
pd_status:[null],
|
||||
pd_status:['INPROGRESS'],
|
||||
pd_from_date:[null],
|
||||
pd_to_date:[null],
|
||||
pd_city:[null],
|
||||
|
||||
@ -1,127 +1,96 @@
|
||||
<div style="text-align: right;" class="mb-1">
|
||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
|
||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
||||
</div>
|
||||
<div style="text-align: right;" class="mb-1">
|
||||
</div>
|
||||
<mat-card style="min-height:540px;">
|
||||
<mat-card-content>
|
||||
<div align="end">
|
||||
<button mat-raised-button color="blue" (click)="reportReview('REMARKS')" style="padding: 0 28px !important;" *ngIf="qcStatus !== 'QC_COMPLETED'">Notes</button>
|
||||
<button mat-raised-button color="red" (click)="reportReview('COMPLETE')" style="padding: 0 28px !important;" *ngIf="qcStatus !== 'QC_COMPLETED'">QC Complete</button>
|
||||
<!--{{ qcStatus }} -->
|
||||
</div>
|
||||
<mat-tab-group>
|
||||
<mat-tab label="PD Data">
|
||||
<div align="end" style="padding: 12px;">
|
||||
<button matTooltip="Export Excel" matTooltipPosition="above" color="primary" mat-icon-button mat-raised-button (click)="export()">
|
||||
<mat-icon style="color: white;">cloud_download</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<label>Billing Name : </label> {{pdReportRecords?.billing_name}}
|
||||
</div>
|
||||
<div>
|
||||
<label>Product Name : </label> {{pdReportRecords?.product_name}}
|
||||
</div>
|
||||
<div>
|
||||
<label>Customer Segment Name: </label> {{pdReportRecords?.customer_segment_name}}
|
||||
</div>
|
||||
<div>
|
||||
<label>PD Type: </label> {{pdReportRecords?.pd_type_name}}
|
||||
</div>
|
||||
<div>
|
||||
<label>Status: </label> {{pdReportRecords?.pd_status}}
|
||||
</div>
|
||||
<div>
|
||||
<label>Applicant Details : </label>
|
||||
<span *ngFor="let applicants of pdReportRecords?.pd_applicant_details; let last = last"> {{applicants.applicant_name}} <span *ngIf="!last"> , </span></span>
|
||||
</div>
|
||||
<!--{{pdReportRecords.question_answers | json}}-->
|
||||
<div *ngFor="let data of pdReportRecords?.question_answers.form_details">
|
||||
|
||||
<div *ngIf="data?.details.length > 0">
|
||||
<h4><b>{{data.name}}</b></h4>
|
||||
<div *ngFor="let dataQA of data?.details">
|
||||
<div><b>{{dataQA.question}}</b></div>
|
||||
<div>{{dataQA.answer}}</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-tab>
|
||||
<mat-tab label="PD Report">
|
||||
<div *ngIf="reGenerateBtn">
|
||||
|
||||
<mat-card>
|
||||
|
||||
<mat-card-content>
|
||||
<!-- this is for completed pd report -->
|
||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
||||
<mat-card-content *ngIf="reGenerateBtn"ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
||||
|
||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||
<button matTooltip="Menu" matTooltipPosition="above" (click)="mailnav.toggle()" color="primary" fxHide="false" fxshow.gt-sm mat-icon-button mat-raised-button>
|
||||
<mat-icon style="color: white;">short_text</mat-icon>
|
||||
</button>
|
||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||
<mat-card style="text-align:center;" *ngIf="qcStatus !== 'QC_COMPLETED'"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()" style="padding: 0 58px !important;" >Re-generate Report</button></mat-card>
|
||||
<button type="button" mat-menu-item *ngFor="let pd of pdReportVersionList" [ngClass]="{'active': selectedItem == item}" (click)="changeVersion(pd)" style="font-size: 0.9em !important;height:6% !important;line-height: normal !important;">
|
||||
{{ pd.doc_name }}<span *ngIf="pd.is_latest == 1" [style.color]="'green'">( Current Version )</span><br>
|
||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdby}}</span><br>
|
||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdon}}</span>
|
||||
<hr>
|
||||
|
||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||
<button matTooltip="Menu" matTooltipPosition="above" (click)="mailnav.toggle()" color="primary" fxHide="false" fxshow.gt-sm mat-icon-button mat-raised-button>
|
||||
<mat-icon style="color: white;">short_text</mat-icon>
|
||||
</button>
|
||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||
<mat-card style="text-align:center;" *ngIf="qcStatus !== 'QC_COMPLETED'"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()" style="padding: 0 58px !important;" >Re-generate Report</button></mat-card>
|
||||
<button mat-menu-item *ngFor="let pd of pdReportVersionList" [ngClass]="{'active': selectedItem == item}" (click)="changeVersion(pd)" style="font-size: 0.9em !important;height:6% !important;line-height: normal !important;">
|
||||
{{ pd.doc_name }}<span *ngIf="pd.is_latest == 1" [style.color]="'green'">( Current Version )</span><br>
|
||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdby}}</span><br>
|
||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdon}}</span>
|
||||
<hr>
|
||||
|
||||
</button>
|
||||
<!--<mat-card *ngIf="qcStatus === 'QC_COMPLETED'" style="text-align:center;position: absolute;
|
||||
bottom: 10px;"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reportReview()" style="padding: 0 58px !important;">QC Review</button> </mat-card>-->
|
||||
</mat-sidenav>
|
||||
|
||||
|
||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<!--{{qcStatus}}-->
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<div *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<div style="text-align: right;" class="mb-1">
|
||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
||||
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
||||
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0 && qcStatus !== 'QC_COMPLETED'" (click)="changeDocumentEdit()">Restore</button>
|
||||
</div>
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer>
|
||||
</div>
|
||||
</button>
|
||||
</mat-sidenav>
|
||||
|
||||
|
||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<!--{{qcStatus}}-->
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<div *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<div style="text-align: right" class="mb-1">
|
||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
||||
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
||||
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0 && qcStatus !== 'QC_COMPLETED'" type="button" (click)="changeDocumentEdit()">Restore</button>
|
||||
</div>
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer>
|
||||
<!-- latestPDDetails.doc_uri -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
</mat-sidenav-container>
|
||||
|
||||
</mat-sidenav-container>
|
||||
</mat-card-content>
|
||||
<mat-card-content *ngIf="generateBtn" style="max-height:400px;overflow: auto;">
|
||||
<div fxLayout="row wrap">
|
||||
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
|
||||
<div fxFlex="100">
|
||||
<h5 style="text-align:center;color: black;"> {{message}}</h5>
|
||||
<div style="text-align:center;">
|
||||
<button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()">Generate Report</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button color="blue" class="m-1 mb-1" type="button" (click)="reportReview('REMARKS')">Notes</button>
|
||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="reportReview('COMPLETE')">QC Complete</button>
|
||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="generateBtn">
|
||||
<div fxLayout="row wrap">
|
||||
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
|
||||
<div fxFlex="100">
|
||||
<h5 style="text-align:center;color: black;"> {{message}}</h5>
|
||||
<div style="text-align:center;">
|
||||
<button mat-raised-button color="primary" *ngIf="generateBtn" (click)="generateNewPDReport()">Generate Report</button>
|
||||
<!-- this is for qc completed pd report -->
|
||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
||||
|
||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<!--{{qcStatus}}-->
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<div *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer>
|
||||
<!-- latestPDDetails.doc_uri -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
@ -7,7 +7,7 @@
|
||||
}
|
||||
:host /deep/ {
|
||||
mat-sidenav {
|
||||
width: 267px;
|
||||
max-width: 300px;
|
||||
}
|
||||
.mat-sidenav-content {
|
||||
padding: 0;
|
||||
|
||||
@ -28,9 +28,9 @@ import { HttpResponse } from "@angular/common/http";
|
||||
export class PdReportComponent implements OnInit {
|
||||
Url: SafeUrl;
|
||||
startPD: any;
|
||||
// public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
||||
// public src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b';
|
||||
public src;
|
||||
//public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
||||
public src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b';
|
||||
//public src;
|
||||
public document;
|
||||
public generateBtn: Boolean = false;
|
||||
public reGenerateBtn: Boolean = false;
|
||||
@ -39,7 +39,6 @@ export class PdReportComponent implements OnInit {
|
||||
pdReportRecords: any;
|
||||
latestPDDetails: any;
|
||||
message: any;
|
||||
|
||||
private notifier: NotifierService;
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
|
||||
@ -145,7 +144,7 @@ export class PdReportComponent implements OnInit {
|
||||
|
||||
getPdReportDetails() {
|
||||
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
if (data.status == 200) {
|
||||
// this.pdReportRecords = data.records.question_answers;
|
||||
this.pdReportRecords = data.records;
|
||||
// this.pdReportRecords = data.records.qu;
|
||||
|
||||
@ -8,52 +8,55 @@
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<!-- <mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value"formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
@ -61,12 +64,10 @@
|
||||
<br/>
|
||||
<mat-table [dataSource]="dataSourceTab5" matSort *ngIf="qcCompletedPdListData.length > 0" >
|
||||
<ng-container matColumnDef="PDType">
|
||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||
<!-- <button *ngIf="details.fk_pd_type != null" [matTooltip]="details.fk_pd_type == '1' ? 'Full PD' : details.fk_pd_type == '2' ? 'Smart PD' : details.fk_pd_type == '3' ? 'Tele PD' : '' " mat-button mat-icon-button class="mr-1 mb-1 hover-icon pd_circle" type="button"
|
||||
matTooltipPosition="above"><strong>{{(details.pd_type_name | slice:0:1)}}</strong></button> -->
|
||||
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'" class="mr-1 mb-1 hover-icon commonPDType"
|
||||
[matTooltip]="details.pd_type_name" matTooltipPosition="above"><strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong></div>
|
||||
</mat-cell>
|
||||
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
|
||||
<small mat-line>{{details.pd_type_name}}</small>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Name">
|
||||
<mat-cell class="cell" *matCellDef="let details;">
|
||||
|
||||
@ -13,39 +13,4 @@
|
||||
}
|
||||
.fontsize{
|
||||
font-size:14px;
|
||||
}
|
||||
// .pd_circle {
|
||||
// width: 50px !important;
|
||||
// height: 50px;
|
||||
// border-radius: 50%;
|
||||
// font-size: 18px;
|
||||
// color: #ffffff;
|
||||
// line-height: 50px;
|
||||
// text-align: center;
|
||||
// background: red
|
||||
// }
|
||||
.commonPDType{
|
||||
display:flex;
|
||||
justify-content:flex-end;
|
||||
color: #ffffff;
|
||||
margin-top:4px;
|
||||
margin-bottom:4px;
|
||||
width: 95px;
|
||||
height: 95px;
|
||||
justify-content:center;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
line-height: 95px;
|
||||
}
|
||||
.fullPD{
|
||||
background:#009688;
|
||||
border: 2px #009688;
|
||||
}
|
||||
.smartPD{
|
||||
background:#673ab7;
|
||||
border: 2px #673ab7;
|
||||
}
|
||||
.telePD{
|
||||
background:#2196f3;
|
||||
border: 2px #2196f3;
|
||||
}
|
||||
@ -50,7 +50,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type: [null],
|
||||
pd_status: [null],
|
||||
pd_status: ['QC_COMPLETED'],
|
||||
pd_from_date: [null],
|
||||
pd_to_date: [null],
|
||||
pd_city: [null],
|
||||
|
||||
@ -8,52 +8,54 @@
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap">
|
||||
<div [formGroup]="searchForm">
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let type of PDType" [value]="type.pd_type_id">{{type.type_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}</mat-option>
|
||||
<!-- <mat-form-field style="width:40%">
|
||||
<mat-select formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name" [disabled]="'true'">{{status.pd_status_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput [matDatepicker]="picker" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value"formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
<mat-option *ngFor="let pro of PRODUCTS" [value]="pro.product_id">{{pro.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_city" placeholder="City">
|
||||
<mat-option *ngFor="let city of CITY" [value]="city.city_id">{{city.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select multiple formControlName="pd_lender" placeholder="Lender Name">
|
||||
<mat-option *ngFor="let ent of ENTITY" [value]="ent.entity_id">{{ent.full_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_name" placeholder="Applicant Name">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
@ -61,12 +63,10 @@
|
||||
<br/>
|
||||
<mat-table [dataSource]="dataSourceTab3" matSort *ngIf="scheduledPdListData.length > 0" >
|
||||
<ng-container matColumnDef="PDType">
|
||||
<mat-cell fxFlex="15" class="cell" style="text-align: center" *matCellDef="let details;">
|
||||
<!-- <button *ngIf="details.fk_pd_type != null" [matTooltip]="details.fk_pd_type == '1' ? 'Full PD' : details.fk_pd_type == '2' ? 'Smart PD' : details.fk_pd_type == '3' ? 'Tele PD' : '' " mat-button mat-icon-button class="mr-1 mb-1 hover-icon pd_circle" type="button"
|
||||
matTooltipPosition="above"><strong>{{(details.pd_type_name | slice:0:1)}}</strong></button> -->
|
||||
<div *ngIf="details.fk_pd_type != null" [ngClass]="(details.fk_pd_type=='1')?'fullPD':(details.fk_pd_type=='2')?'smartPD':'telePD'" class="mr-1 mb-1 hover-icon commonPDType"
|
||||
[matTooltip]="details.pd_type_name" matTooltipPosition="above"><strong style="font-size:3rem;">{{(details.pd_type_name | slice:0:1)}}</strong></div>
|
||||
</mat-cell>
|
||||
<mat-cell fxFlex.xs="20" fxFlex.sm="15" fxFlex.md="10" fxFlex.lg="10" fxFlex.xl="10" class="cell" *matCellDef="let details;" style="justify-content:flex-end">
|
||||
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold'}" mat-line>{{details.pd_id}}</div>
|
||||
<small mat-line>{{details.pd_type_name}}</small>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Name">
|
||||
<mat-cell class="cell" *matCellDef="let details;">
|
||||
|
||||
@ -13,30 +13,4 @@
|
||||
}
|
||||
.fontsize{
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
.commonPDType{
|
||||
display:flex;
|
||||
justify-content:flex-end;
|
||||
color: #ffffff;
|
||||
margin-top:4px;
|
||||
margin-bottom:4px;
|
||||
width: 95px;
|
||||
height: 95px;
|
||||
justify-content:center;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
line-height: 95px;
|
||||
}
|
||||
.fullPD{
|
||||
background:#009688;
|
||||
border: 2px #009688;
|
||||
}
|
||||
.smartPD{
|
||||
background:#673ab7;
|
||||
border: 2px #673ab7;
|
||||
}
|
||||
.telePD{
|
||||
background:#2196f3;
|
||||
border: 2px #2196f3;
|
||||
}
|
||||
@ -47,7 +47,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
this.searchForm = this._fb.group(
|
||||
{
|
||||
pd_type:[null],
|
||||
pd_status:[null],
|
||||
pd_status:['SCHEDULED'],
|
||||
pd_from_date:[null],
|
||||
pd_to_date:[null],
|
||||
pd_city:[null],
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID,master.pd_status)"><mat-icon>question_answer</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus==pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
<!-- {{master | json}} -->
|
||||
|
||||
</span>
|
||||
|
||||
@ -376,7 +376,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
getPDIDReport(pdID:any) {
|
||||
this.destroyType=3;
|
||||
this.router.navigate([ '../../pdRecord',pdID], { relativeTo: this.route });
|
||||
this.router.navigate([ '../../pd_report',pdID], { relativeTo: this.route });
|
||||
}
|
||||
|
||||
// // direct trigger the pd
|
||||
|
||||
@ -40,7 +40,7 @@ const routes: Routes = [
|
||||
component: StartPdComponent,
|
||||
},
|
||||
{
|
||||
path: 'pdRecord/:pdid',
|
||||
path: 'pd_report/:pdid',
|
||||
component: PdReportComponent,
|
||||
}
|
||||
]
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
<h2 mat-dialog-title>Edit PD Report Details</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!--<h3>Develop across all platforms</h3>-->
|
||||
<div style="margin: 12px;">
|
||||
<form role="form" *ngIf="showEditor" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
<div class="form-group has-feedback">
|
||||
<ckeditor formControlName="content" name="myckeditor" required [config]="ckeConfig" debounce="500" (change)="onChange($event)">
|
||||
</ckeditor>
|
||||
<!--<div *ngIf="myckeditor.invalid && myckeditor.touched" class="help-block">Required field.</div>-->
|
||||
</div>
|
||||
<button [disabled]="ngForm.invalid" class="btn btn-primary" (click)="myClick()">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
<!--<div [innerHTML]="mycontent | safeHtml"></div>-->
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
<!--<button mat-button [mat-dialog-close]="true" cdkFocusInitial>Install</button>-->
|
||||
</mat-dialog-actions>
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ModelEditPdReportComponent } from './model-edit-pd-report.component';
|
||||
|
||||
describe('ModelEditPdReportComponent', () => {
|
||||
let component: ModelEditPdReportComponent;
|
||||
let fixture: ComponentFixture<ModelEditPdReportComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ModelEditPdReportComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ModelEditPdReportComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,94 @@
|
||||
import { Component, OnInit, ViewChild , Input, Inject} from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { QcService } from './../../../qc-service/qc.service';
|
||||
import { NotifierService } from "angular-notifier";
|
||||
|
||||
|
||||
import {
|
||||
MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA
|
||||
} from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'app-model-edit-pd-report',
|
||||
templateUrl: './model-edit-pd-report.component.html',
|
||||
styleUrls: ['./model-edit-pd-report.component.scss']
|
||||
})
|
||||
export class ModelEditPdReportComponent implements OnInit {
|
||||
|
||||
@Input() questionId: number;
|
||||
ngForm: FormGroup;
|
||||
name = 'ng2-ckeditor';
|
||||
ckeConfig: any;
|
||||
recordData: any;
|
||||
log = '';
|
||||
showEditor= false;
|
||||
@ViewChild('myckeditor') ckeditor: any;
|
||||
/**
|
||||
* Notifier service
|
||||
*/
|
||||
private notifier: NotifierService;
|
||||
constructor( private _formBuilder: FormBuilder,
|
||||
private pdTrigerService: QcService,
|
||||
notifier: NotifierService ,
|
||||
private dialogRef: MatDialogRef<ModelEditPdReportComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
this.notifier = notifier;
|
||||
this.ngForm = this._formBuilder.group({
|
||||
report_template_id: [],
|
||||
fk_template_id: [],
|
||||
content: [null, Validators.compose([Validators.required])],
|
||||
isactive:[1]
|
||||
})
|
||||
// this.mycontent = `<p>My html content</p>`;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
// alert(JSON.stringify(this.data));
|
||||
// this.ngForm.controls['content'].setValue('<h1>Home<h1>');
|
||||
this.pdTrigerService.getActualPDReportModelTemplate(this.data).subscribe(data => {
|
||||
if(data['dataStatus']){
|
||||
this.recordData = data.records[0];
|
||||
this.ngForm = this._formBuilder.group({
|
||||
content: [this.recordData.pd_report_latest_version_blob, Validators.compose([Validators.required])],
|
||||
isactive:[this.recordData.isactive]
|
||||
});
|
||||
this.showEditor = true;
|
||||
}
|
||||
},err => {
|
||||
|
||||
});
|
||||
// this.ckeConfig = {
|
||||
// allowedContent: false,
|
||||
// extraPlugins: 'divarea',
|
||||
// forcePasteAsPlainText: true
|
||||
// };
|
||||
}
|
||||
|
||||
onChange($event: any): void {
|
||||
console.log('onChange');
|
||||
// this.log += new Date() + "<br />";
|
||||
}
|
||||
|
||||
myClick(): void {
|
||||
let template = this.ngForm.controls['content'].value;
|
||||
// alert(template);
|
||||
let data = {
|
||||
content: template,
|
||||
pd_id: this.data.startId
|
||||
}
|
||||
|
||||
// alert(JSON.stringify(data));
|
||||
// var formValues = this.ngForm.value;
|
||||
// Object.keys(formValues).forEach((key) => (formValues[key] == null) && delete formValues[key]);
|
||||
|
||||
this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.dialogRef.close();
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
<!-- this is for completed pd report -->
|
||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='COMPLETED'">
|
||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
||||
|
||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||
<button matTooltip="Menu" matTooltipPosition="above" (click)="mailnav.toggle()" color="primary" fxHide="false" fxshow.gt-sm mat-icon-button mat-raised-button>
|
||||
<mat-icon style="color: white;">short_text</mat-icon>
|
||||
</button>
|
||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||
<mat-card style="text-align:center;" *ngIf="qcStatus !== 'QC_COMPLETED'"> <button mat-raised-button color="red" *ngIf="reGenerateBtn" (click)="reGeneratePFReport()" style="padding: 0 58px !important;" >Re-generate Report</button></mat-card>
|
||||
<button type="button" mat-menu-item *ngFor="let pd of pdReportVersionList" [ngClass]="{'active': selectedItem == item}" (click)="changeVersion(pd)" style="font-size: 0.9em !important;height:6% !important;line-height: normal !important;">
|
||||
{{ pd.doc_name }}<span *ngIf="pd.is_latest == 1" [style.color]="'green'">( Current Version )</span><br>
|
||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdby}}</span><br>
|
||||
<span style="color:rgba(117, 115, 115, 0.87)!important;font-size:13px !important;">{{pd.createdon}}</span>
|
||||
<hr>
|
||||
|
||||
</button>
|
||||
</mat-sidenav>
|
||||
|
||||
|
||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<!--{{qcStatus}}-->
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<div *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
<div style="text-align: right" class="mb-1">
|
||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
||||
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
||||
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0 && qcStatus !== 'QC_COMPLETED'" type="button" (click)="changeDocumentEdit()">Restore</button>
|
||||
</div>
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer>
|
||||
<!-- latestPDDetails.doc_uri -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
</mat-sidenav-container>
|
||||
</mat-card-content>
|
||||
<mat-card-content *ngIf="generateBtn" style="max-height:400px;overflow: auto;">
|
||||
<div fxLayout="row wrap">
|
||||
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
|
||||
<div fxFlex="100">
|
||||
<h5 style="text-align:center;color: black;"> {{message}}</h5>
|
||||
<div style="text-align:center;">
|
||||
<button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()">Generate Report</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button color="blue" class="m-1 mb-1" type="button" (click)="reportReview('REMARKS')">Notes</button>
|
||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="reportReview('COMPLETE')">QC Complete</button>
|
||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<!-- this is for qc completed pd report -->
|
||||
<mat-card *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
|
||||
<mat-card-content *ngIf="reGenerateBtn" style="max-height:480px;overflow: auto;">
|
||||
|
||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<!--{{qcStatus}}-->
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<div *ngIf="latestPDDetails">
|
||||
<div style="margin: 12px;
|
||||
background: #ddd;
|
||||
padding: 8px;">
|
||||
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer>
|
||||
<!-- latestPDDetails.doc_uri -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button color="primary" class="m-1 mb-1" type="button" (click)="loadPdViewCompoent()">Close</button>
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
@ -0,0 +1,117 @@
|
||||
@import "./../../../../assets/styles/scss/components/messages";
|
||||
:host {
|
||||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
margin-top: -5px;
|
||||
display: block;
|
||||
}
|
||||
:host /deep/ {
|
||||
mat-sidenav {
|
||||
max-width: 300px;
|
||||
}
|
||||
.mat-sidenav-content {
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
@media (min-width: 959px) {
|
||||
.mat-sidenav-side {
|
||||
background-color: transparent;
|
||||
box-shadow: none!important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.mat-menu-item-active {
|
||||
color: red !important;
|
||||
}
|
||||
.mat-expansion-panel-header-description {
|
||||
color: rgba(0, 0, 0, 87);
|
||||
}
|
||||
.mat-card-content {
|
||||
background-color: white;
|
||||
}
|
||||
.mat-card-actions {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.text-ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.custm-list-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
|
||||
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
.p-list-main {
|
||||
background: white;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
overflow: hidden !important;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
box-shadow: $base-card-box-shadow;
|
||||
transform: scale(0.95);
|
||||
transition: box-shadow 0.5s, transform 0.5s;
|
||||
&:hover {
|
||||
transform: scale(1);
|
||||
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.p-list {
|
||||
position: relative;
|
||||
.top {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
// background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center;
|
||||
-webkit-background-size: 100%;
|
||||
-moz-background-size: 100%;
|
||||
-o-background-size: 100%;
|
||||
background-size: 100%;
|
||||
}
|
||||
.bottom {
|
||||
width: 200%;
|
||||
height: 15%;
|
||||
transition: transform 0.5s;
|
||||
h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.left {
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
background: #f4f4f4;
|
||||
position: relative;
|
||||
float: left;
|
||||
.details {
|
||||
padding: 5px;
|
||||
float: left;
|
||||
// width: calc(70% - 40px);
|
||||
}
|
||||
|
||||
}
|
||||
.right {
|
||||
width: 50%;
|
||||
background: #A6CDDE;
|
||||
color: white;
|
||||
float: right;
|
||||
height: 200%;
|
||||
overflow: hidden;
|
||||
.details {
|
||||
padding: 20px;
|
||||
float: right;
|
||||
width: calc(70% - 40px);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { QcPdReportComponent } from './qc-pd-report.component';
|
||||
|
||||
describe('QcPdReportComponent', () => {
|
||||
let component: QcPdReportComponent;
|
||||
let fixture: ComponentFixture<QcPdReportComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ QcPdReportComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(QcPdReportComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,320 @@
|
||||
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
||||
import { Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { QcListComponent } from './../qc-list.component';
|
||||
|
||||
import { saveAs as importedSaveAs } from "file-saver";
|
||||
|
||||
import { QcService } from './../../qc-service/qc.service';
|
||||
import {
|
||||
MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA
|
||||
} from "@angular/material";
|
||||
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
|
||||
import { QcReviewComponent } from './qc-review/qc-review.component';
|
||||
import { HttpResponse } from "@angular/common/http";
|
||||
|
||||
@Component({
|
||||
selector: 'app-qc-pd-report',
|
||||
templateUrl: './qc-pd-report.component.html',
|
||||
styleUrls: ['./qc-pd-report.component.scss']
|
||||
})
|
||||
export class QcPdReportComponent implements OnInit {
|
||||
|
||||
Url: SafeUrl;
|
||||
startPD: any;
|
||||
// public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
||||
// public src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b';
|
||||
public src;
|
||||
public document;
|
||||
public generateBtn: Boolean = false;
|
||||
public reGenerateBtn: Boolean = false;
|
||||
public pdReportVersionList = [];
|
||||
// public src;
|
||||
pdReportRecords: any;
|
||||
latestPDDetails: any;
|
||||
message: any;
|
||||
|
||||
private notifier: NotifierService;
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router, public pdTrigerService: QcService, private listPDComponent: QcListComponent,
|
||||
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
||||
this.startPD = this.route.snapshot.params['pdid'];
|
||||
this.notifier = notifier;
|
||||
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
||||
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
||||
// alert(JSON.stringify(this.src));
|
||||
// this.document = { name: 'Angular 2',
|
||||
// description: 'An amazing Angular 2 pdf',
|
||||
// url: { url: 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b', withCredentials: true } };
|
||||
// this.Url = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822");
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.listPDComponent.showListView(false);
|
||||
this.getPdReportDetails();
|
||||
this.getPdReportVersionList();
|
||||
// start
|
||||
|
||||
// end
|
||||
const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
|
||||
const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
|
||||
|
||||
if (window.matchMedia(`(min-width: 1560px)`).matches && !this.isMac()) {
|
||||
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
||||
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
||||
}
|
||||
|
||||
// this.loadTemplates(this.startPD);
|
||||
// this.next = 1;
|
||||
// this.previous = 2;
|
||||
}
|
||||
|
||||
|
||||
isMac(): boolean {
|
||||
let bool = false;
|
||||
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) {
|
||||
bool = true;
|
||||
}
|
||||
return bool;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
isOver(): boolean {
|
||||
return window.matchMedia(`(max-width: 1560px)`).matches;
|
||||
}
|
||||
|
||||
reGeneratePFReport() {
|
||||
let data = {
|
||||
"pd_id": this.startPD,
|
||||
"regenerate": "1"
|
||||
};
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.getPdReportVersionList();
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
})
|
||||
}
|
||||
generateNewPDReport() {
|
||||
let data = {
|
||||
"pd_id": this.startPD
|
||||
};
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.getPdReportVersionList();
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
})
|
||||
}
|
||||
|
||||
public qcStatus: string = '';
|
||||
getPdReportVersionList() {
|
||||
this.pdTrigerService.getPdDocVersionList(this.startPD).subscribe(data => {
|
||||
if (data.status == 200 && data.dataStatus) {
|
||||
this.pdReportVersionList = [...data.records.reports_urls].reverse();
|
||||
let datas = this.pdReportVersionList.filter((a) => { return a.is_latest == 1; })
|
||||
this.latestPDDetails = datas[0];
|
||||
this.qcStatus = data.records.pdstatus;
|
||||
// alert(JSON.stringify(this.latestPDDetails));
|
||||
this.reGenerateBtn = true;
|
||||
} else {
|
||||
// this.reGenerateBtn = true;
|
||||
this.generateBtn = true;
|
||||
this.message = data.msg;
|
||||
}
|
||||
}, err => {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
getPdReportDetails() {
|
||||
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
// this.pdReportRecords = data.records.question_answers;
|
||||
this.pdReportRecords = data.records;
|
||||
// this.pdReportRecords = data.records.qu;
|
||||
}
|
||||
}, err => {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// load pd view component
|
||||
loadPdViewCompoent() {
|
||||
this.router.navigate(['../../viewpd', this.startPD], { relativeTo: this.route });
|
||||
}
|
||||
|
||||
// add questions popup model call
|
||||
addNewQuestion() {
|
||||
const dialogRef = this.dialog.open(ModelEditPdReportComponent, {
|
||||
data: { startId: this.startPD, version_id: this.latestPDDetails.doc_name },
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
// this.getPdReportFinalTemplateDetails();
|
||||
// this.getQuestionsMasters();
|
||||
// this.getBranch();
|
||||
// this.isPopupOpened = false;
|
||||
});
|
||||
}
|
||||
|
||||
changeVersion(pd: any): void {
|
||||
this.latestPDDetails = pd;
|
||||
console.log(this.latestPDDetails);
|
||||
}
|
||||
|
||||
|
||||
|
||||
reportReview(status): void {
|
||||
const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||
data: { startId: this.startPD, data_status: status },
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
// this.getPdReportFinalTemplateDetails();
|
||||
// this.getQuestionsMasters();
|
||||
// this.getBranch();
|
||||
// this.isPopupOpened = false;
|
||||
});
|
||||
}
|
||||
|
||||
changeDocumentEdit(): void {
|
||||
|
||||
|
||||
const dialogRef = this.dialog.open(DialogChangeCurrentVenrsion, {
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if (dataresult) {
|
||||
let data = {
|
||||
"pd_id": this.startPD,
|
||||
"doc_name": this.latestPDDetails.doc_name
|
||||
};
|
||||
this.pdTrigerService.swapOlderPDReportToLatest(data).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.getPdReportVersionList();
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
})
|
||||
} else {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Swal('User Created');
|
||||
// swal({
|
||||
// title: 'Error!',
|
||||
// text: 'Do you want to continue',
|
||||
// type: 'error',
|
||||
// confirmButtonText: 'Cool'
|
||||
// });
|
||||
|
||||
// Swal({
|
||||
// title: 'Are you sure?',
|
||||
// type: 'warning',
|
||||
// showCancelButton: true,
|
||||
// confirmButtonColor: '#3085d6',
|
||||
// cancelButtonColor: '#d33',
|
||||
// confirmButtonText: SwalButtonText
|
||||
// }).then((result) => {
|
||||
// if (result.value) {
|
||||
// // this._mastersService.editMasterDetails(ActiveDatas,'CITY')
|
||||
// // .subscribe(dataresult=>{
|
||||
// // if (dataresult.dataStatus == true){
|
||||
// // Swal(this.SwalMessage,'success');
|
||||
// // this.getCity();
|
||||
// // }
|
||||
// // else{
|
||||
// // Swal("Sorry Try Again !");
|
||||
// // }
|
||||
// // });
|
||||
// }
|
||||
// else{
|
||||
// // this.getCity();
|
||||
// }s
|
||||
// })
|
||||
}
|
||||
|
||||
export() {
|
||||
this.pdTrigerService.pdReportExportExcel().subscribe((blob: HttpResponse<Blob>) => {
|
||||
if (blob) {
|
||||
console.log(blob);
|
||||
let datass = blob.headers.get('content-disposition');
|
||||
let fileName = datass.split(/"/)[1];
|
||||
// this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
const blobs = new Blob([blob.body],
|
||||
{ type: 'application/vnd.ms-excel' });
|
||||
const file = new File([blobs], fileName,
|
||||
{ type: 'application/vnd.ms-excel' });
|
||||
console.log(file);
|
||||
importedSaveAs(file);
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'dialog-overview-example-dialog',
|
||||
styles: [`
|
||||
.listHover: hover {
|
||||
background: yellow;
|
||||
}`
|
||||
],
|
||||
template: `
|
||||
<div style="width: 220px;">
|
||||
<h3 style="text-align: center">Document is marked as final</h3>
|
||||
<p style="text-align: center"> Because you've marked the document as final, you can edit this document.</p>
|
||||
<div style="text-align: center; margin: 12px;" class="mb-1">
|
||||
<button mat-raised-button color="primary" (click)="getConfirmation(false)">Cancel</button>
|
||||
<button mat-raised-button color="accent" (click)="getConfirmation(true)">ok</button>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class DialogChangeCurrentVenrsion implements OnInit {
|
||||
|
||||
public m_questions: any;
|
||||
|
||||
public m_question_forms: any;
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<DialogChangeCurrentVenrsion>,
|
||||
@Inject(MAT_DIALOG_DATA) public data) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
getConfirmation(confim: Boolean) {
|
||||
this.dialogRef.close(confim);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
<div *ngIf="showStatus == 'COMPLETE'">
|
||||
<h2 mat-dialog-title>QC Complete</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!--<h3>Develop across all platforms</h3>-->
|
||||
<div *ngIf="conformation === false" style="width: 220px;text-align: center; margin: 12px;">
|
||||
<p>
|
||||
Once QC is Completed further edit will not be possible on this document.
|
||||
</p>
|
||||
</div>
|
||||
<div *ngIf="conformation" style="margin: 12px; width: 340px;">
|
||||
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
<div>
|
||||
<app-rating [rating]="ngForm.get('qc_rating').value" (ratingClick)='ratingComponentClick($event)'></app-rating>
|
||||
</div>
|
||||
<div>
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="qc_feedback"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button class="btn btn-primary" *ngIf="conformation === false" (click)="conformation = true">Ok</button>
|
||||
<button mat-button class="btn btn-primary" *ngIf="conformation" (click)="myClick()">Save</button>
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
</mat-dialog-actions>
|
||||
</div>
|
||||
|
||||
<div *ngIf="showStatus == 'REMARKS'">
|
||||
<h2 mat-dialog-title>QC Notes</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<div style="margin: 12px; width: 340px;">
|
||||
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
<div>
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="qc_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button class="btn btn-primary" (click)="myClick()">Save</button>
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
</mat-dialog-actions>
|
||||
</div>
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { QcReviewComponent } from './qc-review.component';
|
||||
|
||||
describe('QcReviewComponent', () => {
|
||||
let component: QcReviewComponent;
|
||||
let fixture: ComponentFixture<QcReviewComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ QcReviewComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(QcReviewComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,109 @@
|
||||
import { Component, OnInit, ViewChild , Input, Inject} from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { QcService } from './../../../qc-service/qc.service';
|
||||
import { NotifierService } from "angular-notifier";
|
||||
|
||||
|
||||
import {
|
||||
MatDialog,
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA
|
||||
} from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'app-qc-review',
|
||||
templateUrl: './qc-review.component.html',
|
||||
styleUrls: ['./qc-review.component.scss']
|
||||
})
|
||||
export class QcReviewComponent implements OnInit {
|
||||
|
||||
conformation: Boolean = false;
|
||||
@Input() questionId: number;
|
||||
ngForm: FormGroup;
|
||||
recordData: any;
|
||||
showForm: Boolean;
|
||||
showStatus : any;
|
||||
/**
|
||||
* Notifier service
|
||||
*/
|
||||
private notifier: NotifierService;
|
||||
constructor( private _formBuilder: FormBuilder,
|
||||
private pdTrigerService: QcService,
|
||||
notifier: NotifierService ,
|
||||
private dialogRef: MatDialogRef<QcReviewComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
this.notifier = notifier;
|
||||
this.showStatus = this.data.data_status;
|
||||
// this.mycontent = `<p>My html content</p>`;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.getQcCompleteReviewStatus();
|
||||
}
|
||||
|
||||
getQcCompleteReviewStatus() {
|
||||
let type ; '';
|
||||
if( this.showStatus === 'REMARKS'){
|
||||
type = 'QC_REMARKS';
|
||||
this.pdTrigerService.getQCReportFinalReviewDetails(this.data.startId, type).subscribe(data => {
|
||||
if(data['dataStatus']){
|
||||
this.recordData = data.records[0];
|
||||
this.ngForm = this._formBuilder.group({
|
||||
qc_remarks: [this.recordData.qc_remarks],
|
||||
pd_status: [this.recordData.pd_status]
|
||||
})
|
||||
this.showForm = true;
|
||||
}
|
||||
},err => {
|
||||
|
||||
});
|
||||
} else if(this.showStatus === 'COMPLETE') {
|
||||
type = 'QC';
|
||||
this.pdTrigerService.getQCReportFinalReviewDetails(this.data.startId, type).subscribe(data => {
|
||||
if(data['dataStatus']){
|
||||
this.recordData = data.records[0];
|
||||
this.ngForm = this._formBuilder.group({
|
||||
qc_feedback: [this.recordData.qc_feedback],
|
||||
qc_rating: [Number(this.recordData.qc_rating)],
|
||||
pd_status: ["QC_COMPLETED"],
|
||||
})
|
||||
this.showForm = true;
|
||||
}
|
||||
},err => {
|
||||
|
||||
});
|
||||
} else {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onChange($event: any): void {
|
||||
console.log('onChange');
|
||||
// this.log += new Date() + "<br />";
|
||||
}
|
||||
|
||||
myClick(): void {
|
||||
let template = this.ngForm.value;
|
||||
template.pd_id = this.data.startId;
|
||||
console.log(JSON.stringify(template));
|
||||
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.dialogRef.close();
|
||||
}, err => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// =============================
|
||||
|
||||
ratingClicked: number;
|
||||
itemIdRatingClicked: string;
|
||||
rating : number = 1;
|
||||
|
||||
ratingComponentClick(e){
|
||||
this.ngForm.controls.qc_rating.setValue(e.rating);
|
||||
}
|
||||
}
|
||||
@ -1,389 +1,36 @@
|
||||
<mat-card style="min-height:540px;">
|
||||
<mat-card-content>
|
||||
<div style="text-align: right;" class="mb-1">
|
||||
<button mat-raised-button mat-icon-button class="hover-icon" type="button" matTooltip="Close" matTooltipPosition="above"
|
||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
||||
</div>
|
||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button>
|
||||
|
||||
<mat-expansion-panel *ngFor="let category of categoryList;let catIndex = index; ">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<span class="mt-0"> {{category.category_name}}</span>
|
||||
</mat-panel-title>
|
||||
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-list>
|
||||
<mat-list-item class="custm-list-item" *ngFor="let questions of category.questions; let quesIndex=index" [ngStyle]="{'color':quesIndex === selectedQuestionIndex && catIndex === selectedCategoryIndex ? 'red' : 'black' }" (click)="OnSelectDirectQuestions(questions, catIndex,quesIndex)">
|
||||
<small>{{ (questions.question.length>15)? (questions.question | slice:0:15)+'..':(questions.question) }}</small>
|
||||
</mat-list-item>
|
||||
|
||||
|
||||
</mat-list>
|
||||
</mat-expansion-panel>
|
||||
<mat-list *ngFor="let formButton of categoryFormButtons">
|
||||
<mat-list-item class="custm-list-item" (click)="OnSelectDirectForms(formButton)" style="background-color:#e0e0e0">
|
||||
<span class="mt-0">{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(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>
|
||||
<mat-icon style="color: white;">short_text</mat-icon>
|
||||
</button>
|
||||
<span class="mr-1 ml-1">Category</span>
|
||||
</mat-toolbar>
|
||||
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<figure>
|
||||
<mat-card-content>
|
||||
|
||||
<div fxLayout="row" >
|
||||
<!--<button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
|
||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>-->
|
||||
<div fxFlex="33" class="text-xs-left">
|
||||
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
||||
<small>{{pdMasterList.customer_segment_name}}</small>
|
||||
</div>
|
||||
<div fxFlex="66" class="text-xs-right">
|
||||
<h4 class="mt-0">{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}}</h4>
|
||||
<small>{{pdMasterList.lender_full_name}}/{{pdMasterList.lender_applicant_id}}</small>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<hr>
|
||||
<div *ngIf="!formsCategoryEnable">
|
||||
<mat-card-content style="min-height: 500px;" *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">
|
||||
|
||||
|
||||
<form [formGroup]="optionsForm" *ngIf="answerList.length>0 ; else noanswers;">
|
||||
<mat-card-content>
|
||||
<span class="mt-0">{{optionsForm.controls.pd_question.value}}</span>
|
||||
<div fxLayout="row" >
|
||||
<div fxFlex="60" class="text-xs-left">
|
||||
|
||||
<mat-list>
|
||||
|
||||
<mat-radio-group formControlName="modelValue">
|
||||
|
||||
<mat-list-item *ngFor="let option of optionsForm.controls.items.value">
|
||||
<mat-radio-button [value]="option.pd_answer_id">{{option.pd_answer}}</mat-radio-button>
|
||||
|
||||
</mat-list-item>
|
||||
|
||||
</mat-radio-group>
|
||||
|
||||
</mat-list>
|
||||
|
||||
</div>
|
||||
<div fxFlex="40" class="text-xs-right" *ngIf="optionsForm.controls.documents.length>0">
|
||||
|
||||
<mat-card >
|
||||
<mat-card-content style="display: flex;
|
||||
overflow: auto;min-height: 200px; max-height: 240px;">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="50" class="m-gap p-gap" *ngFor="let docs of optionsForm.controls.documents.value; let docIndex=index">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img [src]="docs.pd_document_url" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>{{docs.pd_document_title}}</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div fxLayout="row" >
|
||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="pd_answer_remark"></textarea>
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- this section for questions type options button actions -->
|
||||
<div fxFlex="40" class="pb-0 text-sm-right" style="margin-top: 7%;">
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="bold" matTooltip="Save&Previous" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" (click)="saveNextPrevious(optionsForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Save&Next" (click)="saveNextPrevious(optionsForm.controls,next)" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltipPosition="below"><mat-icon>skip_next</mat-icon></mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
</div>
|
||||
<!-- end questions type options -->
|
||||
</div>
|
||||
|
||||
</mat-card-actions>
|
||||
</form>
|
||||
|
||||
<ng-template #noanswers>
|
||||
<mat-card-content>
|
||||
<span class="mt-0">{{selectedCategory.question}}</span>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div fxLayout="row" >
|
||||
|
||||
<div fxFlex="100" class="pb-0 text-sm-right">
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-actions>
|
||||
</ng-template>
|
||||
|
||||
|
||||
</ng-container>
|
||||
<!-- end options type questions section -->
|
||||
<!-- start text box questions section -->
|
||||
<ng-container *ngSwitchCase="2">
|
||||
|
||||
<form [formGroup]="textBoxForm" *ngIf="answerList.length>0 ; else noanswers;">
|
||||
<mat-card-content>
|
||||
<span class="mt-0">{{textBoxForm.controls.pd_question.value}}</span>
|
||||
<div fxLayout="row">
|
||||
<div fxFlex="60" class="text-xs-left">
|
||||
|
||||
<mat-list [formArrayName]="'items'" style="padding-top:10%">
|
||||
<mat-list-item *ngFor="let control of textBoxForm.controls.items.controls; let i = index;" [formGroup]="control">
|
||||
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Answers</mat-label>
|
||||
<textarea matInput placeholder="Answers" formControlName="pd_answer"></textarea>
|
||||
|
||||
</mat-form-field>
|
||||
</mat-list-item>
|
||||
|
||||
</mat-list>
|
||||
</div>
|
||||
<div fxFlex="40" class="text-xs-right" *ngIf="textBoxForm.controls.documents.length>0">
|
||||
|
||||
<mat-card >
|
||||
<mat-card-content style="display: flex;
|
||||
overflow: auto;min-height: 200px; max-height: 240px;">
|
||||
<div fxLayout="row wrap">
|
||||
|
||||
<div fxFlex="50" class="m-gap p-gap" *ngFor="let docs of textBoxForm.controls.documents.value; let docIndex=index">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img [src]="docs.pd_document_url" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>{{docs.pd_document_title}}</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div fxLayout="row" >
|
||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="pd_answer_remark"></textarea>
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- this section for questions type options button actions -->
|
||||
<div fxFlex="40" class="pb-0 text-sm-right" style="margin-top: 7%;">
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Previous" matTooltipPosition="below" (click)="saveNextPreviousText(textBoxForm.controls,previous)"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltipPosition="below" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" matTooltipPosition="below" (click)="skipNextPrevious(next)"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Next" matTooltipPosition="below" (click)="saveNextPreviousText(textBoxForm.controls,next)"><mat-icon>skip_next</mat-icon></mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
</div>
|
||||
<!-- end questions type options -->
|
||||
</div>
|
||||
|
||||
</mat-card-actions>
|
||||
</form>
|
||||
<ng-template #noanswers>
|
||||
<mat-card-content>
|
||||
<span class="mt-0">{{selectedCategory.question}}</span>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div fxLayout="row" >
|
||||
|
||||
<div fxFlex="100" class="pb-0 text-sm-right">
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-actions>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
<!-- end text box questions section -->
|
||||
<!-- start check box questions section -->
|
||||
<ng-container *ngSwitchCase="3">
|
||||
|
||||
<form [formGroup]="checkBoxForm" *ngIf="answerList.length>0 ; else noanswers;">
|
||||
<mat-card-content>
|
||||
<span class="mt-0">{{checkBoxForm.controls.pd_question.value}}</span>
|
||||
<div fxLayout="row" >
|
||||
<div fxFlex="60" class="text-xs-left">
|
||||
|
||||
<mat-list [formArrayName]="'items'">
|
||||
<mat-list-item *ngFor="let control of checkBoxForm.controls.items.controls; let i = index;" [formGroup]="control">
|
||||
|
||||
<small><mat-checkbox class="example-margin" formControlName="checkbox" id="{{ control.controls.pd_answer_id.value }}"> {{ control.controls.pd_answer.value }}</mat-checkbox> </small>
|
||||
|
||||
</mat-list-item>
|
||||
|
||||
</mat-list>
|
||||
</div>
|
||||
<div fxFlex="40" class="text-xs-right" *ngIf="checkBoxForm.controls.documents.length>0">
|
||||
|
||||
<mat-card >
|
||||
<mat-card-content style="display: flex;
|
||||
overflow: auto;min-height: 200px; max-height: 240px;">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="50" class="m-gap p-gap" *ngFor="let docs of textBoxForm.controls.documents.value; let docIndex=index">
|
||||
<div class="p-list-main mb-2">
|
||||
<div class="p-list">
|
||||
|
||||
<div class="top"><img [src]="docs.pd_document_url" alt=""/></div>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<div class="details">
|
||||
<small>{{docs.pd_document_title}}</small>
|
||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions *ngIf="checkBoxForm.controls.items.length > 0">
|
||||
<div fxLayout="row" >
|
||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="pd_answer_remark"></textarea>
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- this section for questions type options button actions -->
|
||||
<div fxFlex="40" class="pb-0 text-sm-right" style="margin-top: 7%;">
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Previous" matTooltipPosition="below" (click)="saveNextPrevious(checkBoxForm.controls,previous)"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Next" (click)="saveNextPrevious(checkBoxForm.controls,next)" matTooltipPosition="below"><mat-icon>skip_next</mat-icon></mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
</div>
|
||||
<!-- end questions type options -->
|
||||
</div>
|
||||
|
||||
</mat-card-actions>
|
||||
</form>
|
||||
<ng-template #noanswers>
|
||||
<mat-card-content>
|
||||
<span class="mt-0">{{selectedCategory.question}}</span>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div fxLayout="row" >
|
||||
|
||||
<div fxFlex="100" class="pb-0 text-sm-right">
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-actions>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
</div>
|
||||
<!-- end check box questions section -->
|
||||
<!-- start forms based questions -->
|
||||
<div *ngIf="formsCategoryEnable">
|
||||
</div>
|
||||
<!-- end form based questions -->
|
||||
</figure>
|
||||
</div>
|
||||
</mat-sidenav-container>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
|
||||
|
||||
<mat-card class="parent_mat_card">
|
||||
<mat-card-header >
|
||||
<mat-card-title>
|
||||
<div fxFlex="33" align="left">
|
||||
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
||||
<small>{{pdMasterList.customer_segment_name}}</small>
|
||||
</div>
|
||||
<div fxFlex="66" align="end">
|
||||
<h4 class="mt-0">{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}}
|
||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
|
||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
||||
</h4>
|
||||
<small>{{pdMasterList.lender_full_name}}/{{pdMasterList.lender_applicant_id}}</small>
|
||||
</div>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content style="max-height:100% !important;">
|
||||
<div fxLayout="row wrap" class="child_mat_card">
|
||||
<mat-card fxFlex.xs="80" fxFlex.sm="45" fxFlex.md="32" fxFlex.lg="32" fxFlex.xl="33" *ngFor="let formButton of categoryFormButtons;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectDirectForms(formButton)">
|
||||
<mat-card-header>
|
||||
<span style="padding: 17px 14px 3px 15px !important;border-radius: 0px 0px 0px 15px!important;width: 50px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
|
||||
<div fxFlex="100" align="left" style="padding:15px !important;">
|
||||
{{ formButton.form_name }}
|
||||
</div>
|
||||
<!--<div fxFlex="20" align="end">
|
||||
<span style="padding: 2px 9px 3px 9px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
|
||||
</div> -->
|
||||
</mat-card-header>
|
||||
</mat-card>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button matTooltip="QC Complete" matTooltipPosition="above" [disabled]="actualQuestions==0 || actualQuestions!=answeredQuestions || currentPDStatus===false" mat-raised-button color="primary" (click)="pdStatusDialogue(pdStatusCheck.QC_COMPLETED);"><span>{{currentPDStatus === true ? 'QC COMPLETE':'COMPLETED' }}</span></button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
@ -1,136 +1,83 @@
|
||||
@import "./../../../../assets/styles/scss/components/messages";
|
||||
:host {
|
||||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
margin-top: -5px;
|
||||
display: block;
|
||||
}
|
||||
:host /deep/ {
|
||||
mat-sidenav {
|
||||
width: 250px;
|
||||
}
|
||||
.mat-sidenav-content {
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
@media (min-width: 959px) {
|
||||
.mat-sidenav-side {
|
||||
background-color: transparent;
|
||||
box-shadow: none!important;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// .child_mat_card mat-card {
|
||||
// margin: 2 0%;
|
||||
// }
|
||||
::ng-deep .mat-dialog-container{
|
||||
overflow: hidden !important;
|
||||
}
|
||||
::ng-deep .mat-card-header-text{
|
||||
margin:0px !important;
|
||||
}
|
||||
.mat-purple{
|
||||
background-color: gray !important;
|
||||
}
|
||||
.cdk-global-overlay-wrapper{
|
||||
justify-content: center !important;
|
||||
}
|
||||
mat-card.parent_mat_card > {
|
||||
mat-card-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
mat-card-content {
|
||||
min-height:auto;
|
||||
max-height:52vh;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
.mat-expansion-panel-header-description {
|
||||
color: rgba(0, 0, 0, 87);
|
||||
}
|
||||
.mat-card-content {
|
||||
background-color: white;
|
||||
}
|
||||
.mat-card-actions {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.text-ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.custm-list-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
|
||||
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
.p-list-main {
|
||||
background: white;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
overflow: hidden !important;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
box-shadow: $base-card-box-shadow;
|
||||
transform: scale(0.95);
|
||||
transition: box-shadow 0.5s, transform 0.5s;
|
||||
&:hover {
|
||||
transform: scale(1);
|
||||
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.p-list {
|
||||
position: relative;
|
||||
.top {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
// background: url(https://s-media-cache-ak0.pinimg.com/736x/49/80/6f/49806f3f1c7483093855ebca1b8ae2c4.jpg) no-repeat center center;
|
||||
-webkit-background-size: 100%;
|
||||
-moz-background-size: 100%;
|
||||
-o-background-size: 100%;
|
||||
background-size: 100%;
|
||||
}
|
||||
.bottom {
|
||||
width: 200%;
|
||||
height: 15%;
|
||||
transition: transform 0.5s;
|
||||
h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.left {
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
background: #f4f4f4;
|
||||
position: relative;
|
||||
float: left;
|
||||
.details {
|
||||
padding: 5px;
|
||||
float: left;
|
||||
// width: calc(70% - 40px);
|
||||
}
|
||||
|
||||
}
|
||||
.right {
|
||||
width: 50%;
|
||||
background: #A6CDDE;
|
||||
color: white;
|
||||
float: right;
|
||||
height: 200%;
|
||||
overflow: hidden;
|
||||
.details {
|
||||
padding: 20px;
|
||||
float: right;
|
||||
width: calc(70% - 40px);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
mat-icon{
|
||||
color: #ff3636;
|
||||
}
|
||||
.address {
|
||||
display: flex;
|
||||
padding: 0 2%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.address > * {
|
||||
width: 100%;
|
||||
}
|
||||
.matcard mat-form-field {
|
||||
margin: 0 2%;
|
||||
}
|
||||
.address .button {
|
||||
float: right;
|
||||
width: 10px;
|
||||
background: #62B013;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.user-thumb {
|
||||
position: absolute;
|
||||
bottom: -35%;
|
||||
// img {
|
||||
// border: 5px solid $white;
|
||||
// border-radius: 100%;
|
||||
// height: 75px;
|
||||
// width: 75px;
|
||||
// }
|
||||
}
|
||||
// @media only screen and (max-width:319px) {
|
||||
// mat-card-content {
|
||||
// max-height: 350px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
// @media only screen and (min-width:320px) and (max-width:767px) {
|
||||
// mat-card-content {
|
||||
// max-height: 350px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
// @media only screen and (min-width:768px) and (max-width:1023px) {
|
||||
// mat-card-content {
|
||||
// max-height: 350px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
// @media only screen and (min-width:1024px) and (max-width:1899px) {
|
||||
// mat-card-content {
|
||||
// max-height: 400px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
// @media only screen and (min-width:1900px) {
|
||||
// mat-card-content {
|
||||
// max-height: 500px;
|
||||
// overflow: auto;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
|
||||
mat-card .child_mat_card > mat-card {
|
||||
border-radius: 0px 0px 0px 15px;
|
||||
box-shadow: $base-card-box-shadow;
|
||||
transform: scale(0.95);
|
||||
transition: box-shadow 0.5s, transform 0.5s;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
// background-color: #e00201 !important;
|
||||
transform: scale(1);
|
||||
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,9 +1,34 @@
|
||||
import { Component, ViewChild ,OnInit,ViewEncapsulation, OnDestroy } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy} from '@angular/core';
|
||||
import {FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl} from '@angular/forms';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {MatDialog } from '@angular/material';
|
||||
import {NotifierService} from 'angular-notifier';
|
||||
import { QcListComponent } from './../qc-list.component';
|
||||
import { QcService } from './../../qc-service/qc.service';
|
||||
import {QcService} from './../../qc-service/qc.service';
|
||||
|
||||
// import {PersonalInfoComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component';
|
||||
// import {AddressComponent } from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component';
|
||||
// import {OtherIncomeComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component';
|
||||
// import {SupplierInfoComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component';
|
||||
// import {ClientInfoComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component';
|
||||
// import {FamilyDetailsComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component';
|
||||
// import {EmploymentInfoComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component';
|
||||
// import {StockComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component';
|
||||
// import {CurrentLoanComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component';
|
||||
// import {FinancialInfoComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component';
|
||||
// import {AssetsInfoComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component';
|
||||
// import {AssessedIncomeComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component';
|
||||
// import {BankingDetailsComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component';
|
||||
// import {BusinessInfoComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component';
|
||||
// import {LenderRepresentativeComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component';
|
||||
// import {LoanDetailsComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component';
|
||||
// import {GeneralInfoComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component';
|
||||
// import {NeighbourHoodComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component';
|
||||
// import {FinalRemarksComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component';
|
||||
// import { BusinessInfoGroupComponent } from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component';
|
||||
// import { BusinessAssetsInfoComponent } from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component';
|
||||
// import { PdStatusChangeDialogueComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component';
|
||||
// import {RentalVerificationComponent} from './../../../personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/rental-verification.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-qc-start',
|
||||
@ -12,440 +37,415 @@ import { QcService } from './../../qc-service/qc.service';
|
||||
|
||||
})
|
||||
export class QcStartComponent implements OnInit, OnDestroy {
|
||||
private notifier: NotifierService;
|
||||
public startPD:string;
|
||||
public mainApplicantName:string;
|
||||
public startPD: string;
|
||||
public mainApplicantName: string;
|
||||
//public remarks: string;
|
||||
errorMessage:any;
|
||||
selectedCategory:any=[];
|
||||
categoryList: any=[];
|
||||
pdMasterList: any=[];
|
||||
optionsForm: FormGroup;
|
||||
checkBoxForm:FormGroup;
|
||||
textBoxForm:FormGroup;
|
||||
next:number;
|
||||
previous:number;
|
||||
selectedCategoryIndex:number;
|
||||
selectedQuestionIndex:number;
|
||||
getQuestionsLength:number;
|
||||
answerList:any=[];
|
||||
ansPDList:any=[];
|
||||
errorMessage: any;
|
||||
selectedCategory: any = [];
|
||||
categoryList: any = [];
|
||||
pdMasterList: any = [];
|
||||
pdFullDetails:any=[];
|
||||
|
||||
// forms details
|
||||
pdFullDetails:any=[];
|
||||
categoryFormButtons: any;
|
||||
formsCategoryEnable: boolean = false;
|
||||
selectedFormsCategory: any;
|
||||
// category static form buttons
|
||||
categoryFormButtons: any;
|
||||
formsCategoryEnable: boolean = false;
|
||||
selectedFormsCategory: any;
|
||||
// create values for status check
|
||||
pdStatusCheck :any={
|
||||
"DRAFT" :'DRAFT',
|
||||
"TRIGGERED" :'TRIGGERED',
|
||||
"ALLOCATED" :'ALLOCATED',
|
||||
"SCHEDULED" :'SCHEDULED',
|
||||
"INPROGRESS" :'INPROGRESS',
|
||||
"COMPLETED" :'COMPLETED',
|
||||
"QC_COMPLETED" :'QC_COMPLETED',
|
||||
};
|
||||
currentPDStatus: string;
|
||||
actualQuestions:number;
|
||||
answeredQuestions :number;
|
||||
pdStatusCheck: any = {
|
||||
"DRAFT": 'DRAFT',
|
||||
"TRIGGERED": 'TRIGGERED',
|
||||
"ALLOCATED": 'ALLOCATED',
|
||||
"SCHEDULED": 'SCHEDULED',
|
||||
"INPROGRESS": 'INPROGRESS',
|
||||
"COMPLETED": 'COMPLETED',
|
||||
"QC_COMPLETED": 'QC_COMPLETED',
|
||||
};
|
||||
currentPDStatus: boolean;
|
||||
actualQuestions: number;
|
||||
answeredQuestions: number;
|
||||
private notifier: NotifierService;
|
||||
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder,private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private QcListComponent : QcListComponent, private _qc: QcService,) {
|
||||
constructor(notifier: NotifierService, private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private listPDComponent: QcListComponent, private _pd: QcService,) {
|
||||
this.startPD = this.route.snapshot.params['pdid'];
|
||||
this.notifier = notifier;
|
||||
|
||||
this.currentPDStatus = false;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.QcListComponent.showListView(false);
|
||||
const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
|
||||
const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
|
||||
// start
|
||||
|
||||
if (window.matchMedia(`(min-width: 960px)`).matches && !this.isMac()) {
|
||||
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
||||
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
||||
}
|
||||
// end
|
||||
this.listPDComponent.showListView(false);
|
||||
const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
|
||||
const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
|
||||
|
||||
this.loadTemplates(this.startPD);
|
||||
this.next=1;
|
||||
this.previous=2;
|
||||
if (window.matchMedia(`(min-width: 960px)`).matches && !this.isMac()) {
|
||||
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
||||
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
||||
}
|
||||
this.loadTemplates(this.startPD,1);
|
||||
}
|
||||
isMac(): boolean {
|
||||
let bool = false;
|
||||
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) {
|
||||
bool = true;
|
||||
}
|
||||
return bool;
|
||||
}
|
||||
// load pd template details
|
||||
loadTemplates(startID:string){
|
||||
this._qc.loadPDTemplates(startID).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.pdMasterList=data.records.pdmaster_details;
|
||||
this.categoryList=data.records.question_answers;
|
||||
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
this.mainApplicantName = filterApplicantName[0].applicant_name;
|
||||
this.currentPDStatus = data.records.pdmaster_details.pd_status;
|
||||
this.actualQuestions = data.records.counts.overall_question_count;
|
||||
this.answeredQuestions = data.records.counts.overall_answered_count;
|
||||
this.categoryFormButtons = data.records.template_forms;
|
||||
this.pdFullDetails = data.records
|
||||
}
|
||||
else{
|
||||
this.pdMasterList="";
|
||||
this.mainApplicantName="";
|
||||
this.categoryList=[];
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.QcListComponent.showListView(true);
|
||||
}
|
||||
|
||||
|
||||
isMac(): boolean {
|
||||
let bool = false;
|
||||
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) {
|
||||
bool = true;
|
||||
}
|
||||
return bool;
|
||||
}
|
||||
|
||||
isOver(): boolean {
|
||||
return window.matchMedia(`(max-width: 960px)`).matches;
|
||||
return window.matchMedia(`(max-width: 960px)`).matches;
|
||||
}
|
||||
|
||||
OnSelectDirectQuestions(selectedQuestions: any, categoryIndex:number,questionsIndex:number){
|
||||
this.formsCategoryEnable = false;
|
||||
this.selectedCategory=selectedQuestions;
|
||||
this.selectedCategoryIndex=categoryIndex;
|
||||
this.selectedQuestionIndex=questionsIndex;
|
||||
|
||||
let serachQuestions = {
|
||||
"question_id":selectedQuestions.fk_question_id,
|
||||
"pd_id":this.startPD,
|
||||
"template_id":selectedQuestions.fk_template_id,
|
||||
"category_id":selectedQuestions.fk_template_question_category_id
|
||||
}
|
||||
this.getAnswers(serachQuestions);
|
||||
|
||||
}
|
||||
|
||||
// load question based answer list
|
||||
getAnswers(serachList:any){
|
||||
this.answerList=[];
|
||||
|
||||
this._qc.getAnswersForPD(serachList).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.answerList=data.records.answers;
|
||||
this.ansPDList=data.records;
|
||||
this.actualQuestions = data.records.counts.overall_question_count;
|
||||
this.answeredQuestions = data.records.counts.overall_answered_count;
|
||||
|
||||
// this for options type questions
|
||||
if(this.selectedCategory.fk_question_answertype==1){
|
||||
this.loadOtionsForm(this.selectedCategory, this.answerList);
|
||||
// load templates details
|
||||
loadTemplates(startID:string,type:number){
|
||||
this._pd.loadPDTemplates(startID).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.pdMasterList=data.records.pdmaster_details;
|
||||
// this.categoryList=data.records.question_answers;
|
||||
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
this.mainApplicantName = filterApplicantName[0].applicant_name;
|
||||
this.currentPDStatus = data.records.pdmaster_details.pd_status=='INPROGRESS' ? false : data.records.pdmaster_details.pd_status=='false' ? true :data.records.pdmaster_details.pd_status=='ALLOCATED' ? false : data.records.pdmaster_details.pd_status=='COMPLETED' ? true : false;
|
||||
this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]).filter(item=>item.isAnswerable===true);
|
||||
// this.categoryFormButtons = this.categoryFormButtons.filter(item=>item.isAnswerable===true);
|
||||
this.actualQuestions = this.categoryFormButtons.length;
|
||||
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true);
|
||||
this.answeredQuestions = getAnsweredFormsCount.length;
|
||||
this.pdFullDetails = data.records;
|
||||
if(type==1 && data.records.pdmaster_details.pd_status=='SCHEDULED') {
|
||||
this.pdStatusDialogue(this.pdStatusCheck.INPROGRESS)
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.pdMasterList = "";
|
||||
this.mainApplicantName = "";
|
||||
this.categoryList = [];
|
||||
this.currentPDStatus = false;
|
||||
}
|
||||
// this.getAnswers(serachQuestions);
|
||||
|
||||
});
|
||||
}
|
||||
//this for text box type questions
|
||||
else if(this.selectedCategory.fk_question_answertype==2){
|
||||
|
||||
this.loadTextBoxForm(this.selectedCategory,this.answerList);
|
||||
|
||||
// load pd status change dialogue
|
||||
pdStatusDialogue(status: string): void {
|
||||
// const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||
// data: { pdid: this.startPD, pd_status: status },
|
||||
// disableClose: true,
|
||||
// minWidth:'30%',
|
||||
// maxWidth:'40%',
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// if(dataresult.update_status==true){
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
//this for check box type questions
|
||||
else if(this.selectedCategory.fk_question_answertype==3){
|
||||
|
||||
this.loadCheckBoxForm(this.selectedCategory,this.answerList);
|
||||
}
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// load check box form
|
||||
|
||||
loadCheckBoxForm(selectedCategory: any, ansItem: any){
|
||||
// create checkbox group
|
||||
let checkboxGroup = new FormArray(ansItem.map(item => new FormGroup({
|
||||
fk_pd_id:new FormControl(this.startPD),
|
||||
pd_detail_answer_id: new FormControl(item.pd_detail_answer_id),
|
||||
pd_answer_id: new FormControl(item.question_answer_id),
|
||||
pd_answer: new FormControl(item.answer),
|
||||
pd_answer_weightage:new FormControl(item.template_answer_weightage),
|
||||
checkbox: new FormControl(item.isactive==null ? false: true)
|
||||
})));
|
||||
// create documents group
|
||||
let documentsGroup = new FormArray(this.ansPDList.images.map(item => new FormGroup({
|
||||
pd_document_title:new FormControl(item.pd_document_title),
|
||||
pd_document_url: new FormControl(item.pd_document_name),
|
||||
|
||||
})));
|
||||
|
||||
// create a hidden reuired formControl to keep status of checkbox group
|
||||
let hiddenControl = new FormControl(this.mapItems(checkboxGroup.value), Validators.required);
|
||||
// update checkbox group's value to hidden formcontrol
|
||||
checkboxGroup.valueChanges.subscribe((v) => {
|
||||
hiddenControl.setValue(this.mapItems(v));
|
||||
});
|
||||
|
||||
|
||||
this.checkBoxForm = new FormGroup({
|
||||
pd_detail_id: new FormControl(this.ansPDList.pd_detail_id),
|
||||
fk_pd_id: new FormControl(this.startPD),
|
||||
fk_category_id: new FormControl(this.selectedCategory.fk_template_question_category_id),
|
||||
fk_question_id: new FormControl(this.selectedCategory.fk_question_id),
|
||||
pd_question: new FormControl(this.selectedCategory.question),
|
||||
pd_question_weightage: new FormControl(this.selectedCategory.question_weightage),
|
||||
pd_answer_remark:new FormControl(this.ansPDList.question_remark),
|
||||
items: checkboxGroup,
|
||||
selectedItems: hiddenControl,
|
||||
documents: documentsGroup
|
||||
});
|
||||
}
|
||||
|
||||
// map options form group values
|
||||
mapItems(items) {
|
||||
let selectedItems = items.filter((item) => item.checkbox).map((item) => item);
|
||||
return selectedItems.length ? selectedItems : null;
|
||||
}
|
||||
|
||||
// load Options form
|
||||
loadOtionsForm(selectedCategory: any, ansItem: any){
|
||||
// create options type group
|
||||
let optionsGroup = new FormArray(ansItem.map(item => new FormGroup({
|
||||
fk_pd_id:new FormControl(this.startPD),
|
||||
pd_detail_answer_id: new FormControl(item.pd_detail_answer_id),
|
||||
pd_answer_id: new FormControl(item.question_answer_id),
|
||||
pd_answer: new FormControl(item.answer),
|
||||
pd_answer_weightage:new FormControl(item.template_answer_weightage),
|
||||
options: new FormControl(item.isactive==null ? false: true)
|
||||
})));
|
||||
|
||||
// create documents group
|
||||
let documentsGroup = new FormArray(this.ansPDList.images.map(item => new FormGroup({
|
||||
pd_document_title:new FormControl(item.pd_document_title),
|
||||
pd_document_url: new FormControl(item.pd_document_name),
|
||||
|
||||
})));
|
||||
|
||||
// create a hidden reuired formControl to keep status of checkbox group
|
||||
let hiddenControl = new FormControl(this.optionsMapItems(optionsGroup.value), Validators.required);
|
||||
let checkedItem = hiddenControl.value!=null ? new FormControl(hiddenControl.value[0].pd_answer_id) :new FormControl(null);
|
||||
|
||||
this.optionsForm = new FormGroup({
|
||||
pd_detail_id: new FormControl(this.ansPDList.pd_detail_id),
|
||||
fk_pd_id: new FormControl(this.startPD),
|
||||
fk_category_id: new FormControl(this.selectedCategory.fk_template_question_category_id),
|
||||
fk_question_id: new FormControl(this.selectedCategory.fk_question_id),
|
||||
pd_question: new FormControl(this.selectedCategory.question),
|
||||
pd_question_weightage: new FormControl(this.selectedCategory.question_weightage),
|
||||
pd_answer_remark:new FormControl(this.ansPDList.question_remark),
|
||||
items: optionsGroup,
|
||||
selectedItems: hiddenControl,
|
||||
modelValue : checkedItem,
|
||||
documents: documentsGroup
|
||||
|
||||
});
|
||||
this.optionsForm.controls.modelValue.valueChanges.subscribe((v) => {
|
||||
hiddenControl.setValue(this.updateOptionsMapItems(v,optionsGroup.value));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// map option type group values
|
||||
optionsMapItems(items) {
|
||||
|
||||
let optionSelectedItems = items.filter((item) => item.options==true).map((item) => item);
|
||||
return optionSelectedItems.length ? optionSelectedItems : null;
|
||||
}
|
||||
// map options type while change options
|
||||
updateOptionsMapItems(key,items) {
|
||||
|
||||
let updateSelectedItems = items.filter((item) => item.pd_answer_id==key).map((item) => item);
|
||||
return updateSelectedItems.length ? updateSelectedItems : null;
|
||||
}
|
||||
|
||||
// load text box form
|
||||
loadTextBoxForm(selectedCategory: any, ansItem: any){
|
||||
// create text box type group
|
||||
let textGroup = new FormArray(ansItem.map(item => new FormGroup({
|
||||
fk_pd_id:new FormControl(this.startPD),
|
||||
pd_detail_answer_id: new FormControl(item.pd_detail_answer_id),
|
||||
pd_answer_id: new FormControl(item.question_answer_id),
|
||||
pd_answer: new FormControl(item.pd_answer),
|
||||
pd_answer_weightage:new FormControl(item.template_answer_weightage),
|
||||
text: new FormControl(item.pd_detail_answer_id==null ? false: true)
|
||||
})));
|
||||
|
||||
// create documents group
|
||||
let documentsGroup = new FormArray(this.ansPDList.images.map(item => new FormGroup({
|
||||
pd_document_title:new FormControl(item.pd_document_title),
|
||||
pd_document_url: new FormControl(item.pd_document_name),
|
||||
|
||||
})));
|
||||
|
||||
this.textBoxForm = new FormGroup({
|
||||
pd_detail_id: new FormControl(this.ansPDList.pd_detail_id),
|
||||
fk_pd_id: new FormControl(this.startPD),
|
||||
fk_category_id: new FormControl(this.selectedCategory.fk_template_question_category_id),
|
||||
fk_question_id: new FormControl(this.selectedCategory.fk_question_id),
|
||||
pd_question: new FormControl(this.selectedCategory.question),
|
||||
pd_question_weightage: new FormControl(this.selectedCategory.question_weightage),
|
||||
pd_answer_remark:new FormControl(this.ansPDList.question_remark),
|
||||
items: textGroup,
|
||||
documents: documentsGroup
|
||||
});
|
||||
}
|
||||
|
||||
// next save and previous save for options and check box type questions
|
||||
saveNextPrevious(details:any, type:number){
|
||||
|
||||
let fetchAns =[];
|
||||
details.selectedItems.value.forEach((itemElement, itemIndex) => {
|
||||
let obj1 = {
|
||||
fk_pd_detail_id:details.pd_detail_id.value,
|
||||
fk_pd_id:itemElement.fk_pd_id,
|
||||
pd_detail_answer_id: itemElement.pd_detail_answer_id,
|
||||
pd_answer_id: itemElement.pd_answer_id,
|
||||
pd_answer: itemElement.pd_answer,
|
||||
pd_answer_weightage:itemElement.pd_answer_weightage,
|
||||
}
|
||||
fetchAns.push(obj1)
|
||||
});
|
||||
|
||||
let pd_details:any=[{
|
||||
"pd_detail_id":details.pd_detail_id.value,
|
||||
"fk_pd_id":details.fk_pd_id.value,
|
||||
"fk_category_id":details.fk_category_id.value,
|
||||
"fk_question_id":details.fk_question_id.value,
|
||||
"pd_question":details.pd_question.value,
|
||||
"pd_question_weightage":details.pd_question_weightage.value,
|
||||
"question_remark":details.pd_answer_remark.value,
|
||||
"answers":fetchAns,
|
||||
"images":[]
|
||||
}];
|
||||
this._qc.savePDQuestions(pd_details).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
if(type==1){
|
||||
this.skipNextPrevious(this.next);
|
||||
}
|
||||
else{
|
||||
this.skipNextPrevious(this.previous);
|
||||
}
|
||||
}
|
||||
}, error => {
|
||||
});
|
||||
}
|
||||
// next save and previous save for text type questions
|
||||
saveNextPreviousText(details:any, type:number){
|
||||
let fetchAns =[];
|
||||
details.items.value.forEach((itemElement, itemIndex) => {
|
||||
let obj1 = {
|
||||
fk_pd_detail_id:details.pd_detail_id.value,
|
||||
fk_pd_id:itemElement.fk_pd_id,
|
||||
pd_detail_answer_id: itemElement.pd_detail_answer_id,
|
||||
pd_answer_id: itemElement.pd_answer_id,
|
||||
pd_answer: itemElement.pd_answer,
|
||||
pd_answer_weightage:itemElement.pd_answer_weightage,
|
||||
}
|
||||
fetchAns.push(obj1)
|
||||
});
|
||||
let pd_details:any=[{
|
||||
"pd_detail_id":details.pd_detail_id.value,
|
||||
"fk_pd_id":details.fk_pd_id.value,
|
||||
"fk_category_id":details.fk_category_id.value,
|
||||
"fk_question_id":details.fk_question_id.value,
|
||||
"pd_question":details.pd_question.value,
|
||||
"pd_question_weightage":details.pd_question_weightage.value,
|
||||
"question_remark":details.pd_answer_remark.value,
|
||||
"answers":fetchAns,
|
||||
"images":[]
|
||||
}];
|
||||
this._qc.savePDQuestions(pd_details).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
if(type==1){
|
||||
this.skipNextPrevious(this.next);
|
||||
}
|
||||
else{
|
||||
this.skipNextPrevious(this.previous);
|
||||
}
|
||||
}
|
||||
}, error => {
|
||||
});
|
||||
}
|
||||
|
||||
// skip to previous and next questions
|
||||
|
||||
skipNextPrevious(type:number){
|
||||
// for skip to next
|
||||
if(type==1){
|
||||
if(this.categoryList.length > this.selectedCategoryIndex ){
|
||||
let nextCatList = this.categoryList[this.selectedCategoryIndex];
|
||||
this.selectedQuestionIndex=this.selectedQuestionIndex < nextCatList.questions.length-1 ? this.selectedQuestionIndex+1 : this.selectedQuestionIndex;
|
||||
let nextQuesList = nextCatList.questions[this.selectedQuestionIndex];
|
||||
this.selectedCategory=nextQuesList;
|
||||
this.selectedCategoryIndex=this.selectedCategoryIndex;
|
||||
this.selectedQuestionIndex=this.selectedQuestionIndex;
|
||||
let serachQuestions = {
|
||||
"question_id":nextQuesList.fk_question_id,
|
||||
"pd_id":this.startPD,
|
||||
"template_id":nextQuesList.fk_template_id,
|
||||
"category_id":nextQuesList.fk_template_question_category_id
|
||||
}
|
||||
this.getAnswers(serachQuestions);
|
||||
}
|
||||
}
|
||||
// for skip to previous
|
||||
else if(type==2){
|
||||
if(this.categoryList.length > this.selectedCategoryIndex ){
|
||||
let preCatList = this.categoryList[this.selectedCategoryIndex];
|
||||
this.selectedQuestionIndex=this.selectedQuestionIndex ==0 ? this.selectedQuestionIndex : this.selectedQuestionIndex-1;
|
||||
let preQuesList = preCatList.questions[this.selectedQuestionIndex];
|
||||
this.selectedCategory=preQuesList;
|
||||
this.selectedCategoryIndex=this.selectedCategoryIndex;
|
||||
this.selectedQuestionIndex=this.selectedQuestionIndex;
|
||||
let serachQuestions = {
|
||||
"question_id":preQuesList.fk_question_id,
|
||||
"pd_id":this.startPD,
|
||||
"template_id":preQuesList.fk_template_id,
|
||||
"category_id":preQuesList.fk_template_question_category_id
|
||||
}
|
||||
this.getAnswers(serachQuestions);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//change pd status
|
||||
changePDStatus(status:string){
|
||||
|
||||
let update_array = {
|
||||
"pd_id": this.startPD
|
||||
}
|
||||
this._qc.editPdMasterDetails(update_array, status).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
this.notifier.notify('success', 'QC Completed.');
|
||||
this.currentPDStatus = "QC_COMPLETED";
|
||||
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
});
|
||||
}
|
||||
|
||||
// direct form based questions
|
||||
// start
|
||||
// direct form based questions
|
||||
OnSelectDirectForms(details: any) {
|
||||
this.formsCategoryEnable = true;
|
||||
this.selectedFormsCategory = details;
|
||||
|
||||
}
|
||||
// this.selectedFormsCategory = details;
|
||||
|
||||
// if(this.selectedFormsCategory.form_id==1){
|
||||
// const dialogRef = this.dialog.open(SupplierInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==2){
|
||||
// const dialogRef = this.dialog.open(ClientInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==3){
|
||||
// const dialogRef = this.dialog.open(PersonalInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==4){
|
||||
// const dialogRef = this.dialog.open(AssetsInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==5){
|
||||
// const dialogRef = this.dialog.open(AddressComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==6){
|
||||
// const dialogRef = this.dialog.open(FamilyDetailsComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==7){
|
||||
// const dialogRef = this.dialog.open(BankingDetailsComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// if(this.selectedFormsCategory.form_id==8){
|
||||
// const dialogRef = this.dialog.open(CurrentLoanComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// if(this.selectedFormsCategory.form_id==9){
|
||||
// const dialogRef = this.dialog.open(OtherIncomeComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==10){
|
||||
// const dialogRef = this.dialog.open(LoanDetailsComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==11){
|
||||
// const dialogRef = this.dialog.open(StockComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==12){
|
||||
// const dialogRef = this.dialog.open(EmploymentInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// // this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==13){
|
||||
// const dialogRef = this.dialog.open(BusinessInfoGroupComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==14){
|
||||
// const dialogRef = this.dialog.open(FinancialInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==15){
|
||||
// const dialogRef = this.dialog.open(LenderRepresentativeComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// if(this.selectedFormsCategory.form_id==17){
|
||||
// const dialogRef = this.dialog.open(RentalVerificationComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }
|
||||
// else if(this.selectedFormsCategory.form_id==18){
|
||||
// const generaldialogRef = this.dialog.open(GeneralInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// generaldialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }
|
||||
// else if(this.selectedFormsCategory.form_id==19){
|
||||
// const generaldialogRef = this.dialog.open(NeighbourHoodComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// generaldialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else if(this.selectedFormsCategory.form_id==20){
|
||||
// const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// generaldialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }else
|
||||
// if(this.selectedFormsCategory.form_id==22){
|
||||
// const dialogRef = this.dialog.open(BusinessAssetsInfoComponent, {
|
||||
// data: this.pdFullDetails,
|
||||
// maxWidth: '100vw',
|
||||
// maxHeight: '100vh',
|
||||
// height: '100%',
|
||||
// width: '100%',
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// this.loadTemplates(this.startPD,2);
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.listPDComponent.showListView(true);
|
||||
}
|
||||
// load pd view component
|
||||
loadPdViewCompoent(){
|
||||
this.router.navigate([ '../../viewpd',this.startPD], { relativeTo: this.route });
|
||||
|
||||
loadPdViewCompoent() {
|
||||
this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,160 +1,299 @@
|
||||
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div class="mb-2" >
|
||||
<mat-card>
|
||||
<mat-card-content style="background:#e00201;">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
||||
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs" fxFlex="45" style="color:#fff;">
|
||||
<h4>{{master.lender_full_name}} </h4>
|
||||
<span *ngIf="master.lender_applicant_id"> {{master.lender_applicant_id}} - </span> {{master.pd_date_of_initiation}}
|
||||
</div>
|
||||
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs pt-1" fxFlex="55" style="text-align:right;" >
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
|
||||
<br>
|
||||
<span *ngIf="master.pd_allocated_to" style="color:#fff;text-align:left"><mat-icon class="hover-icon" matTooltip="PD Officer" matTooltipPosition="above">person</mat-icon>{{master.pd_allocated_to | titlecase}}</span>
|
||||
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="color:#fff;text-align:left">{{master.pd_status | titlecase}} On {{master.scheduled_on}}</span>
|
||||
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED && master.pd_status!=pdStatusCheck.QC_COMPLETED " style="color:#fff;text-align:left">{{master.pd_status | titlecase}}</span>
|
||||
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="color:#fff;text-align:left">QC Completed</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row wrap">
|
||||
<div class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<!--pd master -->
|
||||
<mat-card *ngFor="let master of pdMasterData" class="minheight">
|
||||
<div *ngIf="currentPDStatus==pdStatusCheck.DRAFT">
|
||||
<!-- <button *ngIf="master.pd_type_name" mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="pdAllocationTo(master)"><mat-icon>directions_run</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name" mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
||||
-->
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)"><mat-icon>edit</mat-icon></button>
|
||||
|
||||
</div>
|
||||
<mat-card-header>
|
||||
<!-- <img mat-card-avatar src="assets/images/avatar.jpg">
|
||||
<mat-card-title>{{master.lender_full_name}} - {{master.lender_applicant_id}}
|
||||
</mat-card-title>-->
|
||||
<mat-card-subtitle *ngIf="master.city_name" class="hover-icon"><i class="fa-1x fa fa-map-marker"> </i> <span>{{master.city_name}} / {{master.state_name}}-{{master.pincode}}</span></mat-card-subtitle>
|
||||
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p *ngIf="master.pd_contact_person || master.pd_contact_mobileno "><span *ngIf="master.pd_contact_person"> <i class="fa-1x fa fa-user-o"></i> {{master.pd_contact_person}}</span> <span *ngIf="master.pd_contact_mobileno"> <i class="fa-1x fa fa-phone"></i> {{master.pd_contact_mobileno}}</span><span style="font-size:13px;"> (Lender Contact Details) </span> </p>
|
||||
<mat-card-content>
|
||||
<mat-card class="p-2 mb-2" style="height: auto !important;">
|
||||
<!-- height: 370px !important; -->
|
||||
<div fxLayout="row" fxLayoutWrap="wrap" class="mb-3">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="30" fxFlex.xl="30" class="profile-center" style="text-align:center;">
|
||||
<!--<div class="mb-1">
|
||||
<img src="assets/images/userpic.jpg" width="100" height="100" alt="" class="radius-circle">
|
||||
</div>-->
|
||||
<mat-card style="padding: 15px;height: 290px;width: 280px;box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important;">
|
||||
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs">
|
||||
<h4 class="ma-0">{{master.lender_short_name}}</h4>
|
||||
<small>{{master.branch_name}}</small>
|
||||
<div *ngIf="master.lender_applicant_id">
|
||||
<small> {{master.lender_applicant_id}}</small> <br>
|
||||
<small>{{master.pd_date_of_initiation}}</small><br>
|
||||
<br>
|
||||
<button mat-raised-button color="primary" style="cursor: not-allowed !important;">
|
||||
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="text-align:left">{{master.pd_status | titlecase}}</span>
|
||||
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED && master.pd_status!=pdStatusCheck.QC_COMPLETED " style="text-align:left">{{master.pd_status | titlecase}}</span>
|
||||
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="text-align:left">QC Completed</span>
|
||||
</button>
|
||||
<!-- <button *ngIf="currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button> -->
|
||||
<!-- <button *ngIf="currentPDStatus==pdStatusCheck.DRAFT && mandatoryFieldsValidations.length==0" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master.pd_id)"><mat-icon>flash_on</mat-icon></button> -->
|
||||
<br>
|
||||
<small *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.pd_allocated_to | titlecase}}</small>
|
||||
<small *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}}</small>
|
||||
<small *ngIf="master.centralofficer && master.fk_pd_type==3" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.centralofficer | titlecase}}</small> <br>
|
||||
|
||||
<small *ngIf="master.pd_status==pdStatusCheck.SCHEDULED">{{master.scheduled_on}}</small>
|
||||
|
||||
<p *ngIf="master.product_name">{{master.product_name}} / {{master.subproduct_name}}</p>
|
||||
<p *ngIf="master.pd_type_name"><span>{{master.pd_type_name}}</span> / <span *ngIf="master.loan_amount" class="hover-icon"><i class="fa-1x fa fa-rupee"> </i>{{master.loan_amount}}</span></p>
|
||||
<p><span>{{master.addressline1}}</span><span *ngIf="master.addressline2">,{{master.addressline2}}</span> <span *ngIf="master.addressline3">,{{master.addressline3}}</span></p>
|
||||
<p *ngIf="master.remarks"><span style="font-size:13px;"> Remarks : </span> <span style="color:red">{{master.remarks}}</span></p>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
|
||||
</div>
|
||||
<div fxFlex.xs="100" class="m-gap p-gap" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<!-- applicant card -->
|
||||
<mat-card class="minheight">
|
||||
<div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.COMPLETED">
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData)"><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Applicants</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content *ngIf="pdApplicantData.length>0; else noApplicant">
|
||||
<mat-list *ngFor="let applicant of pdApplicantData">
|
||||
<mat-list-item style="height:68px !important;">
|
||||
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-user-o"></i>
|
||||
{{applicant.applicant_name}} </span> <span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-phone"></i>
|
||||
{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant</span>
|
||||
<ng-template #codetails><span>{{applicant.relation_name}}</span></ng-template>
|
||||
</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</mat-card-content>
|
||||
<ng-template #noApplicant><mat-card-content><p>No Applicant</p></mat-card-content></ng-template>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<!--< <h4>John Doe</h4>
|
||||
<span>johndoe@johndoe.com</span>
|
||||
p class="mt-xs mb-xs">Sr. Manager</p>
|
||||
<a href="javascript:;" class="block mt-xs mb-xs">www.example.com</a>
|
||||
<button mat-raised-button color="primary">Edit Profile</button>-->
|
||||
</div>
|
||||
<div fxFlex.xs="100" class="m-gap p-gap" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="100" fxFlex.xl="100">
|
||||
<!-- applicant card -->
|
||||
<mat-card class="minheight">
|
||||
<div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.COMPLETED">
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
<mat-card-header>
|
||||
<mat-card-title style="color:red !important;">Additional Requirements</mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content *ngIf="pdAdditionalReqData.length>0; else noRequirement">
|
||||
<mat-list *ngFor="let requirement of pdAdditionalReqData">
|
||||
<mat-list-item>
|
||||
<p>{{requirement.add_requirement}}</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</mat-card-content>
|
||||
<ng-template #noRequirement><mat-card-content><p>No Additional Requirements</p></mat-card-content></ng-template>
|
||||
</mat-card>
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="70" fxFlex.xl="70" class="content-data">
|
||||
<figure>
|
||||
<mat-card-content style="padding:0px !important;">
|
||||
|
||||
<div fxLayout="row" class="ml-xs mr-xs">
|
||||
<div fxFlex="100" style="text-align: right;">
|
||||
<span *ngFor="let master of pdMasterData">
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID,master.pd_status)"><mat-icon>question_answer</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.COMPLETED || currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
<!-- {{master | json}} -->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50" class="m-gap p-gap">
|
||||
<!-- pd documents card -->
|
||||
<mat-expansion-panel *ngIf="pdDocumentsData.length>0; else nodocument">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<h6 class="mt-0"> Documents</h6>
|
||||
</mat-panel-title>
|
||||
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list *ngFor="let documents of pdDocumentsData">
|
||||
<mat-list-item>
|
||||
<p><span>
|
||||
<i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}} </span>
|
||||
<!----<span class="mb-2 text-center hover-icon"> {{documents.pd_document_name}} </span> -->
|
||||
</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</mat-expansion-panel>
|
||||
<ng-template #nodocument><mat-card><mat-card-content><p>No Document</p></mat-card-content> </mat-card></ng-template>
|
||||
</div>
|
||||
<div class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="50" fxFlex.xl="50">
|
||||
<!--pd logs card -->
|
||||
<mat-expansion-panel *ngIf="masterPdLogsData.length>0; else nohistory">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<h6 class="mt-0"> PD History</h6>
|
||||
</mat-panel-title>
|
||||
</span>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<hr>
|
||||
<mat-card-content>
|
||||
<div *ngFor="let master of pdMasterData">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap" class="mb-3">
|
||||
<div fxFlex="60">
|
||||
<div fxLayout="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<div fxFlex="10">
|
||||
<span><i class="fa-1x fa fa-suitcase" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
|
||||
</div>
|
||||
<div fxFlex="90">
|
||||
<span *ngIf="master.product_name"> {{master.product_name}}<span *ngIf="master.subproduct_name"> / {{master.subproduct_name}} </span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<div fxFlex="10">
|
||||
<span><i class="fa-1x fa fa-rupee" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
|
||||
</div>
|
||||
<div fxFlex="90">
|
||||
<span *ngIf="master.loan_amount"> {{master.loan_amount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<div fxFlex="10">
|
||||
<span><i class="fa-1x fa fa-check-circle" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
|
||||
</div>
|
||||
<div fxFlex="90">
|
||||
<span *ngIf="master.pd_type_name"> {{master.pd_type_name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<div fxFlex="10">
|
||||
<!-- <span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span> -->
|
||||
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
|
||||
</div>
|
||||
<div fxFlex="90">
|
||||
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode_id == 1 ? master.other_pincode : master.pincode }} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div fxLayout="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<span><i class="fa-1x fa fa-suitcase" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i> {{master.addressline1}}</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div fxFlex="40">
|
||||
<div *ngIf="master.pd_contact_person || master.pd_contact_mobileno" style="background-color:#e3dbdb;padding:9px;">
|
||||
<h4 class="ma-0" style="font-size:13px;padding-bottom:5px;color:red;"><span>Lender Contact Details</span></h4>
|
||||
|
||||
<div fxLayout="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<span *ngIf="master.pd_contact_person"> <i class="fa-1x fa fa-user" style="padding: 8px 13px 8px 13px;border-bottom: 2px solid red;"></i> {{master.pd_contact_person}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<span *ngIf="master.pd_contact_mobileno"> <i class="fa-1x fa fa-phone" style="padding: 8px 13px 8px 13px;border-bottom: 2px solid red;"></i> {{master.pd_contact_mobileno}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div fxLayout="row" *ngIf="master.remarks" style="background-color:#e3dbdb;padding:15px;">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<h4 class="ma-0" style="font-size:13px;padding-bottom:5px;color:red;"><span> Remarks </span></h4>
|
||||
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list class="m-gap p-gap" *ngFor="let master of masterPdLogsData">
|
||||
<mat-list-item>
|
||||
<span style="font-size:15px;"><span style="color:#908f8f">{{master.time}}</span> <span style="color:#908f8f"> <i> {{master.user}} </i> </span><br> <span>{{master.log}}</span> </span>
|
||||
<span>{{master.remarks}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.COMPLETED">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)"><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<mat-card class="p-2">
|
||||
<h4>PD Details</h4>
|
||||
<mat-tab-group class="mt-2">
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Applicants</ng-template>
|
||||
<!-- <div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData)"><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
<mat-card-header>
|
||||
<mat-card-title style="color:red !important;">Applicants</mat-card-title>
|
||||
</mat-card-header> -->
|
||||
<mat-card-header>
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important; color:red !important;">
|
||||
<mat-card-title>Applicants</mat-card-title>
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.COMPLETED">
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData)"><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
</mat-card-header>
|
||||
|
||||
</mat-list-item>
|
||||
|
||||
</mat-list>
|
||||
|
||||
</mat-expansion-panel>
|
||||
|
||||
<ng-template #nohistory>
|
||||
<mat-card>
|
||||
<mat-card-content><p>No History</p></mat-card-content>
|
||||
</mat-card>
|
||||
</ng-template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<!-- <notifier-container></notifier-container> -->
|
||||
<mat-card-content *ngIf="pdApplicantData.length>0; else noApplicant">
|
||||
<mat-list *ngFor="let applicant of pdApplicantData">
|
||||
<mat-list-item style="height:68px !important;">
|
||||
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-user-o" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
||||
{{applicant.applicant_name}}
|
||||
</span>
|
||||
<span *ngIf="applicant.mobile_no != '' && applicant.mobile_no != null" class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
||||
{{applicant.mobile_no}}
|
||||
</span>
|
||||
<span *ngIf="applicant.landline != '' && applicant.landline != 'null-null' && applicant.landline != null " class="mb-2 text-center hover-icon">
|
||||
<i class="fa-1x fa fa-phone" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i>
|
||||
{{applicant.landline}}
|
||||
</span>
|
||||
<span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">( Applicant )</span>
|
||||
<ng-template #codetails><span> {{applicant.relation_name}} </span></ng-template>
|
||||
</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</mat-card-content>
|
||||
<ng-template #noApplicant>
|
||||
<mat-card-content>
|
||||
<p>No Applicant</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Additional Requirements</ng-template>
|
||||
<!-- <div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button>
|
||||
</div> -->
|
||||
<!-- <mat-card-header>
|
||||
<mat-card-title style="color:red !important;">Additional Requirements</mat-card-title>
|
||||
</mat-card-header> -->
|
||||
<mat-card-header>
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important; color:red !important;">
|
||||
<mat-card-title>Additional Requirements</mat-card-title>
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.COMPLETED">
|
||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button>
|
||||
</div>
|
||||
</mat-card-header>
|
||||
<mat-card-content *ngIf="pdAdditionalReqData.length>0; else noRequirement">
|
||||
<mat-list *ngFor="let requirement of pdAdditionalReqData">
|
||||
<mat-list-item>
|
||||
<p>{{requirement.add_requirement}}</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</mat-card-content>
|
||||
<ng-template #noRequirement>
|
||||
<mat-card-content>
|
||||
<p>No Additional Requirements</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Documents</ng-template>
|
||||
<div *ngIf="pdDocumentsData.length>0; else nodocument">
|
||||
<mat-list *ngFor="let documents of pdDocumentsData">
|
||||
<mat-list-item>
|
||||
<!--<p><span><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}} </span></p> -->
|
||||
<a href="{{documents.doc_url}}" target="_blank"><i class="fa-1x fa fa-file"></i> {{documents.pd_document_title}}</a>
|
||||
<!-- <span class="mb-2 text-center hover-icon"> {{documents.pd_document_name}} </span> -->
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</div>
|
||||
<ng-template #nodocument>
|
||||
<mat-card-content>
|
||||
<p>No Document</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>QC Notes</ng-template>
|
||||
<div style="color:red !important;">
|
||||
<h6>QC Notes</h6>
|
||||
</div>
|
||||
<p>
|
||||
{{ pdMasterData[0]?.qc_remarks}}</p>
|
||||
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>QC Feedback</ng-template>
|
||||
<div *ngIf="pdMasterData[0]?.pd_status === 'QC_COMPLETED';else nodata" class="m-gap p-gap" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100"
|
||||
fxFlex.lg="100" fxFlex.xl="100">
|
||||
<div style="color:red !important;">
|
||||
<h6>QC Feedback</h6>
|
||||
</div>
|
||||
<div>
|
||||
<div style="display: inline-flex">
|
||||
<div style="margin: 12px; font-size: 21px;">
|
||||
{{ pdMasterData[0]?.qc_rating}}
|
||||
</div>
|
||||
<div style="display: inline-block">
|
||||
<app-rating [rating]="pd_QC_Rating"></app-rating>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div style="display: inline-block;">
|
||||
{{ pdMasterData[0]?.qc_feedback}}
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #nodata>
|
||||
<mat-card-content>
|
||||
<p>No Feedback</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>PD History</ng-template>
|
||||
<div *ngIf="masterPdLogsData.length>0; else nohistory">
|
||||
<mat-list class="m-gap p-gap" *ngFor="let master of masterPdLogsData">
|
||||
<mat-list-item>
|
||||
<span style="font-size:15px;"><span style="color:#908f8f">{{master.time}} </span>
|
||||
<span style="color:#908f8f"> <i> {{master.user}} </i> </span><br> <span>{{master.log}}</span> </span>
|
||||
|
||||
</mat-list-item>
|
||||
|
||||
</mat-list>
|
||||
</div>
|
||||
<ng-template #nohistory>
|
||||
<mat-card-content>
|
||||
<p>No History</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
@ -46,6 +46,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
"QC_COMPLETED" :'QC_COMPLETED',
|
||||
};
|
||||
public _EditPDtriggerForm:FormGroup;
|
||||
pd_QC_Rating: Number;
|
||||
constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder,
|
||||
private _qc: QcService,private route: ActivatedRoute,private router: Router, private QcListComponent: QcListComponent) {
|
||||
this.notifier=notifier
|
||||
@ -61,36 +62,39 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
this.viewPdDetails(this.viewID);
|
||||
}
|
||||
viewPdDetails(editID:string){
|
||||
this._qc.editPdDetails(editID).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.pdMasterData=data.records.pd_master_details;
|
||||
this.pdApplicantData= data.records.applicants_details;
|
||||
this.pdDocumentsData=data.records.pd_documnets;
|
||||
this.masterPdLogsData=data.records.pd_logs.master;
|
||||
this.pdAdditionalReqData = data.records.pd_additional_requirements;
|
||||
//this.applicantPDLogsData= data.records.pd_logs.master;
|
||||
this.currentPDStatus = data.records.pd_master_details[0].pd_status;
|
||||
// enable pd start time
|
||||
if(data.records.pd_master_details[0].scheduled_on_for_validation){
|
||||
let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm');
|
||||
let scheduledDateTime: string=data.records.pd_master_details[0].scheduled_on_for_validation;
|
||||
let diffInMs: number = Date.parse(courrentDateTime) - Date.parse(scheduledDateTime);
|
||||
let diffInHours: number = Math.floor(diffInMs / 1000 / 60 / 60);
|
||||
if(diffInHours>=-4){
|
||||
this.enableStartPD=true;
|
||||
}
|
||||
else {
|
||||
this.enableStartPD=false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.enableStartPD=false;
|
||||
}
|
||||
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
this.pdMasterData = [];
|
||||
this._qc.editPdDetails(editID).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
let masterData: any = data.records.pd_master_details;
|
||||
this.pdMasterData.push(masterData[0]);
|
||||
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
||||
this.pdApplicantData= data.records.applicants_details;
|
||||
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
||||
this.pdDocumentsData=data.records.pd_documnets;
|
||||
this.masterPdLogsData=data.records.pd_logs.master;
|
||||
//this.applicantPDLogsData= data.records.pd_logs.master;
|
||||
this.currentPDStatus = data.records.pd_master_details[0].pd_status;
|
||||
this.pdAdditionalReqData = data.records.pd_additional_requirements;
|
||||
// enable pd start time
|
||||
if(data.records.pd_master_details[0].scheduled_on_for_validation){
|
||||
let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm');
|
||||
let scheduledDateTime: string=data.records.pd_master_details[0].scheduled_on_for_validation;
|
||||
let diffInMs: number = Date.parse(courrentDateTime) - Date.parse(scheduledDateTime);
|
||||
let diffInHours: number = Math.floor(diffInMs / 1000 / 60 / 60);
|
||||
if(diffInHours>=-4){
|
||||
this.enableStartPD=true;
|
||||
}
|
||||
else {
|
||||
this.enableStartPD=false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.enableStartPD=false;
|
||||
}
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
|
||||
loadPdListCompoent() {
|
||||
this.destroyType=2;
|
||||
@ -216,6 +220,11 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
this.destroyType=3;
|
||||
this.router.navigate([ '../../startpd',pdID], { relativeTo: this.route });
|
||||
}
|
||||
// pd report
|
||||
getPDIDReport(pdID:any) {
|
||||
this.destroyType=3;
|
||||
this.router.navigate([ '../../pd_report',pdID], { relativeTo: this.route });
|
||||
}
|
||||
ngOnDestroy(): void {
|
||||
if(this.destroyType==1){
|
||||
this.QcListComponent.pdListLoad(true);
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
/** Common Import Section */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';//for Datatables
|
||||
import { HttpClient,HttpParams } from '@angular/common/http';
|
||||
import { Observable, of, forkJoin } from 'rxjs';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
/** Imported Service Files Are., */
|
||||
import { AwsService } from '../../AwsService/aws.service';
|
||||
|
||||
/** Environment */
|
||||
import { environment } from 'environments/environment';
|
||||
/** Environment */
|
||||
import { environment } from 'environments/environment'
|
||||
import { RequestOptions } from "@angular/http";
|
||||
import { ResponseContentType } from "@angular/http";
|
||||
import { ResponseOptions } from "@angular/http";
|
||||
import { HttpResponse } from "@angular/common/http";
|
||||
import { tap } from "rxjs/internal/operators/tap";
|
||||
|
||||
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||
/** Master Interface */
|
||||
@ -18,6 +22,7 @@ export interface Master {
|
||||
master_name:string;
|
||||
constant_name:string;
|
||||
}
|
||||
|
||||
@Injectable(
|
||||
{
|
||||
providedIn: 'root'
|
||||
@ -27,78 +32,552 @@ export interface Master {
|
||||
|
||||
export class QcService {
|
||||
|
||||
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
//private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
||||
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
|
||||
MAP_API_KEY: string;
|
||||
MAP_API_URL: string;
|
||||
constructor(private _http: HttpClient,
|
||||
private _aws:AwsService) {
|
||||
this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'
|
||||
this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`;
|
||||
}
|
||||
|
||||
// get edit row pd details
|
||||
editPdDetails(editId:string):Observable<any>{
|
||||
let httpParams = new HttpParams().set('pdid', editId);
|
||||
return this._http.post<any>(this.apiUrl+"getFullPDDetails",httpParams)
|
||||
.pipe(
|
||||
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
// private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
||||
MAP_API_KEY: string;
|
||||
MAP_API_URL: string;
|
||||
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
|
||||
constructor(private _http: HttpClient,
|
||||
private _aws: AwsService) {
|
||||
this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'
|
||||
this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`;
|
||||
}
|
||||
|
||||
// get add pd master details
|
||||
getAllMasterDatas(TableName: string): Observable<any> {
|
||||
return this._http.post(this.apiUrl + 'getListOfMaster', { "master_name": TableName })
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
saveForm(records: any): Observable<any> {
|
||||
records.fk_createdby = this._aws.getlocale();
|
||||
let params = { records }
|
||||
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
retriveForm(params): Observable<any> {
|
||||
return this._http.post(this.apiUrl + 'getPDFormDetails', params)
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
//get product and subproduct master details
|
||||
getProductsDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfProducts')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get lenders list
|
||||
getLenderDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfLenders')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get customers list
|
||||
getCustomersDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfCustomerSegments')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get Pd Allocation type details list
|
||||
getPDAllocationDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get state and city details
|
||||
getStateCityDetails(): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + 'getListOfStatesCities','')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get pd type and allocation type details
|
||||
getPDTypeDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// add pd details
|
||||
addPdDetails(pdForm: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "triggerNewPD", pdForm)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
// update pd master details
|
||||
editPdMasterDetails(editData:any,status:string):Observable<any>{
|
||||
)
|
||||
}
|
||||
|
||||
// get pd details
|
||||
getPdDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + "listLessPDDetails/get")
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get status based pd list
|
||||
getTabStatusPdDetails(status: string): Observable<any> {
|
||||
const tabStatus = status ?
|
||||
{ params: new HttpParams().set('status', status) } : {};
|
||||
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", tabStatus)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get edit row pd details
|
||||
editPdDetails(editId: string): Observable<any> {
|
||||
let httpParams = new HttpParams().set('pdid', editId);
|
||||
return this._http.post<any>(this.apiUrl + "getFullPDDetails", httpParams)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// update pd master details
|
||||
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
||||
editData.pd_status = status;
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl+"updatePDMaster",{records:editData})
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// update pd applicant
|
||||
updatePdApplicant(editData: any): Observable<any> {
|
||||
// editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updatePDApplicants", { "pd_applicant_details": editData })
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get pd allocation to details
|
||||
getPdOfficerList(pdID: string): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getListPDOfficers", { "pdid": pdID })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// update pd officer
|
||||
updatePdOfficer(updateData: any): Observable<any> {
|
||||
updateData.fk_updatedby = this._aws.getlocale();
|
||||
// updateData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "allocatePD", { "records": updateData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// update pd schedule
|
||||
updateSchedule(updateData: any): Observable<any> {
|
||||
updateData.fk_scheduled_by = this._aws.getlocale();
|
||||
// updateData.createdon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "schdulePD", { "records": updateData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
//load pd template details
|
||||
loadPDTemplates(pdId: string):Observable<any>{
|
||||
const options = pdId ?
|
||||
{ params: new HttpParams().set('pd_id', pdId) } : {};
|
||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate",options)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
loadPDTemplates(pdId: string): Observable<any> {
|
||||
const options = pdId ?
|
||||
{ params: new HttpParams().set('pd_id', pdId) } : {};
|
||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// load PD question answers
|
||||
getAnswersForPD(list: any):Observable<any>{
|
||||
let httpParams = new HttpParams();
|
||||
httpParams = httpParams.append("category_id", list.category_id);
|
||||
httpParams = httpParams.append("pd_id", list.pd_id);
|
||||
httpParams = httpParams.append("question_id", list.question_id);
|
||||
httpParams = httpParams.append("template_id", list.template_id);
|
||||
// load PD question answers
|
||||
getAnswersForPD(list: any): Observable<any> {
|
||||
let httpParams = new HttpParams();
|
||||
httpParams = httpParams.append("category_id", list.category_id);
|
||||
httpParams = httpParams.append("pd_id", list.pd_id);
|
||||
httpParams = httpParams.append("question_id", list.question_id);
|
||||
httpParams = httpParams.append("template_id", list.template_id);
|
||||
|
||||
return this._http.post<any[]>(this.apiUrl + "getAnswersForPD",httpParams)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
return this._http.post<any[]>(this.apiUrl + "getAnswersForPD", httpParams)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save pd answers
|
||||
// savePDQuestions(saveData: any): Observable<any> {
|
||||
// saveData.createdby = this._aws.getlocale();
|
||||
// saveData.fk_createdon = currentdate;
|
||||
// // saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// // saveData[0].updatedon = currentdate;
|
||||
//
|
||||
// return this._http.post<any>(this.apiUrl + "savePDQuestions", {"records": saveData})
|
||||
// .pipe(
|
||||
// catchError(this.handleError('operation', []))
|
||||
// )
|
||||
// }
|
||||
// get assessed income form details
|
||||
getAssessedIncomeFormDetails(formDetails): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getAssessedIncome", formDetails)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
private handleError<T>(operation = 'operation', result?: T) {
|
||||
return (error: any): Observable<T> => {
|
||||
return of(result as T);
|
||||
};
|
||||
}
|
||||
// common Pd form details get for the Pd Process
|
||||
getPDFormDetailsWithID(pdID, formID): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getPDFormDetails", { "pd_id": pdID, "pd_form_id": formID })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
// common Pd form details get for the Pd Process
|
||||
getPDFormDetailsWithCompanyID(pdID, formID,companyID): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getPDFormDetails", { "pd_id": pdID, "pd_form_id": formID,"company_id": companyID})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save Pd form details
|
||||
savePDFormDetailsWithID(saveData: any): Observable<any> {
|
||||
saveData.fk_createdby = this._aws.getlocale();
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
return this._http.post<any>(this.apiUrl + "savePDFormDetails", { "records": saveData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save pd answers
|
||||
savePDQuestions(saveData: any): Observable<any> {
|
||||
saveData.createdby = this._aws.getlocale();
|
||||
//saveData.fk_createdon = currentdate;
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
return this._http.post<any>(this.apiUrl + "savePDQuestions", { "records": saveData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// get Pd Final report Question Answer
|
||||
|
||||
getPdFinalReportDetails(pdId: number): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getFinalPDReportQuestions", { "pd_id": pdId })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
getPDReportFinalDocument(pdId: any): Observable<any> {
|
||||
pdId.fk_createdby = this._aws.getlocale();
|
||||
return this._http.post<any>(this.apiUrl + "generatePDReport", { "records": pdId })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
getActualPDReportModelTemplate(pdId: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getLatestPDReportBlob ", { "records": { "pd_id": pdId } })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
updatePDReportDetails(records: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "saveNewVersionOfPDReport ", { "records": records })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
getPdDocVersionList(pdId: number): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getListOfPDReportVersions", { "records": { "pd_id": pdId } })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
swapOlderPDReportToLatest(pdId: any): Observable<any> {
|
||||
pdId.fk_createdby = this._aws.getlocale();
|
||||
return this._http.post<any>(this.apiUrl + "swapOlderPDReportToLatest", { "records": pdId })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
getTypeofActivityForSuppliedInfoForm(pd_id: any,company_id:any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getTypeOfActivetyFromBusinessForm", { "records": { "pd_id": pd_id,"company_id":company_id } })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
getQCReportFinalReviewDetails(pd_id: any, flag: string): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getQCLenderRemarks", { "records": { "pd_id": pd_id, "flag": flag } })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// pd review status update details
|
||||
pdReviewStatusUpdate(editData: any): Observable<any> {
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
//pd report export excel
|
||||
pdReportExportExcel(): Observable<HttpResponse<Blob>> {
|
||||
// const options: any = {
|
||||
// observe: 'response',
|
||||
// responseType: 'blob' as 'json'
|
||||
// };
|
||||
return this._http.get<HttpResponse<Blob>>(this.apiUrl + "downloadExcel", {
|
||||
observe: 'response',
|
||||
responseType: 'blob' as 'json'
|
||||
})
|
||||
.pipe(
|
||||
tap<HttpResponse<any>>(
|
||||
res => res,
|
||||
err => {
|
||||
catchError(this.handleError('operation', []))
|
||||
}
|
||||
)
|
||||
// catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// inWords(num) {
|
||||
// let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];
|
||||
// let b : any = ['', '', 'twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety'];
|
||||
// if ((num = num.toString()).length > 9) return 'overflow';
|
||||
// let n : any = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/);
|
||||
// if (!n) return; var str = '';
|
||||
// str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + ' ' + a[n[1][1]]) + 'crore ' : '';
|
||||
// str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' + a[n[2][1]]) + 'lakh ' : '';
|
||||
// str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' + a[n[3][1]]) + 'thousand ' : '';
|
||||
// str += (n[4] != 0) ? (a[Number(n[4])] || b[n[4][0]] + ' ' + a[n[4][1]]) + 'hundred ' : '';
|
||||
// str += (n[5] != 0) ? ((str != '') ? 'and ' : '') + (a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) + 'only ' : '';
|
||||
// return str;
|
||||
// }
|
||||
|
||||
convertNumberToWords(amount) {
|
||||
//let words : any = new Array();
|
||||
let words: any = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty'];
|
||||
words[30] = 'Thirty';
|
||||
words[40] = 'Forty';
|
||||
words[50] = 'Fifty';
|
||||
words[60] = 'Sixty';
|
||||
words[70] = 'Seventy';
|
||||
words[80] = 'Eighty';
|
||||
words[90] = 'Ninety';
|
||||
amount = amount.toString();
|
||||
let atemp = amount.split(".");
|
||||
let number = atemp[0].split(",").join("");
|
||||
let n_length = number.length;
|
||||
let words_string = "";
|
||||
let value: any;
|
||||
if (n_length <= 9) {
|
||||
var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
var received_n_array = new Array();
|
||||
for (var i = 0; i < n_length; i++) {
|
||||
received_n_array[i] = number.substr(i, 1);
|
||||
}
|
||||
for (var i = 9 - n_length, j = 0; i < 9; i++ , j++) {
|
||||
n_array[i] = received_n_array[j];
|
||||
}
|
||||
for (var i = 0, j = 1; i < 9; i++ , j++) {
|
||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
if (n_array[i] == 1) {
|
||||
n_array[j] = 10 + (+n_array[j]);
|
||||
n_array[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
value = "";
|
||||
for (var i = 0; i < 9; i++) {
|
||||
if (i == 0 || i == 2 || i == 4 || i == 7) {
|
||||
value = n_array[i] * 10;
|
||||
} else {
|
||||
value = n_array[i];
|
||||
}
|
||||
if (value != 0) {
|
||||
words_string += words[value] + " ";
|
||||
}
|
||||
if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Crores ";
|
||||
}
|
||||
if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Lakhs ";
|
||||
}
|
||||
if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) {
|
||||
words_string += "Thousand ";
|
||||
}
|
||||
if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) {
|
||||
words_string += "Hundred and ";
|
||||
} else if (i == 6 && value != 0) {
|
||||
words_string += "Hundred ";
|
||||
}
|
||||
}
|
||||
words_string = words_string.split(" ").join(" ");
|
||||
}
|
||||
return words_string;
|
||||
}
|
||||
|
||||
// save additional requirements
|
||||
saveAdditionalRequirements(saveData: any): Observable<any> {
|
||||
saveData.createdby = this._aws.getlocale();
|
||||
|
||||
return this._http.post<any>(this.apiUrl + "savePDAdditionalRequiremets", { "records": saveData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
/** For Stock Details
|
||||
* To Get The Products With TypeofActivity From Business
|
||||
**/
|
||||
stockFormAccess(pdid: any,companyid: any): Observable<any> {
|
||||
// { "pd_id":"104","company_id":"1"}
|
||||
return this._http.post<any>(this.apiUrl + "getProductsFromBusiness", { "pd_id" : pdid , "company_id":companyid })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
getCompaniesListsForBusiness(pdid: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getCompaniesListsForBusiness", { "records":{ "pd_id" : pdid}})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
/** To get StateWise City List For
|
||||
* 1) Family Form
|
||||
* 2) add PD
|
||||
*/
|
||||
getStateWiseCities(stateid:any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getListOfStatesAndCities", { "records":{ "state_id" : stateid}})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
/** To get Family Member Name For
|
||||
* 1) Family Form
|
||||
*/
|
||||
getFamilyDetails(pdid:any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getFamilyDetails", { "pd_id" : pdid})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
/** To get Family Member Name For
|
||||
* 1) other income form - (income earned field)
|
||||
* 2) bussiness form - (partner_name field)
|
||||
*/
|
||||
getAllPersonsName(pdid:any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getAllPersonsName", { "pd_id" : pdid})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
/** To get Business Asset For
|
||||
* 1) Current Loan Form(where Business Asset loan Details is 'Yes' means name is displayed)
|
||||
*/
|
||||
getAssetsWithLoanFromBusiness(pdid:any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getAssetsWithLoanFromBusiness",{ "pd_id" : pdid})
|
||||
.pipe(catchError(this.handleError('operation', [])))
|
||||
}
|
||||
|
||||
getEndUseForLoan(pdid: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getEndUseOfLoan",{ "records":{ "pd_id" : pdid}})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save pd answers
|
||||
savePDQuestions(saveData: any): Observable<any> {
|
||||
saveData.createdby = this._aws.getlocale();
|
||||
// saveData.fk_createdon = currentdate;
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
// private handleError<T>(operation = 'operation', result?: T) {
|
||||
// return (error: any): Observable<T> => {
|
||||
// return of(result as T);
|
||||
// };
|
||||
// }
|
||||
|
||||
return this._http.post<any>(this.apiUrl+"savePDQuestions",{"records":saveData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
/**Search Filter
|
||||
* Sriram
|
||||
*/
|
||||
|
||||
private handleError<T>(operation = 'operation', result?: T) {
|
||||
return (error: any): Observable<T> => {
|
||||
return of(result as T);
|
||||
};
|
||||
}
|
||||
overAllSearchFormDetails(searchItem) {
|
||||
let records = { 'records': searchItem };
|
||||
return this._http.post(this.apiUrl + 'filterPDList', records).pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
);
|
||||
}
|
||||
|
||||
// get list of cities for p serach options
|
||||
getListOfCities() {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfCities')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save assessed sales item wise
|
||||
saveAssessedDetails(methodURl: string,saveData:any){
|
||||
//saveData.createdby = this._aws.getlocale();
|
||||
return this._http.post<any>(this.apiUrl + methodURl, { "records": saveData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// this is for pd map details only for triggered/ allocated status
|
||||
getPdMapList(triggeredStatus, allocatedStatus): Observable<any> {
|
||||
const firstStatus = triggeredStatus ?
|
||||
{ params: new HttpParams().set('status', triggeredStatus) } : {};
|
||||
let response1 = this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", firstStatus);
|
||||
const secondStatus = allocatedStatus ?
|
||||
{ params: new HttpParams().set('status', allocatedStatus) } : {};
|
||||
let response2 = this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", secondStatus);
|
||||
return forkJoin([response1, response2]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import { QualityCheckComponent } from './quality-check.component';
|
||||
import { QcListComponent } from './qc-list/qc-list.component';
|
||||
import { QcViewComponent } from './qc-list/qc-view/qc-view.component';
|
||||
import { QcStartComponent } from './qc-list/qc-start/qc-start.component';
|
||||
import { QcPdReportComponent } from './qc-list/qc-pd-report/qc-pd-report.component';
|
||||
|
||||
const routes: Routes =[
|
||||
{
|
||||
@ -25,7 +26,11 @@ const routes: Routes =[
|
||||
{
|
||||
path: 'startpd/:pdid',
|
||||
component: QcStartComponent,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'pd_report/:pdid',
|
||||
component: QcPdReportComponent,
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@ -18,6 +18,11 @@ import {
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { AgmCoreModule } from '@agm/core';
|
||||
import { CKEditorModule } from 'ng2-ckeditor';
|
||||
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||
import {MAT_MOMENT_DATE_FORMATS, MomentDateAdapter} from '@angular/material-moment-adapter';
|
||||
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';
|
||||
import { SharedModule } from "app/shared/shared.module";
|
||||
// import completed pd components from personal discussion module
|
||||
import { ManagePdModule } from './../personal-discussion/manage-pd/manage-pd.module';
|
||||
//import qu routing ,and its components
|
||||
@ -32,6 +37,9 @@ import { EditPdApplicantComponent } from './../personal-discussion/manage-pd/lis
|
||||
import { EditPdMasterComponent } from './../personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component';
|
||||
import { QcService } from './qc-service/qc.service';
|
||||
import { QcStartComponent } from './qc-list/qc-start/qc-start.component';
|
||||
import { QcPdReportComponent, DialogChangeCurrentVenrsion } from './qc-list/qc-pd-report/qc-pd-report.component';
|
||||
import { QcReviewComponent } from './qc-list/qc-pd-report/qc-review/qc-review.component';
|
||||
import { ModelEditPdReportComponent } from './qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component';
|
||||
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
@ -95,13 +103,18 @@ const customNotifierOptions: NotifierOptions = {
|
||||
MatStepperModule,
|
||||
MatTabsModule,
|
||||
MatCheckboxModule,MatSidenavModule, MatButtonToggleModule, MatBadgeModule,MatTooltipModule,
|
||||
SharedModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),
|
||||
CKEditorModule,
|
||||
PdfViewerModule,
|
||||
ManagePdModule,
|
||||
],
|
||||
declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent],
|
||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent],
|
||||
providers : [QcService]
|
||||
declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent],
|
||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent],
|
||||
providers : [QcService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
|
||||
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
||||
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}]
|
||||
})
|
||||
export class QualityCheckModule { }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user