completeness changes
This commit is contained in:
parent
c210529695
commit
3fd35ea6fa
@ -1,13 +1,30 @@
|
||||
<h2 mat-dialog-title>{{dialoge_title_content}}</h2>
|
||||
<mat-dialog-content>
|
||||
<div fxFlex="100" align="center">
|
||||
<p>
|
||||
<div fxFlex="100">
|
||||
<p align="center">
|
||||
{{dialoge_content}}
|
||||
</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>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<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 mat-dialog-close><strong>No</strong></button>
|
||||
<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 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>
|
||||
</mat-dialog-actions>
|
||||
<mat-dialog-actions align="end" *ngIf="!CompletenessCheck">
|
||||
<button mat-raised-button mat-dialog-close><strong> Ok </strong></button>
|
||||
</mat-dialog-actions>
|
||||
@ -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<PdStatusChangeDialogueComponent>,@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,
|
||||
|
||||
@ -433,7 +433,7 @@
|
||||
|
||||
<mat-form-field style="width:25%">
|
||||
<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);">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"₹"}}
|
||||
{{details.get('estimate_net_loss_to').value |
|
||||
|
||||
@ -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]
|
||||
});
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -651,6 +651,15 @@ export class PdTrigerService {
|
||||
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
|
||||
getRoleAccessDetails() {
|
||||
let setValues:any={};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user