diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index 08dd1d9fc..8fa51e0a9 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -281,13 +281,13 @@ - Additional Requirements + Credit Manager’s Specific Queries - + @@ -297,11 +297,35 @@ + + + + Documents to be collected + + + + + + + + + + + + + + + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts index c70930301..64469de7c 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -29,6 +29,7 @@ export class AddPdComponent implements OnInit, OnDestroy { addresses: FormArray; coapplicants: FormArray; addtional_requirements: FormArray; + docs_to_be_collected: FormArray; productList: any = []; subProductList: any; @@ -106,7 +107,8 @@ export class AddPdComponent implements OnInit, OnDestroy { coapplicants: this._fb.array([]), addresses: this._fb.array([this.createAddresses()]), documents: this._fb.array([]), - addtional_requirements: this._fb.array([this.createRequiremnt()]) + addtional_requirements: this._fb.array([this.createRequiremnt()]), + docs_to_be_collected: this._fb.array([this.createDocumentstobecollected()]) }); } @@ -383,6 +385,25 @@ export class AddPdComponent implements OnInit, OnDestroy { requirement_control.removeAt(index); } + get pdDocumentstobecollected() { return this._PDtriggerForm.get('docs_to_be_collected') as FormArray; } + createDocumentstobecollected(): FormGroup { + return this._fb.group({ + pd_doc_to_be_collect_id: [null], + doc_name: [null], + isactive: [1], + }); + }; + addDocumentstobecollected() { + this.docs_to_be_collected = this._PDtriggerForm.get('docs_to_be_collected') as FormArray; + this.docs_to_be_collected.push(this.createDocumentstobecollected()); + } + + removeDocumentstobecollected(index: number) { + const documentstobecollected_control = this._PDtriggerForm.controls['docs_to_be_collected']; + documentstobecollected_control.removeAt(index); + } + + public fileSelectionEvent(fileInput: any, oldIndex: number) { @@ -686,6 +707,10 @@ export class AddPdComponent implements OnInit, OnDestroy { pd_form.append("addtional_requirements", JSON.stringify(formValue.addtional_requirements)) } + if (formValue.docs_to_be_collected.length > 0) { + pd_form.append("docs_to_be_collected", JSON.stringify(formValue.docs_to_be_collected)) + } + this._pd.addPdDetails(pd_form).subscribe(result => { if (result.status == 200) { this.disableAfterSubmit = false; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.html new file mode 100644 index 000000000..3def6ee06 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.html @@ -0,0 +1,38 @@ +
+ +

+
+ {{pageTitle}} +
+
+ + +
+

+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.scss new file mode 100644 index 000000000..9bb4a0404 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.scss @@ -0,0 +1,7 @@ +mat-form-field { + margin: 0 2%; + } +.paragraph_change { + color: #fff !important; + background-color: #e00201 !important; +} \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.spec.ts new file mode 100644 index 000000000..b2478f4f8 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PdCollectedDocsComponent } from './pd-collected-docs.component'; + +describe('PdCollectedDocsComponent', () => { + let component: PdCollectedDocsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdCollectedDocsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdCollectedDocsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.ts new file mode 100644 index 000000000..3d46e8896 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component.ts @@ -0,0 +1,110 @@ +import { Component, OnInit,ViewEncapsulation, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; +import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; +import { CustomValidators } from 'ng2-validation'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from '../../../pd-service/pd-triger.service'; + +@Component({ + selector: 'app-pd-collected-docs', + templateUrl: './pd-collected-docs.component.html', + styleUrls: ['./pd-collected-docs.component.scss'] +}) + +export class PdCollectedDocsComponent implements OnInit { + public pageTitle: string = "Documents to be Collected"; + public _EditPDCollectedDocsForm:FormGroup; + public notifier: NotifierService; + docs_to_be_collected: FormArray; + public const_collected_docs : any = { + "pd_doc_to_be_collect_id": '', + "doc_name":'', + "isactive": 1, + }; + constructor(private _fb: FormBuilder, + private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any) { + this.notifier=notifier + } + + ngOnInit() { + this.loadForm(); + + } + loadForm() { + this._EditPDCollectedDocsForm = this._fb.group({ + pdid: [this.data.pdID], + docs_to_be_collected: this._fb.array([]) +}); +// bind dynamic co applicant data + if(this.data.records.length > 0){ + this.data.records.forEach((itemElement, itemIndex) => { + this.addPDCollectedDocs(itemElement) + }); + } + else { + this.addPDCollectedDocs(this.const_collected_docs) + } + } + + get pdCollectedDocs() { return this._EditPDCollectedDocsForm.get('docs_to_be_collected') as FormArray; } + createPDCollectedDocs(receive:any): FormGroup { + return this._fb.group({ + pd_doc_to_be_collect_id:[receive.pd_doc_to_be_collect_id], + doc_name: [receive.doc_name, Validators.compose([Validators.required])], + isactive: [receive.isactive], + }); + }; + addPDCollectedDocs(getData:any) { + if(this._EditPDCollectedDocsForm.valid){ + this.docs_to_be_collected = this._EditPDCollectedDocsForm.get('docs_to_be_collected') as FormArray; + this.docs_to_be_collected.push(this.createPDCollectedDocs(getData)); + } + else { + this.validateAllFormFields(this._EditPDCollectedDocsForm); + } + } + + // removeRequirements(index: number) { + // const requirement_control = this._EditPDRequirementForm.controls['additional_requirements']; + // requirement_control.removeAt(index); + // } + + updatePDCollectedDocs(formValue: any) { + if(this._EditPDCollectedDocsForm.invalid) { + this.validateAllFormFields(this._EditPDCollectedDocsForm) + return; + } + else { + let records:any=formValue; + + this._pd.saveAdditionalRequirements(records,"savePDDocsToBeCollected").subscribe(result => { + if (result.status == 200) { + this.notifier.notify('success', 'Documents to be Collected Updated.'); + this.dialogRef.close(); + } + else { + this.notifier.notify('warning', 'Something Went Wrong Try Again.!'); + } + }, error => { + this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + }); + } + } + + // validate all form group and form array fields +validateAllFormFields(formGroup: any) { + Object.keys(formGroup.controls).forEach(field => { + const control = formGroup.get(field); + + if (control instanceof FormControl) { + control.markAsTouched({ onlySelf: true }); + } else if (control instanceof FormGroup) { + this.validateAllFormFields(control); + } else if (control instanceof FormArray) { + this.validateAllFormFields(control); + } + }); +} + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component.html index 21e191bad..bfd4f0c99 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component.html @@ -15,7 +15,7 @@ - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component.ts index 28fb29e05..68bb4f0f5 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component.ts @@ -79,7 +79,7 @@ export class PdRequirementComponent implements OnInit { else { let records:any=formValue; - this._pd.saveAdditionalRequirements(records).subscribe(result => { + this._pd.saveAdditionalRequirements(records,"savePDAdditionalRequiremets").subscribe(result => { if (result.status == 200) { this.notifier.notify('success', 'Additional Requirements Updated.'); this.dialogRef.close(); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html index b559b7fd6..71baf3d21 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -26,12 +26,25 @@
+ (selectionChange)="selectedStatement1($event.value)"> + Yes No
+
+
+ + + Yes + No + + +
+
+
Enter year from which financials provided @@ -243,6 +256,7 @@ No +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts index a92aaea1b..a9e65721f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts @@ -64,7 +64,9 @@ export class FinancialInfoComponent implements OnInit { //isreadonly for edit(no of year Fields and Starting Years ) isReadOnly : boolean = false; EditAble: boolean = true; + isDisplay1: boolean ; isDisplay : boolean ; + // AV_netProfitAmtFrmInwords: any = []; // AV_netProfitAmtToInwords: any = []; @@ -340,6 +342,7 @@ export class FinancialInfoComponent implements OnInit { fk_createdby: this.pdid, financial_remarks: [''], is_financial_statements:[''], + latest_year_financials_as_per_applicant_met:[''], is_financial_customer:[''], financial_starting_year : ['',Validators.compose([Validators.minLength(4),Validators.maxLength(4)])], financial_no_of_year : [''], @@ -629,16 +632,47 @@ export class FinancialInfoComponent implements OnInit { } } - selectedStatement(e :any):void{ + selectedStatement1(e :any):void{ if(e == 'yes'){ - this.isDisplay = true; + this.isDisplay1 = true; this.financialForm.controls['is_financial_customer'].setValue(''); } else if(e == 'no'){ + this.isDisplay1 = false; + this.isDisplay = false; + this.selectedFinancialCustomer('no'); + this.financialForm.controls['is_financial_customer'].setValue('no'); + + const statementControl = this.financialForm.controls['date_per_financial']; + + while (statementControl.length !== 0) { + statementControl.removeAt(0); + } + this.financialForm.controls['latest_year_financials_as_per_applicant_met'].setValue(''); + this.financialForm.controls['financial_starting_year'].setValue(''); + this.financialForm.controls['financial_no_of_year'].setValue(''); + + // alert((new Date()).getFullYear()); + // let year1 = (new Date()).getFullYear(); + // let year2 = ((new Date()).getFullYear() + 1); + // let Year = year1 +'-'+ year2; + + } + + } + + selectedStatement(e :any):void{ + + if(e == 'no'){ + this.isDisplay = true; + this.financialForm.controls['is_financial_customer'].setValue(''); + } + else if(e == 'yes'){ + this.isDisplay = false; this.selectedFinancialCustomer('no'); this.financialForm.controls['is_financial_customer'].setValue('no'); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index a6d796741..74fc7d33f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -297,7 +297,7 @@ - Additional Requirements + Queries @@ -306,7 +306,7 @@ -->
- Additional Requirements + Credit Manager’s Specific Queries
@@ -321,10 +321,33 @@ -

No Additional Requirements

+

No Queries

+ + Collected Documents + +
+ Documents to be collected +
+
+ +
+
+ + + +

{{data.doc_name}}

+
+
+
+ + +

No Documents to be Collected

+
+
+
Documents
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index c4dc2f948..f79d2b1af 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -13,6 +13,7 @@ import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component'; import { EditPdApplicantComponent } from '../edit-pd-applicant/edit-pd-applicant.component'; import { EditPdMasterComponent } from '../edit-pd-master/edit-pd-master.component'; import { PdRequirementComponent } from '../pd-requirement/pd-requirement.component'; +import { PdCollectedDocsComponent } from '../pd-collected-docs/pd-collected-docs.component'; import { PdStatusChangeDialogueComponent } from './../pd-status-change-dialogue/pd-status-change-dialogue.component'; import { InitiateAdditionalPdComponent } from './../initiate-additional-pd/initiate-additional-pd.component'; @@ -37,6 +38,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { masterPdLogsData: any = []; applicantPDLogsData: any = []; pdAdditionalReqData: any = []; + pdCollectedDocument: any = []; FilteredFieldNames: any = []; localcount: any; localstring: any; @@ -137,6 +139,8 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.currentPDStatus = data.records.pd_master_details[0].pd_status; this.pdAdditionalReqData = data.records.pd_additional_requirements; + this.pdCollectedDocument = data.records.docs_to_be_collected; + // enable pd start time if (data.records.pd_master_details[0].scheduled_on_for_validation) { let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm'); @@ -289,6 +293,24 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.viewPdDetails(this.viewID,this.masterRandomString) }); } + // edit pd addtional requirements + editCollectedDocument(Data: any) { + let setPdDetails = { + "pdID": this.viewID, + "records": Data + } + const dialogRequirement = this.dialog.open(PdCollectedDocsComponent, { + data: setPdDetails, + position: { right: '0' }, + width: '60%', + disableClose: true + }); + dialogRequirement.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID,this.masterRandomString) + }); + } // pd allocation to pdAllocationTo(pdData: any,childData: any) { pdData.pd_id = childData.assigned_pd; 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 d5444592f..d52fa59d1 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 @@ -75,6 +75,7 @@ import { PdReportComponent, DialogChangeCurrentVenrsion } from './list-pd/pd-rep import { AllocationViewMoreComponent } from './list-pd/allocation-view-more/allocation-view-more.component'; import { PdRequirementComponent } from './list-pd/pd-requirement/pd-requirement.component'; +import { PdCollectedDocsComponent } from './list-pd/pd-collected-docs/pd-collected-docs.component'; import { GeneralInfoComponent } from './list-pd/start-pd/forms/general-info/general-info.component'; import { ModelEditPdReportComponent } from './list-pd/pd-report/model-edit-pd-report/model-edit-pd-report.component'; import { OtherApplicantDetailsComponent } from './list-pd/start-pd/forms/dialogue/other-applicant-details/other-applicant-details.component'; @@ -169,7 +170,7 @@ const pdCustomNotifierOptions: NotifierOptions = { }; @NgModule({ - declarations: [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, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent, FuturePlansAndBusinessEnvironmentComponent, ImageCropComponent,PurchaseCalculationComponent], + declarations: [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,PdCollectedDocsComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent, FuturePlansAndBusinessEnvironmentComponent, ImageCropComponent,PurchaseCalculationComponent], imports: [ CommonModule, ManagePdRoutingModule, @@ -202,13 +203,13 @@ const pdCustomNotifierOptions: NotifierOptions = { AgmCoreModule.forRoot({apiKey: 'AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg'}),OwlDateTimeModule, OwlNativeDateTimeModule, ], - exports: [PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,ImageCropComponent,PurchaseCalculationComponent], + exports: [PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,ImageCropComponent,PurchaseCalculationComponent], providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'}, {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent, - ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,FuturePlansAndBusinessEnvironmentComponent,ImageCropComponent], + ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,FuturePlansAndBusinessEnvironmentComponent,ImageCropComponent], }) export class ManagePdModule { } \ No newline at end of file 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 f4bac1bc2..dc2c5001b 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 @@ -185,6 +185,8 @@ export class PdTrigerService { } // get edit row pd details + // This function also called in Final Remarks Form + // Make sure FinalRemarksForm does not effect. whenever you done any changes onit means editPdDetails(editId: string,randomString): Observable { // { pdid:100, randon_string:'aTeWbidm451' } let httpParams = new HttpParams().set('pdid', editId); @@ -526,11 +528,11 @@ export class PdTrigerService { // return words_string; // } - // save additional requirements - saveAdditionalRequirements(saveData: any): Observable { + // save additional requirements and Docs to be collected + saveAdditionalRequirements(saveData: any,apiName : any): Observable { saveData.createdby = this._aws.getlocale(); - return this._http.post(this.apiUrl + "savePDAdditionalRequiremets", { "records": saveData }) + return this._http.post(this.apiUrl + apiName, { "records": saveData }) .pipe( catchError(this.handleError('operation', [])) ) diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index 5900b3ee6..f3f50537e 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -286,7 +286,7 @@ - Additional Requirements + Queries @@ -295,7 +295,7 @@ -->
- Additional Requirements + Credit Manager’s Specific Queries
@@ -310,7 +310,30 @@ -

No Additional Requirements

+

No Queries

+
+
+ + + Collected Documents + +
+ Documents to be collected +
+
+ +
+
+ + + +

{{data.doc_name}}

+
+
+
+ + +

No Documents to be Collected

diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts index 94961a33d..ccd1d1528 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts @@ -12,6 +12,7 @@ import { SchedulePdComponent } from './../../../personal-discussion/manage-pd/li import { EditPdApplicantComponent } from './../../../personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component'; import { EditPdMasterComponent } from './../../../personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component'; import { PdRequirementComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component'; +import { PdCollectedDocsComponent } from './../../../personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component'; import { InitiateAdditionalPdComponent } from './../../../personal-discussion/manage-pd/list-pd/initiate-additional-pd/initiate-additional-pd.component'; import {QcStartComponent} from '../qc-start/qc-start.component' @@ -148,6 +149,24 @@ export class QcViewComponent implements OnInit, OnDestroy { }); } // edit pd addtional requirements + editCollectedDocument(Data: any) { + let setPdDetails = { + "pdID": this.viewID, + "records": Data + } + const dialogRequirement = this.dialog.open(PdCollectedDocsComponent, { + data: setPdDetails, + position: { right: '0' }, + width: '60%', + disableClose: true + }); + dialogRequirement.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID,this.masterRandomString) + }); + } + // edit pd addtional requirements editAdditionalRequirement(requirementData:any){ let setPdDetails = { "pdID":this.viewID, @@ -165,6 +184,7 @@ export class QcViewComponent implements OnInit, OnDestroy { this.viewPdDetails(this.viewID,this.masterRandomString) }); } + // pd allocation to pdAllocationTo(pdData:any,childData: any) { pdData.pd_id = childData.assigned_pd; diff --git a/ng6-seed/src/app/quality-check/quality-check.module.ts b/ng6-seed/src/app/quality-check/quality-check.module.ts index 7077a2a4e..48bdbd2a0 100755 --- a/ng6-seed/src/app/quality-check/quality-check.module.ts +++ b/ng6-seed/src/app/quality-check/quality-check.module.ts @@ -100,6 +100,7 @@ import { QcCompletedPdComponent } from 'app/personal-discussion/manage-pd/list-p import { PersonalInfoComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/personal-info/personal-info.component'; import { AllocationViewMoreComponent } from 'app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component'; import { PdRequirementComponent } from 'app/personal-discussion/manage-pd/list-pd/pd-requirement/pd-requirement.component'; +import { PdCollectedDocsComponent } from 'app/personal-discussion/manage-pd/list-pd/pd-collected-docs/pd-collected-docs.component'; import { FuturePlansAndBusinessEnvironmentComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component'; import { QcNewComponent } from './qc-list/qc-pd-report/qc-new/qc-new.component'; @@ -219,6 +220,6 @@ const customNotifierOptions: NotifierOptions = { providers : [QcService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'}, {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS},PdLocatedMapViewDirective], - exports: [PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent], + exports: [PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent], }) export class QualityCheckModule { }