requirement issues resolved
This commit is contained in:
parent
76f768808c
commit
0c7dbe1db0
@ -1,7 +1,8 @@
|
||||
<div *ngIf="data.lender_role_id != '27'">
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" style="padding: 10px !important;">
|
||||
{{pageTitle}}
|
||||
<!--{{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> -->
|
||||
@ -20,7 +21,7 @@
|
||||
<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.first_name}} {{v_officer.last_name}}
|
||||
{{v_officer.name}}
|
||||
</mat-radio-button>
|
||||
</div>
|
||||
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||
|
||||
@ -28,6 +28,7 @@ export class PdAllocationComponent implements OnInit {
|
||||
// "fk_pd_allocated_to":allocateDetails.fk_user_id,
|
||||
fk_pd_allocated_to: any; pd_agency_id: string;
|
||||
};
|
||||
userRoleType: string;
|
||||
|
||||
|
||||
|
||||
@ -103,7 +104,7 @@ export class PdAllocationComponent implements OnInit {
|
||||
|
||||
}
|
||||
getSmcVendorPdOfficerList1(){
|
||||
|
||||
|
||||
this._pd.getvendorlist(this.data.city_id).subscribe(
|
||||
list => {
|
||||
console.log('list');
|
||||
@ -118,6 +119,8 @@ export class PdAllocationComponent implements OnInit {
|
||||
}
|
||||
/** To update pd officer*/
|
||||
updatePdOfficer(allocateDetails:any) {
|
||||
console.log(allocateDetails);
|
||||
console.log('test');
|
||||
if(!allocateDetails){
|
||||
this.notifier.notify('warning', 'Please Choose PD Officer.!');
|
||||
}
|
||||
@ -133,13 +136,14 @@ export class PdAllocationComponent implements OnInit {
|
||||
"pd_agency_id":localStorage.getItem('user_role')=='28'|| localStorage.getItem('user_role')=='29'?localStorage.getItem('smc_agency_id'):localStorage.getItem('user_role')
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
this.updateData = {
|
||||
"pd_id":this.data.pd_id,
|
||||
// "fk_pd_allocated_to":allocateDetails.fk_user_id,
|
||||
"fk_pd_allocated_to":allocateDetails.userid,
|
||||
"pd_agency_id":''
|
||||
"pd_agency_id":allocateDetails.entity_id
|
||||
}
|
||||
}
|
||||
this._pd.updatePdOfficer(this.updateData).subscribe(
|
||||
|
||||
@ -23,9 +23,24 @@
|
||||
<mat-dialog-actions align="end" *ngIf="CompletenessCheck">
|
||||
<button *ngIf="enableAddonPD===true" mat-raised-button color="primary" (click)="changePDStatus(addonStatus)"><strong> Yes / Allow Addon PD</strong></button>
|
||||
<button mat-raised-button color="primary" (click)="changePDStatus(this.data.pd_status)"><strong>Yes</strong></button>
|
||||
<button mat-raised-button color="primary" (click)="Allocatetovendor()"><strong>Allocate to Vendor</strong></button>
|
||||
<button mat-raised-button mat-dialog-close><strong> No </strong></button>
|
||||
</mat-dialog-actions>
|
||||
<mat-dialog-actions align="end" *ngIf="!CompletenessCheck">
|
||||
<button mat-raised-button mat-dialog-close><strong> Ok </strong></button>
|
||||
</mat-dialog-actions>
|
||||
</mat-dialog-actions>
|
||||
|
||||
<!--<mat-card>
|
||||
<mat-tab-group>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Allocation To Credit Manager</ng-template>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<button mat-raised-button color="primary" (click)="changePDStatus(this.data.pd_status)"><strong>Yes</strong></button>
|
||||
<button *ngIf="enableAddonPD===true" mat-raised-button color="primary" (click)="changePDStatus(addonStatus)"><strong> Yes / Allow Addon PD</strong></button>
|
||||
</mat-dialog-content>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>Allocation To Vendor</ng-template>
|
||||
<mat-dialog-content class="mat-typography">aaaaaaaa</mat-dialog-content>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card>-->
|
||||
@ -3,6 +3,7 @@ import { NotifierService } from "angular-notifier";
|
||||
import {MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pd-status-change-dialogue',
|
||||
templateUrl: './pd-status-change-dialogue.component.html',
|
||||
@ -22,6 +23,8 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
public Loading: boolean;
|
||||
dialogType: any;
|
||||
usertype: string;
|
||||
vendorOfficerList: any;
|
||||
errorMessage: any;
|
||||
|
||||
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
|
||||
{
|
||||
@ -61,8 +64,28 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
// }
|
||||
// });
|
||||
}
|
||||
this.getSmcVendorPdOfficerList1();
|
||||
}
|
||||
getSmcVendorPdOfficerList1(){
|
||||
|
||||
this.pd.getvendorlist(this.data.city_id).subscribe(
|
||||
list => {
|
||||
console.log('list');
|
||||
console.log(list);
|
||||
if(list['status'] == '200') {
|
||||
this.vendorOfficerList= list['records']
|
||||
|
||||
}
|
||||
|
||||
}, error => this.errorMessage = <any> error);
|
||||
|
||||
}
|
||||
// Allocatetovendor()
|
||||
// {
|
||||
// alert('allocate');
|
||||
|
||||
// }
|
||||
|
||||
|
||||
changePDStatus(status: string): void {
|
||||
|
||||
@ -119,9 +142,6 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
}
|
||||
Allocatetovendor()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -49,8 +49,12 @@ export class QuesFormService {
|
||||
|
||||
|
||||
let pdid = JSON.parse(localStorage.getItem('pdid'))
|
||||
// alert('pdid');
|
||||
// alert(pdid);
|
||||
console.log('formgroup');
|
||||
console.log(formgroup);
|
||||
console.log(formgroup.controls);
|
||||
|
||||
//formgroup.addControl('nationality'('', [Validators.required]));
|
||||
//formgroup.addControl('new', new FormControl('', Validators.required));
|
||||
|
||||
@ -79,19 +83,45 @@ export class QuesFormService {
|
||||
if(val.group_key=='cm_queries')
|
||||
{
|
||||
|
||||
alert(pdid);
|
||||
this.pdTriggerService.getAdditionalRequirements(pdid).subscribe(res=>{
|
||||
if(res['dataStatus']){
|
||||
console.log('requirements');
|
||||
console.log(res['records']);
|
||||
|
||||
control.addControl(val.group_key, this._fb.array([]))
|
||||
let queries_docs=res['records'].pd_additional_requirements
|
||||
|
||||
// val.question.push({
|
||||
// }
|
||||
// )
|
||||
// val.group_questions[0].push({
|
||||
val.group_questions.push([
|
||||
{
|
||||
"question":"Question",
|
||||
"question_key":"question",
|
||||
"place_holder":"Enter text",
|
||||
"type":"1",
|
||||
"api_properties":null,
|
||||
"answers":null,
|
||||
"onchange_properties":null,
|
||||
"is_repeatable":null,
|
||||
"field_type":"string",
|
||||
"validations":[
|
||||
]
|
||||
},
|
||||
{
|
||||
"question":"Answer",
|
||||
"question_key":"answer",
|
||||
"place_holder":"Enter the answer here",
|
||||
"type":"7",
|
||||
"api_properties":null,
|
||||
"answers":null,
|
||||
"onchange_properties":null,
|
||||
"is_repeatable":null,
|
||||
"validations":[
|
||||
]
|
||||
}
|
||||
|
||||
// })
|
||||
])
|
||||
// this.docs_array_value=res['records'].docs_to_be_collected
|
||||
|
||||
}
|
||||
|
||||
@ -196,9 +196,9 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
console.log('details');
|
||||
console.log(details)
|
||||
console.log(details.fk_pd_id);
|
||||
|
||||
localStorage.setItem('pdid',details.fk_pd_id)
|
||||
|
||||
|
||||
// this.formsCategoryEnable = true;
|
||||
this.selectedFormsCategory = details;
|
||||
let curr_vendor_ans_fetch_status = null
|
||||
|
||||
@ -40,10 +40,10 @@
|
||||
<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>
|
||||
<span *ngIf="is_agency_logged_in ==false">
|
||||
<button *ngIf="(master.lender_short_name != 'MWISE' && currentPDStatus==pdStatusCheck.QC_COMPLETED ) || (master.lender_short_name == 'MWISE' && LenderRoleID != '25' && currentPDStatus==pdStatusCheck.COMPLETED||currentVendorStatus==pdStatusCheck.COMPLETED) && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
<button *ngIf="(master.lender_short_name != 'MWISE' && currentPDStatus=='QC COMPLETED') || (master.lender_short_name == 'MWISE' && LenderRoleID != '25' && LenderRoleID != '27' && currentPDStatus==pdStatusCheck.COMPLETED && currentVendorStatus=='QC COMPLETED') && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
</span>
|
||||
|
||||
<button *ngIf="is_agency_logged_in ==true && (master.lender_short_name != 'MWISE' && currentPDStatus=='QC COMPLETED') || (master.lender_short_name == 'MWISE' && (LenderRoleID == '27'||LenderRoleID == '26') && (currentVendorStatus=='QC COMPLETED')) && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report1" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
<button *ngIf="is_agency_logged_in ==true && (master.lender_short_name != 'MWISE' && currentPDStatus=='QC COMPLETED') || (master.lender_short_name == 'MWISE' && (LenderRoleID == '27'||LenderRoleID == '26') && (currentVendorStatus=='QC COMPLETED')) && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
|
||||
<span><button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button></span>
|
||||
</div>
|
||||
@ -219,10 +219,12 @@
|
||||
<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="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="LenderRoleID =='28' && master.lender_short_name == 'MWISE'"><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)) " 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 == '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 Vendor" matTooltipPosition="above" (click)="Allocationtovendor(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="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 && currentVendorStatus!='QC COMPLETED'&& (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="Discussion1" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
|
||||
<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)||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>
|
||||
|
||||
@ -357,7 +357,9 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
getPDStart(pdDetails: any, status: string) {
|
||||
|
||||
console.log(pdDetails);
|
||||
console.log('pddetails');
|
||||
// console.log(pdDetails.fk_pd_id);
|
||||
// console.log('pddetails');
|
||||
localStorage.setItem('pdid',pdDetails.fk_pd_id)
|
||||
this.destroyType = 3;
|
||||
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, {
|
||||
@ -583,6 +585,20 @@ else {
|
||||
})
|
||||
}
|
||||
|
||||
Allocationtovendor(state_id)
|
||||
{
|
||||
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 },
|
||||
disableClose: true,
|
||||
minWidth: '30%',
|
||||
})
|
||||
dialogRef1.afterClosed().subscribe(rr=>{
|
||||
if(rr) {
|
||||
this.viewPdDetails(this.viewID)
|
||||
}
|
||||
// this.notifier.notify("success","Allocated Successfully")
|
||||
})
|
||||
}
|
||||
/** To update pd officer*/
|
||||
selfAllocation(state_id) {
|
||||
// console.log('allocate');
|
||||
@ -604,7 +620,7 @@ else {
|
||||
else{
|
||||
|
||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||
data: { pdid:this.viewID, pd_status: "CM_ALLOCATED",random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' },
|
||||
data: { pdid:this.viewID, pd_status: "CM_ALLOCATED",random_string:this.pdMasterData[0].random_string,city_id:this.pdMasterData[0].fk_city,dialogType:'actionOnly' },
|
||||
disableClose: true,
|
||||
minWidth: '30%',
|
||||
// maxWidth: '40%',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user