|
|
|
@ -37,6 +37,21 @@ module.exports = function() {
|
|
|
|
|
else if (self.state.filterType === 'contains') {
|
|
|
|
|
return model.get(self.state.filterKey).toLowerCase().indexOf(self.state.filterValue.toLowerCase()) > -1;
|
|
|
|
|
}
|
|
|
|
|
else if (self.state.filterType === 'lt') {
|
|
|
|
|
return model.get(self.state.filterKey) < self.state.filterValue;
|
|
|
|
|
}
|
|
|
|
|
else if (self.state.filterType === 'gt') {
|
|
|
|
|
return model.get(self.state.filterKey) > self.state.filterValue;
|
|
|
|
|
}
|
|
|
|
|
else if (self.state.filterType === 'le') {
|
|
|
|
|
return model.get(self.state.filterKey) <= self.state.filterValue;
|
|
|
|
|
}
|
|
|
|
|
else if (self.state.filterType === 'ge') {
|
|
|
|
|
return model.get(self.state.filterKey) >= self.state.filterValue;
|
|
|
|
|
}
|
|
|
|
|
else if (self.state.filterType === 'ne') {
|
|
|
|
|
return model.get(self.state.filterKey) !== self.state.filterValue;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return model.get(self.state.filterKey) === self.state.filterValue;
|
|
|
|
|
}
|
|
|
|
@ -72,4 +87,4 @@ module.exports = function() {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return this;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|