button hide and show : ps

This commit is contained in:
VENBA-emp-10 sanjeev 2022-02-14 10:59:40 +05:30
parent 1d286555a4
commit b133b749d9
3 changed files with 17 additions and 11 deletions

View File

@ -42,9 +42,9 @@
<span *ngIf="is_agency_logged_in ==false">
<button *ngIf="(master.lender_short_name != 'MWISE') || (master.lender_short_name == 'MWISE' && LenderRoleID != '25' && currentPDStatus==pdStatusCheck.COMPLETED ||currentVendorStatus=='QC COMPLETED'||currentVendorStatus=='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>
<!--<span *ngIf="is_agency_logged_in ==true">
<button *ngIf="is_agency_logged_in ==true && (master.lender_short_name != 'MWISE') || (master.lender_short_name == 'MWISE' && ( currentVendorStatus=='QC COMPLETED'||currentVendorStatus=='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>-->
<span *ngIf="is_agency_logged_in ==true">
<button *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID == '28' && (currentVendorStatus=='COMPLETED'||currentVendorStatus=='QC 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>
<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>
@ -216,15 +216,16 @@
<div fxFlex="62" align="right">
<!-- <span><button *ngIf="roleAccessDetails.trigger && addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span> -->
<!-- {{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 || currentPDStatus!=pdStatusCheck.CANCELLED" 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="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 || currentPDStatus!=pdStatusCheck.CANCELLED && (userRoleID == '28' && (currentVendorStatus !=pdStatusCheck.COMPLETED || currentVendorStatus !=pdStatusCheck.QC_COMPLETED)) || (userRoleID == '29' && currentVendorStatus !=pdStatusCheck.QC_COMPLETED)" 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|| (currentPDStatus == pdStatusCheck.ALLOCATED && userId == master.fk_pd_allocated_to)|| (currentPDStatus == pdStatusCheck.BOUNCED && userId == master.fk_pd_allocated_to) || currentPDStatus==pdStatusCheck.CANCELLED) " 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'&&currentVendorStatus != 'QC COMPLETED' && 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) || currentPDStatus!=pdStatusCheck.CANCELLED) " 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.CANCELLED || (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_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 == '26') " mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate to Vendor" matTooltipPosition="above" (click)="Allocationtovendor(addresses.fk_state)"><mat-icon>assignment_ind</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 && currentPDStatus!=pdStatusCheck.CANCELLED && (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>
<span *ngIf="is_agency_logged_in == true && master.lender_short_name == 'MWISE' && LenderRoleID != '25' && (LenderRoleID != '29' || userId == master.fk_pd_allocated_to && currentVendorStatus!='QC COMPLETED')"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && currentVendorStatus!=pdStatusCheck.BOUNCED && currentVendorStatus!='QC COMPLETED'&& (LenderRoleID == '27' || LenderRoleID == '28'||currentVendorStatus!=pdStatusCheck.TRIGGERED)|| currentPDStatus!=pdStatusCheck.CANCELLED || 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].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
<span *ngIf="((currentPDStatus!=pdStatusCheck.CANCELLED) && (currentVendorStatus != pdStatusCheck.CANCELLED)) && (userRoleID == '28' || userRoleID == '26' || userRoleID == '27') "><button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Cancel PD" matTooltipPosition="above" (click)="cancelPD(addresses)"><mat-icon>cancel_presentation</mat-icon></button></span>
<!-- <span *ngIf="is_agency_logged_in == true && master.lender_short_name == 'MWISE' && LenderRoleID != '25' && (LenderRoleID != '29' || userId == master.fk_pd_allocated_to && currentVendorStatus!='QC COMPLETED')"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && currentVendorStatus!=pdStatusCheck.BOUNCED && currentVendorStatus!='QC COMPLETED'&& (LenderRoleID == '27' || LenderRoleID == '28'||currentVendorStatus!=pdStatusCheck.TRIGGERED)|| currentPDStatus!=pdStatusCheck.CANCELLED || 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].vendor_status)"><mat-icon>question_answer</mat-icon></button></span> -->
<span *ngIf="is_agency_logged_in == true && master.lender_short_name == 'MWISE' && (userRoleID == '28' && currentVendorStatus !=pdStatusCheck.COMPLETED && currentVendorStatus !=pdStatusCheck.QC_COMPLETED) && (userRoleID == '29' && currentVendorStatus !=pdStatusCheck.QC_COMPLETED)"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && currentVendorStatus!=pdStatusCheck.BOUNCED && currentVendorStatus!='QC COMPLETED'&& (LenderRoleID == '27' || LenderRoleID == '28'||currentVendorStatus!=pdStatusCheck.TRIGGERED)|| (currentPDStatus!=pdStatusCheck.CANCELLED||currentVendorStatus != pdStatusCheck.CANCELLED) || 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].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
<span *ngIf="((currentPDStatus!=pdStatusCheck.CANCELLED) && (currentVendorStatus != pdStatusCheck.CANCELLED)) && (userRoleID == '26' || userRoleID == '27') && (userRoleID == '28' && currentVendorStatus !=pdStatusCheck.COMPLETED && currentVendorStatus !=pdStatusCheck.QC_COMPLETED) && (userRoleID == '29' && currentVendorStatus !=pdStatusCheck.QC_COMPLETED)"><button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Cancel PD" matTooltipPosition="above" (click)="cancelPD(addresses)"><mat-icon>cancel_presentation</mat-icon></button></span>
</div>
</div><!-- div @207 closed here -->
</div><!-- div @206 closed here -->

View File

@ -358,11 +358,13 @@ export class ViewPdComponent implements OnInit, OnDestroy {
getPDStart(pdDetails: any, status: string) {
// console.log("status = ",status);
// console.log("pdDetails",pdDetails,pdDetails.fk_pd_id);
// console.log("pdDetails",pdDetails,pdDetails.fk_pd_id,this.pdMasterData);
let pd_allocated_to = this.pdMasterData[0].pd_allocated_to;
localStorage.setItem('pdid',pdDetails.fk_pd_id)
this.destroyType = 3;
let doSelfAllocated = 0;/** this for flag **/
if((status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.ALLOCATED_TO_FIA) && (this.userRoleID == 27 || this.userRoleID == 28) && this.userId != pdDetails.fk_pd_allocated_to){
if(this.userId != pd_allocated_to && (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.ALLOCATED_TO_FIA) && (this.userRoleID == 27 || this.userRoleID == 28)){
console.log(this.userId,pd_allocated_to);
/* console.log("if for flag",status);
doSelfAllocated = 1;*/
this.selfallocate(pdDetails.fk_pd_id);
@ -753,6 +755,9 @@ dialogRef1.afterClosed().subscribe(rr=>{
"pd_id":pd,
"fk_pd_allocated_to":localStorage.getItem('userid'),
}
if((localStorage.getItem('smc_agency_id') != "") && (this.userRoleID==28)){
updateData.pd_agency_id =localStorage.getItem('smc_agency_id');
}
console.log('updateData obj gotten -> ',updateData);
// return
this._pd.updatePdOfficer(updateData).subscribe(

View File

@ -103,13 +103,13 @@ export class LoginComponent implements OnInit{
})
}
forgotpassword() {
this.dashBoardService.generateotp(this.email).subscribe(
this.dashBoardService.generateotp(this.email.split(/\s/).join('')).subscribe(
data => {
console.log('data');
console.log(data)
if (data.status == 200) {
this.dialogRef = this.dialog.open(OtpComponent, {
data: this.email,
data: this.email.split(/\s/).join(''),
width: '60%',
disableClose: true
});
@ -132,7 +132,7 @@ export class LoginComponent implements OnInit{
let dialogRef = this.dialog.open(NewPasswordDialog, this.config);
dialogRef.afterClosed().subscribe(result => {
if (result !== undefined) {
let auth = { 'Username': this.email, 'Password': this.password, 'newpassword': result };
let auth = { 'Username': this.email.split(/\s/).join(''), 'Password': this.password, 'newpassword': result };
this.aws.dologin(auth).subscribe(res => {
this.getCommonSettings();
this.router.navigate(['/']);