Fairoj : SMC credit PD allocation, rejection flow AND user restriction for allocated PD ONLY etc.

This commit is contained in:
venbatechnologies@gmail.com 2020-12-26 13:23:27 +05:30
parent 6b849e9de3
commit 76ded73f30
13 changed files with 150 additions and 48 deletions

View File

@ -551,7 +551,12 @@ export class AwsService {
getlocale(){
let session:any = this.shared.getAccessToken() || "";
if(session && session != "") {
return session.idToken.payload.locale;
}
else{
return session
}
}
adminchangeData(userData,changeusers){

View File

@ -1,4 +1,4 @@
<mat-card-content>
<mat-card-content style="padding: 0;">
<mat-expansion-panel [(expanded)]="xpandStatus">
<mat-expansion-panel-header>
<mat-panel-title class="text-xs-left">
@ -74,7 +74,7 @@
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
<br/>
<div class="example-container">
<div fxLayout="row wrap" *ngFor="let details of pagedList | async" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" class="webhide">
<div fxLayout="row wrap" *ngFor="let details of pagedList | async" (click)="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED' ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
<!--Start Mobile View Code-->
<!-- <div (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" class="webhide"> -->
<div fxFlex.xs="20" fxFlex.sm="20" class="webhide" style="text-align: center;">
@ -84,11 +84,15 @@
</div>
<div fxFlex.xs="80" fxFlex.sm="80" class="webhide">
<div fxLayout="row wrap" style="margin-left: 6px;">
<div fxFlex.xs="100" fxFlex.sm="100" class="webhide">
<div fxFlex.xs="75" fxFlex.sm="75" class="webhide">
<span style="font-size: 100%;" *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}</b>
</span>
</div>
<div fxFlex.xs="25" fxFlex.sm="25" class="webhide" style="text-align: right;">
<span class="lettertext" *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
<span class="lettertext" *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
</div>
</div>
<div fxLayout="row wrap" style="margin-left: 6px;">
<div fxFlex.xs="50" fxFlex.sm="50" class="webhide">
@ -110,8 +114,7 @@
</span>
</div>
<div fxFlex.xs="45" fxFlex.sm="45" class="webhide" style="text-align: right;">
<span class="lettertext" *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
<span class="lettertext" *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
<p class="fontsize" style="margin:0;font-weight: bold;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</p>
</div>
</div>
</div>
@ -159,9 +162,10 @@
<span class="fontsize" *ngIf="details.pd_status=='QC_COMPLETED'" matTooltip="QC Completed" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
</span>
<span class="fontsize" *ngIf="details.pd_status=='SCHEDULED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{details.scheduled_on}}
</span>
</span><br/>
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end">
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED'">
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
matTooltip="Officer Tracking" matTooltipPosition="above">

View File

@ -53,7 +53,9 @@ export class AllPdComponent implements OnInit, OnChanges {
limitMsg: boolean = false;
common: any;
pagedList: ReplaySubject<any> = new ReplaySubject<any>(1);
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
user_id: any;
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
private _aws:AwsService) {
this.notifier = notifier;
this.searchForm = this._fb.group(
@ -84,6 +86,7 @@ export class AllPdComponent implements OnInit, OnChanges {
}
},2000)
}
this.user_id = this._aws.getlocale();
}
ngOnInit() {

View File

@ -1,4 +1,4 @@
<mat-card-content>
<mat-card-content style="padding: 0;">
<mat-expansion-panel [(expanded)]="xpandStatus">
<mat-expansion-panel-header>
@ -74,7 +74,7 @@
<br/>
<div class="example-container">
<!--Start Mobile View Code-->
<div fxLayout="row wrap" *ngFor="let details of pagedList" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" class="webhide">
<div fxLayout="row wrap" *ngFor="let details of pagedList" (click)="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED' ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
<div fxFlex.xs="20" fxFlex.sm="20" class="webhide" style="text-align: center;">
<p class="lettericon">{{details.pd_sno_split.lender_name}}<br/>
<span style="font-size: 90%">{{details.pd_sno_split.serial_no}}</span></p>
@ -82,11 +82,15 @@
</div>
<div fxFlex.xs="80" fxFlex.sm="80" class="webhide">
<div fxLayout="row wrap" style="margin-left: 6px;">
<div fxFlex.xs="100" fxFlex.sm="100" class="webhide">
<div fxFlex.xs="75" fxFlex.sm="75" class="webhide">
<span style="font-size: 100%;" *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD'}}</b>
</span>
</div>
<div fxFlex.xs="25" fxFlex.sm="25" class="webhide" style="text-align: right;">
<span class="lettertext" *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
<span class="lettertext" *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
</div>
</div>
<div fxLayout="row wrap" style="margin-left: 6px;">
<div fxFlex.xs="50" fxFlex.sm="50" class="webhide">
@ -102,7 +106,7 @@
<span class="lettertext" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}</span>
</div>
<div fxFlex.xs="45" fxFlex.sm="45" class="webhide" style="text-align: right;">
<span class="lettertext"> {{details.pd_status}}</span>
<p class="fontsize" style="margin:0;font-weight: bold;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</p>
</div>
</div>
@ -150,9 +154,10 @@
<span class="fontsize" *ngIf="details.pd_status=='QC_COMPLETED'" matTooltip="QC Completed" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
</span>
<span class="fontsize" *ngIf="details.pd_status=='SCHEDULED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{details.scheduled_on}}
</span>
</span><br/>
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end">
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED'">
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
matTooltip="Officer Tracking" matTooltipPosition="above">

View File

@ -5,6 +5,7 @@ import { FormGroup, FormBuilder } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { NotifierService } from 'angular-notifier';
import { UserService } from 'app/settings/service/user.service';
import { AwsService } from 'app/AwsService/aws.service';
@Component({
selector: 'app-completed-pd',
@ -51,7 +52,9 @@ export class CompletedPdComponent implements OnInit, OnChanges {
limitMsg: boolean = false;
common: any;
pagedList: any=[];
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
user_id: any;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
private _aws:AwsService) {
this.notifier = notifier;
this.searchForm = this._fb.group(
@ -82,6 +85,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
}
},2000)
}
this.user_id = this._aws.getlocale();
}
ngOnInit() {

View File

@ -1,4 +1,4 @@
<mat-card-content>
<mat-card-content style="padding: 0;">
<mat-expansion-panel [(expanded)]="xpandStatus">
<mat-expansion-panel-header >
<mat-panel-title class="text-xs-left">
@ -73,7 +73,7 @@
<br/>
<div class="example-container">
<!--Start Mobile View Code-->
<div fxLayout="row wrap" *ngFor="let details of pagedList" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" class="webhide">
<div fxLayout="row wrap" *ngFor="let details of pagedList" (click)="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED' ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
<div fxFlex.xs="20" fxFlex.sm="20" class="webhide" style="text-align: center;">
<p class="lettericon">{{details.pd_sno_split.lender_name}}<br/>
<span style="font-size: 90%">{{details.pd_sno_split.serial_no}}</span></p>
@ -81,11 +81,15 @@
</div>
<div fxFlex.xs="80" fxFlex.sm="80" class="webhide">
<div fxLayout="row wrap" style="margin-left: 6px;">
<div fxFlex.xs="100" fxFlex.sm="100" class="webhide">
<div fxFlex.xs="75" fxFlex.sm="75" class="webhide">
<span style="font-size: 100%;" *ngIf="details.is_child" mat-line>
<b>{{details.is_child == 0 ? details.applicant_name : 'Add On PD'}}</b>
</span>
</div>
<div fxFlex.xs="25" fxFlex.sm="25" class="webhide" style="text-align: right;">
<span class="lettertext" *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
<span class="lettertext" *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
</div>
</div>
<div fxLayout="row wrap" style="margin-left: 6px;">
<div fxFlex.xs="50" fxFlex.sm="50" class="webhide">
@ -101,7 +105,7 @@
<span class="lettertext" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}</span>
</div>
<div fxFlex.xs="45" fxFlex.sm="45" class="webhide" style="text-align: right;">
<span class="lettertext"> {{details.pd_status}}</span>
<p class="fontsize" style="margin:0;font-weight: bold;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</p>
</div>
</div>
@ -149,9 +153,10 @@
<span class="fontsize" *ngIf="details.pd_status=='QC_COMPLETED'" matTooltip="QC Completed" matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
</span>
<span class="fontsize" *ngIf="details.pd_status=='SCHEDULED'" [matTooltip]="details.pd_status | titlecase" matTooltipPosition="above">{{details.scheduled_on}}
</span>
</span><br/>
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
</div>
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end">
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED'">
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
matTooltip="Officer Tracking" matTooltipPosition="above">

View File

@ -5,6 +5,7 @@ import { FormBuilder, FormGroup } from '@angular/forms';
import { DatePipe } from '@angular/common';
import { NotifierService } from 'angular-notifier';
import { UserService } from 'app/settings/service/user.service';
import { AwsService } from 'app/AwsService/aws.service';
@Component({
selector: 'app-inprogress-pd',
@ -49,7 +50,9 @@ export class InprogressPdComponent implements OnInit, OnChanges {
limitMsg: boolean = false;
common: any;
pagedList: any=[];
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService) {
user_id: any;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
private _aws:AwsService) {
this.notifier = notifier;
this.searchForm = this._fb.group(
@ -80,6 +83,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
}
},2000)
}
this.user_id = this._aws.getlocale();
}
ngOnInit() {

View File

@ -14,30 +14,30 @@
<mat-card>
<mat-tab-group (selectedTabChange)="onTabClick($event)">
<mat-tab>
<ng-template mat-tab-label><mat-icon>select_all</mat-icon>&nbsp;All</ng-template>
<ng-template mat-tab-label><mat-icon>select_all</mat-icon>&nbsp;All</ng-template><br/>
<app-all-pd [bindFilterValue]="filterValue" (loadPdView)="viewPDDetails($event)"></app-all-pd>
</mat-tab>
<mat-tab>
<!-- <mat-tab>
<ng-template mat-tab-label><mat-icon>schedule</mat-icon>&nbsp;Scheduled </ng-template>
<app-scheduled-pd [bindFilterValue]="filterValue" (loadPdView)="viewPDDetails($event)"></app-scheduled-pd>
</mat-tab>
</mat-tab> -->
<mat-tab>
<ng-template mat-tab-label><mat-icon>hdr_strong</mat-icon> &nbsp;In Progress </ng-template>
<ng-template mat-tab-label><mat-icon>hdr_strong</mat-icon> &nbsp;In Progress </ng-template><br/>
<app-inprogress-pd [bindFilterValue]="filterValue" (loadPdView)="viewPDDetails($event)"></app-inprogress-pd>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label><mat-icon>done</mat-icon> &nbsp;Completed </ng-template>
<ng-template mat-tab-label><mat-icon>done</mat-icon> &nbsp;Completed </ng-template><br/>
<app-completed-pd [bindFilterValue]="filterValue" (loadPdView)="viewPDDetails($event)"></app-completed-pd>
</mat-tab>
<mat-tab>
<!-- <mat-tab>
<ng-template mat-tab-label><mat-icon>done_all</mat-icon>&nbsp;QC Completed </ng-template>
<app-qc-completed-pd [bindFilterValue]="filterValue" (loadPdView)="viewPDDetails($event)"></app-qc-completed-pd>
</mat-tab>
</mat-tab> -->
</mat-tab-group>
</mat-card>

View File

@ -134,7 +134,9 @@ export class ListPdComponent implements OnInit, OnDestroy {
//get tab changes
onTabClick(event: MatTabChangeEvent) {
this.getTabIndex=event.index;
this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.scheduledTabC.loadPDDetails() : this.getTabIndex==2 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==3 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
// this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.scheduledTabC.loadPDDetails() : this.getTabIndex==2 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==3 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==2 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
}

View File

@ -20,15 +20,17 @@ export class PdStatusChangeDialogueComponent implements OnInit {
CompletenessCheck: boolean;
addonStatus: string ="ADD_ON_PENDING";
public Loading: boolean;
dialogType: any;
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
{
this.notifier = notifier;
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion';
this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion';
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : this.data.pd_status=='ALLOCATED' ? 'Allocate to Self' : this.data.pd_status=='BOUNCED' ? 'PD Reject' : 'Change Discussion';
this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : this.data.pd_status=='ALLOCATED' ? 'Are you allocate this PD to yourself ?' : this.data.pd_status=='BOUNCED' ? 'Are you going to Reject the PD' : 'Change Discussion';
this.enableAddonPD = false;
this.CompletenessCheck = this.data.pd_status=='INPROGRESS' ? true : this.data.pd_status=='COMPLETED' ? false : true;
this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false;
this.dialogType = this.data.dialogType
}
ngOnInit() {
@ -60,6 +62,11 @@ export class PdStatusChangeDialogueComponent implements OnInit {
}
changePDStatus(status: string): void {
console.log(this.dialogType,this.enableAddonPD)
if(this.dialogType == 'actionOnly' && !this.enableAddonPD) {
this.dialogRef.close({update_status:true});
return;
}
let update_status = {
"pd_id":this.data.pdid,
"random_string":this.data.random_string
@ -67,7 +74,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
this.pd.editPdMasterDetails(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' ? 'Discussions Completed Successfully' : 'Discussions Updated Successfully');
this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Discussions Completed Successfully' : this.data.pd_status=='BOUNCED' ? 'PD Rejected Successfully' :'Discussions Updated Successfully');
}
else {
this.dialogRef.close({update_status:false});

View File

@ -192,23 +192,24 @@
</div>
<div fxFlex="60" 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> -->
<!-- <button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button> -->
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT" 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'"> <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 != '25'"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.BOUNCED || currentPDStatus == pdStatusCheck.TRIGGERED)" 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()"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"><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.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>
<div fxLayout="row nowrap">
<div fxFlex="100">
<div fxFlex="40" align="left" style="color: #e00201">
<div *ngIf="master.pd_allocated_to && master.fk_pd_type==1">
<div *ngIf="master.pd_allocated_to">
{{master.pd_allocated_to | titlecase}}
</div>
<div *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2">
<!-- <div *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2">
{{master.executive_name | titlecase}}
</div>
<div *ngIf="master.centralofficer && master.fk_pd_type==3">
{{master.centralofficer | titlecase}}
</div>
</div> -->
</div>
<div fxFlex="60" align="right" style="color: #e00201" *ngIf="master.scheduled_on">
{{master.scheduled_on}}
@ -232,22 +233,23 @@
{{addresses.addtional_pd_data[0].pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : addresses.addtional_pd_data[0].pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : addresses.addtional_pd_data[0].pd_status | titlecase}}
</div>
<div fxFlex="60" align="right">
<!-- <span *ngIf="userRoleID == 10 || userRoleID == 3"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span> -->
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"> <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 != '25'"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.BOUNCED || currentPDStatus == pdStatusCheck.TRIGGERED)" 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()"><mat-icon>verified_user</mat-icon></button></span>
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.schedule && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span> -->
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT" 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'"><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.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 fxLayout="row nowrap">
<div fxFlex="40" align="left" style="color: #e00201">
<div *ngIf="addresses.addtional_pd_data[0].pd_allocated_to && addresses.addtional_pd_data[0].fk_pd_type==1">
<div *ngIf="addresses.addtional_pd_data[0].pd_allocated_to ">
{{addresses.addtional_pd_data[0].pd_allocated_to | titlecase}}
</div>
<div *ngIf="addresses.addtional_pd_data[0].executive_name && addresses.addtional_pd_data[0].centralofficer && addresses.addtional_pd_data[0].fk_pd_type==2">
<!-- <div *ngIf="addresses.addtional_pd_data[0].executive_name && addresses.addtional_pd_data[0].centralofficer && addresses.addtional_pd_data[0].fk_pd_type==2">
{{addresses.addtional_pd_data[0].executive_name | titlecase}}
</div>
<div *ngIf="addresses.addtional_pd_data[0].centralofficer && addresses.addtional_pd_data[0].fk_pd_type==3">
{{addresses.addtional_pd_data[0].centralofficer | titlecase}}
</div>
</div> -->
</div>
<div fxFlex="60" align="right" style="color: #e00201" *ngIf="addresses.addtional_pd_data[0].scheduled_on">
{{addresses.addtional_pd_data[0].scheduled_on}}

View File

@ -19,6 +19,7 @@ import { InitiateAdditionalPdComponent } from './../initiate-additional-pd/initi
/**sweet alert */
import Swal from 'sweetalert2';
import { VideoPlayerComponent } from 'app/video-player/video-player.component';
import { AwsService } from 'app/AwsService/aws.service';
@Component({
selector: 'app-view-pd',
@ -84,6 +85,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
"COMPLETED": 'COMPLETED',
"ADD_ON_PENDING": 'ADD_ON_PENDING',
"QC_COMPLETED": 'QC_COMPLETED',
"BOUNCED" : 'BOUNCED'
};
mandatoryFieldsValidations: any = [];
@ -123,7 +125,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
};
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) {
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent,
private _aws:AwsService) {
this.notifier = notifier;
this.enableStartPD = false;
this.roleAccessDetails=this._pd.getRoleAccessDetails();
@ -500,6 +503,63 @@ else {
})
}
/** To update pd officer*/
selfAllocation() {
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
data: { pdid:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' },
disableClose: true,
minWidth: '30%',
// maxWidth: '40%',
});
dialogRef.afterClosed()
.subscribe(dataresult => {
if (dataresult.update_status == true) {
// return;
let user_id = this._aws.getlocale();
if(!user_id) {
this.notifier.notify('error',"Something went wrong. Try again!!");
return;
}
let updateData = {
"pd_id":this.viewID,
"fk_pd_allocated_to":user_id,
}
this._pd.updatePdOfficer(updateData).subscribe(
result => {
if (result.status == 200) {
this.notifier.notify('success', 'PD Allocated Successfully.!');
this.viewPdDetails(this.viewID)
}
else {
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
this.errorMessage = "Something Went Wrong Try Again.!";
}
}, error => {
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
this.errorMessage = "Some Thing Wents Wrong Try Again.!";
// this.dialogRef.close();
});
}
});
}
rejectPD() {
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
data: { pdid: this.viewID, pd_status: this.pdStatusCheck.BOUNCED,random_string:this.pdMasterData[0].random_string },
disableClose: true,
minWidth: '30%',
// maxWidth: '40%',
});
dialogRef.afterClosed()
.subscribe(dataresult => {
if (dataresult.update_status == true) {
this.viewPdDetails(this.viewID)
// this.router.navigate(['../../../startpd',pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
}
});
}
// updateViewComponent(editBack:string) {

View File

@ -196,6 +196,7 @@
@media(max-width:991px) {
.body-container {
padding: 1rem;
margin-bottom: 0;
}
html {
font-size: 14px;
@ -335,7 +336,7 @@
text-align: center;
box-sizing: content-box!important;
-ms-flex-direction: column!important;
flex-direction: column!important, ;
flex-direction: column!important ;
height: 42px;
}
.navigation>.mat-list-item>.mat-list-item-content>a>span:not(.menu-badge):not(.menu-caret) {
@ -356,7 +357,7 @@
visibility: visible;
}
.mat-list-item>.mat-list-item-content>a>.menu-caret,
.mat-list-item>.mat-list-item-content>a>[fxflex],
.mat-list-item>.mat-list-item-content>a>[fxflex]
{
display: none;
}