From 74e8fa75c080312952cbca68e7f63221ef6ec793 Mon Sep 17 00:00:00 2001 From: Marek Rzytki Date: Wed, 19 Jun 2024 16:30:45 +0200 Subject: [PATCH 1/2] Fix grid sorting --- src/Resources/config/grids/bitbag_shipping_export.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Resources/config/grids/bitbag_shipping_export.yml b/src/Resources/config/grids/bitbag_shipping_export.yml index d27049a..baa9181 100644 --- a/src/Resources/config/grids/bitbag_shipping_export.yml +++ b/src/Resources/config/grids/bitbag_shipping_export.yml @@ -10,6 +10,7 @@ sylius_grid: class: "%bitbag.model.shipping_export.class%" repository: method: createListQueryBuilder + arguments: ["expr:service('sylius.context.locale').getLocaleCode()"] sorting: shipment: desc fields: @@ -17,7 +18,7 @@ sylius_grid: type: twig label: sylius.ui.order path: . - sortable: shipment.order + sortable: shipment.order.number options: template: "@BitBagSyliusShippingExportPlugin/ShippingExport/Grid/Field/orderNumber.html.twig" shipment: @@ -38,7 +39,7 @@ sylius_grid: type: twig label: sylius.ui.shipping_method path: . - sortable: shipment.method + sortable: shipment.method.code options: template: "@BitBagSyliusShippingExportPlugin/ShippingExport/Grid/Field/shippingMethod.html.twig" labelPath: From 96d72340bb16676c4ca01f38cbe7018df904154c Mon Sep 17 00:00:00 2001 From: Marek Rzytki Date: Wed, 19 Jun 2024 16:31:30 +0200 Subject: [PATCH 2/2] Remove locale code from grid --- src/Resources/config/grids/bitbag_shipping_export.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Resources/config/grids/bitbag_shipping_export.yml b/src/Resources/config/grids/bitbag_shipping_export.yml index baa9181..eaa0cec 100644 --- a/src/Resources/config/grids/bitbag_shipping_export.yml +++ b/src/Resources/config/grids/bitbag_shipping_export.yml @@ -10,7 +10,6 @@ sylius_grid: class: "%bitbag.model.shipping_export.class%" repository: method: createListQueryBuilder - arguments: ["expr:service('sylius.context.locale').getLocaleCode()"] sorting: shipment: desc fields: