@zauru-sdk/graphql 2.0.213 → 2.0.216
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.
|
@@ -36,6 +36,7 @@ export declare const getSerialsStringQuery: (filters: {
|
|
|
36
36
|
id?: number | string;
|
|
37
37
|
}) => string;
|
|
38
38
|
export declare const getPurchaseOrdersBetweenDatesStringQuery: (startDate: string, endDate: string, config: {
|
|
39
|
+
ids?: number[] | string[];
|
|
39
40
|
agencyId?: number | string;
|
|
40
41
|
itemId?: number | string;
|
|
41
42
|
reference?: string;
|
|
@@ -330,6 +330,9 @@ const getSerialsStringQuery = (filters) => {
|
|
|
330
330
|
exports.getSerialsStringQuery = getSerialsStringQuery;
|
|
331
331
|
const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) => {
|
|
332
332
|
const conditions = [];
|
|
333
|
+
if (config.ids && config.ids.length > 0) {
|
|
334
|
+
conditions.push(`id: { _in: [${config.ids.join(",")}] }`);
|
|
335
|
+
}
|
|
333
336
|
if (config.excludeVoided) {
|
|
334
337
|
conditions.push("voided: { _eq: false }");
|
|
335
338
|
}
|
|
@@ -380,7 +383,7 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
|
|
|
380
383
|
if (config.poDetailTagId) {
|
|
381
384
|
conditions.push(`purchase_order_details: { tag_id: { _eq: ${config.poDetailTagId} } }`);
|
|
382
385
|
}
|
|
383
|
-
if (!config.id_number) {
|
|
386
|
+
if (!config.id_number && !config.ids?.length) {
|
|
384
387
|
conditions.push(config.betweenIssueDate
|
|
385
388
|
? `issue_date: { _gte: "${startDate}", _lte: "${endDate}" }`
|
|
386
389
|
: `created_at: { _gte: "${startDate}", _lte: "${endDate}"}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.216",
|
|
4
4
|
"description": "Queries de uso común para las aplicación de Zauru.",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"typescript": "^5.1.6"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "66b6f658705bd4642f63be3a28a0f24aebce73d7"
|
|
25
25
|
}
|