Skip to content

Commit

Permalink
Fix Payments' index page
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Oct 26, 2023
1 parent 4703d0e commit 5945016
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ sylius_grid:
path: .
sortable: ~
options:
template: "@SyliusAdmin/Order/Grid/Field/orderNumber.html.twig"
template: "@SyliusAdmin/Shared/Grid/Field/orderNumber.html.twig"
channel:
type: twig
label: sylius.ui.channel
sortable: channel.code
options:
template: "@SyliusAdmin/Order/Grid/Field/channel.html.twig"
template: "@SyliusAdmin/Shared/Grid/Field/channel.html.twig"
customer:
type: twig
label: sylius.ui.customer
sortable: customer.lastName
options:
template: "@SyliusAdmin/Order/Grid/Field/customer.html.twig"
template: "@SyliusAdmin/Shared/Grid/Field/customer.html.twig"
state:
type: twig
label: sylius.ui.state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ 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"
customer:
type: twig
label: sylius.ui.customer
path: order.customer
options:
template: "@SyliusAdmin/Order/Grid/Field/customer.html.twig"
template: "@SyliusAdmin/Shared/Grid/Field/customer.html.twig"
state:
type: twig
label: sylius.ui.state
options:
template: "@SyliusAdmin/Common/Label/paymentState.html.twig"
template: "@SyliusAdmin/Shared/Grid/Field/paymentState.html.twig"
filters:
state:
type: select
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="channel">
<span class="badge" style="background-color: {{ channel.color|default('#000') }}"></span>
<span class="badge" style="background-color: {{ data.color|default('#000') }}"></span>

<span class="text-nowrap">
{{ channel.name|default(channel.code) }}
{{ data.name|default(data.code) }}
</span>
</div>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<strong>{{ customer.firstName }} {{ customer.lastName }}</strong>
<p>{{ customer.email }}</p>
<strong>{{ data.firstName }} {{ data.lastName }}</strong>
<p>{{ data.email }}</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{%
set viewOptions = {
authorized: { color: 'bg-orange-lt' },
cancelled: { color: 'bg-yellow-lt' },
cart: { color: 'bg-lime-lt' },
completed: { color: 'bg-green-lt' },
failed: { color: 'bg-red-lt' },
new: { color: '' },
processing: { color: 'bg-indigo-lt' },
refunded: { color: 'bg-purple-lt' },
}
%}

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

<span class="badge {{ viewOptions[data]['color'] }}">
{{ value|trans }}
</span>

0 comments on commit 5945016

Please sign in to comment.