This commit is contained in:
saravanakumarkandasami 2018-11-09 14:59:32 +05:30
commit 0da947f63a
17 changed files with 1412 additions and 783 deletions

View File

@ -1,96 +1,167 @@
<div class="pad-wrap"> <div class="pad-wrap">
<!--<div fxLayout="row 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"> <div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
<mat-card> <mat-card>
<mat-card-title>Today's Status</mat-card-title>
<mat-card-subtitle></mat-card-subtitle>
<hr> <mat-card-title>{{dashboardTitle}}</mat-card-title>
<mat-card-content> <!-- 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 fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
<mat-card>
<mat-card-title>Today's Status</mat-card-title>
<mat-card-subtitle></mat-card-subtitle>
<hr>
<mat-card-content>
<div class="w-100 h-300px">
<ngx-charts-bar-horizontal-stacked [scheme]="colorScheme" [results]="multi" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend" [showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="yAxisLabel" [yAxisLabel]="xAxisLabel" width="832" height="200">
</ngx-charts-bar-horizontal-stacked>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
<div fxLayout="row">
<div fxFlex="77%">
<mat-card>
<mat-card-title>Today's Details</mat-card-title>
<mat-card-content>
<div class="w-100 h-300px"> <div class="w-100 h-300px">
<ngx-charts-bar-horizontal-stacked [scheme]="colorScheme" [results]="multi" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend" [showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="yAxisLabel" [yAxisLabel]="xAxisLabel" width="832" height="200"> <span>Full</span>
</ngx-charts-bar-horizontal-stacked> <ngx-charts-advanced-pie-chart [view]="view" [scheme]="colorScheme" [results]="full" [gradient]="gradient" >
</div>
</mat-card-content>
</mat-card>
</div>
</div> -->
<div fxLayout="row">
<div fxFlex="77%">
<mat-card>
<mat-card-title>Today's Details</mat-card-title>
<mat-card-content>
<div class="w-100 h-300px">
<span>Full</span>
<ngx-charts-advanced-pie-chart [view]="view" [scheme]="colorScheme" [results]="full" [gradient]="gradient" >
</ngx-charts-advanced-pie-chart>
</div>
<div class="w-100 h-300px">
<span>Smart</span>
<ngx-charts-advanced-pie-chart [view]="view" [scheme]="colorScheme" [results]="smart" [gradient]="gradient" >
</ngx-charts-advanced-pie-chart> </ngx-charts-advanced-pie-chart>
</div> </div>
<div class="w-100 h-300px"> <div class="w-100 h-300px">
<span>Tele</span> <span>Smart</span>
<ngx-charts-advanced-pie-chart [view]="view" [scheme]="colorScheme" [results]="tele" [gradient]="gradient" > <ngx-charts-advanced-pie-chart [view]="view" [scheme]="colorScheme" [results]="smart" [gradient]="gradient" >
</ngx-charts-advanced-pie-chart> </ngx-charts-advanced-pie-chart>
</div> </div>
</mat-card-content> <div class="w-100 h-300px">
</mat-card> <span>Tele</span>
</div> <ngx-charts-advanced-pie-chart [view]="view" [scheme]="colorScheme" [results]="tele" [gradient]="gradient" >
</ngx-charts-advanced-pie-chart>
<div fxFlex="23%" fxLayout="row wrap"> </div>
<div fxFlex="100"> </mat-card-content>
<mat-card> </mat-card>
<mat-card-title><span fxFlex="80">Alert</span> <span fxFlex="20"><mat-icon> warning</mat-icon></span></mat-card-title> </div>-->
<mat-card-content> </div>
<mat-list>
<ng-template let-item let-last="last" ngFor [ngForOf]="message"> <div fxLayout="row">
<mat-list-item> <div fxFlex="100">
<!--<img mat-list-avatar src="{{item.photo}}" alt="">--> <mat-card>
<h3 mat-line> {{item.applicantname}} </h3> <mat-card-title><span fxFlex="80">Alert</span> <span fxFlex="20"><mat-icon> warning</mat-icon></span></mat-card-title>
<p mat-line> {{item.applicantid}}</p> <mat-card-content>
<p mat-line> {{item.lendername}} - {{item.status}} </p> <mat-list>
</mat-list-item> <ng-template let-item let-last="last" ngFor [ngForOf]="message">
</ng-template> <!-- <ng-template *ngFor="let item of message" > -->
</mat-list> <mat-list-item>
</mat-card-content> <!--<img mat-list-avatar src="{{item.photo}}" alt="">-->
</mat-card> <!--<h3 mat-line> {{item.applicantname}} </h3>
</div> <p mat-line> {{item.applicantid}}</p>
<p mat-line> {{item.lendername}} - {{item.status}} </p> -->
<div fxFlex="100"> <h3 mat-line> {{item.applicant_name}} </h3>
<mat-card> <p mat-line> {{item.lender_applicant_id}}</p>
<mat-card-title>Lenderwise</mat-card-title> <p mat-line> {{item.entity_name}} - {{item.pd_status}} </p>
</mat-list-item>
<mat-card-content> </ng-template>
<mat-list> </mat-list>
<ng-template let-item let-last="last" ngFor [ngForOf]="lenderpd"> </mat-card-content>
<mat-list-item> </mat-card>
<h3 mat-line> {{item.lendername}} / {{item.billingaddr}} </h3> </div>
<p mat-line> Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}} </p>
</mat-list-item> <!-- <div fxFlex="100"> -->
</ng-template> <div fxFlex="100">
</mat-list> <mat-card>
</mat-card-content> <mat-card-title>Lenderwise</mat-card-title>
</mat-card>
</div> <mat-card-content>
<div fxFlex="100"> <mat-list>
<mat-card> <!-- {{lenderpd}} -->
<mat-card-title>CityWise</mat-card-title> <ng-template let-item let-last="last" ngFor [ngForOf]="lenderpd">
<mat-card-content> <!-- <ng-template *ngFor="let item of lenderpd" > -->
<mat-list>
<ng-template let-item let-last="last" ngFor [ngForOf]="citywisepd"> <mat-list-item>
<mat-list-item> <h3 mat-line>{{item.full_name}} / {{item.city_name}} </h3>
<h3 mat-line> {{item.cityname}} </h3> <p mat-line> {{item.PDTYPE}} -{{item.count}} </p>
<p mat-line> Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}}</p> <!-- <p mat-line>
</mat-list-item> <div *ngIf="item.PDTYPE == FULL" > {{item.PDTYPE}} -{{item.count}} </div>
</ng-template> <div *ngIf="item.PDTYPE == SMART" > {{item.PDTYPE}} -{{item.count}} </div>
</mat-list> <div *ngIf="item.PDTYPE == TELE" > {{item.PDTYPE}} -{{item.count}} </div> -->
</mat-card-content>
</mat-card> <!-- <h3 mat-line> {{item.lendername}} / {{item.billingaddr}} </h3>
</div> <p mat-line> Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}} </p> -->
</mat-list-item>
</div> </ng-template>
</div> </mat-list>
</div> </mat-card-content>
</mat-card>
</div>
<!-- <div fxFlex="100"> -->
<div fxFlex="100">
<mat-card>
<mat-card-title>CityWise</mat-card-title>
<mat-card-content>
<mat-list>
<ng-template let-item let-last="last" ngFor [ngForOf]="citywisepd">
<!-- <ng-template *ngFor="let item of citywisepd" > -->
<mat-list-item>
<h3 mat-line> {{item.city_name}} </h3>
<!-- <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>
</ng-template>
</mat-list>
</mat-card-content>
</mat-card>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -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;
public showYAxis = true; @ViewChild('mycanvas')
public gradient = true; doughnutChartDataForFullPD:any[]=[];
public showLegend = false; doughnutChartDataForSmartPD:any[]=[];
public showXAxisLabel = true; doughnutChartDataForTelePD:any[]=[];
public xAxisLabel = 'Status'; TempDataFullPD :number[]=[];
public showYAxisLabel = true; TempDataSmartPD :number[]=[];
public yAxisLabel = 'PD'; TempDataTelePD :number[]=[];
view: any[]; total1: number = 0;
width =900; total2: number = 0;
height= 250; total3: number = 0;
public colorScheme = { doughnutChartName:any;
domain: ['#673ab7', '#f44336', '#009688 ', '#2196f3', '#234278 ', '#2a1653'] citywisepd : any[];
}; lenderpd :any[];
public autoScale = true; message : any[];
constructor() { Status = false;
}
ngOnInit(){ // globalChartOptionsFullPD: any = {
this.view = [this.width, this.height]; // responsive: false,
// legend: {
// display: false,
// position: 'bottom'
// }
// };
// globalChartOptionsSmartPD: any = {
// responsive: false,
// legend: {
// display: false,
// position: 'bottom'
// }
// };
globalChartOptions: any = {
responsive: false,
legend: {
display: false,
position: 'bottom'
}
};
TodayFullPD:any = [];
MonthlyFullPD:any = [];
constructor(private _dashboardService: DashboardService) {
}
//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 // Doughnut
full: Object[] = [ //name: "DoughnutTextInside"
{
name: 'Triggered',
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',
}, ];
ngOnInit(){
this.GetData();
this.getDoNUT();
}
GetData(){
this._dashboardService.getLenderDetail().subscribe(data => {
//console.log('Lender');console.log(data);
this.TodayFullPD = data.records;
//City Wise PD Triggered // console.log(this.TodayFullPD);
citywisepd: Object[] = [{ // console.log(this.TodayFullPD.current_day);
cityname: 'Bangalore', // console.log(this.TodayFullPD.current_week);
fullpd:'45', // console.log(this.TodayFullPD.current_month);
smartpd:'17', if(this.TodayFullPD.current_day.length != '0'){
telepd:'10', //console.log('If Condition day');
}, { }
cityname: 'Chennai', else{
fullpd:'33', //console.log('Else Condition day');
smartpd:'16', }
telepd:'8',
}, {
cityname: 'Salem',
fullpd:'22',
smartpd:'12',
telepd:'2',
} ];
// //Same status if(this.TodayFullPD.current_week.length != '0'){
message: Object[] = [{ //console.log('If Condition week');
applicantname: 'Saravana', }
applicantid:'ICICITN0118000354', else{
lendername:'ICICI', //console.log('Else Condition week');
status:'Allocated', }
photo: 'assets/images/face3.jpg',
}, { if(this.TodayFullPD.current_month.length != '0'){
applicantname: 'Kumaran', this.lenderpd = this.TodayFullPD.current_month;
applicantid:'IOBKA0418000578', console.log('******************** lender');
lendername:'IOB', console.log(this.lenderpd);
status:'Allocated',
photo: 'assets/images/face6.jpg', // for(let contact of this.TodayFullPD.current_month) {
}, { // let message = contact;
applicantname: 'Priya', // }
applicantid:'SBIGA0118000241',
lendername:'SBI', }
status:'Triggered', else{
photo: 'assets/images/face4.jpg', //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; }
}

View File

@ -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 ]
}) })

View 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();
});
});

View 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);
};
}
}

View File

@ -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{

View File

@ -104,11 +104,25 @@
</div> </div>
</div> </div>
</mat-card> </mat-card>
<div style="text-align: right;"> <div style="text-align: right;">
<button mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="onSubmit()"><mat-icon>save</mat-icon> <button mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="onSubmit()"><mat-icon>save</mat-icon>
</button> </button>
</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="address_form_remark"></textarea>
</mat-form-field>
</div>
</div>
<button mat-raised-button type="submit" class="button" (click)="onSubmit()">Submit
</button>
</form> </form>
<notifier-container></notifier-container> <notifier-container></notifier-container>
</mat-card-content> </mat-card-content>

View File

@ -72,6 +72,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 +99,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'];
@ -175,6 +177,7 @@ 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.address_form_remark = this.addressForm.controls.address_form_remark.value;
records.pdid = this.pdid; records.pdid = this.pdid;
records.formid = '5'; records.formid = '5';
// records.fk_createdby = '250'; // records.fk_createdby = '250';

View File

@ -1,4 +1,5 @@
<!--<pre> {{ m_group | json}}</pre>--> <!--<pre> {{ m_group | json}}</pre>-->
<mat-card style="min-height: 550px;" > <mat-card style="min-height: 550px;" >
<mat-card-content> <mat-card-content>
<p>Assets Details</p> <p>Assets Details</p>
@ -16,6 +17,7 @@
<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-->
@ -206,9 +208,8 @@
<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'">Is there a loan?</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">
<input matInput placeholder="EMI Paid" formControlName="emi_paid"> <input matInput placeholder="EMI Paid" formControlName="emi_paid">
@ -235,13 +236,24 @@
</div> </div>
</div> </div>
</div> </div>
</mat-card-content> </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>
@ -249,4 +261,6 @@
</form> </form>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>

View File

@ -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;

View File

@ -62,6 +62,14 @@
</mat-accordion> </mat-accordion>
</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="banking_form_remark"></textarea>
</mat-form-field>
</div>
</div>
<div style="text-align: right;" class="pt-1"> <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 Bank Details" matTooltipPosition="above" (click)="addBankdetails(i)"> <button class="mr-1 mb-1" color="primary" mat-raised-button mat-icon-button matTooltip="Add More Bank Details" matTooltipPosition="above" (click)="addBankdetails(i)">
<mat-icon >add</mat-icon> <mat-icon >add</mat-icon>
@ -74,3 +82,4 @@
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>

View File

@ -49,6 +49,9 @@ export class BankingDetailsComponent implements OnInit {
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];
}); });
@ -67,6 +70,7 @@ 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([])
}); });
} }
@ -99,6 +103,7 @@ export class BankingDetailsComponent implements OnInit {
let records: any = {}; let records: any = {};
records.pdid = this.pdid; records.pdid = this.pdid;
records.formid = '7'; records.formid = '7';
records.banking_form_remark = this.bankingForm.controls.banking_form_remark.value;
// records.fk_createdby = '252'; // 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);

View File

@ -104,8 +104,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>
@ -132,11 +131,20 @@
</mat-form-field> </mat-form-field>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
<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="family_details_form_remark"></textarea>
</mat-form-field>
</div>
</div>
<div style="text-align: right;"> <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 type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon>
</button> </button>
</div> </div>
</form> </form>
<notifier-container></notifier-container> <notifier-container></notifier-container>
</mat-card-content> </mat-card-content>

View File

@ -84,6 +84,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);
} }
@ -122,7 +124,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'];
@ -212,6 +215,7 @@ 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.family_details_form_remark = this.familyForm.controls['family_details_form_remark'].value;
records.pdid = this.pdid; records.pdid = this.pdid;
records.formid = '6'; records.formid = '6';
// records.fk_createdby = '251'; // records.fk_createdby = '251';

View File

@ -112,6 +112,15 @@
</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="personal_info_form_remark"></textarea>
</mat-form-field>
</div>
</div>
<!-- end co applicant form details --> <!-- end co applicant form details -->
</mat-card-content> </mat-card-content>

View File

@ -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) {