%= 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 %> <% end %>
Email <%= if @query.sort_by == "email" do %> <% end %> | Role <%= if @query.sort_by == "role" do %> <% end %> | Created at <%= if @query.sort_by == "inserted_at" do %> <% end %> | Confirmed? | |
---|---|---|---|---|
Loading...
|
||||
<%= user.email %> | <%= user.role |> Atom.to_string() |> String.capitalize() %> | <%= dt_out(user.inserted_at) %> | <%= user.confirmed_at && "Confirmed" || "Not confirmed" %> | <%= if Roles.can?(@current_user, user, :edit) do %> <%= 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 %> Edit <% end %> <% end %> <%= if Roles.can?(@current_user, user, :delete) do %> <% end %> |