Current section
11 Versions
Jump to
Current section
11 Versions
Compare versions
4
files changed
+22
additions
-2
deletions
| @@ -54,4 +54,4 @@ | |
| 54 54 | {<<"optional">>,false}, |
| 55 55 | {<<"repository">>,<<"hexpm">>}, |
| 56 56 | {<<"requirement">>,<<">= 3.0.0">>}]]}. |
| 57 | - {<<"version">>,<<"0.1.7">>}. |
| 57 | + {<<"version">>,<<"0.1.8">>}. |
| @@ -32,11 +32,21 @@ defmodule MavuBeUserUi.Live.EditComponent do | |
| 32 32 | |> assign( |
| 33 33 | rec: rec, |
| 34 34 | local_edit_component: local_edit_component(assigns), |
| 35 | + init_password_link: nil, |
| 35 36 | changeset: get_changeset(rec, %{}, assigns) |
| 36 37 | ) |
| 37 38 | } |
| 38 39 | end |
| 39 40 | |
| 41 | + @impl true |
| 42 | + def handle_event("create_init_password_link", _, socket) do |
| 43 | + {:noreply, |
| 44 | + assign(socket, |
| 45 | + init_password_link: |
| 46 | + accounts_module(socket.assigns).get_init_password_link(socket.assigns.rec) |
| 47 | + )} |
| 48 | + end |
| 49 | + |
| 40 50 | @impl true |
| 41 51 | def handle_event("validate", %{"fdata" => incoming_data} = _msg, socket) do |
| 42 52 | changeset = |
| @@ -34,6 +34,16 @@ | |
| 34 34 | <div class="my-4 text-right"> |
| 35 35 | <%= content_tag :button, "OK",class: "btn-outline-primary px-10" %> |
| 36 36 | </div> |
| 37 | + |
| 38 | + |
| 39 | + <div class="my-4"> |
| 40 | + <%= if @init_password_link do %> |
| 41 | + <a href={@init_password_link}><%= @init_password_link %></a> |
| 42 | + <% else %> |
| 43 | + <a href="#" phx-click="create_init_password_link" phx-target={"##{@id}"}>➜ create init-password-link</a> |
| 44 | + <% end %> |
| 45 | + |
| 46 | + </div> |
| 37 47 | |
| 38 48 | |
| 39 49 | </.form> |
| @@ -1,7 +1,7 @@ | |
| 1 1 | defmodule MavuBeUserUi.MixProject do |
| 2 2 | use Mix.Project |
| 3 3 | |
| 4 | - @version "0.1.7" |
| 4 | + @version "0.1.8" |
| 5 5 | def project do |
| 6 6 | [ |
| 7 7 | app: :mavu_be_user_ui, |