refactor buyer and insured and add more policy types
All checks were successful
Build and Publish / build-release (push) Successful in 1m38s
All checks were successful
Build and Publish / build-release (push) Successful in 1m38s
This commit is contained in:
@@ -7,10 +7,14 @@ defmodule PolicyService.Filters.PolicyApplicationFilters do
|
||||
where(
|
||||
query,
|
||||
[p],
|
||||
fragment("?->>'name' ilike ?", p.applicant_info, ^term) or
|
||||
fragment("?->>'company_name' ilike ?", p.applicant_info, ^term) or
|
||||
fragment("?->>'document_id' ilike ?", p.applicant_info, ^term) or
|
||||
fragment("?->>'ruc' ilike ?", p.applicant_info, ^term) or
|
||||
fragment("?->>'name' ilike ?", p.insured, ^term) or
|
||||
fragment("?->>'company_name' ilike ?", p.insured, ^term) or
|
||||
fragment("?->>'document_id' ilike ?", p.insured, ^term) or
|
||||
fragment("?->>'ruc' ilike ?", p.insured, ^term) or
|
||||
fragment("?->>'name' ilike ?", p.buyer, ^term) or
|
||||
fragment("?->>'company_name' ilike ?", p.buyer, ^term) or
|
||||
fragment("?->>'document_id' ilike ?", p.buyer, ^term) or
|
||||
fragment("?->>'ruc' ilike ?", p.buyer, ^term) or
|
||||
ilike(p.provider_policy_number, ^term)
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user