.
This commit is contained in:
parent
cfbc4e6657
commit
4361df07a0
@ -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
|
||||
|
||||
@ -32,8 +32,6 @@ export class ProformaUpdater implements IProformaUpdater {
|
||||
}): Promise<Result<Proforma, Error>> {
|
||||
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);
|
||||
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -171,8 +171,6 @@ export class Proforma extends AggregateRoot<ProformaInternalProps> implements IP
|
||||
...otherProps,
|
||||
};
|
||||
|
||||
console.log(candidateProps);
|
||||
|
||||
// Validacciones
|
||||
const validationResult = Proforma.validateCreateProps(candidateProps);
|
||||
|
||||
|
||||
@ -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);
|
||||
},
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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<ProformaFormData> },
|
||||
{
|
||||
|
||||
@ -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) => {
|
||||
|
||||
@ -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);
|
||||
},
|
||||
});
|
||||
|
||||
@ -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.",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user