feat(web): código de cuenta con separadores de segmento, ramas vacías sin flecha y Cuenta de mayor con formato

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-19 09:56:48 -05:00
1 parent 456b0f4ac0
commit a10de1ff29
11 files changed
+108 -6

No files matched your search

@@ -9,6 +9,7 @@ import { RowsTable } from '../../shared/grid/rows-table';
import { Icon, SboWindow, Tab, Tabs, Toolbar, type StatusMessage, type WindowBadge } from '../../shared/window';
import { updatePayload, type DocRecord } from '../documents/document-model';
import type { HeaderField } from '../documents/document-layouts';
import { displayCode } from './finanzas/chart-tree.model';
import { ChartTreePanel } from './finanzas/chart-tree.panel';
import { MasterField } from './master-field';
import {
@@ -131,7 +132,7 @@ export class MasterFormPage {
});
protected readonly windowTitle = computed(() => {
const d = this.doc();
const code = (this.screen.displayField && text(d?.[this.screen.displayField]).trim()) || d?.[this.screen.keyField];
const code = this.screen.displayField && d ? displayCode({ Code: text(d[this.screen.keyField]), FormatCode: text(d[this.screen.displayField]) }) : d?.[this.screen.keyField];
return code === undefined ? this.screen.singular : `${this.screen.singular} · ${text(code)}`;
});
@@ -178,6 +179,11 @@ export class MasterFormPage {
}
protected value(key: string): unknown {
// el código de una cuenta ya creada se ve con su formato (el `_SYS…` interno no es lo que el usuario conoce)
if (this.screen.displayField && key === this.screen.keyField && !this.isNew()) {
const d = this.doc();
return displayCode({ Code: text(d?.[this.screen.keyField]), FormatCode: text(d?.[this.screen.displayField]) });
}
return this.header()[key];
}