Skip to content

Commit

Permalink
Fix Shipments' index page (#15474)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Nov 10, 2023
2 parents 268fa57 + dc077a2 commit 9d75ab1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
Expand Up @@ -57,6 +57,7 @@ sylius_admin:
links: '@SyliusAdmin/Shared/Grid/ItemAction/_links.html.twig'
show: '@SyliusAdmin/Shared/Grid/ItemAction/_show.html.twig'
update: '@SyliusAdmin/Shared/Grid/ItemAction/_update.html.twig'
ship_with_tracking_code: '@SyliusAdmin/Shipment/Grid/Action/shipWithTrackingCode.html.twig'

sylius_grid:
templates:
Expand Down
Expand Up @@ -27,18 +27,18 @@ sylius_grid:
label: sylius.ui.order
path: order
options:
template: "@SyliusAdmin/Order/Grid/Field/number.html.twig"
template: "@SyliusAdmin/Shared/Grid/Field/orderNumber.html.twig"
channel:
type: twig
label: sylius.ui.channel
path: order.channel
options:
template: "@SyliusAdmin/Order/Grid/Field/channel.html.twig"
template: "@SyliusAdmin/Shared/Grid/Field/channel.html.twig"
state:
type: twig
label: sylius.ui.state
options:
template: "@SyliusAdmin/Common/Label/shipmentState.html.twig"
template: "@SyliusAdmin/Shared/Grid/Field/shipmentState.html.twig"
filters:
state:
type: select
Expand Down
@@ -0,0 +1,14 @@
{%
set viewOptions = {
cancelled: { color: 'bg-red-lt' },
cart: { color: '' },
ready: { color: 'bg-blue-lt' },
shipped: { color: 'bg-green-lt' },
}
%}

{% set value = 'sylius.ui.' ~ data %}

<span class="badge {{ viewOptions[data]['color'] }}">
{{ value|trans }}
</span>
@@ -0,0 +1 @@
xd

0 comments on commit 9d75ab1

Please sign in to comment.