sylius_grid:
    grids:
        sylius_admin_payment:
            driver:
                name: doctrine/orm
                options:
                    class: "%sylius.model.payment.class%"
                    repository:
                        method: createListQueryBuilder
            sorting:
                createdAt: desc
            fields:
                createdAt:
                    type: datetime
                    label: sylius.ui.date
                    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"
                customer:
                    type: twig
                    label: sylius.ui.customer
                    path: order.customer
                    options:
                        template: "@SyliusAdmin/Order/Grid/Field/customer.html.twig"
                state:
                    type: twig
                    label: sylius.ui.state
                    options:
                        template: "@SyliusAdmin/Common/Label/paymentState.html.twig"
            filters:
                state:
                    type: select
                    label: sylius.ui.state
                    form_options:
                        choices:
                            sylius.ui.cancelled: cancelled
                            sylius.ui.completed: completed
                            sylius.ui.failed: failed
                            sylius.ui.new: new
                            sylius.ui.processing: processing
                            sylius.ui.refunded: refunded
                channel:
                    type: entity
                    label: sylius.ui.channel
                    options:
                        fields: [order.channel]
                    form_options:
                        class: "%sylius.model.channel.class%"
            actions:
                item:
                    complete:
                        type: apply_transition
                        label: sylius.ui.complete
                        icon: payment
                        options:
                            link:
                                route: sylius_admin_payment_complete
                                parameters:
                                    id: resource.id
                            class: teal
                            transition: complete
                            graph: sylius_payment
