Skip to content

Commit

Permalink
#939 When adding an item to a project, the dialog box does not dissapear
Browse files Browse the repository at this point in the history
  • Loading branch information
mellelieuwes committed Aug 7, 2024
1 parent 0b122d6 commit 1a9806b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Systems.Project.CreateItemPopup do
defmodule Systems.Project.CreateItemView do
use CoreWeb, :live_component

import CoreWeb.UI.Dialog
Expand Down Expand Up @@ -58,10 +58,6 @@ defmodule Systems.Project.CreateItemPopup do
type: :primary,
label: dgettext("eyra-project", "create_item_popup.create.button")
}
},
%{
action: %{type: :send, event: "cancel", target: myself},
face: %{type: :label, label: dgettext("eyra-ui", "cancel.button")}
}
]
)
Expand All @@ -78,11 +74,6 @@ defmodule Systems.Project.CreateItemPopup do
{:noreply, socket |> send_event(:parent, "saved")}
end

@impl true
def handle_event("cancel", _, socket) do
{:noreply, socket |> send_event(:parent, "cancelled")}
end

@impl true
def handle_event(
"active_item_id",
Expand Down
8 changes: 4 additions & 4 deletions core/systems/project/node_page.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ defmodule Systems.Project.NodePage do
end

@impl true
def compose(:create_item_popup, %{vm: %{node: node}}) do
def compose(:create_item_view, %{vm: %{node: node}}) do
%{
module: Project.CreateItemPopup,
module: Project.CreateItemView,
params: %{node: node}
}
end
Expand Down Expand Up @@ -67,8 +67,8 @@ defmodule Systems.Project.NodePage do
{
:noreply,
socket
|> compose_child(:create_item_popup)
|> show_popup(:create_item_popup)
|> compose_child(:create_item_view)
|> show_modal(:create_item_view, :dialog)
}
end

Expand Down

0 comments on commit 1a9806b

Please sign in to comment.