<commit_before><nav class="menu">
  <ul data-hook="admin_order_tabs">
    <% if (@order.shipments.count == 0 || @order.shipped_shipments.count == 0) %>
      <li<%== ' class="active"' if current == 'Cart' %> data-hook='admin_order_tabs_order_details'>
        <%= link_to_with_icon 'shopping-cart', Spree.t(:cart), cart_admin_order_url(@order) %>
      </li>
    <% end %>

    <% if can?(:update, @order) && checkout_steps.include?("address") %>
      <li<%== ' class="active"' if current == 'Customer Details' %> data-hook='admin_order_tabs_customer_details'>
        <%= link_to_with_icon 'user', Spree.t(:customer_details), admin_order_customer_url(@order) %>
      </li>
    <% end %>

    <li<%== ' class="active"' if current == 'Shipments' %> data-hook='admin_order_tabs_order_details'>
      <%= link_to_with_icon 'edit', Spree.t(:shipments), edit_admin_order_url(@order) %>
    </li>
<commit_msg>Discriminate on the customer details display by permission<commit_after><nav class="menu">
  <ul data-hook="admin_order_tabs">
    <% if (@order.shipments.count == 0 || @order.shipped_shipments.count == 0) %>
      <li<%== ' class="active"' if current == 'Cart' %> data-hook='admin_order_tabs_order_details'>
        <%= link_to_with_icon 'shopping-cart', Spree.t(:cart), cart_admin_order_url(@order) %>
      </li>
    <% end %>

    <% if checkout_steps.include?("address") %>
      <li<%== ' class="active"' if current == 'Customer Details' %> data-hook='admin_order_tabs_customer_details'>
        <% if can?(:update, @order) %>
          <%= link_to_with_icon 'user', Spree.t(:customer_details), edit_admin_order_customer_url(@order) %>
        <% else %>
          <%= link_to_with_icon 'user', Spree.t(:customer_details), admin_order_customer_url(@order) %>
        <% end %>
      </li>
    <% end %>

    <li<%== ' class="active"' if current == 'Shipments' %> data-hook='admin_order_tabs_order_details'>
      <%= link_to_with_icon 'edit', Spree.t(:shipments), edit_admin_order_url(@order) %>
    </li>

{'fraction_non_alphanumeric': 0.19038175508180466, 'fraction_numerical': 0.0019831432821021317, 'mean_word_length': 4.161125319693094, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4553404', 'n_tokens_mistral': 732, 'n_tokens_neox': 671, 'n_words': 112}