Show row_created_timestamp on the stock entries page (closes #1063)

This commit is contained in:
Bernd Bestel 2021-07-12 18:25:07 +02:00
parent cdf6ac78e2
commit cf8604e984
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 11 additions and 1 deletions

View File

@ -2169,3 +2169,6 @@ msgstr ""
msgid "In-stock products"
msgstr ""
msgid "Timestamp"
msgstr ""

View File

@ -2,7 +2,8 @@
'order': [[2, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
{ 'searchable': false, "targets": 0 },
{ 'visible': false, 'targets': 10 },
].concat($.fn.dataTable.defaults.columnDefs)
});
$('#stockentries-table tbody').removeClass("d-none");

View File

@ -71,6 +71,7 @@
<th class="@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Price') }}</th>
<th data-shadow-rowgroup-column="9">{{ $__t('Purchased date') }}</th>
<th class="d-none">Hidden purchased_date</th>
<th>{{ $__t('Timestamp') }}</th>
@include('components.userfields_thead', array(
'userfields' => $userfields
@ -265,6 +266,11 @@
datetime="{{ $stockEntry->purchased_date }} 23:59:59"></time>
</td>
<td class="d-none">{{ $stockEntry->purchased_date }}</td>
<td>
<span>{{ $stockEntry->row_created_timestamp }}</span>
<time class="timeago timeago-contextual"
datetime="{{ $stockEntry->row_created_timestamp }}"></time>
</td>
@include('components.userfields_tbody', array(
'userfields' => $userfields,