mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Implemented stock sub-feature-flags (closes #314)
This commit is contained in:
@@ -28,6 +28,13 @@
|
||||
'additionalHtmlContextHelp' => '<div id="tare-weight-handling-info" class="text-small text-info font-italic d-none">' . $__t('Tare weight handling enabled - please weigh the whole container, the amount to be posted will be automatically calculcated') . '</div>'
|
||||
))
|
||||
|
||||
@php
|
||||
$additionalGroupCssClasses = '';
|
||||
if (!GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||
{
|
||||
$additionalGroupCssClasses = 'd-none';
|
||||
}
|
||||
@endphp
|
||||
@include('components.datetimepicker', array(
|
||||
'id' => 'best_before_date',
|
||||
'label' => 'Best before',
|
||||
@@ -42,9 +49,12 @@
|
||||
'shortcutValue' => '2999-12-31',
|
||||
'shortcutLabel' => 'Never expires',
|
||||
'earlierThanInfoLimit' => date('Y-m-d'),
|
||||
'earlierThanInfoText' => $__t('The given date is earlier than today, are you sure?')
|
||||
'earlierThanInfoText' => $__t('The given date is earlier than today, are you sure?'),
|
||||
'additionalGroupCssClasses' => $additionalGroupCssClasses
|
||||
))
|
||||
@php $additionalGroupCssClasses = ''; @endphp
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'price',
|
||||
'label' => 'Price',
|
||||
@@ -56,11 +66,18 @@
|
||||
'invalidFeedback' => $__t('The price cannot be lower than %s', '0'),
|
||||
'isRequired' => false
|
||||
))
|
||||
@else
|
||||
<input type="hidden" name="price" id="price" value="0">
|
||||
@endif
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)
|
||||
@include('components.locationpicker', array(
|
||||
'locations' => $locations,
|
||||
'hint' => $__t('This will apply to added products')
|
||||
))
|
||||
@else
|
||||
<input type="hidden" name="location_id" id="location_id" value="1">
|
||||
@endif
|
||||
|
||||
<button id="save-inventory-button" class="btn btn-success">{{ $__t('OK') }}</button>
|
||||
|
||||
|
Reference in New Issue
Block a user