frontender v.2
This commit is contained in:
parent
e61985d50e
commit
10b1f8c855
@ -17,6 +17,10 @@ body{
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.root_header{
|
||||||
|
background-color: #297177;
|
||||||
|
}
|
||||||
|
|
||||||
.login-a{
|
.login-a{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -46,6 +50,18 @@ body{
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reg_form{
|
||||||
|
background-color: #297177;
|
||||||
|
border-radius: 5px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 15px;
|
||||||
|
height: max-content;
|
||||||
|
width: 250px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.auth_form img{
|
.auth_form img{
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
@ -72,7 +88,7 @@ body{
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin-top: 5px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info_panel{
|
.info_panel{
|
||||||
@ -175,6 +191,12 @@ body{
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.register_screen{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 1250px) {
|
@media (min-width: 1250px) {
|
||||||
.log_in_container{
|
.log_in_container{
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
2
lib/derivantes/accounts/user.ex
Normal file → Executable file
2
lib/derivantes/accounts/user.ex
Normal file → Executable file
@ -51,7 +51,7 @@ defmodule Derivantes.Accounts.User do
|
|||||||
defp validate_email(changeset, opts) do
|
defp validate_email(changeset, opts) do
|
||||||
changeset
|
changeset
|
||||||
|> validate_required([:email])
|
|> validate_required([:email])
|
||||||
|> validate_format(:email, ~r/^[^\s]+@[^\s]+$/, message: "must have the @ sign and no spaces")
|
|> validate_format(:email, ~r/^[^\s]+@[^\s]+$/, message: "Ingrese un email válido")
|
||||||
|> validate_length(:email, max: 160)
|
|> validate_length(:email, max: 160)
|
||||||
|> maybe_validate_unique_email(opts)
|
|> maybe_validate_unique_email(opts)
|
||||||
end
|
end
|
||||||
|
@ -409,7 +409,7 @@ defmodule DerivantesWeb.CoreComponents do
|
|||||||
|
|
||||||
def error(assigns) do
|
def error(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<p class="mt-3 flex gap-3 text-sm leading-6 text-rose-600 phx-no-feedback:hidden">
|
<p class="mt-3 flex gap-3 text-sm leading-6 text-center text-white phx-no-feedback:hidden">
|
||||||
<.icon name="hero-exclamation-circle-mini" class="mt-0.5 h-5 w-5 flex-none" />
|
<.icon name="hero-exclamation-circle-mini" class="mt-0.5 h-5 w-5 flex-none" />
|
||||||
<%= render_slot(@inner_block) %>
|
<%= render_slot(@inner_block) %>
|
||||||
</p>
|
</p>
|
||||||
|
4
lib/derivantes_web/components/layouts/root.html.heex
Normal file → Executable file
4
lib/derivantes_web/components/layouts/root.html.heex
Normal file → Executable file
@ -12,8 +12,8 @@
|
|||||||
</script>
|
</script>
|
||||||
<script src="https://kit.fontawesome.com/8afa33c96d.js" crossorigin="anonymous"></script>
|
<script src="https://kit.fontawesome.com/8afa33c96d.js" crossorigin="anonymous"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-white antialiased">
|
<body class="gray antialiased">
|
||||||
<ul class="relative z-10 flex items-center gap-4 px-4 sm:px-6 lg:px-8 justify-end">
|
<ul class="relative z-10 flex items-center gap-4 px-4 sm:px-6 lg:px-8 justify-end root_header">
|
||||||
<%= if @current_user do %>
|
<%= if @current_user do %>
|
||||||
<li class="text-[0.8125rem] leading-6 text-zinc-900">
|
<li class="text-[0.8125rem] leading-6 text-zinc-900">
|
||||||
<%= @current_user.email %>
|
<%= @current_user.email %>
|
||||||
|
@ -18,7 +18,7 @@ defmodule DerivantesWeb.DerivantesLive do
|
|||||||
</div>
|
</div>
|
||||||
<%= if length(@studies) > 0 do %>
|
<%= if length(@studies) > 0 do %>
|
||||||
<div class="estudio_patientname">
|
<div class="estudio_patientname">
|
||||||
<h1>Bienvenido</h1>
|
<h1>Bienvenido, <%= @current_user.email %> </h1>
|
||||||
<p>Para ver un estudio haga click en el icono de Informe o de Imágenes.</p>
|
<p>Para ver un estudio haga click en el icono de Informe o de Imágenes.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="estudio_container">
|
<div class="estudio_container">
|
||||||
|
20
lib/derivantes_web/live/user_registration_live.ex
Normal file → Executable file
20
lib/derivantes_web/live/user_registration_live.ex
Normal file → Executable file
@ -6,15 +6,15 @@ defmodule DerivantesWeb.UserRegistrationLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="register_screen">
|
||||||
<.header class="text-center">
|
<.header class="text-center mb-5">
|
||||||
Registre su nueva cuenta
|
Registre su nueva cuenta
|
||||||
<:subtitle>
|
<:subtitle>
|
||||||
Ya tiene una cuenta?
|
¿Ya tiene una cuenta?
|
||||||
<.link navigate={~p"/derivantes/log_in"} class="font-semibold text-[#297177] hover:underline">
|
<.link navigate={~p"/derivantes/log_in"} class="font-semibold text-[#297177] hover:underline">
|
||||||
Entre
|
Ingrese
|
||||||
</.link>
|
</.link>
|
||||||
a su cuenta ahora.
|
ahora.
|
||||||
</:subtitle>
|
</:subtitle>
|
||||||
</.header>
|
</.header>
|
||||||
|
|
||||||
@ -26,18 +26,18 @@ defmodule DerivantesWeb.UserRegistrationLive do
|
|||||||
phx-trigger-action={@trigger_submit}
|
phx-trigger-action={@trigger_submit}
|
||||||
action={~p"/derivantes/log_in?_action=registered"}
|
action={~p"/derivantes/log_in?_action=registered"}
|
||||||
method="post"
|
method="post"
|
||||||
class="auth_form"
|
class="reg_form"
|
||||||
>
|
>
|
||||||
<.error :if={@check_errors}>
|
<.error :if={@check_errors}>
|
||||||
Hubo un error.
|
Hubo un error.
|
||||||
</.error>
|
</.error>
|
||||||
<img src={~p"/images/sana_americano_logo.png"} alt="Sanatorio Americano Logo"/>
|
<img src={~p"/images/sana_americano_logo.png"} alt="Sanatorio Americano Logo"/>
|
||||||
<.input class="imput_text w-40" field={@form[:matricula]} type="text" label="Matrícula" required />
|
<.input class="imput_text w-40" field={@form[:matricula]} type="text" placeholder="Matrícula" required />
|
||||||
<.input class="imput_text w-40" field={@form[:email]} type="email" label="Email" required />
|
<.input class="imput_text w-40" field={@form[:email]} type="email" placeholder="Email" required />
|
||||||
<.input class="imput_text w-40" field={@form[:password]} type="password" label="Contraseña" required />
|
<.input class="imput_text w-40" field={@form[:password]} type="password" placeholder="Contraseña" required />
|
||||||
|
|
||||||
<:actions>
|
<:actions>
|
||||||
<.button phx-disable-with="Creating account..." class="submit_button">Create an account</.button>
|
<.button phx-disable-with="Creando cuenta..." class="submit_button mt-2">Crear cuenta</.button>
|
||||||
</:actions>
|
</:actions>
|
||||||
</.simple_form>
|
</.simple_form>
|
||||||
</div>
|
</div>
|
||||||
|
0
priv/gettext/en/LC_MESSAGES/errors.po
Normal file → Executable file
0
priv/gettext/en/LC_MESSAGES/errors.po
Normal file → Executable file
0
priv/gettext/errors.pot
Normal file → Executable file
0
priv/gettext/errors.pot
Normal file → Executable file
0
test/derivantes/accounts_test.exs
Normal file → Executable file
0
test/derivantes/accounts_test.exs
Normal file → Executable file
2
test/derivantes_web/live/user_registration_live_test.exs
Normal file → Executable file
2
test/derivantes_web/live/user_registration_live_test.exs
Normal file → Executable file
@ -32,7 +32,7 @@ defmodule DerivantesWeb.UserRegistrationLiveTest do
|
|||||||
|
|
||||||
assert result =~ "Register"
|
assert result =~ "Register"
|
||||||
assert result =~ "must have the @ sign and no spaces"
|
assert result =~ "must have the @ sign and no spaces"
|
||||||
assert result =~ "should be at least 12 character"
|
assert result =~ "La contraseña debe tener por lo menos 12 caracteres"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
0
test/derivantes_web/live/user_reset_password_live_test.exs
Normal file → Executable file
0
test/derivantes_web/live/user_reset_password_live_test.exs
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user