%= if @live_action in [:new, :edit] do %> <%= live_modal @socket, Bones73kWeb.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, Bones73kWeb.UserManagement.DeleteComponent, id: @delete_user.id, title: "Delete User", delete_user: @delete_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) %> | <%= user.confirmed_at && "Confirmed" || "Not confirmed" %> disabled> | <%= 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 %> <%= icon_div @socket, "bi-pencil", [class: "icon baseline"] %> Edit <% end %> <% end %> <%= if Roles.can?(@current_user, user, :delete) do %> <% end %> |