diff --git a/.vscode/settings.json b/.vscode/settings.json index 7d656bb9..2a3028a7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,12 @@ // Enable Font Ligatures "editor.fontLigatures": true, + // Lint + "eslint.workingDirectories": [{ "mode": "auto" }], + "eslint.run": "onType", + "eslint.validate": ["javascript", "typescript", "typescriptreact"], + "eslint.lintTask.enable": true, + // Javascript and TypeScript settings "js/ts.suggest.enabled": true, "js/ts.suggest.autoImports": true, diff --git a/apps/server/package.json b/apps/server/package.json index 99be28f6..91af0236 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -1,6 +1,6 @@ { "name": "@erp/factuges-server", - "version": "0.6.3", + "version": "0.6.4", "private": true, "scripts": { "build": "tsup src/index.ts --config tsup.config.ts", diff --git a/apps/server/src/lib/modules/module-loader.ts b/apps/server/src/lib/modules/module-loader.ts index 399ec67f..5affb58e 100644 --- a/apps/server/src/lib/modules/module-loader.ts +++ b/apps/server/src/lib/modules/module-loader.ts @@ -125,14 +125,14 @@ async function setupModule(name: string, params: ModuleParams, stack: string[]) // 4) models if (pkgApi?.models) { await withPhase(name, "registerModels", async () => { - await Promise.resolve(registerModels(pkgApi.models, params, { moduleName: name })); + await Promise.resolve(registerModels(pkgApi.models!, params, { moduleName: name })); }); } // 5) services (namespaced) if (pkgApi?.services) { await withPhase(name, "registerServices", async () => { - validateModuleServices(name, pkgApi.services); + validateModuleServices(name, pkgApi.services!); for (const [serviceKey, serviceApi] of Object.entries(pkgApi.services!)) { const fullName = buildServiceName(name, serviceKey); diff --git a/apps/web/package.json b/apps/web/package.json index 5720fac4..fa60023a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,7 +1,7 @@ { "name": "@erp/factuges-web", "private": true, - "version": "0.6.3", + "version": "0.6.4", "type": "module", "scripts": { "dev": "vite --host --clearScreen false", diff --git a/apps/web/src/components/error-fallbacks.tsx b/apps/web/src/components/error-fallbacks.tsx index 6d241bab..62238385 100644 --- a/apps/web/src/components/error-fallbacks.tsx +++ b/apps/web/src/components/error-fallbacks.tsx @@ -1,18 +1,18 @@ import { Button } from "@repo/shadcn-ui/components"; import * as React from "react"; -import { FallbackProps } from "react-error-boundary"; +import type { FallbackProps } from "react-error-boundary"; /** * 1) Fallback simple */ export function SimpleFallback({ error, resetErrorBoundary }: FallbackProps) { return ( -
-

⚠️ Algo salió mal

-
{error?.message}
+
+

⚠️ Algo salió mal

+
{error?.message}
@@ -25,22 +25,22 @@ export function SimpleFallback({ error, resetErrorBoundary }: FallbackProps) { */ export function SectionCardFallback({ error, resetErrorBoundary }: FallbackProps) { return ( -
-
-
-
-

No se pudo cargar esta sección

-

{error?.message}

-
+
+
+
+
+

No se pudo cargar esta sección

+

{error?.message}

+
@@ -56,15 +56,15 @@ export function SectionCardFallback({ error, resetErrorBoundary }: FallbackProps */ export function FullPageFallback({ error }: FallbackProps) { return ( -
-
😵
-

Ocurrió un error inesperado

-

{error?.message}

-
- +
+
😵
+

Ocurrió un error inesperado

+

{error?.message}

+
+ Volver al inicio -
@@ -77,22 +77,22 @@ export function FullPageFallback({ error }: FallbackProps) { */ export function ListFallback({ error, resetErrorBoundary }: FallbackProps) { return ( -
-
- 🗂️ +
+
+ 🗂️
-

No pudimos cargar la lista.

-

{error?.message}

-
+

No pudimos cargar la lista.

+

{error?.message}

+
@@ -108,17 +108,17 @@ export function ListFallback({ error, resetErrorBoundary }: FallbackProps) { */ export function FormFallback({ error, resetErrorBoundary }: FallbackProps) { return ( -
-

No se pudo mostrar el formulario

-

{error?.message}

-
+
+

No se pudo mostrar el formulario

+

{error?.message}

+
-
@@ -135,18 +135,18 @@ export function NetworkFallback({ error, resetErrorBoundary }: FallbackProps) { : "Estás sin conexión. Revisa tu red y reintenta."; return ( -
-
No pudimos obtener los datos
-

{error?.message}

-

{note}

-
+
+
No pudimos obtener los datos
+

{error?.message}

+

{note}

+
-
@@ -160,23 +160,23 @@ export function NetworkFallback({ error, resetErrorBoundary }: FallbackProps) { export function DevDetailsFallback({ error, resetErrorBoundary }: FallbackProps) { const [open, setOpen] = React.useState(false); return ( -
-
-

Algo falló

-
+
+
+

Algo falló

+
-
{open && ( -
+        
           {error?.stack || error?.message}
         
)} @@ -189,22 +189,22 @@ export function DevDetailsFallback({ error, resetErrorBoundary }: FallbackProps) */ export function SupportFallback({ error, resetErrorBoundary }: FallbackProps) { return ( -
-

No pudimos completar la acción

-

{error?.message}

-
+
+

No pudimos completar la acción

+

{error?.message}

+
- + Ir a Ayuda Contactar soporte diff --git a/apps/web/src/components/module-routes.tsx b/apps/web/src/components/module-routes.tsx index a5cbba8e..2cdf7693 100644 --- a/apps/web/src/components/module-routes.tsx +++ b/apps/web/src/components/module-routes.tsx @@ -1,6 +1,6 @@ -import { IModuleClient, ModuleClientParams } from "@erp/core/client"; -import { JSX } from "react"; -import { RouteObject, useRoutes } from "react-router-dom"; +import type { IModuleClient, ModuleClientParams } from "@erp/core/client"; +import type { JSX } from "react"; +import { type RouteObject, useRoutes } from "react-router-dom"; interface ModuleRoutesProps { modules: IModuleClient[]; diff --git a/apps/web/src/lib/axios/create-axios-auth-actions.ts b/apps/web/src/lib/axios/create-axios-auth-actions.ts index 52752152..76fcf204 100644 --- a/apps/web/src/lib/axios/create-axios-auth-actions.ts +++ b/apps/web/src/lib/axios/create-axios-auth-actions.ts @@ -1,4 +1,4 @@ -import { AxiosInstance } from "axios"; +import type { AxiosInstance } from "axios"; /** * Datos requeridos para iniciar sesión. diff --git a/eslint.config.mjs b/eslint.config.mjs index 7a8ff6a8..c120bb80 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -5,9 +5,14 @@ export default [ { files: ["**/*.ts", "**/*.tsx"], ignores: [ + "**/docs/**", "**/dist/**", + "**/out/**", "**/.turbo/**", - "**/node_modules/**" + "**/.vscode/**", + "**/node_modules/**", + "**/scripts/**", + "**/tools/**" ], languageOptions: { parser, diff --git a/modules/auth/package.json b/modules/auth/package.json index 481e1b6d..690c34a0 100644 --- a/modules/auth/package.json +++ b/modules/auth/package.json @@ -1,6 +1,6 @@ { "name": "@erp/auth", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/modules/core/package.json b/modules/core/package.json index c7a4c6c2..7800b3eb 100644 --- a/modules/core/package.json +++ b/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@erp/core", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/modules/core/src/api/infrastructure/di/catalogs.di.ts b/modules/core/src/api/infrastructure/di/catalogs.di.ts index ba57d7d0..e98d2b17 100644 --- a/modules/core/src/api/infrastructure/di/catalogs.di.ts +++ b/modules/core/src/api/infrastructure/di/catalogs.di.ts @@ -1,13 +1,21 @@ -import { type JsonTaxCatalogProvider, SpainTaxCatalogProvider } from "../../../common"; +import { + FactuGESPaymentCatalogProvider, + type JsonPaymentCatalogProvider, + type JsonTaxCatalogProvider, + SpainTaxCatalogProvider, +} from "../../../common"; export interface ICatalogs { taxCatalog: JsonTaxCatalogProvider; + paymentCatalog: JsonPaymentCatalogProvider; } export const buildCatalogs = (): ICatalogs => { const taxCatalog = SpainTaxCatalogProvider(); + const paymentCatalog = FactuGESPaymentCatalogProvider(); return { taxCatalog, + paymentCatalog, }; }; diff --git a/modules/core/src/common/catalogs/index.ts b/modules/core/src/common/catalogs/index.ts index eb90d3fa..6174782d 100644 --- a/modules/core/src/common/catalogs/index.ts +++ b/modules/core/src/common/catalogs/index.ts @@ -1 +1,2 @@ +export * from "./payments"; export * from "./taxes"; diff --git a/modules/core/src/common/catalogs/payments/factuges-payment-catalog.json b/modules/core/src/common/catalogs/payments/factuges-payment-catalog.json new file mode 100644 index 00000000..896dc5f7 --- /dev/null +++ b/modules/core/src/common/catalogs/payments/factuges-payment-catalog.json @@ -0,0 +1,23 @@ +[ + { + "id": "019c2834-a766-7787-a626-fa89cac3a8a1", + "company_id": "5e4dc5b3-96b9-4968-9490-14bd032fec5f", + "factuges_id": "6", + "description": "TRANSFERENCIA", + "group": "General" + }, + { + "id": "57ed228f-88bd-431d-b5e6-0ed9cff01684", + "company_id": "5e4dc5b3-96b9-4968-9490-14bd032fec5f", + "factuges_id": "14", + "description": "DOMICILIACION BANCARIA", + "group": "General" + }, + { + "id": "336e477f-9260-4cb7-b6fd-76f3b088a395", + "company_id": "5e4dc5b3-96b9-4968-9490-14bd032fec5f", + "factuges_id": "15", + "description": "TRANSFERENCIA BANCARIA", + "group": "General" + } +] \ No newline at end of file diff --git a/modules/core/src/common/catalogs/payments/factuges-payment-catalog.provider.ts b/modules/core/src/common/catalogs/payments/factuges-payment-catalog.provider.ts new file mode 100644 index 00000000..04746bb8 --- /dev/null +++ b/modules/core/src/common/catalogs/payments/factuges-payment-catalog.provider.ts @@ -0,0 +1,5 @@ +import factugesPaymentCatalog from "./factuges-payment-catalog.json"; +import { JsonPaymentCatalogProvider } from "./json-payment-catalog.provider"; + +export const FactuGESPaymentCatalogProvider = () => + new JsonPaymentCatalogProvider(factugesPaymentCatalog); diff --git a/modules/core/src/common/catalogs/payments/index.ts b/modules/core/src/common/catalogs/payments/index.ts new file mode 100644 index 00000000..d7b697b9 --- /dev/null +++ b/modules/core/src/common/catalogs/payments/index.ts @@ -0,0 +1,4 @@ +export * from "./factuges-payment-catalog.provider"; +export * from "./json-payment-catalog.provider"; +export * from "./payment-catalog.provider"; +export * from "./payment-catalog-types"; diff --git a/modules/core/src/common/catalogs/payments/json-payment-catalog.provider.ts b/modules/core/src/common/catalogs/payments/json-payment-catalog.provider.ts new file mode 100644 index 00000000..28ecd24d --- /dev/null +++ b/modules/core/src/common/catalogs/payments/json-payment-catalog.provider.ts @@ -0,0 +1,64 @@ +// --- Adaptador que carga el catálogo JSON en memoria e indexa por code --- + +import { Maybe } from "@repo/rdx-utils"; + +import type { PaymentCatalogProvider } from "./payment-catalog.provider"; +import type { + PaymentCatalogType, + PaymentItemType, + PaymentLookupItems, +} from "./payment-catalog-types"; + +export class JsonPaymentCatalogProvider implements PaymentCatalogProvider { + // Índice por código normalizado + private readonly catalog: Map; + + /** + * @param catalog Catálogo ya parseado (p.ej. import JSON o fetch) + */ + constructor(catalog: PaymentCatalogType) { + this.catalog = new Map(); + // Normalizamos códigos a minúsculas y sin espacios + for (const item of catalog) { + const key = item.factuges_id; + // En caso de duplicados, el último gana (o lanza error si prefieres) + this.catalog.set(key, item); + } + } + + static normalizeCode(code: string): string { + return (code ?? "").trim().toLowerCase(); + } + + findByFactuGESId(factuges_id: string): Maybe { + const found = this.catalog.get(factuges_id); + return found ? Maybe.some(found) : Maybe.none(); + } + + findById(id: string): Maybe { + for (const value of this.catalog.values()) { + if (value.id === id) { + return Maybe.some(value); + } + } + + return Maybe.none(); + } + getAll(): PaymentItemType[] { + return Array.from(this.catalog.values()); + } + + /** Devuelve un objeto indexado por código, compatible con PaymentMultiSelectField */ + toOptionLookup(): PaymentLookupItems { + return this.getAll().map((item) => ({ + label: item.description, + value: item.id, + group: item.group, + })); + } + + /** Devuelve la lista única de grupos disponibles */ + groups(): string[] { + return Array.from(new Set(Array.from(this.catalog.values()).map((i) => i.group))); + } +} diff --git a/modules/core/src/common/catalogs/payments/payment-catalog-types.ts b/modules/core/src/common/catalogs/payments/payment-catalog-types.ts new file mode 100644 index 00000000..e8ecab45 --- /dev/null +++ b/modules/core/src/common/catalogs/payments/payment-catalog-types.ts @@ -0,0 +1,17 @@ +// --- DTOs del catálogo (comparten contrato entre frontend/backend) --- + +export type PaymentItemType = { + id: string; + company_id: string; + factuges_id: string; + description: string; + group: string; +}; + +export type PaymentCatalogType = PaymentItemType[]; + +export type PaymentLookupItems = { + label: string; + value: string; + group: string; +}[]; diff --git a/modules/core/src/common/catalogs/payments/payment-catalog.provider.ts b/modules/core/src/common/catalogs/payments/payment-catalog.provider.ts new file mode 100644 index 00000000..9e9324ed --- /dev/null +++ b/modules/core/src/common/catalogs/payments/payment-catalog.provider.ts @@ -0,0 +1,19 @@ +import type { Maybe } from "@repo/rdx-utils"; // Usa tu implementación real de Maybe + +import type { + PaymentCatalogType, + PaymentItemType, + PaymentLookupItems, +} from "./payment-catalog-types"; + +export interface PaymentCatalogProvider { + findByFactuGESId(factuges_id: string): Maybe; + findById(id: string): Maybe; + + // devuelve el catálogo completo como array + getAll(): PaymentCatalogType; + + toOptionLookup(): PaymentLookupItems; + + groups(): string[]; //Devuelve una lista con los grupos +} diff --git a/modules/customer-invoices/package.json b/modules/customer-invoices/package.json index 3ba001e6..ba0123c9 100644 --- a/modules/customer-invoices/package.json +++ b/modules/customer-invoices/package.json @@ -1,6 +1,6 @@ { "name": "@erp/customer-invoices", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, 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 4e5304da..450faf70 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 @@ -401,6 +401,7 @@ export class Proforma extends AggregateRoot implements IP this.props.status = InvoiceStatus.issued(); return Result.ok(); } + // Cálculos /** diff --git a/modules/customer-invoices/src/api/domain/proformas/entities/proforma-items/proforma-item.entity.ts b/modules/customer-invoices/src/api/domain/proformas/entities/proforma-items/proforma-item.entity.ts index 9384e36d..671d5713 100644 --- a/modules/customer-invoices/src/api/domain/proformas/entities/proforma-items/proforma-item.entity.ts +++ b/modules/customer-invoices/src/api/domain/proformas/entities/proforma-items/proforma-item.entity.ts @@ -258,6 +258,8 @@ export class ProformaItem extends DomainEntity implem // Calcular impuestos individuales a partir de la base imponible const { ivaAmount, recAmount, retentionAmount } = this.taxes.totals(taxableAmount); + // El importe de la retención ya va en negativo (-1) y + // no hace falta indicarlo como resta. const taxesAmount = ivaAmount.add(recAmount).add(retentionAmount); const totalAmount = taxableAmount.add(taxesAmount); diff --git a/modules/customer-invoices/src/api/domain/proformas/services/proforma-compute-tax-groups.ts b/modules/customer-invoices/src/api/domain/proformas/services/proforma-compute-tax-groups.ts index 9300d9b5..ab4ce609 100644 --- a/modules/customer-invoices/src/api/domain/proformas/services/proforma-compute-tax-groups.ts +++ b/modules/customer-invoices/src/api/domain/proformas/services/proforma-compute-tax-groups.ts @@ -18,6 +18,8 @@ type TaxGroupState = { retentionCode: Maybe; retentionPercentage: Maybe; retentionAmount: ItemAmount; + + taxesAmount: ItemAmount; }; /** @@ -56,6 +58,8 @@ export function proformaComputeTaxGroups(items: IProformaItems): Map { const groups = proformaComputeTaxGroups(this.items); // <- devuelve en escala 4 - //const currencyCode = this.items.currencyCode; + // Vamos acumulando los importes, redondeando previamente a 2 decimales const rows = Array.from(groups.values()).map((g) => { const taxableAmount = this.toInvoiceAmount(g.taxableAmount); const ivaAmount = this.toInvoiceAmount(g.ivaAmount); const recAmount = this.toInvoiceAmount(g.recAmount); const retentionAmount = this.toInvoiceAmount(g.retentionAmount); - //const taxesAmount = this.toInvoiceAmount(g.taxesAmount); - - const taxesAmount = ivaAmount.add(recAmount).subtract(retentionAmount); + const taxesAmount = this.toInvoiceAmount(g.taxesAmount); return { taxableAmount, diff --git a/modules/customer-invoices/src/api/infrastructure/index.ts b/modules/customer-invoices/src/api/infrastructure/index.ts index 9db9d935..cece438d 100644 --- a/modules/customer-invoices/src/api/infrastructure/index.ts +++ b/modules/customer-invoices/src/api/infrastructure/index.ts @@ -1,3 +1,3 @@ -export * from "./common/persistence"; +export * from "./common"; export * from "./issued-invoices"; export * from "./proformas"; diff --git a/modules/customer-invoices/src/api/infrastructure/proformas/di/proforma-persistence-mappers.di.ts b/modules/customer-invoices/src/api/infrastructure/proformas/di/proforma-persistence-mappers.di.ts index 4780ea67..ea7e437d 100644 --- a/modules/customer-invoices/src/api/infrastructure/proformas/di/proforma-persistence-mappers.di.ts +++ b/modules/customer-invoices/src/api/infrastructure/proformas/di/proforma-persistence-mappers.di.ts @@ -13,16 +13,17 @@ export interface IProformaPersistenceMappers { export const buildProformaPersistenceMappers = ( catalogs: ICatalogs ): IProformaPersistenceMappers => { - const { taxCatalog } = catalogs; + const { taxCatalog, paymentCatalog } = catalogs; // Mappers para el repositorio const domainMapper = new SequelizeProformaDomainMapper({ taxCatalog, + paymentCatalog, }); const listMapper = new SequelizeProformaSummaryMapper(); // Mappers el DTO a las props validadas (CustomerProps) y luego construir agregado - const createMapper = new CreateProformaInputMapper({ taxCatalog }); + const createMapper = new CreateProformaInputMapper(); return { domainMapper, diff --git a/modules/customer-invoices/src/api/infrastructure/proformas/persistence/sequelize/mappers/domain/sequelize-proforma-domain.mapper.ts b/modules/customer-invoices/src/api/infrastructure/proformas/persistence/sequelize/mappers/domain/sequelize-proforma-domain.mapper.ts index bd605796..b48d9c63 100644 --- a/modules/customer-invoices/src/api/infrastructure/proformas/persistence/sequelize/mappers/domain/sequelize-proforma-domain.mapper.ts +++ b/modules/customer-invoices/src/api/infrastructure/proformas/persistence/sequelize/mappers/domain/sequelize-proforma-domain.mapper.ts @@ -1,3 +1,4 @@ +import type { JsonPaymentCatalogProvider } from "@erp/core"; import { DiscountPercentage, type MapperParamsType, SequelizeDomainMapper } from "@erp/core/api"; import { CurrencyCode, @@ -11,11 +12,10 @@ import { maybeFromNullableResult, maybeToNullable, } from "@repo/rdx-ddd"; -import { Maybe, Result, isNullishOrEmpty } from "@repo/rdx-utils"; +import { Result } from "@repo/rdx-utils"; import { InvoiceNumber, - InvoicePaymentMethod, InvoiceSerie, InvoiceStatus, Proforma, @@ -40,9 +40,21 @@ export class SequelizeProformaDomainMapper extends SequelizeDomainMapper< private _recipientMapper: SequelizeProformaRecipientDomainMapper; private _taxesMapper: SequelizeProformaTaxesDomainMapper; + private _paymentCatalog: JsonPaymentCatalogProvider; + constructor(params: MapperParamsType) { super(); + const { paymentCatalog } = params as { + paymentCatalog: JsonPaymentCatalogProvider; + }; + + this._paymentCatalog = paymentCatalog; + + if (!this._paymentCatalog) { + throw new Error('paymentCatalog not defined ("SequelizeProformaDomainMapper")'); + } + this._itemsMapper = new SequelizeProformaItemDomainMapper(params); this._recipientMapper = new SequelizeProformaRecipientDomainMapper(); this._taxesMapper = new SequelizeProformaTaxesDomainMapper(params); @@ -118,7 +130,7 @@ export class SequelizeProformaDomainMapper extends SequelizeDomainMapper< ); // Método de pago (VO opcional con id + descripción) - let paymentMethod = Maybe.none(); + /*let paymentMethod = Maybe.none(); if (!isNullishOrEmpty(raw.payment_method_id)) { const paymentId = extractOrPushError( @@ -127,19 +139,34 @@ export class SequelizeProformaDomainMapper extends SequelizeDomainMapper< errors ); - const paymentVO = extractOrPushError( - InvoicePaymentMethod.create( - { paymentDescription: String(raw.payment_method_description ?? "") }, - paymentId ?? undefined - ), - "payment_method_description", - errors - ); + if (paymentId) { + const paymentOrNot = this._paymentCatalog.findById(paymentId.toString()); - if (paymentVO) { - paymentMethod = Maybe.some(paymentVO); + if (paymentOrNot.isSome()) { + const paymentCatalogItem = paymentOrNot.unwrap(); + + const paymentVO = extractOrPushError( + InvoicePaymentMethod.create( + { paymentDescription: paymentCatalogItem.description ?? "" }, + paymentId + ), + "paymentMethod", + errors + ); + + if (paymentVO) { + paymentMethod = Maybe.some(paymentVO); + } + } } - } + }*/ + + // Método de pago (ID) + const paymentMethodId = extractOrPushError( + maybeFromNullableResult(raw.payment_method_id, (value) => UniqueID.create(String(value))), + "payment_method_id", + errors + ); // % descuento global (VO) const globalDiscountPercentage = extractOrPushError( @@ -170,7 +197,7 @@ export class SequelizeProformaDomainMapper extends SequelizeDomainMapper< notes, languageCode, currencyCode, - paymentMethod, + paymentMethodId, globalDiscountPercentage, linkedInvoiceId, @@ -241,7 +268,7 @@ export class SequelizeProformaDomainMapper extends SequelizeDomainMapper< globalDiscountPercentage: attributes.globalDiscountPercentage!, - paymentMethod: attributes.paymentMethod!, + paymentMethodId: attributes.paymentMethodId!, linkedInvoiceId: attributes.linkedInvoiceId!, // El id de la factura emitida (linked_invoice) se asigna al hacer issue() desde la proforma, no viene en el modelo de persistencia. }; @@ -296,7 +323,27 @@ export class SequelizeProformaDomainMapper extends SequelizeDomainMapper< ...params, }); - // 4) Si hubo errores de mapeo, devolvemos colección de validación + // 4) Payment + let payment: { + id: string | null; + description: string | null; + } = { id: null, description: null }; + + if (source.hasPaymentMethod) { + const paymentId = source.paymentMethodId.unwrap(); + const paymentOrNot = this._paymentCatalog.findById(paymentId.toString()); + + if (paymentOrNot.isSome()) { + const paymentItem = paymentOrNot.unwrap(); + + payment = { + id: paymentItem.id ?? null, + description: paymentItem.description ?? null, + }; + } + } + + // 5) Si hubo errores de mapeo, devolvemos colección de validación if (errors.length > 0) { return Result.fail( new ValidationErrorCollection("Customer invoice mapping to persistence failed", errors) @@ -329,14 +376,8 @@ export class SequelizeProformaDomainMapper extends SequelizeDomainMapper< description: maybeToNullable(source.description, (description) => description), notes: maybeToNullable(source.notes, (v) => v.toPrimitive()), - payment_method_id: maybeToNullable( - source.paymentMethod, - (payment) => payment.toObjectString().id - ), - payment_method_description: maybeToNullable( - source.paymentMethod, - (payment) => payment.toObjectString().payment_description - ), + payment_method_id: payment.id, + payment_method_description: payment.description, subtotal_amount_value: allAmounts.subtotalAmount.value, subtotal_amount_scale: allAmounts.subtotalAmount.scale, diff --git a/modules/customers/package.json b/modules/customers/package.json index d94ce344..88a2bdc4 100644 --- a/modules/customers/package.json +++ b/modules/customers/package.json @@ -1,7 +1,7 @@ { "name": "@erp/customers", "description": "Customers", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/modules/factuges/package.json b/modules/factuges/package.json index 3d04e052..8b8a69af 100644 --- a/modules/factuges/package.json +++ b/modules/factuges/package.json @@ -1,6 +1,6 @@ { "name": "@erp/factuges", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/modules/factuges/src/api/application/di/factuges-input-mappers.di.ts b/modules/factuges/src/api/application/di/factuges-input-mappers.di.ts index 9fc6b00b..3b518806 100644 --- a/modules/factuges/src/api/application/di/factuges-input-mappers.di.ts +++ b/modules/factuges/src/api/application/di/factuges-input-mappers.di.ts @@ -1,15 +1,22 @@ import type { ICatalogs } from "@erp/core/api"; -import { CreateProformaFromFactugesInputMapper, ICreateProformaFromFactugesInputMapper } from '../mappers'; + +import { + CreateProformaFromFactugesInputMapper, + type ICreateProformaFromFactugesInputMapper, +} from "../mappers"; export interface IFactugesInputMappers { createInputMapper: ICreateProformaFromFactugesInputMapper; } export const buildFactugesInputMappers = (catalogs: ICatalogs): IFactugesInputMappers => { - const { taxCatalog } = catalogs; + const { taxCatalog, paymentCatalog } = catalogs; // Mappers el DTO a las props validadas (FactugesProps) y luego construir agregado - const createInputMapper = new CreateProformaFromFactugesInputMapper({ taxCatalog }); + const createInputMapper = new CreateProformaFromFactugesInputMapper({ + taxCatalog, + paymentCatalog, + }); return { createInputMapper, diff --git a/modules/factuges/src/api/application/mappers/create-proforma-from-factuges-input.mapper.ts b/modules/factuges/src/api/application/mappers/create-proforma-from-factuges-input.mapper.ts index 105e6b71..d7ffefb0 100644 --- a/modules/factuges/src/api/application/mappers/create-proforma-from-factuges-input.mapper.ts +++ b/modules/factuges/src/api/application/mappers/create-proforma-from-factuges-input.mapper.ts @@ -1,4 +1,4 @@ -import type { JsonTaxCatalogProvider } from "@erp/core"; +import type { JsonPaymentCatalogProvider, JsonTaxCatalogProvider } from "@erp/core"; import { DiscountPercentage, Tax } from "@erp/core/api"; import { InvoiceAmount, @@ -103,6 +103,7 @@ export type ProformaDraft = { }; export type ProformaPaymentDraft = { + payment_id: string; factuges_id: string; description: string; }; @@ -126,9 +127,14 @@ export class CreateProformaFromFactugesInputMapper implements ICreateProformaFromFactugesInputMapper { private readonly taxCatalog: JsonTaxCatalogProvider; + private readonly paymentCatalog: JsonPaymentCatalogProvider; - constructor(params: { taxCatalog: JsonTaxCatalogProvider }) { + constructor(params: { + taxCatalog: JsonTaxCatalogProvider; + paymentCatalog: JsonPaymentCatalogProvider; + }) { this.taxCatalog = params.taxCatalog; + this.paymentCatalog = params.paymentCatalog; } public map( @@ -190,9 +196,20 @@ export class CreateProformaFromFactugesInputMapper const errors: ValidationErrorDetail[] = []; const { companyId } = params; + const factuges_id = String(dto.payment_method_id); + const paymentOrNot = this.paymentCatalog.findByFactuGESId(factuges_id); + + if (paymentOrNot.isNone()) { + errors.push({ + path: "payment_method_id", + message: "Forma de pago no encontrada", + }); + } + return { - factuges_id: String(dto.payment_method_id), - description: String(dto.payment_method_description), + payment_id: paymentOrNot.unwrap().id, + factuges_id: paymentOrNot.unwrap().factuges_id, + description: paymentOrNot.unwrap().description, }; } 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 9ddc5fd5..fd861ae5 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 @@ -340,6 +340,15 @@ export class CreateProformaFromFactugesUseCase { InvoicePaymentMethod.create({ paymentDescription: payment.description }, payment.id).data ); + console.log({ + ...proformaDraft, + companyId, + customerId, + status: defaultStatus, + paymentMethod, + recipient, + }); + return Result.ok({ ...proformaDraft, companyId, diff --git a/modules/factuges/src/api/application/use-cases/payments.json b/modules/factuges/src/api/application/use-cases/payments.json index 2a203755..95b5bc20 100644 --- a/modules/factuges/src/api/application/use-cases/payments.json +++ b/modules/factuges/src/api/application/use-cases/payments.json @@ -3,18 +3,21 @@ "id": "019c2834-a766-7787-a626-fa89cac3a8a1", "company_id": "5e4dc5b3-96b9-4968-9490-14bd032fec5f", "factuges_id": "6", - "description": "TRANSFERENCIA" + "description": "TRANSFERENCIA", + "group": "General" }, { "id": "57ed228f-88bd-431d-b5e6-0ed9cff01684", "company_id": "5e4dc5b3-96b9-4968-9490-14bd032fec5f", "factuges_id": "14", - "description": "DOMICILIACION BANCARIA" + "description": "DOMICILIACION BANCARIA", + "group": "General" }, { "id": "336e477f-9260-4cb7-b6fd-76f3b088a395", "company_id": "5e4dc5b3-96b9-4968-9490-14bd032fec5f", "factuges_id": "15", - "description": "TRANSFERENCIA BANCARIA" + "description": "TRANSFERENCIA BANCARIA", + "group": "General" } ] \ No newline at end of file diff --git a/modules/factuges/src/api/infraestructure/di/factuges.di.ts b/modules/factuges/src/api/infraestructure/di/factuges.di.ts index b6438fcd..26ad7c60 100644 --- a/modules/factuges/src/api/infraestructure/di/factuges.di.ts +++ b/modules/factuges/src/api/infraestructure/di/factuges.di.ts @@ -1,6 +1,6 @@ import { type SetupParams, buildCatalogs, buildTransactionManager } from "@erp/core/api"; -import type { ProformaPublicServices } from "@erp/customer-invoices/api"; -import type { CustomerPublicServices } from "@erp/customers/api"; +import type { IProformaPublicServices } from "@erp/customer-invoices/api"; +import type { ICustomerPublicServices } from "@erp/customers/api"; import { buildCreateProformaFromFactugesUseCase, @@ -11,8 +11,8 @@ import type { CreateProformaFromFactugesUseCase } from "../../application/use-ca export type FactugesInternalDeps = { useCases: { createProforma: (publicServices: { - customerServices: CustomerPublicServices; - proformaServices: ProformaPublicServices; + customerServices: ICustomerPublicServices; + proformaServices: IProformaPublicServices; }) => CreateProformaFromFactugesUseCase; }; }; @@ -31,8 +31,8 @@ export function buildFactugesDependencies(params: SetupParams): FactugesInternal return { useCases: { createProforma: (publicServices: { - customerServices: CustomerPublicServices; - proformaServices: ProformaPublicServices; + customerServices: ICustomerPublicServices; + proformaServices: IProformaPublicServices; }) => buildCreateProformaFromFactugesUseCase({ dtoMapper: inputMappers.createInputMapper, diff --git a/modules/supplier-invoices/package.json b/modules/supplier-invoices/package.json index 3bc94f7f..0ed72e33 100644 --- a/modules/supplier-invoices/package.json +++ b/modules/supplier-invoices/package.json @@ -1,7 +1,7 @@ { "name": "@erp/supplier-invoices", "description": "Supplier invoices", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/modules/supplier/package.json b/modules/supplier/package.json index da1af620..0d6e4434 100644 --- a/modules/supplier/package.json +++ b/modules/supplier/package.json @@ -1,7 +1,7 @@ { "name": "@erp/suppliers", "description": "Suppliers", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/package.json b/package.json index 2497bd89..e2c852c8 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "uecko-erp-2025", "private": true, - "version": "0.6.3", + "version": "0.6.4", "workspaces": [ "apps/*", "modules/*", "packages/*" ], "scripts": { + "lint": "turbo run lint", "build": "turbo build", "build:templates": "bash scripts/build-templates.sh", "build:api": "bash scripts/build-api.sh rodax --api", diff --git a/packages/rdx-criteria/package.json b/packages/rdx-criteria/package.json index 1b10b329..0966703b 100644 --- a/packages/rdx-criteria/package.json +++ b/packages/rdx-criteria/package.json @@ -1,6 +1,6 @@ { "name": "@repo/rdx-criteria", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/packages/rdx-ddd/package.json b/packages/rdx-ddd/package.json index 5e9f4a15..3400735f 100644 --- a/packages/rdx-ddd/package.json +++ b/packages/rdx-ddd/package.json @@ -1,6 +1,6 @@ { "name": "@repo/rdx-ddd", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/packages/rdx-logger/package.json b/packages/rdx-logger/package.json index a6c92e0f..751e210f 100644 --- a/packages/rdx-logger/package.json +++ b/packages/rdx-logger/package.json @@ -1,6 +1,6 @@ { "name": "@repo/rdx-logger", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/packages/rdx-ui/package.json b/packages/rdx-ui/package.json index 69ce357a..1a5ad0f3 100644 --- a/packages/rdx-ui/package.json +++ b/packages/rdx-ui/package.json @@ -1,6 +1,6 @@ { "name": "@repo/rdx-ui", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/packages/rdx-utils/package.json b/packages/rdx-utils/package.json index 03497ab7..a039bc9f 100644 --- a/packages/rdx-utils/package.json +++ b/packages/rdx-utils/package.json @@ -1,6 +1,6 @@ { "name": "@repo/rdx-utils", - "version": "0.6.3", + "version": "0.6.4", "private": true, "type": "module", "sideEffects": false, diff --git a/packages/shadcn-ui/src/components/alert-dialog.tsx b/packages/shadcn-ui/src/components/alert-dialog.tsx index 11c4d9d9..363ce996 100644 --- a/packages/shadcn-ui/src/components/alert-dialog.tsx +++ b/packages/shadcn-ui/src/components/alert-dialog.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/alert.tsx b/packages/shadcn-ui/src/components/alert.tsx index 3a1ed534..49ac248f 100644 --- a/packages/shadcn-ui/src/components/alert.tsx +++ b/packages/shadcn-ui/src/components/alert.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/avatar.tsx b/packages/shadcn-ui/src/components/avatar.tsx index 7ae5c2ef..3c09a1f9 100644 --- a/packages/shadcn-ui/src/components/avatar.tsx +++ b/packages/shadcn-ui/src/components/avatar.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/breadcrumb.tsx b/packages/shadcn-ui/src/components/breadcrumb.tsx index 5b53e8f4..13318af7 100644 --- a/packages/shadcn-ui/src/components/breadcrumb.tsx +++ b/packages/shadcn-ui/src/components/breadcrumb.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { mergeProps } from "@base-ui/react/merge-props" import { useRender } from "@base-ui/react/use-render" diff --git a/packages/shadcn-ui/src/components/card.tsx b/packages/shadcn-ui/src/components/card.tsx index ac6bac90..7b9e04bc 100644 --- a/packages/shadcn-ui/src/components/card.tsx +++ b/packages/shadcn-ui/src/components/card.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/carousel.tsx b/packages/shadcn-ui/src/components/carousel.tsx index 79c6ca9a..3fa068e5 100644 --- a/packages/shadcn-ui/src/components/carousel.tsx +++ b/packages/shadcn-ui/src/components/carousel.tsx @@ -89,7 +89,7 @@ function Carousel({ ) React.useEffect(() => { - if (!api || !setApi) return + if (!(api && setApi)) return setApi(api) }, [api, setApi]) diff --git a/packages/shadcn-ui/src/components/chart.tsx b/packages/shadcn-ui/src/components/chart.tsx index 45dc1a94..b2dd186a 100644 --- a/packages/shadcn-ui/src/components/chart.tsx +++ b/packages/shadcn-ui/src/components/chart.tsx @@ -180,7 +180,7 @@ function ChartTooltipContent({ labelKey, ]) - if (!active || !payload?.length) { + if (!(active && payload?.length)) { return null } @@ -193,7 +193,7 @@ function ChartTooltipContent({ className )} > - {!nestLabel ? tooltipLabel : null} + {nestLabel ? null : tooltipLabel}
{payload .filter((item) => item.type !== "none") diff --git a/packages/shadcn-ui/src/components/command.tsx b/packages/shadcn-ui/src/components/command.tsx index f41c1cc2..883e7957 100644 --- a/packages/shadcn-ui/src/components/command.tsx +++ b/packages/shadcn-ui/src/components/command.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { Command as CommandPrimitive } from "cmdk" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/context-menu.tsx b/packages/shadcn-ui/src/components/context-menu.tsx index 060e38ef..f9691894 100644 --- a/packages/shadcn-ui/src/components/context-menu.tsx +++ b/packages/shadcn-ui/src/components/context-menu.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/dialog.tsx b/packages/shadcn-ui/src/components/dialog.tsx index b8710893..5030e6e2 100644 --- a/packages/shadcn-ui/src/components/dialog.tsx +++ b/packages/shadcn-ui/src/components/dialog.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { Dialog as DialogPrimitive } from "@base-ui/react/dialog" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/drawer.tsx b/packages/shadcn-ui/src/components/drawer.tsx index a57eec73..622964a2 100644 --- a/packages/shadcn-ui/src/components/drawer.tsx +++ b/packages/shadcn-ui/src/components/drawer.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { Drawer as DrawerPrimitive } from "vaul" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/dropdown-menu.tsx b/packages/shadcn-ui/src/components/dropdown-menu.tsx index d05294b9..dd2bedfd 100644 --- a/packages/shadcn-ui/src/components/dropdown-menu.tsx +++ b/packages/shadcn-ui/src/components/dropdown-menu.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { Menu as MenuPrimitive } from "@base-ui/react/menu" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/input-group.tsx b/packages/shadcn-ui/src/components/input-group.tsx index 8d923bbf..9bb171db 100644 --- a/packages/shadcn-ui/src/components/input-group.tsx +++ b/packages/shadcn-ui/src/components/input-group.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/input.tsx b/packages/shadcn-ui/src/components/input.tsx index 2e9ff27a..5d635735 100644 --- a/packages/shadcn-ui/src/components/input.tsx +++ b/packages/shadcn-ui/src/components/input.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { Input as InputPrimitive } from "@base-ui/react/input" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/item.tsx b/packages/shadcn-ui/src/components/item.tsx index 4d7a09ee..533ef522 100644 --- a/packages/shadcn-ui/src/components/item.tsx +++ b/packages/shadcn-ui/src/components/item.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { mergeProps } from "@base-ui/react/merge-props" import { useRender } from "@base-ui/react/use-render" import { cva, type VariantProps } from "class-variance-authority" diff --git a/packages/shadcn-ui/src/components/label.tsx b/packages/shadcn-ui/src/components/label.tsx index e36fc554..eac3637a 100644 --- a/packages/shadcn-ui/src/components/label.tsx +++ b/packages/shadcn-ui/src/components/label.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/menubar.tsx b/packages/shadcn-ui/src/components/menubar.tsx index a0dd1bad..b236f62d 100644 --- a/packages/shadcn-ui/src/components/menubar.tsx +++ b/packages/shadcn-ui/src/components/menubar.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { Menu as MenuPrimitive } from "@base-ui/react/menu" import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar" diff --git a/packages/shadcn-ui/src/components/native-select.tsx b/packages/shadcn-ui/src/components/native-select.tsx index 310fb346..f40eda91 100644 --- a/packages/shadcn-ui/src/components/native-select.tsx +++ b/packages/shadcn-ui/src/components/native-select.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { cn } from "@repo/shadcn-ui/lib/utils" import { ChevronDownIcon } from "lucide-react" diff --git a/packages/shadcn-ui/src/components/pagination.tsx b/packages/shadcn-ui/src/components/pagination.tsx index 5b549257..36fc8191 100644 --- a/packages/shadcn-ui/src/components/pagination.tsx +++ b/packages/shadcn-ui/src/components/pagination.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { cn } from "@repo/shadcn-ui/lib/utils" import { Button } from "@repo/shadcn-ui/components/button" diff --git a/packages/shadcn-ui/src/components/popover.tsx b/packages/shadcn-ui/src/components/popover.tsx index da343a48..eefda4bd 100644 --- a/packages/shadcn-ui/src/components/popover.tsx +++ b/packages/shadcn-ui/src/components/popover.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { Popover as PopoverPrimitive } from "@base-ui/react/popover" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/select.tsx b/packages/shadcn-ui/src/components/select.tsx index 41514a0d..4149760f 100644 --- a/packages/shadcn-ui/src/components/select.tsx +++ b/packages/shadcn-ui/src/components/select.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { Select as SelectPrimitive } from "@base-ui/react/select" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/sheet.tsx b/packages/shadcn-ui/src/components/sheet.tsx index 642879e8..e78e03f2 100644 --- a/packages/shadcn-ui/src/components/sheet.tsx +++ b/packages/shadcn-ui/src/components/sheet.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { Dialog as SheetPrimitive } from "@base-ui/react/dialog" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/sidebar.tsx b/packages/shadcn-ui/src/components/sidebar.tsx index 36ab0a89..ab0ecddf 100644 --- a/packages/shadcn-ui/src/components/sidebar.tsx +++ b/packages/shadcn-ui/src/components/sidebar.tsx @@ -518,7 +518,7 @@ function SidebarMenuButton({ }, props ), - render: !tooltip ? render : , + render: tooltip ? : render, state: { slot: "sidebar-menu-button", sidebar: "menu-button", diff --git a/packages/shadcn-ui/src/components/table.tsx b/packages/shadcn-ui/src/components/table.tsx index db7f2443..e05d714c 100644 --- a/packages/shadcn-ui/src/components/table.tsx +++ b/packages/shadcn-ui/src/components/table.tsx @@ -1,6 +1,6 @@ "use client" -import * as React from "react" +import type * as React from "react" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/textarea.tsx b/packages/shadcn-ui/src/components/textarea.tsx index 5449aafe..2d809b9a 100644 --- a/packages/shadcn-ui/src/components/textarea.tsx +++ b/packages/shadcn-ui/src/components/textarea.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/toggle-group.tsx b/packages/shadcn-ui/src/components/toggle-group.tsx index cfeaa415..cc1112d8 100644 --- a/packages/shadcn-ui/src/components/toggle-group.tsx +++ b/packages/shadcn-ui/src/components/toggle-group.tsx @@ -1,7 +1,7 @@ import * as React from "react" import { Toggle as TogglePrimitive } from "@base-ui/react/toggle" import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group" -import { type VariantProps } from "class-variance-authority" +import type { VariantProps } from "class-variance-authority" import { cn } from "@repo/shadcn-ui/lib/utils" import { toggleVariants } from "@repo/shadcn-ui/components/toggle" diff --git a/tools/fastreportcli-net-core-skia/FastReportCliGenerator/publish/linux/FastReportCliGenerator b/tools/fastreportcli-net-core-skia/FastReportCliGenerator/publish/linux/FastReportCliGenerator index 4da963d4..d6e4bf71 100755 Binary files a/tools/fastreportcli-net-core-skia/FastReportCliGenerator/publish/linux/FastReportCliGenerator and b/tools/fastreportcli-net-core-skia/FastReportCliGenerator/publish/linux/FastReportCliGenerator differ diff --git a/tools/fastreportcli-net-core-skia/FastReportCliGenerator/publish/windows/FastReportCliGenerator.exe b/tools/fastreportcli-net-core-skia/FastReportCliGenerator/publish/windows/FastReportCliGenerator.exe index 4291a074..7fc1f494 100755 Binary files a/tools/fastreportcli-net-core-skia/FastReportCliGenerator/publish/windows/FastReportCliGenerator.exe and b/tools/fastreportcli-net-core-skia/FastReportCliGenerator/publish/windows/FastReportCliGenerator.exe differ