mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Don't display QU conversions for other products on the product edit page (fixes #400)
This commit is contained in:
parent
901b345714
commit
420e4b933f
5
changelog/54_UNRELEASED_2019-xx-xx.md
Normal file
5
changelog/54_UNRELEASED_2019-xx-xx.md
Normal file
@ -0,0 +1,5 @@
|
||||
### Stock fixes
|
||||
- Fixed that product specific quantity unit conversions (product overrides) were also displayed on the product edit page of other products with the same stock quantity unit
|
||||
|
||||
### Recipe fixes
|
||||
- Fixed that recipes were displayed without ingredients if the total recipe count was > 100
|
@ -1,2 +0,0 @@
|
||||
### Recipe fixes
|
||||
- Fixed that recipes were displayed without ingredients if the total recipe count was > 100
|
@ -268,32 +268,34 @@
|
||||
<tbody class="d-none">
|
||||
@if($mode == "edit")
|
||||
@foreach($quConversions as $quConversion)
|
||||
<tr>
|
||||
<td class="fit-content border-right">
|
||||
<a class="btn btn-sm btn-info qu-conversion-edit-button @if($quConversion->product_id == null) disabled @endif" href="#" data-qu-conversion-id="{{ $quConversion->id }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-danger qu-conversion-delete-button @if($quConversion->product_id == null) disabled @endif" href="#" data-qu-conversion-id="{{ $quConversion->id }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="locale-number locale-number-quantity-amount">{{ $quConversion->factor }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name }}
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if($quConversion->product_id != null)
|
||||
{{ $__t('Product overrides') }}
|
||||
@else
|
||||
{{ $__t('Default conversions') }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="d-none">
|
||||
from_qu_id xx{{ $quConversion->from_qu_id }}xx
|
||||
</td>
|
||||
</tr>
|
||||
@if($quConversion->product_id == $product->id || $quConversion->product_id == null)
|
||||
<tr>
|
||||
<td class="fit-content border-right">
|
||||
<a class="btn btn-sm btn-info qu-conversion-edit-button @if($quConversion->product_id == null) disabled @endif" href="#" data-qu-conversion-id="{{ $quConversion->id }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-danger qu-conversion-delete-button @if($quConversion->product_id == null) disabled @endif" href="#" data-qu-conversion-id="{{ $quConversion->id }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="locale-number locale-number-quantity-amount">{{ $quConversion->factor }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name }}
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if($quConversion->product_id != null)
|
||||
{{ $__t('Product overrides') }}
|
||||
@else
|
||||
{{ $__t('Default conversions') }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="d-none">
|
||||
from_qu_id xx{{ $quConversion->from_qu_id }}xx
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
|
Loading…
x
Reference in New Issue
Block a user