mirror of
https://github.com/we-promise/sure.git
synced 2026-04-11 08:14:49 +00:00
* Add tax treatment support for accounts, investments, and cryptos * Replace hardcoded region labels with I18n translations * Add I18n support for subtype labels with fallback to hardcoded values * fixed schema --------- Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
<%# locals: (account:, title:, subtitle: nil) %>
|
|
|
|
<header class="space-y-4">
|
|
<div class="flex items-center gap-4">
|
|
<div class="flex items-center gap-3 overflow-hidden">
|
|
<%= render "accounts/logo", account: account %>
|
|
|
|
<div class="flex items-center gap-2">
|
|
<div class="truncate">
|
|
<div class="flex items-center gap-3">
|
|
<h2 class="font-medium text-xl truncate <%= "animate-pulse" if account.syncing? %>"><%= title %></h2>
|
|
<% if account.tax_treatment.present? %>
|
|
<%= render partial: "accounts/tax_treatment_badge", locals: { account: account } %>
|
|
<% end %>
|
|
<% if account.draft? %>
|
|
<%= render DS::Link.new(
|
|
text: "Complete setup",
|
|
href: edit_account_path(account),
|
|
variant: :outline,
|
|
size: :sm,
|
|
frame: :modal
|
|
) %>
|
|
<% end %>
|
|
</div>
|
|
<% if subtitle.present? %>
|
|
<p class="text-sm text-secondary"><%= subtitle %></p>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-1 ml-auto">
|
|
<% if Rails.env.development? || self_hosted? %>
|
|
<%= icon(
|
|
"refresh-cw",
|
|
as_button: true,
|
|
size: "sm",
|
|
href: sync_path_for(account),
|
|
disabled: account.syncing?,
|
|
frame: :_top
|
|
) %>
|
|
<% end %>
|
|
|
|
<%= render "accounts/show/menu", account: account %>
|
|
</div>
|
|
</div>
|
|
</header>
|