Skip to content

Commit

Permalink
1131 transformation order bug part 2 (#1660)
Browse files Browse the repository at this point in the history
* modify transformation sort so it includes parameters in changeset update

* update move to include all changes instead of just sequence and params

* modify to use changeset function

* add fallback options for toggling component visibility
  • Loading branch information
accenture-mikeyc authored Apr 14, 2023
1 parent 8b2aefc commit 21c572a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,30 @@ defmodule AndiWeb.IngestionLiveView.Transformations.TransformationForm do
case Changeset.fetch_field(socket.assigns.transformation_changeset, :parameters) do
{_, parameters} -> parameters
:error -> %{}
_ -> %{}
end

condition_select =
case Map.get(parameters, :condition) do
nil -> nil
"true" -> true
"false" -> false
_ -> nil
end

static =
case Map.get(parameters, :conditionCompareTo) do
nil -> nil
"Static Value" -> true
"Target Field" -> false
_ -> nil
end

show_date =
case Map.get(parameters, :conditionDataType) do
nil -> false
"DateTime" -> true
_ -> false
end

{:noreply, assign(socket, visible?: not current_visibility, condition?: condition_select, static?: static, date?: show_date)}
Expand Down
2 changes: 1 addition & 1 deletion apps/andi/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Andi.MixProject do
def project do
[
app: :andi,
version: "2.6.59",
version: "2.6.60",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down

0 comments on commit 21c572a

Please sign in to comment.