new reqquirement done
This commit is contained in:
parent
aaa0852b8d
commit
1724eb379e
@ -159,8 +159,11 @@
|
||||
<i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}-{{details.pincode_id == 1 ? details.other_pincode : details.pincode }} </span>
|
||||
</div>
|
||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="center no-pad cell" style="justify-content:flex-end">
|
||||
<span *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
|
||||
<span *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}} </span>
|
||||
<br>
|
||||
<span *ngIf="is_agency_logged_in == true" style="color:blue;font-size: small;">{{details.vendor_status}}</span>
|
||||
<span *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
|
||||
|
||||
<br>
|
||||
<span class="fontsize cell" *ngIf="details.pd_status!='SCHEDULED' && details.pd_status!='QC_COMPLETED'" [matTooltip]="details.pd_status | titlecase"
|
||||
matTooltipPosition="above">{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }}
|
||||
@ -171,6 +174,7 @@
|
||||
</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>
|
||||
|
||||
<!-- *ngIf="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED' || LenderRoleID == '27' || LenderRoleID == '25' -->
|
||||
<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.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id">
|
||||
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
|
||||
|
||||
@ -60,6 +60,7 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
filtered_raw_data: any[];
|
||||
userRoleType: string;
|
||||
usertype: string;
|
||||
is_agency_logged_in: boolean;
|
||||
|
||||
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
||||
private _aws:AwsService,private loaderService:LoaderService) {
|
||||
@ -99,7 +100,17 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.userRoleType=localStorage.getItem('user_role');
|
||||
|
||||
if(this.userRoleType=='28' || this.userRoleType=='29')
|
||||
{
|
||||
this.is_agency_logged_in=true;
|
||||
//allocate (yes 28)
|
||||
}
|
||||
else
|
||||
{
|
||||
this.is_agency_logged_in=false;
|
||||
}
|
||||
|
||||
this.userService.getroles().subscribe(res=>{
|
||||
let len_id=res['records'][0].fk_entity_id
|
||||
@ -178,6 +189,8 @@ console.log(this.displayedColumns)
|
||||
this.loaderService.closeMatSpinnerDialog();
|
||||
if (data.status == 200) {
|
||||
this.PdListData = data.records;
|
||||
console.log('pddata');
|
||||
console.log(this.PdListData);
|
||||
// this.PdListData = <GetOrInitializeYourListHere>;
|
||||
if(this.startIndex && this.endIndex) {
|
||||
this.pagedList.next(this.PdListData.slice(this.startIndex, this.endIndex));
|
||||
|
||||
@ -152,6 +152,8 @@
|
||||
</div>
|
||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="center no-pad cell" style="justify-content:flex-end">
|
||||
<span *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
|
||||
<br>
|
||||
<span *ngIf="is_agency_logged_in == true" style="color:blue;font-size: small;">{{details.vendor_status}}</span>
|
||||
<span *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
|
||||
<br>
|
||||
<span class="fontsize cell" *ngIf="details.pd_status!='SCHEDULED' && details.pd_status!='QC_COMPLETED'" [matTooltip]="details.pd_status | titlecase"
|
||||
|
||||
@ -59,6 +59,8 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
startIndex: any;
|
||||
endIndex: any;
|
||||
filtered_raw_data: any[];
|
||||
userRoleType: string;
|
||||
is_agency_logged_in: boolean;
|
||||
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
||||
private _aws:AwsService, private loaderService:LoaderService) {
|
||||
this.notifier = notifier;
|
||||
@ -96,6 +98,17 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.userRoleType=localStorage.getItem('user_role');
|
||||
|
||||
if(this.userRoleType=='28' || this.userRoleType=='29')
|
||||
{
|
||||
this.is_agency_logged_in=true;
|
||||
//allocate (yes 28)
|
||||
}
|
||||
else
|
||||
{
|
||||
this.is_agency_logged_in=false;
|
||||
}
|
||||
this.userService.getroles().subscribe(res=>{
|
||||
let len_id=res['records'][0].fk_entity_id
|
||||
this.searchForm.controls['pd_lender'].setValue(len_id)
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<input matInput [matDatepicker]="picker" [max]="todaydate" (blur)="checkDate($event)" formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%" class="matfieldblock">
|
||||
<input matInput [matDatepicker]="picker1" [max]="todaydate" [min]="searchForm.get('pd_from_date').value" formControlName="pd_to_date" placeholder="Choose a todate">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
@ -151,6 +151,8 @@
|
||||
</div>
|
||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="center no-pad cell" style="justify-content:flex-end">
|
||||
<span *ngIf="details.pd_status!='QC_COMPLETED'"> {{details.pd_status}}</span>
|
||||
<br>
|
||||
<span *ngIf="is_agency_logged_in == true" style="color:blue;font-size: small;">{{details.vendor_status}}</span>
|
||||
<span *ngIf="details.pd_status=='QC_COMPLETED'"> QC COMPLETED</span>
|
||||
<br>
|
||||
<span class="fontsize cell" *ngIf="details.pd_status!='SCHEDULED' && details.pd_status!='QC_COMPLETED'" [matTooltip]="details.pd_status | titlecase"
|
||||
|
||||
@ -56,6 +56,8 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
startIndex: any;
|
||||
endIndex: any;
|
||||
filtered_raw_data:any = [];
|
||||
userRoleType: string;
|
||||
is_agency_logged_in: boolean;
|
||||
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
||||
private _aws:AwsService, private loaderService:LoaderService) {
|
||||
this.notifier = notifier;
|
||||
@ -93,6 +95,18 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.userRoleType=localStorage.getItem('user_role');
|
||||
|
||||
if(this.userRoleType=='28' || this.userRoleType=='29')
|
||||
{
|
||||
this.is_agency_logged_in=true;
|
||||
//allocate (yes 28)
|
||||
}
|
||||
else
|
||||
{
|
||||
this.is_agency_logged_in=false;
|
||||
}
|
||||
this.userService.getroles().subscribe(res=>{
|
||||
let len_id=res['records'][0].fk_entity_id
|
||||
this.searchForm.controls['pd_lender'].setValue(len_id)
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<span matSuffix class="close_btn_filter" *ngIf="filterValue" (click)="filterValue = ''"><mat-icon>close</mat-icon></span>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="50" class="pb-0 text-sm-right" *ngIf="user_role_name != 'sales' && LenderRoleID != '26' && LenderRoleID != '27'">
|
||||
<div fxFlex="50" class="pb-0 text-sm-right" *ngIf="user_role_name != 'sales' && LenderRoleID != '26' && LenderRoleID != '27' && LenderRoleID != '28' && LenderRoleID != '29'">
|
||||
<!-- <button mat-fab (click)="viewMapPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Map view" matTooltipPosition="above"><mat-icon>map</mat-icon></button> -->
|
||||
<button mat-fab (click)="addPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Add PD" matTooltipPosition="above" *ngIf="roleAccessDetails.trigger"><mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
|
||||
@ -35,6 +35,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
if(this.data.pd_status=='COMPLETED'){
|
||||
let params: any={};
|
||||
params.pd_id = this.data.pdid;
|
||||
@ -63,6 +64,7 @@ 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) {
|
||||
@ -70,13 +72,16 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.usertype=='true')
|
||||
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 => {
|
||||
console.log('result');
|
||||
console.log(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');
|
||||
|
||||
@ -31,8 +31,9 @@
|
||||
</mat-card>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
<mat-card-actions align="end">
|
||||
<button matTooltip="Complete Discussion" matTooltipPosition="above" [disabled]="actualQuestions==0 || actualQuestions!=answeredQuestions || currentPDStatus===false" mat-raised-button color="primary" (click)="pdStatusDialogue(pdStatusCheck.COMPLETED,2);"><span>{{currentPDStatus === true ? 'COMPLETE':'COMPLETED' }}</span></button>
|
||||
</mat-card-actions>
|
||||
<button matTooltip="Complete Discussion" matTooltipPosition="above" [disabled]="actualQuestions==0 || actualQuestions!=answeredQuestions || currentPDStatus===false" mat-raised-button color="primary" (click)="pdStatusDialogue(pdStatusCheck.COMPLETED,2);"><span>{{currentPDStatus === true ? 'COMPLETE':'COMPLETED' }}</span></button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
@ -45,6 +45,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
answeredQuestions: number;
|
||||
private notifier: NotifierService;
|
||||
vendor_status_arr: any = [];
|
||||
userRoleType: string;
|
||||
|
||||
constructor(notifier: NotifierService, private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -112,7 +113,17 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
// this.categoryList=data.records.question_answers;
|
||||
let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1);
|
||||
this.mainApplicantName = filterApplicantName.length > 0 ? filterApplicantName[0].applicant_name : '';
|
||||
this.currentPDStatus = data.records.pdmaster_details[0].pd_status=='INPROGRESS' ? true : data.records.pdmaster_details[0].pd_status=='SCHEDULED' ? true :data.records.pdmaster_details[0].pd_status=='ALLOCATED' ? true : false;
|
||||
this.userRoleType=localStorage.getItem('user_role');
|
||||
|
||||
if(this.userRoleType=='28' || this.userRoleType=='29')
|
||||
{
|
||||
this.currentPDStatus = data.records.pdmaster_details[0].vendor_status=='INPROGRESS' ? true : data.records.pdmaster_details[0].vendor_status=='SCHEDULED' ? true :data.records.pdmaster_details[0].vendor_status=='ALLOCATED' ? true : false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.currentPDStatus = data.records.pdmaster_details[0].pd_status=='INPROGRESS' ? true : data.records.pdmaster_details[0].pd_status=='SCHEDULED' ? true :data.records.pdmaster_details[0].pd_status=='ALLOCATED' ? true : false;
|
||||
}
|
||||
|
||||
// this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]).filter(item=>item.isAnswerable===true);
|
||||
this.categoryFormButtons = data.records.template_details
|
||||
// this.categoryFormButtons = this.categoryFormButtons.filter(item=>item.isAnswerable===true);
|
||||
|
||||
@ -28,8 +28,14 @@
|
||||
<strong>Upload Excel</strong>
|
||||
</button>
|
||||
</span>
|
||||
<button mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
|
||||
<button *ngIf="is_agency_logged_in == true && currentVendorStatus=='COMPLETED'" mat-raised-button class="mr-1 mb-1" color="primary" (click)="StatusUpdate(master);">
|
||||
<strong>QC Complete</strong>
|
||||
</button>
|
||||
<button *ngIf="is_agency_logged_in == false" mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
|
||||
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
|
||||
</button>
|
||||
<button *ngIf="is_agency_logged_in == true" mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
|
||||
<strong> {{master.vendor_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.vendor_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.vendor_status | titlecase}}</strong>
|
||||
</button>
|
||||
<button *ngIf="roleAccessDetails.trigger && (LenderRoleID == '25' && (currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED)) || (currentPDStatus==pdStatusCheck.DRAFT)" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button>
|
||||
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
|
||||
@ -194,18 +200,25 @@
|
||||
|
||||
<div fxLayout="row nowrap">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="40" align="left" style="color: #e00201">
|
||||
<div *ngIf="is_agency_logged_in == false" fxFlex="40" align="left" style="color: #e00201">
|
||||
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}
|
||||
</div>
|
||||
<div *ngIf="is_agency_logged_in == true" fxFlex="40" align="left" style="color: #e00201">
|
||||
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}
|
||||
<br>
|
||||
<p style="color:blue;font-size: small;">{{master.vendor_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.vendor_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.vendor_status | titlecase}}</p>
|
||||
</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> -->
|
||||
<!-- {{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 ||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="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 && 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="is_agency_logged_in == true && master.lender_short_name == 'MWISE' && LenderRoleID == '28' && (currentVendorStatus == pdStatusCheck.ALLOCATED ||currentVendorStatus == pdStatusCheck.INPROGRESS)"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentVendorStatus == 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)) " 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' || 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>
|
||||
</div>
|
||||
<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 && (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 != '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].vendor_status!=pdStatusCheck.DRAFT && currentVendorStatus!=pdStatusCheck.BOUNCED && (LenderRoleID == '27' || LenderRoleID == '28'||currentVendorStatus!=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].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
|
||||
@ -85,7 +85,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
"COMPLETED": 'COMPLETED',
|
||||
"ADD_ON_PENDING": 'ADD_ON_PENDING',
|
||||
"QC_COMPLETED": 'QC_COMPLETED',
|
||||
"BOUNCED" : 'BOUNCED'
|
||||
"BOUNCED" : 'BOUNCED',
|
||||
"ALLOCATED_TO_FIA":'ALLOCATED_TO_FIA'
|
||||
};
|
||||
|
||||
mandatoryFieldsValidations: any = [];
|
||||
@ -125,6 +126,9 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
};
|
||||
userId: any;
|
||||
product: any;
|
||||
userRoleType: string;
|
||||
is_agency_logged_in: boolean;
|
||||
currentVendorStatus: any;
|
||||
|
||||
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
|
||||
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent,
|
||||
@ -133,11 +137,22 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
this.enableStartPD = false;
|
||||
this.roleAccessDetails=this._pd.getRoleAccessDetails();
|
||||
console.log(this.roleAccessDetails);
|
||||
console.log('tamil');
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.userRoleType=localStorage.getItem('user_role');
|
||||
|
||||
if(this.userRoleType=='28' || this.userRoleType=='29')
|
||||
{
|
||||
this.is_agency_logged_in=true;
|
||||
//allocate (yes 28)
|
||||
}
|
||||
else
|
||||
{
|
||||
this.is_agency_logged_in=false;
|
||||
}
|
||||
|
||||
this.userId = this._aws.getlocale()
|
||||
console.log(this.userId);
|
||||
console.log(this.userRoleID);
|
||||
@ -174,6 +189,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
this.pdMasterData[0].addresses = data.records.pd_address.filter(item => item.isactive == 1);
|
||||
|
||||
this.currentPDStatus = data.records.pd_master_details[0].pd_status;
|
||||
this.currentVendorStatus=data.records.pd_master_details[0].vendor_status;
|
||||
this.pdAdditionalReqData = data.records.pd_additional_requirements;
|
||||
this.pdCollectedDocument=data.records.docs_to_be_collected;
|
||||
// enable pd start time
|
||||
@ -340,7 +356,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
console.log(pdDetails);
|
||||
console.log('pddetails');
|
||||
this.destroyType = 3;
|
||||
if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED || status == this.pdStatusCheck.TRIGGERED) {
|
||||
if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED || status == this.pdStatusCheck.TRIGGERED||status == this.pdStatusCheck.ALLOCATED_TO_FIA) {
|
||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||
data: { pdid: pdDetails.assigned_pd, pd_status: this.pdStatusCheck.INPROGRESS,random_string:this.pdMasterData[0].random_string },
|
||||
disableClose: true,
|
||||
@ -355,9 +371,31 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
this.router.navigate(['../../../startpd', pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
|
||||
}
|
||||
}
|
||||
StatusUpdate(master)
|
||||
{
|
||||
|
||||
let status='QC COMPLETE';
|
||||
|
||||
let update_status = {
|
||||
"pd_id":master.pd_id,
|
||||
"random_string":master.random_string
|
||||
};
|
||||
console.log(master);
|
||||
this._pd.updateVendorStatus(update_status, status).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
this.notifier.notify('success', 'QC Completed Successfully.!');
|
||||
this.viewPdDetails(this.viewID)
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||
this.errorMessage = "Something Went Wrong Try Again.!";
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
getPDIDReport(pdID: any) {
|
||||
this.destroyType = 3;
|
||||
|
||||
@ -40,6 +40,7 @@ export class PdTrigerService {
|
||||
entity_id: string;
|
||||
pdagencyid: string;
|
||||
userRoleType: string;
|
||||
is_agency_logged_in: boolean;
|
||||
|
||||
constructor(private _http: HttpClient,
|
||||
private _aws: AwsService) {
|
||||
@ -237,7 +238,7 @@ export class PdTrigerService {
|
||||
|
||||
// get status based pd list
|
||||
getTabStatusPdDetails(status: string,lenderId): Observable<any> {
|
||||
|
||||
|
||||
this.usertype=localStorage.getItem('usertype');
|
||||
if(this.usertype=='true')
|
||||
{
|
||||
@ -248,7 +249,7 @@ export class PdTrigerService {
|
||||
let userid1=this._aws.getlocale()
|
||||
let userid = localStorage.getItem('userid');
|
||||
let paramHttp1:any= this.entity_id && status ?
|
||||
{params : new HttpParams().set('lenderid', this.entity_id).set('status',status).set('pdagencyid',this.pdagencyid).set('pdofficerid',userid)} : {};
|
||||
{params : new HttpParams().set('lenderid', this.entity_id).set('status',status).set('pdagencyid',this.pdagencyid).set('pdofficerid',userid).set('is_smc_vendor',this.usertype)} : {};
|
||||
paramHttp1.params = paramHttp1.params.set('createdby',userid1)
|
||||
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", paramHttp1)
|
||||
.pipe(
|
||||
@ -309,7 +310,20 @@ export class PdTrigerService {
|
||||
)
|
||||
}
|
||||
updateVendorStatus(editData: any, status: string): Observable<any> {
|
||||
editData.pd_status = status;
|
||||
this.userRoleType=localStorage.getItem('user_role');
|
||||
|
||||
if(this.userRoleType=='28' || this.userRoleType=='29')
|
||||
{
|
||||
this.is_agency_logged_in=true;
|
||||
//allocate (yes 28)
|
||||
}
|
||||
else
|
||||
{
|
||||
this.is_agency_logged_in=false;
|
||||
}
|
||||
|
||||
editData.vendor_status = status;
|
||||
editData.is_smc_vendor=this.is_agency_logged_in;
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updateVendorStatus", { records: editData })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user