mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Render product Userfields also on the shopping list (this now closes #258)
This commit is contained in:
parent
0fa0138972
commit
9b5f3ba7b8
@ -23,6 +23,7 @@
|
||||
- New Userfield type "Select list" for a list of predefined values where a single or also multiple values can then be selected on the entity object
|
||||
- New Userfield type "Link" - a single-line-textbox where the content will be rendered as a clickable link
|
||||
- Userfields of type "checkbox" are rendered as a checkmark in tables when checked (instead of "1" as till now)
|
||||
- Product Userfields are now also renderd on the shopping list (for items which have a product referenced)
|
||||
- Fixed that the Userfield type "Preset list" had always the caption "Product group" instead of the configured one (thanks @oncleben31)
|
||||
- General improvements/fixes
|
||||
- Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar)
|
||||
|
@ -77,7 +77,9 @@ class StockController extends BaseController
|
||||
'missingProducts' => $this->StockService->GetMissingProducts(),
|
||||
'productGroups' => $this->Database->product_groups()->orderBy('name'),
|
||||
'shoppingLists' => $this->Database->shopping_lists()->orderBy('name'),
|
||||
'selectedShoppingListId' => $listId
|
||||
'selectedShoppingListId' => $listId,
|
||||
'userfields' => $this->UserfieldsService->GetFields('products'),
|
||||
'userfieldValues' => $this->UserfieldsService->GetAllValues('products')
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,11 @@
|
||||
<th>{{ $__t('Amount') }}</th>
|
||||
<th class="d-none">Hiden product group</th>
|
||||
<th class="d-none">Hidden status</th>
|
||||
|
||||
@include('components.userfields_thead', array(
|
||||
'userfields' => $userfields
|
||||
))
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="d-none">
|
||||
@ -114,6 +119,12 @@
|
||||
<td class="d-none">
|
||||
@if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $listItem->product_id) !== null) belowminstockamount @endif
|
||||
</td>
|
||||
|
||||
@include('components.userfields_tbody', array(
|
||||
'userfields' => $userfields,
|
||||
'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $listItem->product_id)
|
||||
))
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
Loading…
x
Reference in New Issue
Block a user