refactor buyer and insured and add more policy types
All checks were successful
Build and Publish / build-release (push) Successful in 1m38s

This commit is contained in:
2026-04-27 14:06:28 -05:00
parent c8a58c3f58
commit 2a8f2ffc2d
27 changed files with 676 additions and 170 deletions

View File

@@ -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