mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-27 17:19:39 +02:00
Fix missing sync_all_button partial (#1172)
* Fix missing sync_all_button partial * Add missing translation * Bring back partial * Unify button text translation * Add test
This commit is contained in:
parent
b9341ac302
commit
277e4476d9
5 changed files with 15 additions and 7 deletions
|
@ -13,11 +13,11 @@
|
||||||
|
|
||||||
<% end %>
|
<% 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 %>
|
<%= 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") %>
|
<%= lucide_icon("plus", class: "w-5 h-5") %>
|
||||||
<p class="text-sm font-medium"><%= t(".new") %></p>
|
<p class="text-sm font-medium"><%= t(".new") %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "sync_all_button" %>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
4
app/views/accounts/_sync_all_button.html.erb
Normal file
4
app/views/accounts/_sync_all_button.html.erb
Normal file
|
@ -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 %>
|
|
@ -18,10 +18,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= button_to sync_all_accounts_path, class: "btn btn--light flex items-center gap-2", title: "Sync All" do %>
|
<%= render "sync_all_button" %>
|
||||||
<%= lucide_icon "refresh-cw", class: "w-5 h-5" %>
|
|
||||||
<span><%= t(".sync_all") %></span>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= link_to new_account_path,
|
<%= link_to new_account_path,
|
||||||
data: { turbo_frame: "modal" },
|
data: { turbo_frame: "modal" },
|
||||||
|
|
|
@ -66,7 +66,6 @@ en:
|
||||||
accounts: Accounts
|
accounts: Accounts
|
||||||
add_institution: Add institution
|
add_institution: Add institution
|
||||||
new_account: New account
|
new_account: New account
|
||||||
sync_all: Sync all
|
|
||||||
institution_accounts:
|
institution_accounts:
|
||||||
add_account_to_institution: Add new account
|
add_account_to_institution: Add new account
|
||||||
confirm_accept: Delete institution
|
confirm_accept: Delete institution
|
||||||
|
@ -110,6 +109,7 @@ en:
|
||||||
summary:
|
summary:
|
||||||
new: New account
|
new: New account
|
||||||
sync_all:
|
sync_all:
|
||||||
|
button_text: Sync all
|
||||||
success: Successfully queued accounts for syncing.
|
success: Successfully queued accounts for syncing.
|
||||||
tooltip:
|
tooltip:
|
||||||
cash: Cash
|
cash: Cash
|
||||||
|
|
|
@ -58,6 +58,13 @@ class AccountsTest < ApplicationSystemTestCase
|
||||||
assert_account_created("OtherLiability")
|
assert_account_created("OtherLiability")
|
||||||
end
|
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
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def open_new_account_modal
|
def open_new_account_modal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue