erp-pos-ecommerce-shared 0.2.22 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks.d.ts +16 -5
- package/dist/hooks.js +21 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +27 -9
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/queries.d.ts +33 -7
- package/dist/queries.js +16 -0
- package/dist/queries.js.map +1 -1
- package/dist/services.d.ts +9 -3
- package/dist/services.js +16 -1
- package/dist/services.js.map +1 -1
- package/dist/{shift.queries-MPSeGMrR.d.ts → shift.queries-BluElDWe.d.ts} +3 -17
- package/dist/{warehouse.interface-S5seQY-_.d.ts → warehouse.interface-CCyPQruB.d.ts} +72 -1
- package/dist/{warehouse.service-D5fHR5E3.d.ts → warehouse.service-hWeYeuP7.d.ts} +1 -1
- package/package.json +1 -1
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { B as BatchData, I as IAttribute, a as IAttributeFilter, b as IAttributeQueryParams, c as IAttributeResponse, d as IAttributeValue, e as IBatch, f as IBatchResponse, g as ICategory, h as ICategoryRequest, i as ICategoryResponse, j as IFilterSelectOption, k as IFilterType, l as IProduct, m as IProductDetails, n as IProductDetailsResponse, o as IProductResponse, p as IProductVariantRequest, q as IStock, r as ITableFilterConfig, P as ProdStats, s as ProdStock, t as ProductOptions, T as TblCategories, u as TblMaterials, v as TblProductsImage, w as TblProductsTag, x as TblTags } from './filters.interface-BwMi9FRP.js';
|
|
2
|
-
export { A as AgentResponse, B as BankTerminalQuery, a as BankTerminalResponse, C as CalculatePriceRequest, b as ChartType, c as ComparisonBy, D as DateRange, I as IAgent,
|
|
2
|
+
export { A as AgentResponse, B as BankTerminalQuery, a as BankTerminalResponse, C as CalculatePriceRequest, b as ChartType, c as ComparisonBy, D as DateRange, F as Folio, d as FolioResponse, I as IAgent, e as IBankTerminal, f as IBankTerminalForm, g as IBankTerminalOption, h as IBankTerminalResponse, i as IClient, j as IClientDataForTable, k as IClientRequest, l as IClientResponse, m as IClientResponseById, n as IContpaqOrder, o as IContpaqOrderItem, p as IContpaqOrderPayment, q as IContpaqPaymentMethodTotal, r as IContpaqSalesReport, s as IFolio, t as IFolioResponse, u as IGender, v as ILocation, w as ILocationResponse, x as IMaterial, y as IMeta, z as IModule, E as IMovement, G as IMovementResponse, H as IOrder, J as IOrderResponse, K as IPayment, L as IPaymentMethod, M as IPaymentMethodAmountExpected, N as IPermissionRole, O as IPricePerGramHistory, P as IPriceType, Q as IPriceTypeResponse, R as IPromotion, S as IPromotionResponse, T as IPromotionType, U as IProvider, V as IProviderForSelect, W as IProviderRequest, X as IProviderResponse, Y as IReportComparisonByTimeFrame, Z as IReportInventory, _ as IReportX, $ as IReportZ, a0 as IReview, a1 as IRole, a2 as IStockByWarehouseReport, a3 as IStockMovement, a4 as IStockMovementResponse, a5 as ITag, a6 as ITax, a7 as ITaxResponse, a8 as IUser, a9 as IUserForm, aa as IWareHouse, ab as IWareHouseResponse, ac as IWareHouseSelect, ad as MaterialSummary, ae as PaymentOptions, af as Period, ag as Permission, ah as PermissionRole, ai as PriceCalculationResponse, aj as PricePerGramForm, ak as PricePerGramResponse, al as ProductInfo, am as PromotionTypeEnum, an as ReportData, ao as ReportDataProduct, ap as SchedulePriceRequest, aq as TblModules, ar as TblMoneyTransactionTypes, as as TblMoneyTransactions, at as TblOrderDetail, au as TblOrderDetailsMoneyTransactions, av as TblOrderStatus, aw as TblPermissions, ax as TblPriceTypes, ay as TblProducts, az as TblPromotionTypes, aA as TblPromotionsTargetProductIDTotblProduct, aB as TblProvidersTblProvidersUserIDTotblUser, aC as TblReturn, aD as TblReturnDetail, aE as TblRoles, aF as TblRolesTblUsersRoleIDTotblRoles, aG as TblUsersTblProvidersUserIDTotblUsers, aH as TblUsersTblTotblUsers, aI as UpdatePriceRequest, aJ as UserResponse, aK as WeightBasedSale } from './warehouse.interface-CCyPQruB.js';
|
|
3
3
|
export { D as DataTableConfig, S as ServerTableState, T as TableHeaderStyle, d as defaultDataTableConfig } from './datatable.interface-DbB5oxj-.js';
|
|
4
4
|
export { B as ButtonTypes, F as FieldTypes, a as FileType, I as IBaseField, b as IButton, c as IDateField, d as IEmailField, e as IField, f as IFileField, g as IHiddenField, h as IMultiSelectField, i as INumberField, j as IOptions, k as IPasswordField, l as ISelect, m as ISelectField, n as ISwitchField, o as ITagField, p as ITextField, T as TagData } from './form.interface-91Dz2oFr.js';
|
|
5
5
|
import { ElementType } from 'react';
|
package/dist/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/interfaces/datatable.interface.ts","../src/interfaces/form.interface.ts","../src/interfaces/permission.interface.ts","../src/interfaces/promotion.interface.ts","../src/interfaces/report.interface.ts"],"names":["Permission","PromotionTypeEnum","ComparisonBy","ChartType"],"mappings":";AAkDO,IAAM,sBAAA,GAA0C;AAAA,EACrD,iBAAiB,CAAC,CAAA,EAAG,EAAA,EAAI,EAAA,EAAI,IAAI,EAAE,CAAA;AAAA,EACnC,eAAA,EAAiB,EAAA;AAAA,EACjB,iBAAA,EAAmB,WAAA;AAAA,EACnB,kBAAA,EAAoB;AACtB;;;AC4FO,IAAM,UAAA,GAAa;AAAA,EACxB,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,OAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,QAAA,EAAU,UAAA;AAAA,EACV,MAAA,EAAQ,QAAA;AAAA,EACR,WAAA,EAAa,aAAA;AAAA,EACb,IAAA,EAAM,MAAA;AAAA,EACN,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,IAAA,EAAM,MAAA;AAAA,EACN,GAAA,EAAK;AACP;AAMO,IAAM,WAAA,GAAc;AAAA,EACzB,MAAA,EAAQ,Q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State passed to onStateChange on every table interaction.\n * Use these values to build your API request.\n */\nexport interface ServerTableState {\n pageIndex: number\n pageSize: number\n globalFilter: string\n columnFilters: ColumnFiltersState\n sorting: { id: string; desc: boolean }[]\n}\n\n/**\n * Style options for the table header row.\n * Pass as the headerStyle (or legacy headerBgColor) prop to customize appearance.\n */\nexport interface TableHeaderStyle {\n /** Header background color. Use light-dark(light, dark) for theme-aware colors */\n bgColor?: string;\n /** Header text (and icon) color */\n textColor?: string;\n /** Header background color on hover (if not set, a default is used) */\n hoverBgColor?: string;\n /** Header text color on hover (if not set, same as textColor) */\n hoverTextColor?: string;\n /** Header font weight (e.g. 600, 700, \"bold\") */\n fontWeight?: number | string;\n /** Header font size in px */\n fontSize?: number | string;\n /** Horizontal padding for header cells (e.g. \"4px 10px\") */\n padding?: string;\n}\n\n/**\n * Configuration for the DataTable UI.\n * Pass partial overrides via the `config` prop to customize defaults.\n */\nexport interface DataTableConfig {\n /** Page size options for the pagination selector */\n pageSizeOptions: number[];\n /** Default page size when the table first loads */\n defaultPageSize: number;\n /** Placeholder for the search input */\n searchPlaceholder: string;\n /** Whether to show the search input */\n enableGlobalFilter: boolean;\n}\n\nexport const defaultDataTableConfig: DataTableConfig = {\n pageSizeOptions: [5, 10, 15, 20, 50],\n defaultPageSize: 10,\n searchPlaceholder: 'Buscar...',\n enableGlobalFilter: true,\n}\n","import type { TblProductsImage } from './product.interface';\n\nexport type IField =\n | ITextField\n | IPasswordField\n | INumberField\n | ISelectField\n | IMultiSelectField\n | IDateField\n | IEmailField\n | IHiddenField\n | ISwitchField\n | IFileField\n | ITagField;\n\nexport interface IHiddenField extends IBaseField {\n type: typeof FieldTypes.HIDDEN;\n}\n\nexport interface ITextField extends IBaseField {\n type: typeof FieldTypes.TEXT;\n}\n\nexport interface IEmailField extends IBaseField {\n type: typeof FieldTypes.EMAIL;\n}\n\nexport interface IPasswordField extends IBaseField {\n type: typeof FieldTypes.PASSWORD;\n}\n\nexport interface ITagField\n extends IBaseField,\n Omit<ISelect, 'options'> {\n type: typeof FieldTypes.TAG;\n options: TagData[];\n}\n\nexport interface ISwitchField extends IBaseField {\n type: typeof FieldTypes.SWITCH;\n defaultChecked?: boolean;\n labelPosition?: 'left' | 'right';\n onLabel?: string;\n offLabel?: string;\n}\n\nexport type FileType =\n | 'image'\n | 'video'\n | 'audio'\n | 'pdf'\n | 'document';\n\nexport interface IFileField extends IBaseField {\n type: typeof FieldTypes.FILE;\n multiple?: boolean;\n accept?: string[] | readonly string[];\n maxSize?: number;\n maxFiles?: number;\n maxSizeMessage?: string;\n maxFilesMessage?: string;\n fileType: FileType;\n defaultImages?: TblProductsImage[];\n}\n\nexport interface INumberField extends IBaseField {\n type: typeof FieldTypes.NUMBER;\n min?: number;\n max?: number;\n preffix?: string;\n suffix?: string;\n allowNegative?: boolean;\n allowDecimal?: boolean;\n decimalScale?: number;\n fixedDecimalScale?: boolean;\n decimalSeparator?: string;\n hideControls?: boolean;\n step?: number;\n}\n\nexport interface ISelectField extends IBaseField, ISelect {\n type: typeof FieldTypes.SELECT;\n}\n\nexport interface IMultiSelectField extends IBaseField, ISelect {\n type: typeof FieldTypes.MULTISELECT;\n}\n\nexport interface IDateField extends IBaseField {\n type: typeof FieldTypes.DATE;\n}\n\nexport interface ISelect extends IBaseField {\n options: IOptions[];\n allowDeselect?: boolean;\n clearable?: boolean;\n searchable?: boolean;\n nothingFoundMessage?: string;\n checkIconPosition?: 'right' | 'left';\n withCheckIcon?: boolean;\n limit?: number;\n renderOption?: (option: IOptions) => React.ReactNode;\n}\n\ntype ColumnWidth = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface IBaseField {\n name: string;\n label?: string;\n description?: string;\n placeholder?: string;\n required?: boolean;\n error?: string;\n disabled?: boolean;\n defaultValue?: string | number | boolean | string[] | Date;\n requiredMessage?: string;\n columnWidth?: ColumnWidth;\n onChange?: (value: string) => void;\n section?: number;\n page?: number;\n}\n\nexport interface IButton {\n hidden?: boolean;\n type: ButtonTypes;\n label: string;\n fullWidth?: boolean;\n className?: string;\n style?: React.CSSProperties;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n disabled?: boolean;\n loading?: boolean;\n Icon?: React.ReactNode;\n iconPosition?: 'left' | 'right';\n color?: string;\n variant?: \"gradient\" | \"subtle\" | \"filled\" | \"light\" | \"outline\" | \"transparent\" | \"white\" | \"default\"\n}\n\nexport interface IOptions {\n value: string;\n label: string;\n}\n\nexport interface TagData {\n value: string;\n}\n\nexport const FieldTypes = {\n TEXT: 'text',\n EMAIL: 'email',\n NUMBER: 'number',\n PASSWORD: 'password',\n SELECT: 'select',\n MULTISELECT: 'multiselect',\n DATE: 'date',\n HIDDEN: 'hidden',\n SWITCH: 'switch',\n FILE: 'file',\n TAG: 'tag',\n} as const;\n\nexport type FieldTypes = (typeof FieldTypes)[keyof typeof FieldTypes];\nexport type ButtonTypes =\n (typeof ButtonTypes)[keyof typeof ButtonTypes];\n\nexport const ButtonTypes = {\n SUBMIT: 'submit',\n BUTTON: 'button',\n RESET: 'reset',\n} as const;\n","export interface IPermissionRole {\n permissionRole: PermissionRole[]\n moduleNames: string[]\n permissionNames: string[]\n roleNames: string[]\n}\nexport interface PermissionRole {\n role_PermissionID: number\n roleID: number\n permissionID: number\n moduleID: number\n hasPermission: boolean\n syncStatusID: number\n masterCodeID: null\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblModules: TblModules\n tblPermissions: TblPermissions\n tblRoles: TblRoles\n}\n\nexport interface TblModules {\n moduleName: string\n}\n\nexport interface TblPermissions {\n permission: Permission\n}\n\nexport enum Permission {\n Crear = 'Crear',\n Editar = 'Editar',\n Eliminar = 'Eliminar',\n Ver = 'Ver'\n}\n\nexport interface TblRoles {\n role: string\n}\n","import type { IProduct } from \"./product.interface\"\n\nexport interface IPromotionResponse {\n total: number\n data: IPromotion[]\n skip: number\n limit: number\n}\n\nexport interface IPromotion {\n promotionID: number\n promotionName: string\n startDate: Date\n endDate: Date\n isActive: number\n description: string\n promotionTypeID: number\n productID: null\n batchID: null\n providerID: null\n n: null\n m: null\n discountPercentage: null\n priceTypeID: null\n targetProductID: null\n discountAmount: number\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblPromotions_targetProductIDTotblProducts: TblPromotionsTargetProductIDTotblProduct[]\n tblPromotionTypes: TblPromotionTypes\n}\n\nexport interface TblPromotionTypes {\n promotionTypeID: number\n promotionType: string\n description: string\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n}\n\nexport interface TblPromotionsTargetProductIDTotblProduct {\n promotionID: number\n productID: number\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblProducts: IProduct\n}\n\n\nexport interface IPromotionType {\n promotionTypeID: number\n promotionType: string\n description: string\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n}\n\nexport enum PromotionTypeEnum {\n NXM = 'NXM',\n PRODUCTO = 'PRODUCTO',\n TEMPORADA = 'TEMPORADA',\n PROVEEDOR = 'PROVEEDOR',\n LOTE = 'LOTE'\n}\n","export interface IStockByWarehouseReport {\n warehouse: string\n product: string\n batch: string\n stock: number\n}\n\nexport enum ComparisonBy {\n YEAR = 'year',\n MONTH = 'month',\n WEEK = 'week',\n CUSTOM = 'custom'\n}\n\nexport enum ChartType {\n BAR = 'bar',\n LINE = 'line',\n PIE = 'pie'\n}\n\nexport interface IReportX {\n reportDataString: string\n paymentMethods?: Array<{\n paymentMethod: string\n amount: number\n }>\n}\n\nexport interface IReportZ {\n reportDataString: string\n headerData: {\n cutDate: string\n cutTime: string\n terminalNumber: string\n cashierID: number\n cashierName: string\n zCutFolio: string\n previousZCutFolio: string\n }\n salesSummary: {\n grossSales: number\n totalReturns: number\n totalDiscounts: number\n netSubtotal: number\n dayTotal: number\n }\n paymentMethods: Array<{\n paymentMethod: string\n amount: number\n }>\n cashMovements: {\n initialFund: number\n cashDeposits: number\n cashWithdrawals: number\n totalCashAtClosing: number\n }\n folioControl: {\n firstFolio: string\n lastFolio: string\n }\n}\n\nexport interface IReportComparisonByTimeFrame {\n currentPeriod: Period\n previousPeriod: Period\n}\n\nexport interface Period {\n title: string\n dateRange: DateRange\n data: ReportData[]\n totalByPeriod: number\n // Nuevos campos para resumen de materiales\n materialsSummary?: MaterialSummary[]\n}\n\nexport interface MaterialSummary {\n materialName: string\n totalGrams: number\n totalRevenue: number\n productCount: number\n averagePricePerGram: number\n}\n\nexport interface ReportData {\n period: string\n products: ReportDataProduct[]\n}\n\nexport interface ReportDataProduct {\n productName: string\n salesInNumberByPeriod: number\n salesInPriceByPeriod: number\n // Nuevos campos para información detallada\n materialName?: string\n totalWeight?: number\n averageWeight?: number\n categoryName?: string\n}\n\nexport interface ProductInfo {\n productName: string\n category: string\n quantitySold: number\n totalRevenue: number\n}\n\nexport interface DateRange {\n start: Date\n end: Date\n}\n\nexport interface IReportInventory {\n productName: string\n productVariant: string\n price: number\n category: string\n material: string\n stock: number\n stockID: number\n warehouse: string\n provider: string\n lote: string\n size: string\n caliber: string\n purity: string\n weight: number\n batchID: number\n productID: number\n productDetailID: number\n batchComment?: string\n unitCost?: number\n profitPercentage?: number\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/interfaces/datatable.interface.ts","../src/interfaces/form.interface.ts","../src/interfaces/permission.interface.ts","../src/interfaces/promotion.interface.ts","../src/interfaces/report.interface.ts"],"names":["Permission","PromotionTypeEnum","ComparisonBy","ChartType"],"mappings":";AAkDO,IAAM,sBAAA,GAA0C;AAAA,EACrD,iBAAiB,CAAC,CAAA,EAAG,EAAA,EAAI,EAAA,EAAI,IAAI,EAAE,CAAA;AAAA,EACnC,eAAA,EAAiB,EAAA;AAAA,EACjB,iBAAA,EAAmB,WAAA;AAAA,EACnB,kBAAA,EAAoB;AACtB;;;AC4FO,IA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AAA,cAAA,QAAA,CAAA,GAAS,QAAA;AAJC,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA;AAOL,IAAK,SAAA,qBAAAC,UAAAA,KAAL;AACL,EAAAA,WAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,WAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,WAAA,KAAA,CAAA,GAAM,KAAA;AAHI,EAAA,OAAAA,UAAAA;AAAA,CAAA,EAAA,SAAA,IAAA,EAAA","file":"interfaces.js","sourcesContent":["import type { ColumnFiltersState } from '@tanstack/react-table'\n\n/**\n * State passed to onStateChange on every table interaction.\n * Use these values to build your API request.\n */\nexport interface ServerTableState {\n pageIndex: number\n pageSize: number\n globalFilter: string\n columnFilters: ColumnFiltersState\n sorting: { id: string; desc: boolean }[]\n}\n\n/**\n * Style options for the table header row.\n * Pass as the headerStyle (or legacy headerBgColor) prop to customize appearance.\n */\nexport interface TableHeaderStyle {\n /** Header background color. Use light-dark(light, dark) for theme-aware colors */\n bgColor?: string;\n /** Header text (and icon) color */\n textColor?: string;\n /** Header background color on hover (if not set, a default is used) */\n hoverBgColor?: string;\n /** Header text color on hover (if not set, same as textColor) */\n hoverTextColor?: string;\n /** Header font weight (e.g. 600, 700, \"bold\") */\n fontWeight?: number | string;\n /** Header font size in px */\n fontSize?: number | string;\n /** Horizontal padding for header cells (e.g. \"4px 10px\") */\n padding?: string;\n}\n\n/**\n * Configuration for the DataTable UI.\n * Pass partial overrides via the `config` prop to customize defaults.\n */\nexport interface DataTableConfig {\n /** Page size options for the pagination selector */\n pageSizeOptions: number[];\n /** Default page size when the table first loads */\n defaultPageSize: number;\n /** Placeholder for the search input */\n searchPlaceholder: string;\n /** Whether to show the search input */\n enableGlobalFilter: boolean;\n}\n\nexport const defaultDataTableConfig: DataTableConfig = {\n pageSizeOptions: [5, 10, 15, 20, 50],\n defaultPageSize: 10,\n searchPlaceholder: 'Buscar...',\n enableGlobalFilter: true,\n}\n","import type { TblProductsImage } from './product.interface';\n\nexport type IField =\n | ITextField\n | IPasswordField\n | INumberField\n | ISelectField\n | IMultiSelectField\n | IDateField\n | IEmailField\n | IHiddenField\n | ISwitchField\n | IFileField\n | ITagField;\n\nexport interface IHiddenField extends IBaseField {\n type: typeof FieldTypes.HIDDEN;\n}\n\nexport interface ITextField extends IBaseField {\n type: typeof FieldTypes.TEXT;\n}\n\nexport interface IEmailField extends IBaseField {\n type: typeof FieldTypes.EMAIL;\n}\n\nexport interface IPasswordField extends IBaseField {\n type: typeof FieldTypes.PASSWORD;\n}\n\nexport interface ITagField\n extends IBaseField,\n Omit<ISelect, 'options'> {\n type: typeof FieldTypes.TAG;\n options: TagData[];\n}\n\nexport interface ISwitchField extends IBaseField {\n type: typeof FieldTypes.SWITCH;\n defaultChecked?: boolean;\n labelPosition?: 'left' | 'right';\n onLabel?: string;\n offLabel?: string;\n}\n\nexport type FileType =\n | 'image'\n | 'video'\n | 'audio'\n | 'pdf'\n | 'document';\n\nexport interface IFileField extends IBaseField {\n type: typeof FieldTypes.FILE;\n multiple?: boolean;\n accept?: string[] | readonly string[];\n maxSize?: number;\n maxFiles?: number;\n maxSizeMessage?: string;\n maxFilesMessage?: string;\n fileType: FileType;\n defaultImages?: TblProductsImage[];\n}\n\nexport interface INumberField extends IBaseField {\n type: typeof FieldTypes.NUMBER;\n min?: number;\n max?: number;\n preffix?: string;\n suffix?: string;\n allowNegative?: boolean;\n allowDecimal?: boolean;\n decimalScale?: number;\n fixedDecimalScale?: boolean;\n decimalSeparator?: string;\n hideControls?: boolean;\n step?: number;\n}\n\nexport interface ISelectField extends IBaseField, ISelect {\n type: typeof FieldTypes.SELECT;\n}\n\nexport interface IMultiSelectField extends IBaseField, ISelect {\n type: typeof FieldTypes.MULTISELECT;\n}\n\nexport interface IDateField extends IBaseField {\n type: typeof FieldTypes.DATE;\n}\n\nexport interface ISelect extends IBaseField {\n options: IOptions[];\n allowDeselect?: boolean;\n clearable?: boolean;\n searchable?: boolean;\n nothingFoundMessage?: string;\n checkIconPosition?: 'right' | 'left';\n withCheckIcon?: boolean;\n limit?: number;\n renderOption?: (option: IOptions) => React.ReactNode;\n}\n\ntype ColumnWidth = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface IBaseField {\n name: string;\n label?: string;\n description?: string;\n placeholder?: string;\n required?: boolean;\n error?: string;\n disabled?: boolean;\n defaultValue?: string | number | boolean | string[] | Date;\n requiredMessage?: string;\n columnWidth?: ColumnWidth;\n onChange?: (value: string) => void;\n section?: number;\n page?: number;\n}\n\nexport interface IButton {\n hidden?: boolean;\n type: ButtonTypes;\n label: string;\n fullWidth?: boolean;\n className?: string;\n style?: React.CSSProperties;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n disabled?: boolean;\n loading?: boolean;\n Icon?: React.ReactNode;\n iconPosition?: 'left' | 'right';\n color?: string;\n variant?: \"gradient\" | \"subtle\" | \"filled\" | \"light\" | \"outline\" | \"transparent\" | \"white\" | \"default\"\n}\n\nexport interface IOptions {\n value: string;\n label: string;\n}\n\nexport interface TagData {\n value: string;\n}\n\nexport const FieldTypes = {\n TEXT: 'text',\n EMAIL: 'email',\n NUMBER: 'number',\n PASSWORD: 'password',\n SELECT: 'select',\n MULTISELECT: 'multiselect',\n DATE: 'date',\n HIDDEN: 'hidden',\n SWITCH: 'switch',\n FILE: 'file',\n TAG: 'tag',\n} as const;\n\nexport type FieldTypes = (typeof FieldTypes)[keyof typeof FieldTypes];\nexport type ButtonTypes =\n (typeof ButtonTypes)[keyof typeof ButtonTypes];\n\nexport const ButtonTypes = {\n SUBMIT: 'submit',\n BUTTON: 'button',\n RESET: 'reset',\n} as const;\n","export interface IPermissionRole {\n permissionRole: PermissionRole[]\n moduleNames: string[]\n permissionNames: string[]\n roleNames: string[]\n}\nexport interface PermissionRole {\n role_PermissionID: number\n roleID: number\n permissionID: number\n moduleID: number\n hasPermission: boolean\n syncStatusID: number\n masterCodeID: null\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblModules: TblModules\n tblPermissions: TblPermissions\n tblRoles: TblRoles\n}\n\nexport interface TblModules {\n moduleName: string\n}\n\nexport interface TblPermissions {\n permission: Permission\n}\n\nexport enum Permission {\n Crear = 'Crear',\n Editar = 'Editar',\n Eliminar = 'Eliminar',\n Ver = 'Ver'\n}\n\nexport interface TblRoles {\n role: string\n}\n","import type { IProduct } from \"./product.interface\"\n\nexport interface IPromotionResponse {\n total: number\n data: IPromotion[]\n skip: number\n limit: number\n}\n\nexport interface IPromotion {\n promotionID: number\n promotionName: string\n startDate: Date\n endDate: Date\n isActive: number\n description: string\n promotionTypeID: number\n productID: null\n batchID: null\n providerID: null\n n: null\n m: null\n discountPercentage: null\n priceTypeID: null\n targetProductID: null\n discountAmount: number\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblPromotions_targetProductIDTotblProducts: TblPromotionsTargetProductIDTotblProduct[]\n tblPromotionTypes: TblPromotionTypes\n}\n\nexport interface TblPromotionTypes {\n promotionTypeID: number\n promotionType: string\n description: string\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n}\n\nexport interface TblPromotionsTargetProductIDTotblProduct {\n promotionID: number\n productID: number\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblProducts: IProduct\n}\n\n\nexport interface IPromotionType {\n promotionTypeID: number\n promotionType: string\n description: string\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n}\n\nexport enum PromotionTypeEnum {\n NXM = 'NXM',\n PRODUCTO = 'PRODUCTO',\n TEMPORADA = 'TEMPORADA',\n PROVEEDOR = 'PROVEEDOR',\n LOTE = 'LOTE'\n}\n","export interface IStockByWarehouseReport {\n warehouse: string\n product: string\n batch: string\n stock: number\n}\n\nexport enum ComparisonBy {\n YEAR = 'year',\n MONTH = 'month',\n WEEK = 'week',\n CUSTOM = 'custom'\n}\n\nexport enum ChartType {\n BAR = 'bar',\n LINE = 'line',\n PIE = 'pie'\n}\n\nexport interface IReportX {\n reportDataString: string\n paymentMethods?: Array<{\n paymentMethod: string\n amount: number\n }>\n}\n\nexport interface IReportZ {\n reportDataString: string\n headerData: {\n cutDate: string\n cutTime: string\n terminalNumber: string\n cashierID: number\n cashierName: string\n zCutFolio: string\n previousZCutFolio: string\n }\n salesSummary: {\n grossSales: number\n totalReturns: number\n totalDiscounts: number\n netSubtotal: number\n dayTotal: number\n }\n paymentMethods: Array<{\n paymentMethod: string\n amount: number\n }>\n cashMovements: {\n initialFund: number\n cashDeposits: number\n cashWithdrawals: number\n totalCashAtClosing: number\n }\n folioControl: {\n firstFolio: string\n lastFolio: string\n }\n}\n\nexport interface IReportComparisonByTimeFrame {\n currentPeriod: Period\n previousPeriod: Period\n}\n\nexport interface Period {\n title: string\n dateRange: DateRange\n data: ReportData[]\n totalByPeriod: number\n // Nuevos campos para resumen de materiales\n materialsSummary?: MaterialSummary[]\n}\n\nexport interface MaterialSummary {\n materialName: string\n totalGrams: number\n totalRevenue: number\n productCount: number\n averagePricePerGram: number\n}\n\nexport interface ReportData {\n period: string\n products: ReportDataProduct[]\n}\n\nexport interface ReportDataProduct {\n productName: string\n salesInNumberByPeriod: number\n salesInPriceByPeriod: number\n // Nuevos campos para información detallada\n materialName?: string\n totalWeight?: number\n averageWeight?: number\n categoryName?: string\n}\n\nexport interface ProductInfo {\n productName: string\n category: string\n quantitySold: number\n totalRevenue: number\n}\n\nexport interface DateRange {\n start: Date\n end: Date\n}\n\nexport interface IContpaqOrderItem {\n productName: string\n quantity: number\n amount: number\n weight?: number | null\n isWeightBased?: boolean\n}\n\nexport interface IContpaqOrderPayment {\n paymentMethod: string\n transactionTypeID: number\n amount: number\n}\n\nexport interface IContpaqOrder {\n orderID: number\n folio: number\n orderDate: string | null\n clientName: string\n savedBy: string\n orderStatus: string\n items: IContpaqOrderItem[]\n orderTotal: number\n payments: IContpaqOrderPayment[]\n totalPaid: number\n pendingBalance: number\n}\n\nexport interface IContpaqPaymentMethodTotal {\n paymentMethod: string\n transactionTypeID: number\n amount: number\n}\n\nexport interface IContpaqSalesReport {\n orders: IContpaqOrder[]\n paymentMethodTotals: IContpaqPaymentMethodTotal[]\n totalGeneral: number\n totalSales: number\n dateRange: {\n startDate: string\n endDate: string\n }\n}\n\nexport interface IReportInventory {\n productName: string\n productVariant: string\n price: number\n category: string\n material: string\n stock: number\n stockID: number\n warehouse: string\n provider: string\n lote: string\n size: string\n caliber: string\n purity: string\n weight: number\n batchID: number\n productID: number\n productDetailID: number\n batchComment?: string\n unitCost?: number\n profitPercentage?: number\n}\n"]}
|
package/dist/queries.d.ts
CHANGED
|
@@ -3,10 +3,9 @@ import * as _tanstack_query_core from '@tanstack/query-core';
|
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { QueryClient, UseMutationOptions } from '@tanstack/react-query';
|
|
5
5
|
import { b as IAttributeQueryParams, c as IAttributeResponse, I as IAttribute, d as IAttributeValue, i as ICategoryResponse, g as ICategory, f as IBatchResponse, e as IBatch } from './filters.interface-BwMi9FRP.js';
|
|
6
|
-
import {
|
|
7
|
-
import { W as WarehouseResponse, U as UpdateBatchData, L as LocationResponse, M as MaterialResponse, b as IExchangeResponse, I as IExchange, P as PaymentType, c as IUpdatePermission, e as LoginResponse, S as StateResponse, f as PrintQRResponse, G as GetReturnsByOrderIdResponse, d as IUserSettings } from './warehouse.service-
|
|
8
|
-
|
|
9
|
-
export { C as CloseShiftData, G as GenderResponse, H as HealthCheckResponse, P as ProductQueryParams, U as UseOrdersParams, g as genderQueryKeys, a as genders, h as health, b as healthQueryKeys, o as orderQueryKeys, c as orders, p as productQueryKeys, d as products, s as shifts } from './shift.queries-MPSeGMrR.js';
|
|
6
|
+
import { aJ as UserResponse, a8 as IUser, A as AgentResponse, a9 as IUserForm, ab as IWareHouseResponse, aa as IWareHouse, l as IClientResponse, m as IClientResponseById, i as IClient, k as IClientRequest, h as IBankTerminalResponse, e as IBankTerminal, a as BankTerminalResponse, f as IBankTerminalForm, a1 as IRole, X as IProviderResponse, U as IProvider, V as IProviderForSelect, W as IProviderRequest, w as ILocationResponse, v as ILocation, x as IMaterial, Q as IPriceTypeResponse, P as IPriceType, N as IPermissionRole, ah as PermissionRole, S as IPromotionResponse, R as IPromotion, T as IPromotionType, L as IPaymentMethod, M as IPaymentMethodAmountExpected, K as IPayment, a6 as ITax, z as IModule, s as IFolio, a5 as ITag, ak as PricePerGramResponse, O as IPricePerGramHistory, aI as UpdatePriceRequest, ap as SchedulePriceRequest, ai as PriceCalculationResponse, C as CalculatePriceRequest, c as ComparisonBy, a2 as IStockByWarehouseReport, _ as IReportX, Y as IReportComparisonByTimeFrame, Z as IReportInventory, $ as IReportZ, r as IContpaqSalesReport, at as TblOrderDetail, a4 as IStockMovementResponse, a3 as IStockMovement } from './warehouse.interface-CCyPQruB.js';
|
|
7
|
+
import { W as WarehouseResponse, U as UpdateBatchData, L as LocationResponse, M as MaterialResponse, b as IExchangeResponse, I as IExchange, P as PaymentType, c as IUpdatePermission, e as LoginResponse, S as StateResponse, f as PrintQRResponse, G as GetReturnsByOrderIdResponse, d as IUserSettings } from './warehouse.service-hWeYeuP7.js';
|
|
8
|
+
export { C as CloseShiftData, G as GenderResponse, H as HealthCheckResponse, P as ProductQueryParams, U as UseOrdersParams, g as genderQueryKeys, a as genders, h as health, b as healthQueryKeys, o as orderQueryKeys, c as orders, p as productQueryKeys, d as products, s as shifts } from './shift.queries-BluElDWe.js';
|
|
10
9
|
import '@tanstack/react-table';
|
|
11
10
|
|
|
12
11
|
declare const attributeQueryKeys: {
|
|
@@ -1687,11 +1686,11 @@ declare const folioQueryKeys: {
|
|
|
1687
1686
|
declare const folios: {
|
|
1688
1687
|
queries: {
|
|
1689
1688
|
all: readonly ["folio"];
|
|
1690
|
-
getNextFolioToUseInBatches: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<
|
|
1691
|
-
queryFn?: _tanstack_query_core.QueryFunction<
|
|
1689
|
+
getNextFolioToUseInBatches: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<IFolio, Error, IFolio, readonly ["folio", "nextForBatches"]>, "queryFn"> & {
|
|
1690
|
+
queryFn?: _tanstack_query_core.QueryFunction<IFolio, readonly ["folio", "nextForBatches"], never> | undefined;
|
|
1692
1691
|
} & {
|
|
1693
1692
|
queryKey: readonly ["folio", "nextForBatches"] & {
|
|
1694
|
-
[dataTagSymbol]:
|
|
1693
|
+
[dataTagSymbol]: IFolio;
|
|
1695
1694
|
[dataTagErrorSymbol]: Error;
|
|
1696
1695
|
};
|
|
1697
1696
|
};
|
|
@@ -1886,6 +1885,13 @@ declare const reportQueryKeys: {
|
|
|
1886
1885
|
warehouseIDs: number[] | null;
|
|
1887
1886
|
providerIDs: number[] | null;
|
|
1888
1887
|
}];
|
|
1888
|
+
contpaqSales: (params: {
|
|
1889
|
+
startDate: string;
|
|
1890
|
+
endDate: string;
|
|
1891
|
+
}) => readonly ["reports", "contpaqSales", {
|
|
1892
|
+
startDate: string;
|
|
1893
|
+
endDate: string;
|
|
1894
|
+
}];
|
|
1889
1895
|
pendingReportZ: () => readonly ["reports", "pendingReportZ"];
|
|
1890
1896
|
paymentMethods: () => readonly ["reports", "paymentMethods"];
|
|
1891
1897
|
};
|
|
@@ -2016,6 +2022,26 @@ declare const reports: {
|
|
|
2016
2022
|
[dataTagErrorSymbol]: Error;
|
|
2017
2023
|
};
|
|
2018
2024
|
};
|
|
2025
|
+
getContpaqSalesReport: (params: {
|
|
2026
|
+
startDate: string;
|
|
2027
|
+
endDate: string;
|
|
2028
|
+
} | null) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<IContpaqSalesReport, Error, IContpaqSalesReport, readonly ["reports", "contpaqSales", {
|
|
2029
|
+
startDate: string;
|
|
2030
|
+
endDate: string;
|
|
2031
|
+
}]>, "queryFn"> & {
|
|
2032
|
+
queryFn?: _tanstack_query_core.QueryFunction<IContpaqSalesReport, readonly ["reports", "contpaqSales", {
|
|
2033
|
+
startDate: string;
|
|
2034
|
+
endDate: string;
|
|
2035
|
+
}], never> | undefined;
|
|
2036
|
+
} & {
|
|
2037
|
+
queryKey: readonly ["reports", "contpaqSales", {
|
|
2038
|
+
startDate: string;
|
|
2039
|
+
endDate: string;
|
|
2040
|
+
}] & {
|
|
2041
|
+
[dataTagSymbol]: IContpaqSalesReport;
|
|
2042
|
+
[dataTagErrorSymbol]: Error;
|
|
2043
|
+
};
|
|
2044
|
+
};
|
|
2019
2045
|
getPendingReportZ: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Date[], Error, Date[], readonly ["reports", "pendingReportZ"]>, "queryFn"> & {
|
|
2020
2046
|
queryFn?: _tanstack_query_core.QueryFunction<Date[], readonly ["reports", "pendingReportZ"], never> | undefined;
|
|
2021
2047
|
} & {
|
package/dist/queries.js
CHANGED
|
@@ -3370,6 +3370,15 @@ var printReportZ = async ({
|
|
|
3370
3370
|
);
|
|
3371
3371
|
return response.data;
|
|
3372
3372
|
};
|
|
3373
|
+
var getSalesReportContpaq = async ({
|
|
3374
|
+
startDate,
|
|
3375
|
+
endDate
|
|
3376
|
+
}) => {
|
|
3377
|
+
const response = await api.get(
|
|
3378
|
+
`/report/contpaq-sales?startDate=${startDate}&endDate=${endDate}`
|
|
3379
|
+
);
|
|
3380
|
+
return response.data;
|
|
3381
|
+
};
|
|
3373
3382
|
var checkPendingReportZ = async () => {
|
|
3374
3383
|
const response = await api.get("/report/pending-report-z");
|
|
3375
3384
|
return response.data;
|
|
@@ -3383,6 +3392,7 @@ var reportQueryKeys = {
|
|
|
3383
3392
|
reportZ: (params) => [...reportQueryKeys.all, "reportZ", params],
|
|
3384
3393
|
comparison: (params) => [...reportQueryKeys.all, "comparison", params],
|
|
3385
3394
|
inventory: (params) => [...reportQueryKeys.all, "inventory", params],
|
|
3395
|
+
contpaqSales: (params) => [...reportQueryKeys.all, "contpaqSales", params],
|
|
3386
3396
|
pendingReportZ: () => [...reportQueryKeys.all, "pendingReportZ"],
|
|
3387
3397
|
paymentMethods: () => [...reportQueryKeys.all, "paymentMethods"]
|
|
3388
3398
|
};
|
|
@@ -3430,6 +3440,12 @@ var reports = {
|
|
|
3430
3440
|
enabled: !!params?.startDate && !!params?.sellerID,
|
|
3431
3441
|
staleTime: 60 * 1e3
|
|
3432
3442
|
}),
|
|
3443
|
+
getContpaqSalesReport: (params) => queryOptions({
|
|
3444
|
+
queryFn: () => getSalesReportContpaq(params),
|
|
3445
|
+
queryKey: reportQueryKeys.contpaqSales(params),
|
|
3446
|
+
enabled: !!params?.startDate && !!params?.endDate,
|
|
3447
|
+
staleTime: 60 * 1e3
|
|
3448
|
+
}),
|
|
3433
3449
|
getPendingReportZ: () => queryOptions({
|
|
3434
3450
|
queryFn: checkPendingReportZ,
|
|
3435
3451
|
queryKey: reportQueryKeys.pendingReportZ(),
|