feat: filter by category/location on click
- add filtering by storage location
This commit is contained in:
@@ -362,9 +362,23 @@ defmodule ComponentsElixirWeb.StorageLocationsLive do
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center space-x-3">
|
||||
<%= if @title_tag == "h3" do %>
|
||||
<h3 class={"#{@text_size} font-medium #{if @depth == 0, do: "text-base-content", else: "text-base-content/80"}"}>{@location.name}</h3>
|
||||
<h3 class={"#{@text_size} font-medium"}>
|
||||
<.link
|
||||
navigate={~p"/?storage_location_id=#{@location.id}"}
|
||||
class={"#{if @depth == 0, do: "text-base-content", else: "text-base-content/80"} hover:text-primary hover:underline"}
|
||||
>
|
||||
{@location.name}
|
||||
</.link>
|
||||
</h3>
|
||||
<% else %>
|
||||
<h4 class={"#{@text_size} font-medium #{if @depth == 0, do: "text-base-content", else: "text-base-content/80"}"}>{@location.name}</h4>
|
||||
<h4 class={"#{@text_size} font-medium"}>
|
||||
<.link
|
||||
navigate={~p"/?storage_location_id=#{@location.id}"}
|
||||
class={"#{if @depth == 0, do: "text-base-content", else: "text-base-content/80"} hover:text-primary hover:underline"}
|
||||
>
|
||||
{@location.name}
|
||||
</.link>
|
||||
</h4>
|
||||
<% end %>
|
||||
<span class="text-xs text-base-content/50">
|
||||
({@count_display})
|
||||
@@ -400,9 +414,23 @@ defmodule ComponentsElixirWeb.StorageLocationsLive do
|
||||
<div class="flex items-start justify-between">
|
||||
<div class="flex-1">
|
||||
<%= if @title_tag == "h3" do %>
|
||||
<h3 class={"#{@text_size} font-medium #{if @depth == 0, do: "text-base-content", else: "text-base-content/80"}"}>{@location.name}</h3>
|
||||
<h3 class={"#{@text_size} font-medium"}>
|
||||
<.link
|
||||
navigate={~p"/?storage_location_id=#{@location.id}"}
|
||||
class={"#{if @depth == 0, do: "text-base-content", else: "text-base-content/80"} hover:text-primary hover:underline"}
|
||||
>
|
||||
{@location.name}
|
||||
</.link>
|
||||
</h3>
|
||||
<% else %>
|
||||
<h4 class={"#{@text_size} font-medium #{if @depth == 0, do: "text-base-content", else: "text-base-content/80"}"}>{@location.name}</h4>
|
||||
<h4 class={"#{@text_size} font-medium"}>
|
||||
<.link
|
||||
navigate={~p"/?storage_location_id=#{@location.id}"}
|
||||
class={"#{if @depth == 0, do: "text-base-content", else: "text-base-content/80"} hover:text-primary hover:underline"}
|
||||
>
|
||||
{@location.name}
|
||||
</.link>
|
||||
</h4>
|
||||
<% end %>
|
||||
<%= if @location.description do %>
|
||||
<p class="text-sm text-base-content/60 mt-1">{@location.description}</p>
|
||||
|
||||
Reference in New Issue
Block a user