Add some more columns (hidden by default) (references https://github.com/grocy/grocy/issues/1058#issuecomment-744059155)

This commit is contained in:
Bernd Bestel
2020-12-19 10:51:07 +01:00
parent eb4a748da3
commit 7ef5bc6f77
9 changed files with 124 additions and 3 deletions

View File

@@ -478,6 +478,7 @@
@endif
<th>{{ $__t('Quantity unit') }}</th>
<th>{{ $__t('Amount') }}</th>
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price') }}</th>
@include('components.userfields_thead', array(
'userfields' => $productBarcodeUserfields
@@ -523,6 +524,9 @@
<span class="locale-number locale-number-quantity-amount">{{ $barcode->amount }}</span>
@endif
</td>
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
<span class="locale-number locale-number-currency">{{ $barcode->last_price }}</span>
</td>
@include('components.userfields_tbody', array(
'userfields' => $productBarcodeUserfields,

View File

@@ -112,6 +112,7 @@
<th>{{ $__t('Default quantity unit purchase') }}</th>
<th>{{ $__t('Quantity unit stock') }}</th>
<th>{{ $__t('Product group') }}</th>
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Default store') }}</th>
@include('components.userfields_thead', array(
'userfields' => $userfields
@@ -167,6 +168,11 @@
<td>
@if(!empty($product->product_group_id)) {{ FindObjectInArrayByPropertyValue($productGroups, 'id', $product->product_group_id)->name }} @endif
</td>
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
@if(!empty($product->shopping_location_id))
{{ FindObjectInArrayByPropertyValue($shoppingLocations, 'id', $product->shopping_location_id)->name }}
@endif
</td>
@include('components.userfields_tbody', array(
'userfields' => $userfields,

View File

@@ -166,6 +166,8 @@
<th class="d-none">Hidden product group</th>
<th>{{ $__t('Calories') }} ({{ $__t('Per stock quantity unit') }})</th>
<th>{{ $__t('Calories') }}</th>
<th>{{ $__t('Last purchased') }}</th>
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price') }}</th>
@include('components.userfields_thead', array(
'userfields' => $userfields
@@ -370,6 +372,14 @@
<td>
<span class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->calories }}</span>
</td>
<td>
{{ $currentStockEntry->last_purchased }}
<time class="timeago timeago-contextual"
datetime="{{ $currentStockEntry->last_purchased }}"></time>
</td>
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
<span class="locale-number locale-number-currency">{{ $currentStockEntry->last_price }}</span>
</td>
@include('components.userfields_tbody', array(
'userfields' => $userfields,