Skip to content

Commit

Permalink
Don't show missing order shipment and payment states
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Oct 10, 2023
1 parent 9fd261a commit 093b53e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/app/components/solidus_admin/orders/index/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 093b53e

Please sign in to comment.