This commit is contained in:
venbatechnologies@gmail.com 2019-02-09 09:51:23 +05:30
commit 4edf863ff0
21 changed files with 202 additions and 89 deletions

View File

@ -75,8 +75,8 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Name"> <ng-container matColumnDef="Name">
<mat-cell class="cell" *matCellDef="let details;"> <mat-cell class="cell" *matCellDef="let details;">
<span *ngIf="details.applicat_details" mat-line> <span *ngIf="details.applicant_name" mat-line>
<b>{{details.applicat_details[0].applicant_name}}</b> <b>{{details.applicant_name}}</b>
</span> </span>
<br> <br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize"> {{details.lender_applicant_id}}</span>

View File

@ -13,8 +13,17 @@
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="60" fxFlex.xl="60"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="60" fxFlex.xl="60">
<mat-card> <mat-card>
<mat-card-content> <mat-card-content>
<agm-map [latitude]="lat" [longitude]="lng"> <agm-map [latitude]="lat" [longitude]="lng" [zoom]="10" #gm>
<agm-marker *ngFor="let getMap of mapDetails" [latitude]="getMap.lat" [longitude]="getMap.lng"></agm-marker> <agm-marker *ngFor="let getMap of mapDetails" [latitude]="getMap.geometry.location.lat" [longitude]="getMap.geometry.location.lng" (mouseOver)="onMouseOver(infoWindow,gm)">
<agm-info-window [disableAutoPan]="false" #infoWindow>
<div>
<p><strong>{{getMap.applicant_details | titlecase}}</strong></p>
</div>
<div>
<p>{{getMap.lender_details}}</p>
</div>
</agm-info-window>
</agm-marker>
</agm-map> </agm-map>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>

View File

@ -31,7 +31,9 @@ export class AllocationViewMoreComponent implements OnInit {
if (response.status == 'OK') { if (response.status == 'OK') {
this.lat = response.results[0].geometry.location.lat; this.lat = response.results[0].geometry.location.lat;
this.lng = response.results[0].geometry.location.lng; this.lng = response.results[0].geometry.location.lng;
this.mapDetails.push(response.results[0].geometry.location) response.results[0].applicant_details = element.applicant_name + ' ( Id:'+element.pd_id+')';
response.results[0].lender_details = element.short_name + '( Id:'+element.lender_applicant_id+')';
this.mapDetails.push(response.results[0])
} }
// else if (response.status == 'ZERO_RESULTS') { // else if (response.status == 'ZERO_RESULTS') {
// console.log('geocodingAPIService', 'ZERO_RESULTS', response.status); // console.log('geocodingAPIService', 'ZERO_RESULTS', response.status);
@ -40,9 +42,19 @@ export class AllocationViewMoreComponent implements OnInit {
// } // }
}); });
} }
}); });
} }
// this is for map tooltip open
onMouseOver(infoWindow, gm) {
if (gm.lastOpen != null) {
gm.lastOpen.close();
}
gm.lastOpen = infoWindow;
infoWindow.open();
}
} }

View File

@ -73,7 +73,7 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Name"> <ng-container matColumnDef="Name">
<mat-cell class="cell" *matCellDef="let details;"> <mat-cell class="cell" *matCellDef="let details;">
<span *ngIf="details.applicat_details" mat-line><b>{{details.applicat_details[0].applicant_name}}</b></span><br> <span *ngIf="details.applicant_name" mat-line><b>{{details.applicant_name}}</b></span><br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span> <span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -70,7 +70,7 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Name"> <ng-container matColumnDef="Name">
<mat-cell class="cell" *matCellDef="let details;"> <mat-cell class="cell" *matCellDef="let details;">
<span *ngIf="details.applicat_details" mat-line><b>{{details.applicat_details[0].applicant_name}}</b></span><br> <span *ngIf="details.applicant_name" mat-line><b>{{details.applicant_name}}</b></span><br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span> <span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -27,7 +27,6 @@
</div> </div>
<div *ngFor="let details of dataSource.connect() | async"> <div *ngFor="let details of dataSource.connect() | async">
<div *ngIf="(details.pd_status=='TRIGGERED' || details.pd_status=='ALLOCATED') && details.fk_pd_type !='3' "> <div *ngIf="(details.pd_status=='TRIGGERED' || details.pd_status=='ALLOCATED') && details.fk_pd_type !='3' ">
<mat-card [ngStyle]="{'border-left':'5px solid','border-left-color': getColor(details.fk_pd_type)}"> <mat-card [ngStyle]="{'border-left':'5px solid','border-left-color': getColor(details.fk_pd_type)}">
<mat-card-title *ngIf="details.applicat_details" style="margin-bottom: 0px;"> <mat-card-title *ngIf="details.applicat_details" style="margin-bottom: 0px;">
@ -75,8 +74,18 @@
</div> </div>
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="70" fxFlex.lg="70" fxFlex.xl="70"> <div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="70" fxFlex.lg="70" fxFlex.xl="70">
<mat-card class="mb-2" *ngIf="pdList.length > 0"> <mat-card class="mb-2" *ngIf="pdList.length > 0">
<agm-map [latitude]="lat" [longitude]="lng"> <agm-map [latitude]="lat" [longitude]="lng" #gm>
<agm-marker *ngFor="let getMap of mapDetails" [latitude]="getMap.lat" [longitude]="getMap.lng"></agm-marker> <agm-marker *ngFor="let getMap of mapDetails" [latitude]="getMap.geometry.location.lat" [longitude]="getMap.geometry.location.lng" (mouseOver)="onMouseOver(infoWindow,gm)">
<agm-info-window [disableAutoPan]="false" #infoWindow>
<div>
<p><strong>{{getMap.applicant_details | titlecase}}</strong></p>
</div>
<div>
<p>{{getMap.lender_details}}</p>
</div>
</agm-info-window>
</agm-marker>
</agm-map> </agm-map>
</mat-card> </mat-card>
</div> </div>

View File

@ -60,32 +60,43 @@ pdList:any[] = [];
ngOnInit() { ngOnInit() {
this.ListPdComponent.showListView(false); this.ListPdComponent.showListView(false);
this.recordStatus=false this.recordStatus=false
this.loadPdDetails(); this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED);
} }
ngAfterViewInit() { ngAfterViewInit() {
this.dataSource.paginator = this.paginator; this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort; this.dataSource.sort = this.sort;
} }
loadPdDetails(){ loadPdDetails(triStatus,allocStatus){
this._pd.getPdDetails() this._pd.getPdMapList(triStatus,allocStatus).subscribe(responseList => {
.subscribe( if(responseList.length>0){
data => { if(responseList[0].dataStatus===true){
if (data.status == 200) { let filterValue=responseList[0].records.filter(val=>val.fk_pd_type !='3')
let filterdList = data.records.filter(item=>item.pd_status!=this.pdStatusCheck.DRAFT) this.pdList= this.pdList.concat.apply(this.pdList, filterValue);
this.pdList = filterdList; }
this.pdListData = filterdList; if(responseList[1].dataStatus===true){
this.dataLength = filterdList.length; let filterValue=responseList[1].records.filter(val=>val.fk_pd_type !='3')
this.pdList= this.pdList.concat.apply(this.pdList, filterValue);
}
if(this.pdList.length>0){
this.pdListData = this.pdList;
this.dataLength = this.pdList.length;
this.dataSource.data = this.pdListData; this.dataSource.data = this.pdListData;
this.getMapViewLocations(this.pdList); this.getMapViewLocations(this.pdList);
} }
else{ else {
this.pdList=[]; this.pdList=[];
this.dataLength = null; this.dataLength = null;
this.recordStatus=true; this.recordStatus=true;
} }
}, error => this.errorMessage = <any> error);
}
else {
this.pdList=[];
this.dataLength = null;
this.recordStatus=true;
}
},error => this.errorMessage = <any> error);
} }
@ -97,7 +108,9 @@ pdList:any[] = [];
if (response.status == 'OK') { if (response.status == 'OK') {
this.lat = response.results[0].geometry.location.lat; this.lat = response.results[0].geometry.location.lat;
this.lng = response.results[0].geometry.location.lng; this.lng = response.results[0].geometry.location.lng;
this.mapDetails.push(response.results[0].geometry.location) response.results[0].applicant_details = element.applicant_name + ' ( Id:'+element.pd_id+')';
response.results[0].lender_details = element.lender_short_name + '( Id:'+element.lender_applicant_id+')';
this.mapDetails.push(response.results[0]);
} }
// else if (response.status == 'ZERO_RESULTS') { // else if (response.status == 'ZERO_RESULTS') {
// console.log('geocodingAPIService', 'ZERO_RESULTS', response.status); // console.log('geocodingAPIService', 'ZERO_RESULTS', response.status);
@ -133,7 +146,7 @@ pdList:any[] = [];
dialogRef.afterClosed() dialogRef.afterClosed()
.subscribe(dataresult => { .subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!'); // this.notifier.notify('success', 'Successfully allocated.!');
this.loadPdDetails(); this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED);
}); });
} }
else if(pdData.fk_pd_type == 2){ else if(pdData.fk_pd_type == 2){
@ -146,7 +159,7 @@ pdList:any[] = [];
dialogRef.afterClosed() dialogRef.afterClosed()
.subscribe(dataresult => { .subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!'); // this.notifier.notify('success', 'Successfully allocated.!');
this.loadPdDetails(); this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED);
}); });
} }
else if(pdData.fk_pd_type == 3){ else if(pdData.fk_pd_type == 3){
@ -160,7 +173,7 @@ pdList:any[] = [];
.subscribe(dataresult => { .subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!'); // this.notifier.notify('success', 'Successfully allocated.!');
this.loadPdDetails(); this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED);
}); });
} }
@ -177,7 +190,7 @@ pdList:any[] = [];
dialogSchedule.afterClosed() dialogSchedule.afterClosed()
.subscribe(dataresult => { .subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!'); // this.notifier.notify('success', 'Successfully allocated.!');
this.loadPdDetails(); this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED);
}); });
} }
ngOnDestroy(): void { ngOnDestroy(): void {
@ -190,5 +203,16 @@ pdList:any[] = [];
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
this.dataSource.filter = filterValue; this.dataSource.filter = filterValue;
} }
// this is for map tooltip open
onMouseOver(infoWindow, gm) {
if (gm.lastOpen != null) {
gm.lastOpen.close();
}
gm.lastOpen = infoWindow;
infoWindow.open();
}
} }

View File

@ -70,7 +70,7 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Name"> <ng-container matColumnDef="Name">
<mat-cell class="cell" *matCellDef="let details;"> <mat-cell class="cell" *matCellDef="let details;">
<span *ngIf="details.applicat_details" mat-line><b>{{details.applicat_details[0].applicant_name}}</b></span><br> <span *ngIf="details.applicant_name" mat-line><b>{{details.applicant_name}}</b></span><br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span> <span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -70,7 +70,7 @@
</ng-container> </ng-container>
<ng-container matColumnDef="Name"> <ng-container matColumnDef="Name">
<mat-cell class="cell" *matCellDef="let details;"> <mat-cell class="cell" *matCellDef="let details;">
<span *ngIf="details.applicat_details" mat-line><b>{{details.applicat_details[0].applicant_name}}</b></span><br> <span *ngIf="details.applicant_name" mat-line><b>{{details.applicant_name}}</b></span><br>
<span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span> <span class="fontsize"> {{details.lender_applicant_id}}</span> <span class="fontsize" *ngIf="details.customer_segment_abbr">-({{details.customer_segment_abbr}} )</span>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@ -182,8 +182,10 @@ submitDetails(records) {
records.sales_product.forEach(parVal => { records.sales_product.forEach(parVal => {
parVal.child.forEach(childVal => { parVal.child.forEach(childVal => {
if(childVal['custum_date']){ if(childVal['custum_date']){
delete childVal['custum_date'] ; delete childVal['custum_date'];
} }
if(childVal['sales_date'])
childVal['sales_date']=this.pipe.transform(childVal['sales_date'], 'yyyy-MM-dd');
}); });
}); });
this._pd.saveAssessedDetails('saveAssessedIncomeMonthwiseItems',records.sales_product).subscribe(data => { this._pd.saveAssessedDetails('saveAssessedIncomeMonthwiseItems',records.sales_product).subscribe(data => {

View File

@ -25,7 +25,7 @@
<p matLine> a) Cost of Goods Sold </p> <p matLine> a) Cost of Goods Sold </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{sumary_details.sales_revenue !='' && sumary_details.sales_revenue!=null ? sumary_details.sales_revenue : '0'}} </p> <p matLine> {{sumary_details.sales_revenue ? sumary_details.sales_revenue : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -34,7 +34,7 @@
<p matLine> {{subDetails.sales_item}} </p> <p matLine> {{subDetails.sales_item}} </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{subDetails.annual_sale_value !='' && subDetails.annual_sale_value!=null ? subDetails.annual_sale_value : '0'}} </p> <p matLine> {{subDetails.annual_sale_value ? subDetails.annual_sale_value : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -47,7 +47,7 @@
<p matLine> b) Purchases </p> <p matLine> b) Purchases </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{sumary_details.purchase !='' && sumary_details.purchase!=null ? sumary_details.purchase : '0'}} </p> <p matLine> {{sumary_details.purchase ? sumary_details.purchase : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -56,7 +56,7 @@
<p matLine> {{subDetails.purchase_item}} </p> <p matLine> {{subDetails.purchase_item}} </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{subDetails.annual_purchase_value !='' && subDetails.annual_purchase_value!=null ? subDetails.annual_purchase_value : '0'}} </p> <p matLine> {{subDetails.annual_purchase_value ? subDetails.annual_purchase_value : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -68,7 +68,7 @@
<p matLine> c) Gross Profit (a-b) </p> <p matLine> c) Gross Profit (a-b) </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{sumary_details.gross_profit}} </p> <p matLine> {{sumary_details.gross_profit ? sumary_details.gross_profit : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -81,7 +81,7 @@
<p matLine> d) Other Income </p> <p matLine> d) Other Income </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{sumary_details.other_business_income !='' && sumary_details.other_business_income !=null ? sumary_details.other_business_income : '0' }}</p> <p matLine> {{sumary_details.other_business_income ? sumary_details.other_business_income : 0 }}</p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -90,7 +90,7 @@
<p matLine> {{subDetails.business_income_item}} </p> <p matLine> {{subDetails.business_income_item}} </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{subDetails.annual_income_value !='' && subDetails.annual_income_value!=null ? subDetails.annual_income_value : '0'}} </p> <p matLine> {{subDetails.annual_income_value ? subDetails.annual_income_value : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -102,7 +102,7 @@
<p matLine> e) Other Expenses </p> <p matLine> e) Other Expenses </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{sumary_details.business_expense !='' && sumary_details.business_expense !=null ? sumary_details.business_expense : '0'}} </p> <p matLine> {{sumary_details.business_expense ? sumary_details.business_expense : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -111,7 +111,7 @@
<p matLine> {{subDetails.expense_item}} </p> <p matLine> {{subDetails.expense_item}} </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{subDetails.annual_expenses_value !='' && subDetails.annual_expenses_value!=null ? subDetails.annual_expenses_value : '0'}} </p> <p matLine> {{subDetails.annual_expenses_value ? subDetails.annual_expenses_value : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -124,7 +124,7 @@
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{sumary_details.net_profit_value!='' && sumary_details.net_profit_value!=null ? sumary_details.net_profit_value : '0'}} </p> <p matLine> {{sumary_details.net_profit ? sumary_details.net_profit : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -138,7 +138,7 @@
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{sumary_details.household_expenses}} </p> <p matLine> {{sumary_details.household_expenses ? sumary_details.household_expenses : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -147,7 +147,7 @@
<p matLine> {{subDetails.expense_item}} </p> <p matLine> {{subDetails.expense_item}} </p>
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{subDetails.annual_expense_value !='' && subDetails.annual_expense_value!=null ? subDetails.annual_expense_value : '0'}} </p> <p matLine> {{subDetails.annual_expense_value ? subDetails.annual_expense_value : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>
@ -161,7 +161,7 @@
</div> </div>
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div"> <div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
<p matLine> {{sumary_details.net_disable_income_value !='' && sumary_details.net_disable_income_value !=null ? sumary_details.net_disable_income_value : 0}} </p> <p matLine> {{sumary_details.net_disable_income_value ? sumary_details.net_disable_income_value : 0}} </p>
</div> </div>
</mat-list-item> </mat-list-item>

View File

@ -25,8 +25,9 @@ export class AssessedIncomeComponent implements OnInit {
// @Input() form_id: number; // @Input() form_id: number;
pdid: number; pdid: number;
form_id: number; form_id: number;
sumary_details:any={"sales_revenue":0,"sales_revenue_details":[],"purchase":0,"purchase_details":[],"gross_profit":0,"other_business_income":0,"other_business_income_details":[] emptyArray: any=[];
,"business_expense":0,"business_expense_details":[],"net_profit_value":0,"household_expenses":0,"house_hold_expense_details":[],"net_disable_income_value":0}; sumary_details: {[k: string]: any} = {};
// sumary_details:any={"sales_revenue":0,"sales_revenue_details":[],"purchase":0,"purchase_details":[],"gross_profit":0,"other_business_income":0,"other_business_income_details":[]
public salesCaluatedItem:any= []; public salesCaluatedItem:any= [];
public salesItemMonthWise:any= []; public salesItemMonthWise:any= [];
public purchaseDetails:any= []; public purchaseDetails:any= [];
@ -34,7 +35,6 @@ export class AssessedIncomeComponent implements OnInit {
public houseHoldExpenses:any= []; public houseHoldExpenses:any= [];
public otherBusinessIncome: any=[]; public otherBusinessIncome: any=[];
// Sales Item MonthWise declare table header,body andd footer elements // Sales Item MonthWise declare table header,body andd footer elements
salesMonthWiseTable:any=[]; salesMonthWiseTable:any=[];
salesItemMonthWiseBody: any[]; salesItemMonthWiseBody: any[];
@ -148,21 +148,19 @@ public viewerOptions: any = {
} }
if(value.records.final_data.length >0){ if(value.records.final_data.length >0){
// this.finalData = value.records.final_data[0]; this.sumary_details.sales_revenue = value.records.final_data[0].sales_revenue;
this.sumary_details = value.records.final_data[0]; this.sumary_details.sales_revenue_details = value.records.final_data[0].sales_revenue_details;
this.sumary_details["sales_revenue"] = value.records.final_data[0].sales_revenue; this.sumary_details.purchase = value.records.final_data[0].purchase;
this.sumary_details["sales_revenue_details"] = value.records.final_data[0].sales_revenue_details; this.sumary_details.purchase_details = value.records.final_data[0].purchase_details;
this.sumary_details["purchase"] = value.records.final_data[0].purchase; this.sumary_details.gross_profit = value.records.final_data[0].gross_profit;
this.sumary_details["purchase_details"] = value.records.final_data[0].purchase_details; this.sumary_details.other_business_income= value.records.final_data[0].other_business_income;
this.sumary_details["gross_profit"] = value.records.final_data[0].gross_profit; this.sumary_details.other_business_income_details = value.records.final_data[0].other_business_income_details;
this.sumary_details["other_business_income"] = value.records.final_data[0].other_business_income; this.sumary_details.business_expense = value.records.final_data[0].business_expense;
this.sumary_details["other_business_income_details"] = value.records.final_data[0].other_business_income_details; this.sumary_details.business_expense_details = value.records.final_data[0].business_expense_details;
this.sumary_details["business_expense"] = value.records.final_data[0].business_expense; this.sumary_details.net_profit = value.records.final_data[0].net_profit !='' && value.records.final_data[0].net_profit!=null ? value.records.final_data[0].net_profit : 0;
this.sumary_details["business_expense_details"] = value.records.final_data[0].business_expense_details; this.sumary_details.household_expenses = value.records.final_data[0].household_expenses;
this.sumary_details["net_profit_value"] = value.records.final_data[0].net_profit_value !='' && value.records.final_data[0].net_profit_value!=null ? value.records.final_data[0].net_profit_value : 0; this.sumary_details.house_hold_expense_details = value.records.final_data[0].house_hold_expense_details !='' && value.records.final_data[0].house_hold_expense_details !=null ? value.records.final_data[0].house_hold_expense_details : 0;
this.sumary_details["household_expenses"] = value.records.final_data[0].household_expenses; this.sumary_details.net_disable_income_value = Number(this.sumary_details.net_profit) - Number(this.sumary_details.household_expenses);
this.sumary_details["house_hold_expense_details"] = value.records.final_data[0].house_hold_expense_details !='' && value.records.final_data[0].house_hold_expense_details !=null ? value.records.final_data[0].house_hold_expense_details : 0;
this.sumary_details["net_disable_income_value"] = Number(this.sumary_details.net_profit_value) - Number(this.sumary_details.household_expenses);
} }
} }

View File

@ -16,7 +16,7 @@
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<div fxLayout="row wrap" class="child_mat_card"> <div fxLayout="row wrap" class="child_mat_card">
<mat-card fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="40" fxFlex.lg="32" fxFlex.xl="33" *ngFor="let formButton of companyList.form_status;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectBusinessGroupForms(formButton, companyList)"> <mat-card fxFlex.xs="80" fxFlex.sm="80" fxFlex.md="40" fxFlex.lg="32" fxFlex.xl="33" *ngFor="let formButton of companyList.form_status | getAnswerableForms;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectBusinessGroupForms(formButton, companyList)">
<mat-card-header> <mat-card-header>
<span style="padding: 17px 14px 3px 15px !important;border-radius: 0px 0px 0px 15px!important;width: 50px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span> <span style="padding: 17px 14px 3px 15px !important;border-radius: 0px 0px 0px 15px!important;width: 50px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
<div fxFlex="100" align="left" style="padding:15px !important;"> <div fxFlex="100" align="left" style="padding:15px !important;">

View File

@ -11,10 +11,13 @@ import {FinancialInfoComponent} from './../../forms/financial-info/financial-inf
import {BusinessInfoComponent} from './../../forms/business-info/business-info.component'; import {BusinessInfoComponent} from './../../forms/business-info/business-info.component';
import { BusinessAssetsInfoComponent } from './../../forms/business-assets-info/business-assets-info.component'; import { BusinessAssetsInfoComponent } from './../../forms/business-assets-info/business-assets-info.component';
import { BusinessBankingDetailsComponent } from './../../forms/business-banking-details/business-banking-details.component'; import { BusinessBankingDetailsComponent } from './../../forms/business-banking-details/business-banking-details.component';
import { GetAnswerableFormsPipe } from './../../../../../pd-pipes/get-answerable-forms.pipe';
@Component({ @Component({
selector: 'app-business-info-group', selector: 'app-business-info-group',
templateUrl: './business-info-group.component.html', templateUrl: './business-info-group.component.html',
styleUrls: ['./business-info-group.component.scss'] styleUrls: ['./business-info-group.component.scss'],
providers :[GetAnswerableFormsPipe]
}) })
export class BusinessInfoGroupComponent implements OnInit { export class BusinessInfoGroupComponent implements OnInit {
customer_segment_abbr: any; customer_segment_abbr: any;

View File

@ -111,6 +111,7 @@ import { ManageDailySalesComponent } from './list-pd/start-pd/forms/assessed-inc
import { PdStatusChangeDialogueComponent } from './list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component'; import { PdStatusChangeDialogueComponent } from './list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component';
import { PdLocatedMapViewDirective } from './../pd-directive/pd-located-map-view.directive'; import { PdLocatedMapViewDirective } from './../pd-directive/pd-located-map-view.directive';
import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component'; import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component';
import { GetAnswerableFormsPipe } from './../pd-pipes/get-answerable-forms.pipe';
/** /**
* Custom angular notifier options * Custom angular notifier options
@ -157,7 +158,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
}; };
@NgModule({ @NgModule({
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent], declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe],
imports: [ imports: [
CommonModule, CommonModule,
ManagePdRoutingModule, ManagePdRoutingModule,

View File

@ -27,10 +27,12 @@ export class PdLocatedMapViewDirective {
this._geolocation.findLocations(this.value.addressline1,this.value.pincode,this.value.state_name,this.value.city_name) this._geolocation.findLocations(this.value.addressline1,this.value.pincode,this.value.state_name,this.value.city_name)
.subscribe(response => { .subscribe(response => {
if (response.status == 'OK') { if (response.status == 'OK') {
let address_content: string = this.value.addressline1.toUpperCase() + ','+this.value.city_name.toUpperCase()+ ','+this.value.state_name.toUpperCase();
address_content = this.value.pincode_id=='1' ? address_content+'-'+this.value.other_pincode : address_content+'-'+this.value.pincode
this.lat = response.results[0].geometry.location.lat; this.lat = response.results[0].geometry.location.lat;
this.lang = response.results[0].geometry.location.lng; this.lang = response.results[0].geometry.location.lng;
const dialogRef = this.dialog.open(ViewLocationComponent, { const dialogRef = this.dialog.open(ViewLocationComponent, {
data: {"lat": this.lat, "lang":this.lang}, data: {"lat": this.lat, "lang":this.lang,"content":address_content},
disableClose: false, disableClose: false,
minWidth:'30%', minWidth:'30%',
maxWidth:'30%', maxWidth:'30%',

View File

@ -1,6 +1,6 @@
<h2 mat-dialog-title> <h2 mat-dialog-title>
<div fxFlex="70" align="left"> <div fxFlex="70" align="left">
PD Location PD Address
</div> </div>
<div fxFlex="30" align="end"> <div fxFlex="30" align="end">
<button class="mr-1 mb-1" mat-mini-fab color="primary" type="button" mat-dialog-close><mat-icon>close</mat-icon></button> <button class="mr-1 mb-1" mat-mini-fab color="primary" type="button" mat-dialog-close><mat-icon>close</mat-icon></button>
@ -9,18 +9,22 @@
<mat-dialog-content> <mat-dialog-content>
<div fxLayout="row wrap"> <div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<mat-card> <agm-map [latitude]="data.lat" [longitude]="data.lang" [zoom]="15" #gm>
<mat-card-content> <agm-marker [latitude]="data.lat" [longitude]="data.lang" (mouseOver)="onMouseOver(infoWindow,gm)">
<agm-map [latitude]="data.lat" [longitude]="data.lang"> <agm-info-window [disableAutoPan]="false" #infoWindow>
<agm-marker [latitude]="data.lat" [longitude]="data.lang"></agm-marker> <!-- <mat-list>
<mat-list-item>
<mat-icon matListIcon color="primary">location_on</mat-icon>
<h3 matLine> {{message_content}} </h3>
</mat-list-item>
</mat-list> -->
<p><strong>{{message_content}}</strong></p>
</agm-info-window>
</agm-marker>
</agm-map> </agm-map>
</mat-card-content>
</mat-card>
</div> </div>
</div> </div>
</mat-dialog-content> </mat-dialog-content>
<!-- <mat-dialog-actions align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" mat-dialog-close><mat-icon>close</mat-icon></button>
</mat-dialog-actions> -->

View File

@ -7,10 +7,24 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angul
styleUrls: ['./view-location.component.scss'] styleUrls: ['./view-location.component.scss']
}) })
export class ViewLocationComponent implements OnInit { export class ViewLocationComponent implements OnInit {
message_content: String;
constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<ViewLocationComponent>) { } constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<ViewLocationComponent>) {
this.message_content=this.data.content;
}
ngOnInit() { ngOnInit() {
} }
// this is for map tooltip open
onMouseOver(infoWindow, gm) {
if (gm.lastOpen != null) {
gm.lastOpen.close();
}
gm.lastOpen = infoWindow;
infoWindow.open();
}
} }

View File

@ -0,0 +1,8 @@
import { GetAnswerableFormsPipe } from './get-answerable-forms.pipe';
describe('GetAnswerableFormsPipe', () => {
it('create an instance', () => {
const pipe = new GetAnswerableFormsPipe();
expect(pipe).toBeTruthy();
});
});

View File

@ -0,0 +1,17 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'getAnswerableForms'
})
export class GetAnswerableFormsPipe implements PipeTransform {
transform(value: any, args?: any): any {
if(value.length>0){
return value.filter(val=>val.isAnswerable===true);
}
else {
return [];
}
}
}

View File

@ -1,9 +1,8 @@
/** Common Import Section */ /** Common Import Section */
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';//for Datatables import { Observable, of, forkJoin } from 'rxjs';
import { HttpClient, HttpParams } from '@angular/common/http'; import { HttpClient, HttpParams } from '@angular/common/http';
import { catchError, map } from 'rxjs/operators'; import { catchError, map } from 'rxjs/operators';
import { of } from 'rxjs';
/** Imported Service Files Are., */ /** Imported Service Files Are., */
import { AwsService } from '../../AwsService/aws.service'; import { AwsService } from '../../AwsService/aws.service';
@ -568,5 +567,16 @@ export class PdTrigerService {
) )
} }
// this is for pd map details only for triggered/ allocated status
getPdMapList(triggeredStatus, allocatedStatus): Observable<any> {
const firstStatus = triggeredStatus ?
{ params: new HttpParams().set('status', triggeredStatus) } : {};
let response1 = this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", firstStatus);
const secondStatus = allocatedStatus ?
{ params: new HttpParams().set('status', allocatedStatus) } : {};
let response2 = this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", secondStatus);
return forkJoin([response1, response2]);
}
} }