status updated changes
This commit is contained in:
parent
3b0036fe03
commit
b63a42ef6f
@ -71,8 +71,8 @@ export class ListPdComponent implements OnInit, OnDestroy {
|
||||
this.userService.getroles().subscribe(res=>{
|
||||
let role_name = this.userService.takeDecisionRouting(res['records'][0])
|
||||
console.log('userrole');
|
||||
console.log(res);
|
||||
|
||||
|
||||
localStorage.setItem('smc_agency_id',res['records'][0].smc_agency_id);
|
||||
localStorage.setItem('len_user_role',role_name);
|
||||
this.user_role_name=role_name
|
||||
})
|
||||
|
||||
@ -42,7 +42,8 @@ export class PdAllocationComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.usertype=localStorage.getItem('usertype');
|
||||
|
||||
this.isDisabled=true;
|
||||
console.log(this.data)
|
||||
if(this.data.lender_role_id=='28')
|
||||
@ -83,7 +84,7 @@ export class PdAllocationComponent implements OnInit {
|
||||
|
||||
}
|
||||
getSmcVendorPdOfficerList(){
|
||||
alert('new');
|
||||
|
||||
this._pd.getSMCVendorPDOfficersList(this.data.lender_role_id).subscribe(
|
||||
list => {
|
||||
console.log('vendor');
|
||||
|
||||
@ -21,6 +21,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
addonStatus: string ="ADD_ON_PENDING";
|
||||
public Loading: boolean;
|
||||
dialogType: any;
|
||||
usertype: string;
|
||||
|
||||
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
|
||||
{
|
||||
@ -60,14 +61,40 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
changePDStatus(status: string): void {
|
||||
this.usertype=localStorage.getItem('usertype');
|
||||
console.log(this.dialogType,this.enableAddonPD)
|
||||
if(this.dialogType == 'actionOnly' && !this.enableAddonPD) {
|
||||
this.dialogRef.close({update_status:true});
|
||||
return;
|
||||
}
|
||||
let update_status = {
|
||||
|
||||
if(this.usertype=='true')
|
||||
{
|
||||
let update_status = {
|
||||
"pd_id":this.data.pdid,
|
||||
"random_string":this.data.random_string
|
||||
};
|
||||
this.pd.updateVendorStatus(update_status, status).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
this.dialogRef.close({update_status:true});
|
||||
this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Completed Successfully' : this.data.pd_status=='BOUNCED' ? 'PD Rejected Successfully' :'Discussions Updated Successfully');
|
||||
}
|
||||
else {
|
||||
this.dialogRef.close({update_status:false});
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
this.dialogRef.close({update_status:false});
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
let update_status = {
|
||||
"pd_id":this.data.pdid,
|
||||
"random_string":this.data.random_string
|
||||
};
|
||||
@ -85,5 +112,6 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<!--<div fxFlex="20" align="end">
|
||||
<span style="padding: 2px 9px 3px 9px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
|
||||
</div> -->
|
||||
</mat-card-header>
|
||||
</mat-card-header>
|
||||
</mat-card>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
@ -201,10 +201,10 @@
|
||||
<!-- <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" 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 == '27' || LenderRoleID == '25' && currentPDStatus == pdStatusCheck.BOUNCED"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (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="master.lender_short_name == 'MWISE' && (LenderRoleID == '26'||LenderRoleID == '28')"><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 == '27' || LenderRoleID == '25' && currentPDStatus == pdStatusCheck.BOUNCED ||LenderRoleID == '28'"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (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="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="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' || currentPDStatus!=pdStatusCheck.TRIGGERED)" 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="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)" 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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -336,6 +336,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
// start pd
|
||||
getPDStart(pdDetails: any, status: string) {
|
||||
|
||||
console.log(pdDetails);
|
||||
console.log('pddetails');
|
||||
this.destroyType = 3;
|
||||
@ -541,7 +542,7 @@ else {
|
||||
|
||||
/** To update pd officer*/
|
||||
selfAllocation(state_id) {
|
||||
if(this.LenderRoleID == '27' || this.LenderRoleID == '25'|| this.LenderRoleID == '28') {
|
||||
if((this.LenderRoleID == '27') || (this.LenderRoleID == '25') || (this.LenderRoleID == '28')){
|
||||
const dialogRef1 = this.dialog.open(PdAllocationComponent, {
|
||||
data: { pd_id:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly',state_id:state_id, lender_role_id:this.LenderRoleID },
|
||||
disableClose: true,
|
||||
|
||||
@ -172,10 +172,10 @@ export class PdTrigerService {
|
||||
// get pd details
|
||||
getPdDetails(lenderId): Observable<any> {
|
||||
this.usertype=localStorage.getItem('usertype');
|
||||
if(this.usertype=='true')
|
||||
if(this.usertype=='true1')
|
||||
{
|
||||
this.entity_id = localStorage.getItem('user_role');
|
||||
this.entity_id = localStorage.getItem('user_role');
|
||||
|
||||
this.entity_id = localStorage.getItem('smc_agency_id');
|
||||
let userid1=this._aws.getlocale()
|
||||
const Lender:any = this.entity_id ?
|
||||
{ params: new HttpParams().set('smcagencyid', this.entity_id) } :
|
||||
@ -212,10 +212,10 @@ export class PdTrigerService {
|
||||
getTabStatusPdDetails(status: string,lenderId): Observable<any> {
|
||||
|
||||
this.usertype=localStorage.getItem('usertype');
|
||||
if(this.usertype=='true')
|
||||
if(this.usertype=='true1')
|
||||
{
|
||||
|
||||
this.entity_id = localStorage.getItem('user_role');
|
||||
this.entity_id = localStorage.getItem('smc_agency_id');
|
||||
let userid1=this._aws.getlocale()
|
||||
let paramHttp1:any= this.entity_id && status ?
|
||||
{params : new HttpParams().set('smcagencyid', this.entity_id).set('status',status)} : {};
|
||||
@ -263,6 +263,16 @@ export class PdTrigerService {
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
updateVendorStatus(editData: any, status: string): Observable<any> {
|
||||
editData.pd_status = status;
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updateVendorStatus", { records: editData })
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
// initiate address for pd process
|
||||
initiateAddressPdProcess(updateDate: any): Observable<any> {
|
||||
updateDate.fk_updatedby = this._aws.getlocale();
|
||||
@ -302,6 +312,7 @@ export class PdTrigerService {
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// update pd schedule
|
||||
// updateSchedule(updateData: any): Observable<any> {
|
||||
@ -695,7 +706,7 @@ export class PdTrigerService {
|
||||
// if(LenderRoleID == '25') {
|
||||
if(this.usertype=='true')
|
||||
{
|
||||
searchItem.smc_agency_id = localStorage.getItem('user_role');
|
||||
searchItem.smc_agency_id = localStorage.getItem('smc_agency_id');
|
||||
}
|
||||
searchItem.createdby = userid
|
||||
// }
|
||||
|
||||
@ -72,6 +72,8 @@ export class LoginComponent implements OnInit{
|
||||
// console.log("do login",res);
|
||||
if (res !== undefined) {
|
||||
this.getCommonSettings();
|
||||
console.log('ressss');
|
||||
console.log(res);
|
||||
// local storage for validate user access
|
||||
localStorage.setItem('user_role',res.idToken.payload["custom:role_id"]);
|
||||
this.router.navigate(['/']);
|
||||
@ -80,7 +82,7 @@ export class LoginComponent implements OnInit{
|
||||
}, err => {
|
||||
if (err.message == "New password is required.") {
|
||||
this.newpassopen();
|
||||
} else {
|
||||
} else {
|
||||
|
||||
}
|
||||
this.loaderService.closeMatSpinnerDialog();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user