zf

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

commit 3ea89095e18d801846e75a0946eb30143722b8b5
parent b42c31c25ce1fc12c2f710d55ee509b2b9ec63c0
Author: srfsh <dev@srf.sh>
Date:   Fri,  2 Dec 2022 19:05:28 +0300

Zenflows.VF.EconomicEvent: allow deliverService action to take resource_quantity

Diffstat:
Msrc/zenflows/vf/economic_event.ex | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/zenflows/vf/economic_event.ex b/src/zenflows/vf/economic_event.ex @@ -197,8 +197,9 @@ defp do_changeset(%{changes: %{action_id: "cite"}} = cset) do end defp do_changeset(%{changes: %{action_id: "deliverService"}} = cset) do cset - |> Changeset.cast(cset.params, ~w[input_of_id output_of_id resource_conforms_to_id]a) - |> Changeset.validate_required(~w[resource_conforms_to_id]a) + |> Changeset.cast(cset.params, ~w[input_of_id output_of_id resource_conforms_to_id resource_quantity]a) + |> Changeset.validate_required(~w[resource_conforms_to_id resource_quantity]a) + |> Measure.cast(:resource_quantity) |> Validate.value_ne([:input_of_id, :output_of_id]) end defp do_changeset(%{changes: %{action_id: "pickup"}} = cset) do