feat(customers): show razon_social, address, cp in customer views

- Add address and cp to list_customers() backend response
- Show razon_social as subtitle in customer table rows
- Add razon_social and cp fields to detail panel
- Update customers.html detail panel layout
This commit is contained in:
2026-06-11 18:28:31 +00:00
parent 2cbd69d5fa
commit 041efd5c5c
3 changed files with 18 additions and 6 deletions

View File

@@ -112,7 +112,7 @@ const Customers = (() => {
'<td class="cell-num">' + num + '</td>' +
'<td>' +
'<div class="cell-name">' + (c.name || '') + '</div>' +
'<div class="cell-name-sub hide-mobile">' + (c.email || '') + '</div>' +
'<div class="cell-name-sub hide-mobile">' + (c.razon_social || c.email || '') + '</div>' +
'</td>' +
'<td class="cell-rfc hide-mobile">' + (c.rfc || '-') + '</td>' +
'<td class="hide-mobile">' + (c.phone || '-') + '</td>' +
@@ -249,7 +249,9 @@ const Customers = (() => {
// Contact
const set = (id, val) => { const el = document.getElementById(id); if (el) el.textContent = val || '-'; };
set('detailRazonSocial', c.razon_social);
set('detailAddress', c.address);
set('detailCp', c.cp);
set('detailPhone', c.phone);
set('detailEmail', c.email);
set('detailSince', formatDate(c.created_at));