The personal finance app for everyone
Fix missing sync_all_button partial (#1172)
Tony Vincent277e4476d99a
diff --git a/app/views/accounts/_header.html.erb b/app/views/accounts/_header.html.erbindex dcf2c914..3e43e29a 100644--- a/app/views/accounts/_header.html.erb+++ b/app/views/accounts/_header.html.erb@@ -13,11 +13,11 @@<% end %>+ <%= render "sync_all_button" %>+<%= link_to new_account_path, class: "rounded-lg bg-gray-900 text-white flex items-center gap-1 justify-center hover:bg-gray-700 px-3 py-2", data: { turbo_frame: :modal } do %><%= lucide_icon("plus", class: "w-5 h-5") %><p class="text-sm font-medium"><%= t(".new") %></p><% end %>-- <%= render "sync_all_button" %></div></header>diff --git a/app/views/accounts/_sync_all_button.html.erb b/app/views/accounts/_sync_all_button.html.erbnew file mode 100644index 00000000..9b5f7213--- /dev/null+++ b/app/views/accounts/_sync_all_button.html.erb@@ -0,0 +1,4 @@+<%= button_to sync_all_accounts_path, class: "btn btn--light flex items-center gap-2", title: "Sync All" do %>+ <%= lucide_icon "refresh-cw", class: "w-5 h-5" %>+ <span><%= t("accounts.sync_all.button_text") %></span>+<% end %>diff --git a/app/views/accounts/index.html.erb b/app/views/accounts/index.html.erbindex 055db9be..adf33f50 100644--- a/app/views/accounts/index.html.erb+++ b/app/views/accounts/index.html.erb@@ -18,10 +18,7 @@</div><% end %>- <%= button_to sync_all_accounts_path, class: "btn btn--light flex items-center gap-2", title: "Sync All" do %>- <%= lucide_icon "refresh-cw", class: "w-5 h-5" %>- <span><%= t(".sync_all") %></span>- <% end %>+ <%= render "sync_all_button" %><%= link_to new_account_path,data: { turbo_frame: "modal" },diff --git a/config/locales/views/accounts/en.yml b/config/locales/views/accounts/en.ymlindex f75cac51..832bcce3 100644--- a/config/locales/views/accounts/en.yml+++ b/config/locales/views/accounts/en.yml@@ -66,7 +66,6 @@ en:accounts: Accountsadd_institution: Add institutionnew_account: New account- sync_all: Sync allinstitution_accounts:add_account_to_institution: Add new accountconfirm_accept: Delete institution@@ -110,6 +109,7 @@ en:summary:new: New accountsync_all:+ button_text: Sync allsuccess: Successfully queued accounts for syncing.tooltip:cash: Cashdiff --git a/test/system/accounts_test.rb b/test/system/accounts_test.rbindex 57f4268e..2ccb9081 100644--- a/test/system/accounts_test.rb+++ b/test/system/accounts_test.rb@@ -58,6 +58,13 @@ class AccountsTest < ApplicationSystemTestCaseassert_account_created("OtherLiability")end+ test "can sync all acounts on accounts page and account summary page" do+ visit accounts_url+ assert_button "Sync all"+ visit summary_accounts_url+ assert_button "Sync all"+ end+privatedef open_new_account_modal