mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Added a note field to product barcodes (closes #962)
This commit is contained in:
parent
5421dfb6b2
commit
3ad5f2cac5
@ -4372,7 +4372,10 @@
|
|||||||
"last_price": {
|
"last_price": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "float"
|
"format": "float"
|
||||||
}
|
},
|
||||||
|
"note": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ExternalBarcodeLookupResponse": {
|
"ExternalBarcodeLookupResponse": {
|
||||||
|
2
migrations/0123.sql
Normal file
2
migrations/0123.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE product_barcodes
|
||||||
|
ADD note TEXT;
|
@ -288,7 +288,8 @@ var barcodeTable = $('#barcode-table').DataTable({
|
|||||||
'columnDefs': [
|
'columnDefs': [
|
||||||
{ 'orderable': false, 'targets': 0 },
|
{ 'orderable': false, 'targets': 0 },
|
||||||
{ 'searchable': false, "targets": 0 },
|
{ 'searchable': false, "targets": 0 },
|
||||||
{ 'visible': false, 'targets': 5 }
|
{ 'visible': false, 'targets': 5 },
|
||||||
|
{ 'visible': false, 'targets': 6 }
|
||||||
].concat($.fn.dataTable.defaults.columnDefs)
|
].concat($.fn.dataTable.defaults.columnDefs)
|
||||||
});
|
});
|
||||||
$('#barcode-table tbody').removeClass("d-none");
|
$('#barcode-table tbody').removeClass("d-none");
|
||||||
|
@ -90,6 +90,15 @@
|
|||||||
value="1">
|
value="1">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="note">{{ $__t('Note') }}</label>
|
||||||
|
<input type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="note"
|
||||||
|
name="note"
|
||||||
|
value="@if($mode == 'edit'){{ $barcode->note }}@endif">
|
||||||
|
</div>
|
||||||
|
|
||||||
@include('components.userfieldsform', array(
|
@include('components.userfieldsform', array(
|
||||||
'userfields' => $userfields,
|
'userfields' => $userfields,
|
||||||
'entity' => 'product_barcodes'
|
'entity' => 'product_barcodes'
|
||||||
|
@ -470,6 +470,7 @@
|
|||||||
<th>{{ $__t('Quantity unit') }}</th>
|
<th>{{ $__t('Quantity unit') }}</th>
|
||||||
<th>{{ $__t('Amount') }}</th>
|
<th>{{ $__t('Amount') }}</th>
|
||||||
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price') }}</th>
|
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price') }}</th>
|
||||||
|
<th>{{ $__t('Note') }}</th>
|
||||||
|
|
||||||
@include('components.userfields_thead', array(
|
@include('components.userfields_thead', array(
|
||||||
'userfields' => $productBarcodeUserfields
|
'userfields' => $productBarcodeUserfields
|
||||||
@ -518,6 +519,9 @@
|
|||||||
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
|
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
|
||||||
<span class="locale-number locale-number-currency">{{ $barcode->last_price }}</span>
|
<span class="locale-number locale-number-currency">{{ $barcode->last_price }}</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ $barcode->note }}
|
||||||
|
</td>
|
||||||
|
|
||||||
@include('components.userfields_tbody', array(
|
@include('components.userfields_tbody', array(
|
||||||
'userfields' => $productBarcodeUserfields,
|
'userfields' => $productBarcodeUserfields,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user