fix: Resolve persistent date formatting undefined issue in ticket printing

- Fixed unsafe string concatenation in print.js date function
- Replaced manual padding logic with String().padStart() method
- Updated cache busting to v1757039367 for proper reload
- Fixed default tab routing for regular users to 'Ventas'
- Enhanced ticket layout with right-aligned total and payment method
- Improved print styling with 72mm width and better spacing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Marco Gallegos
2025-09-04 20:34:43 -06:00
parent a70c74357e
commit b2963e7f9d
5 changed files with 76 additions and 41 deletions

View File

@@ -870,13 +870,13 @@ button.action-btn {
/* Estilos del Ticket */
.ticket {
width: 58mm;
max-width: 58mm;
width: 72mm;
max-width: 72mm;
background: #fff;
color: #000;
padding: 10px;
padding: 8px 2px;
box-sizing: border-box;
font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
border: 1px solid #ccc; /* Visible en pantalla, no en impresión */
}
.t-logo {
@@ -886,15 +886,18 @@ button.action-btn {
height: auto;
}
.t-center { text-align: center; }
.t-right { text-align: right; }
.t-bold { font-weight: bold; }
.t-business-name { font-size: 14px; margin-bottom: 4px; }
.t-tagline { font-size: 11px; margin-bottom: 8px; font-style: italic; }
.t-spacer { height: 4px; }
.t-small { font-size: 10px; line-height: 1.3; }
.t-small { font-size: 11px; line-height: 1.3; }
.t-service-title { margin-bottom: 6px; font-size: 12px; }
.t-service-detail { margin-bottom: 3px; }
.t-divider { border-top: 1px dashed #000; margin: 8px 0; }
.t-row { display: flex; justify-content: space-between; margin-bottom: 2px; }
.t-row-label { font-weight: bold; }
.t-service-detail-label { font-weight: bold; }
.t-footer { margin-top: 10px; }
.t-qr-section {
@@ -936,15 +939,15 @@ button.action-btn {
}
@page {
size: 58mm auto;
margin: 0.5cm 0.2cm;
size: 72mm auto;
margin: 0.3cm 0.1cm;
}
/* Configuración adicional para impresión PDF */
@media print {
body {
width: 58mm !important;
max-width: 58mm !important;
width: 72mm !important;
max-width: 72mm !important;
}
}