diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html index 94659c65d..136c52c61 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html @@ -63,7 +63,7 @@
--> -
+
-
+
+
- - +
- + Sl @@ -140,9 +140,9 @@ - +
- + diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html index 3e3666663..00a5fbb45 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html @@ -67,25 +67,26 @@
--> -
+
-
+
+
- + Sl @@ -136,9 +137,8 @@ - +
- \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html index f92d574fc..ff86fe450 100644 --- a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html @@ -67,18 +67,19 @@

--> -
+
-
+
+
@@ -87,7 +88,7 @@ - + Sl @@ -135,11 +136,9 @@ - +
- - diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html index daf5161f5..2fae291cd 100644 --- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html @@ -76,18 +76,19 @@

--> -
+
-
+
+
@@ -96,7 +97,7 @@ - + Sl @@ -142,9 +143,9 @@ - +
- + diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html index c97c287c6..13476f697 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html @@ -7,7 +7,7 @@ -
+
-
+
+
- + Sl @@ -72,12 +73,12 @@ - +
- + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html index 26e1142b1..20748da3f 100644 --- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html @@ -62,18 +62,19 @@
--> -
+
-
+
+
@@ -81,7 +82,7 @@
- + Sl @@ -132,10 +133,10 @@ - +
- + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html index 99937af69..cb51c0c42 100644 --- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html @@ -80,18 +80,19 @@

--> -
+
-
+
+
@@ -100,7 +101,7 @@ - + Sl @@ -150,9 +151,9 @@ - +
- + diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html index b942c7527..dde60b4af 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html @@ -63,25 +63,26 @@

--> -
+
-
+
+
- + Sl @@ -129,9 +130,9 @@ - +
- + diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html index 2207eeb89..86299fe02 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html @@ -61,18 +61,19 @@
-
+
-
+
+
@@ -81,7 +82,7 @@
- + Sl @@ -129,9 +130,9 @@ - +
- + diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html index adf9da364..0ae762158 100644 --- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html @@ -8,7 +8,7 @@

--> -
+
-
+
-
+
- + Sl @@ -82,9 +82,9 @@ - +
- + -
+
-
+
+
- + Sl @@ -73,7 +74,7 @@ - +
diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html index ac665e0a7..cd7239a84 100644 --- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html @@ -1,92 +1,19 @@ - - - - - - - -
- + +
-
+
-
-
- - -
+
+ +
+ +
- +
- - + Sl @@ -97,13 +24,10 @@ Region Name {{row.name}} - Is Active - Actions - + - - - -
- - - + +
\ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html index 7e67fd576..ffcc12601 100644 --- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html @@ -82,18 +82,19 @@

--> -
+
-
+
+
@@ -103,7 +104,7 @@ - + Sl @@ -152,10 +153,10 @@ - +
- + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html index 8645bbeee..c252f5ba4 100644 --- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html @@ -102,18 +102,19 @@

--> -
+
-
+
+
@@ -122,7 +123,7 @@ - + Sl @@ -175,10 +176,10 @@ - +
- + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html index c359ea303..e8a483667 100644 --- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html @@ -1,9 +1,9 @@ -
+ -
-
+
-
+
-
+
-
+
@@ -112,7 +112,7 @@ - + Sl @@ -165,10 +165,10 @@ - +
- + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html index af8fbf74c..b40fde58c 100644 --- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html @@ -79,18 +79,19 @@
-->
-
+
-
+
+
@@ -100,7 +101,7 @@ - + Sl @@ -148,10 +149,10 @@ - +
- + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html index 351c2e113..ac386e22a 100644 --- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html @@ -75,18 +75,19 @@
--> -
+
-
+
+
@@ -94,7 +95,7 @@ - + Sl @@ -142,10 +143,10 @@ - +
- + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html index 7d3a80b2c..be23374a8 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html @@ -28,14 +28,18 @@
- {{ cd.name }} + {{ cd.name }} You must Select Cities. - + +
The Selected Cities are.,
+
    +
  • {{data}}
  • +
+
+ +
@@ -43,10 +47,16 @@
- {{ pd.name }} + {{ pd.name }} You must Select Product. + +
The Selected Products are.,
+
    +
  • {{data}}
  • +
+
Customers Segment


@@ -54,10 +64,16 @@ - {{csd.name}} + {{csd.name}} You must Select Customer Segment. + +
The Selected Customer segment are.,
+
    +
  • {{data}}
  • +
+
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 c2f3c43fc..74b53b844 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 @@ -4,8 +4,8 @@ import { FormBuilder, Validators, FormControl } from '@angular/forms'; import { MatDialog, - MatDialogRef, - MAT_DIALOG_DATA } from '@angular/material'; + MatDialogRef, + MAT_DIALOG_DATA } from '@angular/material'; /** Service */ import { MastersService } from '../../service/masters/masters.service'; import { PdTeamService } from '../../service/masters/pd-team.service'; @@ -22,18 +22,24 @@ export class PdTeamAddComponent implements OnInit { public _pdTeamForm: FormGroup; public submitted = false; +color = 'primary'; +errorMessage:string; +//This Type Of Array Declaration for select dropdown to list the datas citydatas: any[]; lenderdatas: any[]; productdatas: any[]; customerSegmentdatas: any[]; +//This Type Of Array Declaration pdTeamCityArray: Array<{teamid: number, cityid: number}> = []; pdTeamProductArray: Array<{teamid: number, productid: number}> = []; pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = []; -color = 'primary'; -errorMessage:string; +//This Type Of Array Declaration for Local Purpose and List the data in html page +selectedCityDatas : any=[]; +selectedProductDatas : any=[]; +selectedSegmentDatas : any=[]; constructor(private _formBuilder: FormBuilder, private _notifier: NotifierService, @@ -111,37 +117,87 @@ onNoClick(): void { /** To Save/Edited Popup Data */ onSubmit() { this.submitted = true; - alert("onsubmit function"); - console.log(this._pdTeamForm.value); - - var pdTeamFormValues = this._pdTeamForm.value; - - Object.keys(pdTeamFormValues).forEach( - (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); - - this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( - dataresult=>{ - - if(dataresult.dataStatus == true){ - alert('Saved'); - } - else{ - alert('Not Saved'); - } - - }); + // stop here if form is invalid + if (this._pdTeamForm.invalid) { + // this.errorMessage = "Please Fill All Mandate Fields."; + // return; + alert('Please Fill All Mandate Fields.'); + } else { + var pdTeamFormValues = this._pdTeamForm.value; + + //To Remove The "Null" With Key also + Object.keys(pdTeamFormValues).forEach( + (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); + + this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( + dataresult => { + if (dataresult.status == 200) { + console.log(dataresult); + this._notifier.notify('success', 'Record Edited Successfully.!'); +// alert('Record Successfully.!'); + this._router.navigate(['/setting/pdteam/pdteamlist']); + this._pdTeamForm.reset(); + } + else { + this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + //alert('Some Thing Wents Wrong Try Again !'); + //this.errorMessage = "Some Thing Wents Wrong Try Again !"; + } + }, error => { + this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + // this.errorMessage = "Something Wents Wrong Try Again !"; + //alert('Some Thing Wents Wrong Try Again !'); + }); + } } + /** To Reset Popup Data For Add*/ onResetForAdd(){ alert("reset function"); } -toggleAllSelection($event){ - console.log($event); - let srcarray = $event['source'] - console.log(srcarray._mostRecentViewValue); + +/**on change function for customer segment to dispaly the as List in html page */ +onChangeCustomerSegmentDatas($event){ + let CustomerSegmentName = $event.source.value.name; + if($event.source._selected === true ){ + this.selectedSegmentDatas.push(CustomerSegmentName); + } + else if($event.source._selected === false ){ + let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName); + this.selectedSegmentDatas.splice(index,1); + } } + +/**on change function for City to display the as List in html page */ +onChangeCityDatas($event){ + + let cityName = $event.source.value.name; + if($event.source._selected === true ){ + this.selectedCityDatas.push(cityName); + } + else if($event.source._selected === false ){ + let index = this.selectedCityDatas.indexOf(cityName); + this.selectedCityDatas.splice(index,1); + } + } -/** End Of Pd Dialog Component */ \ No newline at end of file + +/**on change function for Product to display the data as List in html page */ +onChangeProductDatas($event){ + + let productName = $event.source.value.name; + if($event.source._selected === true ){ + this.selectedProductDatas.push(productName); + } + else if($event.source._selected === false ){ + let index = this.selectedProductDatas.indexOf(productName); + this.selectedProductDatas.splice(index,1); + } + +} + +} +/** End Of PD TEAM ADD Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html index 5c2225a56..be23374a8 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html @@ -1,3 +1,86 @@ -

- pd-team-edit works! -

+
+
+ +
+

PD TEAM

+
+
+ +
+
+ +
Team Details


+
+ + + You must Include Team Name. + + + + + {{ ld.short_name }} {{ ld.full_name }} + + You must Select Lender Name. + +
+ +
Cities Coverd


+
+ + + {{ cd.name }} + + You must Select Cities. + + +
The Selected Cities are.,
+
    +
  • {{data}}
  • +
+
+ + + +
+ +
Products


+
+ + + {{ pd.name }} + + You must Select Product. + + +
The Selected Products are.,
+
    +
  • {{data}}
  • +
+
+
+ +
Customers Segment


+
+ + + + {{csd.name}} + + You must Select Customer Segment. + + +
The Selected Customer segment are.,
+
    +
  • {{data}}
  • +
+
+
+ +
+ + +
+
+
+
+ \ No newline at end of file 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 5dae7698b..2bb0fa976 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 @@ -1,15 +1,207 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, Inject } from '@angular/core'; + +import { FormBuilder, + FormGroup, + Validators, + FormControl } from '@angular/forms'; +import { MatDialog, + MatDialogRef, + MAT_DIALOG_DATA } from '@angular/material'; + +/** Service */ +import { MastersService } from '../../service/masters/masters.service'; +import { PdTeamService } from '../../service/masters/pd-team.service'; +import { NotifierService } from 'angular-notifier'; +import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component'; +import { Router } from '@angular/router'; + @Component({ selector: 'app-pd-team-edit', templateUrl: './pd-team-edit.component.html', styleUrls: ['./pd-team-edit.component.scss'] }) export class PdTeamEditComponent implements OnInit { - - constructor() { } - + + public _pdTeamForm: FormGroup; + public submitted = false; + color = 'primary'; + errorMessage:string; + + //This Type Of Array Declaration for select dropdown to list the datas + citydatas: any[]; + lenderdatas: any[]; + productdatas: any[]; + customerSegmentdatas: any[]; + + //This Type Of Array Declaration + pdTeamCityArray: Array<{teamid: number, cityid: number}> = []; + pdTeamProductArray: Array<{teamid: number, productid: number}> = []; + pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = []; + + //This Type Of Array Declaration for Local Purpose and List the data in html page + selectedCityDatas : any=[]; + selectedProductDatas : any=[]; + selectedSegmentDatas : any=[]; + + constructor(private _formBuilder: FormBuilder, + private _notifier: NotifierService, + private _pdTeamService: PdTeamService, + private _router: Router, + private _masterService: MastersService) + { + this._notifier = _notifier; + } + + ngOnInit() { + this.PdTeamFormDatas(); + + /** To Display The City Data For City DropDown */ + this._masterService.getAllMasterData('CITY').subscribe( + dataresult => { + if (dataresult.status == 200) { + this.citydatas = dataresult.records; + this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); + } + + }, error => this.errorMessage = error); + + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('ENTITY').subscribe( + dataresult => { + if (dataresult.status == 200) { + this.lenderdatas = dataresult.records; + this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); + } + }, error => this.errorMessage = error); + + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('PRODUCTS').subscribe( + dataresult => { + if (dataresult.status == 200) { + this.productdatas = dataresult.records; + this.productdatas = this.productdatas.filter(product=>product.isactive == 1 ); + } + }, error => this.errorMessage = error); + + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe( + dataresult => { + if (dataresult.status == 200) { + this.customerSegmentdatas = dataresult.records; + this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 ); + } + }, error => this.errorMessage = error); } - -} + + /** Pd Team Form Datas */ + PdTeamFormDatas(){ + this._pdTeamForm = this._formBuilder.group({ + pdteam_id: [null, Validators.compose([Validators.required])], + team_name: [null, Validators.compose([Validators.required])], + fk_lender: [null, Validators.compose([Validators.required])], + fk_city: [null, Validators.compose([Validators.required])], + fk_customer_segment: [null, Validators.compose([Validators.required])], + fk_product:[null, Validators.compose([Validators.required])], + + }); + + } + + /** convenience getter for easy access to form fields */ + get f() { return this._pdTeamForm.controls; } + + /** For Popup Close Button */ + onNoClick(): void { + this._router.navigate(['/setting/pdteam/pdteamlist']); + } + + /** To Save/Edited Popup Data */ + /** To Save/Edited Popup Data */ + onSubmit() { + this.submitted = true; + // stop here if form is invalid + if (this._pdTeamForm.invalid) { + // this.errorMessage = "Please Fill All Mandate Fields."; + // return; + alert('Please Fill All Mandate Fields.'); + } else { + + var pdTeamFormValues = this._pdTeamForm.value; + + //To Remove The "Null" With Key also + Object.keys(pdTeamFormValues).forEach( + (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); + + this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( + dataresult => { + if (dataresult.status == 200) { + console.log(dataresult); + // this._notifier.notify('success', 'Record Saved Successfully.!'); + alert('Record Saved Successfully.!'); + this._router.navigate(['/setting/pdteam/pdteamlist']); + this._pdTeamForm.reset(); + } + else { + //this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + alert('Some Thing Wents Wrong Try Again !'); + //this.errorMessage = "Some Thing Wents Wrong Try Again !"; + } + }, error => { + // this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + // this.errorMessage = "Something Wents Wrong Try Again !"; + alert('Some Thing Wents Wrong Try Again !'); + }); + } + } + + + /** To Reset Popup Data For Add*/ + + onResetForAdd(){ + alert("reset function"); + } + + /**on change function for customer segment to dispaly the as List in html page */ + onChangeCustomerSegmentDatas($event){ + let CustomerSegmentName = $event.source.value.name; + if($event.source._selected === true ){ + this.selectedSegmentDatas.push(CustomerSegmentName); + } + else if($event.source._selected === false ){ + let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName); + this.selectedSegmentDatas.splice(index,1); + } + } + + /**on change function for City to display the as List in html page */ + onChangeCityDatas($event){ + + let cityName = $event.source.value.name; + if($event.source._selected === true ){ + this.selectedCityDatas.push(cityName); + } + else if($event.source._selected === false ){ + let index = this.selectedCityDatas.indexOf(cityName); + this.selectedCityDatas.splice(index,1); + } + + } + + /**on change function for Product to display the data as List in html page */ + onChangeProductDatas($event){ + + let productName = $event.source.value.name; + if($event.source._selected === true ){ + this.selectedProductDatas.push(productName); + } + else if($event.source._selected === false ){ + let index = this.selectedProductDatas.indexOf(productName); + this.selectedProductDatas.splice(index,1); + } + + } + + } + /** End Of PD TEAM ADD Component */ \ No newline at end of file