diff --git a/addons/beyond_base/static/src/webclient/beyond_panel_navbar.js b/addons/beyond_base/static/src/webclient/beyond_panel_navbar.js index 93f53c0..aaca5f8 100644 --- a/addons/beyond_base/static/src/webclient/beyond_panel_navbar.js +++ b/addons/beyond_base/static/src/webclient/beyond_panel_navbar.js @@ -37,8 +37,16 @@ const APPS_PANEL = [ // Inventario: la raíz nativa de stock lleva nuestra acción // (beyond_inventory), y su pantalla es del panel como las demás. "stock.menu_stock_root", + // Punto de venta: la raíz nativa del POS lleva nuestras pantallas y sus + // dos hijos —Cajas e Histórico— son justo las pestañas del diseño. + "point_of_sale.menu_point_root", ]; +// El punto de venta pinta el mismo panel con el acento en VERDE, que es el +// de la marca. Misma figura, otro color: como Tableros con el oro. +const APP_VERDE = "point_of_sale.menu_point_root"; +const CLASE_VERDE = "beyond_panel_verde"; + // …pero SIN pestañas. Las pestañas son los hijos del menú raíz, y los de // stock son los del módulo nativo que justamente rodeamos: ofrecerlos // llevaría a las pantallas que la nuestra sustituye. Inventario es UNA @@ -77,15 +85,17 @@ patch(NavBar.prototype, { () => { document.body.classList.toggle(CLASE_RAIZ, this.beyondEsPanel); document.body.classList.toggle(CLASE_ORO, this.beyondEsOro); + document.body.classList.toggle(CLASE_VERDE, this.beyondEsVerde); if (this.beyondEsPanel) { this.beyondCargarAvatar(); } }, - () => [this.beyondEsPanel, this.beyondEsOro] + () => [this.beyondEsPanel, this.beyondEsOro, this.beyondEsVerde] ); onWillUnmount(() => { document.body.classList.remove(CLASE_RAIZ); document.body.classList.remove(CLASE_ORO); + document.body.classList.remove(CLASE_VERDE); }); }, @@ -101,6 +111,13 @@ patch(NavBar.prototype, { return this.currentAppSections; }, + /** El punto de venta pinta el mismo panel con el acento en verde. */ + get beyondEsVerde() { + // Colgado de `beyondEsPanel`: el acento es del panel, y sin panel + // pintaría un color de una barra que no es la nuestra. + return this.beyondEsPanel && this.currentApp?.xmlid === APP_VERDE; + }, + /** Tableros pinta el mismo panel con el acento en oro. */ get beyondEsOro() { return this.currentApp?.xmlid === APP_ORO; diff --git a/addons/beyond_branch/tests/test_anchos.py b/addons/beyond_branch/tests/test_anchos.py index 261ebbb..e6bffd9 100644 --- a/addons/beyond_branch/tests/test_anchos.py +++ b/addons/beyond_branch/tests/test_anchos.py @@ -73,6 +73,18 @@ GUION = """ todas.click(); await esperar(800); } + } else { + // A 600px el cliente abre directamente una app, y si esa app + // viste el panel no hay hamburguesa: la piel sustituye la barra + // lateral de Odoo por la casa y las pestañas (ADR-013). Entonces + // se entra como entra una persona ahí: por la casa, que abre el + // lanzador. Dejó de ser hipotético cuando el punto de venta pasó + // a ser una app de panel y resultó ser la que abre a ese ancho. + const casa = document.querySelector('.o_navbar_apps_menu button'); + if (casa) { + casa.click(); + await esperar(1200); + } } } if (!document.querySelector(alPanel)) { diff --git a/addons/beyond_inventory/static/src/inventario/inventario.scss b/addons/beyond_inventory/static/src/inventario/inventario.scss index 4317073..aae50ee 100644 --- a/addons/beyond_inventory/static/src/inventario/inventario.scss +++ b/addons/beyond_inventory/static/src/inventario/inventario.scss @@ -94,96 +94,809 @@ $inv-cols: 1.5fr 1fr 0.8fr 0.5fr 0.9fr 180px; color: $beyond-ink-muted; } -// ── Indicadores. Tres preguntas sobre el mismo conjunto, NO tres montones: -// un artículo con 1 de 4 está por agotarse y también tiene existencia. -// Por eso no suman y por eso no son filtros ni botones. ───────────────── -.beyond_inventario_indicadores { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - gap: 14px; -} +// Todo lo de abajo vive DENTRO de la pantalla de inventario: nombres como +// `beyond_cifra` o `beyond_tabla` los usan también otras pantallas —el +// punto de venta, sin ir más lejos— y sueltos en la raíz se las pisaban: +// sus tarjetas de métricas salían como el círculo de 44px de aquí, con +// la cifra en el azul de inventario. +.o_beyond_inventario { + // ── Indicadores. Tres preguntas sobre el mismo conjunto, NO tres montones: + // un artículo con 1 de 4 está por agotarse y también tiene existencia. + // Por eso no suman y por eso no son filtros ni botones. ───────────────── + .beyond_inventario_indicadores { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 14px; + } -.beyond_indicador { - display: flex; - align-items: center; - gap: 15px; - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 22px; - padding: 16px 20px; -} + .beyond_indicador { + display: flex; + align-items: center; + gap: 15px; + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 22px; + padding: 16px 20px; + } -.beyond_cifra { - flex: none; - width: 44px; - height: 44px; - border-radius: 15px; - display: flex; - align-items: center; - justify-content: center; - font-size: 19px; - font-weight: 800; - font-variant-numeric: tabular-nums; - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; -} + .beyond_cifra { + flex: none; + width: 44px; + height: 44px; + border-radius: 15px; + display: flex; + align-items: center; + justify-content: center; + font-size: 19px; + font-weight: 800; + font-variant-numeric: tabular-nums; + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + } -.beyond_negativa .beyond_cifra { - background: $beyond-panel-rojo-suave; - color: $beyond-panel-rojo; -} + .beyond_negativa .beyond_cifra { + background: $beyond-panel-rojo-suave; + color: $beyond-panel-rojo; + } -.beyond_alerta .beyond_cifra { - background: $inv-ambar-tinte; - color: $inv-ambar; -} + .beyond_alerta .beyond_cifra { + background: $inv-ambar-tinte; + color: $inv-ambar; + } -.beyond_indicador_texto { - display: flex; - flex-direction: column; - gap: 2px; - min-width: 0; -} + .beyond_indicador_texto { + display: flex; + flex-direction: column; + gap: 2px; + min-width: 0; + } -.beyond_indicador_titulo { - font-size: 14.5px; - font-weight: 800; - letter-spacing: -.01em; -} + .beyond_indicador_titulo { + font-size: 14.5px; + font-weight: 800; + letter-spacing: -.01em; + } -.beyond_indicador_pie { - font-size: 12.5px; - font-weight: 600; - color: $beyond-ink-muted; -} + .beyond_indicador_pie { + font-size: 12.5px; + font-weight: 600; + color: $beyond-ink-muted; + } -// ── Controles ─────────────────────────────────────────────────────────── -.beyond_inventario_controles { - display: flex; - align-items: center; - gap: 12px; - flex-wrap: wrap; -} + // ── Controles ─────────────────────────────────────────────────────────── + .beyond_inventario_controles { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; + } -.beyond_inventario_uso { - display: flex; - align-items: center; - gap: 4px; - background: $beyond-surface-hover; - border-radius: 999px; - padding: 4px; + .beyond_inventario_uso { + display: flex; + align-items: center; + gap: 4px; + background: $beyond-surface-hover; + border-radius: 999px; + padding: 4px; - button { + button { + all: unset; + cursor: pointer; + white-space: nowrap; + padding: 8px 17px; + border-radius: 999px; + font-size: 13.5px; + font-weight: 800; + color: $beyond-ink-soft; + transition: background 140ms ease, color 140ms ease; + + &.beyond_activo { + background: $beyond-panel-azul-inventario; + color: #FFFFFF; + } + + &:focus-visible { + outline: 2px solid $beyond-panel-azul-inventario; + outline-offset: 2px; + } + } + } + + .beyond_buscador { + display: flex; + align-items: center; + gap: 10px; + flex: 1 1 300px; + min-width: 240px; + max-width: 480px; + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 999px; + padding: 11px 20px; + color: $beyond-ink-muted; + transition: border-color 140ms ease, box-shadow 140ms ease; + + &:focus-within { + border-color: $beyond-panel-azul-inventario; + box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; + } + + input { + flex: 1; + min-width: 0; + border: 0; + outline: none; + background: transparent; + font-size: 14px; + font-weight: 600; + color: $beyond-ink; + + &::placeholder { color: $beyond-ink-muted; font-weight: 600; } + } + } + + .beyond_inventario_recibir { all: unset; cursor: pointer; - white-space: nowrap; - padding: 8px 17px; + margin-left: auto; + display: inline-flex; + align-items: center; + gap: 9px; + padding: 12px 22px; border-radius: 999px; + background: $beyond-panel-azul-inventario; + color: #FFFFFF; + font-size: 14px; + font-weight: 800; + transition: background 140ms ease; + + &:hover { background: $beyond-panel-azul-inventario-hover; } + + &:focus-visible { + outline: 2px solid $beyond-ink; + outline-offset: 2px; + } + } + + // ── Tabla ─────────────────────────────────────────────────────────────── + .beyond_tabla { + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 22px; + padding: 6px 12px 8px; + } + + .beyond_tabla_eje { + display: grid; + grid-template-columns: $inv-cols; + gap: 16px; + padding: 15px 14px 12px; + + span { + font-size: 11px; + font-weight: 800; + letter-spacing: .09em; + text-transform: uppercase; + color: $beyond-ink-muted; + } + + .beyond_eje_derecha { text-align: right; } + } + + .beyond_tabla_fila { + display: grid; + grid-template-columns: $inv-cols; + gap: 16px; + align-items: center; + padding: 13px 14px; + border-top: 1px solid $inv-linea; + border-radius: 14px; + transition: background 140ms ease; + + &:hover { background: $inv-campo; } + } + + .beyond_tabla_nombre { + font-size: 14.5px; + font-weight: 800; + letter-spacing: -.01em; + } + + .beyond_tabla_codigo { + font-size: 12.5px; + font-weight: 700; + color: $beyond-ink-muted; + } + + .beyond_uso_etiqueta { + justify-self: start; + font-size: 12px; + font-weight: 800; + border-radius: 999px; + padding: 4px 12px; + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + + // Lo que se usa prestando servicios no se vende: no lleva el azul, que + // aquí significa «mercancía que sale por caja». + &.beyond_insumo { + background: $beyond-surface-hover; + color: $beyond-ink-softer; + } + } + + .beyond_tabla_existencia { + text-align: right; + display: flex; + flex-direction: column; + gap: 1px; + } + + .beyond_tabla_cantidad { + font-size: 19px; + font-weight: 800; + letter-spacing: -.02em; + font-variant-numeric: tabular-nums; + } + + .beyond_tabla_estado { + font-size: 11.5px; + font-weight: 800; + } + + // El estado colorea SU renglón de texto, no la fila entera: el rojo y el + // ámbar son señal y pierden fuerza si tiñen media pantalla. + .beyond_estado_negativa .beyond_tabla_cantidad, + .beyond_estado_negativa .beyond_tabla_estado { color: $beyond-panel-rojo; } + .beyond_estado_agotarse .beyond_tabla_cantidad, + .beyond_estado_agotarse .beyond_tabla_estado { color: $inv-ambar; } + .beyond_estado_suficiente .beyond_tabla_estado { color: $inv-verde; } + .beyond_estado_sin .beyond_tabla_cantidad, + .beyond_estado_sin .beyond_tabla_estado { color: $beyond-ink-muted; } + + .beyond_tabla_minimo { + text-align: right; + font-size: 14px; + font-weight: 700; + color: $beyond-ink-softer; + } + + .beyond_tabla_entrada { + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink-softer; + } + + .beyond_tabla_acciones { + display: flex; + align-items: center; + gap: 8px; + justify-self: end; + + button { + all: unset; + cursor: pointer; + padding: 9px 17px; + border-radius: 999px; + font-size: 13px; + font-weight: 800; + background: $beyond-surface-hover; + color: $beyond-ink-soft; + transition: background 140ms ease; + + &:hover { background: $beyond-surface-active; } + + &:focus-visible { + outline: 2px solid $beyond-panel-azul-inventario; + outline-offset: 2px; + } + } + + // «Ajustar» en el tinte del azul: es la acción de inventario del + // renglón. Anidado bajo las acciones para no pisar la pantalla de + // ajuste, que usa la misma clase en su tarjeta. + .beyond_ajuste { + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + + &:hover { background: #D6E3EC; } + } + } + + .beyond_inventario_vacio { + padding: 48px 16px; + text-align: center; + font-size: 14px; + font-weight: 700; + color: $beyond-ink-muted; + } + + // La existencia negativa es SEÑAL, no decoración: se vendió algo que nunca + // se registró como recibido. + .beyond_aviso { + display: block; + font-size: 13px; + font-weight: 600; + color: $beyond-ink-muted; + padding: 4px 14px 8px; + text-wrap: pretty; + } + + + // ══ Migas de las pantallas de dentro ════════════════════════════════════ + .beyond_migas { + padding-bottom: 4px; + + .beyond_migas_texto { + display: flex; + flex-direction: column; + gap: 1px; + } + + .beyond_inventario_titulo { font-size: 21px; } + } + + // ══ Recibir mercancía ═══════════════════════════════════════════════════ + // Dos columnas: de dónde sale la mercancía y lo que ya se lleva contado. + .beyond_recibir_hoja { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 14px; + align-items: start; + + // Antes de romperse, se apilan: con la caja en la mano no se trabaja en + // dos columnas de 300px. + @media (max-width: 1100px) { grid-template-columns: 1fr; } + } + + .beyond_recibir_col { + display: flex; + flex-direction: column; + gap: 14px; + min-width: 0; + } + + // El mockup llama a esta tarjeta `.beyond_panel`, pero ese nombre YA está + // tomado: es la clase que lleva el
cuando se enciende la piel del + // Panel General. Con la regla suelta, el panel entero se pintaba de blanco + // con 18px de relleno y las pestañas acababan encima del título. + .beyond_inventario_panel { + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 22px; + padding: 18px 20px; + } + + .beyond_inventario_panel_cabeza { + display: flex; + align-items: baseline; + gap: 10px; + padding-bottom: 4px; + } + + .beyond_inventario_panel_titulo { + font-size: 11px; + font-weight: 800; + letter-spacing: .09em; + text-transform: uppercase; + color: $beyond-ink-muted; + } + + .beyond_inventario_panel_pie { + font-size: 12.5px; + font-weight: 600; + color: $beyond-ink-muted; + padding-top: 10px; + text-wrap: pretty; + } + + .beyond_inventario_panel_enlace { + all: unset; + cursor: pointer; + margin-left: auto; + font-size: 13px; + font-weight: 800; + color: $beyond-panel-azul-tinta; + + &:hover { text-decoration: underline; } + } + + .beyond_escaneo { + display: flex; + align-items: center; + gap: 10px; + + input { + flex: 1; + min-width: 0; + background: $inv-campo; + border: 1px solid $beyond-surface-active; + border-radius: 14px; + padding: 13px 16px 13px 44px; + outline: none; + font-size: 14.5px; + font-weight: 700; + color: $beyond-ink; + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: 15px center; + + &:focus { + border-color: $beyond-panel-azul-inventario; + box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; + } + } + } + + .beyond_escaneo_camara { + all: unset; + cursor: pointer; + flex: none; + width: 46px; + height: 46px; + border-radius: 14px; + display: flex; + align-items: center; + justify-content: center; + color: $beyond-ink-soft; + background: $beyond-surface-hover; + transition: background 140ms ease; + + &:hover { background: $beyond-surface-active; } + } + + // Un código que no está en el catálogo no es un error de quien escanea: se + // le dice qué hacer, y el texto lo escribe el servidor. + .beyond_escaneo_aviso { + display: flex; + align-items: flex-start; + gap: 10px; + margin-top: 12px; + background: $inv-ambar-tinte; + color: $inv-ambar; + border-radius: 14px; + padding: 12px 16px; + font-size: 13.5px; + font-weight: 700; + text-wrap: pretty; + + .fa { margin-top: 2px; } + } + + .beyond_catalogo_fila { + display: flex; + align-items: center; + gap: 12px; + padding: 12px 4px; + border-top: 1px solid $inv-linea; + + .beyond_tabla_nombre { flex: none; } + } + + .beyond_catalogo_tiene { + margin-left: auto; + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink-softer; + white-space: nowrap; + } + + .beyond_catalogo_mas { + all: unset; + cursor: pointer; + flex: none; + width: 32px; + height: 32px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + font-size: 18px; + font-weight: 800; + line-height: 1; + transition: background 140ms ease; + + &:hover { background: #D6E3EC; } + } + + .beyond_entrada_eje, + .beyond_entrada_fila { + display: grid; + grid-template-columns: 1.6fr 0.6fr 0.7fr 0.7fr auto; + gap: 12px; + align-items: center; + } + + .beyond_entrada_eje { + padding: 2px 4px 12px; + + span:not(:first-child) { text-align: right; } + } + + .beyond_entrada_fila { + padding: 11px 4px; + border-top: 1px solid $inv-linea; + } + + .beyond_entrada_num { + text-align: right; + font-size: 14px; + font-weight: 700; + } + + // Lo que quedará es la cifra que se compara con la caja física: pesa más + // que las otras dos. + .beyond_entrada_quedara { + font-size: 15px; + font-weight: 800; + color: $beyond-panel-azul-tinta; + } + + .beyond_entrada_rescate { + font-size: 12.5px; + font-weight: 700; + color: $beyond-panel-rojo; + } + + // La cantidad se escribe: una caja trae doce, no doce toques. + .beyond_entrada_cantidad { + width: 100%; + text-align: right; + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 10px; + padding: 7px 10px; + outline: none; + font-size: 14px; + font-weight: 800; + color: $beyond-ink; + + &:focus { + border-color: $beyond-panel-azul-inventario; + box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; + } + } + + .beyond_entrada_quitar { + all: unset; + cursor: pointer; + width: 26px; + height: 26px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; + color: $beyond-ink-muted; + font-size: 15px; + font-weight: 800; + + &:hover { background: $beyond-surface-hover; color: $beyond-panel-rojo; } + } + + .beyond_entrada_vacio { + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + padding: 46px 16px; + + .fa { font-size: 26px; color: $beyond-surface-active; } + b { font-size: 14.5px; font-weight: 800; } + span { font-size: 13px; font-weight: 600; color: $beyond-ink-muted; } + } + + .beyond_nota input { + width: 100%; + background: $inv-campo; + border: 1px solid $beyond-surface-active; + border-radius: 14px; + padding: 12px 16px; + outline: none; + font-size: 14px; + font-weight: 600; + color: $beyond-ink; + margin-top: 10px; + } + + .beyond_pie_acciones { + display: flex; + align-items: center; + gap: 14px; + flex-wrap: wrap; + padding-top: 14px; + } + + .beyond_boton_azul { + all: unset; + cursor: pointer; + padding: 12px 24px; + border-radius: 999px; + background: $beyond-panel-azul-inventario; + color: #FFFFFF; + font-size: 14px; + font-weight: 800; + transition: background 140ms ease; + + &:hover { background: $beyond-panel-azul-inventario-hover; } + + &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } + + // Apagado CON su razón al lado, que va en el marcado. + &[disabled] { + background: $beyond-surface-hover; + color: $beyond-ink-muted; + cursor: default; + } + } + + .beyond_boton_llano { + all: unset; + cursor: pointer; + padding: 12px 22px; + border-radius: 999px; + background: $beyond-surface-hover; + color: $beyond-ink-soft; + font-size: 14px; + font-weight: 800; + + &:hover { background: $beyond-surface-active; } + + &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } + } + + .beyond_razon { + font-size: 13px; + font-weight: 700; + color: $beyond-ink-muted; + } + + // ══ Ajustar existencia ══════════════════════════════════════════════════ + .beyond_ajustar_hoja { + max-width: 820px; + margin: 0 auto; + width: 100%; + } + + .beyond_inventario_panel.beyond_ajustar_panel { padding: 24px 26px 22px; } + + .beyond_ajustar_cabeza { + display: flex; + align-items: center; + gap: 12px; + padding-bottom: 18px; + + .beyond_tabla_nombre { font-size: 21px; } + } + + .beyond_ajustar_paso { + display: grid; + grid-template-columns: 1fr auto 1fr; + gap: 14px; + align-items: center; + + @media (max-width: 620px) { grid-template-columns: 1fr; } + } + + .beyond_ajustar_caja { + background: $inv-campo; + border: 1px solid $beyond-surface-active; + border-radius: 18px; + padding: 14px 18px 16px; + display: flex; + flex-direction: column; + gap: 4px; + + &.beyond_destino { + background: $beyond-panel-azul-tinte; + border-color: #CDDDE8; + + .beyond_inventario_panel_titulo { color: $beyond-panel-azul-tinta; } + } + } + + .beyond_ajustar_valor { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + font-size: 27px; + font-weight: 800; + letter-spacing: -.02em; + } + + .beyond_ajustar_paso1 { + all: unset; + cursor: pointer; + width: 36px; + height: 36px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; + background: $beyond-panel-tarjeta; + border: 1px solid $beyond-surface-active; + font-size: 19px; + font-weight: 800; + line-height: 1; + + &:hover { background: $beyond-surface-hover; } + } + + // Escribible: de −3 a 40 con el botón + son cuarenta y tres toques. + .beyond_ajustar_campo { + width: 92px; + text-align: center; + background: $beyond-panel-tarjeta; + border: 1px solid #CDDDE8; + border-radius: 12px; + padding: 4px 6px; + outline: none; + font-size: 27px; + font-weight: 800; + letter-spacing: -.02em; + color: $beyond-ink; + font-family: inherit; + + &:focus { + border-color: $beyond-panel-azul-inventario; + box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; + } + } + + .beyond_ajustar_flecha { + color: $beyond-ink-muted; + font-size: 19px; + font-weight: 800; + text-align: center; + } + + // La diferencia, dicha: «bajan 4» se entiende sin haber aprendido qué + // significa el ámbar. + .beyond_ajustar_diferencia { + display: flex; + align-items: center; + gap: 10px; + margin: 16px 0 20px; + background: $beyond-surface-hover; + border-radius: 16px; + padding: 13px 17px; + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink-soft; + + &.beyond_sube { + background: $beyond-panel-azul-tinte; + color: $beyond-panel-azul-tinta; + } + + &.beyond_baja { background: $inv-ambar-tinte; color: $inv-ambar; } + } + + .beyond_motivos { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin: 10px 0 20px; + } + + // El elegido tiene que verse a un metro: dos chips que se distinguen por un + // gris casi igual es lo mismo que ninguno elegido — el tropiezo que ya tuvo + // «Nivel de acceso» en la ficha de personal. + .beyond_motivo { + all: unset; + cursor: pointer; + padding: 10px 18px; + border-radius: 999px; + background: $beyond-surface; + color: $beyond-ink-soft; font-size: 13.5px; font-weight: 800; - color: $beyond-ink-soft; transition: background 140ms ease, color 140ms ease; + &:hover { background: $beyond-surface-hover; } + &.beyond_activo { background: $beyond-panel-azul-inventario; color: #FFFFFF; @@ -194,873 +907,167 @@ $inv-cols: 1.5fr 1fr 0.8fr 0.5fr 0.9fr 180px; outline-offset: 2px; } } -} -.beyond_buscador { - display: flex; - align-items: center; - gap: 10px; - flex: 1 1 300px; - min-width: 240px; - max-width: 480px; - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 999px; - padding: 11px 20px; - color: $beyond-ink-muted; - transition: border-color 140ms ease, box-shadow 140ms ease; - - &:focus-within { - border-color: $beyond-panel-azul-inventario; - box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; - } - - input { - flex: 1; - min-width: 0; - border: 0; - outline: none; - background: transparent; - font-size: 14px; - font-weight: 600; - color: $beyond-ink; - - &::placeholder { color: $beyond-ink-muted; font-weight: 600; } - } -} - -.beyond_inventario_recibir { - all: unset; - cursor: pointer; - margin-left: auto; - display: inline-flex; - align-items: center; - gap: 9px; - padding: 12px 22px; - border-radius: 999px; - background: $beyond-panel-azul-inventario; - color: #FFFFFF; - font-size: 14px; - font-weight: 800; - transition: background 140ms ease; - - &:hover { background: $beyond-panel-azul-inventario-hover; } - - &:focus-visible { - outline: 2px solid $beyond-ink; - outline-offset: 2px; - } -} - -// ── Tabla ─────────────────────────────────────────────────────────────── -.beyond_tabla { - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 22px; - padding: 6px 12px 8px; -} - -.beyond_tabla_eje { - display: grid; - grid-template-columns: $inv-cols; - gap: 16px; - padding: 15px 14px 12px; - - span { - font-size: 11px; - font-weight: 800; - letter-spacing: .09em; - text-transform: uppercase; - color: $beyond-ink-muted; - } - - .beyond_eje_derecha { text-align: right; } -} - -.beyond_tabla_fila { - display: grid; - grid-template-columns: $inv-cols; - gap: 16px; - align-items: center; - padding: 13px 14px; - border-top: 1px solid $inv-linea; - border-radius: 14px; - transition: background 140ms ease; - - &:hover { background: $inv-campo; } -} - -.beyond_tabla_nombre { - font-size: 14.5px; - font-weight: 800; - letter-spacing: -.01em; -} - -.beyond_tabla_codigo { - font-size: 12.5px; - font-weight: 700; - color: $beyond-ink-muted; -} - -.beyond_uso_etiqueta { - justify-self: start; - font-size: 12px; - font-weight: 800; - border-radius: 999px; - padding: 4px 12px; - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; - - // Lo que se usa prestando servicios no se vende: no lleva el azul, que - // aquí significa «mercancía que sale por caja». - &.beyond_insumo { - background: $beyond-surface-hover; - color: $beyond-ink-softer; - } -} - -.beyond_tabla_existencia { - text-align: right; - display: flex; - flex-direction: column; - gap: 1px; -} - -.beyond_tabla_cantidad { - font-size: 19px; - font-weight: 800; - letter-spacing: -.02em; - font-variant-numeric: tabular-nums; -} - -.beyond_tabla_estado { - font-size: 11.5px; - font-weight: 800; -} - -// El estado colorea SU renglón de texto, no la fila entera: el rojo y el -// ámbar son señal y pierden fuerza si tiñen media pantalla. -.beyond_estado_negativa .beyond_tabla_cantidad, -.beyond_estado_negativa .beyond_tabla_estado { color: $beyond-panel-rojo; } -.beyond_estado_agotarse .beyond_tabla_cantidad, -.beyond_estado_agotarse .beyond_tabla_estado { color: $inv-ambar; } -.beyond_estado_suficiente .beyond_tabla_estado { color: $inv-verde; } -.beyond_estado_sin .beyond_tabla_cantidad, -.beyond_estado_sin .beyond_tabla_estado { color: $beyond-ink-muted; } - -.beyond_tabla_minimo { - text-align: right; - font-size: 14px; - font-weight: 700; - color: $beyond-ink-softer; -} - -.beyond_tabla_entrada { - font-size: 13.5px; - font-weight: 700; - color: $beyond-ink-softer; -} - -.beyond_tabla_acciones { - display: flex; - align-items: center; - gap: 8px; - justify-self: end; - - button { - all: unset; - cursor: pointer; - padding: 9px 17px; - border-radius: 999px; - font-size: 13px; - font-weight: 800; - background: $beyond-surface-hover; - color: $beyond-ink-soft; - transition: background 140ms ease; - - &:hover { background: $beyond-surface-active; } - - &:focus-visible { - outline: 2px solid $beyond-panel-azul-inventario; - outline-offset: 2px; - } - } - - // «Ajustar» en el tinte del azul: es la acción de inventario del - // renglón. Anidado bajo las acciones para no pisar la pantalla de - // ajuste, que usa la misma clase en su tarjeta. - .beyond_ajuste { - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; - - &:hover { background: #D6E3EC; } - } -} - -.beyond_inventario_vacio { - padding: 48px 16px; - text-align: center; - font-size: 14px; - font-weight: 700; - color: $beyond-ink-muted; -} - -// La existencia negativa es SEÑAL, no decoración: se vendió algo que nunca -// se registró como recibido. -.beyond_aviso { - display: block; - font-size: 13px; - font-weight: 600; - color: $beyond-ink-muted; - padding: 4px 14px 8px; - text-wrap: pretty; -} - - -// ══ Migas de las pantallas de dentro ════════════════════════════════════ -.beyond_migas { - padding-bottom: 4px; - - .beyond_migas_texto { - display: flex; - flex-direction: column; - gap: 1px; - } - - .beyond_inventario_titulo { font-size: 21px; } -} - -// ══ Recibir mercancía ═══════════════════════════════════════════════════ -// Dos columnas: de dónde sale la mercancía y lo que ya se lleva contado. -.beyond_recibir_hoja { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 14px; - align-items: start; - - // Antes de romperse, se apilan: con la caja en la mano no se trabaja en - // dos columnas de 300px. - @media (max-width: 1100px) { grid-template-columns: 1fr; } -} - -.beyond_recibir_col { - display: flex; - flex-direction: column; - gap: 14px; - min-width: 0; -} - -// El mockup llama a esta tarjeta `.beyond_panel`, pero ese nombre YA está -// tomado: es la clase que lleva el cuando se enciende la piel del -// Panel General. Con la regla suelta, el panel entero se pintaba de blanco -// con 18px de relleno y las pestañas acababan encima del título. -.beyond_inventario_panel { - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 22px; - padding: 18px 20px; -} - -.beyond_inventario_panel_cabeza { - display: flex; - align-items: baseline; - gap: 10px; - padding-bottom: 4px; -} - -.beyond_inventario_panel_titulo { - font-size: 11px; - font-weight: 800; - letter-spacing: .09em; - text-transform: uppercase; - color: $beyond-ink-muted; -} - -.beyond_inventario_panel_pie { - font-size: 12.5px; - font-weight: 600; - color: $beyond-ink-muted; - padding-top: 10px; - text-wrap: pretty; -} - -.beyond_inventario_panel_enlace { - all: unset; - cursor: pointer; - margin-left: auto; - font-size: 13px; - font-weight: 800; - color: $beyond-panel-azul-tinta; - - &:hover { text-decoration: underline; } -} - -.beyond_escaneo { - display: flex; - align-items: center; - gap: 10px; - - input { - flex: 1; - min-width: 0; + .beyond_comentario input { + width: 100%; background: $inv-campo; border: 1px solid $beyond-surface-active; border-radius: 14px; - padding: 13px 16px 13px 44px; + padding: 12px 16px; outline: none; - font-size: 14.5px; - font-weight: 700; + font-size: 14px; + font-weight: 600; color: $beyond-ink; - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 15px center; - - &:focus { - border-color: $beyond-panel-azul-inventario; - box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; - } + margin-top: 10px; } -} -.beyond_escaneo_camara { - all: unset; - cursor: pointer; - flex: none; - width: 46px; - height: 46px; - border-radius: 14px; - display: flex; - align-items: center; - justify-content: center; - color: $beyond-ink-soft; - background: $beyond-surface-hover; - transition: background 140ms ease; - - &:hover { background: $beyond-surface-active; } -} - -// Un código que no está en el catálogo no es un error de quien escanea: se -// le dice qué hacer, y el texto lo escribe el servidor. -.beyond_escaneo_aviso { - display: flex; - align-items: flex-start; - gap: 10px; - margin-top: 12px; - background: $inv-ambar-tinte; - color: $inv-ambar; - border-radius: 14px; - padding: 12px 16px; - font-size: 13.5px; - font-weight: 700; - text-wrap: pretty; - - .fa { margin-top: 2px; } -} - -.beyond_catalogo_fila { - display: flex; - align-items: center; - gap: 12px; - padding: 12px 4px; - border-top: 1px solid $inv-linea; - - .beyond_tabla_nombre { flex: none; } -} - -.beyond_catalogo_tiene { - margin-left: auto; - font-size: 13.5px; - font-weight: 700; - color: $beyond-ink-softer; - white-space: nowrap; -} - -.beyond_catalogo_mas { - all: unset; - cursor: pointer; - flex: none; - width: 32px; - height: 32px; - border-radius: 999px; - display: flex; - align-items: center; - justify-content: center; - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; - font-size: 18px; - font-weight: 800; - line-height: 1; - transition: background 140ms ease; - - &:hover { background: #D6E3EC; } -} - -.beyond_entrada_eje, -.beyond_entrada_fila { - display: grid; - grid-template-columns: 1.6fr 0.6fr 0.7fr 0.7fr auto; - gap: 12px; - align-items: center; -} - -.beyond_entrada_eje { - padding: 2px 4px 12px; - - span:not(:first-child) { text-align: right; } -} - -.beyond_entrada_fila { - padding: 11px 4px; - border-top: 1px solid $inv-linea; -} - -.beyond_entrada_num { - text-align: right; - font-size: 14px; - font-weight: 700; -} - -// Lo que quedará es la cifra que se compara con la caja física: pesa más -// que las otras dos. -.beyond_entrada_quedara { - font-size: 15px; - font-weight: 800; - color: $beyond-panel-azul-tinta; -} - -.beyond_entrada_rescate { - font-size: 12.5px; - font-weight: 700; - color: $beyond-panel-rojo; -} - -// La cantidad se escribe: una caja trae doce, no doce toques. -.beyond_entrada_cantidad { - width: 100%; - text-align: right; - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - border-radius: 10px; - padding: 7px 10px; - outline: none; - font-size: 14px; - font-weight: 800; - color: $beyond-ink; - - &:focus { - border-color: $beyond-panel-azul-inventario; - box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; - } -} - -.beyond_entrada_quitar { - all: unset; - cursor: pointer; - width: 26px; - height: 26px; - border-radius: 999px; - display: flex; - align-items: center; - justify-content: center; - color: $beyond-ink-muted; - font-size: 15px; - font-weight: 800; - - &:hover { background: $beyond-surface-hover; color: $beyond-panel-rojo; } -} - -.beyond_entrada_vacio { - display: flex; - flex-direction: column; - align-items: center; - gap: 8px; - padding: 46px 16px; - - .fa { font-size: 26px; color: $beyond-surface-active; } - b { font-size: 14.5px; font-weight: 800; } - span { font-size: 13px; font-weight: 600; color: $beyond-ink-muted; } -} - -.beyond_nota input { - width: 100%; - background: $inv-campo; - border: 1px solid $beyond-surface-active; - border-radius: 14px; - padding: 12px 16px; - outline: none; - font-size: 14px; - font-weight: 600; - color: $beyond-ink; - margin-top: 10px; -} - -.beyond_pie_acciones { - display: flex; - align-items: center; - gap: 14px; - flex-wrap: wrap; - padding-top: 14px; -} - -.beyond_boton_azul { - all: unset; - cursor: pointer; - padding: 12px 24px; - border-radius: 999px; - background: $beyond-panel-azul-inventario; - color: #FFFFFF; - font-size: 14px; - font-weight: 800; - transition: background 140ms ease; - - &:hover { background: $beyond-panel-azul-inventario-hover; } - - &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } - - // Apagado CON su razón al lado, que va en el marcado. - &[disabled] { - background: $beyond-surface-hover; - color: $beyond-ink-muted; - cursor: default; - } -} - -.beyond_boton_llano { - all: unset; - cursor: pointer; - padding: 12px 22px; - border-radius: 999px; - background: $beyond-surface-hover; - color: $beyond-ink-soft; - font-size: 14px; - font-weight: 800; - - &:hover { background: $beyond-surface-active; } - - &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } -} - -.beyond_razon { - font-size: 13px; - font-weight: 700; - color: $beyond-ink-muted; -} - -// ══ Ajustar existencia ══════════════════════════════════════════════════ -.beyond_ajustar_hoja { - max-width: 820px; - margin: 0 auto; - width: 100%; -} - -.beyond_inventario_panel.beyond_ajustar_panel { padding: 24px 26px 22px; } - -.beyond_ajustar_cabeza { - display: flex; - align-items: center; - gap: 12px; - padding-bottom: 18px; - - .beyond_tabla_nombre { font-size: 21px; } -} - -.beyond_ajustar_paso { - display: grid; - grid-template-columns: 1fr auto 1fr; - gap: 14px; - align-items: center; - - @media (max-width: 620px) { grid-template-columns: 1fr; } -} - -.beyond_ajustar_caja { - background: $inv-campo; - border: 1px solid $beyond-surface-active; - border-radius: 18px; - padding: 14px 18px 16px; - display: flex; - flex-direction: column; - gap: 4px; - - &.beyond_destino { - background: $beyond-panel-azul-tinte; - border-color: #CDDDE8; - - .beyond_inventario_panel_titulo { color: $beyond-panel-azul-tinta; } - } -} - -.beyond_ajustar_valor { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - font-size: 27px; - font-weight: 800; - letter-spacing: -.02em; -} - -.beyond_ajustar_paso1 { - all: unset; - cursor: pointer; - width: 36px; - height: 36px; - border-radius: 999px; - display: flex; - align-items: center; - justify-content: center; - background: $beyond-panel-tarjeta; - border: 1px solid $beyond-surface-active; - font-size: 19px; - font-weight: 800; - line-height: 1; - - &:hover { background: $beyond-surface-hover; } -} - -// Escribible: de −3 a 40 con el botón + son cuarenta y tres toques. -.beyond_ajustar_campo { - width: 92px; - text-align: center; - background: $beyond-panel-tarjeta; - border: 1px solid #CDDDE8; - border-radius: 12px; - padding: 4px 6px; - outline: none; - font-size: 27px; - font-weight: 800; - letter-spacing: -.02em; - color: $beyond-ink; - font-family: inherit; - - &:focus { - border-color: $beyond-panel-azul-inventario; - box-shadow: 0 0 0 1px $beyond-panel-azul-inventario; - } -} - -.beyond_ajustar_flecha { - color: $beyond-ink-muted; - font-size: 19px; - font-weight: 800; - text-align: center; -} - -// La diferencia, dicha: «bajan 4» se entiende sin haber aprendido qué -// significa el ámbar. -.beyond_ajustar_diferencia { - display: flex; - align-items: center; - gap: 10px; - margin: 16px 0 20px; - background: $beyond-surface-hover; - border-radius: 16px; - padding: 13px 17px; - font-size: 13.5px; - font-weight: 700; - color: $beyond-ink-soft; - - &.beyond_sube { + .beyond_ajustar_aviso { + display: flex; + align-items: center; + gap: 11px; + margin: 20px 0 4px; background: $beyond-panel-azul-tinte; color: $beyond-panel-azul-tinta; + border-radius: 16px; + padding: 13px 17px; + font-size: 13.5px; + font-weight: 700; + text-wrap: pretty; } - &.beyond_baja { background: $inv-ambar-tinte; color: $inv-ambar; } -} - -.beyond_motivos { - display: flex; - flex-wrap: wrap; - gap: 8px; - margin: 10px 0 20px; -} - -// El elegido tiene que verse a un metro: dos chips que se distinguen por un -// gris casi igual es lo mismo que ninguno elegido — el tropiezo que ya tuvo -// «Nivel de acceso» en la ficha de personal. -.beyond_motivo { - all: unset; - cursor: pointer; - padding: 10px 18px; - border-radius: 999px; - background: $beyond-surface; - color: $beyond-ink-soft; - font-size: 13.5px; - font-weight: 800; - transition: background 140ms ease, color 140ms ease; - - &:hover { background: $beyond-surface-hover; } - - &.beyond_activo { - background: $beyond-panel-azul-inventario; - color: #FFFFFF; + // ══ Historial · cajón lateral ═══════════════════════════════════════════ + .beyond_cajon_fondo { + position: fixed; + inset: 0; + background: rgba(35, 32, 29, .34); + z-index: 1050; } - &:focus-visible { - outline: 2px solid $beyond-panel-azul-inventario; - outline-offset: 2px; + .beyond_cajon { + position: fixed; + top: 0; + right: 0; + bottom: 0; + // Nada de `min()`: Sass intenta resolverlo en tiempo de compilación, + // con unidades mezcladas revienta y se lleva el archivo entero por + // delante —sin una sola línea de estilo, y sin error visible—. + width: 440px; + max-width: 92vw; + z-index: 1051; + background: $beyond-panel-tarjeta; + border-left: 1px solid $beyond-surface-active; + display: flex; + flex-direction: column; + overflow-y: auto; + padding: 22px 24px 32px; + } + + .beyond_cajon_cabeza { + display: flex; + align-items: flex-start; + gap: 12px; + padding-bottom: 16px; + } + + .beyond_cajon_identidad { + display: flex; + flex-direction: column; + gap: 3px; + min-width: 0; + } + + .beyond_cajon_titulo { + font-size: 19px; + font-weight: 800; + letter-spacing: -.01em; + } + + .beyond_cajon_pie { + font-size: 13px; + font-weight: 700; + color: $beyond-ink-muted; + } + + .beyond_cajon_cerrar { + all: unset; + cursor: pointer; + margin-left: auto; + flex: none; + width: 32px; + height: 32px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; + color: $beyond-ink-muted; + font-size: 17px; + font-weight: 800; + + &:hover { background: $beyond-surface-hover; color: $beyond-ink; } + } + + .beyond_cajon_filtros { + display: flex; + flex-wrap: wrap; + gap: 8px; + padding-bottom: 8px; + + .beyond_inventario_uso button { padding: 6px 13px; font-size: 12.5px; } + } + + .beyond_movimiento { + display: flex; + flex-direction: column; + gap: 3px; + padding: 14px 2px; + border-top: 1px solid $inv-linea; + } + + .beyond_movimiento_alto { + display: flex; + align-items: baseline; + gap: 10px; + } + + .beyond_movimiento_tipo { + font-size: 14px; + font-weight: 800; + } + + .beyond_movimiento_cantidad { + margin-left: auto; + font-size: 14.5px; + font-weight: 800; + + &.beyond_entra { color: $beyond-panel-azul-tinta; } + &.beyond_sale { color: $inv-ambar; } + } + + .beyond_movimiento_detalle { + font-size: 13px; + font-weight: 600; + color: $beyond-ink-softer; + text-wrap: pretty; + } + + .beyond_movimiento_quien { + font-size: 12.5px; + font-weight: 700; + color: $beyond-ink-muted; + } + + // En cuánto quedó: es lo que deja seguir la cuenta hacia atrás. + .beyond_movimiento_resultante { + font-size: 12.5px; + font-weight: 800; + color: $beyond-ink-muted; + } + + .beyond_cajon_nota { + margin: 16px 0 0; + font-size: 12.5px; + font-weight: 600; + color: $beyond-ink-muted; + text-wrap: pretty; } } - -.beyond_comentario input { - width: 100%; - background: $inv-campo; - border: 1px solid $beyond-surface-active; - border-radius: 14px; - padding: 12px 16px; - outline: none; - font-size: 14px; - font-weight: 600; - color: $beyond-ink; - margin-top: 10px; -} - -.beyond_ajustar_aviso { - display: flex; - align-items: center; - gap: 11px; - margin: 20px 0 4px; - background: $beyond-panel-azul-tinte; - color: $beyond-panel-azul-tinta; - border-radius: 16px; - padding: 13px 17px; - font-size: 13.5px; - font-weight: 700; - text-wrap: pretty; -} - -// ══ Historial · cajón lateral ═══════════════════════════════════════════ -.beyond_cajon_fondo { - position: fixed; - inset: 0; - background: rgba(35, 32, 29, .34); - z-index: 1050; -} - -.beyond_cajon { - position: fixed; - top: 0; - right: 0; - bottom: 0; - // Nada de `min()`: Sass intenta resolverlo en tiempo de compilación, - // con unidades mezcladas revienta y se lleva el archivo entero por - // delante —sin una sola línea de estilo, y sin error visible—. - width: 440px; - max-width: 92vw; - z-index: 1051; - background: $beyond-panel-tarjeta; - border-left: 1px solid $beyond-surface-active; - display: flex; - flex-direction: column; - overflow-y: auto; - padding: 22px 24px 32px; -} - -.beyond_cajon_cabeza { - display: flex; - align-items: flex-start; - gap: 12px; - padding-bottom: 16px; -} - -.beyond_cajon_identidad { - display: flex; - flex-direction: column; - gap: 3px; - min-width: 0; -} - -.beyond_cajon_titulo { - font-size: 19px; - font-weight: 800; - letter-spacing: -.01em; -} - -.beyond_cajon_pie { - font-size: 13px; - font-weight: 700; - color: $beyond-ink-muted; -} - -.beyond_cajon_cerrar { - all: unset; - cursor: pointer; - margin-left: auto; - flex: none; - width: 32px; - height: 32px; - border-radius: 999px; - display: flex; - align-items: center; - justify-content: center; - color: $beyond-ink-muted; - font-size: 17px; - font-weight: 800; - - &:hover { background: $beyond-surface-hover; color: $beyond-ink; } -} - -.beyond_cajon_filtros { - display: flex; - flex-wrap: wrap; - gap: 8px; - padding-bottom: 8px; - - .beyond_inventario_uso button { padding: 6px 13px; font-size: 12.5px; } -} - -.beyond_movimiento { - display: flex; - flex-direction: column; - gap: 3px; - padding: 14px 2px; - border-top: 1px solid $inv-linea; -} - -.beyond_movimiento_alto { - display: flex; - align-items: baseline; - gap: 10px; -} - -.beyond_movimiento_tipo { - font-size: 14px; - font-weight: 800; -} - -.beyond_movimiento_cantidad { - margin-left: auto; - font-size: 14.5px; - font-weight: 800; - - &.beyond_entra { color: $beyond-panel-azul-tinta; } - &.beyond_sale { color: $inv-ambar; } -} - -.beyond_movimiento_detalle { - font-size: 13px; - font-weight: 600; - color: $beyond-ink-softer; - text-wrap: pretty; -} - -.beyond_movimiento_quien { - font-size: 12.5px; - font-weight: 700; - color: $beyond-ink-muted; -} - -// En cuánto quedó: es lo que deja seguir la cuenta hacia atrás. -.beyond_movimiento_resultante { - font-size: 12.5px; - font-weight: 800; - color: $beyond-ink-muted; -} - -.beyond_cajon_nota { - margin: 16px 0 0; - font-size: 12.5px; - font-weight: 600; - color: $beyond-ink-muted; - text-wrap: pretty; -} diff --git a/addons/beyond_pos/static/src/pos/pos.js b/addons/beyond_pos/static/src/pos/pos.js index c632050..94e6876 100644 --- a/addons/beyond_pos/static/src/pos/pos.js +++ b/addons/beyond_pos/static/src/pos/pos.js @@ -139,6 +139,48 @@ export class BeyondPos extends Component { return this.state.historico?.opciones?.hoy || ""; } + /** + * Cuántas cajas de la plaza tienen sesión abierta. Lo cuenta el + * cliente sobre lo que ya vino: preguntarlo al servidor sería pedir + * otra vez un dato que está en la mano. + */ + abiertas(grupo) { + return grupo.cajas.filter((caja) => caja.abierta).length; + } + + /** Cómo se llama la pestaña abierta. */ + get nombrePestana() { + return { + ordenes: "órdenes", + sesiones: "sesiones y cortes", + pagos: "pagos", + }[this.state.pestana] || "lo que se ve"; + } + + /** + * Qué se va a bajar, dicho entero. Va en el `title` de los dos botones + * porque el alcance del archivo es lo único que importa antes de + * mandarlo por correo: si dice «Sucursal Centro», no lleva la red. + */ + get tituloDescarga() { + const partes = [this.nombrePestana]; + const plaza = (this.state.historico?.opciones?.sucursales || []) + .find((s) => s.id === this.state.filtros.branch_id); + partes.push(plaza ? plaza.nombre : "todas las sucursales"); + const caja = this.cajasElegibles + .find((c) => c.id === this.state.filtros.config_id); + // La caja única de una plaza se llama como la plaza, y repetirlo + // —«Sucursal Centro · Sucursal Centro»— parece un error. + if (caja && caja.nombre !== partes[partes.length - 1]) { + partes.push(caja.nombre); + } + if (this.state.filtros.busqueda) { + partes.push(`«${this.state.filtros.busqueda}»`); + } + return `Baja ${partes.join(" · ")}, con el periodo y los filtros` + + " que están puestos ahora mismo."; + } + periodoActivo(dias) { // Con rango propio puesto, ningún preset está elegido. return !this.hayRango && this.state.filtros.dias === dias; @@ -440,6 +482,17 @@ export class BeyondPos extends Component { : tipos[0]; } + /** + * Si hay algo que dibujar. Un lienzo de 16rem en blanco no dice «no hay + * datos»: parece que la gráfica se rompió. + */ + get hayDatosGrafica() { + if (this.tipoVigente === "tendencia") { + return this.lineas.length > 0; + } + return (this.grafica?.categorias || []).length > 0; + } + color(clave) { return COLOR_POR_CLASE[clave] || COLOR_POR_CLASE.otro; } diff --git a/addons/beyond_pos/static/src/pos/pos.scss b/addons/beyond_pos/static/src/pos/pos.scss index 2a3b2f1..15ebc42 100644 --- a/addons/beyond_pos/static/src/pos/pos.scss +++ b/addons/beyond_pos/static/src/pos/pos.scss @@ -1,122 +1,698 @@ -// Supervisión: se mira, no se opera. Lo que cambia de estado se ve sin leer. +// Punto de venta · supervisión: se mira, no se opera. Lo que cambia de +// estado se ve sin leer. +// +// El verde es $beyond-primary, el de la marca. Los grises, las líneas y el +// papel salen de beyond_variables.scss; lo de aquí abajo es local de estas +// pantallas. + +// Tinte del verde para chips y renglones destacados: el sólido es para lo +// que se pulsa, no para lo que se lee. +$pos-verde-tinte: #DDEFE8; +$pos-verde-fila: #EDF4F0; +$pos-verde-total: #E1EDE7; +// El lienzo de las tarjetas. +$pos-linea: #ECEAE3; +$pos-campo: #F6F5F1; +$pos-hover: #FAF9F6; +// El blanco de la tarjeta y el rojo del faltante se escriben aquí: los +// tokens del panel viven en beyond_branch y aquí dependerían del orden del +// paquete. +$pos-tarjeta: #FFFFFF; +$pos-rojo: #C0392B; +// Colores de las series. Van por lo que SON, no por el orden en que llegan +// (ADR-020): apagar una clase no le cambia el color a las demás. +$pos-serie-1: #17A87F; +$pos-serie-2: #EFB13C; +$pos-serie-3: #4A90DA; + .o_beyond_pos { height: 100%; - overflow: auto; + // El ancho lo manda el panel, no el contenido: sin esto una tabla + // larga o una fila de botones estiraba la página entera y lo de la + // derecha se cortaba. Lo que no quepa se desplaza DENTRO de su caja + // —la tabla ya tiene la suya—, nunca moviendo la página. + width: 100%; + // Los mismos márgenes que Tableros: la hoja se centra y no se estira + // más allá de 1560px. En una pantalla ancha, una tabla de borde a borde + // obliga a barrer la cabeza para leer un renglón. + max-width: 1560px; + margin: 0 auto; + overflow-y: auto; + overflow-x: hidden; + background: $beyond-surface; + color: $beyond-ink; + padding: 20px 24px 44px; - .beyond_total { font-size: 1.25rem; font-weight: 600; } - .beyond_cifra .beyond_valor { - font-size: 1.75rem; font-weight: 600; line-height: 1.1; - font-variant-numeric: tabular-nums; + // Un hijo de flex o de grid no baja de su tamaño natural mientras no + // se le diga: este es el `min-width: auto` que estira las rejillas. + .row > [class^="col"], .beyond_filtros > div, .beyond_plaza_cuerpo { min-width: 0; } + + .beyond_valor, .beyond_valor_chico, h2, h3, h4 { overflow-wrap: anywhere; } +} + +// ── Cabeceras de pantalla ─────────────────────────────────────────────── +.o_beyond_pos { + h2 { + font-size: 30px; + font-weight: 800; + letter-spacing: -.025em; } - .beyond_folio { font-family: var(--bs-font-monospace); font-size: .9em; } - .beyond_tabla td, .beyond_tabla th { padding-block: .6rem; } - .beyond_tabla .text-end { font-variant-numeric: tabular-nums; } - // Un punto basta para el estado: el color ya lo dice. + h3 { + font-size: 17px; + font-weight: 800; + letter-spacing: -.015em; + } + + h4 { + font-size: 19px; + font-weight: 800; + letter-spacing: -.015em; + } + + .beyond_titulillo, + .beyond_etiqueta_filtro { + display: block; + font-size: 11px; + font-weight: 800; + letter-spacing: .09em; + text-transform: uppercase; + color: $beyond-ink-muted; + } + + .beyond_pie_dato { + font-size: 12.5px; + font-weight: 700; + color: $beyond-ink-muted; + } + + .beyond_recorta { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .beyond_nulo { color: $beyond-ink-muted; } + .beyond_resta { color: $pos-rojo; } + + // La vuelta y las acciones de la cabecera. + .beyond_volver { + all: unset; + cursor: pointer; + padding: 10px 20px; + border-radius: 999px; + background: $beyond-surface-hover; + color: $beyond-ink; + font-size: 13.5px; + font-weight: 800; + white-space: nowrap; + + &:hover { background: $beyond-surface-active; } + &:focus-visible { outline: 2px solid $beyond-primary; outline-offset: 2px; } + } +} + +// ── Botones ───────────────────────────────────────────────────────────── +.o_beyond_pos { + .beyond_boton { + all: unset; + cursor: pointer; + box-sizing: border-box; + text-align: center; + padding: 13px 22px; + border-radius: 999px; + background: $beyond-primary; + color: #FFFFFF; + // El `!important` no es capricho: Tableros tiene un `.beyond_suave` + // suelto en la raíz con `font-size: 13.5px !important` y le caía a + // los botones de caja cerrada, que sí llevan esa clase: quedaban con + // otra letra que el de al lado. Se defiende aquí y en `beyond_chico` + // —donde se decide el tamaño— y no en `beyond_suave`, porque hay + // botones que llevan las dos y el chico tiene que seguir siendo + // chico. La deuda de fondo —acotar ese archivo a su pantalla, como + // se hizo con Inventario— queda anotada. + font-size: 14.5px !important; + font-weight: 800; + transition: background 140ms ease; + + &:hover { background: $beyond-primary-dark; } + &:focus-visible { outline: 2px solid $beyond-ink; outline-offset: 2px; } + + // El tinte para la acción secundaria: se pulsa, pero no compite. + &.beyond_suave { + background: $pos-verde-tinte; + color: $beyond-primary !important; + + &:hover { background: darken($pos-verde-tinte, 4%); } + } + + &.beyond_chico { padding: 8px 16px; font-size: 13px !important; } + &.beyond_ancho { flex: 1; } + } + + .beyond_boton_llano { + all: unset; + cursor: pointer; + box-sizing: border-box; + display: inline-flex; + align-items: center; + gap: 8px; + padding: 11px 20px; + border-radius: 999px; + background: $pos-tarjeta; + border: 1px solid $beyond-surface-active; + color: $beyond-ink; + font-size: 13.5px; + font-weight: 800; + white-space: nowrap; + transition: background 140ms ease; + + &:hover { background: $pos-campo; } + &:focus-visible { outline: 2px solid $beyond-primary; outline-offset: 2px; } + + &.beyond_chico { padding: 8px 16px; font-size: 13px !important; } + &[disabled] { opacity: .5; cursor: default; } + } + + .beyond_grupo_botones { + display: inline-flex; + align-items: center; + gap: 8px; + } + + // Las descargas: la etiqueta dice QUÉ se baja y los botones solo el + // formato. Así el alcance se dice una vez, arriba, y no se repite —ni + // se contradice— en cada botón. + .beyond_descargas { + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 7px; + // El bloque mide lo que mida su hijo más ancho —el aviso— y no lo + // que le toque en el reparto de la fila: sin esto el aviso se salía + // 8px por la derecha y se leía cortado contra el borde. + width: max-content; + max-width: 100%; + margin-left: auto; + } + + .beyond_lapiz { + all: unset; + cursor: pointer; + flex: none; + width: 34px; + height: 34px; + margin-left: auto; + border-radius: 12px; + display: flex; + align-items: center; + justify-content: center; + color: $beyond-ink-softer; + + &:hover { background: $pos-campo; } + } + + // Las pastillas de periodo y de tipo de gráfica: un riel y la elegida + // en verde sólido. Un gris casi igual no dice cuál está puesta. + .beyond_pastillas { + display: inline-flex; + align-items: center; + gap: 6px; + padding: 4px; + border-radius: 999px; + background: $beyond-surface-hover; + } + + // Las pestañas del histórico son la misma píldora que el periodo, y + // llevan su propio aire: dejaron de ser `nav-tabs` con su margen. + .beyond_pestanas { margin-bottom: 16px; } + + .beyond_pastilla { + all: unset; + cursor: pointer; + padding: 8px 16px; + border-radius: 999px; + color: $beyond-ink-softer; + font-size: 13px; + font-weight: 800; + white-space: nowrap; + transition: background 140ms ease, color 140ms ease; + + &.beyond_activa { background: $beyond-primary; color: #FFFFFF; } + &:focus-visible { outline: 2px solid $beyond-primary; outline-offset: 2px; } + } +} + +// ── Tarjetas ──────────────────────────────────────────────────────────── +.o_beyond_pos { + .beyond_plaza, + .beyond_caja, + .beyond_cifra, + .beyond_filtros, + .beyond_grafica, + .beyond_tarjeta { + box-sizing: border-box; + background: $pos-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 24px; + } + + // La de métodos de pago comparte fila con las tres cifras, así que + // comparte alto y aire: una tarjeta más baja en la misma fila se lee + // como un error de maquetación, no como otro tipo de dato. + .beyond_tarjeta { + min-height: 138px; + padding: 26px 28px; + display: flex; + flex-direction: column; + justify-content: center; + gap: 10px; + } + + // Las cifras del día: el número manda y el rótulo lo acompaña. + // La tarjeta de métrica se planta entera: `beyond_cifra` es un nombre + // que otras pantallas también usan y de una de ellas le caía un cuadro + // de 44px con la cifra centrada y en azul. Aquel choque está cortado en + // su archivo; el ancho y la tinta se dicen aquí igualmente, porque son + // el diseño de esta tarjeta y no la consecuencia de arreglar a otro. + .beyond_cifra { + width: auto; + // Alto y aire por dentro: con 99px la cifra quedaba en una franja + // que se leía como una barra, no como un dato. El alto mínimo y el + // centrado vertical la sostienen aunque el rótulo sea de una línea + // o de dos, así que las tres pantallas quedan parejas. + height: auto; + min-height: 138px; + padding: 26px 28px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: stretch; + gap: 7px; + color: $beyond-ink; + + .beyond_valor { + color: $beyond-ink; + font-size: 34px; + font-size: 32px; + font-weight: 800; + letter-spacing: -.03em; + line-height: 1.1; + font-variant-numeric: tabular-nums; + } + } + + .beyond_plaza { + height: 100%; + display: flex; + flex-direction: column; + } + + .beyond_plaza_cuerpo { + display: flex; + flex-direction: column; + flex: 1; + padding: 20px 22px 14px; + + .beyond_valor { + font-size: 30px; + font-weight: 800; + letter-spacing: -.03em; + line-height: 1.1; + font-variant-numeric: tabular-nums; + } + } + + // Las dos cifras de la plaza, con aire entre ellas: pegadas se leían + // como una sola frase, «$0.00 0 tickets». + // Dos datos distintos, y tienen que verse como dos. Con solo aire en + // medio se seguían leyendo de corrido —«$0.00 0 tickets»—, así que el + // segundo se separa además con una línea: el ojo para ahí. + .beyond_cifras_plaza { + display: flex; + flex-wrap: wrap; + gap: 14px 0; + margin: 18px 0 20px; + + // Aire a los dos lados de cada dato y la línea entre ellos, no + // pegada a uno: con tres cifras —caja abierta— el de en medio se + // quedaba rozando la línea de la derecha. + .beyond_dato { + min-width: 0; + padding: 0 26px; + + &:first-child { padding-left: 0; } + &:last-child { padding-right: 0; } + + & + .beyond_dato { border-left: 1px solid $pos-linea; } + } + } + + // Verde: hay una caja cobrando ahora mismo. + .beyond_hay_venta { + color: $beyond-primary !important; + font-weight: 800; + } + + .beyond_chip_cajas.beyond_hay_venta { + background: $pos-verde-tinte; + color: $beyond-primary !important; + } + + .beyond_chip_cajas { + flex: none; + padding: 5px 11px; + border-radius: 999px; + background: $beyond-surface-hover; + color: $beyond-ink-softer; + font-size: 11.5px; + font-weight: 800; + letter-spacing: .04em; + } + + // La lista de cajas es lo que Odoo no enseña y es a lo que se viene: + // cuál está abierta y con quién. + .beyond_lista_cajas { + list-style: none; + padding: 0; + // El hueco sobrante cae DEBAJO de la lista, no encima: las tarjetas + // de una fila se igualan de alto, y con `margin-top: auto` la plaza + // de una caja abría un claro entre sus cifras y su lista mientras la + // de al lado, con dos, se veía compacta. + margin-bottom: auto; + display: flex; + flex-direction: column; + gap: 6px; + + li { + box-sizing: border-box; + padding: 10px 12px 10px 14px; + border-radius: 16px; + background: $pos-campo; + font-size: 14.5px; + font-weight: 800; + } + } + + .beyond_plaza_pie { + display: flex; + padding: 0 22px 8px; + } + + .beyond_enlace_plaza { + all: unset; + cursor: pointer; + box-sizing: border-box; + flex: 1; + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + padding: 11px 16px; + border-top: 1px solid $pos-linea; + color: $beyond-primary; + font-size: 13.5px; + font-weight: 800; + + &:hover { color: $beyond-primary-darker; } + &:focus-visible { outline: 2px solid $beyond-primary; outline-offset: 2px; } + } + + // Qué caja está abierta se ve sin leer. + .beyond_caja { + height: 100%; + display: flex; + flex-direction: column; + + &.beyond_esta_abierta { border-color: $beyond-primary; } + } + + .beyond_caja { + min-height: 232px; + } + + .beyond_caja_cuerpo { + flex: 1; + display: flex; + flex-direction: column; + gap: 10px; + padding: 24px 26px 6px; + + .beyond_valor_chico { + font-size: 26px; + font-weight: 800; + letter-spacing: -.03em; + line-height: 1.1; + font-variant-numeric: tabular-nums; + } + } + + .beyond_caja_pie { + display: flex; + flex-wrap: wrap; + gap: 8px; + padding: 14px 22px 20px; + } + + // Un punto basta para el estado: el color ya lo dice, y el texto de al + // lado lo confirma para quien no distingue el color. .beyond_punto { - display: inline-block; width: .6rem; height: .6rem; - border-radius: 50%; margin-right: .5rem; vertical-align: middle; - &.beyond_abierta { background: var(--bs-success); } - &.beyond_cerrada { background: var(--bs-gray-400); } + display: inline-block; + flex: none; + width: 9px; + height: 9px; + border-radius: 999px; + vertical-align: middle; + + &.beyond_abierta { background: $beyond-primary; } + &.beyond_cerrada { background: #C4BEB4; } + } + + .beyond_vacio { + box-sizing: border-box; + padding: 34px 18px; + border-radius: 22px; + background: $pos-tarjeta; + border: 1px solid $beyond-surface-active; + text-align: center; + font-size: 14px; + font-weight: 700; + color: $beyond-ink-muted; + } +} + +// ── Filtros ───────────────────────────────────────────────────────────── +.o_beyond_pos { + .beyond_filtros { + display: flex; + flex-wrap: wrap; + align-items: flex-end; + gap: 22px; + padding: 18px 22px; + margin-bottom: 18px; + + > div { display: flex; flex-direction: column; gap: 8px; } + } + + .beyond_campo { + all: unset; + box-sizing: border-box; + padding: 10px 14px; + border-radius: 14px; + background: $pos-campo; + border: 1px solid $beyond-surface-active; + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink; + + &:focus { border-color: $beyond-primary; box-shadow: 0 0 0 1px $beyond-primary; } + } + + select.beyond_campo { min-width: 170px; cursor: pointer; } + + // Un filtro con valor se ve como la pastilla activa: mismo verde, misma + // tinta blanca. Vacío —«Todas»— se queda en el campo neutro. + select.beyond_campo.beyond_activa { + background: $beyond-primary; + border-color: $beyond-primary; + color: #FFFFFF; + } +} + +// ── Tablas ────────────────────────────────────────────────────────────── +// La cabecera en verde: la tabla es larga y el encabezado tiene que +// sostenerse al desplazar sin que haga falta buscarlo. +.o_beyond_pos { + .beyond_scroll_tabla { + background: $pos-tarjeta; + border: 1px solid $beyond-surface-active; + border-radius: 24px; + overflow: auto; + max-height: 62vh; + } + + .beyond_tabla { + width: 100%; + min-width: max-content; + border-collapse: collapse; + + thead th { + position: sticky; + top: 0; + z-index: 3; + padding: 14px 24px; + background: $beyond-primary; + color: #FFFFFF; + white-space: nowrap; + text-align: left; + font-size: 11px; + font-weight: 800; + letter-spacing: .08em; + text-transform: uppercase; + + &.text-end { text-align: right; } + } + + tbody td { + padding: 13px 24px; + border-bottom: 1px solid $beyond-surface; + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink-soft; + } + + tbody tr:hover > td { background: $pos-hover; } + + td.text-end, th.text-end { font-variant-numeric: tabular-nums; } + + // El folio es el ancla del renglón: se queda a la vista al + // desplazarse en horizontal, que es cuando se pierde de vista. + .beyond_folio { + font-weight: 800; + font-variant-numeric: tabular-nums; + color: $beyond-primary-dark; + } + + .beyond_pie_tabla td { + border-top: 1.5px solid $pos-linea; + border-bottom: 0; + background: $pos-hover; + font-size: 14px; + font-weight: 800; + color: $beyond-ink; + } + } + + // El título ordena, como en una hoja de cálculo. Que se vea como texto + // y no como botón es a propósito: un encabezado lleno de botones se lee + // como barra de herramientas. Filtrar se hace arriba. + .beyond_col { + white-space: nowrap; + + .beyond_ordenar { + border: 0; + background: none; + padding: 0; + font: inherit; + color: inherit; + cursor: pointer; + + &:hover { text-decoration: underline; } + } + + // La flecha apagada solo aparece al pasar por encima: tres flechas + // en fila hacen ruido y ninguna dice nada. + .beyond_sin_orden { opacity: 0; transition: opacity .12s; } + &:hover .beyond_sin_orden { opacity: .5; } + } +} + +// ── Gráficas ──────────────────────────────────────────────────────────── +.o_beyond_pos { + .beyond_grafica { + padding: 20px 26px 22px; + margin-bottom: 14px; } .beyond_grafica .beyond_lienzo { width: 100%; height: 16rem; } + + // El vacío de una gráfica es una línea, no un lienzo en blanco. + .beyond_grafica_vacia { + padding: 18px 4px 6px; + font-size: 13.5px; + font-weight: 700; + color: $beyond-ink-muted; + } + .beyond_grafica .beyond_eje, .beyond_grafica .beyond_leyenda { - font-size: 15px; - fill: var(--bs-secondary-color, #6E7C77); + font-size: 12px; + font-weight: 700; + fill: $beyond-ink-muted; } + // El eje de dinero: líneas que se sienten de fondo, no de dato. El cero // va más presente cuando hay negativos: es la línea de «cuadró». .beyond_grafica .beyond_rejilla { - stroke: var(--bs-border-color, #DEE2E6); + stroke: $pos-linea; stroke-width: 1; } + .beyond_grafica .beyond_rejilla_cero { - stroke: var(--bs-secondary-color, #6E7C77); + stroke: #D6D2C8; stroke-width: 1.5; stroke-dasharray: 6 4; } + .beyond_grafica .beyond_valor_barra { - font-size: 16px; - font-weight: 600; - fill: var(--bs-body-color, #212529); + font-size: 15px; + font-weight: 800; + fill: $beyond-ink; } + // La guía une la rebanada con su etiqueta: presente, nunca protagonista. - .beyond_grafica .beyond_guia { - stroke: var(--bs-border-color, #DEE2E6); - } + .beyond_grafica .beyond_guia { stroke: $pos-linea; } + .beyond_grafica .beyond_leyenda_monto { - font-weight: 600; - fill: var(--bs-body-color, #212529); + font-weight: 800; + fill: $beyond-ink; } + .beyond_grafica .beyond_dona_total { - font-size: 24px; - font-weight: 700; - fill: var(--bs-body-color, #212529); + font-size: 22px; + font-weight: 800; + fill: $beyond-ink; } + // El punto existe para el tooltip: discreto hasta que el cursor lo pisa. .beyond_grafica .beyond_punto_dato { opacity: .25; &:hover { opacity: 1; } } + .beyond_punto_serie { - display: inline-block; width: .7rem; height: .7rem; - border-radius: 2px; margin-right: .5rem; vertical-align: middle; + display: inline-block; + width: 11px; + height: 11px; + border-radius: 4px; + margin-right: 8px; + vertical-align: middle; + } +} + +// ── El panel, con el acento en verde ──────────────────────────────────── +// El punto de venta viste la misma barra que el Panel General —así entra +// por el mismo sitio que todo lo demás— pero su color es el verde de la +// marca. Mismo dibujo, otro color: igual que Tableros con el oro. +// +// Los selectores repiten el nivel de `body.beyond_panel_verde …` para no +// perder por peso contra la regla base de la pestaña. +body.beyond_panel_verde { + .beyond_panel_tab .beyond_panel_tab_rule { background: $beyond-primary; } + + .beyond_panel_avatar { + background: $beyond-primary; + + &:hover { background: $beyond-primary-dark; } } - .beyond_pie_tabla td { border-top: 2px solid var(--bs-border-color); } - - // ── Encabezados que ordenan ───────────────────────────────────────── - // El título ordena, como en una hoja de cálculo. Que se vea como texto - // y no como botón es a propósito: un encabezado lleno de botones se lee - // como una barra de herramientas, no como una tabla. Filtrar se hace - // arriba, antes de la tabla. - .beyond_col { - white-space: nowrap; - - .beyond_ordenar { - border: 0; background: none; padding: 0; - font: inherit; color: inherit; cursor: pointer; - &:hover { color: var(--bs-primary); } - } - // La flecha apagada solo aparece al pasar por encima: tres flechas - // grises en fila hacen ruido y ninguna dice nada. - .beyond_sin_orden { opacity: 0; transition: opacity .12s; } - &:hover .beyond_sin_orden { opacity: .35; } - - } - - // ── Inicio: una tarjeta por plaza ─────────────────────────────────── - .beyond_plaza { - .beyond_valor { - font-size: 1.6rem; font-weight: 600; line-height: 1.1; - font-variant-numeric: tabular-nums; - } - // La lista de cajas es lo que Odoo no muestra y es lo que se viene a - // ver: cuál está abierta y con quién. - .beyond_lista_cajas { - list-style: none; padding: 0; margin-top: auto; - border-top: 1px solid var(--bs-border-color); - - li { - padding: .55rem 0; - border-bottom: 1px solid var(--bs-border-color-translucent, #E9EEEB); - &:last-child { border-bottom: 0; } - } - } - .card-footer { background: none; } - } - - // ── Detalle: una tarjeta por caja ─────────────────────────────────── - // Qué está abierta se ve sin leer: la tarjeta abierta lleva el filo de - // color, y su acción principal es continuar vendiendo. - .beyond_caja { - .beyond_valor_chico { - font-size: 1.15rem; font-weight: 600; - font-variant-numeric: tabular-nums; - } - .card-footer { background: none; } - &.beyond_esta_abierta { border-left: 4px solid var(--bs-success); } - } - } diff --git a/addons/beyond_pos/static/src/pos/pos.xml b/addons/beyond_pos/static/src/pos/pos.xml index 29bbc44..5340943 100644 --- a/addons/beyond_pos/static/src/pos/pos.xml +++ b/addons/beyond_pos/static/src/pos/pos.xml @@ -6,18 +6,18 @@ es cada serie, no del orden, y se puede preguntar por él en una prueba. -->