Skip to content
Snippets Groups Projects
Commit b68b5ff5 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#749 - account select: show balance for every account

parent cb38bdc4
No related branches found
No related tags found
No related merge requests found
Pipeline #7711 failed
...@@ -375,9 +375,18 @@ input[type="radio"]:checked + span::after, [type="radio"].with-gap:checked + spa ...@@ -375,9 +375,18 @@ input[type="radio"]:checked + span::after, [type="radio"].with-gap:checked + spa
border: 3px solid var(--color-grey); border: 3px solid var(--color-grey);
} }
.global-account-select-option-column-2 {
display: flex;
flex-direction: column;
margin-left: 2rem;
}
.global-account-select-option-name { .global-account-select-option-name {
font-size: 1.4rem; font-size: 1.4rem;
margin-left: 2rem; }
.global-account-select-option-balance {
font-size: 1.4rem;
} }
.global-account-select-option-content { .global-account-select-option-content {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<#import "helpers/header.ftl" as header> <#import "helpers/header.ftl" as header>
<#import "helpers/customSelectMacros.ftl" as customSelectMacros> <#import "helpers/customSelectMacros.ftl" as customSelectMacros>
<@header.globals/>
<div id="modalGlobalAccountSelect" class="modal modal-fixed-footer background-color-light"> <div id="modalGlobalAccountSelect" class="modal modal-fixed-footer background-color-light">
<div class="modal-content"> <div class="modal-content">
...@@ -39,7 +40,15 @@ ...@@ -39,7 +40,15 @@
</#if> </#if>
<div class="global-account-select-option-content"> <div class="global-account-select-option-content">
<@customSelectMacros.accountIcon account accountName "category-circle-preview account-icon-big"/> <@customSelectMacros.accountIcon account accountName "category-circle-preview account-icon-big"/>
<div class="global-account-select-option-column-2">
<div class="global-account-select-option-name truncate">${accountName}</div> <div class="global-account-select-option-name truncate">${accountName}</div>
<#assign accountBudget = helpers.getAccountBudgetByID(account.getID())/>
<#if accountBudget <= 0>
<div class="global-account-select-option-balance ${redTextColor}">${currencyService.getCurrencyString(accountBudget)}</div>
<#else>
<div class="global-account-select-option-balance ${greenTextColor}">${currencyService.getCurrencyString(accountBudget)}</div>
</#if>
</div>
</div> </div>
</div> </div>
</a> </a>
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<div class="truncate global-account-select-name text-default">${accountName}</div> <div class="truncate global-account-select-name text-default">${accountName}</div>
<div> <div>
<#assign accountBudget = helpers.getAccountBudget()/> <#assign accountBudget = helpers.getCurrentAccountBudget()/>
<#if accountBudget <= 0> <#if accountBudget <= 0>
<div class="global-account-select-budget ${redTextColor}">${currencyService.getCurrencyString(accountBudget)}</div> <div class="global-account-select-budget ${redTextColor}">${currencyService.getCurrencyString(accountBudget)}</div>
<#else> <#else>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment