1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

Limit transaction editing for crypto accounts

This commit is contained in:
Zach Gollwitzer 2024-11-18 12:49:03 -05:00
parent 743e291d56
commit fcb95207d7
3 changed files with 10 additions and 20 deletions

View file

@ -14,9 +14,11 @@
<%= tag.span t(".new_balance"), class: "text-sm" %>
<% end %>
<%= link_to @account.investment? ? new_account_trade_path(@account) : new_transaction_path(account_id: @account.id), data: { turbo_frame: :modal }, class: "block p-2 rounded-lg hover:bg-gray-50 flex items-center gap-2" do %>
<%= lucide_icon("credit-card", class: "text-gray-500 w-5 h-5") %>
<%= tag.span t(".new_transaction"), class: "text-sm" %>
<% unless @account.crypto? %>
<%= link_to @account.investment? ? new_account_trade_path(@account) : new_transaction_path(account_id: @account.id), data: { turbo_frame: :modal }, class: "block p-2 rounded-lg hover:bg-gray-50 flex items-center gap-2" do %>
<%= lucide_icon("credit-card", class: "text-gray-500 w-5 h-5") %>
<%= tag.span t(".new_transaction"), class: "text-sm" %>
<% end %>
<% end %>
</div>
</div>

View file

@ -19,12 +19,14 @@
<span><%= t(".edit") %></span>
<% end %>
<%= link_to new_import_path,
<% unless account.crypto? %>
<%= link_to new_import_path,
data: { turbo_frame: :modal },
class: "block w-full py-2 px-3 space-x-2 text-gray-900 hover:bg-gray-50 flex items-center rounded-lg" do %>
<%= lucide_icon "download", class: "w-5 h-5 text-gray-500" %>
<%= lucide_icon "download", class: "w-5 h-5 text-gray-500" %>
<span><%= t(".import") %></span>
<span><%= t(".import") %></span>
<% end %>
<% end %>
<%= button_to account_path(account),

View file

@ -866,20 +866,6 @@ zmw:
delimiter: ","
default_format: "%u%n"
default_precision: 2
bch:
name: Bitcoin Cash
priority: 100
iso_code: BCH
iso_numeric: ""
html_code: "&#x20bf;"
symbol: "₿"
minor_unit: Satoshi
minor_unit_conversion: 100000000
smallest_denomination: 1
separator: "."
delimiter: ","
default_format: "%n %u"
default_precision: 8
btc:
name: Bitcoin
priority: 100