diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts index af7ee82..4f9f071 100755 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts @@ -87,6 +87,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy { this.status=false; } localStorage.setItem('userid',this.currentUser.userid); + console.log('admin-layout @90 -agency id',this.currentUser.smc_agency_id); localStorage.setItem('smc_agency_id',this.currentUser.smc_agency_id); window.localStorage.setItem('LenderRoleID', this.currentUser.user_role); // FOR TELLING entity id updated to localstorage for list pd component diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts index 8446ed9..33753a0 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts @@ -70,8 +70,7 @@ export class ListPdComponent implements OnInit, OnDestroy { this.allTab=true; this.userService.getroles().subscribe(res=>{ let role_name = this.userService.takeDecisionRouting(res['records'][0]) - console.log('userrole'); - console.log(res); + console.log('userrole @73',res,res['records'][0].smc_agency_id); localStorage.setItem('smc_agency_id',res['records'][0].smc_agency_id); localStorage.setItem('len_user_role',role_name); this.user_role_name=role_name diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html index 9bce0ff..ebeefcb 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html @@ -1,4 +1,4 @@ -
+

@@ -50,13 +50,13 @@
- +

-
+

Allocation @@ -163,4 +163,119 @@
+ +
+

+
+ Allocation +
+
+ +
+

+ + + + + Allocation To Credit Manager + + + + +
+
+
+ + {{officer.first_name}} {{officer.last_name}} + +
+
+
+
+
+ + +

No Regional Credit Managers available.

+
+
+
+ + +
+

Regional Credit Manager: {{selectedItem.first_name}}

+
+
+ +
+
+
+ + Allocation To Agency + + + + + +
+
+
+ + {{v_officer.full_name}} + +
+
+
+
+
+ + +

No Agency List available.

+
+
+
+ + +
+

Regional Vendor Manager: {{selectedItem.full_name}}

+
+
+ +
+
+
+ + Allocation To Vendor Officer + + + +
+
+
+ + {{v_officer.name}} + +
+ +
+
+
+
+ + +

No Vendor Officer available.

+
+
+
+ + +
+ +
+
+
+
+
+ + +
\ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts index 3ac1e18..eac57a3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts @@ -30,6 +30,8 @@ export class PdAllocationComponent implements OnInit { fk_pd_allocated_to: any; pd_agency_id: string; }; userRoleType: string; + vendoragencyList: any; + localagency: string; @@ -47,15 +49,18 @@ export class PdAllocationComponent implements OnInit { ngOnInit() { this.usertype=localStorage.getItem('usertype'); + this.localagency = localStorage.getItem('smc_agency_id'); this.isDisabled=true; if(this.data.lender_role_id=='28') { this.getSmcVendorPdOfficerList(); } - // else if(this.data.lender_role_id=='30' && this.data.lender_admin_flag == 0){ - // this.getSmcVendorPdOfficerList(); - // } + else if(this.data.lender_role_id=='30'){ + this.getSmcVendorPdOfficerList(); + this.getPDOfficerList(this.data.pd_id); + this.getSmcVendorPdOfficerList1(); + } else { this.getPDOfficerList(this.data.pd_id); @@ -113,8 +118,11 @@ export class PdAllocationComponent implements OnInit { console.log('list'); console.log(list); if(list['status'] == '200') { - this.vendorOfficerList= list['records'] - + if(localStorage.getItem('user_role')=='30'){ + this.vendoragencyList= list['records']; + }else{ + this.vendorOfficerList= list['records']; + } } }, error => this.errorMessage = error); @@ -135,7 +143,7 @@ export class PdAllocationComponent implements OnInit { "pd_id":this.data.pd_id, // "fk_pd_allocated_to":allocateDetails.fk_user_id, "fk_pd_allocated_to":allocateDetails.userid, - "pd_agency_id":localStorage.getItem('user_role')=='28'|| localStorage.getItem('user_role')=='29'?localStorage.getItem('smc_agency_id'):localStorage.getItem('user_role') + "pd_agency_id":localStorage.getItem('user_role')=='28'|| localStorage.getItem('user_role')=='29' || localStorage.getItem('user_role')=='30'?this.localagency:null } } @@ -176,12 +184,12 @@ export class PdAllocationComponent implements OnInit { updateagency(allocateDetails:any) { - + alert('updateagency'+allocateDetails.entity_id); this.updateData = { "pd_id":this.data.pd_id, // "fk_pd_allocated_to":allocateDetails.fk_user_id, "fk_pd_allocated_to":allocateDetails.fk_state_id, - "pd_agency_id":allocateDetails.entity_id + "pd_agency_id":allocateDetails.entity_id ? allocateDetails.entity_id :this.localagency } console.log(this.updateData); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/image-capture/image-capture.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/image-capture/image-capture.component.ts index 3a2789b..77631e8 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/image-capture/image-capture.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/image-capture/image-capture.component.ts @@ -135,7 +135,8 @@ export class ImageCaptureComponent implements OnInit { if(this.current_index != 'last') { if(this.imageData[this.current_index].is_multiple == 1) { console.log("multi"); - let img_param={img_url:watermarked_img,is_base64:true,link:geoCoordinates} + + let img_param={img_url:watermarked_img,is_base64:true,link:this.userRoleID != 30 ? null : geoCoordinates} console.log('param'); console.log(img_param); 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 44057d0..6fbd88a 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 @@ -132,6 +132,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { userRoleType: string; is_agency_logged_in: boolean; currentVendorStatus: any; + pdAgencyid: any; constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder, private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent, @@ -196,6 +197,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { 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; + this.pdAgencyid=data.records.pd_master_details[0].pd_agency_id; // enable pd start time if (data.records.pd_master_details[0].scheduled_on_for_validation) { let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm'); @@ -614,9 +616,9 @@ dialogRef1.afterClosed().subscribe(rr=>{ // return let flag : any = null;//admin role means introduce the flag. if((this.LenderRoleID == '27') || (this.LenderRoleID == '25') || (this.LenderRoleID == '28') || (this.LenderRoleID == '30')){ - flag = this.LenderRoleID=='30'&&localStorage.getItem('smc_agency_id')?0:1;//agency id and admin role means 1 else 0 means introduce the flag. + if(this.LenderRoleID=='30' && this.pdAgencyid != "0"){localStorage.setItem('smc_agency_id',this.pdAgencyid);} 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,lender_admin_flag:flag }, + 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%', })