Lender Admin changes : ps
This commit is contained in:
parent
0781cb9bd5
commit
33b70ce766
@ -1,199 +1,166 @@
|
||||
<div *ngIf="data.lender_role_id != '27'">
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" style="padding: 10px !important;">
|
||||
<!--{{pageTitle}}-->
|
||||
Allocate to Vendor
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<!-- <button *ngIf="data.fk_pd_type == 2" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate Vendor" matTooltipPosition="above" (click)="viewVendorOfficer()"><mat-icon>verified_user</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>
|
||||
|
||||
</div>
|
||||
|
||||
</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||
|
||||
<mat-list role="list" *ngIf="vendorOfficerList.length > 0">
|
||||
|
||||
<mat-list-item role="listitem" *ngFor="let v_officer of vendorOfficerList; let i = index">
|
||||
<div fxFlex="100">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<mat-radio-button color="primary" [value]="v_officer" (change)="selectedItem = $event.value">
|
||||
{{v_officer.name}}
|
||||
</mat-radio-button>
|
||||
</div>
|
||||
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<span>{{officer.mobile_no}}</span>
|
||||
</div>
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
|
||||
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-list-item>
|
||||
|
||||
</mat-list>
|
||||
<mat-list *ngIf="vendorOfficerList.length == 0">
|
||||
<mat-list-item>
|
||||
<p>No <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Managers available.</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
|
||||
<!-- </form> -->
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions >
|
||||
<div fxFlex="50" align="left">
|
||||
<p *ngIf="selectedItem"> <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Manager: {{selectedItem.first_name}}</p>
|
||||
</div>
|
||||
<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 (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
|
||||
</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>
|
||||
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
</div>
|
||||
<div *ngIf="data.lender_role_id == '27'">
|
||||
<div *ngIf="data.lender_role_id != '27' || (data.lender_role_id != '30' && this.data.lender_admin_flag == 0)">
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" style="padding: 10px !important;">
|
||||
Allocation
|
||||
</div>
|
||||
<div fxFlex="40" align="end" style="padding: 10px !important;">
|
||||
|
||||
<div fxFlex="70" style="padding: 10px !important;">
|
||||
<!--{{pageTitle}}-->
|
||||
Allocate to Vendor
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<!-- <button *ngIf="data.fk_pd_type == 2" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate Vendor" matTooltipPosition="above" (click)="viewVendorOfficer()"><mat-icon>verified_user</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>
|
||||
|
||||
</div>
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<mat-card>
|
||||
<mat-tab-group>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Allocation To Credit Manager</ng-template>
|
||||
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||
|
||||
<mat-list role="list" *ngIf="pdOfficerList.length > 0">
|
||||
|
||||
<mat-list-item role="listitem" *ngFor="let officer of pdOfficerList; let i = index">
|
||||
<div fxFlex="100">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<mat-radio-button color="primary" [value]="officer" (change)="selectedItem = $event.value">
|
||||
{{officer.first_name}} {{officer.last_name}}
|
||||
</mat-radio-button>
|
||||
</div>
|
||||
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<span>{{officer.mobile_no}}</span>
|
||||
</div>
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
|
||||
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-list-item>
|
||||
|
||||
</mat-list>
|
||||
<mat-list *ngIf="pdOfficerList.length == 0">
|
||||
<mat-list-item>
|
||||
<p>No <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Managers available.</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
|
||||
<!-- </form> -->
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions >
|
||||
<div fxFlex="50" align="left">
|
||||
<p *ngIf="selectedItem"> <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Manager: {{selectedItem.first_name}}</p>
|
||||
</div>
|
||||
<div 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)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
|
||||
</mat-dialog-actions>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Vendor Allocate</ng-template>
|
||||
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||
|
||||
<mat-list role="list" *ngIf="vendorOfficerList.length > 0">
|
||||
|
||||
<mat-list-item role="listitem" *ngFor="let v_officer of vendorOfficerList; let i = index">
|
||||
<div fxFlex="100">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<mat-radio-button color="primary" [value]="v_officer" (change)="selectedItem = $event.value">
|
||||
{{v_officer.full_name}}
|
||||
</mat-radio-button>
|
||||
</div>
|
||||
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<span>{{officer.mobile_no}}</span>
|
||||
</div>
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
|
||||
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-list-item>
|
||||
|
||||
</mat-list>
|
||||
<mat-list *ngIf="vendorOfficerList.length == 0">
|
||||
<mat-list-item>
|
||||
<p>No <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Managers available.</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
|
||||
<!-- </form> -->
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions >
|
||||
<div fxFlex="50" align="left">
|
||||
<p *ngIf="selectedItem"> <span *ngIf="data.lender_role_id == '25'">Regional </span>Vendor Manager: {{selectedItem.full_name}}</p>
|
||||
</div>
|
||||
<div 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="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
|
||||
</mat-dialog-actions>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-card>
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||
<mat-list role="list" *ngIf="vendorOfficerList.length > 0">
|
||||
<mat-list-item role="listitem" *ngFor="let v_officer of vendorOfficerList; let i = index">
|
||||
<div fxFlex="100">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<mat-radio-button color="primary" [value]="v_officer" (change)="selectedItem = $event.value">
|
||||
{{v_officer.name}}
|
||||
</mat-radio-button>
|
||||
</div>
|
||||
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<span>{{officer.mobile_no}}</span>
|
||||
</div>
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
|
||||
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
<mat-list *ngIf="vendorOfficerList.length == 0">
|
||||
<mat-list-item>
|
||||
<p>No <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Managers available.</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
<!-- </form> -->
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="50" align="left">
|
||||
<p *ngIf="selectedItem"><span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Manager: {{selectedItem.first_name}}</p>
|
||||
</div>
|
||||
<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 (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
|
||||
</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>
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
</div><!-- div @1 closed here -->
|
||||
<div *ngIf="data.lender_role_id == '27' || (this.data.lender_role_id == '30' && data.lender_admin_flag == 1)">
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" style="padding: 10px !important;">
|
||||
Allocation
|
||||
</div>
|
||||
<div fxFlex="40" align="end" style="padding: 10px !important;">
|
||||
<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>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
<mat-card>
|
||||
<mat-tab-group>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Allocation To Credit Manager</ng-template>
|
||||
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||
|
||||
<mat-list role="list" *ngIf="pdOfficerList.length > 0">
|
||||
<mat-list-item role="listitem" *ngFor="let officer of pdOfficerList; let i = index">
|
||||
<div fxFlex="100">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<mat-radio-button color="primary" [value]="officer" (change)="selectedItem = $event.value">
|
||||
{{officer.first_name}} {{officer.last_name}}
|
||||
</mat-radio-button>
|
||||
</div>
|
||||
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<span>{{officer.mobile_no}}</span>
|
||||
</div>
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
|
||||
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
<mat-list *ngIf="pdOfficerList.length == 0">
|
||||
<mat-list-item>
|
||||
<p>No <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Managers available.</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
<!-- </form> -->
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="50" align="left">
|
||||
<p *ngIf="selectedItem"><span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Manager: {{selectedItem.first_name}}</p>
|
||||
</div>
|
||||
<div 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)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Vendor Allocate</ng-template>
|
||||
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||
|
||||
<mat-list role="list" *ngIf="vendorOfficerList.length > 0">
|
||||
<mat-list-item role="listitem" *ngFor="let v_officer of vendorOfficerList; let i = index">
|
||||
<div fxFlex="100">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<mat-radio-button color="primary" [value]="v_officer" (change)="selectedItem = $event.value">
|
||||
{{v_officer.full_name}}
|
||||
</mat-radio-button>
|
||||
</div>
|
||||
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
<span>{{officer.mobile_no}}</span>
|
||||
</div>
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
|
||||
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
<mat-list *ngIf="vendorOfficerList.length == 0">
|
||||
<mat-list-item>
|
||||
<p>No <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Managers available.</p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
<!-- </form> -->
|
||||
</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="50" align="left">
|
||||
<p *ngIf="selectedItem"><span *ngIf="data.lender_role_id == '25'">Regional </span>Vendor Manager: {{selectedItem.full_name}}</p>
|
||||
</div>
|
||||
<div 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="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card>
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
</div><!-- div @60 closed here -->
|
||||
|
||||
@ -38,7 +38,7 @@ export class PdAllocationComponent implements OnInit {
|
||||
private dialogRef: MatDialogRef<PdAllocationComponent>,
|
||||
private _pd: PdTrigerService, private dialog: MatDialog,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any,private _aws:AwsService) {
|
||||
console.log(data)
|
||||
console.log(data)
|
||||
this.notifier=notifier;
|
||||
if(this.data.lender_role_id == '25') {
|
||||
this.pageTitle = "Allocation To Regional Credit Manager"
|
||||
@ -48,11 +48,14 @@ export class PdAllocationComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.usertype=localStorage.getItem('usertype');
|
||||
this.isDisabled=true;
|
||||
|
||||
|
||||
if(this.data.lender_role_id=='28')
|
||||
{
|
||||
this.getSmcVendorPdOfficerList();
|
||||
}
|
||||
// else if(this.data.lender_role_id=='30' && this.data.lender_admin_flag == 0){
|
||||
// this.getSmcVendorPdOfficerList();
|
||||
// }
|
||||
else
|
||||
{
|
||||
this.getPDOfficerList(this.data.pd_id);
|
||||
@ -71,10 +74,10 @@ export class PdAllocationComponent implements OnInit {
|
||||
getPDOfficerList(pdID:string){
|
||||
|
||||
let user_type
|
||||
if(this.data.lender_role_id == '25' || this.data.lender_role_id == '30') {
|
||||
if(this.data.lender_role_id == '25' ) {
|
||||
user_type = "RCM"
|
||||
}
|
||||
else if(this.data.lender_role_id == '27') {
|
||||
else if(this.data.lender_role_id == '27' || this.data.lender_role_id == '30') {
|
||||
user_type = "CM"
|
||||
}
|
||||
this._pd.getCMUsers(this.data.state_id,user_type).subscribe(
|
||||
|
||||
@ -230,16 +230,37 @@
|
||||
<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>
|
||||
</div>
|
||||
<ng-template #prompt>
|
||||
<span *ngIf="master.lender_short_name == 'MWISE'">
|
||||
<span><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && addresses.addtional_pd_data[0].pd_status == pdStatusCheck.ALLOCATED || currentPDStatus!=pdStatusCheck.CANCELLED && ((currentVendorStatus !=pdStatusCheck.COMPLETED || 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="currentVendorStatus != 'QC COMPLETED'">
|
||||
<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><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.CANCELLED || currentPDStatus == pdStatusCheck.ALLOCATED) " 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><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.TRIGGERED || currentPDStatus == pdStatusCheck.ALLOCATED)" 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><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><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.BOUNCED && currentPDStatus!=pdStatusCheck.CANCELLED && (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><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status && currentVendorStatus!=pdStatusCheck.QC_COMPLETED && currentPDStatus!=pdStatusCheck.CANCELLED" 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>
|
||||
<ng-template #prompt><!-- Lender ADMIN Section C.S. - {{currentPDStatus}} C.V.S - {{currentVendorStatus}} -->
|
||||
<span *ngIf="master.lender_short_name == 'MWISE' && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name">
|
||||
<!--1 .Reject - Allocate,Inprogress Status only both normal and vendor -->
|
||||
<span *ngIf="roleAccessDetails.allocate">
|
||||
<button *ngIf="(currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.INPROGRESS) || (currentVendorStatus==pdStatusCheck.ALLOCATED || currentVendorStatus==pdStatusCheck.INPROGRESS) " 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>
|
||||
|
||||
<!--2 . Allocate User - Draft,Trigger,Schedule,Allocated status only both normal and vendor-->
|
||||
<span *ngIf="roleAccessDetails.allocate">
|
||||
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.CANCELLED ||
|
||||
(currentPDStatus == pdStatusCheck.ALLOCATED_TO_FIA && (currentVendorStatus==pdStatusCheck.ALLOCATED||currentVendorStatus==pdStatusCheck.SCHEDULED || currentVendorStatus==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>
|
||||
|
||||
<!--3 . Allocate Self - no need for Admin Role both normal and vendor
|
||||
<span><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.CANCELLED || currentPDStatus == pdStatusCheck.ALLOCATED) " 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> -->
|
||||
|
||||
<!--4 . Allocate Vendor - Draft,Trigger,Schedule,Allocated status only - both mail and venor-->
|
||||
<!-- <span><button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.CANCELLED || (currentPDStatus == pdStatusCheck.ALLOCATED_TO_FIA && (currentVendorStatus==pdStatusCheck.ALLOCATED||currentVendorStatus==pdStatusCheck.SCHEDULED))" 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> -->
|
||||
|
||||
<!--5 . Send Back To CPA - for all status -->
|
||||
<span><button 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>
|
||||
|
||||
<!--6 . Discussion - Inprogress,Completed,QC-Completed status only - admin role normal -->
|
||||
<span *ngIf="roleAccessDetails.discussions && addresses.addtional_pd_data[0].pd_status">
|
||||
<button *ngIf="currentPDStatus==pdStatusCheck.INPROGRESS || currentPDStatus==pdStatusCheck.COMPLETED || currentPDStatus==pdStatusCheck.QC_COMPLETED" 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>
|
||||
|
||||
<!--7 . Vendor Discussion - Allocated,Inprogress,Completed,QC-Completed status only - admin role vendor-->
|
||||
<span *ngIf="roleAccessDetails.discussions && addresses.addtional_pd_data[0].pd_status && addresses.addtional_pd_data[0].vendor_status">
|
||||
<button *ngIf="currentVendorStatus==pdStatusCheck.INPROGRESS || currentVendorStatus==pdStatusCheck.COMPLETED || currentVendorStatus==pdStatusCheck.QC_COMPLETED" 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>
|
||||
|
||||
<!--8 . Cancellation - Cancellation not need remaining all status -both normal and vendor -->
|
||||
<span><button *ngIf="(currentPDStatus!==pdStatusCheck.CANCELLED) || (currentPDStatus === pdStatusCheck.ALLOCATED_TO_FIA && (currentVendorStatus!==pdStatusCheck.CANCELLED))" 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>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
@ -609,12 +609,14 @@ dialogRef1.afterClosed().subscribe(rr=>{
|
||||
}
|
||||
/** To update pd officer*/
|
||||
selfAllocation(state_id) {
|
||||
// console.log('selfAllocation city = ',this.pdMasterData[0].fk_city);
|
||||
|
||||
// console.log(this.pdMasterData[0]);
|
||||
// return
|
||||
let flag : any = null;//admin role means introduce the flag.
|
||||
if((this.LenderRoleID == '27') || (this.LenderRoleID == '25') || (this.LenderRoleID == '28') || (this.LenderRoleID == '30')){
|
||||
flag = this.LenderRoleID=='30'&&localStorage.getItem('smc_agency_id')?0:1;//agency id and admin role means 1 else 0 means introduce the flag.
|
||||
const dialogRef1 = this.dialog.open(PdAllocationComponent, {
|
||||
data: { pd_id:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,city_id:this.pdMasterData[0].fk_city,dialogType:'actionOnly',state_id:state_id, lender_role_id:this.LenderRoleID },
|
||||
data: { pd_id:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,city_id:this.pdMasterData[0].fk_city,dialogType:'actionOnly',state_id:state_id, lender_role_id:this.LenderRoleID,lender_admin_flag:flag },
|
||||
disableClose: true,
|
||||
minWidth: '30%',
|
||||
})
|
||||
|
||||
@ -35,6 +35,7 @@ export class PdTrigerService {
|
||||
MAP_API_URL: string;
|
||||
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
// private apiUrl2 = environment.devApiEndpoint;
|
||||
usertype: string;
|
||||
LenderRoleID: string;
|
||||
entity_id: string;
|
||||
@ -1035,7 +1036,7 @@ loadTemplate(form_id) {
|
||||
getSMCVendorPDOfficersList(roleid)
|
||||
{
|
||||
//let agencyid=localStorage.getItem('user_role')=='28'|| localStorage.getItem('user_role')=='29'?localStorage.getItem('smc_agency_id'):localStorage.getItem('user_role')
|
||||
let agencyid=this.pdagencyid = localStorage.getItem('smc_agency_id');
|
||||
let agencyid = +localStorage.getItem('smc_agency_id');
|
||||
return this._http.get(this.apiUrl+'getSMCVendorPDOfficersList?agency_id='+agencyid)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
|
||||
@ -8,7 +8,7 @@ export const environment = {
|
||||
|
||||
environmentName: 'Development Environment',//Localhost Environment.
|
||||
|
||||
// apiEndpoint: 'https://apitest.pdgenie.com/sparqtest/api/',
|
||||
devApiEndpoint: 'http://localhost/AWSEC2/sparqapi/api/',
|
||||
apiEndpoint: ' https://apitest.pdgenie.com/sparqtest/api/',
|
||||
|
||||
authorization: 'sparqvenba2018',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user