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:
1 parent
9f003ee4bf
commit
f66ef108cf
22 files changed
+698
-100
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { SL_RESOURCE_MAP, SL_RESOURCES } from './sl-resources.js';
|
||||
|
||||
describe('recursos del Service Layer', () => {
|
||||
it('no incluye jamás EmployeesInfo (tiene U_WEB_PASS)', () => {
|
||||
expect(SL_RESOURCE_MAP.has('EmployeesInfo')).toBe(false);
|
||||
});
|
||||
|
||||
it('los nombres no se repiten', () => {
|
||||
expect(new Set(SL_RESOURCES.map((r) => r.name)).size).toBe(SL_RESOURCES.length);
|
||||
});
|
||||
|
||||
it('las series de un documento se piden con una acción de solo consulta, para cualquier sesión', () => {
|
||||
const r = SL_RESOURCE_MAP.get('SeriesService_GetDocumentSeries')!;
|
||||
expect(r.methods).toEqual(['POST']);
|
||||
expect(r.write).toBeNull();
|
||||
expect(r.read).toBeNull();
|
||||
});
|
||||
|
||||
it('dimensiones, proyectos y cuentas son catálogos de solo lectura', () => {
|
||||
for (const name of ['DistributionRules', 'Projects', 'ChartOfAccounts', 'AdditionalExpenses', 'ItemGroups', 'BusinessPartnerGroups']) {
|
||||
const r = SL_RESOURCE_MAP.get(name)!;
|
||||
expect(r.methods, name).toEqual(['GET']);
|
||||
expect(r.read, name).toBeNull();
|
||||
}
|
||||
});
|
||||
|
||||
it('las cuatro pantallas de facturación de venta comparten Invoices con los permisos de todas', () => {
|
||||
const r = SL_RESOURCE_MAP.get('Invoices')!;
|
||||
for (const p of ['/ventas/facturas', '/ventas/boletas', '/ventas/facturas-reserva', '/ventas/boletas-reserva']) {
|
||||
expect(r.read as string[], p).toContain(p);
|
||||
expect(r.write as string[], p).toContain(p);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user