Skip to content

Commit

Permalink
Contacts BO : distinguer fonction et organisation (#3453)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineAugusti authored Sep 12, 2023
1 parent 2ccb1ed commit e25f9c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@
<tr>
<th>Nom</th>
<th>E-mail</th>
<th>Organisation</th>
<th>Fonction</th>
<th class="bo_action_button"></th>
</tr>
<%= for contact <- @contacts do %>
<tr>
<td><%= DB.Contact.display_name(contact) %></td>
<td><%= contact.email %></td>
<td><%= contact_fonction(contact) %></td>
<td><%= contact.organization %></td>
<td><%= contact.job_title %></td>
<td class="bo_action_button">
<%= form_for @conn, backoffice_contact_path(@conn, :edit, contact.id), [nodiv: true, method: "get"], fn _ -> %>
<%= submit("Éditer", class: "button", nodiv: true) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ defmodule TransportWeb.Backoffice.ContactView do
PaginationHelpers.pagination_links(conn, contacts, kwargs)
end

defp contact_fonction(%DB.Contact{job_title: nil, organization: organization}) do
organization
end

defp contact_fonction(%DB.Contact{job_title: job_title, organization: organization}) do
"#{job_title} (#{organization})"
end

defp notification_subscriptions_with_dataset(records) do
records
|> Enum.reject(&is_nil(&1.dataset_id))
Expand Down

0 comments on commit e25f9c7

Please sign in to comment.