-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e133c2
commit a878a63
Showing
11 changed files
with
133 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<div class="mx-auto md:w-2/3 w-full"> | ||
<h1 class="font-bold text-4xl">Editing category</h1> | ||
<h1 class="font-bold text-4xl">Editar categoria</h1> | ||
|
||
<%= render "form", category: @category %> | ||
|
||
<%= link_to "Show this category", @category, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> | ||
<%= link_to "Back to categories", categories_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,42 @@ | ||
<div class="w-full"> | ||
<% if notice.present? %> | ||
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p> | ||
<% end %> | ||
|
||
<% content_for :title, "Categories" %> | ||
<% if notice.present? %> | ||
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p> | ||
<% end %> | ||
|
||
<div class="flex justify-between items-center"> | ||
<h1 class="font-bold text-4xl">Categories</h1> | ||
<%= link_to "New category", new_category_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> | ||
</div> | ||
<% content_for :title, "Categorias" %> | ||
|
||
<div id="categories" class="min-w-full"> | ||
<% @categories.each do |category| %> | ||
<%= render category %> | ||
<p> | ||
<%= link_to "Show this category", category, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> | ||
</p> | ||
<% end %> | ||
</div> | ||
<div class="flex justify-between items-center mb-6"> | ||
<h1 class="font-bold text-4xl text-blue-500">Categorias</h1> | ||
<%= link_to "Cadastrar categoria", new_category_path, class: "rounded-lg py-3 px-5 bg-blue-400 hover:bg-blue-500 text-white block font-medium" %> | ||
</div> | ||
|
||
<div id="categories" class="w-full"> | ||
<% if @categories.any? %> | ||
<table class="min-w-full divide-y divide-gray-200"> | ||
<thead class="bg-blue-50"> | ||
<tr> | ||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nome</th> | ||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ações</th> | ||
</tr> | ||
</thead> | ||
<tbody class="bg-white divide-y divide-gray-200"> | ||
<% @categories.each do |category| %> | ||
<tr id="<%= dom_id category %>"> | ||
<td class="px-6 py-4 whitespace-nowrap"> | ||
<div class="text-sm text-gray-900"><%= category.name %></div> | ||
</td> | ||
<td class="px-6 py-4 whitespace-nowrap text-left text-sm font-medium"> | ||
<%= link_to edit_category_path(category), class: "ml-2 rounded-lg py-2 px-4 text-blue-600 hover:bg-gray-100 inline-block font-medium cursor-pointer" do %> | ||
<%= lucide_icon('file-pen-line', class: 'inline-block text-blue-600 cursor-pointer') %> | ||
<% end %> | ||
<%= link_to category, method: :delete, class: "ml-2 rounded-lg py-2 px-4 text-blue-600 hover:bg-gray-100 inline-block font-medium cursor-pointer", data: { turbo_method: :delete, turbo_confirm: "Tem certeza?" } do %> | ||
<%= lucide_icon('circle-x', class: 'inline-block text-red-600 cursor-pointer') %> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
<% else %> | ||
<p>Nenhum sintoma registrado</p> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
<div class="mx-auto md:w-2/3 w-full"> | ||
<h1 class="font-bold text-4xl">New category</h1> | ||
<h1 class="font-bold text-4xl">Nova categoria</h1> | ||
|
||
<%= render "form", category: @category %> | ||
|
||
<%= link_to "Back to categories", categories_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,72 @@ | ||
<h2>Edit <%= resource_name.to_s.humanize %></h2> | ||
|
||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | ||
<%= render "devise/shared/error_messages", resource: resource %> | ||
|
||
<div class="field"> | ||
<%= f.label :email %><br /> | ||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %> | ||
</div> | ||
|
||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> | ||
<% end %> | ||
|
||
<div class="field"> | ||
<%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br /> | ||
<%= f.password_field :password, autocomplete: "new-password" %> | ||
<% if @minimum_password_length %> | ||
<br /> | ||
<em><%= @minimum_password_length %> characters minimum</em> | ||
<div class="container flex animate-up delay-2"> | ||
<aside class="card bg-white border border-gray-300 rounded-lg p-8 text-center mr-8 justify-center flex flex-col items-center"> | ||
<% if resource.avatar? %> | ||
<img src="<%= resource.avatar %>" alt="Avatar" class="rounded-full border-yellow-500 border-4 border-secondary w-28 h-28 mb-4" /> | ||
<% else %> | ||
<%= lucide_icon('user-round', class: "rounded-full border-yellow-500 border-4 border-secondary w-28 h-28 mb-4") %> | ||
<% end %> | ||
</div> | ||
<h2 class="text-2xl font-semibold mb-4"><%= resource.name %></h2> | ||
<p class="text-lg"> | ||
Quantidade de horas que trabalha na semana: <br /> | ||
<strong><%= resource.hours_per_week %></strong> | ||
</p> | ||
|
||
<div class="field"> | ||
<%= f.label :password_confirmation %><br /> | ||
<%= f.password_field :password_confirmation, autocomplete: "new-password" %> | ||
</div> | ||
<div class="flex flex-col items-center mt-4 space-y-4"> | ||
<%= link_to "Ver compromissos anteriores", root_path, class: "text-blue-400 font-semibold rounded transition duration-200 hover:text-blue-500" %> | ||
<%= link_to "Histórico de modificações", root_path, class: "text-blue-400 font-semibold rounded transition duration-200 hover:text-blue-500" %> | ||
<%= link_to "Categorias cadastradas", categories_path, class: "text-blue-400 font-semibold rounded transition duration-200 hover:text-blue-500" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> | ||
<%= f.password_field :current_password, autocomplete: "current-password" %> | ||
</div> | ||
</aside> | ||
<main class="flex-1"> | ||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'space-y-4' }) do |f| %> | ||
<%= render "devise/shared/error_messages", resource: resource %> | ||
|
||
<div class="actions"> | ||
<%= f.submit "Update" %> | ||
</div> | ||
<% end %> | ||
<div class="field"> | ||
<%= f.label :name, class: 'block font-semibold' %> | ||
<%= f.text_field :name, class: 'mt-1 block w-full border border-gray-300 rounded-md p-2', placeholder: "Seu nome" %> | ||
</div> | ||
|
||
<h3>Cancel my account</h3> | ||
<div class="field"> | ||
<%= f.label :email, class: 'block font-semibold' %> | ||
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: 'mt-1 block w-full border border-gray-300 rounded-md p-2', placeholder: "Seu email" %> | ||
</div> | ||
|
||
<div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div> | ||
<div class="field"> | ||
<%= f.label :avatar, class: 'block font-semibold' %> | ||
<%= f.url_field :avatar, class: 'mt-1 block w-full border border-gray-300 rounded-md p-2', placeholder: "URL da imagem (ex: https://github.com/eltonsantos.png)" %> | ||
</div> | ||
|
||
<%= link_to "Back", :back %> | ||
<div class="field"> | ||
<%= f.label :hours_per_week, class: 'block font-semibold' %> | ||
<%= f.text_field :hours_per_week, class: 'mt-1 block w-full border border-gray-300 rounded-md p-2', placeholder: "Quantidade de horas trabalhadas por semana" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :password, class: 'block font-semibold' %> | ||
<%= f.password_field :password, autocomplete: "new-password", class: 'mt-1 block w-full border border-gray-300 rounded-md p-2', placeholder: "Nova senha (deixe em branco para não alterar)" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :password_confirmation, class: 'block font-semibold' %> | ||
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: 'mt-1 block w-full border border-gray-300 rounded-md p-2', placeholder: "Confirme a nova senha" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :current_password, class: 'block font-semibold' %> | ||
<%= f.password_field :current_password, autocomplete: "current-password", class: 'mt-1 block w-full border border-gray-300 rounded-md p-2', placeholder: "Senha atual" %> | ||
</div> | ||
|
||
<div class="actions mt-4"> | ||
<%= f.submit "Atualizar", class: 'bg-blue-600 text-white font-semibold py-2 px-4 rounded' %> | ||
</div> | ||
<% end %> | ||
|
||
<h3 class="text-lg font-semibold mt-6">Cancelar minha conta</h3> | ||
<div> | ||
Unhappy? <%= button_to "Cancelar minha conta", registration_path(resource_name), data: { confirm: "Você tem certeza?" }, method: :delete, class: 'text-red-600' %> | ||
</div> | ||
|
||
<%= link_to "Voltar", :back, class: 'mt-4 text-blue-500' %> | ||
</main> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.