Skip to content

Commit

Permalink
Check if order number is set
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Dec 21, 2023
1 parent 9730b32 commit d4128a6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Resources/translations/messages.da.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ setono_sylius_gift_card:
gift_cards_adjustment_total: Gavekortets total
has_no_gift_card: Har ikke noget gavekort
initial_amount: Oprindeligt beløb
in_cart: I kurven
list_orders: Ordreliste
manage_gift_cards: Administrer gavekort
manage_gift_card_configurations: Administrer gavekortskonfigurationer
Expand Down
1 change: 1 addition & 0 deletions src/Resources/translations/messages.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ setono_sylius_gift_card:
gift_cards_adjustment_total: Gift cards total
has_no_gift_card: Has no gift card
initial_amount: Initial amount
in_cart: In cart
list_orders: List orders
load_default_css: Load default CSS
manage_gift_cards: Manage gift cards
Expand Down
1 change: 1 addition & 0 deletions src/Resources/translations/messages.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ setono_sylius_gift_card:
gift_cards_adjustment_total: Montant des chèques-cadeaux
has_no_gift_card: Ne contient pas de chèque-cadeau
initial_amount: Montant initial
in_cart: In cart
list_orders: Lister les commandes
manage_gift_cards: Gérer les chèques-cadeaux
manage_gift_card_configurations: Gérer les configurations de chèques-cadeaux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

{% if data is not null %}
{% set order = data.orderItem.order %}

<a href="{{ path('sylius_admin_order_show', {'id' : order.id }) }}">#{{ order.number }}</a>
{% if order.number is null %}
{{ 'setono_sylius_gift_card.ui.in_cart'|trans }}
{% else %}
<a href="{{ path('sylius_admin_order_show', {'id' : order.id }) }}">#{{ order.number }}</a>
{% endif %}
{% else %}
{{ 'setono_sylius_gift_card.ui.manually_created'|trans }}
{% endif %}

0 comments on commit d4128a6

Please sign in to comment.