mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 01:34:34 +02:00
Add the data after the change to a element edited log entry, so you can easily view the changes in log detail pages
This commit is contained in:
parent
3c724a227a
commit
923e40ed8f
14 changed files with 136 additions and 22 deletions
|
@ -22,12 +22,19 @@
|
|||
{% endif %}
|
||||
|
||||
{# For log entries, where we know the old data, this is the last exectuted assignment #}
|
||||
{% if attribute(entry, 'oldDataInformations') is defined and entry.oldDataInformations %}
|
||||
{% if attribute(entry, 'oldDataInformation') is defined and entry.oldDataInformation %}
|
||||
{# We have to use the keys of oldData here, as changedFields might not be available #}
|
||||
{% set fields = entry.oldData | keys %}
|
||||
{% set old_data = entry.oldData %}
|
||||
{% endif %}
|
||||
|
||||
{# For log entries, where we have new data, we define it #}
|
||||
{% if attribute(entry, 'newDataInformation') is defined and entry.newDataInformation %}
|
||||
{# We have to use the keys of oldData here, as changedFields might not be available #}
|
||||
{% set fields = entry.newData | keys %}
|
||||
{% set new_data = entry.newData %}
|
||||
{% endif %}
|
||||
|
||||
{% if fields is not empty %}
|
||||
<table class="table table-hover table-striped table-sm table-bordered mt-2">
|
||||
<thead>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue