refactor(web): el formulario base recibe de cada pantalla los campos de cabecera, pie y línea
Todas las pantallas declaran su DocumentLayout (catálogo FIELDS): ventas y compras dejan de tener la cabecera escrita en el HTML; el folio solo lo llevan los documentos tributarios. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c734dcbd0a
commit
8b0b8afc87
9 files changed
+320
-257
No files matched your search
@@ -5,6 +5,7 @@ import { ActivatedRoute, Router, convertToParamMap, provideRouter } from '@angul
|
||||
import { of } from 'rxjs';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { DocumentFormPage } from './document-form.page';
|
||||
import { hasFolio } from './document-layouts';
|
||||
import { DOCUMENT_SCREENS } from './document-screens';
|
||||
|
||||
const invoice = (over: Record<string, unknown> = {}) => ({
|
||||
@@ -63,7 +64,7 @@ describe('folio y RUT en los formularios', () => {
|
||||
beforeEach(() => TestBed.resetTestingModule());
|
||||
|
||||
it('lo llevan facturas, notas de crédito, entregas y recepciones (ventas y compras)', () => {
|
||||
const withFolio = DOCUMENT_SCREENS.filter((s) => s.folio).map((s) => s.resource);
|
||||
const withFolio = DOCUMENT_SCREENS.filter((s) => hasFolio(s.layout)).map((s) => s.resource);
|
||||
expect(withFolio.sort()).toEqual(
|
||||
['CreditNotes', 'DeliveryNotes', 'Invoices', 'PurchaseCreditNotes', 'PurchaseDeliveryNotes', 'PurchaseInvoices'].sort(),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user