%= if @live_action in [:new, :edit] do %> <%= live_modal @socket, Shift73kWeb.UserManagement.FormComponent, id: @user.id || :new, title: @page_title, action: @live_action, user: @user, current_user: @current_user %> <% end %> <%= if @delete_user do %> <%= live_modal @socket, Shift73kWeb.UserManagement.DeleteComponent, id: @delete_user.id, title: "Delete User", delete_user: @delete_user, current_user: @current_user %> <% end %>
Email <%= if @query.sort_by == "email", do: icon_div @socket, (@query.sort_order == "desc" && "bi-sort-up-alt" || "bi-sort-down-alt"), [class: "icon baseline ms-1"] %> | Role <%= if @query.sort_by == "role", do: icon_div @socket, (@query.sort_order == "desc" && "bi-sort-up-alt" || "bi-sort-down-alt"), [class: "icon baseline ms-1"] %> | Created at <%= if @query.sort_by == "inserted_at", do: icon_div @socket, (@query.sort_order == "desc" && "bi-sort-up-alt" || "bi-sort-down-alt"), [class: "icon baseline ms-1"] %> | Confirmed? | |
---|---|---|---|---|
Loading...
|
||||
<%= user.email %> | <%= user.role |> Atom.to_string() |> String.capitalize() %> | <%= dt_out(user.inserted_at) %> | <%= if user.confirmed_at do %> Yes <%= icon_div @socket, "bi-check", [class: "icon baseline fs-4 text-success"], [role: "img", aria_hidden: false] %> <% else %> No <%= icon_div @socket, "bi-x", [class: "icon baseline fs-4 text-warning"], [role: "img", aria_hidden: false] %> <% end %> |
<%= live_patch to: Routes.user_management_index_path(@socket, :edit, user.id, Enum.into(@query, [])), class: "btn btn-outline-primary btn-sm text-nowrap" do %>
<%= icon_div @socket, "bi-pencil", [class: "icon baseline", style: "margin-right:0.125rem;"] %>
Edit
<% end %>
<%= if Roles.can?(@current_user, user, :delete) do %>
|