mirror of
https://github.com/ash-project/ash_admin.git
synced 2024-09-20 05:12:54 +12:00
chore: fix warnings
This commit is contained in:
parent
80553bef64
commit
bd0ff0d3ed
2 changed files with 2 additions and 8 deletions
|
@ -75,7 +75,7 @@ defmodule AshAdmin.Components.Resource.DataTable do
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :for={{record <- data(@data)}} class="text-left border-b-2">
|
<tr :for={{record <- data(@data)}} class="text-left border-b-2">
|
||||||
<td :for={{attribute <- Ash.Resource.Info.attributes(@resource)}} class="px-4 py-3">
|
<td :for={{attribute <- Ash.Resource.Info.attributes(@resource)}} class="px-4 py-3">
|
||||||
{{render_attribute(assigns, record, attribute)}}
|
{{render_attribute(record, attribute)}}
|
||||||
</td>
|
</td>
|
||||||
<td :if={{actions?(@resource)}}>
|
<td :if={{actions?(@resource)}}>
|
||||||
<div class="flex h-max justify-items-center">
|
<div class="flex h-max justify-items-center">
|
||||||
|
@ -112,7 +112,7 @@ defmodule AshAdmin.Components.Resource.DataTable do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp render_attribute(assigns, record, attribute) do
|
defp render_attribute(record, attribute) do
|
||||||
if Ash.Type.embedded_type?(attribute.type) do
|
if Ash.Type.embedded_type?(attribute.type) do
|
||||||
"..."
|
"..."
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
defmodule AshAdmin.Components.Resource do
|
defmodule AshAdmin.Components.Resource do
|
||||||
use Surface.LiveComponent
|
use Surface.LiveComponent
|
||||||
|
|
||||||
import AshAdmin.Helpers
|
|
||||||
require Ash.Query
|
require Ash.Query
|
||||||
|
|
||||||
alias AshAdmin.Components.Resource.{Show, Form, Info, Nav, DataTable}
|
alias AshAdmin.Components.Resource.{Show, Form, Info, Nav, DataTable}
|
||||||
alias Surface.Components.LiveRedirect
|
|
||||||
|
|
||||||
# prop hide_filter, :boolean, default: true
|
# prop hide_filter, :boolean, default: true
|
||||||
prop resource, :any, required: true
|
prop resource, :any, required: true
|
||||||
|
@ -58,10 +56,6 @@ defmodule AshAdmin.Components.Resource do
|
||||||
"#{resource}_create"
|
"#{resource}_create"
|
||||||
end
|
end
|
||||||
|
|
||||||
defp show_id(resource) do
|
|
||||||
"#{resource}_show"
|
|
||||||
end
|
|
||||||
|
|
||||||
defp update_id(resource) do
|
defp update_id(resource) do
|
||||||
"#{resource}_update"
|
"#{resource}_update"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue