feat(web): plan de cuentas como árbol y casillas de grupo en el formulario

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-16 14:46:07 -05:00
1 parent eb84d73719
commit 99c0a9259c
12 files changed
+341 -3

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 { AccountGroups } from './finanzas/account-groups';
import { MasterField } from './master-field';
import {
type CollectionRow,
@@ -36,7 +37,7 @@ const text = (v: unknown): string => (v === null || v === undefined ? '' : Strin
@Component({
selector: 'sbo-master-form-page',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [Icon, MasterField, RouterLink, RowsTable, SboWindow, Tab, Tabs, Toolbar],
imports: [AccountGroups, Icon, MasterField, RouterLink, RowsTable, SboWindow, Tab, Tabs, Toolbar],
templateUrl: './master-form.page.html',
styles: '.addrow { margin: 6px 0 0; }',
})
@@ -165,6 +166,11 @@ export class MasterFormPage {
return !c.readonly && c.mode === 'replace' && c.growable !== false;
}
/** Código con el que se ve el grupo del plan de cuentas: el de la cuenta o, si es nueva, el de su cuenta padre. */
protected groupCode(): string {
return text(this.header()['FatherAccountKey']) || text(this.header()['Code']);
}
protected value(key: string): unknown {
return this.header()[key];
}