From d4128a68e102b47609f4fcc1ea13b9a5f7157886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20L=C3=B8vgaard?= Date: Thu, 21 Dec 2023 10:08:50 +0100 Subject: [PATCH] Check if order number is set --- src/Resources/translations/messages.da.yml | 1 + src/Resources/translations/messages.en.yml | 1 + src/Resources/translations/messages.fr.yml | 1 + .../Admin/GiftCard/Grid/Field/item_units_order.html.twig | 7 +++++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Resources/translations/messages.da.yml b/src/Resources/translations/messages.da.yml index 10f77cd9..a7d2e042 100644 --- a/src/Resources/translations/messages.da.yml +++ b/src/Resources/translations/messages.da.yml @@ -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 diff --git a/src/Resources/translations/messages.en.yml b/src/Resources/translations/messages.en.yml index 1cbf3562..8cb1e0ac 100644 --- a/src/Resources/translations/messages.en.yml +++ b/src/Resources/translations/messages.en.yml @@ -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 diff --git a/src/Resources/translations/messages.fr.yml b/src/Resources/translations/messages.fr.yml index 4ed72a71..e1a015d2 100644 --- a/src/Resources/translations/messages.fr.yml +++ b/src/Resources/translations/messages.fr.yml @@ -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 diff --git a/src/Resources/views/Admin/GiftCard/Grid/Field/item_units_order.html.twig b/src/Resources/views/Admin/GiftCard/Grid/Field/item_units_order.html.twig index 90999ede..eb5f77d5 100644 --- a/src/Resources/views/Admin/GiftCard/Grid/Field/item_units_order.html.twig +++ b/src/Resources/views/Admin/GiftCard/Grid/Field/item_units_order.html.twig @@ -2,8 +2,11 @@ {% if data is not null %} {% set order = data.orderItem.order %} - - #{{ order.number }} + {% if order.number is null %} + {{ 'setono_sylius_gift_card.ui.in_cart'|trans }} + {% else %} + #{{ order.number }} + {% endif %} {% else %} {{ 'setono_sylius_gift_card.ui.manually_created'|trans }} {% endif %}