The personal finance app for everyone (by everyone)
Ruby
Allow manual entry on linked accounts (#689)
LPWf97ff419e876
diff --git a/app/components/UI/account/activity_feed.html.erb b/app/components/UI/account/activity_feed.html.erbindex 4c586a09d3..14c9b36e45 100644--- a/app/components/UI/account/activity_feed.html.erb+++ b/app/components/UI/account/activity_feed.html.erb@@ -3,23 +3,32 @@<div class="flex items-center justify-between mb-4" data-testid="activity-menu"><%= tag.h2 t("accounts.show.activity.title"), class: "font-medium text-lg" %>- <% if account.manual? %>- <%= render DS::Menu.new(variant: "button") do |menu| %>- <% menu.with_button(text: t("accounts.show.activity.new"), variant: "secondary", icon: "plus") %>+ <%= render DS::Menu.new(variant: "button") do |menu| %>+ <% menu.with_button(text: t("accounts.show.activity.new"), variant: "secondary", icon: "plus") %>+ <% unless account.linked? %><% menu.with_item(variant: "link",text: t("accounts.show.activity.new_balance"),icon: "circle-dollar-sign",href: new_valuation_path(account_id: account.id),data: { turbo_frame: :modal }) %>+ <% end %>- <% unless account.crypto? %>+ <% unless account.crypto? %>+ <% if account.investment? %>+ <% menu.with_item(+ variant: "link",+ text: t("accounts.show.activity.new_activity"),+ icon: "arrow-left-right",+ href: new_trade_path(account_id: account.id),+ data: { turbo_frame: :modal }) %>+ <% else %><% menu.with_item(variant: "link",text: t("accounts.show.activity.new_transaction"),icon: "credit-card",- href: account.investment? ? new_trade_path(account_id: account.id) : new_transaction_path(account_id: account.id),+ href: new_transaction_path(account_id: account.id),data: { turbo_frame: :modal }) %><% end %><% end %>diff --git a/config/locales/views/accounts/en.yml b/config/locales/views/accounts/en.ymlindex 8ed337ef49..c321cfba34 100644--- a/config/locales/views/accounts/en.yml+++ b/config/locales/views/accounts/en.yml@@ -56,6 +56,7 @@ en:entry: entryfilter: Filternew: New+ new_activity: New activitynew_balance: New balancenew_transaction: New transactionno_entries: No entries founddiff --git a/test/system/transactions_test.rb b/test/system/transactions_test.rbindex 632f6076ff..efc71b0a5a 100644--- a/test/system/transactions_test.rb+++ b/test/system/transactions_test.rb@@ -189,7 +189,7 @@ class TransactionsTest < ApplicationSystemTestCasevisit account_url(investment_account, tab: "activity")within "[data-testid='activity-menu']" doclick_on "New"- click_on "New transaction"+ click_on "New activity"endselect "Deposit", from: "Type"fill_in "Date", with: transfer_date