@zauru-sdk/services 1.0.97 → 1.0.98

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.
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getGeneralQuery = void 0;
7
7
  const common_1 = require("@zauru-sdk/common");
8
- const common_js_1 = require("~/common.js");
9
- const httpGraphQL_js_1 = __importDefault(require("~/zauru/httpGraphQL.js"));
8
+ const common_js_1 = require("../common.js");
9
+ const httpGraphQL_js_1 = __importDefault(require("../zauru/httpGraphQL.js"));
10
10
  /**
11
11
  * getGeneralQuery
12
12
  * @param headers
@@ -371,7 +371,7 @@ const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {}) => {
371
371
  if (finalConfig.withShipmentToMyAgency) {
372
372
  responseData = response.data?.data?.purchase_orders.filter((x) => x.shipment_purchase_orders.some((y) => y.shipment.agency_to_id?.toString() == session.get("agency_id")));
373
373
  }
374
- if (finalConfig.withLotStocksToMyAgency) {
374
+ if (finalConfig.withLotStocksToMyAgency && finalConfig.withLots) {
375
375
  responseData = responseData.map((x) => {
376
376
  x.lots = x.lots.map((y) => {
377
377
  y.lot_stocks = y.lot_stocks.filter((z) => z.agency_id == session.get("agency_id"));
@@ -1,6 +1,6 @@
1
1
  import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
2
- import { getGraphQLAPIHeaders } from "~/common.js";
3
- import httpGraphQLAPI from "~/zauru/httpGraphQL.js";
2
+ import { getGraphQLAPIHeaders } from "../common.js";
3
+ import httpGraphQLAPI from "../zauru/httpGraphQL.js";
4
4
  /**
5
5
  * getGeneralQuery
6
6
  * @param headers
@@ -351,7 +351,7 @@ export const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {})
351
351
  if (finalConfig.withShipmentToMyAgency) {
352
352
  responseData = response.data?.data?.purchase_orders.filter((x) => x.shipment_purchase_orders.some((y) => y.shipment.agency_to_id?.toString() == session.get("agency_id")));
353
353
  }
354
- if (finalConfig.withLotStocksToMyAgency) {
354
+ if (finalConfig.withLotStocksToMyAgency && finalConfig.withLots) {
355
355
  responseData = responseData.map((x) => {
356
356
  x.lots = x.lots.map((y) => {
357
357
  y.lot_stocks = y.lot_stocks.filter((z) => z.agency_id == session.get("agency_id"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "1.0.97",
3
+ "version": "1.0.98",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@remix-run/node": "^2.8.1",
28
- "@zauru-sdk/common": "^1.0.95",
28
+ "@zauru-sdk/common": "^1.0.98",
29
29
  "@zauru-sdk/config": "^1.0.60",
30
30
  "@zauru-sdk/graphql": "^1.0.94",
31
- "@zauru-sdk/types": "^1.0.95",
31
+ "@zauru-sdk/types": "^1.0.98",
32
32
  "axios": "^1.6.7",
33
33
  "chalk": "5.3.0"
34
34
  },
35
- "gitHead": "1726ba2804f8e2304a85ca8186387ee4545464d3"
35
+ "gitHead": "e3b92fe4d2aea4be988540f6b233f0a27eb72a40"
36
36
  }