Merge branch 'smc_credit_pd_new' of https://bitbucket.org/venbaittech/sparq-lender into smc_credit_pd_new

This commit is contained in:
VENBA-emp-10 sanjeev 2022-02-07 16:08:15 +05:30
commit 160c704129
3 changed files with 19 additions and 8 deletions

View File

@ -52,10 +52,14 @@
<div fxFlex="50" align="left"> <div fxFlex="50" align="left">
<p *ngIf="selectedItem"> <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Manager: {{selectedItem.first_name}}</p> <p *ngIf="selectedItem"> <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Manager: {{selectedItem.first_name}}</p>
</div> </div>
<div fxFlex="50" align="right"> <div *ngIf="data.lender_role_id == '28'" fxFlex="50" align="right" >
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button> --> <!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button> -->
<button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button> <button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
</div> </div>
<div *ngIf="data.lender_role_id != '28'" fxFlex="50" align="right" fxFlex="50" align="right">
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button> -->
<button mat-raised-button mat-icon-button (click)="updateagency(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate11" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-actions> </mat-dialog-actions>

View File

@ -120,6 +120,7 @@ export class PdAllocationComponent implements OnInit {
/** To update pd officer*/ /** To update pd officer*/
updatePdOfficer(allocateDetails:any) { updatePdOfficer(allocateDetails:any) {
if(!allocateDetails){ if(!allocateDetails){
this.notifier.notify('warning', 'Please Choose PD Officer.!'); this.notifier.notify('warning', 'Please Choose PD Officer.!');
} }
@ -127,7 +128,6 @@ export class PdAllocationComponent implements OnInit {
this.usertype=localStorage.getItem('usertype'); this.usertype=localStorage.getItem('usertype');
if(this.usertype=='true') if(this.usertype=='true')
{ {
this.updateData = { this.updateData = {
"pd_id":this.data.pd_id, "pd_id":this.data.pd_id,
// "fk_pd_allocated_to":allocateDetails.fk_user_id, // "fk_pd_allocated_to":allocateDetails.fk_user_id,
@ -138,6 +138,7 @@ export class PdAllocationComponent implements OnInit {
else else
{ {
alert('empty');
//this.userId = this._aws.getlocale() //this.userId = this._aws.getlocale()
this.updateData = { this.updateData = {
@ -147,7 +148,10 @@ export class PdAllocationComponent implements OnInit {
"pd_agency_id":allocateDetails.entity_id "pd_agency_id":allocateDetails.entity_id
} }
} }
console.log(this.updateData); console.log(allocateDetails);
// console.log(this.updateData);
// return;
//return //return
this._pd.updatePdOfficer(this.updateData).subscribe( this._pd.updatePdOfficer(this.updateData).subscribe(
result => { result => {
@ -168,8 +172,7 @@ export class PdAllocationComponent implements OnInit {
} }
updateagency(allocateDetails:any) updateagency(allocateDetails:any)
{ {
console.log(allocateDetails);
// return
this.updateData = { this.updateData = {
"pd_id":this.data.pd_id, "pd_id":this.data.pd_id,

View File

@ -95,7 +95,8 @@ export class PdStatusChangeDialogueComponent implements OnInit {
changePDStatus(status: string,pdid): void { changePDStatus(status: string,pdid): void {
let pd=pdid; let pd=pdid;
// console.log(status);
// //return;
this.usertype=localStorage.getItem('usertype'); this.usertype=localStorage.getItem('usertype');
console.log(this.dialogType,this.enableAddonPD) console.log(this.dialogType,this.enableAddonPD)
if(this.dialogType == 'actionOnly' && !this.enableAddonPD) { if(this.dialogType == 'actionOnly' && !this.enableAddonPD) {
@ -148,8 +149,11 @@ export class PdStatusChangeDialogueComponent implements OnInit {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}); });
} }
if(status=='INPROGRESS')
{
this.selfallocate(pd); this.selfallocate(pd);
} }
}
selfallocate(pd) selfallocate(pd)
{ {