mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Fix audit log entries and fix #7677
This commit is contained in:
@@ -2595,6 +2595,9 @@ return [
|
||||
'ale_action_log_add' => 'Added :amount to piggy bank ":name"',
|
||||
'ale_action_log_remove' => 'Removed :amount from piggy bank ":name"',
|
||||
'ale_action_clear_budget' => 'Removed from budget',
|
||||
'ale_action_update_group_title' => 'Updated transaction group title',
|
||||
'ale_action_update_date' => 'Updated transaction date',
|
||||
'ale_action_update_order' => 'Updated transaction order',
|
||||
'ale_action_clear_category' => 'Removed from category',
|
||||
'ale_action_clear_notes' => 'Removed notes',
|
||||
'ale_action_clear_tag' => 'Cleared tag',
|
||||
|
||||
@@ -4,13 +4,16 @@
|
||||
<th style="width:20%;" scope="row">
|
||||
{# link to object: #}
|
||||
{% if 'FireflyIII\\Models\\Rule' == logEntry.changer_type %}
|
||||
<a href="{{ route('rules.edit', [logEntry.changer_id] ) }}">
|
||||
{% endif %}
|
||||
{{ logEntry.changer_type|replace({"FireflyIII\\Models\\": ""}) }}
|
||||
#{{ logEntry.changer_id }}
|
||||
<a href="{{ route('rules.edit', [logEntry.changer_id] ) }}">
|
||||
{% endif %}
|
||||
{% if 'FireflyIII\\User' == logEntry.changer_type %}
|
||||
<a href="{{ route('profile.index') }}">
|
||||
{% endif %}
|
||||
{{ logEntry.changer_type|replace({"FireflyIII\\Models\\": ""})|replace({"FireflyIII\\": ""}) }}
|
||||
#{{ logEntry.changer_id }}
|
||||
</a>
|
||||
</th>
|
||||
<td style="width:30%;">
|
||||
<td style="width:30%;" title="{{ logEntry.created_at.isoFormat(dateTimeFormat) }}">
|
||||
{{ trans('firefly.ale_action_'~logEntry.action) }}
|
||||
</td>
|
||||
<td>
|
||||
@@ -18,8 +21,11 @@
|
||||
{% if 'add_tag' == logEntry.action %}
|
||||
<code>{{ logEntry.after }}</code>
|
||||
{% endif %}
|
||||
{% if 'clear_budget' == logEntry.action %}
|
||||
|
||||
{% if 'update_group_title' == logEntry.action %}
|
||||
<code><s>{{ logEntry.before }}</s></code>
|
||||
→
|
||||
<code>{{ logEntry.after }}</code>
|
||||
{% endif %}
|
||||
{% if 'clear_category' == logEntry.action %}
|
||||
<code><s>{{ logEntry.before }}</s></code>
|
||||
@@ -51,6 +57,11 @@
|
||||
{% if 'set_destination' == logEntry.action %}
|
||||
<code>{{ logEntry.after }}</code>
|
||||
{% endif %}
|
||||
{% if 'update_date' == logEntry.action %}
|
||||
<code><s>{{ carbonize(logEntry.before).isoFormat(dateTimeFormat) }}</s></code>
|
||||
→
|
||||
<code>{{ carbonize(logEntry.after).isoFormat(dateTimeFormat) }}</code>
|
||||
{% endif %}
|
||||
{% if 'update_transaction_type' == logEntry.action %}
|
||||
{{ trans('firefly.'~logEntry.before) }} → {{ trans('firefly.'~logEntry.after) }}
|
||||
{% endif %}
|
||||
|
||||
@@ -11,32 +11,42 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'transaction_journal_information'|_ }}</h3>
|
||||
<div class="btn-group btn-group-xs pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ 'actions'|_}} <span class="caret"></span>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
{{ 'actions'|_ }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{# edit + delete #}
|
||||
<li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span
|
||||
class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
|
||||
class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
|
||||
{# convert to different type #}
|
||||
{% if groupArray.transactions[0].type != 'withdrawal' %}
|
||||
<li><a href="{{ route('transactions.convert.index', ['withdrawal', transactionGroup.id]) }}"><span class="fa fa-exchange"></span> {{ 'convert_to_withdrawal'|_ }}</a></li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['withdrawal', transactionGroup.id]) }}"><span
|
||||
class="fa fa-exchange"></span> {{ 'convert_to_withdrawal'|_ }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if groupArray.transactions[0].type != 'deposit' %}
|
||||
<li><a href="{{ route('transactions.convert.index', ['deposit', transactionGroup.id]) }}"><span class="fa fa-exchange"></span> {{ 'convert_to_deposit'|_ }}</a></li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['deposit', transactionGroup.id]) }}"><span
|
||||
class="fa fa-exchange"></span> {{ 'convert_to_deposit'|_ }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if groupArray.transactions[0].type != 'transfer' %}
|
||||
<li><a href="{{ route('transactions.convert.index', ['transfer', transactionGroup.id]) }}"><span class="fa fa-exchange"></span> {{ 'convert_to_transfer'|_ }}</a></li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['transfer', transactionGroup.id]) }}"><span
|
||||
class="fa fa-exchange"></span> {{ 'convert_to_transfer'|_ }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{# clone #}
|
||||
{% if groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'reconciliation' %}
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="#" class="clone-transaction" data-id="{{ transactionGroup.id }}"><span class="fa fa-copy"></span> {{ 'clone'|_ }}</a></li>
|
||||
<li><a href="#" class="clone-transaction" data-id="{{ transactionGroup.id }}"><span
|
||||
class="fa fa-copy"></span> {{ 'clone'|_ }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
@@ -69,6 +79,19 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% if groupLogEntries|length > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
{{ 'audit_log_entries'|_ }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
{% include 'list.ale' with {logEntries: groupLogEntries} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="box box-primary">
|
||||
@@ -183,38 +206,58 @@
|
||||
|
||||
|
||||
<div class="btn-group btn-group-xs pull-right">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ 'actions'|_}} <span class="caret"></span>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
{{ 'actions'|_ }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{# edit + delete #}
|
||||
<li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.edit', [transactionGroup.id]) }}"><span
|
||||
class="fa fa-pencil"></span> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('transactions.delete', [transactionGroup.id]) }}"><span
|
||||
class="fa fa-trash"></span> {{ 'delete'|_ }}</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
|
||||
{# convert to different type #}
|
||||
{% if groupArray.transactions[0].type != 'withdrawal' %}
|
||||
<li><a href="{{ route('transactions.convert.index', ['withdrawal', transactionGroup.id]) }}"><span class="fa fa-exchange"></span> {{ 'convert_to_withdrawal'|_ }}</a></li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['withdrawal', transactionGroup.id]) }}"><span
|
||||
class="fa fa-exchange"></span> {{ 'convert_to_withdrawal'|_ }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if groupArray.transactions[0].type != 'deposit' %}
|
||||
<li><a href="{{ route('transactions.convert.index', ['deposit', transactionGroup.id]) }}"><span class="fa fa-exchange"></span> {{ 'convert_to_deposit'|_ }}</a></li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['deposit', transactionGroup.id]) }}"><span
|
||||
class="fa fa-exchange"></span> {{ 'convert_to_deposit'|_ }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if groupArray.transactions[0].type != 'transfer' %}
|
||||
<li><a href="{{ route('transactions.convert.index', ['transfer', transactionGroup.id]) }}"><span class="fa fa-exchange"></span> {{ 'convert_to_transfer'|_ }}</a></li>
|
||||
<li>
|
||||
<a href="{{ route('transactions.convert.index', ['transfer', transactionGroup.id]) }}"><span
|
||||
class="fa fa-exchange"></span> {{ 'convert_to_transfer'|_ }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{# clone #}
|
||||
{% if groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'reconciliation' %}
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="#" data-id="{{ transactionGroup.id }}" class="clone-transaction"><span class="fa fa-copy"></span> {{ 'clone'|_ }}</a></li>
|
||||
<li><a href="#" data-id="{{ transactionGroup.id }}" class="clone-transaction"><span
|
||||
class="fa fa-copy"></span> {{ 'clone'|_ }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
<li><a href="#" class="link-modal" data-journal="{{ journal.transaction_journal_id }}"><span class="fa fa-fw fa-link"></span>{{ 'link_transaction'|_ }}</a></li>
|
||||
<li><a href="#" class="link-modal"
|
||||
data-journal="{{ journal.transaction_journal_id }}"><span
|
||||
class="fa fa-fw fa-link"></span>{{ 'link_transaction'|_ }}</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{{ route('rules.create-from-journal', [journal.transaction_journal_id]) }}"><span class="fa fa-fw fa-random"></span>{{ 'create_rule_from_transaction'|_ }}</a></li>
|
||||
<li><a href="{{ route('recurring.create-from-journal', [journal.transaction_journal_id]) }}"><span class="fa fa-fw fa-paint-brush"></span>{{ 'create_recurring_from_transaction'|_ }}</a></li>
|
||||
<li>
|
||||
<a href="{{ route('rules.create-from-journal', [journal.transaction_journal_id]) }}"><span
|
||||
class="fa fa-fw fa-random"></span>{{ 'create_rule_from_transaction'|_ }}
|
||||
</a></li>
|
||||
<li>
|
||||
<a href="{{ route('recurring.create-from-journal', [journal.transaction_journal_id]) }}"><span
|
||||
class="fa fa-fw fa-paint-brush"></span>{{ 'create_recurring_from_transaction'|_ }}
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -222,6 +265,7 @@
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
<!-- type is: "{{ first.transactiontype.type }}" -->
|
||||
{% if 'Cash account' == journal.source_type %}
|
||||
<span class="text-success">({{ 'cash'|_ }})</span>
|
||||
@@ -230,8 +274,10 @@
|
||||
title="{{ journal.source_iban|default(journal.source_name) }}">{{ journal.source_name }}</a> →
|
||||
{% endif %}
|
||||
|
||||
{% if first.transactiontype.type == 'Withdrawal' or first.transactiontype.type == 'Deposit' %}
|
||||
{% if first.transactiontype.type == 'Withdrawal' %}
|
||||
{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }}
|
||||
{% elseif first.transactiontype.type == 'Deposit' %}
|
||||
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places) }}
|
||||
{% elseif first.transactiontype.type == 'Transfer' or first.transactiontype.type == 'Opening balance' %}
|
||||
<span class="text-info money-transfer">
|
||||
{{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }}
|
||||
@@ -265,19 +311,25 @@
|
||||
{% if null != journal.category_id %}
|
||||
<tr>
|
||||
<td style="width:30%;">{{ 'category'|_ }}</td>
|
||||
<td><a href="{{ route('categories.show', [journal.category_id]) }}">{{ journal.category_name }}</a></td>
|
||||
<td>
|
||||
<a href="{{ route('categories.show', [journal.category_id]) }}">{{ journal.category_name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if null != journal.budget_id and first.transactiontype.type == 'Withdrawal' %}
|
||||
<tr>
|
||||
<td style="width:40%;">{{ 'budget'|_ }}</td>
|
||||
<td><a href="{{ route('budgets.show', [journal.budget_id]) }}">{{ journal.budget_name }}</a></td>
|
||||
<td>
|
||||
<a href="{{ route('budgets.show', [journal.budget_id]) }}">{{ journal.budget_name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if null != journal.bill_id and first.transactiontype.type == 'Withdrawal' %}
|
||||
<tr>
|
||||
<td style="width:40%;">{{ 'bill'|_ }}</td>
|
||||
<td><a href="{{ route('bills.show', [journal.bill_id]) }}">{{ journal.bill_name }}</a></td>
|
||||
<td>
|
||||
<a href="{{ route('bills.show', [journal.bill_id]) }}">{{ journal.bill_name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<!-- other fields -->
|
||||
@@ -294,7 +346,7 @@
|
||||
<tr>
|
||||
<td>{{ trans('list.'~metaField) }}</td>
|
||||
<td style="width:40%;">
|
||||
{% if 'external_url' == metaField %}
|
||||
{% if 'external_url' == metaField %}
|
||||
{% set url = journalGetMetaField(journal.transaction_journal_id, metaField) %}
|
||||
<a href="{{ url }}" rel="noopener noreferrer nofollow" target="_blank">
|
||||
{% if url|length > 60 %}
|
||||
@@ -304,7 +356,7 @@
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if 'external_url' != metaField %}
|
||||
{% if 'external_url' != metaField %}
|
||||
{{ journalGetMetaField(journal.transaction_journal_id, metaField) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
@@ -317,7 +369,7 @@
|
||||
<td class="markdown">{{ journal.notes|default('')|markdown }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if journalHasMeta(journal.transaction_journal_id, 'recurring_total') and journalHasMeta(journal.transaction_journal_id, 'recurring_count') %}
|
||||
{% if journalHasMeta(journal.transaction_journal_id, 'recurring_total') and journalHasMeta(journal.transaction_journal_id, 'recurring_count') %}
|
||||
{% set recurringTotal = journalGetMetaField(journal.transaction_journal_id, 'recurring_total') %}
|
||||
{% if 0 == recurringTotal %}
|
||||
{% set recurringTotal = '∞' %}
|
||||
@@ -332,7 +384,8 @@
|
||||
<td style="width:40%;">{{ 'tags'|_ }}</td>
|
||||
<td>
|
||||
{% for tag in journal.tags %}
|
||||
<h4 style="display: inline;"><a class="label label-success" href="{{ route('tags.show', tag.id) }}">
|
||||
<h4 style="display: inline;"><a class="label label-success"
|
||||
href="{{ route('tags.show', tag.id) }}">
|
||||
<span class="fa fa-fw fa-tag"></span>{{ tag.tag }}</a>
|
||||
</h4>
|
||||
{% endfor %}
|
||||
@@ -359,17 +412,18 @@
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="#" class="btn btn-default switch-link" data-id="{{ link.id }}"><span
|
||||
class="fa fa-fw fa-arrows-h"></span></a>
|
||||
<a href="{{ route('transactions.link.delete', [link.id]) }}" class="btn btn-danger"><span class="fa fa-trash"></span></a>
|
||||
<a href="{{ route('transactions.link.delete', [link.id]) }}"
|
||||
class="btn btn-danger"><span class="fa fa-trash"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{% if link.editable %}
|
||||
{{ link.link }}
|
||||
{{ link.link }}
|
||||
{% else %}
|
||||
{{ trans('firefly.'~link.link) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
"<a href="{{ route('transactions.show', link.group) }}"
|
||||
title="{{ link.description }}">{{ link.description }}</a>"
|
||||
title="{{ link.description }}">{{ link.description }}</a>"
|
||||
|
||||
({{ link.amount|raw }})
|
||||
{% if '' != link.foreign_amount %}
|
||||
@@ -408,7 +462,8 @@
|
||||
<tr>
|
||||
<td style="width:30%;">{{ event.amount|raw }}</td>
|
||||
<td>
|
||||
<a href="{{ route('piggy-banks.show', [event.piggy_id]) }}">{{ event.piggy }}</a></td>
|
||||
<a href="{{ route('piggy-banks.show', [event.piggy_id]) }}">{{ event.piggy }}</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -417,16 +472,16 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if logEntries[journal.transaction_journal_id]|length > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
{{ 'audit_log_entries'|_ }}
|
||||
</h3>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
{{ 'audit_log_entries'|_ }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
{% include 'list.ale' with {logEntries: logEntries[journal.transaction_journal_id]} %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
{% include 'list.ale' with {logEntries: logEntries[journal.transaction_journal_id]} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -444,6 +499,7 @@
|
||||
|
||||
$('.switch-link').on('click', switchLink);
|
||||
var switchLinkUrl = '{{ route('transactions.link.switch') }}';
|
||||
|
||||
function switchLink(e) {
|
||||
e.preventDefault();
|
||||
var obj = $(e.currentTarget);
|
||||
@@ -461,7 +517,9 @@
|
||||
return false
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/transactions/show.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" src="v1/js/lib/typeahead/typeahead.bundle.min.js?v={{ FF_VERSION }}"
|
||||
nonce="{{ JS_NONCE }}"></script>
|
||||
<script type="text/javascript" src="v1/js/ff/transactions/show.js?v={{ FF_VERSION }}"
|
||||
nonce="{{ JS_NONCE }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user