<%
  color, text = case purchase_order.status&.to_sym
  when :draft
    %w[bg-muted draft]
  when :open
    ["info", "open"]
  when :completed
    %w[success completed]
  when :deleted
    %w[warning deleted]
  else
    ["purple", purchase_order.status || "unknown"]
  end
%>

<span class="badge <%= color %> float-right">
  <%= text %>
</span>
