diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
index d22fc0cef..8e5b9a6ad 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
@@ -157,8 +157,9 @@
Relationship To
- Select
- {{appc.applicant_name | titlecase}}
+ Select
+
+ {{appc.applicant_name | titlecase}}
Not Applicable
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
index e3f686532..633287a26 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
@@ -7,10 +7,13 @@ import {OtherApplicantDetailsComponent} from './../dialogue/other-applicant-deta
import { element } from '@angular/core/src/render3/instructions';
import { ELEMENT_PROBE_PROVIDERS } from '@angular/platform-browser/src/dom/debug/ng_probe';
import { DatePipe } from '@angular/common';
+import { SearchRelationPipe } from './../../../../../pd-pipes/search-relation.pipe';
+
@Component({
selector: 'app-general-info',
templateUrl: './general-info.component.html',
styleUrls: ['./general-info.component.scss'],
+ providers: [SearchRelationPipe],
})
export class GeneralInfoComponent implements OnInit {
pipe = new DatePipe('en-US');
@@ -37,7 +40,7 @@ export class GeneralInfoComponent implements OnInit {
qualificationList: any=[];
businessEntityTypeList: any=[];
maxDate: any;
- constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any,) {
+ constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any,private dialogRef: MatDialogRef) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.notifier = notifier;
this.form_id = 18;
@@ -555,8 +558,8 @@ export class GeneralInfoComponent implements OnInit {
if (dataresult.status == 200) {
this.notifier.notify('success', 'General Information Updated.!');
setTimeout(() =>{
- this.dialog.closeAll();
- },1000);
+ this.dialogRef.close();
+ },3000);
}
else {
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 eefb41512..c358f634a 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
@@ -90,6 +90,7 @@ import { BusinessOtherFamilyMemberComponent } from './list-pd/start-pd/forms/dia
import { QcReviewComponent } from './list-pd/pd-report/qc-review/qc-review.component';
import { SharedModule } from "app/shared/shared.module";
import { BusinessInfoGroupComponent } from './list-pd/start-pd/forms/business-info-group/business-info-group.component';
+import { SearchRelationPipe } from './../pd-pipes/search-relation.pipe';
/**
* Custom angular notifier options
@@ -108,7 +109,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
},
theme: 'material',
behaviour: {
- autoHide: 5000,
+ autoHide: 2000,
onClick: 'hide',
onMouseover: 'pauseAutoHide',
showDismissButton: true,
@@ -267,7 +268,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
// OwlNativeDateTimeModule,
// ],
- 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],
+ 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],
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
// providers: [PdTrigerService, GetGeometricLocationService],
diff --git a/ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.spec.ts b/ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.spec.ts
new file mode 100644
index 000000000..df24b27e8
--- /dev/null
+++ b/ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.spec.ts
@@ -0,0 +1,8 @@
+import { SearchRelationPipe } from './search-relation.pipe';
+
+describe('SearchRelationPipe', () => {
+ it('create an instance', () => {
+ const pipe = new SearchRelationPipe();
+ expect(pipe).toBeTruthy();
+ });
+});
diff --git a/ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.ts b/ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.ts
new file mode 100644
index 000000000..8274b2fc9
--- /dev/null
+++ b/ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.ts
@@ -0,0 +1,23 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'searchRelation'
+})
+export class SearchRelationPipe implements PipeTransform {
+
+ transform(value: any, searchItem:any): any {
+ let findExistIndex = searchItem.existRelationList.filter(sVal=>sVal.relation_to==searchItem.currentApplicantID);
+ if(findExistIndex.length>0){
+ let check = value.filter(function(fVal){
+ return !findExistIndex.some(function(sVal){
+ return fVal.pd_co_applicant_id==searchItem.currentApplicantID || fVal.pd_co_applicant_id == sVal.pd_co_applicant_id;
+ });
+ })
+ return check;
+ }
+ else {
+ return value.filter(fVal=>fVal.pd_co_applicant_id!=searchItem.currentApplicantID);
+ }
+ }
+
+}