mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Use producamountpicker "everywhere" (closes #1015)
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<script>
|
||||
Grocy.QuantityUnits = {!! json_encode($quantityUnits) !!};
|
||||
Grocy.QuantityUnitConversionsResolved = {!! json_encode($quantityUnitConversionsResolved) !!};
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 col-xl-4 pb-3">
|
||||
<div class="title-related-links">
|
||||
@@ -51,33 +56,31 @@
|
||||
'nextInputSelector' => '#amount',
|
||||
'disallowAddProductWorkflows' => true
|
||||
))
|
||||
<label for="consume-exact-amount"
|
||||
class="d-none">
|
||||
<input type="checkbox"
|
||||
id="consume-exact-amount"
|
||||
name="exact_amount">
|
||||
{{ $__t('Consume exact amount') }}
|
||||
</label>
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'amount',
|
||||
'label' => 'Amount',
|
||||
'hintId' => 'amount_qu_unit',
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'value' => 0,
|
||||
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
|
||||
|
||||
<div id="consume-exact-amount-group"
|
||||
class="form-group d-none">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="consume-exact-amount"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="consume-exact-amount"
|
||||
name="consume-exact-amount"
|
||||
value="1">
|
||||
<label class="form-check-label custom-control-label"
|
||||
for="consume-exact-amount">{{ $__t('Consume exact amount') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('components.productamountpicker', array(
|
||||
'value' => 1,
|
||||
'additionalHtmlContextHelp' => '<div id="tare-weight-handling-info"
|
||||
class="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>'
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)
|
||||
@php /*@include('components.locationpicker', array(
|
||||
'id' => 'location_id',
|
||||
'locations' => $locations,
|
||||
'isRequired' => true,
|
||||
'label' => 'Location'
|
||||
))*/ @endphp
|
||||
|
||||
<div class="form-group">
|
||||
<label for="location_id">{{ $__t('Location') }}</label>
|
||||
<select required
|
||||
@@ -94,26 +97,44 @@
|
||||
@endif
|
||||
|
||||
<div class="form-group">
|
||||
<label for="use_specific_stock_entry">
|
||||
<input type="checkbox"
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="use_specific_stock_entry"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="use_specific_stock_entry"
|
||||
name="use_specific_stock_entry"> {{ $__t('Use a specific stock item') }}
|
||||
<span class="small text-muted">{{ $__t('The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"') }}</span>
|
||||
</label>
|
||||
name="use_specific_stock_entry"
|
||||
value="1">
|
||||
<label class="form-check-label custom-control-label"
|
||||
for="use_specific_stock_entry">{{ $__t('Use a specific stock item') }}
|
||||
<i class="fas fa-question-circle"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"') }}"></i>
|
||||
</label>
|
||||
</div>
|
||||
<select disabled
|
||||
class="form-control"
|
||||
class="form-control mt-2"
|
||||
id="specific_stock_entry"
|
||||
name="specific_stock_entry">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label for="spoiled">
|
||||
<input type="checkbox"
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="spoiled"
|
||||
value="0">
|
||||
<input class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="spoiled"
|
||||
name="spoiled"> {{ $__t('Spoiled') }}
|
||||
</label>
|
||||
name="spoiled"
|
||||
value="1">
|
||||
<label class="form-check-label custom-control-label"
|
||||
for="spoiled">{{ $__t('Spoiled') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (GROCY_FEATURE_FLAG_RECIPES)
|
||||
|
Reference in New Issue
Block a user