erp-pos-ecommerce-shared 0.2.1 → 0.2.2
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/components.js.map +1 -1
- package/dist/hooks.d.ts +3 -2
- package/dist/hooks.js +32 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/dist/queries.d.ts +2 -2
- package/dist/queries.js +24 -0
- package/dist/queries.js.map +1 -1
- package/dist/services.d.ts +2 -1
- package/dist/services.js +9 -1
- package/dist/services.js.map +1 -1
- package/dist/{shift.queries-ul2JnMAU.d.ts → shift.queries-BbWWhwdp.d.ts} +1 -0
- package/package.json +1 -1
package/dist/queries.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { QueryClient, UseMutationOptions } from '@tanstack/react-query';
|
|
|
5
5
|
import { b as IAttributeQueryParams, c as IAttributeResponse, I as IAttribute, d as IAttributeValue, h as ICategoryResponse, g as ICategory, f as IBatchResponse, e as IBatch } from './filters.interface-glhGBJfx.js';
|
|
6
6
|
import { aA as UserResponse, $ as IUser, A as AgentResponse, a0 as IUserForm, a2 as IWareHouseResponse, a1 as IWareHouse, k as IClientResponse, l as IClientResponseById, h as IClient, j as IClientRequest, g as IBankTerminalResponse, d as IBankTerminal, a as BankTerminalResponse, e as IBankTerminalForm, U as IRole, O as IProviderResponse, L as IProvider, M as IProviderForSelect, N as IProviderRequest, o as ILocationResponse, n as ILocation, p as IMaterial, G as IPriceTypeResponse, F as IPriceType, z as IPermissionRole, a8 as PermissionRole, J as IPromotionResponse, H as IPromotion, K as IPromotionType, x as IPaymentMethod, y as IPaymentMethodAmountExpected, w as IPayment, Z as ITax, r as IModule, Y as ITag, ab as PricePerGramResponse, E as IPricePerGramHistory, az as UpdatePriceRequest, ag as SchedulePriceRequest, a9 as PriceCalculationResponse, C as CalculatePriceRequest, c as ComparisonBy, V as IStockByWarehouseReport, R as IReportX, P as IReportComparisonByTimeFrame, Q as IReportInventory, S as IReportZ, ak as TblOrderDetail, X as IStockMovementResponse, W as IStockMovement } from './warehouse.interface-fnr42ygU.js';
|
|
7
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, d as LoginResponse, S as StateResponse, e as PrintQRResponse, G as GetReturnsByOrderIdResponse } from './warehouse.service-CDDl5yeV.js';
|
|
8
|
-
import { F as FolioResponse } from './shift.queries-
|
|
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-
|
|
8
|
+
import { F as FolioResponse } from './shift.queries-BbWWhwdp.js';
|
|
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-BbWWhwdp.js';
|
|
10
10
|
import '@tanstack/react-table';
|
|
11
11
|
|
|
12
12
|
declare const attributeQueryKeys: {
|
package/dist/queries.js
CHANGED
|
@@ -2168,6 +2168,14 @@ var createProductVariant = async (variant) => {
|
|
|
2168
2168
|
});
|
|
2169
2169
|
return data;
|
|
2170
2170
|
};
|
|
2171
|
+
var createProductVariants = async (formData) => {
|
|
2172
|
+
const { data } = await api.post("product/variants", formData, {
|
|
2173
|
+
headers: {
|
|
2174
|
+
"Content-Type": "multipart/form-data"
|
|
2175
|
+
}
|
|
2176
|
+
});
|
|
2177
|
+
return data;
|
|
2178
|
+
};
|
|
2171
2179
|
var updateProductVariant = async (data) => {
|
|
2172
2180
|
const { data: response } = await api.put(
|
|
2173
2181
|
`product/variants/update/${data.get("productDetailID")}`,
|
|
@@ -2370,6 +2378,22 @@ var products = {
|
|
|
2370
2378
|
});
|
|
2371
2379
|
}
|
|
2372
2380
|
}),
|
|
2381
|
+
createProductVariants: (queryClient) => ({
|
|
2382
|
+
mutationFn: createProductVariants,
|
|
2383
|
+
onSuccess: () => {
|
|
2384
|
+
queryClient.invalidateQueries({ queryKey: productQueryKeys.all });
|
|
2385
|
+
successNotification({
|
|
2386
|
+
title: "Variantes creadas",
|
|
2387
|
+
message: "Las variantes se han creado correctamente."
|
|
2388
|
+
});
|
|
2389
|
+
},
|
|
2390
|
+
onError: (error) => {
|
|
2391
|
+
errorNotification({
|
|
2392
|
+
title: "Error",
|
|
2393
|
+
message: error.message || "No se pudieron crear las variantes."
|
|
2394
|
+
});
|
|
2395
|
+
}
|
|
2396
|
+
}),
|
|
2373
2397
|
updateProductVariant: (queryClient) => ({
|
|
2374
2398
|
mutationFn: updateProductVariant,
|
|
2375
2399
|
onSuccess: () => {
|