PD team Edit Changes : ps
This commit is contained in:
parent
a9ff6cd1ac
commit
b709dc1e21
@ -72,7 +72,7 @@ this._pdTeamService.getAllPdTeamCityMapping()
|
|||||||
/** To Display The City Data For City DropDown */
|
/** To Display The City Data For City DropDown */
|
||||||
this._masterService.getAllMasterData('CITY').subscribe(
|
this._masterService.getAllMasterData('CITY').subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if (dataresult.status == 200) {
|
if(dataresult.dataStatus == true){
|
||||||
this.citydatas = dataresult.records;
|
this.citydatas = dataresult.records;
|
||||||
this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
|
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 */
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
this._masterService.getAllMasterData('ENTITY').subscribe(
|
this._masterService.getAllMasterData('ENTITY').subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if (dataresult.status == 200) {
|
if(dataresult.dataStatus == true){
|
||||||
this.lenderdatas = dataresult.records;
|
this.lenderdatas = dataresult.records;
|
||||||
this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 );
|
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 */
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
this._masterService.getAllMasterData('PRODUCTS').subscribe(
|
this._masterService.getAllMasterData('PRODUCTS').subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if (dataresult.status == 200) {
|
if(dataresult.dataStatus == true) {
|
||||||
this.productdatas = dataresult.records;
|
this.productdatas = dataresult.records;
|
||||||
this.productdatas = this.productdatas.filter(product=>product.isactive == 1 );
|
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 */
|
/** To Display The Entities Data For Entities DropDown */
|
||||||
this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
|
this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if (dataresult.status == 200) {
|
if(dataresult.dataStatus == true) {
|
||||||
this.customerSegmentdatas = dataresult.records;
|
this.customerSegmentdatas = dataresult.records;
|
||||||
this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 );
|
this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 );
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ onSubmit() {
|
|||||||
|
|
||||||
this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
|
this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if (dataresult.status == 200) {
|
if(dataresult.dataStatus == true) {
|
||||||
//this.notifier.notify('success', 'Record Saved Successfully.!');
|
//this.notifier.notify('success', 'Record Saved Successfully.!');
|
||||||
Swal('Record Saved Successfully.!','success');
|
Swal('Record Saved Successfully.!','success');
|
||||||
this._pdTeamForm.reset();
|
this._pdTeamForm.reset();
|
||||||
@ -225,7 +225,8 @@ onChangeCityDatas($event){
|
|||||||
if($event.source._selected === true ){
|
if($event.source._selected === true ){
|
||||||
this._pdTeamService.getLenderData(lenderId).subscribe(
|
this._pdTeamService.getLenderData(lenderId).subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if(dataresult.status == 200) {
|
|
||||||
|
if(dataresult.dataStatus == true) {
|
||||||
this.CityValidation = dataresult.records;
|
this.CityValidation = dataresult.records;
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|||||||
@ -278,7 +278,7 @@ export class PdTeamEditComponent implements OnInit {
|
|||||||
if($event.source._selected === true ){
|
if($event.source._selected === true ){
|
||||||
this._pdTeamService.getLenderData(lenderId).subscribe(
|
this._pdTeamService.getLenderData(lenderId).subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if(dataresult.status == 200) {
|
if(dataresult.dataStatus == true){
|
||||||
this.CityValidation = dataresult.records;
|
this.CityValidation = dataresult.records;
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|||||||
@ -66,7 +66,6 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
var ArrayData = { "records": Records }
|
var ArrayData = { "records": Records }
|
||||||
console.log(ArrayData);
|
console.log(ArrayData);
|
||||||
//return this._http.post(this.apiUrl+'savePDTeam',ArrayData)
|
//return this._http.post(this.apiUrl+'savePDTeam',ArrayData)
|
||||||
//return this._http.post('http://localhost/sparqapi/api/savePDTeam',ArrayData)
|
|
||||||
return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
@ -113,11 +112,11 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//To delete PDTeam Mapping Details
|
//To delete PDTeam Mapping Details
|
||||||
deletePDteamCity(id:any){
|
deletePDteamCity(id:any): Observable<any> {
|
||||||
|
|
||||||
var ArrayData = { "pdteam_city_id": id};
|
var ArrayData = { "pdteam_city_id": id};
|
||||||
console.log('service data',ArrayData);
|
console.log('service data',ArrayData);
|
||||||
//return this._http.post("http://localhost/sparqapi/api/deletePdTeamMapping",ArrayData).pipe(
|
|
||||||
return this._http.post<any>(this.apiUrl+"deletePdTeamMapping", ArrayData).pipe(
|
return this._http.post<any>(this.apiUrl+"deletePdTeamMapping", ArrayData).pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
);
|
);
|
||||||
@ -139,29 +138,28 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
getLenderData(lenderId){
|
getLenderData(lenderId: any): Observable<any> {
|
||||||
|
|
||||||
var ArrayData = {"lender_id":lenderId }
|
var ArrayData = {"lender_id":lenderId }
|
||||||
|
|
||||||
//return this._http.post<any>('http://localhost/sparqapi/api/getLender',ArrayData)
|
|
||||||
return this._http.post(this.apiUrl+"getLender",ArrayData)
|
return this._http.post(this.apiUrl+"getLender",ArrayData)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getProductData(TeamId){
|
getProductData(TeamId: any): Observable<any> {
|
||||||
var ArrayData = {"team_id":TeamId }
|
var ArrayData = {"team_id":TeamId }
|
||||||
//return this._http.post<any>('http://localhost/sparqapi/api/getProduct',ArrayData)
|
|
||||||
return this._http.post(this.apiUrl+"getProduct",ArrayData)
|
return this._http.post(this.apiUrl+"getProduct",ArrayData)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getCustomerSegmentData(TeamId){
|
getCustomerSegmentData(TeamId: any): Observable<any> {
|
||||||
var ArrayData = {"team_id":TeamId }
|
var ArrayData = {"team_id":TeamId }
|
||||||
//return this._http.post<any>('http://localhost/sparqapi/api/getCustomerSegment',ArrayData)
|
|
||||||
return this._http.post(this.apiUrl+"getCustomerSegment",ArrayData)
|
return this._http.post(this.apiUrl+"getCustomerSegment",ArrayData)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
@ -202,7 +200,7 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getAllPDTeamWithPDTeamID(Primarykey): Observable<any> {
|
getAllPDTeamWithPDTeamID(Primarykey: any): Observable<any> {
|
||||||
|
|
||||||
var pk = { "primary_key":Primarykey }
|
var pk = { "primary_key":Primarykey }
|
||||||
return this._http.post<any>(this.apiUrl+'getListOfPDTeam',pk)
|
return this._http.post<any>(this.apiUrl+'getListOfPDTeam',pk)
|
||||||
@ -212,7 +210,7 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// /** Get All PD Team Child Data using API call Based on Primary Key */
|
// /** Get All PD Team Child Data using API call Based on Primary Key */
|
||||||
getAllPdTeamMapListWithPK(Primarykey): Observable<any> {
|
getAllPdTeamMapListWithPK(Primarykey: any): Observable<any> {
|
||||||
var pk = { "primary_key":Primarykey }
|
var pk = { "primary_key":Primarykey }
|
||||||
|
|
||||||
//var Primar = Primarykey
|
//var Primar = Primarykey
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user