easy_admin:
    entities:
       # List the entity class name you want to manage
        RentalHistorical:
            class: App\Entity\Event
            controller: App\Controller\RentalController
            help: 'Global message displayed in all views'
            # role: ROLE_ADVISOR
            # join: userCreated
            # admin_filter: 'appointment.company'
            # search:
            #     fields: ['beginAt', 'endAt', 'person.firstname', 'person.lastname']
            list:
                title: '%menu.list.label.rental_historical%'
                actions: ['show', 'edit', '-delete']
                dql_filter: entity.beginAt < NOW()
                sort: ['beginAt', 'DESC'] 
                fields:
                  - { property: 'rentalType', template: 'components/default_collection.html.twig' }
                  - { property: 'beginAt', type: 'datetime' }
                  - { property: 'endAt', type: 'datetime' }
                  - { property: 'person', label: '%form.label.with%' }
                  - { property: 'accommodation', label: '%form.label.in%' }
                  # - { property: 'accommodation.nature', label: 'Type de location', template: 'components/default_collection.html.twig' }
#                  - { property: 'person.type', label: 'Type de contact', template: 'fields/type_collection.html.twig', label_colors: { 'artisan': 'primary', 'customer': 'secondary' } }
                  # - { property: 'accommodation.status', label: 'Status du contact', template: 'components/default_collection.html.twig' }
#                  - { property: 'person.status', label: 'Status du contact', template: 'fields/status_collection.html.twig', label_colors: { 'prospect': 'primary', 'devis-en-cours': 'info', 'devis-accepte': 'success', 'travaux-termine': 'success', 'travaux-en-cours': 'info' } }
                  - { property: 'comment' }
            show:
                  actions: ['edit', 'delete']
                  fields:
                    - { property: 'comment' }
                    - { property: 'person', label: '%form.label.with%' }
                    - { property: 'accommodation', label: '%form.label.in%' }
                    - { property: 'beginAt', type: 'datetime' }
                    - { property: 'endAt', type: 'datetime' }
                    - { property: 'userCreated', role: ROLE_SUPER_ADMIN, type: 'string'  }
                    - { property: 'userLastModified', role: ROLE_SUPER_ADMIN, type: 'string'  }
                    - { property: 'dateModified', type: 'datetime' }
                    - { property: 'dateCreated', type: 'datetime' }
            form:
               fields:
                    - { type: 'group', label: '%group.label.basic.informations%', icon: 'chart-line', css_class: 'col-sm-6' }
                    # - { property: 'person', label: 'Avec', css_class: 'required', type_options: { query_builder: ['App\Repository\PersonRepository', 'getPersonappointment'], required: false } }
                    # - { property: 'rental', render: 'form'  }
                    - { property: 'rentalType' }
                    - { property: 'person', label: '%form.label.with%' }
                    - { property: 'accommodation', label: '%form.label.in%' }
                    - { property: 'comment' }
                    - { type: 'group', label: '%group.label.appointment.dates%', icon: 'chart-line', css_class: 'col-sm-6' }
                    - { property: 'beginAt', type: 'datetime', type_options: { 'widget': 'single_text', 'format': 'dd/MM/yyyy HH:mm', 'attr': { 'class': 'datetimepicker' } } }
                    - { property: 'endAt', type: 'datetime', type_options: { 'widget': 'single_text', 'format': 'dd/MM/yyyy HH:mm', 'attr': { 'class': 'datetimepicker' } } }
                    # - { property: 'beginAt' }
                    # - { property: 'endAt' }
