Traduce el lanzador al diseño firmado: tres bloques grandes con código de color (Venta, Panel General, QR) sobre una fila de tarjetas chicas, con los SVG del diseño inline. Sigue siendo el dropdown nativo por herencia de web.NavBar.AppsMenu, forzado a pantalla completa con :has(); la navegación (DropdownItem, xmlid, foco de la app actual) no cambia. Toda app instalada que no esté mapeada cae a la fila inferior con su ícono nativo, así nada queda inalcanzable. beyond_variables.scss deja de ser placeholder a la espera del cliente: es la identidad v1 que definió Collina. El naranja y el morado quedan como variables locales del lanzador, no como tokens: no son colores de marca, son la codificación por color de esos tres bloques. Manrope se autoaloja en static/fonts en vez de cargarse de Google Fonts: las terminales de sucursal tienen que funcionar sin internet. La fila inferior centra con márgenes automáticos y no con justify-content: centrar desborda hacia ambos lados y deja las primeras tarjetas fuera del borde izquierdo, donde el scroll no llega. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
190 lines
13 KiB
XML
190 lines
13 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<templates xml:space="preserve">
|
|
<!--
|
|
C-005/C-006 · Beyond launcher v2 (ADR-005).
|
|
|
|
Still an extension of the native apps menu, not a new screen: the
|
|
grid button becomes a house and the dropdown is forced full screen
|
|
from the stylesheet. Navigation stays native (DropdownItem,
|
|
onSelected, getMenuItemHref, data-menu-xmlid, current-app focus),
|
|
so hotkeys, keyboard navigation and group filtering are untouched.
|
|
|
|
v2 replaces the two symmetric bands with the signed-off layout: a
|
|
three-block colour-coded main band (Venta / Panel General / QR) over
|
|
a row of small tiles. Blocks are laid out in design order, which is
|
|
why apps are matched one by one instead of looped over: each block
|
|
carries its own inline SVG and its own colour.
|
|
|
|
Apps are matched by xmlid string, never imported: a module that is
|
|
not installed simply never matches (no hard dependency). Every
|
|
installed app that no rule below claims falls through to the bottom
|
|
row with its native icon, so nothing becomes unreachable.
|
|
-->
|
|
<t t-name="beyond_base.NavBar.AppsMenu"
|
|
t-inherit="web.NavBar.AppsMenu"
|
|
t-inherit-mode="extension">
|
|
<xpath expr="//button[@data-hotkey='h']/i" position="replace">
|
|
<i class="fa fa-home fs-4"/>
|
|
</xpath>
|
|
<xpath expr="//DropdownItem[@t-foreach='apps']" position="replace">
|
|
<t t-set="beyondPrimary"
|
|
t-value="['point_of_sale.menu_point_root', 'beyond_branch.menu_beyond_root', 'beyond_attendance_qr.menu_kiosco_app']"/>
|
|
<t t-set="beyondSecondary"
|
|
t-value="['stock.menu_stock_root', 'contacts.menu_contacts', 'mail.menu_root_discuss', 'hr.menu_hr_root', 'spreadsheet_dashboard.spreadsheet_dashboard_menu_root']"/>
|
|
|
|
<div class="beyond_launcher_brand">
|
|
<span>Powered by Collina Systems</span>
|
|
</div>
|
|
|
|
<!-- Main band: three colour-coded blocks that share the width.
|
|
A block whose app is hidden for this role simply does not
|
|
render and the remaining ones spread out on their own. -->
|
|
<div class="beyond_launcher_band beyond_launcher_primary">
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="app.xmlid === 'point_of_sale.menu_point_root'"
|
|
class="{ 'o_app': true, 'beyond_block': true, 'beyond_block_venta': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<svg width="168" height="168" viewBox="0 0 48 48" fill="none" aria-hidden="true">
|
|
<path d="M11 16h26l3.2 25.3A3.5 3.5 0 0 1 36.7 45H11.3a3.5 3.5 0 0 1-3.5-3.7L11 16Z" fill="#FFFFFF"/>
|
|
<path d="M11 16h13v29H11.3a3.5 3.5 0 0 1-3.5-3.7L11 16Z" fill="#FFFFFF" fill-opacity="0.55"/>
|
|
<path d="M16.5 16a7.5 7.5 0 0 1 15 0" stroke="#FFFFFF" stroke-width="4.5" fill="none" stroke-linecap="round"/>
|
|
</svg>
|
|
<span class="beyond_block_name">Venta</span>
|
|
</DropdownItem>
|
|
</t>
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="app.xmlid === 'beyond_branch.menu_beyond_root'"
|
|
class="{ 'o_app': true, 'beyond_block': true, 'beyond_block_panel': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<svg width="168" height="168" viewBox="0 0 48 48" fill="none" aria-hidden="true">
|
|
<rect x="4" y="8" width="40" height="32" rx="5" fill="#FFFFFF"/>
|
|
<rect x="9" y="20" width="13" height="15" rx="2.5" fill="#C55A22"/>
|
|
<rect x="26" y="20" width="13" height="7" rx="2.5" fill="#C55A22" fill-opacity="0.55"/>
|
|
<rect x="26" y="30" width="13" height="5" rx="2.5" fill="#C55A22" fill-opacity="0.55"/>
|
|
<rect x="9" y="13" width="30" height="3.5" rx="1.75" fill="#C55A22" fill-opacity="0.35"/>
|
|
</svg>
|
|
<span class="beyond_block_name">Panel General</span>
|
|
</DropdownItem>
|
|
</t>
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="app.xmlid === 'beyond_attendance_qr.menu_kiosco_app'"
|
|
class="{ 'o_app': true, 'beyond_block': true, 'beyond_block_qr': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<svg width="168" height="168" viewBox="0 0 48 48" fill="none" aria-hidden="true">
|
|
<rect x="6" y="4" width="36" height="27" rx="4" fill="#FFFFFF"/>
|
|
<rect x="21" y="31" width="6" height="8" fill="#FFFFFF" fill-opacity="0.55"/>
|
|
<rect x="13" y="39" width="22" height="5" rx="2.5" fill="#FFFFFF" fill-opacity="0.55"/>
|
|
<circle cx="24" cy="17.5" r="4.5" fill="#8C4A72"/>
|
|
<path d="M31.5 10a10.5 10.5 0 0 1 0 15" stroke="#8C4A72" stroke-width="3" fill="none" stroke-linecap="round"/>
|
|
<path d="M16.5 10a10.5 10.5 0 0 0 0 15" stroke="#8C4A72" stroke-width="3" fill="none" stroke-linecap="round"/>
|
|
</svg>
|
|
<span class="beyond_block_name">QR</span>
|
|
</DropdownItem>
|
|
</t>
|
|
</div>
|
|
|
|
<!-- Secondary row: the designed tiles first, in design order,
|
|
then every other installed app with its native icon. -->
|
|
<div class="beyond_launcher_band beyond_launcher_secondary">
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="app.xmlid === 'stock.menu_stock_root'"
|
|
class="{ 'o_app': true, 'beyond_tile': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<svg width="42" height="42" viewBox="0 0 48 48" fill="none" aria-hidden="true">
|
|
<path d="M24 5l18 9v20l-18 9-18-9V14l18-9Z" fill="#23201D"/>
|
|
<path d="M6 14l18 9v20L6 34V14Z" fill="#23201D" fill-opacity="0.55"/>
|
|
<path d="M6 14l18 9 18-9" stroke="#F6F5F1" stroke-width="2.5"/>
|
|
</svg>
|
|
<span class="beyond_tile_name">Inventario</span>
|
|
</DropdownItem>
|
|
</t>
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="app.xmlid === 'contacts.menu_contacts'"
|
|
class="{ 'o_app': true, 'beyond_tile': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<svg width="42" height="42" viewBox="0 0 48 48" fill="none" aria-hidden="true">
|
|
<rect x="7" y="6" width="34" height="36" rx="5" fill="#23201D"/>
|
|
<rect x="7" y="6" width="7" height="36" rx="3" fill="#23201D"/>
|
|
<rect x="16" y="6" width="2" height="36" fill="#F6F5F1" fill-opacity="0.35"/>
|
|
<circle cx="29" cy="20" r="5.5" fill="#F6F5F1"/>
|
|
<path d="M19 35c1.6-4.8 5.2-7.2 10-7.2S37.4 30.2 39 35H19Z" fill="#F6F5F1"/>
|
|
</svg>
|
|
<span class="beyond_tile_name">Contactos</span>
|
|
</DropdownItem>
|
|
</t>
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="app.xmlid === 'mail.menu_root_discuss'"
|
|
class="{ 'o_app': true, 'beyond_tile': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<svg width="42" height="42" viewBox="0 0 48 48" fill="none" aria-hidden="true">
|
|
<path d="M24 7c9.9 0 18 6.6 18 14.8S33.9 36.6 24 36.6c-2 0-3.9-.3-5.7-.8L8 40l3.2-7.6C8.1 29.6 6 25.9 6 21.8 6 13.6 14.1 7 24 7Z" fill="#23201D"/>
|
|
<circle cx="16.5" cy="21.5" r="2.8" fill="#F6F5F1"/>
|
|
<circle cx="24" cy="21.5" r="2.8" fill="#F6F5F1"/>
|
|
<circle cx="31.5" cy="21.5" r="2.8" fill="#F6F5F1"/>
|
|
</svg>
|
|
<span class="beyond_tile_name">Mensajes</span>
|
|
</DropdownItem>
|
|
</t>
|
|
<!-- Empleados has no icon in the signed-off design, so it
|
|
keeps its native one rather than an invented drawing. -->
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="app.xmlid === 'hr.menu_hr_root'"
|
|
class="{ 'o_app': true, 'beyond_tile': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<img t-if="app.webIconData" class="beyond_tile_icon" t-att-src="app.webIconData" alt=""/>
|
|
<span class="beyond_tile_name">Empleados</span>
|
|
</DropdownItem>
|
|
</t>
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="app.xmlid === 'spreadsheet_dashboard.spreadsheet_dashboard_menu_root'"
|
|
class="{ 'o_app': true, 'beyond_tile': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<svg width="42" height="42" viewBox="0 0 48 48" fill="none" aria-hidden="true">
|
|
<rect x="6" y="27" width="9" height="15" rx="2" fill="#23201D" fill-opacity="0.45"/>
|
|
<rect x="19" y="17" width="9" height="25" rx="2" fill="#23201D" fill-opacity="0.7"/>
|
|
<rect x="32" y="7" width="9" height="35" rx="2" fill="#23201D"/>
|
|
</svg>
|
|
<span class="beyond_tile_name">Tableros</span>
|
|
</DropdownItem>
|
|
</t>
|
|
<!-- Fallback: anything installed that no rule above claims. -->
|
|
<t t-foreach="apps" t-as="app" t-key="app.id">
|
|
<DropdownItem
|
|
t-if="!beyondPrimary.includes(app.xmlid) and !beyondSecondary.includes(app.xmlid)"
|
|
class="{ 'o_app': true, 'beyond_tile': true, focus: menuService.getCurrentApp() === app }"
|
|
onSelected="() => this.onNavBarDropdownItemSelection(app)"
|
|
attrs="{ href: getMenuItemHref(app), 'data-menu-xmlid': app.xmlid, 'data-section': app.id }"
|
|
>
|
|
<img t-if="app.webIconData" class="beyond_tile_icon" t-att-src="app.webIconData" alt=""/>
|
|
<span class="beyond_tile_name" t-esc="app.name"/>
|
|
</DropdownItem>
|
|
</t>
|
|
</div>
|
|
</xpath>
|
|
</t>
|
|
</templates>
|