mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Render checkbox Userfields in tables as checkmark (closes #326)
This commit is contained in:
parent
be4b5c81b2
commit
257dd644aa
@ -7,6 +7,7 @@
|
||||
- General improvements/fixes
|
||||
- Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar)
|
||||
- Fixed that the Userfield type "Preset list" had always the caption "Product group" instead of the configured one (thanks @oncleben31)
|
||||
- Userfields of type "checkbox" are rendered as a checkmark in tables when checked (instead of "1" as till now)
|
||||
- API improvements
|
||||
- New endpoint `/stock/shoppinglist/remove-product` to remove a product from a shopping list (thanks @Forceu)
|
||||
- When adding a product (through `stock/product/{productId}/add` or `stock/product/{productId}/inventory`) with omitted best before date and if the given product has "Default best before days" set, the best before date is calculated based on that (so far always today was used which is still the case when no date is supplied and also the product has no "Default best before days set) (thanks @Forceu)
|
||||
|
@ -4,7 +4,15 @@
|
||||
|
||||
@if($userfield->show_as_column_in_tables == 1)
|
||||
@php $userfieldObject = FindObjectInArrayByPropertyValue($userfieldValues, 'name', $userfield->name) @endphp
|
||||
<td>@if($userfieldObject !== null){{ $userfieldObject->value }}@endif</td>
|
||||
<td>
|
||||
@if($userfieldObject !== null)
|
||||
@if($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_CHECKBOX)
|
||||
@if($userfieldObject->value == 1)<i class="fas fa-check"></i>@endif
|
||||
@else
|
||||
{{ $userfieldObject->value }}
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
Loading…
x
Reference in New Issue
Block a user