all changes done

This commit is contained in:
venbatechnologies@gmail.com 2021-12-01 01:17:28 +05:30
parent 1724eb379e
commit dec2aecaa4
3 changed files with 25 additions and 6 deletions

View File

@ -82,6 +82,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
productname: any;
role_id: any;
prod_seg: any;
usertype: string;
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
private titleCase : TitleCasePipe,private userService:UserService,private matDialog:MatDialog) {
@ -634,11 +635,21 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
}
// this.usertype=localStorage.getItem('usertype');
// if(this.usertype=='true')
// {
// this._PDtriggerForm.controls['vendor'].setValidators([Validators.required]);
// this._PDtriggerForm.controls['vendor'].updateValueAndValidity();
// }
// else
// {
this._PDtriggerForm.controls['vendor'].setValidators([]);
this._PDtriggerForm.controls['vendor'].updateValueAndValidity();
// }
this._PDtriggerForm.controls['applicant_name'].setValidators([Validators.required]);
this._PDtriggerForm.controls['applicant_name'].updateValueAndValidity();
this._PDtriggerForm.controls['vendor'].setValidators([Validators.required]);
this._PDtriggerForm.controls['vendor'].updateValueAndValidity();
this._PDtriggerForm.controls['applicant_title_name'].setValidators([Validators.required]);
this._PDtriggerForm.controls['applicant_title_name'].updateValueAndValidity();

View File

@ -34,12 +34,17 @@
<button *ngIf="is_agency_logged_in == false" mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
</button>
<button *ngIf="is_agency_logged_in == true" mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
<button *ngIf="is_agency_logged_in == true && LenderRoleID == '28'" mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
<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 && (LenderRoleID == '25' && (currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED)) || (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="(master.lender_short_name != 'MWISE' && currentPDStatus==pdStatusCheck.QC_COMPLETED ) || (master.lender_short_name == 'MWISE' && LenderRoleID != '25' && currentPDStatus==pdStatusCheck.COMPLETED) && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
<span *ngIf="is_agency_logged_in ==false">
<button *ngIf="(master.lender_short_name != 'MWISE' && currentPDStatus==pdStatusCheck.QC_COMPLETED ) || (master.lender_short_name == 'MWISE' && LenderRoleID != '25' && currentPDStatus==pdStatusCheck.COMPLETED||currentVendorStatus==pdStatusCheck.COMPLETED) && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
</span>
<button *ngIf="is_agency_logged_in ==true && (master.lender_short_name != 'MWISE' && currentPDStatus==pdStatusCheck.QC_COMPLETED ) || (master.lender_short_name == 'MWISE' && LenderRoleID == '28' && currentVendorStatus==pdStatusCheck.COMPLETED) && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot11</mat-icon></button>
<span><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>
@ -213,7 +218,7 @@
<!-- {{userId == master.fk_pd_allocated_to}} -->
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25' && userId == master.fk_pd_allocated_to"> <button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && addresses.addtional_pd_data[0].pd_status == pdStatusCheck.ALLOCATED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Reject" matTooltipPosition="above" (click)="rejectPD()"><mat-icon>settings_backup_restore</mat-icon></button></span>
<span *ngIf="is_agency_logged_in == false && master.lender_short_name == 'MWISE' && LenderRoleID == '27' || LenderRoleID == '25' && currentPDStatus == pdStatusCheck.BOUNCED "><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.ALLOCATED_TO_FIA ||currentPDStatus == pdStatusCheck.TRIGGERED|| (currentPDStatus == pdStatusCheck.ALLOCATED && userId == master.fk_pd_allocated_to)|| (currentPDStatus == pdStatusCheck.BOUNCED && userId == master.fk_pd_allocated_to)) " mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="selfAllocation(addresses.fk_state)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="is_agency_logged_in == true && master.lender_short_name == 'MWISE' && LenderRoleID == '28' && (currentVendorStatus == pdStatusCheck.ALLOCATED ||currentVendorStatus == pdStatusCheck.INPROGRESS)"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentVendorStatus == pdStatusCheck.ALLOCATED_TO_FIA||currentVendorStatus == pdStatusCheck.INPROGRESS ||currentVendorStatus == pdStatusCheck.ALLOCATED|| (currentVendorStatus == pdStatusCheck.ALLOCATED && userId == master.fk_pd_allocated_to)|| (currentVendorStatus == pdStatusCheck.BOUNCED && userId == master.fk_pd_allocated_to)) " mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="selfAllocation(addresses.fk_state)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="LenderRoleID =='28' && master.lender_short_name == 'MWISE'"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.ALLOCATED_TO_FIA||currentVendorStatus == pdStatusCheck.INPROGRESS ||currentVendorStatus == pdStatusCheck.ALLOCATED|| (currentVendorStatus == pdStatusCheck.ALLOCATED && userId == master.fk_pd_allocated_to)|| (currentVendorStatus == pdStatusCheck.BOUNCED && userId == master.fk_pd_allocated_to)) " mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="selfAllocation(addresses.fk_state)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && (LenderRoleID == '26')"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.TRIGGERED || (currentPDStatus == pdStatusCheck.ALLOCATED && master.pd_allocated_to_role_id == '27')) " mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate to Self" matTooltipPosition="above" (click)="selfAllocation(addresses.fk_city)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25' && (LenderRoleID != '26' || userId == master.fk_pd_allocated_to)"><button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.ALLOCATED || currentPDStatus == pdStatusCheck.INPROGRESS)" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Send back to CPA" matTooltipPosition="above" (click)="allocateToCpa()"><mat-icon>swap_vert</mat-icon></button></span>
<span *ngIf="is_agency_logged_in == false && master.lender_short_name == 'MWISE' && LenderRoleID != '25' && (LenderRoleID != '26' || userId == master.fk_pd_allocated_to)"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.BOUNCED && (LenderRoleID == '27' || LenderRoleID == '28'||currentPDStatus!=pdStatusCheck.TRIGGERED)||LenderRoleID == '29'" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span>

View File

@ -136,6 +136,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.notifier = notifier;
this.enableStartPD = false;
this.roleAccessDetails=this._pd.getRoleAccessDetails();
console.log(this.roleAccessDetails);
}
@ -506,6 +507,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
}
smcCreditPDReport(pd_id) {
// this.destroyType = 3;
// this.router.navigate(['../../../pd_report', pd_id,this.masterRandomString], { relativeTo: this.route });
if(this.pdMasterData[0].lender_short_name != 'MWISE') {
@ -514,6 +516,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
}
let params = { "pd_id":pd_id,"fk_createdby":"","regenerate":"0"}
this._pd.smcCreditPDReport(params).subscribe(result=>{
if(result.dataStatus) {
window.open(result.records)
}