diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts index 26aa63f23..76a1d4d64 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts @@ -72,7 +72,7 @@ this._pdTeamService.getAllPdTeamCityMapping() /** To Display The City Data For City DropDown */ this._masterService.getAllMasterData('CITY').subscribe( dataresult => { - if (dataresult.status == 200) { + if(dataresult.dataStatus == true){ this.citydatas = dataresult.records; this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); } @@ -82,7 +82,7 @@ this._masterService.getAllMasterData('CITY').subscribe( /** To Display The Entities Data For Entities DropDown */ this._masterService.getAllMasterData('ENTITY').subscribe( dataresult => { - if (dataresult.status == 200) { + if(dataresult.dataStatus == true){ this.lenderdatas = dataresult.records; this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); } @@ -91,7 +91,7 @@ this._masterService.getAllMasterData('ENTITY').subscribe( /** To Display The Entities Data For Entities DropDown */ this._masterService.getAllMasterData('PRODUCTS').subscribe( dataresult => { - if (dataresult.status == 200) { + if(dataresult.dataStatus == true) { this.productdatas = dataresult.records; this.productdatas = this.productdatas.filter(product=>product.isactive == 1 ); } @@ -100,7 +100,7 @@ this._masterService.getAllMasterData('PRODUCTS').subscribe( /** To Display The Entities Data For Entities DropDown */ this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe( dataresult => { - if (dataresult.status == 200) { + if(dataresult.dataStatus == true) { this.customerSegmentdatas = dataresult.records; this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 ); } @@ -145,7 +145,7 @@ onSubmit() { this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( dataresult => { - if (dataresult.status == 200) { + if(dataresult.dataStatus == true) { //this.notifier.notify('success', 'Record Saved Successfully.!'); Swal('Record Saved Successfully.!','success'); this._pdTeamForm.reset(); @@ -225,7 +225,8 @@ onChangeCityDatas($event){ if($event.source._selected === true ){ this._pdTeamService.getLenderData(lenderId).subscribe( dataresult => { - if(dataresult.status == 200) { + + if(dataresult.dataStatus == true) { this.CityValidation = dataresult.records; } }, error => this.errorMessage = error); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts index 674a53ad7..acc7c9ded 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts @@ -278,7 +278,7 @@ export class PdTeamEditComponent implements OnInit { if($event.source._selected === true ){ this._pdTeamService.getLenderData(lenderId).subscribe( dataresult => { - if(dataresult.status == 200) { + if(dataresult.dataStatus == true){ this.CityValidation = dataresult.records; } }, error => this.errorMessage = error); diff --git a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts index b3af5acc1..729311d41 100644 --- a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts +++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts @@ -66,7 +66,6 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) var ArrayData = { "records": Records } console.log(ArrayData); //return this._http.post(this.apiUrl+'savePDTeam',ArrayData) - //return this._http.post('http://localhost/sparqapi/api/savePDTeam',ArrayData) return this._http.post(this.apiUrl+"savePDTeam", ArrayData) .pipe( catchError(this.handleError('role', [])) @@ -113,11 +112,11 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) // } //To delete PDTeam Mapping Details - deletePDteamCity(id:any){ + deletePDteamCity(id:any): Observable { var ArrayData = { "pdteam_city_id": id}; console.log('service data',ArrayData); - //return this._http.post("http://localhost/sparqapi/api/deletePdTeamMapping",ArrayData).pipe( + return this._http.post(this.apiUrl+"deletePdTeamMapping", ArrayData).pipe( catchError(this.handleError('role', [])) ); @@ -139,29 +138,28 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) // } - getLenderData(lenderId){ + getLenderData(lenderId: any): Observable { var ArrayData = {"lender_id":lenderId } - //return this._http.post('http://localhost/sparqapi/api/getLender',ArrayData) return this._http.post(this.apiUrl+"getLender",ArrayData) .pipe( catchError(this.handleError('role', [])) ) } - getProductData(TeamId){ + getProductData(TeamId: any): Observable { var ArrayData = {"team_id":TeamId } - //return this._http.post('http://localhost/sparqapi/api/getProduct',ArrayData) + return this._http.post(this.apiUrl+"getProduct",ArrayData) .pipe( catchError(this.handleError('role', [])) ) } - getCustomerSegmentData(TeamId){ + getCustomerSegmentData(TeamId: any): Observable { var ArrayData = {"team_id":TeamId } - //return this._http.post('http://localhost/sparqapi/api/getCustomerSegment',ArrayData) + return this._http.post(this.apiUrl+"getCustomerSegment",ArrayData) .pipe( catchError(this.handleError('role', [])) @@ -202,7 +200,7 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) ) } - getAllPDTeamWithPDTeamID(Primarykey): Observable { + getAllPDTeamWithPDTeamID(Primarykey: any): Observable { var pk = { "primary_key":Primarykey } return this._http.post(this.apiUrl+'getListOfPDTeam',pk) @@ -212,7 +210,7 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) } // /** Get All PD Team Child Data using API call Based on Primary Key */ - getAllPdTeamMapListWithPK(Primarykey): Observable { + getAllPdTeamMapListWithPK(Primarykey: any): Observable { var pk = { "primary_key":Primarykey } //var Primar = Primarykey