FIN FORM ADDED
This commit is contained in:
commit
e2d678d904
41
ng6-seed/package-lock.json
generated
41
ng6-seed/package-lock.json
generated
@ -4273,8 +4273,7 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@ -4295,14 +4294,12 @@
|
|||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@ -4317,20 +4314,17 @@
|
|||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@ -4447,8 +4441,7 @@
|
|||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@ -4460,7 +4453,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@ -4475,7 +4467,6 @@
|
|||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@ -4483,14 +4474,12 @@
|
|||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@ -4509,7 +4498,6 @@
|
|||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@ -4590,8 +4578,7 @@
|
|||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@ -4603,7 +4590,6 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@ -4689,8 +4675,7 @@
|
|||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
@ -4726,7 +4711,6 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@ -4746,7 +4730,6 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@ -4790,14 +4773,12 @@
|
|||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,4 +1,54 @@
|
|||||||
<div class="pad-wrap">
|
<div class="pad-wrap">
|
||||||
|
<!-- doughnut -->
|
||||||
|
<!-- <div fxFlex.gt-sm="33.33" fxFlex.gt-xs="50" fxFlex="100"> -->
|
||||||
|
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
|
||||||
|
<mat-card>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-card-title>{{dashboardTitle}}</mat-card-title>
|
||||||
|
<!-- Full Pd
|
||||||
|
{{doughnutChartDataForFullPD}} Length
|
||||||
|
{{doughnutChartDataForFullPD.length}}
|
||||||
|
Smart Pd
|
||||||
|
{{doughnutChartDataForSmartPD}} Length
|
||||||
|
{{doughnutChartDataForSmartPD.length}}
|
||||||
|
Tele Pd
|
||||||
|
{{doughnutChartDataForTelePD}} Length
|
||||||
|
{{doughnutChartDataForTelePD.length}} -->
|
||||||
|
<mat-card-content>
|
||||||
|
<div fxFlex.gt-sm="33.33" fxFlex.gt-xs="40" fxFlex="90">
|
||||||
|
<div *ngIf="doughnutChartDataForFullPD.length != 0" style="text-align: center"><strong>Full - {{total1}}</strong></div>
|
||||||
|
<!-- <div *ngIf="doughnutChartDataForFullPD" style="text-align: center"><strong>Full</strong></div> -->
|
||||||
|
|
||||||
|
<canvas baseChart class="chart"
|
||||||
|
[data]="doughnutChartDataForFullPD"
|
||||||
|
[labels]="doughnutChartLabels"
|
||||||
|
[options]="doughnutOptionsFullPD"
|
||||||
|
[colors]="doughnutChartColors"
|
||||||
|
[chartType]="doughnutChartType"></canvas>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.gt-sm="33.33" fxFlex.gt-xs="40" fxFlex="90">
|
||||||
|
<div *ngIf="doughnutChartDataForSmartPD.length != 0" style="text-align: center"><strong>Smart - {{total2}}</strong></div>
|
||||||
|
<canvas baseChart class="chart"
|
||||||
|
[data]="doughnutChartDataForSmartPD"
|
||||||
|
[labels]="doughnutChartLabels"
|
||||||
|
[options]="doughnutOptionsSmartPD"
|
||||||
|
[colors]="doughnutChartColors"
|
||||||
|
[chartType]="doughnutChartType"></canvas>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxFlex.gt-sm="33.33" fxFlex.gt-xs="40" fxFlex="90">
|
||||||
|
<div *ngIf="doughnutChartDataForTelePD.length != 0" style="text-align: center"> <strong>Tele - {{total3}}</strong></div>
|
||||||
|
<canvas baseChart class="chart"
|
||||||
|
[data]="doughnutChartDataForTelePD"
|
||||||
|
[labels]="doughnutChartLabels"
|
||||||
|
[options]="doughnutOptionsTelePD"
|
||||||
|
[colors]="doughnutChartColors"
|
||||||
|
[chartType]="doughnutChartType"></canvas>
|
||||||
|
</div>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
<!--<div fxLayout="row wrap">
|
<!--<div fxLayout="row wrap">
|
||||||
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
|
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
@ -13,7 +63,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxFlex="77%">
|
<div fxFlex="77%">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
@ -38,20 +88,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
<div fxFlex="23%" fxLayout="row wrap">
|
<div fxLayout="row">
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-title><span fxFlex="80">Alert</span> <span fxFlex="20"><mat-icon> warning</mat-icon></span></mat-card-title>
|
<mat-card-title><span fxFlex="80">Alert</span> <span fxFlex="20"><mat-icon> warning</mat-icon></span></mat-card-title>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-list>
|
<mat-list>
|
||||||
<ng-template let-item let-last="last" ngFor [ngForOf]="message">
|
<ng-template let-item let-last="last" ngFor [ngForOf]="message">
|
||||||
|
<!-- <ng-template *ngFor="let item of message" > -->
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<!--<img mat-list-avatar src="{{item.photo}}" alt="">-->
|
<!--<img mat-list-avatar src="{{item.photo}}" alt="">-->
|
||||||
<h3 mat-line> {{item.applicantname}} </h3>
|
<!--<h3 mat-line> {{item.applicantname}} </h3>
|
||||||
<p mat-line> {{item.applicantid}}</p>
|
<p mat-line> {{item.applicantid}}</p>
|
||||||
<p mat-line> {{item.lendername}} - {{item.status}} </p>
|
<p mat-line> {{item.lendername}} - {{item.status}} </p> -->
|
||||||
|
<h3 mat-line> {{item.applicant_name}} </h3>
|
||||||
|
<p mat-line> {{item.lender_applicant_id}}</p>
|
||||||
|
<p mat-line> {{item.entity_name}} - {{item.pd_status}} </p>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
@ -59,38 +114,54 @@
|
|||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- <div fxFlex="100"> -->
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-title>Lenderwise</mat-card-title>
|
<mat-card-title>Lenderwise</mat-card-title>
|
||||||
|
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-list>
|
<mat-list>
|
||||||
|
<!-- {{lenderpd}} -->
|
||||||
<ng-template let-item let-last="last" ngFor [ngForOf]="lenderpd">
|
<ng-template let-item let-last="last" ngFor [ngForOf]="lenderpd">
|
||||||
|
<!-- <ng-template *ngFor="let item of lenderpd" > -->
|
||||||
|
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<h3 mat-line> {{item.lendername}} / {{item.billingaddr}} </h3>
|
<h3 mat-line>{{item.full_name}} / {{item.city_name}} </h3>
|
||||||
<p mat-line> Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}} </p>
|
<p mat-line> {{item.PDTYPE}} -{{item.count}} </p>
|
||||||
|
<!-- <p mat-line>
|
||||||
|
<div *ngIf="item.PDTYPE == FULL" > {{item.PDTYPE}} -{{item.count}} </div>
|
||||||
|
<div *ngIf="item.PDTYPE == SMART" > {{item.PDTYPE}} -{{item.count}} </div>
|
||||||
|
<div *ngIf="item.PDTYPE == TELE" > {{item.PDTYPE}} -{{item.count}} </div> -->
|
||||||
|
|
||||||
|
<!-- <h3 mat-line> {{item.lendername}} / {{item.billingaddr}} </h3>
|
||||||
|
<p mat-line> Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}} </p> -->
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div fxFlex="100"> -->
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-title>CityWise</mat-card-title>
|
<mat-card-title>CityWise</mat-card-title>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-list>
|
<mat-list>
|
||||||
|
|
||||||
<ng-template let-item let-last="last" ngFor [ngForOf]="citywisepd">
|
<ng-template let-item let-last="last" ngFor [ngForOf]="citywisepd">
|
||||||
|
<!-- <ng-template *ngFor="let item of citywisepd" > -->
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<h3 mat-line> {{item.cityname}} </h3>
|
<h3 mat-line> {{item.city_name}} </h3>
|
||||||
<p mat-line> Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}}</p>
|
<!-- <h3 mat-line> item </h3> -->
|
||||||
|
<p mat-line> {{item.PDTYPE}} -{{item.count}}
|
||||||
|
<!-- <div *ngIf="item.PDTYPE == FULL" >{{item.PDTYPE}} -{{item.count}} </div> -->
|
||||||
|
<!-- <div *ngIf="item.PDTYPE == SMART"> {{item.PDTYPE}} -{{item.count}} </div>
|
||||||
|
<div *ngIf="item.PDTYPE == TELE"> {{item.PDTYPE}} -{{item.count}} </div> -->
|
||||||
|
</p>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,10 @@
|
|||||||
import { Component } from '@angular/core';
|
//import { Component } from '@angular/core';
|
||||||
|
import {Component, NgModule, ElementRef, Inject, ViewChild} from '@angular/core'
|
||||||
|
import {BrowserModule} from '@angular/platform-browser'
|
||||||
|
import {ChartsModule, Color} from 'ng2-charts';
|
||||||
|
//import { MastersService } from './../service/masters/masters.service'
|
||||||
|
import { DashboardService } from './dashboard.service';
|
||||||
|
import { BaseChartDirective } from 'ng2-charts/ng2-charts';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dashboard',
|
selector: 'app-dashboard',
|
||||||
@ -8,195 +14,564 @@ import { Component } from '@angular/core';
|
|||||||
|
|
||||||
|
|
||||||
export class DashboardComponent {
|
export class DashboardComponent {
|
||||||
|
dashboardTitle = 'Monthly Status';
|
||||||
|
|
||||||
public showXAxis = true;
|
@ViewChild('mycanvas')
|
||||||
public showYAxis = true;
|
doughnutChartDataForFullPD:any[]=[];
|
||||||
public gradient = true;
|
doughnutChartDataForSmartPD:any[]=[];
|
||||||
public showLegend = false;
|
doughnutChartDataForTelePD:any[]=[];
|
||||||
public showXAxisLabel = true;
|
TempDataFullPD :number[]=[];
|
||||||
public xAxisLabel = 'Status';
|
TempDataSmartPD :number[]=[];
|
||||||
public showYAxisLabel = true;
|
TempDataTelePD :number[]=[];
|
||||||
public yAxisLabel = 'PD';
|
total1: number = 0;
|
||||||
view: any[];
|
total2: number = 0;
|
||||||
width =900;
|
total3: number = 0;
|
||||||
height= 250;
|
doughnutChartName:any;
|
||||||
public colorScheme = {
|
citywisepd : any[];
|
||||||
domain: ['#673ab7', '#f44336', '#009688 ', '#2196f3', '#234278 ', '#2a1653']
|
lenderpd :any[];
|
||||||
|
message : any[];
|
||||||
|
Status = false;
|
||||||
|
|
||||||
|
// globalChartOptionsFullPD: any = {
|
||||||
|
// responsive: false,
|
||||||
|
// legend: {
|
||||||
|
// display: false,
|
||||||
|
// position: 'bottom'
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// globalChartOptionsSmartPD: any = {
|
||||||
|
// responsive: false,
|
||||||
|
// legend: {
|
||||||
|
// display: false,
|
||||||
|
// position: 'bottom'
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
globalChartOptions: any = {
|
||||||
|
responsive: false,
|
||||||
|
legend: {
|
||||||
|
display: true,
|
||||||
|
position: 'bottom'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
public autoScale = true;
|
|
||||||
constructor() {
|
TodayFullPD:any = [];
|
||||||
|
MonthlyFullPD:any = [];
|
||||||
|
|
||||||
|
constructor(private _dashboardService: DashboardService) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Doughnut
|
||||||
|
//name: "DoughnutTextInside"
|
||||||
|
|
||||||
ngOnInit(){
|
ngOnInit(){
|
||||||
this.view = [this.width, this.height];
|
|
||||||
|
this.GetData();
|
||||||
|
this.getDoNUT();
|
||||||
|
|
||||||
}
|
}
|
||||||
//pie chart
|
|
||||||
single: Object[] = [
|
|
||||||
{
|
|
||||||
name: 'Germany',
|
|
||||||
value: 40632
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'USA',
|
|
||||||
value: 49737
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'France',
|
|
||||||
value: 36745
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'UK',
|
|
||||||
value: 36240
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Spain',
|
|
||||||
value: 33000
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Italy',
|
|
||||||
value: 35800
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
//Full Pd Data
|
GetData(){
|
||||||
full: Object[] = [
|
this._dashboardService.getLenderDetail().subscribe(data => {
|
||||||
{
|
//console.log('Lender');console.log(data);
|
||||||
name: 'Triggered',
|
this.TodayFullPD = data.records;
|
||||||
value: 45
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Allocated',
|
|
||||||
value: 50
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Scheduled',
|
|
||||||
value: 36
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'InProgress',
|
|
||||||
value: 90
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Completed',
|
|
||||||
value: 56
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'QC Completed',
|
|
||||||
value: 81
|
|
||||||
}
|
|
||||||
];
|
|
||||||
//smart PD data
|
|
||||||
smart: Object[] = [
|
|
||||||
{
|
|
||||||
name: 'Triggered',
|
|
||||||
value: 65
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Allocated',
|
|
||||||
value: 20
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Scheduled',
|
|
||||||
value: 80
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'InProgress',
|
|
||||||
value: 60
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Completed',
|
|
||||||
value: 26
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'QC Completed',
|
|
||||||
value: 51
|
|
||||||
}
|
|
||||||
];
|
|
||||||
//Tele PD Data
|
|
||||||
tele: Object[] = [
|
|
||||||
{
|
|
||||||
name: 'Triggered',
|
|
||||||
value: 95
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Allocated',
|
|
||||||
value: 59
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Scheduled',
|
|
||||||
value: 45
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'InProgress',
|
|
||||||
value: 25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Completed',
|
|
||||||
value: 36
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'QC Completed',
|
|
||||||
value: 49
|
|
||||||
}
|
|
||||||
];
|
|
||||||
// //Lender wise PD Triggered
|
|
||||||
lenderpd: Object[] = [{
|
|
||||||
lendername:'ICICI',
|
|
||||||
billingaddr:'Bangalore',
|
|
||||||
fullpd:'19',
|
|
||||||
smartpd:'6',
|
|
||||||
telepd:'10',
|
|
||||||
}, {
|
|
||||||
lendername:'IOB',
|
|
||||||
billingaddr:'Chennai',
|
|
||||||
fullpd:'10',
|
|
||||||
smartpd:'5',
|
|
||||||
telepd:'7',
|
|
||||||
}, {
|
|
||||||
lendername:'SBI',
|
|
||||||
billingaddr:'Pune',
|
|
||||||
fullpd:'16',
|
|
||||||
smartpd:'3',
|
|
||||||
telepd:'33',
|
|
||||||
}, ];
|
|
||||||
|
|
||||||
|
// console.log(this.TodayFullPD);
|
||||||
|
// console.log(this.TodayFullPD.current_day);
|
||||||
|
// console.log(this.TodayFullPD.current_week);
|
||||||
|
// console.log(this.TodayFullPD.current_month);
|
||||||
|
if(this.TodayFullPD.current_day.length != '0'){
|
||||||
|
//console.log('If Condition day');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//console.log('Else Condition day');
|
||||||
|
}
|
||||||
|
|
||||||
//City Wise PD Triggered
|
if(this.TodayFullPD.current_week.length != '0'){
|
||||||
citywisepd: Object[] = [{
|
//console.log('If Condition week');
|
||||||
cityname: 'Bangalore',
|
}
|
||||||
fullpd:'45',
|
else{
|
||||||
smartpd:'17',
|
//console.log('Else Condition week');
|
||||||
telepd:'10',
|
}
|
||||||
}, {
|
|
||||||
cityname: 'Chennai',
|
if(this.TodayFullPD.current_month.length != '0'){
|
||||||
fullpd:'33',
|
this.lenderpd = this.TodayFullPD.current_month;
|
||||||
smartpd:'16',
|
console.log('******************** lender');
|
||||||
telepd:'8',
|
console.log(this.lenderpd);
|
||||||
}, {
|
|
||||||
cityname: 'Salem',
|
// for(let contact of this.TodayFullPD.current_month) {
|
||||||
fullpd:'22',
|
// let message = contact;
|
||||||
smartpd:'12',
|
// }
|
||||||
telepd:'2',
|
|
||||||
} ];
|
}
|
||||||
|
else{
|
||||||
|
//console.log('Else Condition month');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this._dashboardService.getAlertDetail().subscribe(data => {
|
||||||
|
console.log('Alert*********************************');console.log(data);
|
||||||
|
this.message = data.records;
|
||||||
|
console.log(this.message);
|
||||||
|
});
|
||||||
|
this._dashboardService.getCityDetail().subscribe(data => {console.log('City');console.log(data);
|
||||||
|
this.TodayFullPD = data.records;
|
||||||
|
|
||||||
|
// console.log(this.TodayFullPD);
|
||||||
|
// console.log(this.TodayFullPD.current_day);
|
||||||
|
// console.log(this.TodayFullPD.current_week);
|
||||||
|
// console.log(this.TodayFullPD.current_month);
|
||||||
|
console.log('Whole',this.TodayFullPD);
|
||||||
|
console.log('Today only',this.TodayFullPD.current_day);
|
||||||
|
console.log('This week',this.TodayFullPD.current_week);
|
||||||
|
console.log('This month',this.TodayFullPD.current_month);
|
||||||
|
if(this.TodayFullPD.current_day.length != '0'){
|
||||||
|
//console.log('If Condition day');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//console.log('Else Condition day');
|
||||||
|
}
|
||||||
|
if(this.TodayFullPD.current_week.length != '0'){
|
||||||
|
//console.log('If Condition week');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//console.log('Else Condition week');
|
||||||
|
}
|
||||||
|
if(this.TodayFullPD.current_month.length != '0'){
|
||||||
|
this.citywisepd = this.TodayFullPD.current_month;
|
||||||
|
//console.log('citywisepd');
|
||||||
|
//console.log(this.citywisepd);
|
||||||
|
//for(let contact of this.TodayFullPD.current_month) {
|
||||||
|
// let message = contact;
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//console.log('Else Condition month');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getDoNUT(){
|
||||||
|
this._dashboardService.getPDDetailForDoughnut().subscribe(data => {
|
||||||
|
this.MonthlyFullPD = data.records;
|
||||||
|
|
||||||
|
console.log('whole',this.MonthlyFullPD);
|
||||||
|
console.log('Today',this.MonthlyFullPD.current_day);
|
||||||
|
console.log('week',this.MonthlyFullPD.current_week);
|
||||||
|
console.log('month',this.MonthlyFullPD.current_month);
|
||||||
|
if(this.MonthlyFullPD.current_day.length != '0'){
|
||||||
|
//console.log('If Condition day');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//console.log('Else Condition day');
|
||||||
|
}
|
||||||
|
if(this.MonthlyFullPD.current_week.length != '0'){
|
||||||
|
//console.log('If Condition week');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//console.log('Else Condition week');
|
||||||
|
}
|
||||||
|
if(this.MonthlyFullPD.current_month.length != '0'){
|
||||||
|
//console.log('If Condition monthLY');
|
||||||
|
//this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
|
||||||
|
let Monthly = this.MonthlyFullPD.current_month;
|
||||||
|
let MonthlyFullPDArr = Monthly.filter(arr=>arr.PDTYPE == 'FULL' );
|
||||||
|
let MonthlySmartPDArr = Monthly.filter(arr=>arr.PDTYPE == 'SMART' );
|
||||||
|
let MonthlyTelePDArr = Monthly.filter(arr=>arr.PDTYPE == 'TELE' );
|
||||||
|
|
||||||
|
|
||||||
|
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');
|
||||||
|
|
||||||
|
let TriggerFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||||
|
if(TriggerFullPDvalue.length != '0'){
|
||||||
|
//console.log('console triggered value',TriggerFullPDvalue);
|
||||||
|
for(let FPD of TriggerFullPDvalue){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total1 = this.total1+y;
|
||||||
|
this.TempDataFullPD[TriggedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataFullPD[TriggedIndexvalue] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
let AllocatedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'ALLOCATED');
|
||||||
|
if(AllocatedFullPDvalue.length != '0'){
|
||||||
|
for(let FPD of AllocatedFullPDvalue){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total1 = this.total1+y;
|
||||||
|
this.TempDataFullPD[AllocatedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataFullPD[AllocatedIndexvalue] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
let ScheduledFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'SCHEDULED');
|
||||||
|
if(ScheduledFullPDvalue.length != '0'){
|
||||||
|
for(let FPD of ScheduledFullPDvalue){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total1 = this.total1+y;
|
||||||
|
this.TempDataFullPD[ScheduledIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total1 = this.total1+y;
|
||||||
|
this.TempDataFullPD[InProgressIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total1 = this.total1+y;
|
||||||
|
this.TempDataFullPD[CompletedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total1 = this.total1+y;
|
||||||
|
this.TempDataFullPD[QCCompletedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//let y = +QCCompletedFullPDvalue.count;
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataFullPD[QCCompletedIndexvalue] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
let TriggerSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'TRIGGERED');
|
||||||
|
if(TriggerSmartPDvalue.length != '0'){
|
||||||
|
|
||||||
|
for(let FPD of TriggerSmartPDvalue){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total2 = this.total2+y;
|
||||||
|
this.TempDataSmartPD[TriggedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataSmartPD[TriggedIndexvalue] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
let AllocatedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'ALLOCATED');
|
||||||
|
if(AllocatedSmartPDvalue.length != '0'){
|
||||||
|
for(let FPD of AllocatedSmartPDvalue){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total2 = this.total2+y;
|
||||||
|
this.TempDataSmartPD[AllocatedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataSmartPD[AllocatedIndexvalue] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
let ScheduledSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'SCHEDULED');
|
||||||
|
if(ScheduledSmartPDvalue.length != '0'){
|
||||||
|
for(let FPD of ScheduledSmartPDvalue){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total2 = this.total2+y;
|
||||||
|
this.TempDataSmartPD[ScheduledIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total2 = this.total2+y;
|
||||||
|
this.TempDataSmartPD[InProgressIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total2 = this.total2+y;
|
||||||
|
this.TempDataSmartPD[CompletedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total2 = this.total2+y;
|
||||||
|
this.TempDataSmartPD[QCCompletedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//let y = +QCCompletedFullPDvalue.count;
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataSmartPD[QCCompletedIndexvalue] = 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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total3 = this.total3+y;
|
||||||
|
this.TempDataTelePD[TriggedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataTelePD[TriggedIndexvalue] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
let AllocatedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'ALLOCATED');
|
||||||
|
if(AllocatedTelePDvalue.length != '0'){
|
||||||
|
for(let FPD of AllocatedTelePDvalue){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total3 = this.total3+y;
|
||||||
|
this.TempDataTelePD[AllocatedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataTelePD[AllocatedIndexvalue] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
let ScheduledTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'SCHEDULED');
|
||||||
|
if(ScheduledTelePDvalue.length != '0'){
|
||||||
|
for(let FPD of ScheduledTelePDvalue){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total3 = this.total3+y;
|
||||||
|
this.TempDataTelePD[ScheduledIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total3 = this.total3+y;
|
||||||
|
this.TempDataTelePD[InProgressIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total3 = this.total3+y;
|
||||||
|
this.TempDataTelePD[CompletedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//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){
|
||||||
|
let y = +FPD.count;
|
||||||
|
this.total3 = this.total3+y;
|
||||||
|
this.TempDataTelePD[QCCompletedIndexvalue] = y;
|
||||||
|
}
|
||||||
|
//let y = +QCCompletedFullPDvalue.count;
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.TempDataTelePD[QCCompletedIndexvalue] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// y: number
|
||||||
|
|
||||||
|
//console.log(MonthlyFullPDArr.pd_status);
|
||||||
|
// for(let FPD of MonthlyFullPDArr){
|
||||||
|
|
||||||
|
// if(FPD.pd_status == 'TRIGGERED'){
|
||||||
|
// console.log('PD Status');
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('Triggered');
|
||||||
|
// let y = +FPD.count; // y: number
|
||||||
|
// console.log('Initial',this.TempDataFullPD);
|
||||||
|
// this.TempDataFullPD[Indexvalue] = y;
|
||||||
|
// console.log(this.TempDataFullPD);
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('Triggered');
|
||||||
|
// this.TempDataFullPD[Indexvalue] = 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // if(contact.pd_status == 'TRIGGERED' && contact.PDTYPE == 'FULL'){
|
||||||
|
// // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered');
|
||||||
|
// // var y = +contact.count; // y: number
|
||||||
|
// // console.log('Initial',this.TempDataFullPD);
|
||||||
|
// // this.TempDataFullPD[Indexvalue] = y;
|
||||||
|
// // console.log(this.TempDataFullPD);
|
||||||
|
// // }
|
||||||
|
// // else{
|
||||||
|
// // let Indexvalue = this.doughnutChartLabels.indexOf('Triggered');
|
||||||
|
// // this.TempDataFullPD[Indexvalue] = 0;
|
||||||
|
|
||||||
|
// // }
|
||||||
|
// if(FPD.pd_status == 'ALLOCATED'){
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('Allocated');
|
||||||
|
// var y = +FPD.count; // y: number
|
||||||
|
// // console.log(this.TempDataFullPD);
|
||||||
|
// this.TempDataFullPD[Indexvalue] = y;
|
||||||
|
// //console.log('allocated b4',TempDataFullPD);
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('Allocated');
|
||||||
|
// this.TempDataFullPD[Indexvalue] = 0;
|
||||||
|
// }
|
||||||
|
// if(FPD.pd_status == 'INPROGRESS'){
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('InProgress');
|
||||||
|
// var y = +FPD.count; // y: number
|
||||||
|
// this.TempDataFullPD[Indexvalue] = y;
|
||||||
|
// //console.log('b4',TempDataFullPD);
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('InProgress');
|
||||||
|
// this.TempDataFullPD[Indexvalue] = 0;
|
||||||
|
// }
|
||||||
|
// if(FPD.pd_status == 'SCHEDULED'){
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('Scheduled');
|
||||||
|
// var y = +FPD.count; // y: number
|
||||||
|
// this.TempDataFullPD[Indexvalue] = y;
|
||||||
|
// //console.log('b4',TempDataFullPD);
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('Scheduled');
|
||||||
|
// this.TempDataFullPD[Indexvalue] = 0;
|
||||||
|
// //console.log('d',TempDataFullPD);
|
||||||
|
// }
|
||||||
|
// if(FPD.pd_status == 'COMPLETED'){
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('Completed');
|
||||||
|
// var y = +FPD.count; // y: number
|
||||||
|
// this.TempDataFullPD[Indexvalue] = y;
|
||||||
|
// //console.log('allocated',TempDataFullPD);
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('Completed');
|
||||||
|
// this.TempDataFullPD[Indexvalue] = 0;
|
||||||
|
// }
|
||||||
|
// //return TempDataFullPD;
|
||||||
|
|
||||||
|
// if(FPD.pd_status == 'QC COMPLETED'){
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('QC Completed');
|
||||||
|
// var y = +FPD.count; // y: number
|
||||||
|
// this.TempDataFullPD[Indexvalue] = y;
|
||||||
|
// //console.log('allocated',TempDataFullPD);
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// let Indexvalue = this.doughnutChartLabels.indexOf('QC Completed');
|
||||||
|
// this.TempDataFullPD[Indexvalue] = 0;
|
||||||
|
// //console.log('Final Data',TempDataFullPD);
|
||||||
|
// }
|
||||||
|
// //console.log('inside',this.TempDataFullPD);
|
||||||
|
// }
|
||||||
|
//this.doughnutChartDataForFullPD = [3,4,5,6,7,8];
|
||||||
|
}
|
||||||
|
|
||||||
|
else{
|
||||||
|
//console.log('Else Condition month');
|
||||||
|
}
|
||||||
|
this.doughnutChartDataForFullPD = this.TempDataFullPD;
|
||||||
|
this.doughnutChartDataForSmartPD = this.TempDataSmartPD;
|
||||||
|
this.doughnutChartDataForTelePD = this.TempDataTelePD;
|
||||||
|
|
||||||
|
console.log('Final full Data Completed',this.doughnutChartDataForFullPD);
|
||||||
|
console.log('Temp full Data',this.TempDataFullPD);
|
||||||
|
console.log('Final Smart Data Completed',this.doughnutChartDataForSmartPD);
|
||||||
|
console.log('Temp Smart Data',this.TempDataSmartPD);
|
||||||
|
console.log('Final Tele Data Completed',this.doughnutChartDataForTelePD);
|
||||||
|
console.log('Temp Tele Data',this.TempDataTelePD);
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.datasets = [{
|
||||||
|
// data: [12, 19, 3, 5, 2, 3]
|
||||||
|
// }];
|
||||||
|
// }, 100);
|
||||||
|
|
||||||
|
doughnutChartColors: any[] = [{
|
||||||
|
backgroundColor: ['#f44336', '#3f51b5', '#ffeb3b', '#4caf50', '#2196f3','#673ab7']
|
||||||
|
}];
|
||||||
|
|
||||||
|
doughnutChartType = 'doughnut';
|
||||||
|
doughnutChartLabels: string[] = ['Triggered', 'Allocated','Scheduled','InProgress','Completed','QC Completed'];
|
||||||
|
doughnutOptionsFullPD: any = Object.assign({
|
||||||
|
elements: {
|
||||||
|
arc: {
|
||||||
|
borderWidth: 0.2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, this.globalChartOptions);
|
||||||
|
|
||||||
|
doughnutOptionsSmartPD: any = Object.assign({
|
||||||
|
elements: {
|
||||||
|
arc: {
|
||||||
|
borderWidth: 0.2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, this.globalChartOptions);
|
||||||
|
|
||||||
|
doughnutOptionsTelePD: any = Object.assign({
|
||||||
|
elements: {
|
||||||
|
arc: {
|
||||||
|
borderWidth: 0.2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, this.globalChartOptions);
|
||||||
|
|
||||||
|
chartfunction(){ this.Status = true; }
|
||||||
|
|
||||||
// //Same status
|
|
||||||
message: Object[] = [{
|
|
||||||
applicantname: 'Saravana',
|
|
||||||
applicantid:'ICICITN0118000354',
|
|
||||||
lendername:'ICICI',
|
|
||||||
status:'Allocated',
|
|
||||||
photo: 'assets/images/face3.jpg',
|
|
||||||
}, {
|
|
||||||
applicantname: 'Kumaran',
|
|
||||||
applicantid:'IOBKA0418000578',
|
|
||||||
lendername:'IOB',
|
|
||||||
status:'Allocated',
|
|
||||||
photo: 'assets/images/face6.jpg',
|
|
||||||
}, {
|
|
||||||
applicantname: 'Priya',
|
|
||||||
applicantid:'SBIGA0118000241',
|
|
||||||
lendername:'SBI',
|
|
||||||
status:'Triggered',
|
|
||||||
photo: 'assets/images/face4.jpg',
|
|
||||||
} ];
|
|
||||||
}
|
}
|
||||||
@ -11,6 +11,9 @@ import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
|||||||
import { DashboardComponent } from './dashboard.component';
|
import { DashboardComponent } from './dashboard.component';
|
||||||
import { DashboardRoutes } from './dashboard.routing';
|
import { DashboardRoutes } from './dashboard.routing';
|
||||||
|
|
||||||
|
/** Dashboard Service */
|
||||||
|
import { DashboardService } from './dashboard.service';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@ -27,6 +30,7 @@ import { DashboardRoutes } from './dashboard.routing';
|
|||||||
NgxDatatableModule,
|
NgxDatatableModule,
|
||||||
FlexLayoutModule
|
FlexLayoutModule
|
||||||
],
|
],
|
||||||
|
providers: [ DashboardService ],
|
||||||
declarations: [ DashboardComponent ]
|
declarations: [ DashboardComponent ]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
12
ng6-seed/src/app/dashboard/dashboard.service.spec.ts
Normal file
12
ng6-seed/src/app/dashboard/dashboard.service.spec.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { DashboardService } from './dashboard.service';
|
||||||
|
|
||||||
|
describe('DashboardService', () => {
|
||||||
|
beforeEach(() => TestBed.configureTestingModule({}));
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
const service: DashboardService = TestBed.get(DashboardService);
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
87
ng6-seed/src/app/dashboard/dashboard.service.ts
Normal file
87
ng6-seed/src/app/dashboard/dashboard.service.ts
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/** Common Import Section */
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Observable } from 'rxjs';//for Datatables
|
||||||
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
import { catchError } from 'rxjs/operators';
|
||||||
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
|
/** Imported Service Files Are., */
|
||||||
|
import { AwsService } from '../AwsService/aws.service';
|
||||||
|
/** Environment */
|
||||||
|
import { environment } from 'environments/environment';
|
||||||
|
|
||||||
|
|
||||||
|
/** Consant Value For Created Date And Updated Date */
|
||||||
|
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
|
||||||
|
export class DashboardService {
|
||||||
|
|
||||||
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
|
||||||
|
|
||||||
|
constructor(private _http: HttpClient,
|
||||||
|
private _aws:AwsService) { }
|
||||||
|
|
||||||
|
// $route['getDashBoardMaster']
|
||||||
|
// $route['getDashBoardLenderCity']
|
||||||
|
// $route['getDashBoardDetailsOfCity']
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TO Get the M Datas using API Call
|
||||||
|
* 1st argument is "TableName" :string - Table Name
|
||||||
|
*/
|
||||||
|
// getAllMasterData(TableName:string): Observable<any> {
|
||||||
|
// return this._http.post<any>(this.apiUrl+"getListOfMaster", { "master_name":TableName })
|
||||||
|
// .pipe(
|
||||||
|
// catchError(this.handleError('role', []))
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TO get PD Datas For Dashboard Screen
|
||||||
|
*/
|
||||||
|
getPDDetailForDoughnut(): Observable<any> {
|
||||||
|
return this._http.get(this.apiUrl+'getDashBoardMaster')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getLenderDetail(): Observable<any> {
|
||||||
|
return this._http.get(this.apiUrl+'getDashBoardLenderCity')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getCityDetail(): Observable<any> {
|
||||||
|
return this._http.get(this.apiUrl+'getDashBoardDetailsOfCity')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getAlertDetail(): Observable<any> {
|
||||||
|
return this._http.get(this.apiUrl+'getDashBoardAlertDetails')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TO Handle The Error
|
||||||
|
*/
|
||||||
|
private handleError<T>(operation = 'operation', result?: T) {
|
||||||
|
|
||||||
|
return (error: any): Observable<T> => {
|
||||||
|
return of(result as T);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -54,9 +54,9 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
this.currentUser = this.currentUser.records[0];
|
this.currentUser = this.currentUser.records[0];
|
||||||
this.fullName = this.currentUser.user_first_name +' '+this.currentUser.user_last_name;
|
this.fullName = this.currentUser.user_first_name +' '+this.currentUser.user_last_name;
|
||||||
//console.log(this.currentUser);
|
//console.log(this.currentUser);
|
||||||
if(this.currentUser.fk_entity_id == 1 ){
|
if(this.currentUser.fk_entity_type_id == 1 ){
|
||||||
this.userDep = "SineEdge";
|
this.userDep = "SineEdge";
|
||||||
}else if(this.currentUser.fk_entity_id ==2){
|
}else if(this.currentUser.fk_entity_type_id ==2){
|
||||||
this.userDep = "Lender";
|
this.userDep = "Lender";
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
|||||||
styleUrls: ['./pd-allocation.component.scss']
|
styleUrls: ['./pd-allocation.component.scss']
|
||||||
})
|
})
|
||||||
export class PdAllocationComponent implements OnInit {
|
export class PdAllocationComponent implements OnInit {
|
||||||
public pageTitle: string = "PD Allocation To";
|
public pageTitle: string = "Allocation To PD Officer";
|
||||||
public _pdAllocationForm: FormGroup;
|
public _pdAllocationForm: FormGroup;
|
||||||
public pdOfficerList: any = [];
|
public pdOfficerList: any = [];
|
||||||
errorMessage: any;
|
errorMessage: any;
|
||||||
@ -43,8 +43,7 @@ export class PdAllocationComponent implements OnInit {
|
|||||||
this._pd.getPdOfficerList(pdID).subscribe(
|
this._pd.getPdOfficerList(pdID).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.pdOfficerList= data.records.filter(item => item.fk_pd_type_id != 2);
|
this.pdOfficerList= data.records.pdofficers.filter(item => item.fk_pd_type_id == 1);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|||||||
@ -11,9 +11,9 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
|
||||||
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||||
<div *ngIf="pdOfficerList.length > 0" >
|
<div *ngIf="pdCentralOfficerList.length > 0" >
|
||||||
<div fxLayout="row wrap" fxFlex="100%">
|
<div fxLayout="row wrap" fxFlex="100%">
|
||||||
<div fxLayout="row wrap" fxFlex="33.33%" *ngFor="let officer of pdOfficerList; ">
|
<div fxLayout="row wrap" fxFlex="33.33%" *ngFor="let officer of pdCentralOfficerList; ">
|
||||||
<!-- <p><mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
|
<!-- <p><mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
|
||||||
{{officer.first_name}}
|
{{officer.first_name}}
|
||||||
</p>
|
</p>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-list *ngIf="pdOfficerList.length == 0">
|
<mat-list *ngIf="pdCentralOfficerList.length == 0">
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<p>No executive available.</p>
|
<p>No executive available.</p>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|||||||
@ -11,10 +11,11 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
|||||||
})
|
})
|
||||||
export class SmartPdAllocationComponent implements OnInit {
|
export class SmartPdAllocationComponent implements OnInit {
|
||||||
|
|
||||||
public pageTitle: string = "Allocate To Executive";
|
public pageTitle2: string = "Allocate To Executive";
|
||||||
public pageTitle2: string = "Allocate To Central Officer";
|
public pageTitle: string = "Allocate To Central Officer";
|
||||||
public _pdAllocationForm: FormGroup;
|
public _pdAllocationForm: FormGroup;
|
||||||
public pdOfficerList: any = [];
|
//public pdOfficerList: any = [];
|
||||||
|
public pdCentralOfficerList: any = [];
|
||||||
public pdExcutiveList: any = [];
|
public pdExcutiveList: any = [];
|
||||||
errorMessage: any;
|
errorMessage: any;
|
||||||
notifier : NotifierService;
|
notifier : NotifierService;
|
||||||
@ -34,34 +35,6 @@ export class SmartPdAllocationComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.showFirstCard=true;
|
this.showFirstCard=true;
|
||||||
// this.pdExcutiveList=[
|
|
||||||
// {
|
|
||||||
// "first_name": "Ramya",
|
|
||||||
// "allocated": "4",
|
|
||||||
// "scheduled":"2",
|
|
||||||
// "inprogress":"0",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "first_name": "Sri Vidhya",
|
|
||||||
// "allocated": "5",
|
|
||||||
// "scheduled":"3",
|
|
||||||
// "inprogress":"2",
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
// this.pdOfficerList=[
|
|
||||||
// {
|
|
||||||
// "first_name": "Moorthy",
|
|
||||||
// "allocated": "4",
|
|
||||||
// "scheduled":"2",
|
|
||||||
// "inprogress":"0",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "first_name": "Priya",
|
|
||||||
// "allocated": "5",
|
|
||||||
// "scheduled":"3",
|
|
||||||
// "inprogress":"2",
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
this.isDisabled=true;
|
this.isDisabled=true;
|
||||||
this.getPDOfficerList(this.data.pd_id);
|
this.getPDOfficerList(this.data.pd_id);
|
||||||
}
|
}
|
||||||
@ -71,8 +44,8 @@ export class SmartPdAllocationComponent implements OnInit {
|
|||||||
this._pd.getPdOfficerList(pdID).subscribe(
|
this._pd.getPdOfficerList(pdID).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.pdOfficerList= data.records.filter(item => item.fk_pd_type_id != 2);
|
this.pdCentralOfficerList= data.records.centralpdofficers;
|
||||||
this.pdExcutiveList= data.records.filter(item => item.fk_pd_type_id == 2);
|
this.pdExcutiveList= data.records.pdofficers.filter(item => item.fk_pd_type_id == 2);
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
@ -97,7 +70,7 @@ export class SmartPdAllocationComponent implements OnInit {
|
|||||||
else {
|
else {
|
||||||
let updateData = {
|
let updateData = {
|
||||||
"pd_id":this.data.pd_id,
|
"pd_id":this.data.pd_id,
|
||||||
"fk_pd_allocated_to":pdOfficer.fk_user_id,
|
"central_pd_officer_id":pdOfficer.fk_user_id,
|
||||||
"executive_id":excutiveOfficer.fk_user_id,
|
"executive_id":excutiveOfficer.fk_user_id,
|
||||||
}
|
}
|
||||||
this._pd.updatePdOfficer(updateData).subscribe(
|
this._pd.updatePdOfficer(updateData).subscribe(
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
<mat-card style="padding: 12px;">
|
|
||||||
<p>Address</p>
|
<mat-card style="min-height: 550px;">
|
||||||
|
<mat-card-content>
|
||||||
|
<p>Address Details</p>
|
||||||
<form class="address" [formGroup]="addressForm">
|
<form class="address" [formGroup]="addressForm">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Address" formControlName="address">
|
<input matInput placeholder="Address" formControlName="address">
|
||||||
@ -58,11 +60,10 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<p>Neighbour hood
|
<p>Neighbourhood</p>
|
||||||
<p>
|
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="neighbourhood">
|
<div formArrayName="neighbourhood">
|
||||||
<div *ngFor="let item of addressForm.get('neighbourhood').controls; let i=index">
|
<div *ngFor="let item of addressForm.controls.neighbourhood['controls']; let i=index">
|
||||||
<mat-card-content class="matcard" [formGroup]="item">
|
<mat-card-content class="matcard" [formGroup]="item">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Neighbour name"
|
<input matInput placeholder="Neighbour name"
|
||||||
@ -87,22 +88,36 @@
|
|||||||
<mat-option value="dont_know">Dont Know</mat-option>
|
<mat-option value="dont_know">Dont Know</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button type="button" mat-raised-button mat-icon-button *ngIf="i==0"
|
<button type="button" matTooltip="Add More Neighbour Details" matTooltipPosition="above" mat-raised-button mat-icon-button *ngIf="i==0"
|
||||||
(click)="addNeighbour($event)"
|
(click)="addNeighbour($event)"
|
||||||
style="float: right;">
|
style="float: right;">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" mat-raised-button mat-icon-button *ngIf="i>0"
|
<button type="button" matTooltip="Delete" matTooltipPosition="above" mat-raised-button mat-icon-button *ngIf="i>0"
|
||||||
(click)="removeNeighbour(i)"
|
(click)="removeNeighbour(i)"
|
||||||
style="float: right;">
|
style="float: right;">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<button mat-raised-button type="submit" class="button" (click)="onSubmit()">Submit
|
<div fxLayout="row">
|
||||||
</button>
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="address_form_remark"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1" matTooltip="Save" matTooltipPosition="above" type="submit" (click)="onSubmit()"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
}
|
}
|
||||||
.matcard mat-form-field {
|
.matcard mat-form-field {
|
||||||
margin: 0 2%;
|
margin: 0 2%;
|
||||||
|
width:40%;
|
||||||
}
|
}
|
||||||
.address .button {
|
.address .button {
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import {
|
|||||||
Component,
|
Component,
|
||||||
OnInit,
|
OnInit,
|
||||||
Inject,
|
Inject,
|
||||||
Input
|
Input, ElementRef
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-address',
|
selector: 'app-address',
|
||||||
templateUrl: './address.component.html',
|
templateUrl: './address.component.html',
|
||||||
@ -45,7 +46,7 @@ export class AddressComponent implements OnInit {
|
|||||||
public customerBehaviour: AbstractControl;
|
public customerBehaviour: AbstractControl;
|
||||||
|
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(private el: ElementRef, notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private _pd: PdTrigerService) {
|
private _pd: PdTrigerService) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
@ -57,8 +58,8 @@ export class AddressComponent implements OnInit {
|
|||||||
this.getCustomer();
|
this.getCustomer();
|
||||||
this.initAddressForm();
|
this.initAddressForm();
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = '250';
|
params.pd_id = this.pdid;
|
||||||
params.pd_form_id = '250';
|
params.pd_form_id = '5';
|
||||||
this._pd.retriveForm(params).subscribe(data => {
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
const control = <FormArray>this.addressForm.controls['neighbourhood'];
|
const control = <FormArray>this.addressForm.controls['neighbourhood'];
|
||||||
@ -72,6 +73,7 @@ export class AddressComponent implements OnInit {
|
|||||||
this.addressForm.controls.comment_locality.setValue(data.records.comment_locality);
|
this.addressForm.controls.comment_locality.setValue(data.records.comment_locality);
|
||||||
this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour);
|
this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour);
|
||||||
this.addressForm.controls.locality.setValue(data.records.locality);
|
this.addressForm.controls.locality.setValue(data.records.locality);
|
||||||
|
this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark);
|
||||||
if (data.records.locality_others) {
|
if (data.records.locality_others) {
|
||||||
this.addressForm.controls.locality_others.setValue(data.records.locality_others);
|
this.addressForm.controls.locality_others.setValue(data.records.locality_others);
|
||||||
}
|
}
|
||||||
@ -98,7 +100,8 @@ export class AddressComponent implements OnInit {
|
|||||||
pd_location: ['', Validators.compose([Validators.required])],
|
pd_location: ['', Validators.compose([Validators.required])],
|
||||||
comment_locality: ['', Validators.compose([Validators.required])],
|
comment_locality: ['', Validators.compose([Validators.required])],
|
||||||
customer_behaviour: ['', Validators.compose([Validators.required])],
|
customer_behaviour: ['', Validators.compose([Validators.required])],
|
||||||
neighbourhood: this.fb.array([])
|
neighbourhood: this.fb.array([]),
|
||||||
|
address_form_remark:['']
|
||||||
});
|
});
|
||||||
this.address = this.addressForm.controls['address'];
|
this.address = this.addressForm.controls['address'];
|
||||||
this.addressType = this.addressForm.controls['address_type'];
|
this.addressType = this.addressForm.controls['address_type'];
|
||||||
@ -160,7 +163,6 @@ export class AddressComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
if (!this.addressForm.valid) {
|
if (!this.addressForm.valid) {
|
||||||
this.validateAllFormFields(this.addressForm);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('form', this.addressForm.value);
|
console.log('form', this.addressForm.value);
|
||||||
@ -175,9 +177,10 @@ export class AddressComponent implements OnInit {
|
|||||||
records.comment_locality = this.commentlocality.value;
|
records.comment_locality = this.commentlocality.value;
|
||||||
records.customer_behaviour = this.commentlocality.value;
|
records.customer_behaviour = this.commentlocality.value;
|
||||||
records.neighbourhood = this.addressForm.controls.neighbourhood.value;
|
records.neighbourhood = this.addressForm.controls.neighbourhood.value;
|
||||||
records.pdid = '250';
|
records.address_form_remark = this.addressForm.controls.address_form_remark.value;
|
||||||
records.formid = '250';
|
records.pdid = this.pdid;
|
||||||
records.fk_createdby = '250';
|
records.formid = '5';
|
||||||
|
// records.fk_createdby = '250';
|
||||||
console.log('params', records);
|
console.log('params', records);
|
||||||
this._pd.saveForm(records).subscribe(data => {
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
|
|||||||
@ -1,18 +1,23 @@
|
|||||||
<!--<pre> {{ m_group | json}}</pre>-->
|
<!--<pre> {{ m_group | json}}</pre>-->
|
||||||
<mat-card style="padding: 12px;">
|
|
||||||
|
<mat-card style="min-height: 550px;" >
|
||||||
|
<mat-card-content>
|
||||||
|
<p>Assets Details</p>
|
||||||
<form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_assetsQuesFrom" (submit)="onSubmit()" novalidate>
|
<form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_assetsQuesFrom" (submit)="onSubmit()" novalidate>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div formArrayName="assets_details" fxFill>
|
<div formArrayName="assets_details" fxFill>
|
||||||
<div *ngFor="let sup of _assetsQuesFrom.controls.assets_details['controls']; let i=index">
|
<div *ngFor="let sup of _assetsQuesFrom.controls.assets_details['controls']; let i=index">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
|
<mat-card-content>
|
||||||
<div [formGroupName]="i">
|
<div [formGroupName]="i">
|
||||||
<div fxLayout="row wrap" fxLayoutGap="12px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
|
||||||
<div>
|
<div>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select (selectionChange)="selectedAssetsType($event, i)" placeholder="Select Assets Type" formControlName="assets_mode">
|
<mat-select (selectionChange)="selectedAssetsType($event, i)" placeholder="Assets Type" formControlName="assets_mode">
|
||||||
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id">{{ asset.name }}</mat-option>
|
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id">{{ asset.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--Desction Dynamic details: START-->
|
<!--Desction Dynamic details: START-->
|
||||||
@ -61,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--jwell details-->
|
<!--jwell details
|
||||||
<div *ngIf="sup.get('assets_mode').value == 4">
|
<div *ngIf="sup.get('assets_mode').value == 4">
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
||||||
@ -74,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
<!--Consumer Durable-->
|
<!--Consumer Durable-->
|
||||||
<div *ngIf="sup.get('assets_mode').value == 5">
|
<div *ngIf="sup.get('assets_mode').value == 5">
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
@ -176,26 +181,34 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--Desction Dynamic details : END -->
|
<!--Desction Dynamic details : END -->
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
|
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 4">
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value">
|
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5">
|
||||||
|
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Name of the Owner" formControlName="name_of_the_owner">
|
<input matInput placeholder="Name of the Owner" formControlName="name_of_the_owner">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 5">
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Year of Purchase and Approximate month" formControlName="year_of_purchase">
|
<input matInput placeholder="Year and month of purchase" formControlName="year_of_purchase">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5">
|
||||||
|
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-checkbox formControlName="emi" [ngModel]="sup.get('emi').value === '1' ? true : false"
|
<mat-checkbox formControlName="emi" [ngModel]="sup.get('emi').value === '1' ? true : false" (ngModelChange)="sup.get('emi').value = $event ? '1' : '0'">Is there a loan?</mat-checkbox>
|
||||||
(ngModelChange)="sup.get('emi').value = $event ? '1' : '0'">EMI</mat-checkbox>
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
@ -204,32 +217,50 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Elapsed Tenure" formControlName="elapsed_tenure">
|
<input matInput placeholder="Elapsed Tenure in months" formControlName="elapsed_tenure">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Balance Tenure" formControlName="balance_tenure">
|
<input matInput placeholder="Balance Tenure in months" formControlName="balance_tenure">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
|
||||||
<div fxFlex="20">
|
<div fxFlex="20">
|
||||||
<span *ngIf="_assetsQuesFrom.controls.assets_details.controls.length > 1" (click)="removeLanguage(i)">
|
<span *ngIf="_assetsQuesFrom.controls.assets_details.controls.length > 1" (click)="removeLanguage(i)">
|
||||||
|
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||||
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
|
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!--<div fxLayout="row">
|
||||||
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="assets_form_remark"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>-->
|
||||||
<div class="row" style="text-align:right;">
|
<div class="row" style="text-align:right;">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="onReset(); false"><mat-icon>settings_backup_restore</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="onReset(); false"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</mat-card-content>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -189,7 +189,8 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
formid: ['4'],
|
formid: ['4'],
|
||||||
assets_details: this._formBuilder.array([
|
assets_details: this._formBuilder.array([
|
||||||
// this.initDetails(),
|
// this.initDetails(),
|
||||||
])
|
]),
|
||||||
|
// assets_form_remark:[value.assets_form_remark || 'check']
|
||||||
});
|
});
|
||||||
this.addAssetsDetailsWithData(value.assets_details);
|
this.addAssetsDetailsWithData(value.assets_details);
|
||||||
} else {
|
} else {
|
||||||
@ -198,7 +199,8 @@ export class AssetsInfoComponent implements OnInit {
|
|||||||
formid: ['4'],
|
formid: ['4'],
|
||||||
assets_details: this._formBuilder.array([
|
assets_details: this._formBuilder.array([
|
||||||
this.initDetails(),
|
this.initDetails(),
|
||||||
])
|
]),
|
||||||
|
// assets_form_remark:['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.loadDetails = true;
|
this.loadDetails = true;
|
||||||
|
|||||||
@ -1,18 +1,86 @@
|
|||||||
<mat-card style="padding: 12px;">
|
<!--<<<<<<< HEAD-->
|
||||||
<form [formGroup]="bankingForm" class="bankForm">
|
<!--<mat-card style="padding: 12px;">-->
|
||||||
|
<!--<form [formGroup]="bankingForm" class="bankForm">-->
|
||||||
|
<!--<div formArrayName="itemRows">-->
|
||||||
|
<!--<mat-accordion-->
|
||||||
|
<!--*ngFor="let itemrow of bankingForm.controls.itemRows.controls; let i=index"-->
|
||||||
|
<!--[formGroupName]="i">-->
|
||||||
|
<!--<mat-expansion-panel class="banlFields" [expanded]="step == i" (opened)="setStep(i)">-->
|
||||||
|
<!--<mat-expansion-panel-header>-->
|
||||||
|
<!--<mat-panel-title>-->
|
||||||
|
<!--<h4>{{i+1}} Banking details<span *ngIf="i==0" style="float: right;">-->
|
||||||
|
<!--<mat-icon (click)="addBankdetails($event)">add</mat-icon>-->
|
||||||
|
<!--</span>-->
|
||||||
|
<!--<span *ngIf="i > 0">-->
|
||||||
|
<!--<mat-icon (click)="deleteBankdetails(i, $event)">delete</mat-icon>-->
|
||||||
|
<!--</span></h4>-->
|
||||||
|
<!--</mat-panel-title>-->
|
||||||
|
<!--</mat-expansion-panel-header>-->
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<input matInput placeholder="Applicant Name"-->
|
||||||
|
<!--formControlName="applicant_name">-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<input matInput placeholder="Bank Name" formControlName="bank_name">-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<mat-select placeholder="Account Type"-->
|
||||||
|
<!--formControlName="account_type">-->
|
||||||
|
<!--<mat-option value="Savings">Savings</mat-option>-->
|
||||||
|
<!--<mat-option value="Current">Current</mat-option>-->
|
||||||
|
<!--<mat-option value="OD">OD</mat-option>-->
|
||||||
|
<!--<mat-option value="CC">CC</mat-option>-->
|
||||||
|
|
||||||
|
<!--</mat-select>-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<mat-select placeholder="Salary Credited in this account"-->
|
||||||
|
<!--formControlName="salary">-->
|
||||||
|
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||||
|
<!--<mat-option value="No">No</mat-option>-->
|
||||||
|
<!--<mat-option value="NA">NA</mat-option>-->
|
||||||
|
<!--</mat-select>-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<input matInput placeholder="Limit in case of OD / CC account"-->
|
||||||
|
<!--formControlName="limit">-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<mat-select placeholder="Is this the main business account"-->
|
||||||
|
<!--formControlName="is_main">-->
|
||||||
|
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||||
|
<!--<mat-option value="No">No</mat-option>-->
|
||||||
|
<!--</mat-select>-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<input matInput placeholder="Approximate Vintage"-->
|
||||||
|
<!--formControlName="vintage">-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--</mat-expansion-panel>-->
|
||||||
|
|
||||||
|
<!--</mat-accordion>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--<button mat-raised-button class="button" (click)="bankSubmit()">Submit-->
|
||||||
|
<!--</button>-->
|
||||||
|
<!--</form>-->
|
||||||
|
<!--</mat-card>-->
|
||||||
|
<!--=======-->
|
||||||
|
<mat-card style="min-height: 550px;">
|
||||||
|
<mat-card-content>
|
||||||
|
<p>Banking Information</p>
|
||||||
|
<form [formGroup]="bankingForm" class="bankForm">
|
||||||
<div formArrayName="itemRows">
|
<div formArrayName="itemRows">
|
||||||
<mat-accordion
|
<mat-accordion
|
||||||
*ngFor="let itemrow of bankingForm.controls.itemRows.controls; let i=index"
|
*ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-expansion-panel class="banlFields" [expanded]="step == i" (opened)="setStep(i)">
|
<!-- {{bankingForm.controls.itemRows['controls']}} -->
|
||||||
|
<mat-expansion-panel class="banlFields" [expanded]="step == i">
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title>
|
<mat-panel-title>
|
||||||
<h4>{{i+1}} Banking details<span *ngIf="i==0" style="float: right;">
|
<p>{{i+1}} , Banking Details
|
||||||
<mat-icon (click)="addBankdetails($event)">add</mat-icon>
|
</p>
|
||||||
</span>
|
|
||||||
<span *ngIf="i > 0">
|
|
||||||
<mat-icon (click)="deleteBankdetails(i, $event)">delete</mat-icon>
|
|
||||||
</span></h4>
|
|
||||||
</mat-panel-title>
|
</mat-panel-title>
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -57,11 +125,34 @@
|
|||||||
<input matInput placeholder="Approximate Vintage"
|
<input matInput placeholder="Approximate Vintage"
|
||||||
formControlName="vintage">
|
formControlName="vintage">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<button *ngIf="i > 0" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteBankdetails(i)">
|
||||||
|
<mat-icon >delete</mat-icon>
|
||||||
|
</button>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
|
<div *ngIf="bankingForm.controls.itemRows['controls'].length == (i+1)">
|
||||||
|
<button class="mr-1 mb-1" color="primary" mat-raised-button mat-icon-button matTooltip="Add More Banking Details" matTooltipPosition="above" (click)="addBankdetails(i, $event)">
|
||||||
|
<mat-icon >add</mat-icon>
|
||||||
|
</button></div>
|
||||||
</mat-accordion>
|
</mat-accordion>
|
||||||
</div>
|
</div>
|
||||||
<button mat-raised-button class="button" (click)="bankSubmit()">Submit
|
<div fxLayout="row" class="pt-1">
|
||||||
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="banking_form_remark"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: right;" class="pt-1">
|
||||||
|
<!-- <button class="mr-1 mb-1" color="primary" mat-raised-button mat-icon-button matTooltip="Add More Banking Details" matTooltipPosition="above" (click)="addBankdetails(i)">
|
||||||
|
<mat-icon >add</mat-icon>
|
||||||
|
</button> -->
|
||||||
|
<button class="mr-1 mb-1" type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="bankSubmit()"><mat-icon>save</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</div>
|
||||||
|
</form>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
.banlFields mat-form-field {
|
.banlFields mat-form-field {
|
||||||
width: 100%;
|
width: 27%;
|
||||||
margin: 0 2%;
|
margin: 0 2%;
|
||||||
}
|
}
|
||||||
.bankForm .button {
|
.bankForm .button {
|
||||||
|
|||||||
@ -30,7 +30,7 @@ import {ActivatedRoute, Router} from "@angular/router";
|
|||||||
export class BankingDetailsComponent implements OnInit {
|
export class BankingDetailsComponent implements OnInit {
|
||||||
@Input() pdid: number;
|
@Input() pdid: number;
|
||||||
public bankingForm: FormGroup;
|
public bankingForm: FormGroup;
|
||||||
step: any;
|
step: number;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
@ -39,16 +39,18 @@ export class BankingDetailsComponent implements OnInit {
|
|||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.step = 0;
|
this.step = 0;
|
||||||
this.initBankingForm();
|
this.initBankingForm();
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = '252';
|
params.pd_id = this.pdid;
|
||||||
params.pd_form_id = '252';
|
params.pd_form_id = '7';
|
||||||
this._pd.retriveForm(params).subscribe(data => {
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||||
if( data.status == 200) {
|
if (data.status == 200) {
|
||||||
|
this.bankingForm.controls.banking_form_remark.setValue(data.records.banking_form_remark);
|
||||||
var result = Object.keys(data.records.banking_details).map(function (key) {
|
var result = Object.keys(data.records.banking_details).map(function (key) {
|
||||||
return data.records.banking_details[key];
|
return data.records.banking_details[key];
|
||||||
});
|
});
|
||||||
@ -65,11 +67,14 @@ export class BankingDetailsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public initBankingForm(): void {
|
public initBankingForm(): void {
|
||||||
this.bankingForm = this.fb.group({
|
this.bankingForm = this.fb.group({
|
||||||
|
banking_form_remark: [''],
|
||||||
itemRows: this.fb.array([])
|
itemRows: this.fb.array([])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
createBankarray() {
|
createBankarray() {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
applicant_name: ['', Validators.compose([Validators.required])],
|
applicant_name: ['', Validators.compose([Validators.required])],
|
||||||
@ -81,30 +86,34 @@ export class BankingDetailsComponent implements OnInit {
|
|||||||
vintage: ['', Validators.compose([Validators.required])],
|
vintage: ['', Validators.compose([Validators.required])],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
addBankdetails(event) {
|
|
||||||
|
addBankdetails(index, event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||||
let length = control.length;
|
let length = control.length;
|
||||||
this.step = length;
|
this.step = length;
|
||||||
control.push(this.createBankarray());
|
control.push(this.createBankarray());
|
||||||
}
|
}
|
||||||
deleteBankdetails(index: number, event) {
|
|
||||||
event.stopPropagation();
|
deleteBankdetails(index: number) {
|
||||||
|
console.log('index value -', index);
|
||||||
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||||
control.removeAt(index);
|
control.removeAt(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
setStep(index: number) {
|
setStep(index: number) {
|
||||||
this.step = index;
|
this.step = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
bankSubmit() {
|
bankSubmit() {
|
||||||
if (!this.bankingForm.valid) {
|
if (!this.bankingForm.valid) {
|
||||||
this.validateAllFormFields(this.bankingForm);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let records: any = {};
|
let records: any = {};
|
||||||
records.pdid = '252';
|
records.pdid = this.pdid;
|
||||||
records.formid = '252';
|
records.formid = '7';
|
||||||
records.fk_createdby = '252';
|
records.banking_form_remark = this.bankingForm.controls.banking_form_remark.value;
|
||||||
|
// records.fk_createdby = '252';
|
||||||
records.banking_details = this.bankingForm.controls['itemRows'].value;
|
records.banking_details = this.bankingForm.controls['itemRows'].value;
|
||||||
console.log('data', records);
|
console.log('data', records);
|
||||||
this._pd.saveForm(records).subscribe(data => {
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
@ -114,6 +123,7 @@ export class BankingDetailsComponent implements OnInit {
|
|||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
validateAllFormFields(formGroup: FormGroup) {
|
validateAllFormFields(formGroup: FormGroup) {
|
||||||
Object.keys(formGroup.controls).forEach(field => {
|
Object.keys(formGroup.controls).forEach(field => {
|
||||||
const control = formGroup.get(field);
|
const control = formGroup.get(field);
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<p>
|
<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="designation">
|
<div formArrayName="designation">
|
||||||
<div *ngFor="let members of businessForm.get('designation').controls; let i=index"
|
<div *ngFor="let members of businessForm.controls.designation['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-card-content class="card">
|
<mat-card-content class="card">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -70,7 +70,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select multiple placeholder="Other family members invovled"
|
<mat-select multiple placeholder="Other family members invovled"
|
||||||
formControlName="other_main_person"formControlName="family_members_involved" (selectionChange)="relationChanged($event, i)">
|
formControlName="other_main_person"formControlName="family_members_involved" (selectionChange)="relationChanged($event)">
|
||||||
<mat-option value="{{member.relationship_id}}" *ngFor="let member of relationData">{{member.name}}</mat-option>
|
<mat-option value="{{member.relationship_id}}" *ngFor="let member of relationData">{{member.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -88,7 +88,7 @@
|
|||||||
<p>
|
<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="partners">
|
<div formArrayName="partners">
|
||||||
<div *ngFor="let members of businessForm.get('partners').controls; let i=index"
|
<div *ngFor="let members of businessForm.controls.partners['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-card-content class="card">
|
<mat-card-content class="card">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -280,7 +280,7 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<div formArrayName="documents" *ngIf="businessForm.controls['other_documents'].value == 'yes'">
|
<div formArrayName="documents" *ngIf="businessForm.controls['other_documents'].value == 'yes'">
|
||||||
<div *ngFor="let members of businessForm.get('documents').controls; let i=index"
|
<div *ngFor="let members of businessForm.controls.documents['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Specify Document Details"
|
<input matInput placeholder="Specify Document Details"
|
||||||
@ -298,9 +298,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-form-field>
|
<div fxLayout="row">
|
||||||
<input matInput placeholder="Remarks" formControlName="business_remarks">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="business_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-business-info',
|
selector: 'app-business-info',
|
||||||
templateUrl: './business-info.component.html',
|
templateUrl: './business-info.component.html',
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<mat-card style="padding: 12px;">
|
<mat-card style="min-height: 550px;">
|
||||||
<p>Current Loan Details</p>
|
<mat-card-content>
|
||||||
<form [formGroup]="currentLoanForm" class="address">
|
<p>Current Loan Details</p>
|
||||||
|
<form [formGroup]="currentLoanForm" class="address">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Do you have any other existing Loan"
|
<mat-select placeholder="Do you have any other existing loan"
|
||||||
formControlName="existing_loan">
|
formControlName="existing_loan">
|
||||||
<mat-option value="Yes">Yes</mat-option>
|
<mat-option value="Yes">Yes</mat-option>
|
||||||
<mat-option value="No">No</mat-option>
|
<mat-option value="No">No</mat-option>
|
||||||
@ -34,21 +35,32 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Current Balance Tenure" formControlName="current_balance_tenure">
|
<input matInput placeholder="Current Balance Tenure" formControlName="current_balance_tenure">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="addLoanDetails()"
|
<button type="button" mat-raised-button mat-icon-button matTooltip="Add More Loan Details" matTooltipPosition="above" (click)="addLoanDetails()"
|
||||||
*ngIf="i==0">
|
*ngIf="i==0">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteLoanDetails(i)"
|
<button type="button" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)"
|
||||||
*ngIf="i>0">
|
*ngIf="i>0">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-form-field>
|
<div fxLayout="row">
|
||||||
<input matInput placeholder="Remarks" formControlName="currentloan_remarks">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="currentloan_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button mat-raised-button type="submit" class="button" (click)="submitCurrentloan()">Submit</button>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
</mat-card>
|
<div style="text-align: right;">
|
||||||
|
<button type="submit" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitCurrentloan()"><mat-icon>save</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
}
|
}
|
||||||
.matcard mat-form-field {
|
.matcard mat-form-field {
|
||||||
margin: 0 2%;
|
margin: 0 2%;
|
||||||
|
width:26%;
|
||||||
}
|
}
|
||||||
.address .button {
|
.address .button {
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-current-loan',
|
selector: 'app-current-loan',
|
||||||
templateUrl: './current-loan.component.html',
|
templateUrl: './current-loan.component.html',
|
||||||
@ -93,7 +94,6 @@ export class CurrentLoanComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
submitCurrentloan() {
|
submitCurrentloan() {
|
||||||
if (!this.currentLoanForm.valid) {
|
if (!this.currentLoanForm.valid) {
|
||||||
this.validateAllFormFields(this.currentLoanForm);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let records: any = {};
|
let records: any = {};
|
||||||
|
|||||||
@ -63,9 +63,14 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-form-field>
|
<div fxLayout="row">
|
||||||
<input matInput placeholder="Remarks" formControlName="employment_remarks">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="employment_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-employment-info',
|
selector: 'app-employment-info',
|
||||||
templateUrl: './employment-info.component.html',
|
templateUrl: './employment-info.component.html',
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
<mat-card style="padding: 12px;">
|
|
||||||
<p>Family</p>
|
<mat-card style="min-height: 550px;">
|
||||||
|
<mat-card-content>
|
||||||
|
<p>Family Details</p>
|
||||||
<form class="address" [formGroup]="familyForm">
|
<form class="address" [formGroup]="familyForm">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Person Met" formControlName="person">
|
<mat-select placeholder="Person Met" formControlName="person">
|
||||||
@ -20,9 +22,9 @@
|
|||||||
<p>
|
<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="earningMembers">
|
<div formArrayName="earningMembers">
|
||||||
<div *ngFor="let item of familyForm.get('earningMembers').controls; let i=index"
|
<div *ngFor="let item of familyForm.controls.earningMembers['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcards">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Relation" formControlName="relation">
|
<mat-select placeholder="Relation" formControlName="relation">
|
||||||
<mat-option value="{{relations.relationship_id}}"
|
<mat-option value="{{relations.relationship_id}}"
|
||||||
@ -53,7 +55,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" mat-raised-button mat-icon-button
|
<button type="button" mat-raised-button mat-icon-button
|
||||||
(click)="deleteEarningMembers(i)" *ngIf="i>0">
|
(click)="deleteEarningMembers(i)" *ngIf="i>0">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</div>
|
</div>
|
||||||
@ -65,7 +67,7 @@
|
|||||||
<p>
|
<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="nonEarningMembers">
|
<div formArrayName="nonEarningMembers">
|
||||||
<div *ngFor="let members of familyForm.get('nonEarningMembers').controls; let i=index"
|
<div *ngFor="let members of familyForm.controls.nonEarningMembers['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -95,7 +97,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteMembers(i)"
|
<button type="button" mat-raised-button mat-icon-button (click)="deleteMembers(i)"
|
||||||
*ngIf="i>0">
|
*ngIf="i>0">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</div>
|
</div>
|
||||||
@ -103,8 +105,7 @@
|
|||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<p>Residence
|
<p>Residence <p>
|
||||||
<p>
|
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -126,11 +127,25 @@
|
|||||||
<input matInput placeholder="Please specify" formControlName="ownershipOther">
|
<input matInput placeholder="Please specify" formControlName="ownershipOther">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="ownership.value =='Rented'">
|
<mat-form-field *ngIf="ownership.value =='Rented'">
|
||||||
<input matInput placeholder="what rent"
|
<input matInput placeholder="Rent Amount"
|
||||||
formControlName="rent">
|
formControlName="rent">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<button mat-raised-button class="button" (click)="submitFamily()">Submit</button>
|
<div fxLayout="row">
|
||||||
</form>
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="family_details_form_remark"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: right;">
|
||||||
|
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -9,6 +9,11 @@
|
|||||||
}
|
}
|
||||||
.matcard mat-form-field {
|
.matcard mat-form-field {
|
||||||
margin: 0 2%;
|
margin: 0 2%;
|
||||||
|
width:27%;
|
||||||
|
}
|
||||||
|
.matcards mat-form-field {
|
||||||
|
margin: 0 2%;
|
||||||
|
width:40%;
|
||||||
}
|
}
|
||||||
.address .button {
|
.address .button {
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-family-details',
|
selector: 'app-family-details',
|
||||||
templateUrl: './family-details.component.html',
|
templateUrl: './family-details.component.html',
|
||||||
@ -43,7 +44,8 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
public ownershipOther: AbstractControl;
|
public ownershipOther: AbstractControl;
|
||||||
public rent: AbstractControl;
|
public rent: AbstractControl;
|
||||||
filteredStates: any = [
|
filteredStates: any = [
|
||||||
'Co-Applicant 1 to x',
|
'Main Applicant',
|
||||||
|
'Co-Applicant ',
|
||||||
'Accountant',
|
'Accountant',
|
||||||
'Manager',
|
'Manager',
|
||||||
'Relative of the applicant',
|
'Relative of the applicant',
|
||||||
@ -63,8 +65,8 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
this.getOccupation();
|
this.getOccupation();
|
||||||
this.initFamilyForm();
|
this.initFamilyForm();
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = '251';
|
params.pd_id = this.pdid;
|
||||||
params.pd_form_id = '555';
|
params.pd_form_id = '6';
|
||||||
this._pd.retriveForm(params).subscribe(data => {
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
||||||
@ -83,6 +85,8 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
this.familyForm.controls.members.setValue(data.records.family_members);
|
this.familyForm.controls.members.setValue(data.records.family_members);
|
||||||
this.familyForm.controls.years.setValue(data.records.no_of_years);
|
this.familyForm.controls.years.setValue(data.records.no_of_years);
|
||||||
this.familyForm.controls.ownership.setValue(data.records.ownership);
|
this.familyForm.controls.ownership.setValue(data.records.ownership);
|
||||||
|
this.familyForm.controls.family_details_form_remark.setValue(data.records.family_details_form_remark);
|
||||||
|
|
||||||
if (data.records.ownership_others) {
|
if (data.records.ownership_others) {
|
||||||
this.familyForm.controls.ownershipOther.setValue(data.records.ownership_others);
|
this.familyForm.controls.ownershipOther.setValue(data.records.ownership_others);
|
||||||
}
|
}
|
||||||
@ -121,7 +125,8 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
ownershipOther: [''],
|
ownershipOther: [''],
|
||||||
rent: [''],
|
rent: [''],
|
||||||
earningMembers: this.fb.array([]),
|
earningMembers: this.fb.array([]),
|
||||||
nonEarningMembers: this.fb.array([])
|
nonEarningMembers: this.fb.array([]),
|
||||||
|
family_details_form_remark: ['']
|
||||||
});
|
});
|
||||||
this.person = this.familyForm.controls['person'];
|
this.person = this.familyForm.controls['person'];
|
||||||
this.personOther = this.familyForm.controls['personOther'];
|
this.personOther = this.familyForm.controls['personOther'];
|
||||||
@ -190,7 +195,6 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
submitFamily() {
|
submitFamily() {
|
||||||
if (!this.familyForm.valid) {
|
if (!this.familyForm.valid) {
|
||||||
this.validateAllFormFields(this.familyForm);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('data', this.familyForm.value);
|
console.log('data', this.familyForm.value);
|
||||||
@ -211,9 +215,10 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
records.family_members = this.members.value;
|
records.family_members = this.members.value;
|
||||||
records.earning_members = this.familyForm.controls['earningMembers'].value;
|
records.earning_members = this.familyForm.controls['earningMembers'].value;
|
||||||
records.non_earning_members = this.familyForm.controls['nonEarningMembers'].value;
|
records.non_earning_members = this.familyForm.controls['nonEarningMembers'].value;
|
||||||
records.pdid = '251';
|
records.family_details_form_remark = this.familyForm.controls['family_details_form_remark'].value;
|
||||||
records.formid = '555';
|
records.pdid = this.pdid;
|
||||||
records.fk_createdby = '251';
|
records.formid = '6';
|
||||||
|
// records.fk_createdby = '251';
|
||||||
console.log('params', records);
|
console.log('params', records);
|
||||||
this._pd.saveForm(records).subscribe(data => {
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
|
|||||||
@ -5,23 +5,23 @@
|
|||||||
<p>Data as per Financial statements<p>
|
<p>Data as per Financial statements<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="date_per_financial">
|
<div formArrayName="date_per_financial">
|
||||||
<div *ngFor="let details of financialForm.get('date_per_financial').controls; let i=index"
|
<div *ngFor="let details of financialForm.controls.date_per_financial['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Year (format: 2015-16)" formControlName="financial_year">
|
<input matInput placeholder="Year (format: 2015-16)" formControlName="financial_year">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Annual Sale" formControlName="financial_annual_sale">
|
<input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin($event, i)">
|
<input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput disabled placeholder="Margin" formControlName="financial_margin">
|
<input matInput placeholder="Margin" formControlName="financial_margin">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="i != 0">
|
||||||
<input matInput placeholder="Variation from Previous Year" formControlName="financial_variation">
|
<input matInput [ngClass]="{'highlight': details.controls['financial_variation'].value >= 40 || details.controls['financial_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="financial_variation">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Reason for major difference" formControlName="financial_reason">
|
<input matInput placeholder="Reason for major difference" formControlName="financial_reason">
|
||||||
@ -44,23 +44,23 @@
|
|||||||
<p>Estimated Value<p>
|
<p>Estimated Value<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="estimated_value">
|
<div formArrayName="estimated_value">
|
||||||
<div *ngFor="let details of financialForm.get('estimated_value').controls; let i=index"
|
<div *ngFor="let details of financialForm.controls.estimated_value['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Year (format: 2015-16)" formControlName="estimate_year">
|
<input matInput placeholder="Year (format: 2015-16)" formControlName="estimate_year">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Annual Sale" formControlName="estimate_annual_sale">
|
<input matInput placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Net Profit / Loss" formControlName="estimate_net_profit">
|
<input matInput placeholder="Net Profit / Loss" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Margin" formControlName="estimate_margin">
|
<input matInput disabled placeholder="Margin" formControlName="estimate_margin">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field *ngIf="i != 0">
|
||||||
<input matInput placeholder="Variation from Previous Year" formControlName="estimate_variation">
|
<input matInput [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="estimate_variation">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Reason for major difference" formControlName="estimate_reason">
|
<input matInput placeholder="Reason for major difference" formControlName="estimate_reason">
|
||||||
@ -77,9 +77,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-form-field>
|
<div fxLayout="row">
|
||||||
<input matInput placeholder="Remarks" formControlName="financial_remarks">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="financial_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -16,3 +16,6 @@
|
|||||||
background: #62B013;
|
background: #62B013;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
.highlight {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-financial-info',
|
selector: 'app-financial-info',
|
||||||
templateUrl: './financial-info.component.html',
|
templateUrl: './financial-info.component.html',
|
||||||
@ -46,43 +47,50 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
params.pd_form_id = this.form_id;
|
params.pd_form_id = this.form_id;
|
||||||
this._pd.retriveForm(params).subscribe(value => {
|
this._pd.retriveForm(params).subscribe(value => {
|
||||||
console.log('value', value);
|
console.log('value', value);
|
||||||
// const rawMaterial = <FormArray>this.financialForm.controls['raw_materials'];
|
const financial_date = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||||
// const finishedGoods = <FormArray>this.financialForm.controls['finished_goods'];
|
const estimated_val = <FormArray>this.financialForm.controls['estimated_value'];
|
||||||
// if (value.status == 200) {
|
if (value.status == 200) {
|
||||||
// let result = Object.keys(value.records.raw_materials).map(function(key) {
|
let retriveData = value.records;
|
||||||
// return value.records.raw_materials[key];
|
let result = Object.keys(value.records.date_per_financial).map(function(key) {
|
||||||
// });
|
return value.records.date_per_financial[key];
|
||||||
// let result_Goods = Object.keys(value.records.finished_goods).map(function(key) {
|
});
|
||||||
// return value.records.finished_goods[key];
|
let result_val = Object.keys(value.records.estimated_value).map(function(key) {
|
||||||
// });
|
return value.records.estimated_value[key];
|
||||||
// this.stockForm.controls['stock_remarks'].setValue(value.records.stock_remarks);
|
});
|
||||||
// if (result.length > 0) {
|
if (result.length > 0) {
|
||||||
// result.forEach(val => {
|
result.forEach(val => {
|
||||||
// rawMaterial.push(this.createRawmaterial());
|
financial_date.push(this.createDate());
|
||||||
// });
|
});
|
||||||
// this.stockForm.controls['raw_materials'].setValue(result);
|
retriveData.date_per_financial = result;
|
||||||
// } else {
|
} else {
|
||||||
// rawMaterial.push(this.createRawmaterial());
|
financial_date.push(this.createDate());
|
||||||
// }
|
}
|
||||||
// if (result_Goods.length > 0) {
|
if (result_val.length > 0) {
|
||||||
// result_Goods.forEach(val => {
|
result_val.forEach(val => {
|
||||||
// finishedGoods.push(this.createGoods());
|
estimated_val.push(this.createValue());
|
||||||
// });
|
});
|
||||||
// this.stockForm.controls['finished_goods'].setValue(result_Goods);
|
retriveData.estimated_value = result_val;
|
||||||
// } else {
|
} else {
|
||||||
// finishedGoods.push(this.createGoods());
|
estimated_val.push(this.createValue());
|
||||||
// }
|
}
|
||||||
// } else {
|
retriveData.pdid = this.pdid;
|
||||||
// rawMaterial.push(this.createRawmaterial());
|
retriveData.formid = this.form_id;
|
||||||
// finishedGoods.push(this.createGoods());
|
retriveData.fk_createdby = this.pdid;
|
||||||
// }
|
this.financialForm.setValue(retriveData);
|
||||||
|
} else {
|
||||||
|
financial_date.push(this.createDate());
|
||||||
|
estimated_val.push(this.createValue());
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
public initstockForm(): void {
|
public initstockForm(): void {
|
||||||
this.financialForm = this.fb.group({
|
this.financialForm = this.fb.group({
|
||||||
|
pdid: this.pdid,
|
||||||
|
formid: this.form_id,
|
||||||
|
fk_createdby: this.pdid,
|
||||||
financial_remarks: ['', Validators.compose([Validators.required])],
|
financial_remarks: ['', Validators.compose([Validators.required])],
|
||||||
date_per_financial: this.fb.array([this.createDate()]),
|
date_per_financial: this.fb.array([]),
|
||||||
estimated_value: this.fb.array([this.createValue()])
|
estimated_value: this.fb.array([])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
createDate() {
|
createDate() {
|
||||||
@ -91,17 +99,17 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
financial_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
|
financial_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
|
||||||
financial_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
financial_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||||
financial_margin: ['', Validators.compose([Validators.required])],
|
financial_margin: ['', Validators.compose([Validators.required])],
|
||||||
financial_variation: ['', Validators.compose([Validators.required])],
|
financial_variation: [''],
|
||||||
financial_reason: ['', Validators.compose([Validators.required])],
|
financial_reason: ['', Validators.compose([Validators.required])],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
createValue() {
|
createValue() {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
estimate_year: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
|
estimate_year: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
|
||||||
estimate_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]$/)])],
|
estimate_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
|
||||||
estimate_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
estimate_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||||
estimate_margin: ['', Validators.compose([Validators.required])],
|
estimate_margin: ['', Validators.compose([Validators.required])],
|
||||||
estimate_variation: ['', Validators.compose([Validators.required])],
|
estimate_variation: [''],
|
||||||
estimate_reason: ['', Validators.compose([Validators.required])],
|
estimate_reason: ['', Validators.compose([Validators.required])],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -121,34 +129,58 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
const control = <FormArray>this.financialForm.controls['estimated_value'];
|
const control = <FormArray>this.financialForm.controls['estimated_value'];
|
||||||
control.removeAt(index);
|
control.removeAt(index);
|
||||||
}
|
}
|
||||||
calMargin(event, index) {
|
calYearVariation(index, detail) {
|
||||||
let salary = this.financialForm.controls['date_per_financial'].value[index].financial_annual_sale;
|
let profit = detail.value.financial_net_profit;
|
||||||
console.log(event.target.value);
|
if ( profit != '' && index != 0) {
|
||||||
console.log('salary', salary);
|
console.log('value')
|
||||||
let margin = event.target.value / salary * 100;
|
let array = <FormArray>this.financialForm.controls['date_per_financial']
|
||||||
this.financialForm.controls['date_per_financial'].value[index].financial_annual_sale = margin.toFixed(2);
|
let prev_profit = array.value[index - 1].financial_net_profit;
|
||||||
this.financialForm.controls['date_per_financial'].setValue(this.financialForm.controls['date_per_financial']);
|
let variation = profit - prev_profit / prev_profit * 100;
|
||||||
|
detail.controls.financial_variation.setValue(variation.toFixed(2))
|
||||||
|
// detail.controls.financial_variation.disable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
calMargin(index, detail) {
|
||||||
|
console.log('detail', detail);
|
||||||
|
let salary = detail.value.financial_annual_sale;
|
||||||
|
let profit = detail.value.financial_net_profit;
|
||||||
|
if (salary != '' && profit != '') {
|
||||||
|
let margin = profit / salary * 100;
|
||||||
|
detail.controls.financial_margin.setValue(margin.toFixed(2))
|
||||||
|
// detail.controls.financial_margin.disable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
calVariation(index, detail) {
|
||||||
|
let profit = detail.value.estimate_net_profit;
|
||||||
|
if ( profit != '' && index != 0) {
|
||||||
|
let array = <FormArray>this.financialForm.controls['estimated_value']
|
||||||
|
let prev_profit = array.value[index - 1].estimate_net_profit;
|
||||||
|
let variation = profit - prev_profit / prev_profit * 100;
|
||||||
|
detail.controls.estimate_variation.setValue(variation.toFixed(2))
|
||||||
|
// detail.controls.estimate_variation.disable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
calMarginVal(index, detail) {
|
||||||
|
let salary = detail.value.estimate_annual_sale;
|
||||||
|
let profit = detail.value.estimate_net_profit;
|
||||||
|
if (salary != '' && profit != '') {
|
||||||
|
let margin = profit / salary * 100;
|
||||||
|
detail.controls.estimate_margin.setValue(margin.toFixed(2))
|
||||||
|
// detail.controls.estimate_margin.disable()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
submitDetails() {
|
submitDetails() {
|
||||||
if (!this.financialForm.valid) {
|
if (!this.financialForm.valid) {
|
||||||
this.validateAllFormFields(this.financialForm);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// let records: any = {};
|
let records = this.financialForm.value;
|
||||||
// records.pdid = this.pdid;
|
console.log('data', records);
|
||||||
// records.formid = this.form_id;
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
// records.fk_createdby = this.pdid;
|
console.log('data', data);
|
||||||
// records.raw_materials = this.stockForm.controls['raw_materials'].value;
|
this.notifier.notify('success', 'Saved Successfully.');
|
||||||
// records.stock_remarks = this.stockForm.controls['stock_remarks'].value;
|
}, error => {
|
||||||
// records.finished_goods = this.stockForm.controls['finished_goods'].value;
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
// console.log('data', records);
|
})
|
||||||
// this._pd.saveForm(records).subscribe(data => {
|
|
||||||
// console.log('data', data);
|
|
||||||
// this.notifier.notify('success', 'Saved Successfully.');
|
|
||||||
// }, error => {
|
|
||||||
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
validateAllFormFields(formGroup: FormGroup) {
|
validateAllFormFields(formGroup: FormGroup) {
|
||||||
Object.keys(formGroup.controls).forEach(field => {
|
Object.keys(formGroup.controls).forEach(field => {
|
||||||
|
|||||||
@ -112,9 +112,14 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-form-field>
|
<div fxLayout="row">
|
||||||
<input matInput placeholder="Remarks" formControlName="loandetails_remarks">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="loandetails_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<button mat-raised-button type="submit" class="button" (click)="submitLoanDetails()">Submit</button>
|
<button mat-raised-button type="submit" class="button" (click)="submitLoanDetails()">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -12,6 +12,7 @@
|
|||||||
}
|
}
|
||||||
.matcard mat-form-field {
|
.matcard mat-form-field {
|
||||||
margin: 0 2%;
|
margin: 0 2%;
|
||||||
|
width:26%;
|
||||||
}
|
}
|
||||||
.address .button {
|
.address .button {
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-loan-details',
|
selector: 'app-loan-details',
|
||||||
templateUrl: './loan-details.component.html',
|
templateUrl: './loan-details.component.html',
|
||||||
@ -141,7 +142,6 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
submitLoanDetails() {
|
submitLoanDetails() {
|
||||||
console.log('formData', this.loanDetailsForm.value);
|
console.log('formData', this.loanDetailsForm.value);
|
||||||
if (!this.loanDetailsForm.valid) {
|
if (!this.loanDetailsForm.valid) {
|
||||||
this.validateAllFormFields(this.loanDetailsForm);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let records: any = {};
|
let records: any = {};
|
||||||
|
|||||||
@ -1,5 +1,25 @@
|
|||||||
<mat-card style="padding: 12px;">
|
<!--<mat-card style="padding: 12px;">-->
|
||||||
<form [formGroup]="otherIncomeForm" class="address">
|
<!--<form [formGroup]="otherIncomeForm" class="address">-->
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<mat-select placeholder="Other Income"-->
|
||||||
|
<!--formControlName="other_income">-->
|
||||||
|
<!--<mat-option value="Yes">Yes</mat-option>-->
|
||||||
|
<!--<mat-option value="No">No</mat-option>-->
|
||||||
|
<!--</mat-select>-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">-->
|
||||||
|
<!--<mat-card-header>-->
|
||||||
|
<!--<p>Loan Details<p>-->
|
||||||
|
<!--</mat-card-header>-->
|
||||||
|
<!--<div formArrayName="income_details">-->
|
||||||
|
<!--<div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index"-->
|
||||||
|
<!--[formGroupName]="i">-->
|
||||||
|
<!--<mat-card-content class="matcard">-->
|
||||||
|
|
||||||
|
<mat-card style="min-height: 550px;">
|
||||||
|
<mat-card-content>
|
||||||
|
<p>Other Income Details</p>
|
||||||
|
<form [formGroup]="otherIncomeForm" class="address">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Other Income"
|
<mat-select placeholder="Other Income"
|
||||||
formControlName="other_income">
|
formControlName="other_income">
|
||||||
@ -7,9 +27,37 @@
|
|||||||
<mat-option value="No">No</mat-option>
|
<mat-option value="No">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<input matInput placeholder="Amount" formControlName="amount">-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<mat-select placeholder="Frequency" formControlName="frequency">-->
|
||||||
|
<!--<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>-->
|
||||||
|
<!--</mat-select>-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--<button type="button" mat-raised-button mat-icon-button (click)="addIncomeDetails()"-->
|
||||||
|
<!--*ngIf="i==0">-->
|
||||||
|
<!--<mat-icon>add</mat-icon>-->
|
||||||
|
<!--</button>-->
|
||||||
|
<!--<button type="button" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"-->
|
||||||
|
<!--*ngIf="i>0">-->
|
||||||
|
<!--<mat-icon>close</mat-icon>-->
|
||||||
|
<!--</button>-->
|
||||||
|
<!--</mat-card-content>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</mat-card>-->
|
||||||
|
<!--<mat-form-field>-->
|
||||||
|
<!--<input matInput placeholder="Remarks" formControlName="otherincome_remarks">-->
|
||||||
|
<!--</mat-form-field>-->
|
||||||
|
<!--<button mat-raised-button type="submit" class="button" (click)="submitCurrentDetails()">Submit</button>-->
|
||||||
|
<!--</form>-->
|
||||||
|
<!--</mat-card>-->
|
||||||
|
|
||||||
<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">
|
<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<p>Loan Details<p>
|
<p>Income Details<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="income_details">
|
<div formArrayName="income_details">
|
||||||
<div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index"
|
<div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index"
|
||||||
@ -21,7 +69,7 @@
|
|||||||
<mat-option value="rental_income">Rental Income</mat-option>
|
<mat-option value="rental_income">Rental Income</mat-option>
|
||||||
<mat-option value="interest_income">Interest Income</mat-option>
|
<mat-option value="interest_income">Interest Income</mat-option>
|
||||||
<mat-option value="agricultural_income">Agricultural Income</mat-option>
|
<mat-option value="agricultural_income">Agricultural Income</mat-option>
|
||||||
<mat-option value="dividend_income">Dividend Income and Others</mat-option>
|
<mat-option value="dividend_income">Dividend Income</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -32,21 +80,30 @@
|
|||||||
<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>
|
<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="addIncomeDetails()"
|
<button type="button" matTooltip="Add More Income Details" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="addIncomeDetails()"
|
||||||
*ngIf="i==0">
|
*ngIf="i==0">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"
|
<button type="button" matTooltip="Delete" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"
|
||||||
*ngIf="i>0">
|
*ngIf="i>0">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-form-field>
|
<div fxLayout="row">
|
||||||
<input matInput placeholder="Remarks" formControlName="otherincome_remarks">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="otherincome_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button mat-raised-button type="submit" class="button" (click)="submitCurrentDetails()">Submit</button>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
<div style="text-align: right;">
|
||||||
|
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitCurrentDetails()"><mat-icon>save</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-other-income',
|
selector: 'app-other-income',
|
||||||
templateUrl: './other-income.component.html',
|
templateUrl: './other-income.component.html',
|
||||||
@ -102,7 +103,6 @@ export class OtherIncomeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
submitCurrentDetails() {
|
submitCurrentDetails() {
|
||||||
if (!this.otherIncomeForm.valid) {
|
if (!this.otherIncomeForm.valid) {
|
||||||
this.validateAllFormFields(this.otherIncomeForm);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let records: any = {};
|
let records: any = {};
|
||||||
|
|||||||
@ -111,6 +111,15 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div fxLayout="row">
|
||||||
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="personal_info_form_remark"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- end co applicant form details -->
|
<!-- end co applicant form details -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -123,6 +123,7 @@ var co_result = Object.keys(data.co_applicant_details).map(function(key) {
|
|||||||
form_id:null,
|
form_id:null,
|
||||||
mainItem: mainApplicantGroup,
|
mainItem: mainApplicantGroup,
|
||||||
coItem: coApplicantGroup,
|
coItem: coApplicantGroup,
|
||||||
|
personal_info_form_remark: [data.personal_info_form_remark]
|
||||||
});
|
});
|
||||||
//console.log(this._personalForm);
|
//console.log(this._personalForm);
|
||||||
this.loadDataStatus = true;
|
this.loadDataStatus = true;
|
||||||
@ -178,6 +179,7 @@ var co_result = Object.keys(data.co_applicant_details).map(function(key) {
|
|||||||
form_id:null,
|
form_id:null,
|
||||||
mainItem: mainApplicantGroup,
|
mainItem: mainApplicantGroup,
|
||||||
coItem: coApplicantGroup,
|
coItem: coApplicantGroup,
|
||||||
|
personal_info_form_remark:null
|
||||||
});
|
});
|
||||||
//console.log(this._personalForm);
|
//console.log(this._personalForm);
|
||||||
this.loadDataStatus = true;
|
this.loadDataStatus = true;
|
||||||
@ -236,7 +238,8 @@ submitPersonalForm(formData:any) {
|
|||||||
"pdid": this.pdid,
|
"pdid": this.pdid,
|
||||||
"formid": this.form_id,
|
"formid": this.form_id,
|
||||||
"main_applicant_details":main_applicantDetails,
|
"main_applicant_details":main_applicantDetails,
|
||||||
"co_applicant_details":co_applicantDetails
|
"co_applicant_details":co_applicantDetails,
|
||||||
|
"personal_info_form_remark": this._personalForm.get('personal_info_form_remark').value
|
||||||
};
|
};
|
||||||
this._pd.savePDFormDetailsWithID(save_details).subscribe(result => {
|
this._pd.savePDFormDetailsWithID(save_details).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<p>Raw Materials<p>
|
<p>Raw Materials<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="raw_materials">
|
<div formArrayName="raw_materials">
|
||||||
<div *ngFor="let details of stockForm.get('raw_materials').controls; let i=index"
|
<div *ngFor="let details of stockForm.controls.raw_materials['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<p>Finished Goods<p>
|
<p>Finished Goods<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="finished_goods">
|
<div formArrayName="finished_goods">
|
||||||
<div *ngFor="let details of stockForm.get('finished_goods').controls; let i=index"
|
<div *ngFor="let details of stockForm.controls.finished_goods['controls']; let i=index"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -73,9 +73,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<mat-form-field>
|
<div fxLayout="row">
|
||||||
<input matInput placeholder="Remarks" formControlName="stock_remarks">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
|
<mat-label>Remarks</mat-label>
|
||||||
|
<textarea matInput placeholder="Remarks" formControlName="stock_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
<button mat-raised-button type="submit" class="button" (click)="submitDetails()">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-stock',
|
selector: 'app-stock',
|
||||||
templateUrl: './stock.component.html',
|
templateUrl: './stock.component.html',
|
||||||
@ -120,7 +121,6 @@ export class StockComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
submitDetails() {
|
submitDetails() {
|
||||||
if (!this.stockForm.valid) {
|
if (!this.stockForm.valid) {
|
||||||
this.validateAllFormFields(this.stockForm);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let records: any = {};
|
let records: any = {};
|
||||||
|
|||||||
@ -1,10 +1,15 @@
|
|||||||
<mat-card style="min-height:540px;">
|
<mat-card style="min-height:540px;">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
<div style="text-align: right;" class="mb-1">
|
||||||
|
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
|
||||||
|
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||||
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.INPROGRESS || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.INPROGRESS ? 'COMPLETE':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus ) }}</span></button>
|
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.INPROGRESS || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.COMPLETED);"><span>{{currentPDStatus==pdStatusCheck.INPROGRESS ? 'COMPLETE':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus ) }}</span></button>
|
||||||
|
|
||||||
<!-- {{ (currentPDStatus==pdStatusCheck.INPROGRESS)? 'COMPLETE':(currentPDStatus) }} -->
|
<!--{{ (currentPDStatus==pdStatusCheck.INPROGRESS)? 'COMPLETE':(currentPDStatus) }} -->
|
||||||
|
<div *ngIf="categoryList != ''">
|
||||||
<mat-expansion-panel *ngFor="let category of categoryList;let catIndex = index; ">
|
<mat-expansion-panel *ngFor="let category of categoryList;let catIndex = index; ">
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title class="text-xs-left">
|
<mat-panel-title class="text-xs-left">
|
||||||
@ -21,7 +26,7 @@
|
|||||||
|
|
||||||
</mat-list>
|
</mat-list>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
|
</div>
|
||||||
<mat-list *ngFor="let formButton of categoryFormButtons">
|
<mat-list *ngFor="let formButton of categoryFormButtons">
|
||||||
<mat-list-item class="custm-list-item" (click)="OnSelectDirectForms(formButton)" style="background-color:#e0e0e0">
|
<mat-list-item class="custm-list-item" (click)="OnSelectDirectForms(formButton)" style="background-color:#e0e0e0">
|
||||||
<span class="mt-0">{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}</span>
|
<span class="mt-0">{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}</span>
|
||||||
@ -41,9 +46,9 @@
|
|||||||
<figure>
|
<figure>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
|
||||||
<div fxLayout="row" >
|
<div fxLayout="row">
|
||||||
<button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
|
<!--- <button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
|
||||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>-->
|
||||||
<div fxFlex="33" class="text-xs-left">
|
<div fxFlex="33" class="text-xs-left">
|
||||||
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
||||||
<small>{{pdMasterList.customer_segment_name}}</small>
|
<small>{{pdMasterList.customer_segment_name}}</small>
|
||||||
|
|||||||
@ -116,11 +116,6 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
|||||||
mat-icon{
|
mat-icon{
|
||||||
color: #ff3636;
|
color: #ff3636;
|
||||||
}
|
}
|
||||||
.start_close_btn {
|
|
||||||
position: fixed;
|
|
||||||
right: 69px;
|
|
||||||
top: 112px;
|
|
||||||
}
|
|
||||||
.address {
|
.address {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 2%;
|
padding: 0 2%;
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
// getQuestionsLength:number;
|
// getQuestionsLength:number;
|
||||||
// answerList:any=[];
|
// answerList:any=[];
|
||||||
// ansPDList:any=[];
|
// ansPDList:any=[];
|
||||||
pdFullDetails:any=[];
|
|
||||||
|
|
||||||
// category static form buttons
|
// category static form buttons
|
||||||
categoryFormButtons: any = [
|
categoryFormButtons: any = [
|
||||||
@ -104,6 +104,54 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
"form_name": "Financial Info",
|
"form_name": "Financial Info",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
pdFullDetails:any=[];
|
||||||
|
|
||||||
|
// category static form buttons
|
||||||
|
// categoryFormButtons: any;
|
||||||
|
// = [
|
||||||
|
// {
|
||||||
|
// "form_id": 1,
|
||||||
|
// "form_name": "Supplier Details"
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id": 2,
|
||||||
|
// "form_name": "Client Details",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id": 3,
|
||||||
|
// "form_name": "Personal Details",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id":4,
|
||||||
|
// "form_name":"Asset Details",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id": 5,
|
||||||
|
// "form_name": "Address"
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id": 6,
|
||||||
|
// "form_name": "Family",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id": 7,
|
||||||
|
// "form_name": "Banking",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id": 8,
|
||||||
|
// "form_name": "Current Loan",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id": 9,
|
||||||
|
// "form_name": "Other Income",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "form_id": 10,
|
||||||
|
// "form_name": "Loan Details",
|
||||||
|
// },
|
||||||
|
|
||||||
|
// ];
|
||||||
formsCategoryEnable: boolean = false;
|
formsCategoryEnable: boolean = false;
|
||||||
selectedFormsCategory: any;
|
selectedFormsCategory: any;
|
||||||
// create values for status check
|
// create values for status check
|
||||||
@ -167,6 +215,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// load pd template details
|
// load pd template details
|
||||||
|
|
||||||
// loadTemplates(startID: string) {
|
// loadTemplates(startID: string) {
|
||||||
// this._pd.loadPDTemplates(startID).subscribe(
|
// this._pd.loadPDTemplates(startID).subscribe(
|
||||||
// data => {
|
// data => {
|
||||||
@ -188,6 +237,30 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
// this.currentPDStatus = "";
|
// this.currentPDStatus = "";
|
||||||
// }
|
// }
|
||||||
// }, error => this.errorMessage = <any> error);
|
// }, error => this.errorMessage = <any> error);
|
||||||
|
// }
|
||||||
|
// loadTemplates(startID: string) {
|
||||||
|
// this._pd.loadPDTemplates(startID).subscribe(
|
||||||
|
// data => {
|
||||||
|
// if (data.status == 200) {
|
||||||
|
// this.pdMasterList = data.records.pdmaster_details;
|
||||||
|
// this.categoryList = data.records.question_answers;
|
||||||
|
// // this.categoryFormButtons = data.records.template_forms;
|
||||||
|
// let filterApplicantName = data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||||
|
// this.mainApplicantName = filterApplicantName[0].applicant_name;
|
||||||
|
// this.currentPDStatus = data.records.pdmaster_details.pd_status;
|
||||||
|
//
|
||||||
|
// this.actualQuestions = data.records.counts.overall_question_count;
|
||||||
|
// this.answeredQuestions = data.records.counts.overall_answered_count;
|
||||||
|
//
|
||||||
|
// this.pdFullDetails = data.records
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// this.pdMasterList = "";
|
||||||
|
// this.mainApplicantName = "";
|
||||||
|
// this.categoryList = [];
|
||||||
|
// this.currentPDStatus = "";
|
||||||
|
// }
|
||||||
|
// }, error => this.errorMessage = <any> error);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
@ -211,6 +284,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
"template_id": selectedQuestions.fk_template_id,
|
"template_id": selectedQuestions.fk_template_id,
|
||||||
"category_id": selectedQuestions.fk_template_question_category_id
|
"category_id": selectedQuestions.fk_template_question_category_id
|
||||||
}
|
}
|
||||||
|
this.getAnswers(serachQuestions);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadTemplates(startID:string){
|
loadTemplates(startID:string){
|
||||||
|
|||||||
@ -0,0 +1,51 @@
|
|||||||
|
<div style="height: 550px;">
|
||||||
|
<div style="text-align: right">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()"><mat-icon>close</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<mat-card style="width: 1000px;">
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title>{{pageTitle}}</mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-card-content>
|
||||||
|
|
||||||
|
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||||
|
|
||||||
|
<div *ngIf="pdCentralOfficerList.length > 0" >
|
||||||
|
<div fxLayout="row wrap" fxFlex="100%">
|
||||||
|
<div fxLayout="row wrap" fxFlex="33.33%" *ngFor="let officer of pdCentralOfficerList; ">
|
||||||
|
<mat-card fxFlex="100%">
|
||||||
|
<mat-card-content style="text-align:center">
|
||||||
|
<mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
|
||||||
|
<img [src]="officer.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:50%"><br>
|
||||||
|
<span>{{officer.first_name}}</span>
|
||||||
|
<br>
|
||||||
|
<span>{{officer.mobile_no}}</span><br>
|
||||||
|
<span>PD in hand - {{officer.count}}</span>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<mat-list *ngIf="pdCentralOfficerList.length == 0">
|
||||||
|
<mat-list-item>
|
||||||
|
<p>No central pd officer available.</p>
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
<!-- </form> -->
|
||||||
|
</mat-card-content>
|
||||||
|
<mat-card-actions>
|
||||||
|
<div style="text-align:right;">
|
||||||
|
<button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</mat-card-actions>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
.example-full-width{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { TelePdAllocationComponent } from './tele-pd-allocation.component';
|
||||||
|
|
||||||
|
describe('TelePdAllocationComponent', () => {
|
||||||
|
let component: TelePdAllocationComponent;
|
||||||
|
let fixture: ComponentFixture<TelePdAllocationComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ TelePdAllocationComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(TelePdAllocationComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
import { Component, OnInit, Inject } from '@angular/core';
|
||||||
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-tele-pd-allocation',
|
||||||
|
templateUrl: './tele-pd-allocation.component.html',
|
||||||
|
styleUrls: ['./tele-pd-allocation.component.scss']
|
||||||
|
})
|
||||||
|
export class TelePdAllocationComponent implements OnInit {
|
||||||
|
public pageTitle: string = "Allocate To Central Officer";
|
||||||
|
public _pdAllocationForm: FormGroup;
|
||||||
|
public pdCentralOfficerList: any = [];
|
||||||
|
errorMessage: any;
|
||||||
|
notifier : NotifierService;
|
||||||
|
selectedItem:any;
|
||||||
|
isDisabled: boolean;
|
||||||
|
constructor( notifier: NotifierService,
|
||||||
|
private _fb: FormBuilder,
|
||||||
|
private dialogRef: MatDialogRef<TelePdAllocationComponent>,
|
||||||
|
private _pd: PdTrigerService,
|
||||||
|
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
|
this.notifier=notifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.isDisabled=true;
|
||||||
|
this.getPDOfficerList(this.data.pd_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// pd officer list
|
||||||
|
getPDOfficerList(pdID:string){
|
||||||
|
this._pd.getPdOfficerList(pdID).subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdCentralOfficerList= data.records.centralpdofficers;
|
||||||
|
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
}
|
||||||
|
// select pd officer list
|
||||||
|
selectPdOfficer(selected:any){
|
||||||
|
this.isDisabled=false;
|
||||||
|
this.selectedItem=selected;
|
||||||
|
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
|
||||||
|
}
|
||||||
|
/** To update pd officer*/
|
||||||
|
updatePdOfficer(allocateDate:any) {
|
||||||
|
if(this.isDisabled){
|
||||||
|
this.notifier.notify('warning', 'Please Choose PD Officer.!');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let updateData = {
|
||||||
|
"pd_id":this.data.pd_id,
|
||||||
|
"central_pd_officer_id":allocateDate.fk_user_id,
|
||||||
|
}
|
||||||
|
this._pd.updatePdOfficer(updateData).subscribe(
|
||||||
|
result => {
|
||||||
|
if (result.status == 200) {
|
||||||
|
this.notifier.notify('success', 'PD Allocated.!');
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
this.errorMessage = "Something Wents Wrong Try Again.!";
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
this.errorMessage = "Some Thing Wents Wrong Try Again.!";
|
||||||
|
// this.dialogRef.close();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** For Popup Close Button */
|
||||||
|
closeAllocationComponent(): void {
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -16,8 +16,11 @@
|
|||||||
<!-- <span *ngIf="master.pd_allocated_to" style="color:red;text-align:left" class="fa-1x fa fa-user-secret" matTooltip="PD Officer"
|
<!-- <span *ngIf="master.pd_allocated_to" style="color:red;text-align:left" class="fa-1x fa fa-user-secret" matTooltip="PD Officer"
|
||||||
matTooltipPosition="above"></span> -->
|
matTooltipPosition="above"></span> -->
|
||||||
|
|
||||||
<span *ngIf="master.pd_allocated_to" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer"
|
<span *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer" matTooltipPosition="above">person</mat-icon>{{master.pd_allocated_to | titlecase}}</span>
|
||||||
matTooltipPosition="above">person</mat-icon>{{master.pd_allocated_to | titlecase}}</span>
|
<span *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer" matTooltipPosition="above">person</mat-icon>{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}}</span>
|
||||||
|
<span *ngIf="master.centralofficer && master.fk_pd_type==3" style="color:red;text-align:left"><mat-icon color="primary" class="hover-icon" matTooltip="PD Officer" matTooltipPosition="above">person</mat-icon>{{master.centralofficer | titlecase}}</span>
|
||||||
|
|
||||||
|
|
||||||
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}} On {{master.scheduled_on}}</span>
|
<span *ngIf="master.pd_status==pdStatusCheck.SCHEDULED" style="color:red;text-align:left">{{master.pd_status | titlecase}} On {{master.scheduled_on}}</span>
|
||||||
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED && master.pd_status!=pdStatusCheck.QC_COMPLETED " style="color:red;text-align:left">{{master.pd_status | titlecase}}</span>
|
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED && master.pd_status!=pdStatusCheck.QC_COMPLETED " style="color:red;text-align:left">{{master.pd_status | titlecase}}</span>
|
||||||
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="color:red;text-align:left">QC Completed</span>
|
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="color:red;text-align:left">QC Completed</span>
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { NotifierService } from 'angular-notifier';
|
|||||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
|
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
|
||||||
import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component';
|
import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component';
|
||||||
|
import { TelePdAllocationComponent } from './../tele-pd-allocation/tele-pd-allocation.component';
|
||||||
import { ListPdComponent } from '../list-pd.component';
|
import { ListPdComponent } from '../list-pd.component';
|
||||||
import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
|
import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
|
||||||
import { EditPdApplicantComponent } from '../edit-pd-applicant/edit-pd-applicant.component';
|
import { EditPdApplicantComponent } from '../edit-pd-applicant/edit-pd-applicant.component';
|
||||||
@ -110,7 +111,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
// pd allocation to
|
// pd allocation to
|
||||||
pdAllocationTo(pdData:any) {
|
pdAllocationTo(pdData:any) {
|
||||||
if(pdData.fk_pd_type != 2){
|
if(pdData.fk_pd_type == 1){
|
||||||
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
disableClose: true
|
disableClose: true
|
||||||
@ -133,6 +134,18 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else if(pdData.fk_pd_type == 3){
|
||||||
|
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
|
||||||
|
data: pdData,
|
||||||
|
disableClose: true,
|
||||||
|
});
|
||||||
|
dialogRef.afterClosed()
|
||||||
|
.subscribe(dataresult => {
|
||||||
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
|
|
||||||
|
this.viewPdDetails(this.viewID)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,6 +60,8 @@ import {EmploymentInfoComponent} from "./list-pd/start-pd/forms/employment-info/
|
|||||||
import {BusinessInfoComponent} from "./list-pd/start-pd/forms/business-info/business-info.component";
|
import {BusinessInfoComponent} from "./list-pd/start-pd/forms/business-info/business-info.component";
|
||||||
import {FinancialInfoComponent} from "./list-pd/start-pd/forms/financial-info/financial-info.component";
|
import {FinancialInfoComponent} from "./list-pd/start-pd/forms/financial-info/financial-info.component";
|
||||||
|
|
||||||
|
import { TelePdAllocationComponent } from './list-pd/tele-pd-allocation/tele-pd-allocation.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom angular notifier options
|
* Custom angular notifier options
|
||||||
*/
|
*/
|
||||||
@ -132,7 +134,8 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
|
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
|
||||||
// OwlNativeDateTimeModule,
|
// OwlNativeDateTimeModule,
|
||||||
// ],
|
// ],
|
||||||
declarations: [FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent],
|
declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent],
|
||||||
|
|
||||||
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
||||||
// providers: [PdTrigerService, GetGeometricLocationService],
|
// providers: [PdTrigerService, GetGeometricLocationService],
|
||||||
// entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent],
|
// entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent],
|
||||||
@ -164,7 +167,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
// declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent],
|
// declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent],
|
||||||
exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
||||||
providers: [PdTrigerService, GetGeometricLocationService],
|
providers: [PdTrigerService, GetGeometricLocationService],
|
||||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent]
|
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent]
|
||||||
})
|
})
|
||||||
export class ManagePdModule {
|
export class ManagePdModule {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,8 +46,9 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
saveForm(records): Observable<any> {
|
saveForm(records: any): Observable<any> {
|
||||||
console.log('table', records);
|
console.log('table', records);
|
||||||
|
records.fk_createdby = this._aws.getlocale();
|
||||||
let params = {records}
|
let params = {records}
|
||||||
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -265,7 +266,7 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
|||||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||||
// saveData[0].updatedon = currentdate;
|
// saveData[0].updatedon = currentdate;
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+"savePDQuestions",{"records1":saveData})
|
return this._http.post<any>(this.apiUrl+"savePDQuestions",{"records":saveData})
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
<mat-card style="min-height:540px;">
|
<mat-card style="min-height:540px;">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
<div style="text-align: right;" class="mb-1">
|
||||||
|
<button mat-raised-button mat-icon-button class="hover-icon" type="button" matTooltip="Close" matTooltipPosition="above"
|
||||||
|
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
||||||
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button>
|
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button>
|
||||||
@ -33,8 +37,8 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
|
||||||
<div fxLayout="row" >
|
<div fxLayout="row" >
|
||||||
<button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
|
<!---- <button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
|
||||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>-->
|
||||||
<div fxFlex="33" class="text-xs-left">
|
<div fxFlex="33" class="text-xs-left">
|
||||||
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
||||||
<small>{{pdMasterList.customer_segment_name}}</small>
|
<small>{{pdMasterList.customer_segment_name}}</small>
|
||||||
@ -122,7 +126,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<!-- this section for questions type options button actions -->
|
<!-- this section for questions type options button actions -->
|
||||||
<div fxFlex="40" class="pb-0 text-sm-right">
|
<div fxFlex="40" class="pb-0 text-sm-right" style="margin-top: 7%;">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" matTooltip="Save&Previous" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" (click)="saveNextPrevious(optionsForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltip="Save&Previous" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" (click)="saveNextPrevious(optionsForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||||
@ -225,7 +229,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<!-- this section for questions type options button actions -->
|
<!-- this section for questions type options button actions -->
|
||||||
<div fxFlex="40" class="pb-0 text-sm-right">
|
<div fxFlex="40" class="pb-0 text-sm-right" style="margin-top: 7%;">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Previous" matTooltipPosition="below" (click)="saveNextPreviousText(textBoxForm.controls,previous)"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Previous" matTooltipPosition="below" (click)="saveNextPreviousText(textBoxForm.controls,previous)"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||||
<mat-button-toggle value="bold" matTooltipPosition="below" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltipPosition="below" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||||
@ -321,7 +325,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<!-- this section for questions type options button actions -->
|
<!-- this section for questions type options button actions -->
|
||||||
<div fxFlex="40" class="pb-0 text-sm-right">
|
<div fxFlex="40" class="pb-0 text-sm-right" style="margin-top: 7%;">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Previous" matTooltipPosition="below" (click)="saveNextPrevious(checkBoxForm.controls,previous)"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Previous" matTooltipPosition="below" (click)="saveNextPrevious(checkBoxForm.controls,previous)"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
||||||
|
|||||||
@ -116,8 +116,3 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
|||||||
mat-icon{
|
mat-icon{
|
||||||
color: #ff3636;
|
color: #ff3636;
|
||||||
}
|
}
|
||||||
.start_close_btn {
|
|
||||||
position: fixed;
|
|
||||||
right: 69px;
|
|
||||||
top: 112px;
|
|
||||||
}
|
|
||||||
@ -12,14 +12,14 @@
|
|||||||
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="50">
|
<!-- <div fxFlex="50">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Select Group" formControlName="fk_question_group_id">
|
<mat-select placeholder="Select Group" formControlName="fk_question_group_id">
|
||||||
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
|
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<mat-error *ngIf="submitted && f.fk_question_group_id.hasError('required')" class="mat-text-warn">You must Select Group.</mat-error>
|
<mat-error *ngIf="submitted && f.fk_question_group_id.hasError('required')" class="mat-text-warn">You must Select Group.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
<div class="example-full-width">
|
<div class="example-full-width">
|
||||||
@ -82,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
|
||||||
class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, $event); false"><mat-icon>add</mat-icon></button>
|
class="mr-1 mb-1 hover-icon" (click)="addLanguage(null, null, null, null, $event); false"><mat-icon>add</mat-icon></button>
|
||||||
<!-- <button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage(null, null, null, $event); false">Add More</button> -->
|
<!-- <button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addLanguage(null, null, null, $event); false">Add More</button> -->
|
||||||
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -93,7 +93,7 @@ export class EditComponent implements OnInit {
|
|||||||
question: [this.data.question, Validators.compose([Validators.required])],
|
question: [this.data.question, Validators.compose([Validators.required])],
|
||||||
description: [this.data.description, Validators.compose([Validators.required])],
|
description: [this.data.description, Validators.compose([Validators.required])],
|
||||||
fk_question_category: [this.data.fk_question_category, Validators.compose([Validators.required])],
|
fk_question_category: [this.data.fk_question_category, Validators.compose([Validators.required])],
|
||||||
fk_question_group_id: [this.data.fk_question_group_id, Validators.compose([Validators.required])],
|
// fk_question_group_id: [this.data.fk_question_group_id, Validators.compose([Validators.required])],
|
||||||
fk_question_answertype: [this.data.fk_question_answertype, Validators.compose([Validators.required])],
|
fk_question_answertype: [this.data.fk_question_answertype, Validators.compose([Validators.required])],
|
||||||
isactive: [this.data.isactive],
|
isactive: [this.data.isactive],
|
||||||
answers: this._formBuilder.array([
|
answers: this._formBuilder.array([
|
||||||
@ -115,7 +115,7 @@ export class EditComponent implements OnInit {
|
|||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
answer: [ans, Validators.compose([Validators.required])],
|
answer: [ans, Validators.compose([Validators.required])],
|
||||||
question_answer_id: [fk_id],
|
question_answer_id: [fk_id],
|
||||||
fk_question_group_id: [fk_question_group_id],
|
// fk_question_group_id: [fk_question_group_id],
|
||||||
isactive: [isAct]
|
isactive: [isAct]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user