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 eff0565..18f69ab 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,7 +1,8 @@

- {{pageTitle}} + + Allocate to Vendor
@@ -20,7 +21,7 @@
- {{v_officer.first_name}} {{v_officer.last_name}} + {{v_officer.name}}
\ No newline at end of file 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 0197935..8ab6bea 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 @@ -3,6 +3,7 @@ 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', @@ -22,6 +23,8 @@ export class PdStatusChangeDialogueComponent implements OnInit { public Loading: boolean; dialogType: any; usertype: string; + vendorOfficerList: any; + errorMessage: any; constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { @@ -61,8 +64,28 @@ export class PdStatusChangeDialogueComponent implements OnInit { // } // }); } + this.getSmcVendorPdOfficerList1(); + } + 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); } + // Allocatetovendor() + // { + // alert('allocate'); + + // } + changePDStatus(status: string): void { @@ -119,9 +142,6 @@ 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 0f1c30f..e9f430b 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 @@ -49,8 +49,12 @@ export class QuesFormService { let pdid = JSON.parse(localStorage.getItem('pdid')) + // alert('pdid'); + // alert(pdid); console.log('formgroup'); + console.log(formgroup); console.log(formgroup.controls); + //formgroup.addControl('nationality'('', [Validators.required])); //formgroup.addControl('new', new FormControl('', Validators.required)); @@ -79,19 +83,45 @@ export class QuesFormService { if(val.group_key=='cm_queries') { + alert(pdid); this.pdTriggerService.getAdditionalRequirements(pdid).subscribe(res=>{ if(res['dataStatus']){ console.log('requirements'); console.log(res['records']); - + control.addControl(val.group_key, this._fb.array([])) let queries_docs=res['records'].pd_additional_requirements // val.question.push({ // } // ) - // val.group_questions[0].push({ + val.group_questions.push([ + { + "question":"Question", + "question_key":"question", + "place_holder":"Enter text", + "type":"1", + "api_properties":null, + "answers":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"string", + "validations":[ + ] + }, + { + "question":"Answer", + "question_key":"answer", + "place_holder":"Enter the answer here", + "type":"7", + "api_properties":null, + "answers":null, + "onchange_properties":null, + "is_repeatable":null, + "validations":[ + ] + } - // }) + ]) // this.docs_array_value=res['records'].docs_to_be_collected } 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 c8d18ba..a17ca77 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,9 +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 aa980ff..a180bf0 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 @@ -40,10 +40,10 @@ - + - +
@@ -219,10 +219,12 @@ + + - +

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 8a11317..5b76d57 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 @@ -357,7 +357,9 @@ export class ViewPdComponent implements OnInit, OnDestroy { getPDStart(pdDetails: any, status: string) { console.log(pdDetails); - console.log('pddetails'); + // console.log(pdDetails.fk_pd_id); + // console.log('pddetails'); + localStorage.setItem('pdid',pdDetails.fk_pd_id) this.destroyType = 3; if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED || status == this.pdStatusCheck.TRIGGERED||status == this.pdStatusCheck.ALLOCATED_TO_FIA) { const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { @@ -583,6 +585,20 @@ else { }) } +Allocationtovendor(state_id) +{ + const dialogRef1 = this.dialog.open(PdAllocationComponent, { + 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%', +}) +dialogRef1.afterClosed().subscribe(rr=>{ + if(rr) { + this.viewPdDetails(this.viewID) + } + // this.notifier.notify("success","Allocated Successfully") +}) +} /** To update pd officer*/ selfAllocation(state_id) { // console.log('allocate'); @@ -604,7 +620,7 @@ else { else{ const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { - data: { pdid:this.viewID, pd_status: "CM_ALLOCATED",random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' }, + data: { pdid:this.viewID, pd_status: "CM_ALLOCATED",random_string:this.pdMasterData[0].random_string,city_id:this.pdMasterData[0].fk_city,dialogType:'actionOnly' }, disableClose: true, minWidth: '30%', // maxWidth: '40%',