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 3347c7eb8..59ff13a8b 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 @@ -1,13 +1,30 @@

{{dialoge_title_content}}

-
-

+

+

{{dialoge_content}}

+ + +

{{completeness_message}}

+
  • + {{ forms }} +
+
+ +
+ Loading ... +
+
+
+ - - - - + + + + + + + \ 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 1d92d9a6b..19f63f88b 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 @@ -14,28 +14,50 @@ export class PdStatusChangeDialogueComponent implements OnInit { private notifier: NotifierService; dialoge_title_content: string; dialoge_content: string; + dialoge_subcontent : any = []; + completeness_message: string; enableAddonPD : boolean; + CompletenessCheck: boolean; addonStatus: string ="ADD_ON_PENDING"; + public Loading: boolean; constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; - this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion'; - this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion'; + this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion'; + this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion'; this.enableAddonPD = false; + this.CompletenessCheck = this.data.pd_status=='INPROGRESS' ? true : this.data.pd_status=='COMPLETED' ? false : true; + this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false; } ngOnInit() { if(this.data.pd_status=='COMPLETED'){ let params: any={}; - params.pd_id = this.data.pdid; - this.pd.getPDCompleteDetails(params).subscribe(result => { - if (result.dataStatus === true) { - this.enableAddonPD = result.records.address_count>0 ? true: false; - } - }); + params.pd_id = this.data.pdid; + + this.pd.pdFormsCompletenessCheck(this.data.pdid).subscribe(result => { + if (result.dataStatus === true) { + console.log('result',result,this.CompletenessCheck); + if(result.records.length > 0){ + this.completeness_message = result.msg ; + this.dialoge_subcontent = result.records; + this.Loading = false; + } + else{ + this.CompletenessCheck = true; + this.Loading = false; + this.pd.getPDCompleteDetails(params).subscribe(result => { + if (result.dataStatus === true) { + this.enableAddonPD = result.records.address_count>0 ? true: false; + } + }); + } + } + }); } } + changePDStatus(status: string): void { let update_status = { "pd_id":this.data.pdid, 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 8f50e836b..8d9cbc3b7 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 @@ -433,7 +433,7 @@ {{"₹"}} {{details.get('estimate_net_loss_to').value | 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 9cffa502e..11e29a363 100755 --- 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 @@ -241,6 +241,7 @@ export class GeneralInfoComponent implements OnInit { if (exist_companyWithRelationships.length > 0) { exist_companyWithRelationships.forEach(element => { //individualsControl.push(this.createIndividulas(element)) + console.log('elementValue.applicant_name',element); companyWithRelationshipsControl.push(this.createCompaniesRelationshipWithData(element)); }); } @@ -413,7 +414,7 @@ export class GeneralInfoComponent implements OnInit { createCompaniesRelationshipWithData(elementValue: any) { return this._fb.group({ - applicant_name: [this.titleCase.transform(elementValue.applicant_name)], + applicant_name: [this.titleCase.transform(elementValue.applicant_name.toString())], company_relationship: [elementValue.company_relationship], relation_to_company: [elementValue.relation_to_company] }); 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 508b8626a..aff638030 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 @@ -141,12 +141,13 @@ export class StartPdComponent implements OnInit, OnDestroy { }); dialogRef.afterClosed() .subscribe(dataresult => { - if(dataresult.update_status==true){ - checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2); + if(dataresult.update_status==true){ + console.log('if - checkType',checkType); + // checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2); } else { - checkType==1 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2); - + console.log('checkType',checkType); + // checkType==1 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2); } }); 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 711f84f04..014424d95 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 @@ -14,7 +14,7 @@ import { MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatCheckboxModule, MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule, - MatMenuModule, MatButtonToggleModule,MatChipsModule, + MatMenuModule, MatButtonToggleModule,MatChipsModule,MatProgressSpinnerModule, MatAutocompleteModule, MatDatepickerModule } from '@angular/material'; import {MatSlideToggleModule} from '@angular/material/slide-toggle'; @@ -189,7 +189,7 @@ const pdCustomNotifierOptions: NotifierOptions = { MatToolbarModule, FlexLayoutModule, NgxDatatableModule, - MatChipsModule, + MatChipsModule,MatProgressSpinnerModule, FormsModule,MatSlideToggleModule, MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule, ReactiveFormsModule, 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 5c4427b2d..4c26b2495 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 @@ -651,6 +651,15 @@ export class PdTrigerService { catchError(this.handleError('operation', [])) ) } + + // pdFormsCompletenessCheck + pdFormsCompletenessCheck(PDID: any): Observable { + return this._http.post(this.apiUrl + "pdFormsCompletenessCheck",{ "pd_id":PDID}) + .pipe( + catchError(this.handleError('operation', [])) + ) + } + //set role access getRoleAccessDetails() { let setValues:any={};