Prototype CSS only calendar result

This commit is contained in:
2024-10-12 21:34:53 +02:00
parent a97b4f55fd
commit 101162c72e
5 changed files with 1468 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
defmodule MihainatorWeb.ResultLive do
use MihainatorWeb, :live_view
@impl Phoenix.LiveView
def mount(_params, _session, socket) do
{:ok, socket}
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -29,10 +29,12 @@ defmodule MihainatorWeb.UploadLive do
@impl Phoenix.LiveView
@spec handle_info({reference(), any()}, any()) :: {:noreply, any()}
def handle_info({ref, _result}, socket) do
def handle_info({ref, result}, socket) do
Process.demonitor(ref, [:flush])
{:noreply, socket}
socket = assign(socket, :calendar_dates, result)
{:noreply, push_navigate(socket, to: ~p"/result")}
end
defp error_to_string(:too_large), do: "Too large"

View File

@@ -19,6 +19,7 @@ defmodule MihainatorWeb.Router do
get "/", PageController, :home
live "/upload", UploadLive
live "/result", ResultLive
end
# Other scopes may use custom stacks.