fix(auth): ensure data persistence and correct login

- Corrected the client table rendering function to prevent UI breaking.
- Fixed a critical issue where data was not persisting in the local environment by ensuring an absolute path for the database.
- Implemented a temporary password reset mechanism to regain access and then removed it.
- Ensured client data is re-fetched from the server after saving to maintain UI consistency.
This commit is contained in:
Marco Gallegos
2025-08-13 09:55:32 -06:00
parent 2adba24312
commit 0cbabc8da4
3 changed files with 8 additions and 13 deletions

View File

@@ -23,6 +23,7 @@ function templateTicket(mov, settings) {
const dt = new Date(mov.fechaISO || Date.now());
const fechaLocal = dt.toLocaleString('es-MX', { dateStyle: 'medium', timeStyle: 'short' });
const montoFormateado = Number(mov.monto).toFixed(2);
const tipoServicio = mov.subtipo === 'Retoque' ? `Retoque de ${mov.tipo}` : mov.tipo;
const lines = [];
lines.push('<div class="ticket">');
@@ -39,7 +40,7 @@ function templateTicket(mov, settings) {
lines.push(`<div class="t-row t-small"><span>Fecha:</span><span>${esc(fechaLocal)}</span></div>`);
lines.push('<div class="t-divider"></div>');
lines.push(`<div><span class="t-bold">${esc(mov.tipo)}</span></div>`);
lines.push(`<div><span class="t-bold">${esc(tipoServicio)}</span></div>`);
if (mov.client) lines.push(`<div class="t-small">Cliente: ${esc(mov.client.nombre)}</div>`);
if (mov.concepto) lines.push(`<div class="t-small">Concepto: ${esc(mov.concepto)}</div>`);
if (mov.staff) lines.push(`<div class="t-small"><b>Te atendió:</b> ${esc(mov.staff)}</div>`);