[AdminBundle] Customer index - add info that customer doesn't have a ShopUser

This commit is contained in:
Wojdylak 2024-10-25 14:47:44 +02:00
parent 063bde88a6
commit 95073f3b55
No known key found for this signature in database
GPG key ID: 7509E560A6821ABE
2 changed files with 13 additions and 7 deletions

View file

@ -33,9 +33,9 @@ sylius_grid:
enabled:
type: twig
label: sylius.ui.enabled
path: user?.enabled
path: .
options:
template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
template: "@SyliusAdmin/customer/grid/field/enabled.html.twig"
vars:
th_class: "w-1 text-center"
verified:
@ -59,13 +59,10 @@ sylius_grid:
multiple: true
extra_options:
class: '%sylius.model.customer_group.class%'
# TODO: these options won't work until a new tag of symfony ux is available
# choice_label: name
# choice_value: code
choice_label: name
options:
fields: [group.id]
# TODO: same case
# fields: [group.code]
actions:
main:
create:

View file

@ -0,0 +1,9 @@
{% if data.user is not null %}
{% import "@SyliusAdmin/shared/helper/field/boolean.html.twig" as boolean %}
{{ boolean.default(data.user.enabled) }}
{% else %}
<div class="text-center" data-bs-toggle="tooltip" data-bs-title="{{ 'sylius.ui.guest'|trans }}">
{{ ux_icon('tabler:spy', { class: 'icon' }) }}
</div>
{% endif %}