Clientes y facturas de cliente
This commit is contained in:
parent
41ca0c2286
commit
e719feaadf
@ -1,2 +1,3 @@
|
||||
export * from "./customer-invoice-application.service";
|
||||
export * from "./presenters";
|
||||
export * from "./use-cases";
|
||||
|
||||
@ -163,7 +163,7 @@ export class CustomerInvoiceItemDomainMapper
|
||||
|
||||
if (createResult.isFailure) {
|
||||
return Result.fail(
|
||||
new ValidationErrorCollection("Invoice item entity creation failed", [
|
||||
new ValidationErrorCollection([
|
||||
{ path: `items[${index}]`, message: createResult.error.message },
|
||||
])
|
||||
);
|
||||
|
||||
@ -274,9 +274,7 @@ export class CustomerInvoiceDomainMapper
|
||||
|
||||
// 5) Si hubo errores de mapeo, devolvemos colección de validación
|
||||
if (errors.length > 0) {
|
||||
return Result.fail(
|
||||
new ValidationErrorCollection("Customer invoice mapping failed [mapToDomain]", errors)
|
||||
);
|
||||
return Result.fail(new ValidationErrorCollection(errors));
|
||||
}
|
||||
|
||||
// 6) Construcción del agregado (Dominio)
|
||||
@ -321,9 +319,7 @@ export class CustomerInvoiceDomainMapper
|
||||
|
||||
if (createResult.isFailure) {
|
||||
return Result.fail(
|
||||
new ValidationErrorCollection("Customer invoice entity creation failed", [
|
||||
{ path: "invoice", message: createResult.error.message },
|
||||
])
|
||||
new ValidationErrorCollection([{ path: "invoice", message: createResult.error.message }])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -197,9 +197,7 @@ export class CustomerDomainMapper
|
||||
|
||||
// Si hubo errores de mapeo, devolvemos colección de validación
|
||||
if (errors.length > 0) {
|
||||
return Result.fail(
|
||||
new ValidationErrorCollection("Customer props mapping failed (CustomerMapper)", errors)
|
||||
);
|
||||
return Result.fail(new ValidationErrorCollection(errors));
|
||||
}
|
||||
|
||||
const customerProps: CustomerProps = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user