diff --git a/projects/common-map/src/fm-map/components/feature-list-container/feature-list-container.component.ts b/projects/common-map/src/fm-map/components/feature-list-container/feature-list-container.component.ts index 8dbd03b..1110541 100644 --- a/projects/common-map/src/fm-map/components/feature-list-container/feature-list-container.component.ts +++ b/projects/common-map/src/fm-map/components/feature-list-container/feature-list-container.component.ts @@ -38,7 +38,7 @@ export class FeatureListContainerComponent { let criteria=0; if (this.featureLists[i]['forItemType']) { criteria++; - if( this.featureLists[i]['forItemType'].indexOf(queryState.itemType) >= 0) { + if( this.featureLists[i]['forItemType'].split(",").filter(part => part == queryState.itemType).length == 1) { matches++; } } diff --git a/projects/common-map/src/fm-map/components/feature-list-feature-container/feature-list-feature-container.component.ts b/projects/common-map/src/fm-map/components/feature-list-feature-container/feature-list-feature-container.component.ts index 56edfd5..7a29d53 100644 --- a/projects/common-map/src/fm-map/components/feature-list-feature-container/feature-list-feature-container.component.ts +++ b/projects/common-map/src/fm-map/components/feature-list-feature-container/feature-list-feature-container.component.ts @@ -32,7 +32,7 @@ export class FeatureListFeatureContainerComponent { let criteria=0; if (this.featureLists[i]['forItemType']) { criteria++; - if(this.featureLists[i]['forItemType'].indexOf(this.feature.get("itemType")) >= 0) { + if(this.featureLists[i]['forItemType'].split(",").filter(part => part == this.feature.get("itemType")).length == 1) { matches++; } } diff --git a/projects/common-map/src/fm-map/components/item-list-item-container/item-list-item-container.component.ts b/projects/common-map/src/fm-map/components/item-list-item-container/item-list-item-container.component.ts index f7ee0cb..12fe02f 100644 --- a/projects/common-map/src/fm-map/components/item-list-item-container/item-list-item-container.component.ts +++ b/projects/common-map/src/fm-map/components/item-list-item-container/item-list-item-container.component.ts @@ -33,13 +33,13 @@ export class ItemListItemContainerComponent { let criteria=0; if (this.itemComponentList[i]['forItemType']) { criteria++; - if(this.itemComponentList[i]['forItemType'].indexOf(this.item.itemType) >= 0) { + if(this.itemComponentList[i]['forItemType'].split(",").filter(part => part ==this.item.itemType).length == 1) { matches++; } } if (this.itemComponentList[i]['forSourceTask']) { criteria++; - if(this.itemComponentList[i]['forSourceTask'].indexOf(this.item.sourceTask) >= 0) { + if(this.itemComponentList[i]['forSourceTask'].split(",").filter(part => part ==this.item.sourceTask).length ==1) { matches++; } } diff --git a/projects/common-map/src/fm-map/components/selected-item-container/selected-item-container.component.ts b/projects/common-map/src/fm-map/components/selected-item-container/selected-item-container.component.ts index 37f9569..5787be2 100644 --- a/projects/common-map/src/fm-map/components/selected-item-container/selected-item-container.component.ts +++ b/projects/common-map/src/fm-map/components/selected-item-container/selected-item-container.component.ts @@ -34,13 +34,13 @@ export class SelectedItemContainerComponent { let criteria=0; if (this.selectedItemComponents[i]['forItemType'] ) { criteria++; - if(this.selectedItemComponents[i]['forItemType'].indexOf(this.item.itemType) >= 0) { + if(this.selectedItemComponents[i]['forItemType'].split(",").filter(part => part ==this.item.itemType).length == 1) { matches++; } } if (this.selectedItemComponents[i]['forSourceTask']) { criteria++; - if( this.selectedItemComponents[i]['forSourceTask'].indexOf(this.item.sourceTask) >= 0) { + if( this.selectedItemComponents[i]['forSourceTask'].split(",").filter(part => part ==this.item.sourceTask).length == 1) { matches++; } }