From 4361df07a0f3e41232993c63e6be438fa314c904 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 28 Apr 2026 11:49:21 +0200 Subject: [PATCH] . --- modules/core/src/common/dto/base.schemas.ts | 1 + .../api/application/proformas/services/proforma-updater.ts | 4 ---- .../proformas/use-cases/update-proforma.use-case.ts | 3 --- .../src/api/domain/proformas/aggregates/proforma.aggregate.ts | 2 -- .../controllers/get-issued-invoice-by-id.controller.ts | 1 - .../mappers/domain/sequelize-issued-invoice-domain.mapper.ts | 1 - .../src/web/proformas/pages/update/proforma-update-comp.tsx | 2 -- .../proformas/shared/hooks/use-proforma-update-mutation.ts | 4 ---- .../update/controllers/use-update-proforma-page-controller.ts | 1 - .../use-cases/create-proforma-from-factuges.use-case.ts | 3 +-- 10 files changed, 2 insertions(+), 20 deletions(-) diff --git a/modules/core/src/common/dto/base.schemas.ts b/modules/core/src/common/dto/base.schemas.ts index 19bf89d5..867561e4 100644 --- a/modules/core/src/common/dto/base.schemas.ts +++ b/modules/core/src/common/dto/base.schemas.ts @@ -10,6 +10,7 @@ import { z } from "zod/v4"; export const NumericStringSchema = z .string() + .trim() .regex(/^\d*$/, { message: "Must be empty or contain only digits (0-9)." }); // Cantidad de dinero (base): solo para la cantidad y la escala, sin moneda diff --git a/modules/customer-invoices/src/api/application/proformas/services/proforma-updater.ts b/modules/customer-invoices/src/api/application/proformas/services/proforma-updater.ts index 532766ad..d4de5bb7 100644 --- a/modules/customer-invoices/src/api/application/proformas/services/proforma-updater.ts +++ b/modules/customer-invoices/src/api/application/proformas/services/proforma-updater.ts @@ -32,8 +32,6 @@ export class ProformaUpdater implements IProformaUpdater { }): Promise> { const { companyId, id, patchProps, transaction } = params; - console.log("patchProps => ", patchProps); - // Recuperar agregado existente const existingResult = await this.repository.getByIdInCompany(companyId, id, transaction); @@ -50,8 +48,6 @@ export class ProformaUpdater implements IProformaUpdater { return Result.fail(updateResult.error); } - console.log(proforma); - // Persistir cambios const saveResult = await this.repository.update(proforma, transaction); diff --git a/modules/customer-invoices/src/api/application/proformas/use-cases/update-proforma.use-case.ts b/modules/customer-invoices/src/api/application/proformas/use-cases/update-proforma.use-case.ts index 3ea4a801..5b2f5b3b 100644 --- a/modules/customer-invoices/src/api/application/proformas/use-cases/update-proforma.use-case.ts +++ b/modules/customer-invoices/src/api/application/proformas/use-cases/update-proforma.use-case.ts @@ -52,9 +52,6 @@ export class UpdateProformaUseCase { const patchProps: ProformaPatchProps = patchPropsResult.data; - console.log("dto => ", dto); - console.log("patchProps => ", patchProps); - return this.transactionManager.complete(async (transaction) => { try { const updateResult = await this.updater.update({ diff --git a/modules/customer-invoices/src/api/domain/proformas/aggregates/proforma.aggregate.ts b/modules/customer-invoices/src/api/domain/proformas/aggregates/proforma.aggregate.ts index 254dc5c9..4e5304da 100644 --- a/modules/customer-invoices/src/api/domain/proformas/aggregates/proforma.aggregate.ts +++ b/modules/customer-invoices/src/api/domain/proformas/aggregates/proforma.aggregate.ts @@ -171,8 +171,6 @@ export class Proforma extends AggregateRoot implements IP ...otherProps, }; - console.log(candidateProps); - // Validacciones const validationResult = Proforma.validateCreateProps(candidateProps); diff --git a/modules/customer-invoices/src/api/infrastructure/issued-invoices/express/controllers/get-issued-invoice-by-id.controller.ts b/modules/customer-invoices/src/api/infrastructure/issued-invoices/express/controllers/get-issued-invoice-by-id.controller.ts index 6195746d..e7198c74 100644 --- a/modules/customer-invoices/src/api/infrastructure/issued-invoices/express/controllers/get-issued-invoice-by-id.controller.ts +++ b/modules/customer-invoices/src/api/infrastructure/issued-invoices/express/controllers/get-issued-invoice-by-id.controller.ts @@ -33,7 +33,6 @@ export class GetIssuedInvoiceByIdController extends ExpressController { return result.match( (data) => { - console.log(data); const dto = GetIssuedInvoiceByIdResponseSchema.parse(data); return this.ok(dto); }, diff --git a/modules/customer-invoices/src/api/infrastructure/issued-invoices/persistence/sequelize/mappers/domain/sequelize-issued-invoice-domain.mapper.ts b/modules/customer-invoices/src/api/infrastructure/issued-invoices/persistence/sequelize/mappers/domain/sequelize-issued-invoice-domain.mapper.ts index 15613c14..f322bd6b 100644 --- a/modules/customer-invoices/src/api/infrastructure/issued-invoices/persistence/sequelize/mappers/domain/sequelize-issued-invoice-domain.mapper.ts +++ b/modules/customer-invoices/src/api/infrastructure/issued-invoices/persistence/sequelize/mappers/domain/sequelize-issued-invoice-domain.mapper.ts @@ -435,7 +435,6 @@ export class SequelizeIssuedInvoiceDomainMapper extends SequelizeDomainMapper< } // 3) Cliente - console.debug(source.recipient); const recipient = this._recipientMapper.mapToPersistence(source.recipient, { errors, parent: source, diff --git a/modules/customer-invoices/src/web/proformas/pages/update/proforma-update-comp.tsx b/modules/customer-invoices/src/web/proformas/pages/update/proforma-update-comp.tsx index 5d8205e9..bf452968 100644 --- a/modules/customer-invoices/src/web/proformas/pages/update/proforma-update-comp.tsx +++ b/modules/customer-invoices/src/web/proformas/pages/update/proforma-update-comp.tsx @@ -53,9 +53,7 @@ export const ProformaUpdateComp = ({ proforma: proformaData }: ProformaUpdateCom }); const handleSubmit = (formData: ProformaFormData) => { - console.log("Guardo factura"); const dto = ProformaDtoAdapter.toDto(formData, context); - console.log("dto => ", dto); mutate( { id: proforma_id, data: dto as Partial }, { diff --git a/modules/customer-invoices/src/web/proformas/shared/hooks/use-proforma-update-mutation.ts b/modules/customer-invoices/src/web/proformas/shared/hooks/use-proforma-update-mutation.ts index eaef1371..ba94b81a 100644 --- a/modules/customer-invoices/src/web/proformas/shared/hooks/use-proforma-update-mutation.ts +++ b/modules/customer-invoices/src/web/proformas/shared/hooks/use-proforma-update-mutation.ts @@ -33,12 +33,8 @@ export const useProformaUpdateMutation = () => { throw new ValidationErrorCollection("Validation failed", toValidationErrors(result.error)); } - console.log("Hola!!!"); - const dto: UpdateProformaByIdResult = await updateProformaById(dataSource, params); - console.log(dto); - return GetProformaByIdAdapter.fromDto(dto); }, onSuccess: async (proforma) => { diff --git a/modules/customer-invoices/src/web/proformas/update/controllers/use-update-proforma-page-controller.ts b/modules/customer-invoices/src/web/proformas/update/controllers/use-update-proforma-page-controller.ts index 880de470..ccabe2d3 100644 --- a/modules/customer-invoices/src/web/proformas/update/controllers/use-update-proforma-page-controller.ts +++ b/modules/customer-invoices/src/web/proformas/update/controllers/use-update-proforma-page-controller.ts @@ -12,7 +12,6 @@ export const useUpdateProformaPageController = () => { defaultLanguageCode: updateCtrl.form.watch("languageCode"), defaultCurrencyCode: updateCtrl.form.watch("currencyCode"), onCustomerSelected: (customer) => { - console.log(customer); updateCtrl.setCustomer(customer); }, }); diff --git a/modules/factuges/src/api/application/use-cases/create-proforma-from-factuges.use-case.ts b/modules/factuges/src/api/application/use-cases/create-proforma-from-factuges.use-case.ts index 227ae812..9ddc5fd5 100644 --- a/modules/factuges/src/api/application/use-cases/create-proforma-from-factuges.use-case.ts +++ b/modules/factuges/src/api/application/use-cases/create-proforma-from-factuges.use-case.ts @@ -148,8 +148,6 @@ export class CreateProformaFromFactugesUseCase { return Result.fail(createResult.error); } - console.log(createResult.data); - // Valida que los datos de entrada coincidan con el snapshot const proforma = createResult.data; const validationResult = this.validateDraftAgainstProforma(proformaDraft, proforma); @@ -238,6 +236,7 @@ export class CreateProformaFromFactugesUseCase { }); if (errors.length > 0) { + console.error(errors); return Result.fail( new ValidationErrorCollection( "La proforma generada no coincide con las magnitudes validadas del borrador importado.",