fix(dashboard): renderClientCell shows customer_name (partner) as primary
renderClientCell was showing shipping_name (person) instead of customer_name (company/partner). Now shows customer_name with tooltip for shipping person when different (e.g. company orders). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -386,13 +386,14 @@ function dashChangePerPage(val) {
|
||||
// ── Client cell with Cont tooltip (Task F4) ───────
|
||||
|
||||
function renderClientCell(order) {
|
||||
const shipping = (order.shipping_name || order.customer_name || '').trim();
|
||||
const display = (order.customer_name || order.shipping_name || '').trim();
|
||||
const billing = (order.billing_name || '').trim();
|
||||
const isDiff = order.is_different_person && billing && shipping !== billing;
|
||||
const shipping = (order.shipping_name || '').trim();
|
||||
const isDiff = display !== shipping && shipping;
|
||||
if (isDiff) {
|
||||
return `<td class="tooltip-cont fw-bold" data-tooltip="Cont: ${escHtml(billing)}">${escHtml(shipping)} <sup style="color:#6b7280;font-size:0.65rem">▲</sup></td>`;
|
||||
return `<td class="tooltip-cont fw-bold" data-tooltip="Livrare: ${escHtml(shipping)}">${escHtml(display)} <sup style="color:#6b7280;font-size:0.65rem">▲</sup></td>`;
|
||||
}
|
||||
return `<td class="fw-bold">${escHtml(shipping || billing || '\u2014')}</td>`;
|
||||
return `<td class="fw-bold">${escHtml(display || billing || '\u2014')}</td>`;
|
||||
}
|
||||
|
||||
// ── Helper functions ──────────────────────────────
|
||||
|
||||
@@ -199,5 +199,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ request.scope.get('root_path', '') }}/static/js/dashboard.js?v=12"></script>
|
||||
<script src="{{ request.scope.get('root_path', '') }}/static/js/dashboard.js?v=13"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user