finapps 6.7.1 → 6.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/finapps/rest/screenings.rb +12 -1
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/screenings_spec.rb +15 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9f972096761ac681f6f984445a44fe9fe28dca7e2ee8b45839e0f1ef5b60a24
|
4
|
+
data.tar.gz: a973e1c1790dd21f505b673e95660882c19a781e605cfea6e2707efef6e8b62d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d47eecdc4513c9676b9fdb9f8b589a98acecfc593bdb828099079584832289f5b50275fdc3b7b280e774fb9e6aef4490c739b336e3dd9a8439c81e465a02c725
|
7
|
+
data.tar.gz: 5fdedc48c9f1887f146e4c33ed55fed6b5ab604bec091670991972ff063f9174f93d56853af506595286af0fcccf15be75c465c8a72f56bf69f4e1a3c721bf3d
|
@@ -57,6 +57,7 @@ module FinApps
|
|
57
57
|
|
58
58
|
def build_filter(params)
|
59
59
|
term_filter(params[:searchTerm])
|
60
|
+
.merge(operator_filter(params[:operatorID]))
|
60
61
|
.merge(date_range_filter(params[:fromDate], params[:toDate]))
|
61
62
|
.merge(progress_filter(params[:progress]))
|
62
63
|
end
|
@@ -73,7 +74,9 @@ module FinApps
|
|
73
74
|
{'consumer.email': term},
|
74
75
|
{'consumer.first_name': term},
|
75
76
|
{'consumer.last_name': term},
|
76
|
-
{'consumer.external_id': term}
|
77
|
+
{'consumer.external_id': term},
|
78
|
+
{'operator.first_name': term},
|
79
|
+
{'operator.last_name': term}
|
77
80
|
]
|
78
81
|
end
|
79
82
|
|
@@ -84,11 +87,19 @@ module FinApps
|
|
84
87
|
term.split.each do |t|
|
85
88
|
arr.append('consumer.first_name': t)
|
86
89
|
arr.append('consumer.last_name': t)
|
90
|
+
arr.append('operator.first_name': t)
|
91
|
+
arr.append('operator.last_name': t)
|
87
92
|
end
|
88
93
|
|
89
94
|
arr
|
90
95
|
end
|
91
96
|
|
97
|
+
def operator_filter(operator_id)
|
98
|
+
return {} unless operator_id
|
99
|
+
|
100
|
+
{operator_id: operator_id}
|
101
|
+
end
|
102
|
+
|
92
103
|
def date_range_filter(from_date, to_date)
|
93
104
|
return {} unless from_date || to_date
|
94
105
|
|
data/lib/finapps/version.rb
CHANGED
@@ -84,10 +84,24 @@ RSpec.describe FinApps::REST::Screenings do
|
|
84
84
|
{'consumer.first_name': 'le term'},
|
85
85
|
{'consumer.last_name': 'le term'},
|
86
86
|
{'consumer.external_id': 'le term'},
|
87
|
+
{'operator.first_name': 'le term'},
|
88
|
+
{'operator.last_name': 'le term'},
|
87
89
|
{'consumer.first_name': 'le'},
|
88
90
|
{'consumer.last_name': 'le'},
|
91
|
+
{'operator.first_name': 'le'},
|
92
|
+
{'operator.last_name': 'le'},
|
89
93
|
{'consumer.first_name': 'term'},
|
90
|
-
{'consumer.last_name': 'term'}
|
94
|
+
{'consumer.last_name': 'term'},
|
95
|
+
{'operator.first_name': 'term'},
|
96
|
+
{'operator.last_name': 'term'}]
|
97
|
+
}
|
98
|
+
end
|
99
|
+
|
100
|
+
context 'with operator' do
|
101
|
+
let(:params) { {operatorID: '123abc'} }
|
102
|
+
|
103
|
+
it_behaves_like 'a correct query builder', {
|
104
|
+
operator_id: '123abc'
|
91
105
|
}
|
92
106
|
end
|
93
107
|
end
|