2024-10-18 14:37:42 -04:00
|
|
|
<%# locals: (account:) %>
|
|
|
|
|
2025-07-18 08:30:00 -04:00
|
|
|
<%= render DS::Menu.new(testid: "account-menu") do |menu| %>
|
2025-04-30 18:14:22 -04:00
|
|
|
<% menu.with_item(variant: "link", text: "Edit", href: edit_account_path(account), icon: "pencil-line", data: { turbo_frame: :modal }) %>
|
2024-11-15 13:49:37 -05:00
|
|
|
|
2025-04-30 18:14:22 -04:00
|
|
|
<% unless account.crypto? %>
|
|
|
|
<% menu.with_item(
|
|
|
|
variant: "link",
|
|
|
|
text: "Import transactions",
|
|
|
|
href: imports_path({ import: { type: account.investment? ? "TradeImport" : "TransactionImport", account_id: account.id } }),
|
|
|
|
icon: "download",
|
|
|
|
data: { turbo_frame: :_top }
|
|
|
|
) %>
|
|
|
|
<% end %>
|
2024-10-18 14:37:42 -04:00
|
|
|
|
2025-05-07 13:56:20 -04:00
|
|
|
<% unless account.linked? %>
|
|
|
|
<% menu.with_item(
|
|
|
|
variant: "button",
|
|
|
|
text: "Delete account",
|
|
|
|
href: account_path(account),
|
|
|
|
method: :delete,
|
|
|
|
icon: "trash-2",
|
|
|
|
confirm: CustomConfirm.for_resource_deletion("account", high_severity: true),
|
|
|
|
data: { turbo_frame: :_top }
|
|
|
|
) %>
|
|
|
|
<% end %>
|
2024-10-18 14:37:42 -04:00
|
|
|
<% end %>
|