mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Removed unused blocks from the front page. Savings and piggy banks.
This commit is contained in:
parent
a8a014189d
commit
b082858866
@ -142,14 +142,6 @@ class HomeController extends Controller
|
||||
$end = session('end', Carbon::now()->endOfMonth());
|
||||
$showTour = Preferences::get('tour', true)->data;
|
||||
$accounts = $crud->getAccountsById($frontPage->data);
|
||||
$savings = $repository->getSavingsAccounts($start, $end);
|
||||
$piggyBankAccounts = $repository->getPiggyBankAccounts($start, $end);
|
||||
|
||||
|
||||
$savingsTotal = '0';
|
||||
foreach ($savings as $savingAccount) {
|
||||
$savingsTotal = bcadd($savingsTotal, Steam::balance($savingAccount, $end));
|
||||
}
|
||||
|
||||
foreach ($accounts as $account) {
|
||||
$set = $repository->journalsInPeriod(new Collection([$account]), [], $start, $end);
|
||||
@ -161,7 +153,7 @@ class HomeController extends Controller
|
||||
}
|
||||
|
||||
return view(
|
||||
'index', compact('count', 'showTour', 'title', 'savings', 'subTitle', 'mainTitleIcon', 'transactions', 'savingsTotal', 'piggyBankAccounts')
|
||||
'index', compact('count', 'showTour', 'title','subTitle', 'mainTitleIcon', 'transactions')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -103,117 +103,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-sm-12 col-md-12">
|
||||
<!-- SAVINGS -->
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'savings'|_ }}</h3>
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% if savings|length == 0 %}
|
||||
<p class="small"><em>{{ 'markAsSavingsToContinue'|_ }}</em></p>
|
||||
{% else %}
|
||||
{% for account in savings %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"><h5><a
|
||||
href="{{ route('accounts.show', account.id) }}">{{ account.name }}</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- start -->
|
||||
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{{ account.startBalance|formatAmount }}</div>
|
||||
<!-- bar -->
|
||||
<div class="col-lg-8 col-md-8 col-sm-6 col-xs-4">
|
||||
{% if account.difference < 0 %}
|
||||
<!-- green (100-pct), then red (pct) -->
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" style="width: {{ 100 - account.percentage }}%">
|
||||
{% if account.percentage >= 20 %}
|
||||
{{ account.difference|formatAmountPlain }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-danger" style="width: {{ account.percentage }}%">
|
||||
{% if account.percentage < 20 %}
|
||||
{{ account.difference|formatAmountPlain }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<!-- green (pct), then blue (100-pct) -->
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" style="width: {{ account.percentage }}%">
|
||||
{% if account.percentage >= 20 %}
|
||||
{{ account.difference|formatAmountPlain }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-info" style="width: {{ 100 - account.percentage }}%">
|
||||
{% if account.percentage < 20 %}
|
||||
{{ account.difference|formatAmountPlain }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<!-- end -->
|
||||
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{{ account.endBalance|formatAmount }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="box-footer clearfix">
|
||||
<span class="pull-right">{{ 'sum'|_ }}: {{ savingsTotal|formatAmount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-sm-12 col-md-12">
|
||||
<!-- PIGGY BANKS -->
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'piggyBanks'|_ }}</h3>
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% if piggyBankAccounts|length == 0 %}
|
||||
<p class="small"><em>{{ 'createPiggyToContinue'|_ }}</em></p>
|
||||
{% else %}
|
||||
{% for account in piggyBankAccounts %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"><h5><a
|
||||
href="{{ route('accounts.show', account.id) }}">{{ account.name }}</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- start -->
|
||||
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{{ account.startBalance|formatAmount }}</div>
|
||||
<!-- bar -->
|
||||
<div class="col-lg-8 col-md-8 col-sm-6 col-xs-4">
|
||||
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-info progress-bar" style="width: {{ 100 - account.percentage }}%">
|
||||
{% if account.percentage >= 20 %}
|
||||
{{ account.piggyBalance|formatAmountPlain }} {{ 'divided'|_ }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-success progress-bar" style="width: {{ account.percentage }}%">
|
||||
{% if account.percentage < 20 %}
|
||||
{{ account.difference|formatAmountPlain }} {{ 'toDivide'|_ }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end -->
|
||||
<div class="col-lg-2 col-md-2 col-sm-3 col-xs-4">{{ account.piggyBalance|formatAmount }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
|
Loading…
Reference in New Issue
Block a user