style: rediseño de ítems del carrito en terminal POS a tarjetas blancas minimalistas y legibles

This commit is contained in:
unknown
2026-10-06 10:52:08 -06:00
parent 5ebaaa35ec
commit 030727f33e
3 changed files with 45 additions and 29 deletions
+24 -18
View File
@@ -1237,32 +1237,31 @@ body.dark-mode .floating-cart-bar {
box-shadow: -2px 0 10px rgba(0, 0, 0, 0.03); box-shadow: -2px 0 10px rgba(0, 0, 0, 0.03);
} }
.pos-cart-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #f1f5f9;
gap: 10px;
}
.pos-qty-btn { .pos-qty-btn {
width: 26px; width: 28px;
height: 26px; height: 28px;
background: #f1f5f9; background: #f8fafc;
color: #0f172a; color: #0f172a;
border: 1px solid #cbd5e1; border: 1px solid #cbd5e1;
border-radius: 6px; border-radius: 8px;
font-weight: 800; font-weight: 800;
font-size: 0.95rem;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
transition: all 0.15s ease; transition: all 0.15s ease;
user-select: none;
} }
.pos-qty-btn:hover { .pos-qty-btn:hover {
background: #e2e8f0; background: #e2e8f0;
border-color: #94a3b8;
color: #0284c7;
}
.pos-qty-btn:active {
transform: scale(0.92);
} }
.scanner-feed-card { .scanner-feed-card {
@@ -1319,13 +1318,20 @@ body.dark-mode .floating-cart-bar {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: #0f172a; background: #ffffff;
padding: 10px 14px; padding: 11px 14px;
border-radius: 10px; border-radius: 12px;
border: 1px solid #334155; border: 1.5px solid #e2e8f0;
gap: 10px; gap: 12px;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
transition: all 0.15s ease;
}
.pos-cart-item:hover {
border-color: #cbd5e1;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
} }
/* Elementos móviles ocultos por defecto en pantallas grandes */ /* Elementos móviles ocultos por defecto en pantallas grandes */
+14 -8
View File
@@ -517,7 +517,13 @@ function updatePosCartUI() {
const floatTotal = document.getElementById('posFloatingCartTotal'); const floatTotal = document.getElementById('posFloatingCartTotal');
if (posCart.length === 0) { if (posCart.length === 0) {
list.innerHTML = '<p style="text-align: center; color: #64748b; padding: 20px; font-size: 0.85rem;">Toca productos del menú para cobrar</p>'; list.innerHTML = `
<div style="text-align: center; padding: 26px 16px; background: #f8fafc; border-radius: 12px; border: 1.5px dashed #cbd5e1;">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="#94a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-bottom: 6px;"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>
<p style="margin: 0; font-weight: 800; color: #475569; font-size: 0.85rem;">Mostrador vacío</p>
<span style="font-size: 0.74rem; color: #94a3b8;">Toca productos del menú para cobrar</span>
</div>
`;
totalEl.textContent = '₡0'; totalEl.textContent = '₡0';
if (floatBar) floatBar.style.display = 'none'; if (floatBar) floatBar.style.display = 'none';
return; return;
@@ -530,14 +536,14 @@ function updatePosCartUI() {
return ` return `
<div class="pos-cart-item"> <div class="pos-cart-item">
<div style="flex: 1; min-width: 0; word-break: break-word;"> <div style="flex: 1; min-width: 0; word-break: break-word;">
<strong style="color: #0f172a; font-size: 0.85rem; display: block; line-height: 1.2;">${item.product.icono ? `${item.product.icono} ` : ''}${item.product.nombre}</strong> <strong style="color: #0f172a; font-size: 0.88rem; font-weight: 800; display: block; line-height: 1.25;">${item.product.icono ? `<span style="margin-right: 5px; font-size: 1rem;">${item.product.icono}</span>` : ''}${item.product.nombre}</strong>
<div style="font-size: 0.74rem; color: #64748b; margin-top: 2px;">₡${item.product.precio_colones.toLocaleString('es-CR')} c/u</div> <div style="font-size: 0.74rem; color: #64748b; font-weight: 600; margin-top: 3px;">₡${item.product.precio_colones.toLocaleString('es-CR')} c/u</div>
</div> </div>
<div style="display: flex; align-items: center; gap: 6px; flex-shrink: 0;"> <div style="display: flex; align-items: center; gap: 8px; flex-shrink: 0;">
<button onclick="changePosQty(${idx}, -1)" class="pos-qty-btn">-</button> <button onclick="changePosQty(${idx}, -1)" class="pos-qty-btn" title="Disminuir">−</button>
<span style="font-weight: 800; min-width: 18px; text-align: center; color: #0f172a; font-size: 0.88rem;">${item.cantidad}</span> <span style="font-weight: 800; min-width: 20px; text-align: center; color: #0f172a; font-size: 0.9rem;">${item.cantidad}</span>
<button onclick="changePosQty(${idx}, 1)" class="pos-qty-btn">+</button> <button onclick="changePosQty(${idx}, 1)" class="pos-qty-btn" title="Aumentar">+</button>
<span style="font-weight: 900; color: #0284c7; min-width: 58px; text-align: right; font-size: 0.88rem;">₡${subtotal.toLocaleString('es-CR')}</span> <span style="font-weight: 900; color: #0284c7; min-width: 65px; text-align: right; font-size: 0.92rem;">₡${subtotal.toLocaleString('es-CR')}</span>
</div> </div>
</div> </div>
`; `;
+7 -3
View File
@@ -284,7 +284,11 @@
<button onclick="clearPosCart()" style="background: none; border: none; color: #dc2626; font-size: 0.75rem; font-weight: 700; cursor: pointer; padding: 2px 6px;">Limpiar</button> <button onclick="clearPosCart()" style="background: none; border: none; color: #dc2626; font-size: 0.75rem; font-weight: 700; cursor: pointer; padding: 2px 6px;">Limpiar</button>
</div> </div>
<div class="pos-cart-list" id="posCartList"> <div class="pos-cart-list" id="posCartList">
<p style="text-align: center; color: #94a3b8; padding: 20px; font-size: 0.85rem;">Toca productos del menú para cobrar</p> <div style="text-align: center; padding: 26px 16px; background: #f8fafc; border-radius: 12px; border: 1.5px dashed #cbd5e1;">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="#94a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-bottom: 6px;"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>
<p style="margin: 0; font-weight: 800; color: #475569; font-size: 0.85rem;">Mostrador vacío</p>
<span style="font-size: 0.74rem; color: #94a3b8;">Toca productos del menú para cobrar</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -292,8 +296,8 @@
<!-- BOTÓN DE COBRO Y TOTAL --> <!-- BOTÓN DE COBRO Y TOTAL -->
<div style="border-top: 1px solid #e2e8f0; padding-top: 14px; margin-top: auto;"> <div style="border-top: 1px solid #e2e8f0; padding-top: 14px; margin-top: auto;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px;">
<span style="font-size: 0.88rem; font-weight: 700; color: #64748b; letter-spacing: 0.5px;">TOTAL A DEBITAR:</span> <span style="font-size: 0.88rem; font-weight: 800; color: #64748b; letter-spacing: 0.5px;">TOTAL A DEBITAR:</span>
<span id="posCartTotal" style="font-size: 1.7rem; font-weight: 900; color: #0f172a;">₡0</span> <span id="posCartTotal" style="font-size: 1.65rem; font-weight: 900; color: #0284c7;">₡0</span>
</div> </div>
<button id="btnCobrarPos" onclick="executePosDebit()" style="width: 100%; padding: 13px; background: #0f172a; border: none; border-radius: 12px; color: white; font-size: 0.95rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15); box-sizing: border-box; transition: all 0.15s ease;"> <button id="btnCobrarPos" onclick="executePosDebit()" style="width: 100%; padding: 13px; background: #0f172a; border: none; border-radius: 12px; color: white; font-size: 0.95rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15); box-sizing: border-box; transition: all 0.15s ease;">