Fix matching
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2021-11-26 11:57:24 +01:00
parent 90c3fa25a4
commit e28564c88a
4 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,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++;
}
}

View File

@ -33,7 +33,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++;
}
}

View File

@ -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++;
}
}

View File

@ -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++;
}
}