PD report and two other buttons hided and credit manager image capture issue

This commit is contained in:
venbatechnologies@gmail.com 2020-10-17 16:10:10 +05:30
parent bc74e60d95
commit 54c9466a71
3 changed files with 73 additions and 73 deletions

View File

@ -791,7 +791,7 @@
<div >
<app-dynamic-docs-form [docs_array_value] = "docs_tobe_collect" [doc_answers] = "creditManagerAnswer" [form_group] = "getQuestionControl().at(6)"
(eventCapturePic) ="capturePic($event.controls,$event.img_name,$event.form_id)"></app-dynamic-docs-form>
(eventCapturePic) ="captureControls($event.controls,$event.img_name,$event.form_id)"></app-dynamic-docs-form>
</div>
<div class="mat-button-div">

View File

@ -10,9 +10,9 @@
<strong> {{master.vendor_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.vendor_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.vendor_status | titlecase}}</strong>
</button>
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button>
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
<button *ngIf="roleAccessDetails.reports && master.pd_type_name && currentPDStatus==pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
<!-- <button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button> -->
<!-- <button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button> -->
<!-- <button *ngIf="roleAccessDetails.reports && master.pd_type_name && currentPDStatus==pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button> -->
<span *ngIf="!is_from_link"><button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button></span>
</div>
</div>

View File

@ -243,47 +243,47 @@ export class ViewPdComponent implements OnInit, OnDestroy {
// window.open(concat_url, '_blank');
// }
editPdMaster(masterData: any, flag) {
let record = {
"records": masterData,
"applicantLength": this.pdApplicantData.length
}
const dialogPDMaster = this.dialog.open(EditPdMasterComponent, {
data: record,
position: { right: '0' },
width: '80%',
disableClose: true
});
dialogPDMaster.afterOpen()
.subscribe(dataresult => {
if (flag == 1) {
let ffd: any = [];
this.FilteredFieldNames.forEach(field => {
if(field != undefined){
ffd.push(field.frontEnd_FieldName);
}
});
// editPdMaster(masterData: any, flag) {
// let record = {
// "records": masterData,
// "applicantLength": this.pdApplicantData.length
// }
// const dialogPDMaster = this.dialog.open(EditPdMasterComponent, {
// data: record,
// position: { right: '0' },
// width: '80%',
// disableClose: true
// });
// dialogPDMaster.afterOpen()
// .subscribe(dataresult => {
// if (flag == 1) {
// let ffd: any = [];
// this.FilteredFieldNames.forEach(field => {
// if(field != undefined){
// ffd.push(field.frontEnd_FieldName);
// }
// });
// this.notifier.notify('info', 'Please Fill ' + ffd.join(' , ') + ' Fields.!');
Swal({
title: 'Please complete the below details',
confirmButtonColor: "red",
// html:true,
//text:'Please Fill' + ffd.forEach(data=>{ data }) + ' ! ',
text: ffd.join(' , ')
});
// Swal({
// title: "HTML <small>Title</small>!",
// text: "...<div class='row my_tracking_swal'>" + flag + "</div>...",
// // this.notifier.notify('info', 'Please Fill ' + ffd.join(' , ') + ' Fields.!');
// Swal({
// title: 'Please complete the below details',
// confirmButtonColor: "red",
// // html:true,
// //text:'Please Fill' + ffd.forEach(data=>{ data }) + ' ! ',
// text: ffd.join(' , ')
// });
// // Swal({
// // title: "HTML <small>Title</small>!",
// // text: "...<div class='row my_tracking_swal'>" + flag + "</div>...",
// }) ;
}
});
dialogPDMaster.afterClosed().subscribe(dataresult => {
// // }) ;
// }
// });
// dialogPDMaster.afterClosed().subscribe(dataresult => {
this.viewPdDetails(this.viewID)
});
}
// this.viewPdDetails(this.viewID)
// });
// }
editPdApplicant(applicantData: any,CSAbbr : any) {
let setPdDetails = {
"pdID": this.viewID,
@ -444,10 +444,10 @@ export class ViewPdComponent implements OnInit, OnDestroy {
});
}
getPDIDReport(pdID: any) {
this.destroyType = 3;
this.router.navigate(['../../../pd_report', pdID,this.masterRandomString], { relativeTo: this.route });
}
// getPDIDReport(pdID: any) {
// this.destroyType = 3;
// this.router.navigate(['../../../pd_report', pdID,this.masterRandomString], { relativeTo: this.route });
// }
// // direct trigger the pd
// directTriggerPD(data: any,masterdetail : any){
@ -484,36 +484,36 @@ export class ViewPdComponent implements OnInit, OnDestroy {
// direct trigger the pd
directTriggerPD(data: any, masterdetail: any) {
// directTriggerPD(data: any, masterdetail: any) {
let pdid = masterdetail.pd_id;
let random_string=masterdetail.random_string
let getValues = data.filter(val => val).map(Val => Val);
this.FilteredFieldNames = getValues.map(x => {
let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x);
return this.localMandatoryFields[findIndex];
});
// let pdid = masterdetail.pd_id;
// let random_string=masterdetail.random_string
// let getValues = data.filter(val => val).map(Val => Val);
// this.FilteredFieldNames = getValues.map(x => {
// let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x);
// return this.localMandatoryFields[findIndex];
// });
if (data.length > 0) {
this.localcount = 1;
this.editPdMaster(masterdetail, this.localcount);
}
else {
let lenderMasterArray = { "pd_id": pdid,random_string:random_string }
this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
if (result.status == 200) {
this.notifier.notify('success', 'PD Status Updated.');
this.viewPdDetails(this.viewID);
}
else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
}, error => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
});
}
// if (data.length > 0) {
// this.localcount = 1;
// this.editPdMaster(masterdetail, this.localcount);
// }
// else {
// let lenderMasterArray = { "pd_id": pdid,random_string:random_string }
// this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
// if (result.status == 200) {
// this.notifier.notify('success', 'PD Status Updated.');
// this.viewPdDetails(this.viewID);
// }
// else {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// }
// }, error => {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// });
// }
}
// }
// this is for initiate additional pd
initiateAddtionalPD(parentData: any, childData: any, type: boolean){