diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index aa1652f..8b7acaf 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -159,8 +159,11 @@ {{details.city_name}}-{{details.pincode_id == 1 ? details.other_pincode : details.pincode }}
- {{details.pd_status}} + {{details.pd_status}} +
+ {{details.vendor_status}} QC COMPLETED +
{{ (details.updatedon)? (details.updatedon | slice:0:10):(details.updatedon) }} @@ -171,6 +174,7 @@
{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts index d4d4e74..b1d69b5 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.ts @@ -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 = ; if(this.startIndex && this.endIndex) { this.pagedList.next(this.PdListData.slice(this.startIndex, this.endIndex)); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html index f623676..2b029ae 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html @@ -152,6 +152,8 @@
{{details.pd_status}} +
+ {{details.vendor_status}} QC COMPLETED
{ let len_id=res['records'][0].fk_entity_id this.searchForm.controls['pd_lender'].setValue(len_id) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html index a1ef558..bf84e20 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/inprogress-pd/inprogress-pd.component.html @@ -27,7 +27,7 @@ -     +     @@ -151,6 +151,8 @@
{{details.pd_status}} +
+ {{details.vendor_status}} QC COMPLETED
{ let len_id=res['records'][0].fk_entity_id this.searchForm.controls['pd_lender'].setValue(len_id) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html index c52c941..097871e 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html @@ -7,7 +7,7 @@ close
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index 5856e83..7af6cc7 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -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'); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index 2cbdac0..31f0060 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -31,8 +31,9 @@
+ - - + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index 6a0633a..c770b85 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -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); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 2c12b3c..df34236 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -28,8 +28,14 @@ Upload Excel - + + @@ -194,18 +200,25 @@
-
+
{{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}}
+
+ {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.pd_status | titlecase}} +
+

{{master.vendor_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.vendor_status==pdStatusCheck.ADD_ON_PENDING ? 'Completed' : master.vendor_status | titlecase}}

+
- + + - -
+ + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index a58eb55..c6e2be4 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -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; diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index 5d890b7..c1e0d7c 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -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 { - + 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(this.apiUrl + "listLessPDDetails/get", paramHttp1) .pipe( @@ -309,7 +310,20 @@ export class PdTrigerService { ) } updateVendorStatus(editData: any, status: string): Observable { - 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(this.apiUrl + "updateVendorStatus", { records: editData })