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 "./presenters";
|
||||||
export * from "./use-cases";
|
export * from "./use-cases";
|
||||||
|
|||||||
@ -163,7 +163,7 @@ export class CustomerInvoiceItemDomainMapper
|
|||||||
|
|
||||||
if (createResult.isFailure) {
|
if (createResult.isFailure) {
|
||||||
return Result.fail(
|
return Result.fail(
|
||||||
new ValidationErrorCollection("Invoice item entity creation failed", [
|
new ValidationErrorCollection([
|
||||||
{ path: `items[${index}]`, message: createResult.error.message },
|
{ 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
|
// 5) Si hubo errores de mapeo, devolvemos colección de validación
|
||||||
if (errors.length > 0) {
|
if (errors.length > 0) {
|
||||||
return Result.fail(
|
return Result.fail(new ValidationErrorCollection(errors));
|
||||||
new ValidationErrorCollection("Customer invoice mapping failed [mapToDomain]", errors)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6) Construcción del agregado (Dominio)
|
// 6) Construcción del agregado (Dominio)
|
||||||
@ -321,9 +319,7 @@ export class CustomerInvoiceDomainMapper
|
|||||||
|
|
||||||
if (createResult.isFailure) {
|
if (createResult.isFailure) {
|
||||||
return Result.fail(
|
return Result.fail(
|
||||||
new ValidationErrorCollection("Customer invoice entity creation failed", [
|
new ValidationErrorCollection([{ path: "invoice", message: createResult.error.message }])
|
||||||
{ path: "invoice", message: createResult.error.message },
|
|
||||||
])
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -197,9 +197,7 @@ export class CustomerDomainMapper
|
|||||||
|
|
||||||
// Si hubo errores de mapeo, devolvemos colección de validación
|
// Si hubo errores de mapeo, devolvemos colección de validación
|
||||||
if (errors.length > 0) {
|
if (errors.length > 0) {
|
||||||
return Result.fail(
|
return Result.fail(new ValidationErrorCollection(errors));
|
||||||
new ValidationErrorCollection("Customer props mapping failed (CustomerMapper)", errors)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const customerProps: CustomerProps = {
|
const customerProps: CustomerProps = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user