From 76f768808c112938843f6c054581ef1c2062724c Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 10 Dec 2021 17:41:02 +0530 Subject: [PATCH] latest requirement --- .../pd-allocation.component.html | 142 +++++++++++++++++- .../pd-allocation/pd-allocation.component.ts | 30 +++- .../pd-status-change-dialogue.component.html | 1 + .../pd-status-change-dialogue.component.ts | 7 +- .../ques-form/ques-form.service.ts | 38 ++++- .../start-pd/forms/form/form.component.ts | 4 +- .../list-pd/start-pd/start-pd.component.ts | 3 + .../list-pd/view-pd/view-pd.component.html | 8 +- .../list-pd/view-pd/view-pd.component.ts | 11 +- .../pd-service/pd-triger.service.ts | 6 + 10 files changed, 224 insertions(+), 26 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html index c8030f3..eff0565 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html @@ -1,3 +1,4 @@ +

{{pageTitle}} @@ -12,14 +13,14 @@ - + - +
- - {{officer.first_name}} {{officer.last_name}} + + {{v_officer.first_name}} {{v_officer.last_name}}
+ + + + +
+
+
+ + {{officer.first_name}} {{officer.last_name}} + +
+ +
+ +
+ +
+ +
+ + +

No Regional Credit Managers available.

+
+
+ + + + + + +
+

Regional Credit Manager: {{selectedItem.first_name}}

+
+
+ + +
+ +
+ + + Vendor Allocate + + + + + + + +
+
+
+ + {{v_officer.full_name}} + +
+ +
+ +
+ +
+ +
+ + +

No Regional Credit Managers available.

+
+
+ + + +
+ + +
+

Regional Vendor Manager: {{selectedItem.full_name}}

+
+
+ + +
+ +
+
+ + + + + + + + + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts index 0fbc13e..a4041a9 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts @@ -17,6 +17,7 @@ export class PdAllocationComponent implements OnInit { public pageTitle: string = "Allocation To Credit Manager"; public _pdAllocationForm: FormGroup; public pdOfficerList: any = []; + public vendorOfficerList: any=[]; errorMessage: any; notifier : NotifierService; selectedItem:any; @@ -28,6 +29,7 @@ export class PdAllocationComponent implements OnInit { fk_pd_allocated_to: any; pd_agency_id: string; }; + constructor( notifier: NotifierService, private _fb: FormBuilder, @@ -53,6 +55,7 @@ export class PdAllocationComponent implements OnInit { else { this.getPDOfficerList(this.data.pd_id); + this.getSmcVendorPdOfficerList1(); } // this._pdAllocationForm = this._fb.group({ // pd_primary_id: [null], @@ -65,6 +68,7 @@ export class PdAllocationComponent implements OnInit { // pd officer list getPDOfficerList(pdID:string){ + let user_type if(this.data.lender_role_id == '25') { user_type = "RCM" @@ -77,7 +81,8 @@ export class PdAllocationComponent implements OnInit { console.log(data); if (data.status == 200) { this.pdOfficerList= data.records - console.log('list'); + + console.log('pdofficerlist'); console.log(this.pdOfficerList) } }, error => this.errorMessage = error); @@ -87,16 +92,30 @@ export class PdAllocationComponent implements OnInit { this._pd.getSMCVendorPDOfficersList(this.data.lender_role_id).subscribe( list => { - console.log('vendor'); - console.log(list) + console.log('list'); + console.log(list); if(list['status'] == '200') { - console.log('bit'); - this.pdOfficerList= list['records'] + this.vendorOfficerList= list['records'] } + }, error => this.errorMessage = error); } + getSmcVendorPdOfficerList1(){ + + this._pd.getvendorlist(this.data.city_id).subscribe( + list => { + console.log('list'); + console.log(list); + if(list['status'] == '200') { + this.vendorOfficerList= list['records'] + + } + + }, error => this.errorMessage = error); + + } /** To update pd officer*/ updatePdOfficer(allocateDetails:any) { if(!allocateDetails){ @@ -169,4 +188,5 @@ export class PdAllocationComponent implements OnInit { } + } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.html index b458693..d54544e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.html @@ -23,6 +23,7 @@ + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index 7af6cc7..0197935 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild , Input, Inject} from '@angular/core'; import { NotifierService } from "angular-notifier"; import {MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material'; import { PdTrigerService } from '../../../pd-service/pd-triger.service'; - +import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; @Component({ selector: 'app-pd-status-change-dialogue', templateUrl: './pd-status-change-dialogue.component.html', @@ -61,6 +61,7 @@ export class PdStatusChangeDialogueComponent implements OnInit { // } // }); } + } changePDStatus(status: string): void { @@ -118,5 +119,9 @@ export class PdStatusChangeDialogueComponent implements OnInit { }); } } + Allocatetovendor() + { + + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/ques-form/ques-form.service.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/ques-form/ques-form.service.ts index 5870287..0f1c30f 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/ques-form/ques-form.service.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/ques-form/ques-form.service.ts @@ -3,7 +3,7 @@ import { FormGroup, FormArray, FormBuilder, FormControl, Validators } from '@ang import { HttpClient, HttpParams } from '@angular/common/http'; import { environment } from 'environments/environment'; import { DatePipe } from '@angular/common'; - +import { PdTrigerService } from '../../../../../../pd-service/pd-triger.service'; const apiUrl = environment.apiEndpoint @Injectable({ @@ -20,7 +20,7 @@ export class QuesFormService { pd_all_details:any= {} datepipe: DatePipe; //length: any; - constructor(private _fb:FormBuilder,private http:HttpClient) { + constructor(private _fb:FormBuilder,private http:HttpClient,private pdTriggerService:PdTrigerService) { this.datepipe=new DatePipe('en-US') // this.apiUrl = constantProvider.environment().url } @@ -46,7 +46,14 @@ export class QuesFormService { } assignFormControl_array(formgroup: FormGroup, ques_data: any) { - + + + let pdid = JSON.parse(localStorage.getItem('pdid')) + console.log('formgroup'); + console.log(formgroup.controls); + //formgroup.addControl('nationality'('', [Validators.required])); + //formgroup.addControl('new', new FormControl('', Validators.required)); + const control: any = formgroup ques_data.forEach((val, index) => { @@ -67,8 +74,29 @@ export class QuesFormService { // childControl.push(this._fb.group({ 'questions': this._fb.array([]) })) - - + console.log('veri'); + console.log(val); + if(val.group_key=='cm_queries') + { + + this.pdTriggerService.getAdditionalRequirements(pdid).subscribe(res=>{ + if(res['dataStatus']){ + console.log('requirements'); + console.log(res['records']); + + let queries_docs=res['records'].pd_additional_requirements + + // val.question.push({ + // } + // ) + // val.group_questions[0].push({ + + // }) + // this.docs_array_value=res['records'].docs_to_be_collected + + } + }) + } if(this.len=='3' && val.form_name=='Key Stakeholders in Business') { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts index 6289369..6c3a43a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts @@ -159,8 +159,8 @@ else // this.pdTriggerService.loadTemplate(Number(this.pd_all_details.form_id)).subscribe(result=>{ let params = {"fk_entity_id":this.pd_all_details.pdmaster_details.fk_lender_id,"fk_product_id":this.pd_all_details.pdmaster_details.fk_product_id,"pd_form_id":this.pd_all_details.form_id,"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id} this.pdTriggerService.loadCreditPDTemplate(params).subscribe(result=>{ - if(!environment.production){ - //result.dataStatus = false + if(!environment.production){ + result.dataStatus = false } if(result.dataStatus) { let question_template: any = result.records diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index c770b85..c8d18ba 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -196,6 +196,9 @@ export class StartPdComponent implements OnInit, OnDestroy { console.log('details'); console.log(details) + console.log(details.fk_pd_id); + + localStorage.setItem('pdid',details.fk_pd_id) // this.formsCategoryEnable = true; this.selectedFormsCategory = details; let curr_vendor_ans_fetch_status = null 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 475c44d..aa980ff 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 @@ -43,7 +43,7 @@ - +
@@ -222,7 +222,7 @@ - +

@@ -394,9 +394,9 @@
Credit Manager’s Specific Queries
-
+
- +
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 6d1f2e6..8a11317 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 @@ -32,6 +32,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { private notifier: NotifierService; public userRoleID = +localStorage.getItem('user_role'); public LenderRoleID : any = localStorage.getItem('LenderRoleID'); + errorMessage: any; pdMasterData: any = []; pdAddressesData: any = []; @@ -142,6 +143,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { } ngOnInit() { + this.userRoleType=localStorage.getItem('user_role'); if(this.userRoleType=='28' || this.userRoleType=='29') @@ -379,7 +381,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { StatusUpdate(master) { - let status='QC COMPLETE'; + let status='QC COMPLETED'; let update_status = { "pd_id":master.pd_id, @@ -583,9 +585,12 @@ else { /** To update pd officer*/ selfAllocation(state_id) { + // console.log('allocate'); + // console.log(this.pdMasterData[0].fk_city); + // return if((this.LenderRoleID == '27') || (this.LenderRoleID == '25') || (this.LenderRoleID == '28')){ const dialogRef1 = this.dialog.open(PdAllocationComponent, { - data: { pd_id:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly',state_id:state_id, lender_role_id:this.LenderRoleID }, + data: { pd_id:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,city_id:this.pdMasterData[0].fk_city,dialogType:'actionOnly',state_id:state_id, lender_role_id:this.LenderRoleID }, disableClose: true, minWidth: '30%', }) @@ -597,7 +602,7 @@ else { }) } else{ - // return; + const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { data: { pdid:this.viewID, pd_status: "CM_ALLOCATED",random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' }, disableClose: true, 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 c1e0d7c..5bc8bc9 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 @@ -951,6 +951,12 @@ loadTemplate(form_id) { return returnValue }) } + getAdditionalRequirements(pdid) + { + + // return this.http.post(this.apiurl+'getFullPDDetails?pdid=pdid'); + return this._http.get(this.apiUrl+'getAdditionalRequirements?pdid='+pdid) + } loadCreditPDTemplate(params):Observable { return this._http.post(this.apiUrl+'loadCreditPDTemplate',params) .pipe(catchError(this.handleError("loadCreditPDTemplate",[])))