Integra: Familias sin «Fusionar» en el renglón y «Archivar» en rojo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
a785b8d481
4 files changed
+30
-6
No files matched your search
@@ -40,7 +40,7 @@ const MOSAICOS = [
|
||||
{
|
||||
xmlid: "beyond_branch.menu_beyond_catalogo_familias",
|
||||
titulo: _t("Familias"),
|
||||
detalle: _t("Crear, renombrar, fusionar y archivar las familias de comisión."),
|
||||
detalle: _t("Crear, renombrar y archivar las familias de comisión."),
|
||||
icono: "fa-sitemap",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -76,6 +76,13 @@
|
||||
text-align: right;
|
||||
|
||||
.btn-link { padding: 4px 8px; }
|
||||
|
||||
// Archivar en rojo: se lee como borrar, y así debe leerse.
|
||||
.beyond_fam_peligro {
|
||||
color: $beyond-panel-rojo;
|
||||
|
||||
&:hover { color: darken($beyond-panel-rojo, 10%); }
|
||||
}
|
||||
}
|
||||
|
||||
// La historia se ve, pero en segundo plano.
|
||||
|
||||
@@ -137,12 +137,16 @@
|
||||
<td class="beyond_fam_num" t-esc="fila.colaboradores"/>
|
||||
<td t-esc="etiquetaEstado(fila)"/>
|
||||
<td class="beyond_fam_botones">
|
||||
<!-- Sin «Fusionar» en el renglón (Director,
|
||||
10-nov-2026): la fusión solo aparece al
|
||||
archivar una familia que aún tiene
|
||||
artículos, que es cuando hace falta.
|
||||
«Archivar» va en rojo: para quien lo
|
||||
toca, se lee como borrar. -->
|
||||
<t t-if="fila.estado === 'activa'">
|
||||
<button type="button" class="btn btn-link"
|
||||
t-on-click="() => this.renombrar(fila)">Renombrar</button>
|
||||
<button type="button" class="btn btn-link"
|
||||
t-on-click="() => this.fusionar(fila)">Fusionar</button>
|
||||
<button type="button" class="btn btn-link"
|
||||
<button type="button" class="btn btn-link beyond_fam_peligro"
|
||||
t-on-click="() => this.archivar(fila)">Archivar</button>
|
||||
</t>
|
||||
<button t-elif="fila.estado === 'archivada'" type="button"
|
||||
|
||||
@@ -16,6 +16,7 @@ from .ayudantes_navegador import AYUDANTES
|
||||
|
||||
ACENTO = 'rgb(197, 90, 34)' # $beyond-panel-acento, el «Nueva familia»
|
||||
DURAZNO = 'rgb(246, 231, 220)' # $beyond-panel-durazno, el aviso propio
|
||||
ROJO = 'rgb(192, 57, 43)' # $beyond-panel-rojo, «Archivar»
|
||||
|
||||
|
||||
@tagged('post_install', '-at_install')
|
||||
@@ -58,9 +59,21 @@ class TestFamiliaEditorEnNavegador(HttpCase):
|
||||
throw new Error('la familia demo «Venta de producto» no está');
|
||||
}
|
||||
|
||||
// ── El renglón: sin «Fusionar», y «Archivar» en rojo ─────
|
||||
// (Director, 10-nov-2026: archivar se lee como borrar).
|
||||
const botones = [...fila().querySelectorAll('button')];
|
||||
if (botones.some((b) => b.textContent.trim() === 'Fusionar')) {
|
||||
throw new Error('«Fusionar» sigue en el renglón');
|
||||
}
|
||||
const archivar = botones.find(
|
||||
(b) => b.textContent.trim() === 'Archivar');
|
||||
const tinta = getComputedStyle(archivar).color;
|
||||
if (tinta !== '""" + ROJO + """') {
|
||||
throw new Error('«Archivar» no está en rojo (' + tinta + ')');
|
||||
}
|
||||
|
||||
// ── Archivar con artículos abre la fusión con su porqué ──
|
||||
[...fila().querySelectorAll('button')]
|
||||
.find((b) => b.textContent.trim() === 'Archivar').click();
|
||||
archivar.click();
|
||||
const aviso = await hasta('.beyond_fam_aviso');
|
||||
const fondoAviso = getComputedStyle(aviso).backgroundColor;
|
||||
if (fondoAviso !== '""" + DURAZNO + """') {
|
||||
|
||||
Reference in new issue
Block a user