Browse Source

fix: remove queue tabs in job index

pull/48/head
Inhji Y. 1 year ago
parent
commit
2a24ae2f94
  1. 5
      apps/tomie_web/lib/tomie_web/live/job_live/index.ex
  2. 2
      apps/tomie_web/lib/tomie_web/live/tag_live/new.ex
  3. 16
      apps/tomie_web/lib/tomie_web/templates/job/sidebar.html.leex

5
apps/tomie_web/lib/tomie_web/live/job_live/index.ex

@ -37,11 +37,6 @@ defmodule TomieWeb.JobLive.Index do
{:noreply, socket |> assign(jobs: jobs, state: state)}
end
def handle_params(%{"queue" => queue}, _url, socket) do
jobs = fetch(%{queue: queue})
{:noreply, socket |> assign(jobs: jobs, queue: queue)}
end
def handle_params(_params, _url, socket) do
jobs = fetch(nil)
{:noreply, socket |> assign(jobs: jobs, state: nil)}

2
apps/tomie_web/lib/tomie_web/live/tag_live/new.ex

@ -19,8 +19,6 @@ defmodule TomieWeb.TagLive.New do
end
def handle_event("save", %{"tag" => %{"name" => name} = params}, socket) do
params = Map.put(params, "rules", "title::contains::#{name}")
case Tags.create_tag(params) do
{:ok, tag} ->
{:noreply,

16
apps/tomie_web/lib/tomie_web/templates/job/sidebar.html.leex

@ -33,22 +33,6 @@
<span class="hidden md:inline">Retrying</span>
<% end %>
</li>
<li>
<%= live_patch to: Routes.live_path(@socket, JobLive.Index, queue: :bookmarks) do %>
<div class="icon">
<%= IconView.icon(:bookmark) %>
</div>
<span class="hidden md:inline">Bookmarks</span>
<% end %>
</li>
<li>
<%= live_patch to: Routes.live_path(@socket, JobLive.Index, queue: :listens) do %>
<div class="icon">
<%= IconView.icon(:music) %>
</div>
<span class="hidden md:inline">Listens</span>
<% end %>
</li>
</ul>
</nav>
</aside>
Loading…
Cancel
Save