mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2024-12-26 09:59:18 +01:00
invert cards
This commit is contained in:
parent
c54a4006ce
commit
73b2bbfe3f
1 changed files with 42 additions and 42 deletions
|
@ -16,48 +16,6 @@
|
|||
</div>
|
||||
</md-toolbar>
|
||||
<md-content flex="100" layout="column" layout-gt-md="row">
|
||||
<md-card flex="48" layout="column">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 11%">Account</th>
|
||||
<th style="width: 3%">Spent</th>
|
||||
<th style="width: 3%">Budgeted</th>
|
||||
<th style="width: 3%">Percentage</th>
|
||||
<th>Progress</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr data-ng-repeat="account in budget"
|
||||
data-ng-class="{'even': $even, 'odd': $odd}">
|
||||
<td>
|
||||
{{account.account}}
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
{{account.amount | number:2}}{{account.currency}}
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
<span data-ng-if="account.percentage >= 0">{{account.budget | number:2}}{{account.currency}}</span>
|
||||
<span data-ng-if="account.percentage < 0">
|
||||
{{balance.buckets[1].raw_total - total_budget | number:2}}{{account.currency}}
|
||||
</span>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
<span data-ng-if="account.percentage >= 0">{{account.percentage | number:2}}%</span>
|
||||
<span data-ng-if="account.percentage < 0">
|
||||
{{( account.amount / ( balance.buckets[1].raw_total - total_budget ) ) * 100 | number:2}}%
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<md-progress-linear
|
||||
ng-class="{'md-warn': account.percentage > 100, 'md-warn md-hue-3': account.account == '(unbudgeted)' }"
|
||||
md-mode="determinate"
|
||||
value="{{account.percentage}}"></md-progress-linear>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</md-card>
|
||||
<md-card flex="48" layout="column"
|
||||
data-ng-repeat="bucket in balance.buckets">
|
||||
<md-toolbar>
|
||||
|
@ -121,4 +79,46 @@
|
|||
</md-card>
|
||||
</md-content>
|
||||
</md-card>
|
||||
<md-card flex="48" layout="column">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 11%">Account</th>
|
||||
<th style="width: 3%">Spent</th>
|
||||
<th style="width: 3%">Budgeted</th>
|
||||
<th style="width: 3%">Percentage</th>
|
||||
<th>Progress</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr data-ng-repeat="account in budget"
|
||||
data-ng-class="{'even': $even, 'odd': $odd}">
|
||||
<td>
|
||||
{{account.account}}
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
{{account.amount | number:2}}{{account.currency}}
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
<span data-ng-if="account.percentage >= 0">{{account.budget | number:2}}{{account.currency}}</span>
|
||||
<span data-ng-if="account.percentage < 0">
|
||||
{{balance.buckets[1].raw_total - total_budget | number:2}}{{account.currency}}
|
||||
</span>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
<span data-ng-if="account.percentage >= 0">{{account.percentage | number:2}}%</span>
|
||||
<span data-ng-if="account.percentage < 0">
|
||||
{{( account.amount / ( balance.buckets[1].raw_total - total_budget ) ) * 100 | number:2}}%
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<md-progress-linear
|
||||
ng-class="{'md-warn': account.percentage > 100, 'md-warn md-hue-3': account.account == '(unbudgeted)' }"
|
||||
md-mode="determinate"
|
||||
value="{{account.percentage}}"></md-progress-linear>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</md-card>
|
||||
</md-content>
|
||||
|
|
Loading…
Reference in a new issue