Fix matching
Some checks failed
FarmMaps/FarmMapsLib/pipeline/head There was a failure building this commit

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

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