diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index fe0faeb7f..9e0eb7f67 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -75,8 +75,8 @@ - - {{details.applicat_details[0].applicant_name}} + + {{details.applicant_name}}
{{details.lender_applicant_id}} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html index b9fbd2746..ac8dd3731 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html @@ -13,8 +13,17 @@
- - + + + +
+

{{getMap.applicant_details | titlecase}}

+
+
+

{{getMap.lender_details}}

+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts index 6a781ae52..cf0ccd7fd 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts @@ -31,7 +31,9 @@ export class AllocationViewMoreComponent implements OnInit { if (response.status == 'OK') { this.lat = response.results[0].geometry.location.lat; 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') { // 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(); +} + } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html index ed414e711..deed72217 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html @@ -73,7 +73,7 @@ - {{details.applicat_details[0].applicant_name}}
+ {{details.applicant_name}}
{{details.lender_applicant_id}} -({{details.customer_segment_abbr}} )
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html index 0be34afd2..e681cb2cf 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html @@ -70,7 +70,7 @@ - {{details.applicat_details[0].applicant_name}}
+ {{details.applicant_name}}
{{details.lender_applicant_id}} -({{details.customer_segment_abbr}} )
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html index f8b2e10b0..a87650eee 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html @@ -27,7 +27,6 @@
- @@ -75,8 +74,18 @@
- - + + + +
+

{{getMap.applicant_details | titlecase}}

+
+
+

{{getMap.lender_details}}

+
+ +
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts index 802fe08e3..72f07f851 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts @@ -60,32 +60,43 @@ pdList:any[] = []; ngOnInit() { this.ListPdComponent.showListView(false); this.recordStatus=false - this.loadPdDetails(); + this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED); } ngAfterViewInit() { this.dataSource.paginator = this.paginator; this.dataSource.sort = this.sort; } - loadPdDetails(){ - this._pd.getPdDetails() - .subscribe( - data => { - if (data.status == 200) { - let filterdList = data.records.filter(item=>item.pd_status!=this.pdStatusCheck.DRAFT) - this.pdList = filterdList; - this.pdListData = filterdList; - this.dataLength = filterdList.length; + loadPdDetails(triStatus,allocStatus){ + this._pd.getPdMapList(triStatus,allocStatus).subscribe(responseList => { + if(responseList.length>0){ + if(responseList[0].dataStatus===true){ + let filterValue=responseList[0].records.filter(val=>val.fk_pd_type !='3') + this.pdList= this.pdList.concat.apply(this.pdList, filterValue); + } + if(responseList[1].dataStatus===true){ + 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.getMapViewLocations(this.pdList); - - } - else{ - this.pdList=[]; - this.dataLength = null; - this.recordStatus=true; - } - }, error => this.errorMessage = error); + } + else { + this.pdList=[]; + this.dataLength = null; + this.recordStatus=true; + } + + } + else { + this.pdList=[]; + this.dataLength = null; + this.recordStatus=true; + } + },error => this.errorMessage = error); } @@ -97,7 +108,9 @@ pdList:any[] = []; if (response.status == 'OK') { this.lat = response.results[0].geometry.location.lat; 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') { // console.log('geocodingAPIService', 'ZERO_RESULTS', response.status); @@ -133,7 +146,7 @@ pdList:any[] = []; dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadPdDetails(); + this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED); }); } else if(pdData.fk_pd_type == 2){ @@ -146,8 +159,8 @@ pdList:any[] = []; dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadPdDetails(); - }); + this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED); + }); } else if(pdData.fk_pd_type == 3){ const dialogRef = this.dialog.open(TelePdAllocationComponent, { @@ -160,7 +173,7 @@ pdList:any[] = []; .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadPdDetails(); + this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED); }); } @@ -177,7 +190,7 @@ pdList:any[] = []; dialogSchedule.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadPdDetails(); + this.loadPdDetails(this.pdStatusCheck.TRIGGERED,this.pdStatusCheck.ALLOCATED); }); } ngOnDestroy(): void { @@ -190,5 +203,16 @@ pdList:any[] = []; filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches 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(); +} } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html index de43da466..5c49ab160 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html @@ -70,7 +70,7 @@ - {{details.applicat_details[0].applicant_name}}
+ {{details.applicant_name}}
{{details.lender_applicant_id}} -({{details.customer_segment_abbr}} )
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html index 300ed7344..dc3f96197 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/scheduled-pd/scheduled-pd.component.html @@ -70,7 +70,7 @@ - {{details.applicat_details[0].applicant_name}}
+ {{details.applicant_name}}
{{details.lender_applicant_id}} -({{details.customer_segment_abbr}} )
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-sales/manage-daily-sales.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-sales/manage-daily-sales.component.ts index f0a702803..c0d34f1bd 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-sales/manage-daily-sales.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-sales/manage-daily-sales.component.ts @@ -182,8 +182,10 @@ submitDetails(records) { records.sales_product.forEach(parVal => { parVal.child.forEach(childVal => { 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 => { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html index bf89d1114..1c4500bf1 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html @@ -25,7 +25,7 @@

a) Cost of Goods Sold

-

{{sumary_details.sales_revenue !='' && sumary_details.sales_revenue!=null ? sumary_details.sales_revenue : '0'}}

+

{{sumary_details.sales_revenue ? sumary_details.sales_revenue : 0}}

@@ -34,7 +34,7 @@

{{subDetails.sales_item}}

-

{{subDetails.annual_sale_value !='' && subDetails.annual_sale_value!=null ? subDetails.annual_sale_value : '0'}}

+

{{subDetails.annual_sale_value ? subDetails.annual_sale_value : 0}}

@@ -47,7 +47,7 @@

b) Purchases

-

{{sumary_details.purchase !='' && sumary_details.purchase!=null ? sumary_details.purchase : '0'}}

+

{{sumary_details.purchase ? sumary_details.purchase : 0}}

@@ -56,7 +56,7 @@

{{subDetails.purchase_item}}

-

{{subDetails.annual_purchase_value !='' && subDetails.annual_purchase_value!=null ? subDetails.annual_purchase_value : '0'}}

+

{{subDetails.annual_purchase_value ? subDetails.annual_purchase_value : 0}}

@@ -68,7 +68,7 @@

c) Gross Profit (a-b)

-

{{sumary_details.gross_profit}}

+

{{sumary_details.gross_profit ? sumary_details.gross_profit : 0}}

@@ -81,7 +81,7 @@

d) Other Income

-

{{sumary_details.other_business_income !='' && sumary_details.other_business_income !=null ? sumary_details.other_business_income : '0' }}

+

{{sumary_details.other_business_income ? sumary_details.other_business_income : 0 }}

@@ -90,7 +90,7 @@

{{subDetails.business_income_item}}

-

{{subDetails.annual_income_value !='' && subDetails.annual_income_value!=null ? subDetails.annual_income_value : '0'}}

+

{{subDetails.annual_income_value ? subDetails.annual_income_value : 0}}

@@ -102,7 +102,7 @@

e) Other Expenses

-

{{sumary_details.business_expense !='' && sumary_details.business_expense !=null ? sumary_details.business_expense : '0'}}

+

{{sumary_details.business_expense ? sumary_details.business_expense : 0}}

@@ -111,7 +111,7 @@

{{subDetails.expense_item}}

-

{{subDetails.annual_expenses_value !='' && subDetails.annual_expenses_value!=null ? subDetails.annual_expenses_value : '0'}}

+

{{subDetails.annual_expenses_value ? subDetails.annual_expenses_value : 0}}

@@ -124,7 +124,7 @@
-

{{sumary_details.net_profit_value!='' && sumary_details.net_profit_value!=null ? sumary_details.net_profit_value : '0'}}

+

{{sumary_details.net_profit ? sumary_details.net_profit : 0}}

@@ -138,7 +138,7 @@
-

{{sumary_details.household_expenses}}

+

{{sumary_details.household_expenses ? sumary_details.household_expenses : 0}}

@@ -147,7 +147,7 @@

{{subDetails.expense_item}}

-

{{subDetails.annual_expense_value !='' && subDetails.annual_expense_value!=null ? subDetails.annual_expense_value : '0'}}

+

{{subDetails.annual_expense_value ? subDetails.annual_expense_value : 0}}

@@ -161,7 +161,7 @@
-

{{sumary_details.net_disable_income_value !='' && sumary_details.net_disable_income_value !=null ? sumary_details.net_disable_income_value : 0}}

+

{{sumary_details.net_disable_income_value ? sumary_details.net_disable_income_value : 0}}

diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts index 1659b3031..a3287574f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts @@ -25,8 +25,9 @@ export class AssessedIncomeComponent implements OnInit { // @Input() form_id: number; pdid: 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":[] - ,"business_expense":0,"business_expense_details":[],"net_profit_value":0,"household_expenses":0,"house_hold_expense_details":[],"net_disable_income_value":0}; + emptyArray: any=[]; + 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 salesItemMonthWise:any= []; public purchaseDetails:any= []; @@ -34,7 +35,6 @@ export class AssessedIncomeComponent implements OnInit { public houseHoldExpenses:any= []; public otherBusinessIncome: any=[]; - // Sales Item MonthWise declare table header,body andd footer elements salesMonthWiseTable:any=[]; salesItemMonthWiseBody: any[]; @@ -148,21 +148,19 @@ public viewerOptions: any = { } if(value.records.final_data.length >0){ - // this.finalData = value.records.final_data[0]; - this.sumary_details = value.records.final_data[0]; - this.sumary_details["sales_revenue"] = value.records.final_data[0].sales_revenue; - this.sumary_details["sales_revenue_details"] = value.records.final_data[0].sales_revenue_details; - this.sumary_details["purchase"] = value.records.final_data[0].purchase; - this.sumary_details["purchase_details"] = value.records.final_data[0].purchase_details; - this.sumary_details["gross_profit"] = value.records.final_data[0].gross_profit; - this.sumary_details["other_business_income"] = value.records.final_data[0].other_business_income; - this.sumary_details["other_business_income_details"] = value.records.final_data[0].other_business_income_details; - this.sumary_details["business_expense"] = value.records.final_data[0].business_expense; - this.sumary_details["business_expense_details"] = value.records.final_data[0].business_expense_details; - 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["household_expenses"] = value.records.final_data[0].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); + this.sumary_details.sales_revenue = value.records.final_data[0].sales_revenue; + this.sumary_details.sales_revenue_details = value.records.final_data[0].sales_revenue_details; + this.sumary_details.purchase = value.records.final_data[0].purchase; + this.sumary_details.purchase_details = value.records.final_data[0].purchase_details; + this.sumary_details.gross_profit = value.records.final_data[0].gross_profit; + this.sumary_details.other_business_income= value.records.final_data[0].other_business_income; + this.sumary_details.other_business_income_details = value.records.final_data[0].other_business_income_details; + this.sumary_details.business_expense = value.records.final_data[0].business_expense; + this.sumary_details.business_expense_details = value.records.final_data[0].business_expense_details; + 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.household_expenses = value.records.final_data[0].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) - Number(this.sumary_details.household_expenses); } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.html index 6160f7880..9611ed0f6 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.html @@ -16,7 +16,7 @@
- + {{quesIndex+1}}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts index 6c55c00c3..b0bc94485 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts @@ -11,10 +11,13 @@ import {FinancialInfoComponent} from './../../forms/financial-info/financial-inf import {BusinessInfoComponent} from './../../forms/business-info/business-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 { GetAnswerableFormsPipe } from './../../../../../pd-pipes/get-answerable-forms.pipe'; + @Component({ selector: 'app-business-info-group', 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 { customer_segment_abbr: any; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index 9e6bf883d..b417a3b7d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -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 { PdLocatedMapViewDirective } from './../pd-directive/pd-located-map-view.directive'; import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component'; +import { GetAnswerableFormsPipe } from './../pd-pipes/get-answerable-forms.pipe'; /** * Custom angular notifier options @@ -157,7 +158,7 @@ const pdCustomNotifierOptions: NotifierOptions = { }; @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: [ CommonModule, ManagePdRoutingModule, diff --git a/ng6-seed/src/app/personal-discussion/pd-directive/pd-located-map-view.directive.ts b/ng6-seed/src/app/personal-discussion/pd-directive/pd-located-map-view.directive.ts index b4cab5324..c60aa1abd 100644 --- a/ng6-seed/src/app/personal-discussion/pd-directive/pd-located-map-view.directive.ts +++ b/ng6-seed/src/app/personal-discussion/pd-directive/pd-located-map-view.directive.ts @@ -27,10 +27,12 @@ export class PdLocatedMapViewDirective { this._geolocation.findLocations(this.value.addressline1,this.value.pincode,this.value.state_name,this.value.city_name) .subscribe(response => { 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.lang = response.results[0].geometry.location.lng; 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, minWidth:'30%', maxWidth:'30%', diff --git a/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.html b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.html index 1c59c9300..dfa7a821e 100644 --- a/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.html +++ b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.html @@ -1,6 +1,6 @@

- PD Location + PD Address
@@ -9,18 +9,22 @@
- - - - + + + + +

{{message_content}}

+
+ +
-
-
- diff --git a/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.ts b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.ts index b9704ac89..61023b11e 100644 --- a/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.ts +++ b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.ts @@ -7,10 +7,24 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angul styleUrls: ['./view-location.component.scss'] }) export class ViewLocationComponent implements OnInit { - - constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef) { } + message_content: String; + constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef) { + this.message_content=this.data.content; + } ngOnInit() { } + // this is for map tooltip open + onMouseOver(infoWindow, gm) { + + if (gm.lastOpen != null) { + gm.lastOpen.close(); + } + + gm.lastOpen = infoWindow; + + infoWindow.open(); +} + } diff --git a/ng6-seed/src/app/personal-discussion/pd-pipes/get-answerable-forms.pipe.spec.ts b/ng6-seed/src/app/personal-discussion/pd-pipes/get-answerable-forms.pipe.spec.ts new file mode 100644 index 000000000..3c8e9d76f --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/pd-pipes/get-answerable-forms.pipe.spec.ts @@ -0,0 +1,8 @@ +import { GetAnswerableFormsPipe } from './get-answerable-forms.pipe'; + +describe('GetAnswerableFormsPipe', () => { + it('create an instance', () => { + const pipe = new GetAnswerableFormsPipe(); + expect(pipe).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/pd-pipes/get-answerable-forms.pipe.ts b/ng6-seed/src/app/personal-discussion/pd-pipes/get-answerable-forms.pipe.ts new file mode 100644 index 000000000..0ba56f5f6 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/pd-pipes/get-answerable-forms.pipe.ts @@ -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 []; + } + } + +} diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index d3835363f..18cdb2a84 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -1,9 +1,8 @@ /** Common Import Section */ 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 { catchError, map } from 'rxjs/operators'; -import { of } from 'rxjs'; /** Imported Service Files Are., */ import { AwsService } from '../../AwsService/aws.service'; @@ -567,6 +566,17 @@ export class PdTrigerService { catchError(this.handleError('operation', [])) ) } + + // this is for pd map details only for triggered/ allocated status + getPdMapList(triggeredStatus, allocatedStatus): Observable { + const firstStatus = triggeredStatus ? + { params: new HttpParams().set('status', triggeredStatus) } : {}; + let response1 = this._http.get(this.apiUrl + "listLessPDDetails/get", firstStatus); + const secondStatus = allocatedStatus ? + { params: new HttpParams().set('status', allocatedStatus) } : {}; + let response2 = this._http.get(this.apiUrl + "listLessPDDetails/get", secondStatus); + return forkJoin([response1, response2]); + } }