finapps 6.7.1 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1007bb9e3b614755fa3252fe8c53958f0a9f093997b8910e2eb29ea38082dec
4
- data.tar.gz: 9991cf065517607999949265e2b3c2e7214edbea5c9120bb2f01e11133b6a03d
3
+ metadata.gz: d9f972096761ac681f6f984445a44fe9fe28dca7e2ee8b45839e0f1ef5b60a24
4
+ data.tar.gz: a973e1c1790dd21f505b673e95660882c19a781e605cfea6e2707efef6e8b62d
5
5
  SHA512:
6
- metadata.gz: 541d42baf3992dc7e7a5a2417d95b9d7d10f886913df1123dc9ff2bc2f62918389a0cac5fbb5aab04ab2544d0c2b4bdaf512fb1a2e0e4e8a1ecdf7495144f24b
7
- data.tar.gz: ab496f7a9823916ba5e3493860298c068d9643a193e048e0aec74bf0858bea4a690d561c82257e934e952f6e0de1b7ceda10a0a5afa0dc95abcf952967e40b71
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '6.7.1'
4
+ VERSION = '6.8.0'
5
5
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.7.1
4
+ version: 6.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero