PD officer pd restriction is implemented in filter api

This commit is contained in:
venbatechnologies@gmail.com 2020-05-27 18:21:41 +05:30
parent 1c81c2a59e
commit d7da29993f

View File

@ -217,6 +217,13 @@ export class PdTrigerService {
{ params: new HttpParams().set('status', status) } : {};
}
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", tabStatus)
// .map(res=>{
// if(res['dataStatus']) {
// let pd_det = res['records'].map(val=>{ return {applicant_name:val.applicant_name,pd_id:val.pd_id,random_string:val.random_string,pd_sno:val.pd_sno,pd_type:val.fk_pd_type}})
// localStorage.setItem('pd_short_info',JSON.stringify(pd_det));
// return res
// }
// })
.pipe(
catchError(this.handleError('operation', []))
)
@ -705,8 +712,21 @@ export class PdTrigerService {
*/
overAllSearchFormDetails(searchItem) {
let userrole = localStorage.getItem('user_role')
if(userrole == '5') {
let userid = this._aws.getlocale()
searchItem.pd_officer_id = userid
}
let records = { 'records': searchItem };
return this._http.post(this.apiUrl + 'filterPDList', records).pipe(
return this._http.post(this.apiUrl + 'filterPDList', records)
.map(res=>{
if(res['dataStatus']) {
let pd_det = res['records'].map(val=>{ return {applicant_name:val.applicant_name,pd_id:val.pd_id,random_string:val.random_string,pd_sno:val.pd_sno,pd_type:val.fk_pd_type}})
localStorage.setItem('pd_short_info',JSON.stringify(pd_det));
return res
}
})
.pipe(
catchError(this.handleError('operation', []))
);
}