mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Add hint when barcode lookup is disabled
This commit is contained in:
5
grocy.js
5
grocy.js
@@ -95,3 +95,8 @@ Grocy.GetUriParam = function(key)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Grocy.Wait = function(ms)
|
||||||
|
{
|
||||||
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
|
}
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
toastr.success('Stock amount of ' + productDetails.product.name + ' is now ' + jsonForm.new_amount.toString() + ' ' + productDetails.quantity_unit_stock.name);
|
toastr.success('Stock amount of ' + productDetails.product.name + ' is now ' + jsonForm.new_amount.toString() + ' ' + productDetails.quantity_unit_stock.name);
|
||||||
|
Grocy.Wait(1000);
|
||||||
|
|
||||||
if (addBarcode !== undefined)
|
if (addBarcode !== undefined)
|
||||||
{
|
{
|
||||||
@@ -241,6 +242,7 @@ $(function()
|
|||||||
{
|
{
|
||||||
$('#addbarcodetoselection').text(addBarcode);
|
$('#addbarcodetoselection').text(addBarcode);
|
||||||
$('#flow-info-addbarcodetoselection').removeClass('hide');
|
$('#flow-info-addbarcodetoselection').removeClass('hide');
|
||||||
|
$('#barcode-lookup-disabled-hint').removeClass('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<form id="inventory-form">
|
<form id="inventory-form">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="product_id">Product <i class="fa fa-barcode"></i></label>
|
<label for="product_id">Product <i class="fa fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted hide"> Barcode lookup is disabled</span></label>
|
||||||
<select class="form-control combobox" id="product_id" name="product_id" required>
|
<select class="form-control combobox" id="product_id" name="product_id" required>
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<?php foreach ($products as $product) : ?>
|
<?php foreach ($products as $product) : ?>
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
toastr.success('Added ' + amount + ' ' + productDetails.quantity_unit_stock.name + ' of ' + productDetails.product.name + ' to stock');
|
toastr.success('Added ' + amount + ' ' + productDetails.quantity_unit_stock.name + ' of ' + productDetails.product.name + ' to stock');
|
||||||
|
Grocy.Wait(1000);
|
||||||
|
|
||||||
if (addBarcode !== undefined)
|
if (addBarcode !== undefined)
|
||||||
{
|
{
|
||||||
@@ -239,6 +240,7 @@ $(function()
|
|||||||
{
|
{
|
||||||
$('#addbarcodetoselection').text(addBarcode);
|
$('#addbarcodetoselection').text(addBarcode);
|
||||||
$('#flow-info-addbarcodetoselection').removeClass('hide');
|
$('#flow-info-addbarcodetoselection').removeClass('hide');
|
||||||
|
$('#barcode-lookup-disabled-hint').removeClass('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<form id="purchase-form">
|
<form id="purchase-form">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="product_id">Product <i class="fa fa-barcode"></i></label>
|
<label for="product_id">Product <i class="fa fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted hide"> Barcode lookup is disabled</span></label>
|
||||||
<select class="form-control combobox" id="product_id" name="product_id" required>
|
<select class="form-control combobox" id="product_id" name="product_id" required>
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<?php foreach ($products as $product) : ?>
|
<?php foreach ($products as $product) : ?>
|
||||||
|
Reference in New Issue
Block a user