Skip to content

Commit

Permalink
Merge pull request #5427 from solidusio/elia/admin/order-states
Browse files Browse the repository at this point in the history
Don't show missing order shipment and payment states
  • Loading branch information
elia authored Oct 11, 2023
2 parents dc8dad1 + 8302a83 commit cfa016a
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 @@ -158,7 +158,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 @@ -167,7 +167,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 cfa016a

Please sign in to comment.