feat(web): serie, indicador y proyecto en la cabecera; dimensiones, proyecto, cuenta, referencia base y precio con IVA en el detalle

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-16 11:07:38 -05:00
1 parent 9f003ee4bf
commit f66ef108cf
22 files changed
+698 -100

No files matched your search

@@ -188,7 +188,7 @@ describe('MasterFormPage', () => {
it('no envía nada sin código o sin nombre', async () => {
(el().querySelector('.actions .btn.main') as HTMLElement).click();
await tick();
ctrl.expectNone((r) => r.method === 'POST');
ctrl.expectNone((r) => r.method === 'POST' && !r.url.includes('SeriesService'));
expect(el().querySelector('.status')?.textContent).toContain('Indique el código');
page().setValue('CardCode', 'C300');
(el().querySelector('.actions .btn.main') as HTMLElement).click();
@@ -203,7 +203,7 @@ describe('MasterFormPage', () => {
await tick();
(el().querySelector('.actions .btn.main') as HTMLElement).click();
await tick();
const req = ctrl.expectOne((r) => r.method === 'POST');
const req = ctrl.expectOne((r) => r.method === 'POST' && !r.url.includes('SeriesService'));
expect(req.request.url).toBe('/api/sl/BusinessPartners');
expect(req.request.body).toEqual({
CardCode: 'C300',
@@ -227,7 +227,7 @@ describe('MasterFormPage', () => {
await tick();
(el().querySelector('.actions .btn.main') as HTMLElement).click();
await tick();
expect((ctrl.expectOne((r) => r.method === 'POST').request.body as Record<string, unknown>)['CardType']).toBe('cSupplier');
expect((ctrl.expectOne((r) => r.method === 'POST' && !r.url.includes('SeriesService')).request.body as Record<string, unknown>)['CardType']).toBe('cSupplier');
});
it('muestra el error de SAP si rechaza el registro', async () => {
@@ -236,7 +236,7 @@ describe('MasterFormPage', () => {
await tick();
(el().querySelector('.actions .btn.main') as HTMLElement).click();
await tick();
ctrl.expectOne((r) => r.method === 'POST').flush({ message: 'Código duplicado' }, { status: 400, statusText: 'Bad Request' });
ctrl.expectOne((r) => r.method === 'POST' && !r.url.includes('SeriesService')).flush({ message: 'Código duplicado' }, { status: 400, statusText: 'Bad Request' });
await tick();
expect(el().querySelector('.status')?.textContent).toContain('Código duplicado');
expect(navigate).not.toHaveBeenCalled();