Optimizations regarding displaying prices (closes #1743)

This commit is contained in:
Bernd Bestel
2022-04-02 17:49:35 +02:00
parent 7ad979cba9
commit 6a50f74a14
8 changed files with 215 additions and 71 deletions

View File

@@ -49,15 +49,32 @@
class="pl-2 text-secondary d-none"><i class="fas fa-custom-sigma-sign"></i> <span id="productcard-product-stock-amount-aggregated"
class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-qu-name-aggregated"></span> <span id="productcard-product-stock-opened-amount-aggregated locale-number locale-number-quantity-amount"
class="small font-italic"></span></span><br>
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)<strong>{{ $__t('Stock value') }}:</strong> <span id="productcard-product-stock-value"
class="locale-number locale-number-currency"></span><br>@endif
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
<strong>{{ $__t('Stock value') }}:</strong> <span id="productcard-product-stock-value"
class="locale-number locale-number-currency"></span><br>
@endif
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)<strong>{{ $__t('Default location') }}:</strong> <span id="productcard-product-location"></span><br>@endif
<strong>{{ $__t('Last purchased') }}:</strong> <span id="productcard-product-last-purchased"></span> <time id="productcard-product-last-purchased-timeago"
class="timeago timeago-contextual"></time><br>
<strong>{{ $__t('Last used') }}:</strong> <span id="productcard-product-last-used"></span> <time id="productcard-product-last-used-timeago"
class="timeago timeago-contextual"></time><br>
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)<strong>{{ $__t('Last price') }}:</strong> <span id="productcard-product-last-price"></span><br>@endif
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)<strong>{{ $__t('Average price') }}:</strong> <span id="productcard-product-average-price"></span><br>@endif
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)<strong>
{{ $__t('Last price') }}:</strong> <span id="productcard-product-last-price"
data-toggle="tooltip"
data-trigger="hover click"></span>
<br>
@endif
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
<strong>{{ $__t('Average price') }}:</strong> <span id="productcard-product-average-price"
data-toggle="tooltip"
data-trigger="hover click"></span>
<br>
@endif
@if(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)<strong>{{ $__t('Average shelf life') }}:</strong> <span id="productcard-product-average-shelf-life"></span><br>@endif
<strong>{{ $__t('Spoil rate') }}:</strong> <span id="productcard-product-spoil-rate"></span>