mirror of
https://github.com/grocy/grocy.git
synced 2025-08-29 09:16:31 +00:00
Fixed various smaller problems after some testing
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
@php if(!isset($label)) { $label = 'Product'; } @endphp
|
||||
@php if(!isset($disabled)) { $disabled = false; } @endphp
|
||||
@php if(empty($hint)) { $hint = ''; } @endphp
|
||||
@php if(empty($nextInputSelector)) { $nextInputSelector = ''; } @endphp
|
||||
|
||||
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-disallow-add-product-workflows="{{ BoolToString($disallowAddProductWorkflows) }}" data-disallow-all-product-workflows="{{ BoolToString($disallowAllProductWorkflows) }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="product_id">{{ $__t($label) }} <i class="fas fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted d-none"> {{ $__t('Barcode lookup is disabled') }}</span> <span class="small text-muted">{{ $hint }}</span></label>
|
||||
|
@@ -6,6 +6,8 @@
|
||||
@php if(empty($prefillById)) { $prefillById = ''; } @endphp
|
||||
@php if(!isset($isRequired)) { $isRequired = true; } @endphp
|
||||
@php if(empty($hint)) { $hint = ''; } @endphp
|
||||
@php if(empty($hintId)) { $hintId = ''; } @endphp
|
||||
@php if(empty($nextInputSelector)) { $nextInputSelector = ''; } @endphp
|
||||
|
||||
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="recipe_id">{{ $__t('Recipe') }} <span id="{{ $hintId }}" class="small text-muted">{{ $hint }}</span></label>
|
||||
|
@@ -203,7 +203,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php if($mode == 'edit') { $value = $product->calories; } else { $value = ''; } @endphp
|
||||
@php if($mode == 'edit') { $value = $product->calories; } else { $value = 0; } @endphp
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'calories',
|
||||
'label' => 'Energy (kcal)',
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
<script>
|
||||
Grocy.EditMode = '{{ $mode }}';
|
||||
Grocy.QuantityUnits = {!! json_encode($quantityUnits) !!};
|
||||
Grocy.QuantityUnits = {!! json_encode($quantityunits) !!};
|
||||
Grocy.QuantityUnitConversionsResolved = {!! json_encode($quantityUnitConversionsResolved) !!};
|
||||
</script>
|
||||
|
||||
|
@@ -161,12 +161,14 @@
|
||||
'additionalAttributes' => 'data-recipe-id="' . $selectedRecipe->id . '"'
|
||||
))
|
||||
</div>
|
||||
@if(!empty($selectedRecipeTotalCalories) && intval($selectedRecipeTotalCalories) > 0)
|
||||
<div class="col-2">
|
||||
<label>{{ $__t('Energy (kcal)') }}</label>
|
||||
<p class="mb-0">
|
||||
<h3 class="locale-number-format pt-0" data-format="generic">{{ $selectedRecipeTotalCalories }}</h3>
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
<div class="col-6">
|
||||
<label>{{ $__t('Costs') }}
|
||||
|
@@ -162,9 +162,11 @@
|
||||
data-consume-amount="1">
|
||||
<i class="fas fa-utensils"></i> {{ $__t('Consume %1$s of %2$s as spoiled', '1 ' . FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name) }}
|
||||
</a>
|
||||
@if(GROCY_FEATURE_FLAG_RECIPES)
|
||||
<a class="dropdown-item" type="button" href="{{ $U('/recipes?search=') }}{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }}">
|
||||
<i class="fas fa-cocktail"></i> {{ $__t('Search for recipes containing this product') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
Reference in New Issue
Block a user