mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +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": {
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
}
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
}
|
||||
},
|
||||
"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': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'visible': false, 'targets': 5 }
|
||||
{ 'visible': false, 'targets': 5 },
|
||||
{ 'visible': false, 'targets': 6 }
|
||||
].concat($.fn.dataTable.defaults.columnDefs)
|
||||
});
|
||||
$('#barcode-table tbody').removeClass("d-none");
|
||||
|
@ -90,6 +90,15 @@
|
||||
value="1">
|
||||
@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(
|
||||
'userfields' => $userfields,
|
||||
'entity' => 'product_barcodes'
|
||||
|
@ -470,6 +470,7 @@
|
||||
<th>{{ $__t('Quantity unit') }}</th>
|
||||
<th>{{ $__t('Amount') }}</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(
|
||||
'userfields' => $productBarcodeUserfields
|
||||
@ -518,6 +519,9 @@
|
||||
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
|
||||
<span class="locale-number locale-number-currency">{{ $barcode->last_price }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ $barcode->note }}
|
||||
</td>
|
||||
|
||||
@include('components.userfields_tbody', array(
|
||||
'userfields' => $productBarcodeUserfields,
|
||||
|
Loading…
x
Reference in New Issue
Block a user