This commit is contained in:
James Cole
2025-06-04 15:40:29 +02:00
parent d0c658e79a
commit 51e58f8d88
7 changed files with 51 additions and 3 deletions

View File

@@ -2486,6 +2486,10 @@ return [
'left_for_piggy_banks' => 'Left for piggy banks',
'sum_of_piggy_banks' => 'Sum of piggy banks',
'saved_so_far' => 'Saved so far',
'saved_so_far_total' => 'Saved so far in total',
'reset_history' => 'reset history',
'reset_history_confirm' => 'Are you sure you want to reset the history of this piggy bank? This will make the chart match the piggy bank\'s amount again.',
'piggy_history_reset' => 'The piggy bank history has been reset',
'left_to_save' => 'Left to save',
'suggested_amount' => 'Suggested monthly amount to save',
'add_money_to_piggy_title' => 'Add money to piggy bank ":name"',

View File

@@ -54,8 +54,20 @@
</td>
</tr>
{% endif %}
{% for account in piggy.accounts %}
<tr>
<td>
{{ 'saved_so_far'|_ }}
(<a href="{{ route('accounts.show', account.id) }}">{{ account.name }}</a>)
</td>
<td>
{{ formatAmountBySymbol(account.current_amount, piggy.currency_symbol, piggy.currency_decimal_places) }}
</td>
</tr>
{% endfor %}
<tr>
<td>{{ 'saved_so_far'|_ }}</td>
<td>{{ 'saved_so_far_total'|_ }}</td>
<td>
{{ formatAmountBySymbol(piggy.current_amount, piggy.currency_symbol, piggy.currency_decimal_places) }}
</td>
@@ -102,7 +114,7 @@
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'event_history'|_ }}</h3>
<h3 class="box-title">{{ 'event_history'|_ }} (<a onclick="return confirm('{{ 'reset_history_confirm'|_|escape('js') }}');" class="reset-link" href="#">{{ 'reset_history'|_ }}</a>)</h3>
</div>
<div class="box-body no-padding" id="piggyEvents">
{% include 'list/piggy-bank-events' %}
@@ -140,6 +152,9 @@
</div>
{% endif %}
</div>
<form id="reset-form" action="{{ route('piggy-banks.reset', [piggyBank.id]) }}" method="POST" style="display: none;">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
</form>
{% endblock %}
{% block scripts %}