mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +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>
18 lines
622 B
Plaintext
18 lines
622 B
Plaintext
<%# locals: (account:) %>
|
|
<%
|
|
treatment = account.tax_treatment
|
|
badge_classes = case treatment
|
|
when :tax_exempt
|
|
"bg-green-500/10 text-green-600 theme-dark:text-green-400"
|
|
when :tax_deferred
|
|
"bg-blue-500/10 text-blue-600 theme-dark:text-blue-400"
|
|
when :tax_advantaged
|
|
"bg-purple-500/10 text-purple-600 theme-dark:text-purple-400"
|
|
else
|
|
"bg-gray-500/10 text-secondary"
|
|
end
|
|
%>
|
|
<span class="inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium <%= badge_classes %>" title="<%= t("accounts.tax_treatment_descriptions.#{treatment}") %>">
|
|
<%= account.tax_treatment_label %>
|
|
</span>
|