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>
|
||||
<tr :for={{record <- data(@data)}} class="text-left border-b-2">
|
||||
<td :for={{attribute <- Ash.Resource.Info.attributes(@resource)}} class="px-4 py-3">
|
||||
{{render_attribute(assigns, record, attribute)}}
|
||||
{{render_attribute(record, attribute)}}
|
||||
</td>
|
||||
<td :if={{actions?(@resource)}}>
|
||||
<div class="flex h-max justify-items-center">
|
||||
|
@ -112,7 +112,7 @@ defmodule AshAdmin.Components.Resource.DataTable do
|
|||
end
|
||||
end
|
||||
|
||||
defp render_attribute(assigns, record, attribute) do
|
||||
defp render_attribute(record, attribute) do
|
||||
if Ash.Type.embedded_type?(attribute.type) do
|
||||
"..."
|
||||
else
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
defmodule AshAdmin.Components.Resource do
|
||||
use Surface.LiveComponent
|
||||
|
||||
import AshAdmin.Helpers
|
||||
require Ash.Query
|
||||
|
||||
alias AshAdmin.Components.Resource.{Show, Form, Info, Nav, DataTable}
|
||||
alias Surface.Components.LiveRedirect
|
||||
|
||||
# prop hide_filter, :boolean, default: true
|
||||
prop resource, :any, required: true
|
||||
|
@ -58,10 +56,6 @@ defmodule AshAdmin.Components.Resource do
|
|||
"#{resource}_create"
|
||||
end
|
||||
|
||||
defp show_id(resource) do
|
||||
"#{resource}_show"
|
||||
end
|
||||
|
||||
defp update_id(resource) do
|
||||
"#{resource}_update"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue