clean up-1
This commit is contained in:
parent
fb2eabd4f5
commit
d5d9ec8bad
@ -1,212 +1,162 @@
|
||||
<div class="pad-wrap" [style.minHeight]="'100%'">
|
||||
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
|
||||
<mat-card style="min-height: 90%;">
|
||||
<mat-card-title>
|
||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||
{{dashboardTitle}}
|
||||
|
||||
</div>
|
||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||
<ngx-mat-drp (selectedDateRangeChanged)="updateRange($event);" [options]="options" #dateRangePicker></ngx-mat-drp>
|
||||
</div>
|
||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||
<mat-form-field class="example-full-width">
|
||||
<mat-select placeholder="City" [formControl]="myControl" multiple>
|
||||
<mat-select-trigger style="color:#fff;">
|
||||
{{myControl.value != null && myControl.value != '' ? myControl.value[0].name : ''}}
|
||||
<span *ngIf="myControl.value?.length > 1" >
|
||||
(+{{myControl.value.length - 1}} {{myControl.value?.length === 2 ? 'other' : 'others'}})
|
||||
</span>
|
||||
</mat-select-trigger>
|
||||
<mat-option *ngFor="let cd of cityData" (onSelectionChange)="onChange($event,2)" [value]="cd">{{ cd.name }} / {{cd.state_name}} </mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||
|
||||
<mat-form-field class="example-full-width">
|
||||
<mat-select placeholder="Lender" [formControl]="myControl2" multiple>
|
||||
<mat-select-trigger style="color:#fff;">
|
||||
{{myControl2.value != null && myControl2.value != '' ? myControl2.value[0].short_name : ''}}
|
||||
<span *ngIf="myControl2.value?.length > 1" >
|
||||
(+{{myControl2.value.length - 1}} {{myControl2.value?.length === 2 ? 'other' : 'others'}})
|
||||
</span>
|
||||
</mat-select-trigger>
|
||||
<!-- <mat-option #allSelected (click)="toggleAllSelection()" [value]="0">All</mat-option> -->
|
||||
<mat-option *ngFor="let ld of lenderData" (onSelectionChange)="onChange($event,3)" [value]="ld">{{ ld.full_name }} ({{ ld.short_name }})</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
</mat-card-title>
|
||||
<!-- <pre> Full - {{doughnutChartDataForFullPD}} Smart -{{doughnutChartDataForSmartPD}} TELE -{{doughnutChartDataForTelePD}} </pre> -->
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" style="min-height:280px;">
|
||||
<div *ngIf="total1 != 0" fxFlex.gt-sm="30" fxFlex="100" style="text-align:-webkit-center;">
|
||||
<canvas baseChart class="chart" id="FullCanvas" name="FullCanvas"
|
||||
height="280px" width="280px"
|
||||
[data]="doughnutChartDataForFullPD"
|
||||
[labels]="doughnutChartLabels"
|
||||
[options]="doughnutOptions"
|
||||
[colors]="doughnutChartColors"
|
||||
[legend]="false"
|
||||
[chartType]="doughnutChartType"></canvas>
|
||||
<div *ngIf="total1 != 0" class="donut-inner"><span>Full - {{total1}}</span></div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="total2 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100" style="text-align:-webkit-center;">
|
||||
<canvas baseChart class="chart" id="SmartCanvas" name="SmartCanvas"
|
||||
height="280px" width="280px"
|
||||
[data]="doughnutChartDataForSmartPD"
|
||||
[labels]="doughnutChartLabels"
|
||||
[options]="doughnutOptions"
|
||||
[colors]="doughnutChartColors"
|
||||
[legend]="false"
|
||||
[chartType]="doughnutChartType"></canvas>
|
||||
<div *ngIf="total2 != 0" class="donut-inner"><span>Smart - {{total2}}</span></div>
|
||||
</div>
|
||||
<div *ngIf="total3 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100" style="text-align:-webkit-center;">
|
||||
<canvas baseChart class="chart" id="TeleCanvas" name="TeleCanvas"
|
||||
height="280px" width="280px"
|
||||
[data]="doughnutChartDataForTelePD"
|
||||
[labels]="doughnutChartLabels"
|
||||
[options]="doughnutOptions"
|
||||
[colors]="doughnutChartColors"
|
||||
[legend]="false"
|
||||
[chartType]="doughnutChartType"></canvas>
|
||||
<div *ngIf="total3 != 0" class="donut-inner"><span>Tele - {{total3}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div fxLayout="row" class="pt-3">
|
||||
|
||||
<div fxFlex.gt-sm="100" fxFlex="100" style="text-align:center">
|
||||
<ul class="lengend-list">
|
||||
<li class="lengend-element"><span class="oval" style="background-color:#c1c1c1"> </span> Draft</li>
|
||||
<li class="lengend-element"><span class="oval" style="background-color:#f44336"> </span> Triggered</li>
|
||||
<li class="lengend-element"><span class="oval" style="background-color:#ffa500"> </span> Allocated</li>
|
||||
<li class="lengend-element"><span class="oval" style="background-color:#ffeb3b"> </span> Scheduled</li>
|
||||
<li class="lengend-element"><span class="oval" style="background-color:#3f51b5"> </span> InProgress</li>
|
||||
<li class="lengend-element"><span class="oval" style="background-color:#00ff00"> </span> Completed</li>
|
||||
<li class="lengend-element"><span class="oval" style="background-color:#4caf50"> </span> QC Completed</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-title style="background-color:#e00201;padding: 23px;">
|
||||
PD Report
|
||||
{{dashboardTitle}}
|
||||
</mat-card-title>
|
||||
<mat-card-content>
|
||||
<mat-card-content>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="50" algin="center">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="50" align="center" *ngIf="total1 != 0">
|
||||
<p *ngIf="total1 != 0" style=" justify-content: center;" ><span>Full - {{total1}}</span></p>
|
||||
<div fxLayout="row wrap">
|
||||
<mat-card style="background-color:#f44336;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForFullPD[0]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Triggered</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffa500;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForFullPD[1]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Allocated</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffeb3b;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForFullPD[2]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Scheduled</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#3f51b5;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForFullPD[3]}}</h4>
|
||||
<h6 style="margin-top: 0px;">InProgress</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#00ff00;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForFullPD[4]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#4caf50;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForFullPD[5]}}</h4>
|
||||
<h6 style="margin-top: 0px;">QC Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div fxFlex="50" align="center" *ngIf="total2 != 0">
|
||||
<p *ngIf="total2 != 0" style=" justify-content: center;" ><span>Smart - {{total2}}</span></p>
|
||||
<div fxLayout="row wrap">
|
||||
<!-- <div fxFlex="100"> -->
|
||||
<mat-card style="background-color:#c1c1c1;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<!-- <mat-card style="background-color:#c1c1c1;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h2>892</h2>
|
||||
<h4>892</h4>
|
||||
<h6 style="margin-top: 0px;">Draft</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#f44336;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>265</h4>
|
||||
<h6 style="margin-top: 0px;">Triggered</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffa500;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>452</h4>
|
||||
<h6 style="margin-top: 0px;">Allocated</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffeb3b;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>56</h4>
|
||||
<h6 style="margin-top: 0px;">Scheduled</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#3f51b5;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>56</h4>
|
||||
<h6 style="margin-top: 0px;">InProgress</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#3f51b5;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>56</h4>
|
||||
<h6 style="margin-top: 0px;">Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#4caf50;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>56</h4>
|
||||
<h6 style="margin-top: 0px;">QC Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
</mat-card> -->
|
||||
<mat-card style="background-color:#f44336;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForSmartPD[0]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Triggered</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffa500;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForSmartPD[1]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Allocated</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffeb3b;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForSmartPD[2]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Scheduled</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#3f51b5;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForSmartPD[3]}}</h4>
|
||||
<h6 style="margin-top: 0px;">InProgress</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#00ff00;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForSmartPD[4]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#4caf50;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForSmartPD[5]}}</h4>
|
||||
<h6 style="margin-top: 0px;">QC Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="50" algin="center">
|
||||
<div fxLayout="row wrap">
|
||||
<!-- <div fxFlex="100"> -->
|
||||
<mat-card style="background-color:#c1c1c1;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h2>892</h2>
|
||||
<h6 style="margin-top: 0px;">Draft</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#f44336;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>265</h4>
|
||||
<h6 style="margin-top: 0px;">Triggered</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffa500;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>452</h4>
|
||||
<h6 style="margin-top: 0px;">Allocated</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffeb3b;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>56</h4>
|
||||
<h6 style="margin-top: 0px;">Scheduled</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#3f51b5;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>56</h4>
|
||||
<h6 style="margin-top: 0px;">InProgress</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#3f51b5;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>56</h4>
|
||||
<h6 style="margin-top: 0px;">Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#4caf50;color: #fff;height: 100px;text-align: center;width: 125px;margin: 1px;">
|
||||
<mat-card-content>
|
||||
<h4>56</h4>
|
||||
<h6 style="margin-top: 0px;">QC Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div fxFlex="50" align="center" *ngIf="total3 != 0">
|
||||
<p *ngIf="total3 != 0" style=" justify-content: center;" ><span>Tele - {{total3}}</span></p>
|
||||
<div fxLayout="row wrap">
|
||||
<!-- <div fxFlex="100"> -->
|
||||
<!-- <mat-card style="background-color:#c1c1c1;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h2>892</h2>
|
||||
<h6 style="margin-top: 0px;">Draft</h6>
|
||||
</mat-card-content>
|
||||
</mat-card> -->
|
||||
<mat-card style="background-color:#f44336;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForTelePD[0]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Triggered</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffa500;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForTelePD[1]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Allocated</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#ffeb3b;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForTelePD[2]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Scheduled</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#3f51b5;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForTelePD[3]}}</h4>
|
||||
<h6 style="margin-top: 0px;">InProgress</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#00ff00;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForTelePD[4]}}</h4>
|
||||
<h6 style="margin-top: 0px;">Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card style="background-color:#4caf50;" class="ReportTileCard">
|
||||
<mat-card-content>
|
||||
<h4>{{doughnutChartDataForTelePD[5]}}</h4>
|
||||
<h6 style="margin-top: 0px;">QC Completed</h6>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
|
||||
@ -1,74 +1,16 @@
|
||||
$red: #f5515f;
|
||||
$blue: #05abe0;
|
||||
$grey: #343434;
|
||||
$p: 12px;
|
||||
|
||||
::ng-deep .ngx-mat-drp-date-input{text-overflow:ellipsis !important;color:#fff !important;}
|
||||
|
||||
mat-card-title{
|
||||
background-color:#E00201 !important;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.mat-input-wrapper {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
li
|
||||
{
|
||||
display:inline-block;
|
||||
//float:left;
|
||||
}
|
||||
|
||||
|
||||
.example-full-width {
|
||||
width: 95%;
|
||||
}
|
||||
.oval {
|
||||
height: 13px;
|
||||
width: 25px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
// .ngx-mat-drp-date-input[_ngcontent-c17] {
|
||||
// text-overflow: ellipsis;
|
||||
// color: #fff;
|
||||
// }
|
||||
|
||||
//.lengend-list {
|
||||
// list-style-type: none;
|
||||
//margin: 0;
|
||||
// padding: 0;
|
||||
// overflow: hidden;
|
||||
// text-align:justify;
|
||||
//}
|
||||
|
||||
.lengend-element {
|
||||
font-size: 1rem !important;
|
||||
padding-right: 3%;
|
||||
}
|
||||
|
||||
.donut-inner{
|
||||
margin-top: -165px;
|
||||
// margin-left: 120px;
|
||||
|
||||
}
|
||||
|
||||
.donut-inner h5 {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 0;
|
||||
|
||||
}
|
||||
.donut-inner span{
|
||||
font-size:1rems;
|
||||
}
|
||||
|
||||
mat-card-content{
|
||||
min-height: 400px;
|
||||
min-height: 400px;
|
||||
}
|
||||
.chart{
|
||||
padding: 0.8rem;
|
||||
}
|
||||
::ng-deep .body-container{
|
||||
padding: 0rem !important;
|
||||
|
||||
.ReportTileCard{
|
||||
color: #fff;
|
||||
height: 100px;
|
||||
width: 125px;
|
||||
text-align: center;
|
||||
margin: 1px;
|
||||
}
|
||||
@ -15,26 +15,10 @@ import { BaseChartDirective } from 'ng2-charts/ng2-charts';
|
||||
|
||||
export class DashboardComponent {
|
||||
|
||||
/** Declaration Part Of DataRange Picker */
|
||||
range:Range = {fromDate:new Date(), toDate: new Date()};
|
||||
options:NgxDrpOptions;
|
||||
presets:Array<PresetItem> = [];
|
||||
|
||||
@ViewChild('dateRangePicker') dateRangePicker;
|
||||
/* RefLINK: https://www.npmjs.com/package/ngx-mat-daterange-picker */
|
||||
/** End Of Date Range Declaration */
|
||||
|
||||
dashboardTitle = 'PD Status';
|
||||
|
||||
/** Declaration Part Of Doughnut Chart */
|
||||
//@ViewChild('BaseChartDirective') canvas ;
|
||||
@ViewChild(BaseChartDirective) FullCanvas: BaseChartDirective;
|
||||
@ViewChild(BaseChartDirective) TeleCanvas: BaseChartDirective;
|
||||
@ViewChild(BaseChartDirective) SmartCanvas: BaseChartDirective;
|
||||
//myChart: BaseChartDirective;
|
||||
|
||||
doughnutChartType = 'doughnut';
|
||||
doughnutChartLabels: string[] = ['Draft','Triggered','Allocated','Scheduled','InProgress','Completed','QC Completed'];
|
||||
doughnutChartLabels: string[] = ['Triggered','Allocated','Scheduled','InProgress','Completed','QC Completed'];
|
||||
|
||||
doughnutChartDataForFullPD:any[]=[];
|
||||
doughnutChartDataForSmartPD:any[]=[];
|
||||
@ -47,150 +31,21 @@ export class DashboardComponent {
|
||||
total1: number = 0;
|
||||
total2: number = 0;
|
||||
total3: number = 0;
|
||||
flag : number = 0;
|
||||
evt:Range
|
||||
|
||||
// doughnutChartColors: any[] = [{
|
||||
// backgroundColor: ['#f44336', '#3f51b5', '#ffeb3b', '#4caf50', '#2196f3','#673ab7']
|
||||
// backgroundColor: ['#c1c1c1','#f44336','#3f51b5','#ffeb3b','#4caf50','#2196f3','#673ab7']
|
||||
|
||||
// doughnutChartColors: any[] = [{
|
||||
// backgroundColor: ['#c1c1c1','#f44336','#ffa500','#ffeb3b','#3f51b5','#00ff00','#4caf50']
|
||||
// }];
|
||||
|
||||
doughnutChartColors: any[] = [{
|
||||
backgroundColor: ['#c1c1c1','#f44336','#ffa500','#ffeb3b','#3f51b5','#00ff00','#4caf50']
|
||||
}];
|
||||
|
||||
globalChartOptions: any = {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: true,
|
||||
position: 'bottom'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/** Declaration Part Of Title Section */
|
||||
|
||||
|
||||
/** Declaration Part Of Title Form Section */
|
||||
myControl = new FormControl();
|
||||
myControl2 = new FormControl();
|
||||
myControl3 = new FormControl();
|
||||
|
||||
lenderData : any[];
|
||||
cityData : any[];
|
||||
|
||||
selectedCity : any=[];
|
||||
selectedLender : any=[];
|
||||
|
||||
constructor(private _dashboardService: DashboardService,
|
||||
private _masterService: MastersService) {
|
||||
|
||||
/** To Display The City Data For City DropDown */
|
||||
this._masterService.getAllCity().subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.dataStatus == true) {
|
||||
this.cityData = dataresult.records;
|
||||
this.cityData = this.cityData.filter(city=>city.isactive == 1 );
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/** To Display The Entities Data For Entities DropDown */
|
||||
this._masterService.getAllMasterData('ENTITY').subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.dataStatus == true) {
|
||||
this.lenderData = dataresult.records;
|
||||
this.lenderData = this.lenderData.filter(entity=>entity.isactive == 1 );
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
constructor(private _dashboardService: DashboardService) {}
|
||||
|
||||
|
||||
ngOnInit(){
|
||||
// console.clear();
|
||||
this.getDoughnutChartData();
|
||||
|
||||
|
||||
const today = new Date();
|
||||
const fromMin = new Date(today.getFullYear(), today.getMonth()-2, 1);
|
||||
const fromMax = new Date(today.getFullYear(), today.getMonth()+1, 0);
|
||||
const toMin = new Date(today.getFullYear(), today.getMonth()-1, 1);
|
||||
const toMax = new Date(today.getFullYear(), today.getMonth()+2, 0);
|
||||
|
||||
const LastDateForPreMonth = new Date(today.getFullYear(), today.getMonth(), 0);
|
||||
const FirstDateForPreMonth = new Date(today.getFullYear(), today.getMonth()-1, 1);
|
||||
|
||||
// console.log('FromDateMin:',fromMin);
|
||||
// console.log('FromDateMax:',fromMax);
|
||||
// console.log('ToDateMin',toMin);
|
||||
// console.log('ToDateMax',toMax);
|
||||
// console.log('LastDateForPreMonth',LastDateForPreMonth);
|
||||
// console.log('FirstDateForPreMonth',FirstDateForPreMonth);
|
||||
|
||||
// const resetRange = {fromDate: today, toDate: today};
|
||||
// this.dateRangePicker.resetDates(resetRange); // will trigger selectedDateRangeChanged
|
||||
|
||||
|
||||
this.setupPresets();
|
||||
this.options = {
|
||||
presets: this.presets,
|
||||
format: 'mediumDate',
|
||||
range: {fromDate: today, toDate: today},
|
||||
applyLabel: "Submit",
|
||||
calendarOverlayConfig: {
|
||||
shouldCloseOnBackdropClick: false,
|
||||
hasBackdrop:false,
|
||||
},
|
||||
placeholder: "Date",
|
||||
cancelLabel: "Cancel",
|
||||
excludeWeekends:false,
|
||||
fromMinMax: {fromDate:fromMin, toDate:fromMax},
|
||||
toMinMax: {fromDate:toMin, toDate:toMax}
|
||||
};
|
||||
}
|
||||
|
||||
updateRange(range: Range){
|
||||
this.range = range;
|
||||
|
||||
if(range.fromDate != range.toDate){
|
||||
// console.log('if from Date',range.fromDate);
|
||||
// console.log('if to date',range.toDate);
|
||||
this.onChange(this.range,1);
|
||||
}
|
||||
else{
|
||||
// console.log('else from Date',range.fromDate);
|
||||
// console.log('else to date',range.toDate);
|
||||
// console.log('same');
|
||||
}
|
||||
}
|
||||
|
||||
setupPresets() {
|
||||
|
||||
const backDate = (numOfDays) => {
|
||||
const today = new Date();
|
||||
return new Date(today.setDate(today.getDate() - numOfDays));
|
||||
}
|
||||
|
||||
const today = new Date();
|
||||
const yesterday = backDate(1);
|
||||
const minus7 = backDate(7)
|
||||
const minus30 = backDate(30);
|
||||
const currMonthStart = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
const currMonthEnd = new Date(today.getFullYear(), today.getMonth()+1, 0);
|
||||
const lastMonthStart = new Date(today.getFullYear(), today.getMonth()-1, 1);
|
||||
const lastMonthEnd = new Date(today.getFullYear(), today.getMonth(), 0);
|
||||
|
||||
this.presets = [
|
||||
{presetLabel: "Yesterday", range:{ fromDate:yesterday, toDate:today }},
|
||||
{presetLabel: "Last 7 Days", range:{ fromDate: minus7, toDate:today }},
|
||||
{presetLabel: "Last 30 Days", range:{ fromDate: minus30, toDate:today }},
|
||||
{presetLabel: "This Month", range:{ fromDate: currMonthStart, toDate:currMonthEnd }},
|
||||
{presetLabel: "Last Month", range:{ fromDate: lastMonthStart, toDate:lastMonthEnd }}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To Get and Display Doughnut Chart Data Based on PDType
|
||||
**/
|
||||
@ -202,10 +57,11 @@ getDoughnutChartData(){
|
||||
let lenderarr = '';
|
||||
|
||||
this._dashboardService.getPDDetailForDoughnut(fromdate,todate,cityarr,lenderarr).subscribe(data => {
|
||||
this.flag = 1;
|
||||
// console.log('data',data);
|
||||
|
||||
// console.log(' ***** Doughnut Chart Data *****',data);
|
||||
|
||||
let DraftIndexvalue = this.doughnutChartLabels.indexOf('Draft');
|
||||
// let DraftIndexvalue = this.doughnutChartLabels.indexOf('Draft');
|
||||
let TriggedIndexvalue = this.doughnutChartLabels.indexOf('Triggered');
|
||||
let AllocatedIndexvalue = this.doughnutChartLabels.indexOf('Allocated');
|
||||
let ScheduledIndexvalue = this.doughnutChartLabels.indexOf('Scheduled');
|
||||
@ -221,19 +77,19 @@ getDoughnutChartData(){
|
||||
let MonthlySmartPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'SMART' );
|
||||
let MonthlyTelePDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'TELE' );
|
||||
|
||||
let DraftFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
if(DraftFullPDvalue.length != '0'){
|
||||
//console.log('console triggered value',TriggerFullPDvalue);
|
||||
for(let FPD of DraftFullPDvalue){
|
||||
// let DraftFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
// if(DraftFullPDvalue.length != '0'){
|
||||
// //console.log('console triggered value',TriggerFullPDvalue);
|
||||
// for(let FPD of DraftFullPDvalue){
|
||||
|
||||
this.tempDataFullPD[DraftIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataFullPD[DraftIndexvalue] = 0;
|
||||
}
|
||||
// this.tempDataFullPD[DraftIndexvalue] = +FPD.count;
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// this.tempDataFullPD[DraftIndexvalue] = 0;
|
||||
// }
|
||||
|
||||
let TriggerFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||
let TriggerFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||
if(TriggerFullPDvalue.length != '0'){
|
||||
|
||||
for(let FPD of TriggerFullPDvalue){
|
||||
@ -308,17 +164,17 @@ getDoughnutChartData(){
|
||||
this.tempDataFullPD[QCCompletedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let DraftSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
if(DraftSmartPDvalue.length != '0'){
|
||||
//console.log('console triggered value',TriggerFullPDvalue);
|
||||
for(let FPD of DraftSmartPDvalue){
|
||||
// let DraftSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
// if(DraftSmartPDvalue.length != '0'){
|
||||
// //console.log('console triggered value',TriggerFullPDvalue);
|
||||
// for(let FPD of DraftSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[DraftIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataSmartPD[DraftIndexvalue] = 0;
|
||||
}
|
||||
// this.tempDataSmartPD[DraftIndexvalue] = +FPD.count;
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// this.tempDataSmartPD[DraftIndexvalue] = 0;
|
||||
// }
|
||||
|
||||
let TriggerSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||
if(TriggerSmartPDvalue.length != '0'){
|
||||
@ -373,7 +229,7 @@ getDoughnutChartData(){
|
||||
for(let FPD of CompletedSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[CompletedIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
//let y = +CompletedFullPDvalue.count;
|
||||
|
||||
}
|
||||
@ -395,17 +251,17 @@ getDoughnutChartData(){
|
||||
}
|
||||
|
||||
|
||||
let DraftTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
if(DraftTelePDvalue.length != '0'){
|
||||
// let DraftTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
// if(DraftTelePDvalue.length != '0'){
|
||||
|
||||
for(let FPD of DraftTelePDvalue){
|
||||
// for(let FPD of DraftTelePDvalue){
|
||||
|
||||
this.tempDataTelePD[DraftIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataTelePD[DraftIndexvalue] = 0;
|
||||
}
|
||||
// this.tempDataTelePD[DraftIndexvalue] = +FPD.count;
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// this.tempDataTelePD[DraftIndexvalue] = 0;
|
||||
// }
|
||||
|
||||
let TriggerTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||
if(TriggerTelePDvalue.length != '0'){
|
||||
@ -484,393 +340,20 @@ getDoughnutChartData(){
|
||||
}
|
||||
|
||||
else{
|
||||
this.tempDataFullPD = [0,0,0,0,0,0,0];
|
||||
this.tempDataSmartPD = [0,0,0,0,0,0,0];
|
||||
this.tempDataTelePD = [0,0,0,0,0,0,0];
|
||||
this.tempDataFullPD = [0,0,0,0,0,0];
|
||||
this.tempDataSmartPD = [0,0,0,0,0,0];
|
||||
this.tempDataTelePD = [0,0,0,0,0,0];
|
||||
}
|
||||
|
||||
this.doughnutChartDataForFullPD = this.tempDataFullPD;
|
||||
this.doughnutChartDataForSmartPD = this.tempDataSmartPD;
|
||||
this.doughnutChartDataForTelePD = this.tempDataTelePD;
|
||||
|
||||
this.total1 = this.tempDataFullPD.reduce((a, b) => a + b, 0);
|
||||
this.total2 = this.tempDataSmartPD.reduce((a, b) => a + b, 0);
|
||||
this.total3 = this.tempDataTelePD.reduce((a, b) => a + b, 0);
|
||||
|
||||
// console.log('Final Full Data '+ this.doughnutChartDataForFullPD+'Temp Data'+this.tempDataFullPD+'Full Total '+this.total1);
|
||||
// console.log('Final Smart Data '+ this.doughnutChartDataForSmartPD+' Temp Data '+this.tempDataSmartPD+'Smart Total '+this.total2);
|
||||
// console.log('Final Tele Data '+ this.doughnutChartDataForTelePD+' Temp Data'+this.tempDataTelePD+'Tele Total '+this.total3);
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
doughnutOptions: any = Object.assign({
|
||||
elements: {
|
||||
arc: {
|
||||
borderWidth: 0
|
||||
}
|
||||
},
|
||||
centertext:'One'
|
||||
},this.globalChartOptions);
|
||||
|
||||
// ngOnChanges(){
|
||||
// // this.barChartData=this.chartData;
|
||||
// this.barChartLabel=this.chartLabel;
|
||||
// }
|
||||
|
||||
|
||||
onChange(e: any,flag: any) {
|
||||
|
||||
let fromdate;
|
||||
let todate;
|
||||
|
||||
if(flag == 1){
|
||||
this.evt = e
|
||||
fromdate = new Date(this.evt.fromDate);
|
||||
todate = new Date(this.evt.toDate);
|
||||
|
||||
}
|
||||
|
||||
if(flag == 2){
|
||||
let data = e.source.value.city_id;
|
||||
e.source._selected == true ? this.selectedCity.push(data)
|
||||
: this.selectedCity.splice(this.selectedCity.indexOf(data),1);
|
||||
|
||||
}
|
||||
|
||||
if(flag == 3){
|
||||
let data = e.source.value.entity_id;
|
||||
e.source._selected == true ? this.selectedLender.push(data)
|
||||
: this.selectedLender.splice(this.selectedLender.indexOf(data),1);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
this._dashboardService.getPDDetailForDoughnut(fromdate,todate,this.selectedCity,this.selectedLender).subscribe(data => {
|
||||
|
||||
// console.log(' *****Updated Date Doughnut Chart Data *****',data);
|
||||
|
||||
if(data.records.current_month.length != 0){
|
||||
this.total1 = 0;
|
||||
this.total2 = 0;
|
||||
this.total3 = 0;
|
||||
}
|
||||
|
||||
this.doughnutChartDataForFullPD = [];
|
||||
this.doughnutChartDataForSmartPD = [];
|
||||
this.doughnutChartDataForTelePD = [];
|
||||
this.tempDataFullPD = [];
|
||||
this.tempDataSmartPD =[];
|
||||
this.tempDataTelePD = [];
|
||||
|
||||
|
||||
let DraftIndexvalue = this.doughnutChartLabels.indexOf('Draft');
|
||||
let TriggedIndexvalue = this.doughnutChartLabels.indexOf('Triggered');
|
||||
let AllocatedIndexvalue = this.doughnutChartLabels.indexOf('Allocated');
|
||||
let ScheduledIndexvalue = this.doughnutChartLabels.indexOf('Scheduled');
|
||||
let InProgressIndexvalue = this.doughnutChartLabels.indexOf('InProgress');
|
||||
let CompletedIndexvalue = this.doughnutChartLabels.indexOf('Completed');
|
||||
let QCCompletedIndexvalue = this.doughnutChartLabels.indexOf('QC Completed');
|
||||
|
||||
if(data.records.current_month.length != 0){
|
||||
//console.log('If Condition monthLY');
|
||||
// console.log('Monthly Status',data.records.current_month);
|
||||
|
||||
let MonthlyFullPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'FULL' );
|
||||
let MonthlySmartPDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'SMART' );
|
||||
let MonthlyTelePDArr = data.records.current_month.filter(arr=>arr.PDTYPE == 'TELE' );
|
||||
|
||||
let DraftFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
if(DraftFullPDvalue.length != '0'){
|
||||
|
||||
for(let FPD of DraftFullPDvalue){
|
||||
let y = +FPD.count;
|
||||
this.total1 = this.total1+y;
|
||||
this.tempDataFullPD[DraftIndexvalue] = y;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataFullPD[DraftIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let TriggerFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||
if(TriggerFullPDvalue.length != '0'){
|
||||
|
||||
for(let FPD of TriggerFullPDvalue){
|
||||
|
||||
this.tempDataFullPD[TriggedIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataFullPD[TriggedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let AllocatedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'ALLOCATED');
|
||||
if(AllocatedFullPDvalue.length != '0'){
|
||||
for(let FPD of AllocatedFullPDvalue){
|
||||
|
||||
this.tempDataFullPD[AllocatedIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataFullPD[AllocatedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let ScheduledFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'SCHEDULED');
|
||||
if(ScheduledFullPDvalue.length != '0'){
|
||||
for(let FPD of ScheduledFullPDvalue){
|
||||
|
||||
this.tempDataFullPD[ScheduledIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +ScheduledFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataFullPD[ScheduledIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let InProgressFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'INPROGRESS');
|
||||
if(InProgressFullPDvalue.length != '0'){
|
||||
for(let FPD of InProgressFullPDvalue){
|
||||
|
||||
this.tempDataFullPD[InProgressIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +InProgressFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataFullPD[InProgressIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let CompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'COMPLETED');
|
||||
if(CompletedFullPDvalue.length != '0'){
|
||||
for(let FPD of CompletedFullPDvalue){
|
||||
|
||||
this.tempDataFullPD[CompletedIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +CompletedFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataFullPD[CompletedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let QCCompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED");
|
||||
if(QCCompletedFullPDvalue.length != '0'){
|
||||
for(let FPD of QCCompletedFullPDvalue){
|
||||
|
||||
this.tempDataFullPD[QCCompletedIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +QCCompletedFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataFullPD[QCCompletedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let DraftSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
if(DraftSmartPDvalue.length != '0'){
|
||||
//console.log('console triggered value',TriggerFullPDvalue);
|
||||
for(let FPD of DraftSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[DraftIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataSmartPD[DraftIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let TriggerSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||
if(TriggerSmartPDvalue.length != '0'){
|
||||
|
||||
for(let FPD of TriggerSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[TriggedIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataSmartPD[TriggedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let AllocatedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'ALLOCATED');
|
||||
if(AllocatedSmartPDvalue.length != '0'){
|
||||
for(let FPD of AllocatedSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[AllocatedIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataSmartPD[AllocatedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let ScheduledSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'SCHEDULED');
|
||||
if(ScheduledSmartPDvalue.length != '0'){
|
||||
for(let FPD of ScheduledSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[ScheduledIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +ScheduledFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataSmartPD[ScheduledIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let InProgressSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'INPROGRESS');
|
||||
if(InProgressSmartPDvalue.length != '0'){
|
||||
for(let FPD of InProgressSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[InProgressIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +InProgressFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataSmartPD[InProgressIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let CompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'COMPLETED');
|
||||
if(CompletedSmartPDvalue.length != '0'){
|
||||
for(let FPD of CompletedSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[CompletedIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +CompletedFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataSmartPD[CompletedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let QCCompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED");
|
||||
if(QCCompletedSmartPDvalue.length != '0'){
|
||||
for(let FPD of QCCompletedSmartPDvalue){
|
||||
|
||||
this.tempDataSmartPD[QCCompletedIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +QCCompletedFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataSmartPD[QCCompletedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
|
||||
let DraftTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'DRAFT');
|
||||
if(DraftTelePDvalue.length != '0'){
|
||||
|
||||
for(let FPD of DraftTelePDvalue){
|
||||
|
||||
this.tempDataTelePD[DraftIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataTelePD[DraftIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let TriggerTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||
if(TriggerTelePDvalue.length != '0'){
|
||||
//console.log('console triggered value',TriggerTelePDvalue);
|
||||
for(let FPD of TriggerTelePDvalue){
|
||||
|
||||
this.tempDataTelePD[TriggedIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataTelePD[TriggedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let AllocatedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'ALLOCATED');
|
||||
if(AllocatedTelePDvalue.length != '0'){
|
||||
for(let FPD of AllocatedTelePDvalue){
|
||||
|
||||
this.tempDataTelePD[AllocatedIndexvalue] = +FPD.count;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.tempDataTelePD[AllocatedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let ScheduledTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'SCHEDULED');
|
||||
if(ScheduledTelePDvalue.length != '0'){
|
||||
for(let FPD of ScheduledTelePDvalue){
|
||||
|
||||
this.tempDataTelePD[ScheduledIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +ScheduledFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataTelePD[ScheduledIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let InProgressTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'INPROGRESS');
|
||||
if(InProgressTelePDvalue.length != '0'){
|
||||
for(let FPD of InProgressTelePDvalue){
|
||||
|
||||
this.tempDataTelePD[InProgressIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +InProgressFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataTelePD[InProgressIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let CompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'COMPLETED');
|
||||
if(CompletedTelePDvalue.length != '0'){
|
||||
for(let FPD of CompletedTelePDvalue){
|
||||
|
||||
this.tempDataTelePD[CompletedIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +CompletedFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataTelePD[CompletedIndexvalue] = 0;
|
||||
}
|
||||
|
||||
let QCCompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == "QC_COMPLETED");
|
||||
if(QCCompletedTelePDvalue.length != '0'){
|
||||
for(let FPD of QCCompletedTelePDvalue){
|
||||
|
||||
this.tempDataTelePD[QCCompletedIndexvalue] = +FPD.count;
|
||||
}
|
||||
//let y = +QCCompletedFullPDvalue.count;
|
||||
|
||||
}
|
||||
else{
|
||||
this.tempDataTelePD[QCCompletedIndexvalue] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
else{
|
||||
this.tempDataFullPD = [0,0,0,0,0,0,0];
|
||||
this.tempDataSmartPD = [0,0,0,0,0,0,0];
|
||||
this.tempDataTelePD = [0,0,0,0,0,0,0];
|
||||
}
|
||||
|
||||
this.doughnutChartDataForFullPD= this.tempDataFullPD;
|
||||
this.doughnutChartDataForSmartPD = this.tempDataSmartPD;
|
||||
this.doughnutChartDataForTelePD = this.tempDataTelePD;
|
||||
this.doughnutChartLabels = this.doughnutChartLabels;
|
||||
this.total1 = this.tempDataFullPD.reduce((a, b) => a + b, 0);
|
||||
this.total2 = this.tempDataSmartPD.reduce((a, b) => a + b, 0);
|
||||
this.total3 = this.tempDataTelePD.reduce((a, b) => a + b, 0);
|
||||
|
||||
this.FullCanvas.chart.update();
|
||||
this.SmartCanvas.chart.update();
|
||||
this.TeleCanvas.chart.update();
|
||||
|
||||
// console.log('Final Full Data '+ this.doughnutChartDataForFullPD+'Temp Data'+this.tempDataFullPD+'Full Total '+this.total1);
|
||||
// console.log('Final Smart Data '+ this.doughnutChartDataForSmartPD+' Temp Data '+this.tempDataSmartPD+'Smart Total '+this.total2);
|
||||
// console.log('Final Tele Data '+ this.doughnutChartDataForTelePD+' Temp Data'+this.tempDataTelePD+'Tele Total '+this.total3);
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="form-bg">
|
||||
|
||||
|
||||
<h3 class="page-title"><img [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 50px;;"> <span> SINEEDGE </span>
|
||||
<h3 class="page-title"><img src="assets/images/PD.jpeg" style="height: 50px;;"> <span> PD Genie </span>
|
||||
</h3>
|
||||
|
||||
<div class="relative error-wrapper">
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="form-bg">
|
||||
<div fxLayout="row" fxLayoutAlign="center" class="pt-2">
|
||||
<!-- <p>SINEEDGE Login Details</p> -->
|
||||
<h3 class="page-title"><img [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 50px;;"> <span> SINEEDGE </span>
|
||||
<h3 class="page-title"><img src="assets/images/PD.jpeg" style="height: 50px;;"> <span> PD Genie </span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
||||
@ -15,7 +15,9 @@
|
||||
<div class="user-pro-wrap">
|
||||
<div class="user-profile-thumb text-center">
|
||||
<div class="user-i">
|
||||
<img [src]="profileurl ||'http://image.ibb.co/mGjZB9/usernew.png'" class="rad-full mb-1" width="100" height="100" alt="">
|
||||
<!-- assets/images/defaultuserimage.png -->
|
||||
<!-- {{profileurl}} -->
|
||||
<img src="{{profileurl}}" class="rad-full mb-1" width="100" height="100" alt="">
|
||||
<div> <span>{{fullName}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -32,6 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<mat-nav-list appAccordion class="navigation relative">
|
||||
|
||||
<mat-list-item appAccordionLink *ngFor="let menuitem of menuItems.getAll() | roleMenuItems:'2'">
|
||||
<a appAccordionToggle class="relative" mat-ripple [routerLink]="['/', menuitem.state]" *ngIf="menuitem.type === 'link'">
|
||||
<mat-icon>{{ menuitem.icon }}</mat-icon>
|
||||
@ -103,10 +106,9 @@
|
||||
</h2> -->
|
||||
<!--<h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> {{userDep}}({{fullName}})</span>
|
||||
</h2>-->
|
||||
<a (click)="menunav('HOME')">
|
||||
<a>
|
||||
<!-- <img [routerLink]="['/dashboard']" [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 35px;;"> <span> {{userDep}} </span> -->
|
||||
<img [routerLink]="['/dashboard']" src="assets/images/PD.jpeg" style="height: 35px;;"> <span> {{userDep}} </span>
|
||||
|
||||
<img (click)="menunav('HOME')" src="assets/images/PD.jpeg" style="height: 35px;;"> <span> {{userDep}} </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -154,7 +156,6 @@
|
||||
</div>
|
||||
<div *ngFor="let menuitem of horizontalMenuItems.getAll()">
|
||||
<div class="dropdown" *ngIf="menuitem.type === 'multi'">
|
||||
<!--{{menuitem | json}}-->
|
||||
<div *ngFor="let childitem of menuitem.children">
|
||||
<button mat-menu-item [routerLink]="['/'+childitem.state ]">{{ childitem.name | translate }}</button>
|
||||
<!--<ul class="dropdown" *ngIf="childitem.type === 'super-sub'">
|
||||
|
||||
@ -21,7 +21,7 @@ import { RoleMenuItemsPipe } from './../role-menu-items.pipe';
|
||||
})
|
||||
export class AdminLayoutComponent implements OnInit, OnDestroy {
|
||||
|
||||
profileurl: any;;
|
||||
profileurl: any;
|
||||
userDep: string;
|
||||
fullName: any;
|
||||
currentUser: any;
|
||||
@ -63,10 +63,9 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
||||
this.fullName = this.currentUser.user_first_name +' '+this.currentUser.user_last_name;
|
||||
//console.log(this.currentUser);
|
||||
if(this.currentUser.fk_entity_type_id == 1 ){
|
||||
this.userDep = "SineEdge";
|
||||
this.userDep = "PD Genie";
|
||||
}else if(this.currentUser.fk_entity_type_id ==2){
|
||||
this.userDep = "Lender";
|
||||
|
||||
}else{
|
||||
this.userDep = "Vendor";
|
||||
}
|
||||
@ -78,9 +77,10 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
||||
this.users.getprofilepic(users).subscribe(res=>{
|
||||
this.profileurl = res;
|
||||
if(this.profileurl.dataStatus == true){
|
||||
|
||||
this.profileurl = this.profileurl.records;
|
||||
|
||||
this.profileurl = this.profileurl.records;
|
||||
}
|
||||
else{
|
||||
this.profileurl = "https://image.ibb.co/mGjZB9/usernew.png";
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -9,15 +9,15 @@ export class RoleMenuItemsPipe implements PipeTransform {
|
||||
// this is for horizontal menu filter
|
||||
if(type=="1"){
|
||||
switch(localStorage.getItem('user_role')){
|
||||
case '1': return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion");
|
||||
case '2': return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion");
|
||||
case '3': return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion");
|
||||
case '4': return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion" && val.state!="reports");
|
||||
case '5': return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion" && val.state!="reports");
|
||||
case '6': return value.filter(val=>val.state!="setting" && val.state!="personal_discussion" && val.state!="reports");
|
||||
case '7': return value.filter(val=>val.state!="setting" && val.state!="personal_discussion" && val.state!="reports");
|
||||
case '8': return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion");
|
||||
case '9': return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion");
|
||||
case '1': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||
case '2': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||
case '3': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||
case '4': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports");
|
||||
case '5': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports");
|
||||
case '6': return value.filter(val=>val.state!="settings" && val.state!="personal_discussion" && val.state!="reports");
|
||||
case '7': return value.filter(val=>val.state!="settings" && val.state!="personal_discussion" && val.state!="reports");
|
||||
case '8': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||
case '9': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||
case '10': return value;
|
||||
// default: return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion");
|
||||
}
|
||||
|
||||
@ -113,10 +113,10 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
lenderShortName:string;
|
||||
/** FOR Dropdowns */
|
||||
selectedLender(lender) {
|
||||
console.log('lender',lender);
|
||||
// console.log('lender',lender);
|
||||
this.lenderBranchList = lender['branches'];
|
||||
this.lenderShortName = lender['short_name'];
|
||||
console.log(this.lenderShortName);
|
||||
// console.log(this.lenderShortName);
|
||||
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
|
||||
|
||||
if(this.lenderShortName == 'CLIX'){
|
||||
@ -137,9 +137,9 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
||||
|
||||
console.log(this.productList);
|
||||
// console.log(this.productList);
|
||||
|
||||
console.log('this.productList',this.productList);
|
||||
// console.log('this.productList',this.productList);
|
||||
this._PDtriggerForm.controls['fk_product_id'].setValue('');
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue('');
|
||||
this._PDtriggerForm.controls['fk_pd_type'].setValue('');
|
||||
@ -203,7 +203,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
//get sub product list based on prokduct id
|
||||
getSubproductList(productID: string) {
|
||||
let productabbr : any;
|
||||
console.log('productID',productID);
|
||||
// console.log('productID',productID);
|
||||
if(productID !== undefined && productID !== null && productID !== '') {
|
||||
this.subProductList = this.productList.filter(item => item.product_id == productID);
|
||||
this.subProductList = this.subProductList[0].subproducts;
|
||||
@ -219,23 +219,23 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this._PDtriggerForm.controls['fk_customer_segment'].setValue('');
|
||||
this._PDtriggerForm.controls['loan_amount'].setValue('');
|
||||
}
|
||||
console.log('productID',productID,productabbr);
|
||||
// console.log('productID',productID,productabbr);
|
||||
/**customer segment */
|
||||
switch(productabbr){
|
||||
case 'BL' :
|
||||
console.log(1);
|
||||
// console.log(1);
|
||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null);
|
||||
this.isSubproductShown = false;
|
||||
break;
|
||||
case 'LAEP':
|
||||
console.log(2);
|
||||
// console.log(2);
|
||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(null);
|
||||
this.isSubproductShown = false;
|
||||
break;
|
||||
default:
|
||||
console.log(3);
|
||||
// console.log(3);
|
||||
this.customerSegmentList = this.customerSegmentAllList;
|
||||
this.isSubproductShown = true;
|
||||
break;
|
||||
@ -517,7 +517,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
// common function for both draft and process pd
|
||||
submitPdDetails(formValue: any, status: string) {
|
||||
console.log('inside the submitPdDetails data');
|
||||
// console.log('inside the submitPdDetails data');
|
||||
if (this._PDtriggerForm.invalid) {
|
||||
this.validateAllFormFields(this._PDtriggerForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
|
||||
@ -187,21 +187,21 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
|
||||
this.searchForm.value.pd_from_date = this.pipe.transform(this.searchForm.value.pd_from_date,'yyyy-MM-dd');
|
||||
this.searchForm.value.pd_to_date = this.pipe.transform(this.searchForm.value.pd_to_date,'yyyy-MM-dd');
|
||||
console.log(JSON.stringify(this.searchForm.value));
|
||||
// console.log(JSON.stringify(this.searchForm.value));
|
||||
this._pd.overAllSearchFormDetails(this.searchForm.value).subscribe(res=>
|
||||
{
|
||||
this.xpandStatus = false;
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab1.data = res['records'];
|
||||
console.log('records',res['records']);
|
||||
// console.log('records',res['records']);
|
||||
this.dataSourceTab1.paginator = this.paginator;
|
||||
}else{
|
||||
this.notifier.notify('warning', 'No Records Found !');
|
||||
this.dataSourceTab1.paginator['length'] = 0;
|
||||
this.dataSourceTab1.paginator['pageIndex'] = 0;
|
||||
this.dataSourceTab1.data = [];
|
||||
console.log('records-records',res['records']);
|
||||
// console.log('records-records',res['records']);
|
||||
}
|
||||
},error => {
|
||||
this.errorMessage.push(error);
|
||||
|
||||
@ -109,17 +109,17 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
filterProductAbbr(param,flag){
|
||||
if(param == 'CLIX'){
|
||||
console.log(this.productAllList);
|
||||
// console.log(this.productAllList);
|
||||
let getProductAbbr = this.productAllList.map(dval => dval.product_abbr);
|
||||
console.log('getProductAbbr',getProductAbbr);
|
||||
// console.log('getProductAbbr',getProductAbbr);
|
||||
let ClixProductAbbr = ['BL','LAEP'];
|
||||
console.log(ClixProductAbbr);
|
||||
// console.log(ClixProductAbbr);
|
||||
let FilteredAbbr: any = [];
|
||||
FilteredAbbr = ClixProductAbbr.map(x => {
|
||||
let findIndex = getProductAbbr.indexOf(x);
|
||||
return this.productAllList[findIndex];
|
||||
});
|
||||
console.log('FilteredAbbr',FilteredAbbr);
|
||||
// console.log('FilteredAbbr',FilteredAbbr);
|
||||
this.productList = FilteredAbbr.length > 0 ? FilteredAbbr : this.productAllList;
|
||||
|
||||
// this.productList = this.productAllList;
|
||||
@ -270,7 +270,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
|
||||
//get sub product list based on prokduct id
|
||||
getSubproductList(productID:string,flag:number){
|
||||
console.log('productID',productID);
|
||||
// console.log('productID',productID);
|
||||
this.customerSegmentList=this.customerSegmentAllList;
|
||||
|
||||
|
||||
@ -286,7 +286,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
// console.log('this.productAbbr',this.productShortName);
|
||||
switch (this.productShortName) {
|
||||
case 'BL':
|
||||
console.log(1);
|
||||
// console.log(1);
|
||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); }
|
||||
this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(null);
|
||||
@ -294,7 +294,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this.isSubproductShown = false;
|
||||
break;
|
||||
case 'LAEP':
|
||||
console.log(2);
|
||||
// console.log(2);
|
||||
this.customerSegmentList = this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(null);
|
||||
if(this.lenderShortName == 'CLIX' && flag==2 ){ this._EditPDtriggerForm.controls['fk_customer_segment'].setValue('5'); }
|
||||
@ -302,9 +302,9 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this.isSubproductShown = false;
|
||||
break;
|
||||
default:
|
||||
console.log(3);
|
||||
// console.log(3);
|
||||
this.customerSegmentList = this.customerSegmentAllList;
|
||||
console.log('productID', productID);
|
||||
// console.log('productID', productID);
|
||||
this.isSubproductShown = true;
|
||||
break;
|
||||
}
|
||||
@ -396,7 +396,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
|
||||
triggerPD(formValue: any, status:any){
|
||||
console.log('functionclicked',formValue, status);
|
||||
// console.log('functionclicked',formValue, status);
|
||||
// this._EditPDtriggerForm.controls['fk_lender_id'].setValidators([Validators.required]);
|
||||
// this._EditPDtriggerForm.controls['fk_lender_id'].updateValueAndValidity();
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
}
|
||||
|
||||
onChange($event: any): void {
|
||||
console.log('onChange');
|
||||
// console.log('onChange');
|
||||
// this.log += new Date() + "<br />";
|
||||
}
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ export class PdReportComponent implements OnInit {
|
||||
export() {
|
||||
this.pdTrigerService.pdReportExportExcel().subscribe((blob: HttpResponse<Blob>) => {
|
||||
if (blob) {
|
||||
console.log(blob);
|
||||
// console.log(blob);
|
||||
let datass = blob.headers.get('content-disposition');
|
||||
let fileName = datass.split(/"/)[1];
|
||||
// this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
@ -278,7 +278,7 @@ export class PdReportComponent implements OnInit {
|
||||
{ type: 'application/vnd.ms-excel' });
|
||||
const file = new File([blobs], fileName,
|
||||
{ type: 'application/vnd.ms-excel' });
|
||||
console.log(file);
|
||||
// console.log(file);
|
||||
importedSaveAs(file);
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
@ -250,7 +250,7 @@ export class AddressComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
else if (AddressDetails == null) {
|
||||
console.log('null');
|
||||
|
||||
return this.fb.group({
|
||||
alternative_address: ['', Validators.compose([Validators.required])],
|
||||
alternative_state: [''],
|
||||
@ -336,7 +336,7 @@ export class AddressComponent implements OnInit {
|
||||
|
||||
// Add and Remove The SpecifyOthers Field
|
||||
setOthers(e, i, flag) {
|
||||
console.log(e,i,flag);
|
||||
|
||||
switch (flag) {
|
||||
case 1:
|
||||
const control = <FormArray>this.addressForm.controls['addresses'];
|
||||
@ -601,12 +601,17 @@ export class AddressComponent implements OnInit {
|
||||
flipVertical: 4,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
imageCrop(pic) {
|
||||
// let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
|
||||
pic.pdid = this.pdid;
|
||||
pic.form_id = this.form_id;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
@ -783,7 +788,7 @@ export class AddressComponent implements OnInit {
|
||||
|
||||
retriveFile(){
|
||||
this._pd.retriveFile(this.pdid, '5', null).subscribe(data => {
|
||||
console.log('',data);
|
||||
|
||||
if (data.status == 200) {
|
||||
if (data.records.length > 0) {
|
||||
data.records.forEach((val, index) => {
|
||||
|
||||
@ -390,6 +390,10 @@ public viewerOptions: any = {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -976,6 +976,10 @@ export class AssetsInfoComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -389,6 +389,10 @@ export class BankingDetailsComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -785,16 +785,16 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
let keyexist = this.addressList.find(ob => ob['key_name'] === i);
|
||||
|
||||
if (keyexist === undefined || keyexist === null && !getList.includes(evt)) {
|
||||
console.log('push on this');
|
||||
// console.log('push on this');
|
||||
this.addressList.push({ key_name: i, value: event, description: findName.address_type + ' At Index ' + i });
|
||||
}
|
||||
else {
|
||||
let Index = getkeyname.indexOf(i);
|
||||
this.addressList[Index] = { key_name: i, value: event, description: findName.address_type + ' At Index ' + i }
|
||||
console.log('update on this => Index', Index);
|
||||
// console.log('update on this => Index', Index);
|
||||
}
|
||||
|
||||
console.log('at Final add or update ', this.addressList);
|
||||
// console.log('at Final add or update ', this.addressList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -804,7 +804,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
if (Index !== -1) {
|
||||
this.addressList.splice(Index, 1);
|
||||
}
|
||||
console.log('at Final remove', this.addressList);
|
||||
// console.log('at Final remove', this.addressList);
|
||||
}
|
||||
|
||||
/** Add More Asset using Flag Both "Other Asset" And "Business Asset" */
|
||||
@ -1151,6 +1151,10 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -430,6 +430,10 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -111,7 +111,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this.generalExistEntityType = this.pd_all_details.business_entity_type;
|
||||
this.generalExistEntityType_other = this.pd_all_details.business_entity_type_other;
|
||||
this.generalExistBusinessYear = this.pd_all_details.business_years;
|
||||
console.log('this.generalExistBusinessYear',this.generalExistBusinessYear);
|
||||
// console.log('this.generalExistBusinessYear',this.generalExistBusinessYear);
|
||||
this.generalExistBusinessMonth = this.pd_all_details.business_month;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
@ -604,7 +604,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
if(data.records.export_import_cert =='yes'){ this.businessForm.addControl('export_import_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('export_import_cert_pic');}
|
||||
if(data.records.fire_noc =='yes'){ this.businessForm.addControl('fire_noc_pic', new FormControl('')); }else{ this.businessForm.removeControl('fire_noc_pic');}
|
||||
this.businessForm.patchValue(businessVal);
|
||||
console.log('this.businessForm',this.businessForm);
|
||||
// console.log('this.businessForm',this.businessForm);
|
||||
} else {
|
||||
//Desgn.push(this.createDesignation());
|
||||
Partnr.push(this.createPartners());
|
||||
@ -1632,7 +1632,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
//validationFlag is greater then 0 means its display the notifer as warning
|
||||
if (validationFlag > 0) {
|
||||
// this.notifier.notify('warning', "Approximate sales doesn't add upto 100%");
|
||||
console.log('validationFlag',validationFlag);
|
||||
// console.log('validationFlag',validationFlag);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1972,6 +1972,10 @@ export class BusinessInfoComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -773,6 +773,10 @@ imageCrop(pic) {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -665,6 +665,10 @@ this.retriveFile();
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
<!-- Buttons -->
|
||||
<!-- <button mat-button color="accent"><mat-icon>zoom_in</mat-icon></button>-->
|
||||
<!-- <button mat-button color="accent"><mat-icon>zoom_out</mat-icon></button> -->
|
||||
<button mat-button class="toolbar-icon" (click)="rotate(1)" class="hover-icon" matTooltip="rotate right" matTooltipPosition="above"><mat-icon>rotate_left</mat-icon></button>
|
||||
<button mat-button class="toolbar-icon" (click)="rotate(2)" class="hover-icon" matTooltip="rotate left" matTooltipPosition="above"><mat-icon>rotate_right</mat-icon></button>
|
||||
<button mat-button class="toolbar-icon" (click)="rotate(1)" class="hover-icon" matTooltip="rotate left" matTooltipPosition="above"><mat-icon>rotate_left</mat-icon></button>
|
||||
<button mat-button class="toolbar-icon" (click)="rotate(2)" class="hover-icon" matTooltip="rotate right" matTooltipPosition="above"><mat-icon>rotate_right</mat-icon></button>
|
||||
<button mat-button class="toolbar-icon" (click)="clickToCrop()" class="hover-icon" matTooltip="Click the Image to Crop" matTooltipPosition="above"><mat-icon>crop</mat-icon></button>
|
||||
<!-- <button mat-button color="accent" class="hover-icon" matTooltip="Click for Image focus " matTooltipPosition="above"><mat-icon>filter_center_focus</mat-icon></button> -->
|
||||
<!-- <button mat-button color="accent" class="hover-icon" matTooltip="Click for Image fit" matTooltipPosition="above">Fit to screen</button>-->
|
||||
@ -34,6 +34,12 @@
|
||||
<br/>
|
||||
<img [src]="cropImage">
|
||||
<br/>
|
||||
<span *ngIf="doc_data.is_show_report !== null">
|
||||
<mat-checkbox color="primary" [checked]='doc_data.is_show_report == "1" ? true : false'
|
||||
(change)="isshownreportforaddress($event.checked)"> Is shown report ?
|
||||
</mat-checkbox>
|
||||
</span>
|
||||
<br/>
|
||||
<button mat-button color="accent" (click)="onSubmit()">Save</button>
|
||||
<button mat-button color="accent" (click)="closeDialogue()">Cancel</button>
|
||||
</div>
|
||||
|
||||
@ -24,17 +24,27 @@ export class ImageCropComponent implements OnInit, OnDestroy {
|
||||
cropflag:boolean = false;
|
||||
isBase64Image:boolean = false;
|
||||
previewflag = false;
|
||||
address_form_id : any; //this one for
|
||||
|
||||
constructor( notifier: NotifierService,
|
||||
private dialogRef: MatDialogRef<ImageCropComponent>,
|
||||
private sanitizer: DomSanitizer,
|
||||
private _pd: PdTrigerService,@Inject(MAT_DIALOG_DATA) public doc_data: any) {
|
||||
console.log(this.doc_data);
|
||||
|
||||
if(this.doc_data.hasOwnProperty('form_id')){
|
||||
var str = this.doc_data.document_name;
|
||||
var splitted = str.split("(", 2);
|
||||
splitted[0] == "Approach to PD Location"
|
||||
? this.address_form_id =this.doc_data.hasOwnProperty('form_id') ? this.doc_data.form_id : 0 : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.notifier = notifier;
|
||||
this._pd.getBase64ImageFromURL(this.doc_data.document).subscribe(base64 => {
|
||||
if (base64.dataStatus) {
|
||||
console.log(base64);
|
||||
console.log('data:image/png;base64,'+base64.records);
|
||||
|
||||
|
||||
this.baseImage = 'data:image/png;base64,'+base64.records;
|
||||
this.isBase64Image = true;
|
||||
}
|
||||
@ -48,8 +58,10 @@ export class ImageCropComponent implements OnInit, OnDestroy {
|
||||
ngOnInit() {
|
||||
// this.baseImage = this.data.document;
|
||||
}
|
||||
|
||||
|
||||
isshownreport : any;
|
||||
isshownreportforaddress(e){
|
||||
this.isshownreport = e === true ? "1" : "0";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -79,17 +91,16 @@ export class ImageCropComponent implements OnInit, OnDestroy {
|
||||
},
|
||||
getCroppedCanvas(datas)
|
||||
{
|
||||
console.log(datas);
|
||||
// console.log(datas);
|
||||
}
|
||||
});
|
||||
console.log(that.cropper);
|
||||
|
||||
}
|
||||
|
||||
crop()
|
||||
{
|
||||
var cropcanvas = $('.container > img').cropper('getCroppedCanvas');
|
||||
var croppng = cropcanvas.toDataURL("image/png") ;
|
||||
console.log('croppedpng',croppng);
|
||||
this.previewflag = true;
|
||||
this.cropImage = croppng;
|
||||
}
|
||||
@ -97,11 +108,12 @@ export class ImageCropComponent implements OnInit, OnDestroy {
|
||||
|
||||
onSubmit(){
|
||||
// // "fk_updatedby":"25",
|
||||
|
||||
let records: any = {
|
||||
"pd_document_id": this.doc_data.document_id,
|
||||
"pd_document_title": this.doc_data.document_title,
|
||||
"pd_document_name": this.doc_data.document_name,
|
||||
"is_show_report":this.doc_data.is_show_report,
|
||||
"is_show_report": this.address_form_id != 0 ? this.isshownreport : this.doc_data.is_show_report,
|
||||
"image": this.cropImage,
|
||||
"fk_pd_id":this.doc_data.pdid
|
||||
};
|
||||
|
||||
@ -585,6 +585,10 @@ export class EmploymentInfoComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -683,6 +683,10 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -648,6 +648,10 @@ export class FinalRemarksComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -104,7 +104,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
let x = this.customer_segment_abbr.split("-");
|
||||
this.CustSegAbbr = x[1];
|
||||
// console.log('this.CustSegAbbr',this.CustSegAbbr);
|
||||
|
||||
}
|
||||
|
||||
//ViewerOption For Docs Display
|
||||
@ -210,9 +210,9 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this.financialForm.addControl('other_reason_for_working_capital_facilities_availed', new FormControl(''));
|
||||
this.financialForm.addControl('reason_for_working_capital_facilities_availed', new FormControl(''));
|
||||
}
|
||||
console.log(val);
|
||||
|
||||
});
|
||||
console.log('check_exist_businees_activity',check_exist_av);
|
||||
|
||||
retriveData.select_working_capital_facilities_availed = check_exist_av;
|
||||
}
|
||||
|
||||
@ -280,7 +280,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
retriveData.fk_createdby = this.pdid;
|
||||
this.financialForm.setValue(retriveData);
|
||||
if(this.ServiceDataAvailability == false && retriveData.unsold_stock_lies_in_days == 'NA'){
|
||||
console.log('Data Required');
|
||||
|
||||
this.financialForm.controls['unsold_stock_lies_in_days'].setValue('');
|
||||
}
|
||||
// this.financialForm.patchValue(retriveData);
|
||||
@ -391,7 +391,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
changeWorkingCapitalFacilities(event: any) {
|
||||
console.log('event',event);
|
||||
|
||||
if (event.value.exist_status == true && event.value.id == 2) {
|
||||
this.financialForm.removeControl('bank_guarantee');
|
||||
}
|
||||
@ -549,7 +549,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
// selectedWorkkingCptl(e){
|
||||
// console.log(e);
|
||||
|
||||
// const workingCptlControl = <FormArray>this.financialForm.controls['select_working_capital_facilities_availed'];
|
||||
// let CtrlLength = workingCptlControl.controls.length;
|
||||
// if (CtrlLength > 0) {
|
||||
@ -1178,9 +1178,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log('val.financial_margin_of_profit',val.financial_margin_of_profit);
|
||||
// console.log('profit_margin',profit_margin);
|
||||
// console.log('childArray.controls.financial_margin_of_loss',childArray.controls.financial_margin_of_loss.value);
|
||||
|
||||
// prev_profit_margin[index] = val.financial_margin_of_profit != '' ? val.financial_margin_of_profit: 0;
|
||||
// prev_loss_margin[index] = val.financial_margin_of_loss !='' ? val.financial_margin_of_loss : 0 ;
|
||||
prev_profit_margin[index] = profit_margin != '' ? profit_margin : 0;
|
||||
@ -1206,21 +1204,14 @@ export class FinancialInfoComponent implements OnInit {
|
||||
if ((profit_margin != '' || loss_margin != '') && index != 0) {
|
||||
|
||||
|
||||
// console.log('temp_prev_losses',prev_loss_margin);
|
||||
// console.log('temp_prev_profits',prev_profit_margin);
|
||||
|
||||
// console.log('curr index',index);
|
||||
|
||||
|
||||
loss_margin = loss_margin !== undefined ? loss_margin : 0;
|
||||
profit_margin = profit_margin !== undefined ? profit_margin:0;
|
||||
let temp_prev_loss_margin = prev_loss_margin[index-1] !== undefined ? prev_loss_margin[index-1] : 0 ;
|
||||
let temp_prev_profit_margin = prev_profit_margin[index-1] !== undefined ? prev_profit_margin[index-1] : 0 ;
|
||||
|
||||
// console.log('profit_margin',profit_margin);
|
||||
// console.log('pre year loss_margin',temp_prev_loss_margin);
|
||||
// console.log('loss_margin',loss_margin);
|
||||
// console.log('pre year profit_margin',temp_prev_profit_margin);
|
||||
|
||||
|
||||
|
||||
if(annual_sale != ''){
|
||||
|
||||
@ -1396,11 +1387,10 @@ export class FinancialInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
// console.log((+estimate_profit_range_to + estimate_profit_range_from));
|
||||
// console.log((estimate_profit_range_to + estimate_profit_range_from)/2);
|
||||
|
||||
// let a = estimate_profit_range_from+estimate_profit_range_to ;
|
||||
// let b = a/2;
|
||||
// console.log(a,b);
|
||||
|
||||
let consi_profit_percent = (+estimate_profit_range_to + +estimate_profit_range_from)/2;
|
||||
let Profit_Average = ((+consi_profit_percent)*(+sales_average))/100;
|
||||
let difference = ((+estimate_profit_range_to) - (+estimate_profit_range_from));
|
||||
@ -1921,11 +1911,11 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// return;
|
||||
// }
|
||||
|
||||
console.log('this.financialForm.value',this.financialForm.value);
|
||||
|
||||
let records = this.financialForm.value;
|
||||
records.select_working_capital_facilities_availed = records.select_working_capital_facilities_availed.filter(value => value.exist_status == 1);
|
||||
records.select_working_capital_facilities_availed = records.select_working_capital_facilities_availed.filter(value => value.exist_status == 1);
|
||||
console.log(records.is_there_working_capital_available);
|
||||
|
||||
if(records.is_there_working_capital_available == "no"){
|
||||
records.select_working_capital_facilities_availed = [];
|
||||
if(records.bank_guarantee) delete records.bank_guarantee ;
|
||||
@ -1937,7 +1927,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
if(records.other_reason_for_working_capital_facilities_availed) delete records.other_reason_for_working_capital_facilities_availed ;
|
||||
if(records.reason_for_working_capital_facilities_availed) delete records.reason_for_working_capital_facilities_availed ;
|
||||
}
|
||||
console.log('records',records);
|
||||
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
if(data.status == 200) {
|
||||
@ -1972,6 +1962,10 @@ export class FinancialInfoComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -200,6 +200,10 @@ export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -243,7 +243,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
if (exist_companyWithRelationships.length > 0) {
|
||||
exist_companyWithRelationships.forEach(element => {
|
||||
//individualsControl.push(this.createIndividulas(element))
|
||||
console.log('elementValue.applicant_name', element);
|
||||
// console.log('elementValue.applicant_name', element);
|
||||
companyWithRelationshipsControl.push(this.createCompaniesRelationshipWithData(element));
|
||||
});
|
||||
}
|
||||
@ -370,7 +370,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
createPersonsWithRelationships(elementValue: any, indexVal: number) {
|
||||
console.log('elementValue.applicant_name', elementValue.applicant_name);
|
||||
// console.log('elementValue.applicant_name', elementValue.applicant_name);
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
|
||||
@ -856,6 +856,10 @@ export class GeneralInfoComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -200,6 +200,10 @@ export class LenderRepresentativeComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -300,7 +300,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.controls['sub_product'].setValue(this.pd_all_details.pdmaster_details.fk_subproduct_id);
|
||||
}
|
||||
if(this.lenderShortName == 'CLIX'){
|
||||
console.log(this.lenderShortName);
|
||||
// console.log(this.lenderShortName);
|
||||
this.loanDetailsForm.controls['is_transfer'].setValue("no");
|
||||
this.selectedBalancesTransferChanges("no")
|
||||
}
|
||||
@ -330,7 +330,7 @@ export class LoanDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
getM_EndUseForLoan(pdid, subproductid) {
|
||||
console.log(pdid, subproductid)
|
||||
// console.log(pdid, subproductid)
|
||||
this._pd.getEndUseForLoan(pdid, subproductid).subscribe(
|
||||
data => {
|
||||
this.m_endUseForLoan = data.records.filter(data => data.isactive == 1);
|
||||
@ -544,10 +544,10 @@ export class LoanDetailsComponent implements OnInit {
|
||||
|
||||
/**For Setting Validations */
|
||||
selectedBalancesTransferChanges(event: any) {
|
||||
console.log(this.lenderShortName);
|
||||
console.log(event);
|
||||
// console.log(this.lenderShortName);
|
||||
// console.log(event);
|
||||
if (event == 'no') {
|
||||
console.log('on 2 time -', event);
|
||||
// console.log('on 2 time -', event);
|
||||
this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
|
||||
this.loanDetailsForm.controls['source'].updateValueAndValidity();
|
||||
|
||||
@ -908,6 +908,10 @@ export class LoanDetailsComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -202,8 +202,8 @@ pdf(fileURL){
|
||||
let stdcodesearch = elementValue.landline.search("-");
|
||||
let stdcode = elementValue.landline.substr(0,stdcodesearch);
|
||||
let landline = elementValue.landline.substr(+stdcodesearch + 1,8);
|
||||
console.log('elementValue.landline',elementValue.landline);
|
||||
console.log('stdcode',stdcode,'landline',landline);
|
||||
// console.log('elementValue.landline',elementValue.landline);
|
||||
// console.log('stdcode',stdcode,'landline',landline);
|
||||
return this._fb.group({
|
||||
reference_name: [elementValue.reference_name != null ?elementValue.reference_name:''],
|
||||
mobile: [elementValue.mobile != null ?elementValue.mobile:'',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
@ -541,6 +541,10 @@ getOtherOrganisationOwner(value,i) {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -328,11 +328,11 @@ export class OtherIncomeComponent implements OnInit {
|
||||
// cancelButtonText:'Cancel And Correct',
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
console.log('rental data status is true',validateFlag);
|
||||
// console.log('rental data status is true',validateFlag);
|
||||
this.saveAPI(records);
|
||||
}
|
||||
else{
|
||||
console.log('rental data status is true',validateFlag);
|
||||
// console.log('rental data status is true',validateFlag);
|
||||
// rentOptionCount = 0;
|
||||
// validateFlag = 0 ;
|
||||
return;
|
||||
@ -342,18 +342,18 @@ export class OtherIncomeComponent implements OnInit {
|
||||
validateFlag = 0 ;
|
||||
}
|
||||
else if(data.dataStatus){
|
||||
console.log('rental data status is true',validateFlag);
|
||||
// console.log('rental data status is true',validateFlag);
|
||||
this.saveAPI(records);
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
console.log('now flag is zero',validateFlag);
|
||||
// console.log('now flag is zero',validateFlag);
|
||||
this.saveAPI(records);
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log('now option is no',validateFlag);
|
||||
// console.log('now option is no',validateFlag);
|
||||
this.saveAPI(records);
|
||||
}
|
||||
}
|
||||
@ -452,6 +452,10 @@ export class OtherIncomeComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -81,8 +81,8 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
this.unitTypeList = this.data.masterData.unitTypeList;
|
||||
this.stateList = this.data.masterData.stateList;
|
||||
this.unitMeasurementList = this.data.masterData.unitMeasurementList;
|
||||
console.log(this.mergeCompanyApplicant);
|
||||
console.log(this.data.masterData.mergeCompanyApplicant);
|
||||
// console.log(this.mergeCompanyApplicant);
|
||||
// console.log(this.data.masterData.mergeCompanyApplicant);
|
||||
|
||||
}
|
||||
|
||||
@ -90,8 +90,8 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
this.initRentalForm();
|
||||
this.getMasterDetails('RELATIONSHIPS', 1);
|
||||
this.getMasterDetails('COMPANYRELATIONSHIPS', 2);
|
||||
console.log(this.mergeCompanyApplicant);
|
||||
console.log(this.data.masterData.mergeCompanyApplicant);
|
||||
// console.log(this.mergeCompanyApplicant);
|
||||
// console.log(this.data.masterData.mergeCompanyApplicant);
|
||||
|
||||
|
||||
//load form details with data
|
||||
@ -255,12 +255,12 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
|
||||
// load form data
|
||||
loadFormData(data){
|
||||
console.log('data',data);
|
||||
// console.log('data',data);
|
||||
if(data){
|
||||
console.log('data.dataStatus',data);
|
||||
// console.log('data.dataStatus',data);
|
||||
// let rentalValue = data.records.filter(data=>data.rental_count_id==id);
|
||||
let rentalVal = data;
|
||||
console.log('rentalVal',rentalVal);
|
||||
// console.log('rentalVal',rentalVal);
|
||||
rentalVal.pdid = this.pdid;
|
||||
rentalVal.formid = this.form_id;
|
||||
|
||||
@ -1041,6 +1041,10 @@ export class ManageRentalVerificationComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -889,6 +889,10 @@ export class StockComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -600,6 +600,10 @@ export class SupplierInfoComponent implements OnInit {
|
||||
pic.pdid = this.pdid;
|
||||
const imageRef = this.dialog.open(ImageCropComponent, {
|
||||
data: pic,
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
});
|
||||
imageRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
|
||||
@ -69,7 +69,7 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
}
|
||||
|
||||
onChange($event: any): void {
|
||||
console.log('onChange');
|
||||
// console.log('onChange');
|
||||
// this.log += new Date() + "<br />";
|
||||
}
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ export class QcPdReportComponent implements OnInit {
|
||||
|
||||
if(getItem !== null){
|
||||
|
||||
console.log('Dat is value');
|
||||
// console.log('Dat is value');
|
||||
|
||||
this.pdTrigerService.setHTMLContent(this.startPD,getItem).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
@ -150,7 +150,7 @@ export class QcPdReportComponent implements OnInit {
|
||||
};
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
console.log(data.records);
|
||||
// console.log(data.records);
|
||||
this.notifier.notify('success', 'Done Successfully..!');
|
||||
this.getPdReportVersionList();
|
||||
} else {
|
||||
@ -224,18 +224,18 @@ export class QcPdReportComponent implements OnInit {
|
||||
getPdReportDetails() {
|
||||
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
console.log('getPdReportDetails',data);
|
||||
// console.log('getPdReportDetails',data);
|
||||
this.pdReportRecords = data.records;
|
||||
this.qcStatus = data.records.pd_status;
|
||||
console.log(this.qcStatus);
|
||||
// console.log(this.qcStatus);
|
||||
this.generateBtn = data.records.is_original_report_created == 1 ? false : true;
|
||||
console.log(this.generateBtn);
|
||||
// console.log(this.generateBtn);
|
||||
this.reGenerateBtn = data.records.is_original_report_created == 1 ? true : false;
|
||||
console.log(this.reGenerateBtn);
|
||||
// console.log(this.reGenerateBtn);
|
||||
}
|
||||
else{
|
||||
this.generateBtn = true;
|
||||
console.log('else',this.generateBtn);
|
||||
// console.log('else',this.generateBtn);
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, err => {
|
||||
@ -363,7 +363,7 @@ export class QcPdReportComponent implements OnInit {
|
||||
export() {
|
||||
this.pdTrigerService.pdReportExportExcel().subscribe((blob: HttpResponse<Blob>) => {
|
||||
if (blob) {
|
||||
console.log(blob);
|
||||
// console.log(blob);
|
||||
let datass = blob.headers.get('content-disposition');
|
||||
let fileName = datass.split(/"/)[1];
|
||||
// this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
@ -371,7 +371,7 @@ export class QcPdReportComponent implements OnInit {
|
||||
{ type: 'application/vnd.ms-excel' });
|
||||
const file = new File([blobs], fileName,
|
||||
{ type: 'application/vnd.ms-excel' });
|
||||
console.log(file);
|
||||
// console.log(file);
|
||||
importedSaveAs(file);
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
@ -242,7 +242,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
|
||||
// start pd
|
||||
getPDStart(pdID:any,childData: any){
|
||||
console.log('pdData',pdID);
|
||||
// console.log('pdData',pdID);
|
||||
// console.log('childData',childData);
|
||||
// return;
|
||||
this.destroyType=3;
|
||||
|
||||
@ -38,40 +38,53 @@ const MENUITEMS : Menu[] = [
|
||||
// type: 'link',
|
||||
// icon: 'explore'
|
||||
// },
|
||||
{
|
||||
state: '',
|
||||
name: 'Manage',
|
||||
type: 'multi',
|
||||
icon: 'settings',
|
||||
multichild: [
|
||||
{
|
||||
state:'setting',
|
||||
name:'Settings',
|
||||
type:'sub',
|
||||
icon:'settings',
|
||||
children:[
|
||||
{state:'users',name:'Users'},
|
||||
{state:'mastermodule',name:'Master Details'},
|
||||
{state:'entity',name:'Entities'},
|
||||
{state:'pdteamlist',name:'PD Team'},
|
||||
// {
|
||||
// state: '',
|
||||
// name: 'Manage',
|
||||
// type: 'multi',
|
||||
// icon: 'settings',
|
||||
// multichild: [
|
||||
// {
|
||||
// state:'setting',
|
||||
// name:'Settings',
|
||||
// type:'sub',
|
||||
// icon:'settings',
|
||||
// children:[
|
||||
// {state:'users',name:'Users'},
|
||||
// {state:'mastermodule',name:'Master Details'},
|
||||
// {state:'entity',name:'Entities'},
|
||||
// {state:'pdteamlist',name:'PD Team'},
|
||||
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
state: 'template',
|
||||
name: 'Template',
|
||||
type: 'sub',
|
||||
icon: 'art_track',
|
||||
children: [
|
||||
{state: 'questions', name: 'Questions'},
|
||||
{state: 'templates', name: 'Templates'}
|
||||
]
|
||||
}
|
||||
]
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// state: 'template',
|
||||
// name: 'Template',
|
||||
// type: 'sub',
|
||||
// icon: 'art_track',
|
||||
// children: [
|
||||
// {state: 'questions', name: 'Questions'},
|
||||
// {state: 'templates', name: 'Templates'}
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
|
||||
// },
|
||||
{
|
||||
state:'setting',
|
||||
name:'Manage',
|
||||
type:'multi',
|
||||
icon:'settings',
|
||||
children:[
|
||||
{state:'setting/users',name:'Users'},
|
||||
{state:'setting/mastermodule',name:'Master Details'},
|
||||
{state:'setting/entity',name:'Entities'},
|
||||
{state:'setting/pdteamlist',name:'PD Team'},
|
||||
// {state:'template/questions', name: 'Questions'},
|
||||
{state:'template/templates', name: 'Templates'},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
state:'personal_discussion',
|
||||
name:'Personal Discussion',
|
||||
|
||||
BIN
ng6-seed/src/favicon.ico
Executable file → Normal file
BIN
ng6-seed/src/favicon.ico
Executable file → Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
BIN
ng6-seed/src/favicon_ssa.ico
Executable file
BIN
ng6-seed/src/favicon_ssa.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 153 KiB |
BIN
ng6-seed/src/favicon_withoutbg.ico
Normal file
BIN
ng6-seed/src/favicon_withoutbg.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@ -9,7 +9,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- <title>Optima - Angular 6 Material Admin Template</title> -->
|
||||
<title> SineEdge </title>
|
||||
<title> PD Genie </title>
|
||||
|
||||
<script>
|
||||
if (global === undefined) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user