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 "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
|
- 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)
|
- 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)
|
- Fixed that the Userfield type "Preset list" had always the caption "Product group" instead of the configured one (thanks @oncleben31)
|
||||||
- General improvements/fixes
|
- General improvements/fixes
|
||||||
- Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar)
|
- 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(),
|
'missingProducts' => $this->StockService->GetMissingProducts(),
|
||||||
'productGroups' => $this->Database->product_groups()->orderBy('name'),
|
'productGroups' => $this->Database->product_groups()->orderBy('name'),
|
||||||
'shoppingLists' => $this->Database->shopping_lists()->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>{{ $__t('Amount') }}</th>
|
||||||
<th class="d-none">Hiden product group</th>
|
<th class="d-none">Hiden product group</th>
|
||||||
<th class="d-none">Hidden status</th>
|
<th class="d-none">Hidden status</th>
|
||||||
|
|
||||||
|
@include('components.userfields_thead', array(
|
||||||
|
'userfields' => $userfields
|
||||||
|
))
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="d-none">
|
<tbody class="d-none">
|
||||||
@ -114,6 +119,12 @@
|
|||||||
<td class="d-none">
|
<td class="d-none">
|
||||||
@if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $listItem->product_id) !== null) belowminstockamount @endif
|
@if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $listItem->product_id) !== null) belowminstockamount @endif
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
@include('components.userfields_tbody', array(
|
||||||
|
'userfields' => $userfields,
|
||||||
|
'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $listItem->product_id)
|
||||||
|
))
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user