zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit 3c2614a0db4264d2a992cbb76cb8571fac78e66b
parent fcc120a6d1d79ebbcc863d37be0190957a080189
Author: srfsh <dev@srf.sh>
Date:   Tue, 15 Nov 2022 11:23:41 +0300

Zenflows.VF.Proposal.Query: make name filter fuzzy

Diffstat:
Msrc/zenflows/vf/proposal/query.ex | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/zenflows/vf/proposal/query.ex b/src/zenflows/vf/proposal/query.ex @@ -66,12 +66,12 @@ end defp all_f(q, {:primary_intents_resource_inventoried_as_name, v}) do q |> join(:primary_intents_resource_inventoried_as) - |> where([primary_intents_resource_inventoried_as: r], ilike(r.name, ^v)) + |> where([primary_intents_resource_inventoried_as: r], ilike(r.name, ^"%#{v}%")) end defp all_f(q, {:or_primary_intents_resource_inventoried_as_name, v}) do q |> join(:primary_intents_resource_inventoried_as) - |> or_where([primary_intents_resource_inventoried_as: r], ilike(r.name, ^v)) + |> or_where([primary_intents_resource_inventoried_as: r], ilike(r.name, ^"%#{v}%")) end defp all_f(q, {:primary_intents_resource_inventoried_as_id, v}) do q