1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-03 04:25:21 +02:00
This commit is contained in:
Josh Pigford 2024-02-07 11:11:53 -06:00
commit 754c506aad
18 changed files with 168 additions and 73 deletions

View file

@ -0,0 +1,4 @@
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
<label for="account_name" class="block text-sm font-medium opacity-50 focus-within:opacity-100">Type</label>
<%= f.select :subtype, options_for_select(Account::Investment::SUBTYPES, selected: ""), {}, class: "block w-full p-0 mt-1 bg-transparent border-none focus:outline-none focus:ring-0" %>
</div>

View file

@ -3,14 +3,14 @@
<h3 class="mt-1 mb-4 text-sm text-gray-500"><%#= number_to_currency Current.family.cash_balance %></h3>
<% Current.family.accounts.each do |account| %>
<div class="flex items-center justify-between px-3 py-3 mb-2 bg-white shadow-sm rounded-xl">
<div class="flex items-center text-sm">
<div class="flex flex-row items-center justify-between px-3 py-3 mb-2 bg-white shadow-sm rounded-xl">
<div class="flex w-1/3 items-center text-sm">
<%= account.name %>
</div>
<div class="flex items-center text-sm">
<%= account.accountable.model_name.human %>
<div class="flex w-1/3 items-center text-sm">
<%= to_accountable_title(account.accountable) %>
</div>
<p class="text-sm text-right">
<p class="flex w-1/3 text-sm text-right">
<span class="block mb-1"><%= humanized_money_with_symbol account.balance %></span>
</p>
</div>

View file

@ -56,8 +56,10 @@
</nav>
<div class="flex flex-col mt-6">
<div class="flex items-center justify-between">
<span class="text-xs"><%= t('.accounts') %></span>
<%= link_to new_account_path, class: 'block hover:bg-gray-100 p-2 text-sm font-semibold text-gray-900 flex items-center rounded', title: t('.new_accoount') do %>
<%= link_to accounts_path, class: 'text-xs' do%>
<%= t('.accounts') %>
<% end %>
<%= link_to new_account_path, class: 'block hover:bg-gray-100 p-2 text-sm font-semibold text-gray-900 flex items-center rounded', title: t('.new_account') do %>
<%= inline_svg_tag('icon-add.svg', class: 'text-gray-500 fill-current') %>
<% end %>
</div>

View file

@ -3,34 +3,34 @@
<%= form_with model: Current.user, url: settings_path, html: { class: "space-y-4" } do |form| %>
<%= form.fields_for :family_attributes do |family_fields| %>
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
<%= family_fields.label :name, "Family name", class: "block text-sm font-medium opacity-50 focus-within:opacity-100" %>
<%= family_fields.label :name, "Family name", class: "block text-sm font-medium opacity-75 focus-within:opacity-100" %>
<%= family_fields.text_field :name, placeholder: "Family name", value: Current.family.name, class: "p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
</div>
<% end %>
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
<%= form.label :first_name, class: "block text-sm font-medium opacity-50 focus-within:opacity-100" %>
<%= form.label :first_name, class: "block text-sm font-medium opacity-75 focus-within:opacity-100" %>
<%= form.text_field :first_name, placeholder: "First name", value: Current.user.first_name, class: "w-full p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
</div>
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
<%= form.label :last_name, class: "block text-sm font-medium opacity-50 focus-within:opacity-100" %>
<%= form.label :last_name, class: "block text-sm font-medium opacity-75 focus-within:opacity-100" %>
<%= form.text_field :last_name, placeholder: "Last name", value: Current.user.last_name, class: "w-full p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
</div>
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
<%= form.label :email, class: "block text-sm font-medium opacity-50 focus-within:opacity-100" %>
<%= form.label :email, class: "block text-sm font-medium opacity-75 focus-within:opacity-100" %>
<%= form.email_field :email, placeholder: "Email", value: Current.user.email, class: "w-full p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
</div>
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
<%= form.label :password, class: "block text-sm font-medium opacity-50 focus-within:opacity-100" %>
<%= form.label :password, class: "block text-sm font-medium opacity-75 focus-within:opacity-100" %>
<%= form.password_field :password, class: "w-full p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
</div>
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
<%= form.label :password_confirmation, class: "block text-sm font-medium opacity-50 focus-within:opacity-100" %>
<%= form.label :password_confirmation, class: "block text-sm font-medium opacity-75 focus-within:opacity-100" %>
<%= form.password_field :password_confirmation, class: "w-full p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
</div>