completeness changes

This commit is contained in:
venbatechnologies@gmail.com 2019-06-22 15:29:37 +05:30
parent c210529695
commit 3fd35ea6fa
7 changed files with 72 additions and 22 deletions

View File

@ -1,13 +1,30 @@
<h2 mat-dialog-title>{{dialoge_title_content}}</h2> <h2 mat-dialog-title>{{dialoge_title_content}}</h2>
<mat-dialog-content> <mat-dialog-content>
<div fxFlex="100" align="center"> <div fxFlex="100">
<p> <p align="center">
{{dialoge_content}} {{dialoge_content}}
</p> </p>
<span *ngIf="!CompletenessCheck">
<span *ngIf="!Loading">
<p align="center" style="color: red !important;"> {{completeness_message}} </p>
<ul><li *ngFor="let forms of dialoge_subcontent" style="color: red !important;">
{{ forms }}
</li></ul>
</span>
<span *ngIf="Loading">
<div fxLayoutAlign="center">
<mat-progress-spinner mode="indeterminate">Loading ... </mat-progress-spinner>
</div> </div>
</span>
</span>
</div>
</mat-dialog-content> </mat-dialog-content>
<mat-dialog-actions align="end"> <mat-dialog-actions align="end" *ngIf="CompletenessCheck">
<button *ngIf="enableAddonPD===true" mat-raised-button color="primary" (click)="changePDStatus(addonStatus)"><strong> Yes / Allow Addon PD</strong></button> <button *ngIf="enableAddonPD===true" mat-raised-button color="primary" (click)="changePDStatus(addonStatus)"><strong> Yes / Allow Addon PD</strong></button>
<button mat-raised-button color="primary" (click)="changePDStatus(this.data.pd_status)"><strong>Yes</strong></button> <button mat-raised-button color="primary" (click)="changePDStatus(this.data.pd_status)"><strong>Yes</strong></button>
<button mat-raised-button mat-dialog-close><strong>No</strong></button> <button mat-raised-button mat-dialog-close><strong> No </strong></button>
</mat-dialog-actions> </mat-dialog-actions>
<mat-dialog-actions align="end" *ngIf="!CompletenessCheck">
<button mat-raised-button mat-dialog-close><strong> Ok </strong></button>
</mat-dialog-actions>

View File

@ -14,21 +14,39 @@ export class PdStatusChangeDialogueComponent implements OnInit {
private notifier: NotifierService; private notifier: NotifierService;
dialoge_title_content: string; dialoge_title_content: string;
dialoge_content: string; dialoge_content: string;
dialoge_subcontent : any = [];
completeness_message: string;
enableAddonPD : boolean; enableAddonPD : boolean;
CompletenessCheck: boolean;
addonStatus: string ="ADD_ON_PENDING"; addonStatus: string ="ADD_ON_PENDING";
public Loading: boolean;
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any) constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
{ {
this.notifier = notifier; 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_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_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.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() { ngOnInit() {
if(this.data.pd_status=='COMPLETED'){ if(this.data.pd_status=='COMPLETED'){
let params: any={}; let params: any={};
params.pd_id = this.data.pdid; 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 => { this.pd.getPDCompleteDetails(params).subscribe(result => {
if (result.dataStatus === true) { if (result.dataStatus === true) {
this.enableAddonPD = result.records.address_count>0 ? true: false; this.enableAddonPD = result.records.address_count>0 ? true: false;
@ -36,6 +54,10 @@ export class PdStatusChangeDialogueComponent implements OnInit {
}); });
} }
} }
});
}
}
changePDStatus(status: string): void { changePDStatus(status: string): void {
let update_status = { let update_status = {
"pd_id":this.data.pdid, "pd_id":this.data.pdid,

View File

@ -433,7 +433,7 @@
<mat-form-field style="width:25%"> <mat-form-field style="width:25%">
<input matInput autocomplete="off" placeholder="Net Loss Amount To" <input matInput autocomplete="off" placeholder="Net Loss Amount To"
formControlName="estimate_net_loss_from" OnlyNumber type="text" formControlName="estimate_net_loss_to" OnlyNumber type="text"
(change)="calculateLossAmount(i, details);"> (change)="calculateLossAmount(i, details);">
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"&#8377;"}} <mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"&#8377;"}}
{{details.get('estimate_net_loss_to').value | {{details.get('estimate_net_loss_to').value |

View File

@ -241,6 +241,7 @@ export class GeneralInfoComponent implements OnInit {
if (exist_companyWithRelationships.length > 0) { if (exist_companyWithRelationships.length > 0) {
exist_companyWithRelationships.forEach(element => { exist_companyWithRelationships.forEach(element => {
//individualsControl.push(this.createIndividulas(element)) //individualsControl.push(this.createIndividulas(element))
console.log('elementValue.applicant_name',element);
companyWithRelationshipsControl.push(this.createCompaniesRelationshipWithData(element)); companyWithRelationshipsControl.push(this.createCompaniesRelationshipWithData(element));
}); });
} }
@ -413,7 +414,7 @@ export class GeneralInfoComponent implements OnInit {
createCompaniesRelationshipWithData(elementValue: any) { createCompaniesRelationshipWithData(elementValue: any) {
return this._fb.group({ 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], company_relationship: [elementValue.company_relationship],
relation_to_company: [elementValue.relation_to_company] relation_to_company: [elementValue.relation_to_company]
}); });

View File

@ -142,11 +142,12 @@ export class StartPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed() dialogRef.afterClosed()
.subscribe(dataresult => { .subscribe(dataresult => {
if(dataresult.update_status==true){ if(dataresult.update_status==true){
checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2); 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 { 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);
} }
}); });

View File

@ -14,7 +14,7 @@ import {
MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule, MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule,
MatTabsModule, MatCheckboxModule, MatTabsModule, MatCheckboxModule,
MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule, MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule,
MatMenuModule, MatButtonToggleModule,MatChipsModule, MatMenuModule, MatButtonToggleModule,MatChipsModule,MatProgressSpinnerModule,
MatAutocompleteModule, MatDatepickerModule } from '@angular/material'; MatAutocompleteModule, MatDatepickerModule } from '@angular/material';
import {MatSlideToggleModule} from '@angular/material/slide-toggle'; import {MatSlideToggleModule} from '@angular/material/slide-toggle';
@ -189,7 +189,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
MatToolbarModule, MatToolbarModule,
FlexLayoutModule, FlexLayoutModule,
NgxDatatableModule, NgxDatatableModule,
MatChipsModule, MatChipsModule,MatProgressSpinnerModule,
FormsModule,MatSlideToggleModule, FormsModule,MatSlideToggleModule,
MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule, MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule,
ReactiveFormsModule, ReactiveFormsModule,

View File

@ -651,6 +651,15 @@ export class PdTrigerService {
catchError(this.handleError('operation', [])) catchError(this.handleError('operation', []))
) )
} }
// pdFormsCompletenessCheck
pdFormsCompletenessCheck(PDID: any): Observable<any> {
return this._http.post<any>(this.apiUrl + "pdFormsCompletenessCheck",{ "pd_id":PDID})
.pipe(
catchError(this.handleError('operation', []))
)
}
//set role access //set role access
getRoleAccessDetails() { getRoleAccessDetails() {
let setValues:any={}; let setValues:any={};