fix(dashboard): show customer_name (partner) instead of shipping_name

Dashboard list was prioritizing shipping_name over customer_name,
so company orders showed the person instead of the company name.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-03-16 19:25:56 +00:00
parent ecb4777a35
commit 172debdbdb
2 changed files with 2 additions and 2 deletions

View File

@@ -321,7 +321,7 @@ async function loadDashOrders() {
dateFmt = d.slice(8, 10) + '.' + d.slice(5, 7) + '.' + d.slice(2, 4); dateFmt = d.slice(8, 10) + '.' + d.slice(5, 7) + '.' + d.slice(2, 4);
if (d.length >= 16) dateFmt += ' ' + d.slice(11, 16); if (d.length >= 16) dateFmt += ' ' + d.slice(11, 16);
} }
const name = o.shipping_name || o.customer_name || o.billing_name || '\u2014'; const name = o.customer_name || o.shipping_name || o.billing_name || '\u2014';
const totalStr = o.order_total ? Number(o.order_total).toFixed(2) : ''; const totalStr = o.order_total ? Number(o.order_total).toFixed(2) : '';
return `<div class="flat-row" onclick="openDashOrderDetail('${esc(o.order_number)}')" style="font-size:0.875rem"> return `<div class="flat-row" onclick="openDashOrderDetail('${esc(o.order_number)}')" style="font-size:0.875rem">
${statusDot(o.status)} ${statusDot(o.status)}

View File

@@ -199,5 +199,5 @@
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
<script src="{{ request.scope.get('root_path', '') }}/static/js/dashboard.js?v=11"></script> <script src="{{ request.scope.get('root_path', '') }}/static/js/dashboard.js?v=12"></script>
{% endblock %} {% endblock %}