This commit is contained in:
dineshkumarkannan 2018-11-09 15:41:14 +05:30
commit b0eb053f40
16 changed files with 1834 additions and 1198 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>
</mat-card-content>
</mat-card>
</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">
<mat-list-item> <!-- <ng-template *ngFor="let item of message" > -->
<!--<img mat-list-avatar src="{{item.photo}}" alt="">--> <mat-list-item>
<h3 mat-line> {{item.applicantname}} </h3> <!--<img mat-list-avatar src="{{item.photo}}" alt="">-->
<p mat-line> {{item.applicantid}}</p> <!--<h3 mat-line> {{item.applicantname}} </h3>
<p mat-line> {{item.lendername}} - {{item.status}} </p> <p mat-line> {{item.applicantid}}</p>
</mat-list-item> <p mat-line> {{item.lendername}} - {{item.status}} </p> -->
</ng-template> <h3 mat-line> {{item.applicant_name}} </h3>
</mat-list> <p mat-line> {{item.lender_applicant_id}}</p>
</mat-card-content> <p mat-line> {{item.entity_name}} - {{item.pd_status}} </p>
</mat-card> </mat-list-item>
</div> </ng-template>
</mat-list>
</mat-card-content>
</mat-card>
</div>
<div fxFlex="100"> <!-- <div fxFlex="100"> -->
<mat-card> <div fxFlex="100">
<mat-card-title>Lenderwise</mat-card-title> <mat-card>
<mat-card-title>Lenderwise</mat-card-title>
<mat-card-content> <mat-card-content>
<mat-list> <mat-list>
<ng-template let-item let-last="last" ngFor [ngForOf]="lenderpd"> <!-- {{lenderpd}} -->
<mat-list-item> <ng-template let-item let-last="last" ngFor [ngForOf]="lenderpd">
<h3 mat-line> {{item.lendername}} / {{item.billingaddr}} </h3> <!-- <ng-template *ngFor="let item of lenderpd" > -->
<p mat-line> Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}} </p>
</mat-list-item>
</ng-template>
</mat-list>
</mat-card-content>
</mat-card>
</div>
<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">
<mat-list-item>
<h3 mat-line> {{item.cityname}} </h3>
<p mat-line> Full -{{item.fullpd}} / Smart -{{item.smartpd}} / Tele - {{item.telepd}}</p>
</mat-list-item>
</ng-template>
</mat-list>
</mat-card-content>
</mat-card>
</div>
</div> <mat-list-item>
</div> <h3 mat-line>{{item.full_name}} / {{item.city_name}} </h3>
</div> <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>
</ng-template>
</mat-list>
</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; @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: false,
position: 'bottom'
}
}; };
public autoScale = true;
constructor() { TodayFullPD:any = [];
} MonthlyFullPD:any = [];
ngOnInit(){
this.view = [this.width, this.height]; constructor(private _dashboardService: DashboardService) {
}
// Doughnut
//name: "DoughnutTextInside"
ngOnInit(){
this.GetData();
this.getDoNUT();
} }
//pie chart
single: Object[] = [ GetData(){
{ this._dashboardService.getLenderDetail().subscribe(data => {
name: 'Germany', //console.log('Lender');console.log(data);
value: 40632 this.TodayFullPD = data.records;
},
{ // console.log(this.TodayFullPD);
name: 'USA', // console.log(this.TodayFullPD.current_day);
value: 49737 // console.log(this.TodayFullPD.current_week);
}, // console.log(this.TodayFullPD.current_month);
{ if(this.TodayFullPD.current_day.length != '0'){
name: 'France', //console.log('If Condition day');
value: 36745 }
}, else{
{ //console.log('Else Condition day');
name: 'UK',
value: 36240
},
{
name: 'Spain',
value: 33000
},
{
name: 'Italy',
value: 35800
} }
];
//Full Pd Data if(this.TodayFullPD.current_week.length != '0'){
full: Object[] = [ //console.log('If Condition week');
{ }
name: 'Triggered', else{
value: 45 //console.log('Else Condition week');
}, }
{
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',
}, ];
if(this.TodayFullPD.current_month.length != '0'){
this.lenderpd = this.TodayFullPD.current_month;
console.log('******************** lender');
console.log(this.lenderpd);
//City Wise PD Triggered // for(let contact of this.TodayFullPD.current_month) {
citywisepd: Object[] = [{ // let message = contact;
cityname: 'Bangalore', // }
fullpd:'45',
smartpd:'17', }
telepd:'10', else{
}, { //console.log('Else Condition month');
cityname: 'Chennai', }
fullpd:'33', });
smartpd:'16', this._dashboardService.getAlertDetail().subscribe(data => {
telepd:'8', console.log('Alert*********************************');console.log(data);
}, { this.message = data.records;
cityname: 'Salem', console.log(this.message);
fullpd:'22', });
smartpd:'12', this._dashboardService.getCityDetail().subscribe(data => {console.log('City');console.log(data);
telepd:'2', 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',
} ];
} }

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

@ -1,4 +1,6 @@
<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">
@ -57,7 +59,7 @@
</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">
@ -86,22 +88,30 @@
<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>
<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>
</div>
<div fxLayout="row"> <div fxLayout="row">
<div fxFlex="60" class="pb-0 text-sm-left"> <div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%"> <mat-form-field appearance="outline" style="width: 100%">
@ -110,7 +120,13 @@
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
<button mat-raised-button type="submit" class="button" (click)="onSubmit()">Submit <div class="row" style="text-align:right;">
</button> <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>
<notifier-container></notifier-container> <notifier-container></notifier-container>
</mat-card-content>
</mat-card>

View File

@ -1,232 +1,252 @@
<!--<pre> {{ m_group | json}}</pre>--> <!--<pre> {{ m_group | json}}</pre>-->
<mat-card style="padding: 12px;">
<form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_assetsQuesFrom" (submit)="onSubmit()" novalidate> <mat-card style="min-height: 550px;" >
<div fxLayout="row" fxLayoutAlign="start none"> <mat-card-content>
<div formArrayName="assets_details" fxFill> <p>Assets Details</p>
<div *ngFor="let sup of _assetsQuesFrom.controls.assets_details['controls']; let i=index"> <form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_assetsQuesFrom" (submit)="onSubmit()" novalidate>
<mat-card> <div fxLayout="row" fxLayoutAlign="start none">
<div [formGroupName]="i"> <div formArrayName="assets_details" fxFill>
<div fxLayout="row wrap" fxLayoutGap="12px" fxLayoutAlign="start none"> <div *ngFor="let sup of _assetsQuesFrom.controls.assets_details['controls']; let i=index">
<div> <mat-card>
<mat-form-field> <mat-card-content>
<mat-select (selectionChange)="selectedAssetsType($event, i)" placeholder="Select Assets Type" formControlName="assets_mode"> <div [formGroupName]="i">
<mat-option *ngFor="let asset of m_assets_type" [value]="asset.id">{{ asset.name }}</mat-option> <div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
</mat-select> <div>
</mat-form-field> <mat-form-field>
</div> <mat-select (selectionChange)="selectedAssetsType($event, i)" placeholder="Assets Type" formControlName="assets_mode">
</div> <mat-option *ngFor="let asset of m_assets_type" [value]="asset.id">{{ asset.name }}</mat-option>
<!--Desction Dynamic details: START--> </mat-select>
<div formArrayName="details" class="example-full-width"> </mat-form-field>
<!--Property-->
<div *ngIf="sup.get('assets_mode').value == 1 "> </div>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> </div>
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> <!--Desction Dynamic details: START-->
<div [formGroupName]="s"> <div formArrayName="details" class="example-full-width">
<div> <!--Property-->
<mat-form-field> <div *ngIf="sup.get('assets_mode').value == 1 ">
<mat-select placeholder="Select Property" formControlName="property_type"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
</mat-select> <div [formGroupName]="s">
</mat-form-field> <div>
</div> <mat-form-field>
</div> <mat-select placeholder="Select Property" formControlName="property_type">
</div> <mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
</div> </mat-select>
</div> </mat-form-field>
<!--Four Wheeler--> </div>
<div *ngIf="sup.get('assets_mode').value == 2"> </div>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> </div>
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> </div>
<div [formGroupName]="s"> </div>
<div> <!--Four Wheeler-->
<mat-form-field class="ml-xs example-full-width"> <div *ngIf="sup.get('assets_mode').value == 2">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
</mat-form-field> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
</div> <div [formGroupName]="s">
</div> <div>
</div> <mat-form-field class="ml-xs example-full-width">
</div> <input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model">
</div> </mat-form-field>
<!--Two Wheeler--> </div>
<div *ngIf="sup.get('assets_mode').value == 3"> </div>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> </div>
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> </div>
<div [formGroupName]="s"> </div>
<div> <!--Two Wheeler-->
<mat-form-field class="ml-xs example-full-width"> <div *ngIf="sup.get('assets_mode').value == 3">
<input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
</mat-form-field> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
</div> <div [formGroupName]="s">
</div> <div>
</div> <mat-form-field class="ml-xs example-full-width">
</div> <input matInput placeholder="Manufacturer, Model" formControlName="manufacturer_model">
</div> </mat-form-field>
<!--jwell details--> </div>
<div *ngIf="sup.get('assets_mode').value == 4"> </div>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> </div>
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> </div>
<div [formGroupName]="s"> </div>
<div> <!--jwell details
<mat-form-field class="ml-xs example-full-width"> <div *ngIf="sup.get('assets_mode').value == 4">
<input matInput placeholder="Description" formControlName="jwell_description"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
</mat-form-field> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
</div> <div [formGroupName]="s">
</div> <div>
</div> <mat-form-field class="ml-xs example-full-width">
</div> <input matInput placeholder="Description" formControlName="jwell_description">
</div> </mat-form-field>
<!--Consumer Durable--> </div>
<div *ngIf="sup.get('assets_mode').value == 5"> </div>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> </div>
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> </div>
<div [formGroupName]="s"> </div>-->
<div> <!--Consumer Durable-->
<mat-form-field class="ml-xs example-full-width"> <div *ngIf="sup.get('assets_mode').value == 5">
<input matInput placeholder="Description" formControlName="consumer_durable_description"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
</mat-form-field> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
</div> <div [formGroupName]="s">
</div> <div>
</div> <mat-form-field class="ml-xs example-full-width">
</div> <input matInput placeholder="Description" formControlName="consumer_durable_description">
</div> </mat-form-field>
<!--Insurance--> </div>
<div *ngIf="sup.get('assets_mode').value == 6"> </div>
<div fxFill> </div>
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> </div>
<div [formGroupName]="s"> </div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <!--Insurance-->
<div fxFlex="33"> <div *ngIf="sup.get('assets_mode').value == 6">
<mat-form-field> <div fxFill>
<mat-select placeholder="Type" formControlName="insurance_type"> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
<mat-option *ngFor="let ins_type of m_insuranceType" [value]="ins_type.id">{{ ins_type.name }}</mat-option> <div [formGroupName]="s">
</mat-select> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
</mat-form-field> <div fxFlex="33">
</div> <mat-form-field>
<div fxFlex="33"> <mat-select placeholder="Type" formControlName="insurance_type">
<mat-form-field class="ml-xs example-full-width"> <mat-option *ngFor="let ins_type of m_insuranceType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
<input matInput placeholder="Premium Paid" formControlName="premium_paid"> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex="33"> <div fxFlex="33">
<mat-form-field> <mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Frequency" formControlName="frequency_mode"> <input matInput placeholder="Premium Paid" formControlName="premium_paid">
<mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.id">{{ freqn.name }}</mat-option> </mat-form-field>
</mat-select> </div>
</mat-form-field> <div fxFlex="33">
</div> <mat-form-field>
</div> <mat-select placeholder="Frequency" formControlName="frequency_mode">
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <mat-option *ngFor="let freqn of m_freqOfPurchase" [value]="freqn.id">{{ freqn.name }}</mat-option>
<div fxFlex="33"> </mat-select>
<mat-form-field class="ml-xs example-full-width"> </mat-form-field>
<input matInput placeholder="Sum Assured" formControlName="sum_assured"> </div>
</mat-form-field> </div>
</div> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<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="Members Covered" formControlName="members_coverd"> <input matInput placeholder="Sum Assured" formControlName="sum_assured">
</mat-form-field> </mat-form-field>
</div> </div>
</div> <div fxFlex="33">
</div> <mat-form-field class="ml-xs example-full-width">
</div> <input matInput placeholder="Members Covered" formControlName="members_coverd">
</div> </mat-form-field>
</div> </div>
<!--Investments--> </div>
<div *ngIf="sup.get('assets_mode').value == 7"> </div>
<div> </div>
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> </div>
<div [formGroupName]="s"> </div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <!--Investments-->
<div fxFlex="33"> <div *ngIf="sup.get('assets_mode').value == 7">
<mat-form-field> <div>
<mat-select placeholder="Type" formControlName="investments_type"> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
<mat-option *ngFor="let ins_type of m_investmentType" [value]="ins_type.id">{{ ins_type.name }}</mat-option> <div [formGroupName]="s">
</mat-select> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
</mat-form-field> <div fxFlex="33">
</div> <mat-form-field>
<div fxFlex="33"> <mat-select placeholder="Type" formControlName="investments_type">
<mat-form-field class="ml-xs example-full-width"> <mat-option *ngFor="let ins_type of m_investmentType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest"> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<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="Bank Name" formControlName="bank_name"> <input matInput placeholder="Amount of Investment" formControlName="amount_of_invest">
</mat-form-field> </mat-form-field>
</div> </div>
</div> <div fxFlex="33">
</div> <mat-form-field class="ml-xs example-full-width">
</div> <input matInput placeholder="Bank Name" formControlName="bank_name">
</div> </mat-form-field>
</div> </div>
<!--other assets--> </div>
<div *ngIf="sup.get('assets_mode').value == 8"> </div>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> </div>
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> </div>
<div [formGroupName]="s"> </div>
<div> <!--other assets-->
<mat-form-field class="ml-xs example-full-width"> <div *ngIf="sup.get('assets_mode').value == 8">
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
</mat-form-field> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
</div> <div [formGroupName]="s">
</div> <div>
</div> <mat-form-field class="ml-xs example-full-width">
</div> <input matInput placeholder="Description of the Assets" formControlName="any_other_assets">
</div> </mat-form-field>
</div> </div>
<!--Desction Dynamic details : END --> </div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> </div>
<div fxFlex="33"> </div>
<mat-form-field class="ml-xs example-full-width"> </div>
<input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value"> </div>
</mat-form-field> <!--Desction Dynamic details : END -->
</div> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33"> <div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 4">
<mat-form-field class="ml-xs example-full-width"> <div fxFlex="33">
<input matInput placeholder="Name of the Owner" formControlName="name_of_the_owner"> <mat-form-field class="ml-xs example-full-width">
</mat-form-field> <input matInput placeholder="Approximate Market Value" formControlName="approximate_market_value">
</div> </mat-form-field>
<div fxFlex="33"> </div>
<mat-form-field class="ml-xs example-full-width"> </div>
<input matInput placeholder="Year of Purchase and Approximate month" formControlName="year_of_purchase"> <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">
</mat-form-field>
</div> <div fxFlex="33">
</div> <mat-form-field class="ml-xs example-full-width">
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <input matInput placeholder="Name of the Owner" formControlName="name_of_the_owner">
<div fxFlex="33"> </mat-form-field>
<mat-checkbox formControlName="emi" [ngModel]="sup.get('emi').value === '1' ? true : false" (ngModelChange)="sup.get('emi').value = $event ? '1' : '0'">EMI</mat-checkbox> </div>
</div> </div>
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33"> <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">
<mat-form-field class="ml-xs example-full-width"> <div fxFlex="33">
<input matInput placeholder="EMI Paid" formControlName="emi_paid"> <mat-form-field class="ml-xs example-full-width">
</mat-form-field> <input matInput placeholder="Year and month of purchase" formControlName="year_of_purchase">
</div> </mat-form-field>
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33"> </div>
<mat-form-field class="ml-xs example-full-width"> </div>
<input matInput placeholder="Elapsed Tenure" formControlName="elapsed_tenure"> </div>
</mat-form-field> <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>
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field class="ml-xs example-full-width"> <div fxFlex="33">
<input matInput placeholder="Balance Tenure" formControlName="balance_tenure"> <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>
</mat-form-field> </div>
</div> <div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
</div> <mat-form-field class="ml-xs example-full-width">
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none"> <input matInput placeholder="EMI Paid" formControlName="emi_paid">
<div fxFlex="20"> </mat-form-field>
<span *ngIf="_assetsQuesFrom.controls.assets_details.controls.length > 1" (click)="removeLanguage(i)"> </div>
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button> <div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
</span> <mat-form-field class="ml-xs example-full-width">
</div> <input matInput placeholder="Elapsed Tenure in months" formControlName="elapsed_tenure">
</mat-form-field>
</div>
<div *ngIf="sup.get('emi').value === '1'" fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Balance Tenure in months" formControlName="balance_tenure">
</mat-form-field>
</div>
</div>
</div>
<div fxLayout="row" fxLayoutGap="12px" fxLayoutAlign="start none">
<div fxFlex="20">
<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>
</span>
</div>
</div>
</div>
</mat-card-content>
</mat-card>
</div> </div>
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above"
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
</div> </div>
</mat-card>
</div> </div>
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" <!--<div fxLayout="row">
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
</div>
</div>
<!--<div fxLayout="row">
<div fxFlex="60" class="pb-0 text-sm-left"> <div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%"> <mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label> <mat-label>Remarks</mat-label>
@ -234,9 +254,13 @@
</mat-form-field> </mat-form-field>
</div> </div>
</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>

View File

@ -1,74 +1,85 @@
<form [formGroup]="bankingForm" class="bankForm"> <mat-card style="min-height: 550px;">
<div formArrayName="itemRows"> <mat-card-content>
<mat-accordion <p>Banking Information</p>
*ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index" <form [formGroup]="bankingForm" class="bankForm">
[formGroupName]="i"> <div formArrayName="itemRows">
<mat-expansion-panel class="banlFields" [expanded]="step == i"> <mat-accordion
<mat-expansion-panel-header> *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index"
<mat-panel-title> [formGroupName]="i">
<h4>{{i+1}} Banking details<span *ngIf="i==0" style="float: right;"> <mat-expansion-panel class="banlFields" [expanded]="step == i">
<mat-icon (click)="addBankdetails(i)">add</mat-icon> <mat-expansion-panel-header>
</span> <mat-panel-title>
<span *ngIf="i > 0"> <p>{{i+1}} , Banking Details
<mat-icon (click)="deleteBankdetails(i)">delete</mat-icon> </p>
</span></h4> </mat-panel-title>
</mat-panel-title> </mat-expansion-panel-header>
</mat-expansion-panel-header> <mat-form-field>
<mat-form-field> <input matInput placeholder="Applicant Name"
<input matInput placeholder="Applicant Name" formControlName="applicant_name">
formControlName="applicant_name"> </mat-form-field>
</mat-form-field> <mat-form-field>
<mat-form-field> <input matInput placeholder="Bank Name" formControlName="bank_name">
<input matInput placeholder="Bank Name" formControlName="bank_name"> </mat-form-field>
</mat-form-field>
<mat-form-field> <mat-form-field>
<mat-select placeholder="Account Type" <mat-select placeholder="Account Type"
formControlName="account_type"> formControlName="account_type">
<mat-option value="Savings">Savings</mat-option> <mat-option value="Savings">Savings</mat-option>
<mat-option value="Current">Current</mat-option> <mat-option value="Current">Current</mat-option>
<mat-option value="OD">OD</mat-option> <mat-option value="OD">OD</mat-option>
<mat-option value="CC">CC</mat-option> <mat-option value="CC">CC</mat-option>
</mat-select> </mat-select>
</mat-form-field> </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>
<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-accordion>
</div>
<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>
</div>
</form>
<notifier-container></notifier-container>
</mat-card-content>
</mat-card>
<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>
<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>
<button mat-raised-button class="button" (click)="bankSubmit()">Submit
</button>
</form>
<notifier-container></notifier-container>

View File

@ -1,5 +1,5 @@
.banlFields mat-form-field { .banlFields mat-form-field {
width: 100%; //width: 100%;
margin: 0 2%; margin: 0 2%;
} }
.bankForm .button { .bankForm .button {

View File

@ -1,49 +1,58 @@
<p>Current Loan Details</p> <mat-card style="min-height: 550px;">
<form [formGroup]="currentLoanForm" class="address"> <mat-card-content>
<mat-form-field> <p>Current Loan Details</p>
<mat-select placeholder="Do you have any other existing Loan" <form [formGroup]="currentLoanForm" class="address">
formControlName="existing_loan"> <mat-form-field>
<mat-option value="Yes">Yes</mat-option> <mat-select placeholder="Do you have any other existing loan"
<mat-option value="No">No</mat-option> formControlName="existing_loan">
</mat-select> <mat-option value="Yes">Yes</mat-option>
</mat-form-field> <mat-option value="No">No</mat-option>
<mat-card *ngIf="currentLoanForm.controls.existing_loan.value == 'Yes'"> </mat-select>
<mat-card-header> </mat-form-field>
<p>Loan Details<p> <mat-card *ngIf="currentLoanForm.controls.existing_loan.value == 'Yes'">
</mat-card-header> <mat-card-header>
<div formArrayName="loan_details"> <p>Loan Details<p>
<div *ngFor="let details of currentLoanForm.get('loan_details').controls; let i=index" </mat-card-header>
[formGroupName]="i"> <div formArrayName="loan_details">
<mat-card-content class="matcard"> <div *ngFor="let details of currentLoanForm.get('loan_details').controls; let i=index"
<mat-form-field> [formGroupName]="i">
<input matInput placeholder="Loan Amount" formControlName="loan_amount"> <mat-card-content class="matcard">
</mat-form-field> <mat-form-field>
<mat-form-field> <input matInput placeholder="Loan Amount" formControlName="loan_amount">
<input matInput placeholder="EMI" formControlName="emi"> </mat-form-field>
</mat-form-field> <mat-form-field>
<mat-form-field> <input matInput placeholder="EMI" formControlName="emi">
<input matInput placeholder="Loan Type" formControlName="loan_type"> </mat-form-field>
</mat-form-field> <mat-form-field>
<mat-form-field> <input matInput placeholder="Loan Type" formControlName="loan_type">
<input matInput placeholder="Lender" formControlName="lender"> </mat-form-field>
</mat-form-field> <mat-form-field>
<mat-form-field> <input matInput placeholder="Lender" formControlName="lender">
<input matInput placeholder="Original Tenure" formControlName="original_tenure"> </mat-form-field>
</mat-form-field> <mat-form-field>
<mat-form-field> <input matInput placeholder="Original Tenure" formControlName="original_tenure">
<input matInput placeholder="Current Balance Tenure" formControlName="current_balance_tenure"> </mat-form-field>
</mat-form-field> <mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addLoanDetails()" <input matInput placeholder="Current Balance Tenure" formControlName="current_balance_tenure">
*ngIf="i==0"> </mat-form-field>
<mat-icon>add</mat-icon> <button type="button" mat-raised-button mat-icon-button matTooltip="Add More Loan Details" matTooltipPosition="above" (click)="addLoanDetails()"
</button> *ngIf="i==0">
<button type="button" mat-raised-button mat-icon-button (click)="deleteLoanDetails(i)" <mat-icon>add</mat-icon>
*ngIf="i>0"> </button>
<mat-icon>close</mat-icon> <button type="button" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)"
</button> *ngIf="i>0">
</mat-card-content> <mat-icon>delete</mat-icon>
</div> </button>
</div> </mat-card-content>
</mat-card> </div>
<button mat-raised-button type="submit" class="button" (click)="submitCurrentloan()"></button> </div>
</form> </mat-card>
<div style="text-align: right;">
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitCurrentloan()"><mat-icon>save</mat-icon>
</button>
</div>
</form>
</mat-card-content>
</mat-card>

View File

@ -1,4 +1,6 @@
<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">
@ -52,7 +54,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>
@ -94,7 +96,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>
@ -102,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>
@ -125,19 +126,26 @@
<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>
<div fxLayout="row"> <div fxLayout="row">
<div fxFlex="60" class="pb-0 text-sm-left"> <div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%"> <mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label> <mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="family_details_form_remark"></textarea> <textarea matInput placeholder="Remarks" formControlName="family_details_form_remark"></textarea>
</mat-form-field> </mat-form-field>
</div> </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> </div>
<button mat-raised-button class="button" (click)="submitFamily()">Submit</button> </form>
</form>
<notifier-container></notifier-container> <notifier-container></notifier-container>
</mat-card-content>
</mat-card>

View File

@ -43,7 +43,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',

View File

@ -1,47 +1,56 @@
<form [formGroup]="otherIncomeForm" class="address"> <mat-card style="min-height: 550px;">
<mat-form-field> <mat-card-content>
<mat-select placeholder="Other Income" <p>Other Income Details</p>
formControlName="other_income"> <form [formGroup]="otherIncomeForm" class="address">
<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-form-field> <mat-form-field>
<mat-select placeholder="Source" <mat-select placeholder="Other Income"
formControlName="source"> formControlName="other_income">
<mat-option value="rental_income">Rental Income</mat-option> <mat-option value="Yes">Yes</mat-option>
<mat-option value="interest_income">Interest Income</mat-option> <mat-option value="No">No</mat-option>
<mat-option value="agricultural_income">Agricultural Income</mat-option>
<mat-option value="dividend_income">Dividend Income and Others</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">
<input matInput placeholder="Amount" formControlName="amount"> <mat-card-header>
</mat-form-field> <p>Income Details<p>
<mat-form-field> </mat-card-header>
<mat-select placeholder="Frequency" formControlName="frequency"> <div formArrayName="income_details">
<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option> <div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index"
</mat-select> [formGroupName]="i">
</mat-form-field> <mat-card-content class="matcard">
<button type="button" mat-raised-button mat-icon-button (click)="addIncomeDetails()" <mat-form-field>
*ngIf="i==0"> <mat-select placeholder="Source"
<mat-icon>add</mat-icon> formControlName="source">
</button> <mat-option value="rental_income">Rental Income</mat-option>
<button type="button" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)" <mat-option value="interest_income">Interest Income</mat-option>
*ngIf="i>0"> <mat-option value="agricultural_income">Agricultural Income</mat-option>
<mat-icon>close</mat-icon> <mat-option value="dividend_income">Dividend Income</mat-option>
</button> </mat-select>
</mat-card-content> </mat-form-field>
</div> <mat-form-field>
</div> <input matInput placeholder="Amount" formControlName="amount">
</mat-card> </mat-form-field>
<button mat-raised-button type="submit" class="button" (click)="submitCurrentDetails()"></button> <mat-form-field>
</form> <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" matTooltip="Add More Income Details" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="addIncomeDetails()"
*ngIf="i==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" matTooltip="Delete" matTooltipPosition="above" mat-raised-button mat-icon-button (click)="deleteIncomeDetails(i)"
*ngIf="i>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</div>
</mat-card>
<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>

View File

@ -72,7 +72,7 @@
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> --> <!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->
<input matInput placeholder="Entity" formControlName="entity_ans" type="text" required> <input matInput placeholder="Entity" formControlName="entity_ans" type="text" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> --> <!-- <mat-label>{{coDetails.controls.pd_question.value}}</mat-label> -->