mix format

This commit is contained in:
Inhji 2023-04-10 19:22:28 +02:00
parent ebacb7919c
commit 83aac55273
6 changed files with 15 additions and 13 deletions

View file

@ -128,7 +128,6 @@ defmodule Chiya.Notes.References do
else else
Logger.debug("Note '#{slug}' does not exist anymore.") Logger.debug("Note '#{slug}' does not exist anymore.")
end end
end) end)
end end

View file

@ -79,7 +79,8 @@ defmodule ChiyaWeb.NoteController do
note: note, note: note,
changeset: changeset, changeset: changeset,
channels: to_channel_options(), channels: to_channel_options(),
tags: note.tags) tags: note.tags
)
end end
end end

View file

@ -13,9 +13,7 @@ defmodule ChiyaWeb.NoteHTML do
def note_form(assigns) def note_form(assigns)
def selected_channels(changeset), do: def selected_channels(changeset), do: Enum.map(changeset.data.channels, fn c -> c.id end)
Enum.map(changeset.data.channels, fn c -> c.id end)
def tags_to_string(tags), do: def tags_to_string(tags), do: Enum.map_join(tags, ", ", fn t -> t.name end)
Enum.map_join(tags, ", ", fn t -> t.name end)
end end

View file

@ -3,6 +3,11 @@
<:subtitle>Use this form to manage note records in your database.</:subtitle> <:subtitle>Use this form to manage note records in your database.</:subtitle>
</.header> </.header>
<.note_form changeset={@changeset} action={~p"/admin/notes/#{@note}"} channels={@channels} tags={@tags} /> <.note_form
changeset={@changeset}
action={~p"/admin/notes/#{@note}"}
channels={@channels}
tags={@tags}
/>
<.back navigate={~p"/admin/notes"}>Back to notes</.back> <.back navigate={~p"/admin/notes"}>Back to notes</.back>

View file

@ -28,4 +28,3 @@
<.button>Save Note</.button> <.button>Save Note</.button>
</:actions> </:actions>
</.simple_form> </.simple_form>