From 8302a83b61414883646d161a706dbff35d94431c Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Tue, 10 Oct 2023 12:59:26 +0200 Subject: [PATCH] Don't show missing order shipment and payment states --- admin/app/components/solidus_admin/orders/index/component.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/app/components/solidus_admin/orders/index/component.rb b/admin/app/components/solidus_admin/orders/index/component.rb index 6f15d11dd9b..7026ceb40d3 100644 --- a/admin/app/components/solidus_admin/orders/index/component.rb +++ b/admin/app/components/solidus_admin/orders/index/component.rb @@ -102,7 +102,7 @@ def payment_column { header: :payment, data: ->(order) do - component('ui/badge').new(name: order.payment_state&.humanize, color: order.paid? ? :green : :yellow) + component('ui/badge').new(name: order.payment_state.humanize, color: order.paid? ? :green : :yellow) if order.payment_state? end } end @@ -111,7 +111,7 @@ def shipment_column { header: :shipment, data: ->(order) do - component('ui/badge').new(name: order.shipment_state&.humanize, color: order.shipped? ? :green : :yellow) + component('ui/badge').new(name: order.shipment_state.humanize, color: order.shipped? ? :green : :yellow) if order.shipment_state? end } end