sylius_grid:
    grids:
        sylius_admin_shipment:
            driver:
                name: doctrine/orm
                options:
                    class: "%sylius.model.shipment.class%"
                    repository:
                        method: createListQueryBuilder
            sorting:
                createdAt: desc
            fields:
                createdAt:
                    type: datetime
                    label: sylius.ui.created_at
                    sortable: ~
                    options:
                        format: d-m-Y H:i:s
                shippedAt:
                    type: datetime
                    label: sylius.ui.shipped_at
                    sortable: ~
                    options:
                        format: d-m-Y H:i:s
                number:
                    type: twig
                    label: sylius.ui.order
                    path: order
                    options:
                        template: "@SyliusAdmin/Order/Grid/Field/number.html.twig"
                channel:
                    type: twig
                    label: sylius.ui.channel
                    path: order.channel
                    options:
                        template: "@SyliusAdmin/Order/Grid/Field/channel.html.twig"
                state:
                    type: twig
                    label: sylius.ui.state
                    options:
                        template: "@SyliusAdmin/Common/Label/shipmentState.html.twig"
            filters:
                state:
                    type: select
                    label: sylius.ui.state
                    form_options:
                        choices:
                            sylius.ui.cancelled: cancelled
                            sylius.ui.ready: ready
                            sylius.ui.shipped: shipped
                channel:
                    type: entity
                    label: sylius.ui.channel
                    options:
                        fields: [order.channel]
                    form_options:
                        class: "%sylius.model.channel.class%"
                method:
                    type: entity
                    label: sylius.ui.shipping_method
                    form_options:
                        class: "%sylius.model.shipping_method.class%"
            actions:
                item:
                    ship:
                        type: ship_with_tracking_code
                    show:
                        type: show
