@zauru-sdk/graphql 6.12.0 → 6.13.0
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.
|
@@ -77,6 +77,9 @@ export declare const getPayeesStringQuery: (filters?: {
|
|
|
77
77
|
name?: string;
|
|
78
78
|
vendor?: boolean;
|
|
79
79
|
tin?: string;
|
|
80
|
+
active?: boolean;
|
|
81
|
+
id_number_not_empty?: boolean;
|
|
82
|
+
id_number_not_null?: boolean;
|
|
80
83
|
}) => string;
|
|
81
84
|
export declare const getProvidersStringQuery = "\nquery getProviders {\n payees (where: {vendor: {_eq: true}}) {\n id\n id_number\n name\n tin\n address_line_1\n }\n}\n";
|
|
82
85
|
export declare const getAgenciesStringQuery = "\nquery getAgencies {\n agencies {\n id\n name\n address_line_2\n }\n}\n";
|
|
@@ -614,8 +614,18 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
|
|
|
614
614
|
exports.getPurchaseOrdersBetweenDatesStringQuery = getPurchaseOrdersBetweenDatesStringQuery;
|
|
615
615
|
const getPayeesStringQuery = (filters) => {
|
|
616
616
|
const conditions = [];
|
|
617
|
+
const idNumberConditions = [];
|
|
617
618
|
if (filters?.id_number) {
|
|
618
|
-
|
|
619
|
+
idNumberConditions.push(`_ilike: "%${filters.id_number}%"`);
|
|
620
|
+
}
|
|
621
|
+
if (filters?.id_number_not_empty) {
|
|
622
|
+
idNumberConditions.push(`_neq: ""`);
|
|
623
|
+
}
|
|
624
|
+
if (filters?.id_number_not_null) {
|
|
625
|
+
idNumberConditions.push(`_is_null: false`);
|
|
626
|
+
}
|
|
627
|
+
if (idNumberConditions.length) {
|
|
628
|
+
conditions.push(`id_number: { ${idNumberConditions.join(", ")} }`);
|
|
619
629
|
}
|
|
620
630
|
if (filters?.name) {
|
|
621
631
|
conditions.push(`name: { _ilike: "%${filters.name}%" }`);
|
|
@@ -626,6 +636,9 @@ const getPayeesStringQuery = (filters) => {
|
|
|
626
636
|
if (filters?.tin) {
|
|
627
637
|
conditions.push(`tin: { _eq: "${filters.tin}" }`);
|
|
628
638
|
}
|
|
639
|
+
if (filters?.active !== undefined) {
|
|
640
|
+
conditions.push(`active: { _eq: ${filters.active} }`);
|
|
641
|
+
}
|
|
629
642
|
const whereClause = conditions.length
|
|
630
643
|
? `where: { ${conditions.join(", ")} }`
|
|
631
644
|
: "";
|
|
@@ -639,6 +652,7 @@ const getPayeesStringQuery = (filters) => {
|
|
|
639
652
|
name
|
|
640
653
|
tin
|
|
641
654
|
vendor
|
|
655
|
+
active
|
|
642
656
|
address_line_1
|
|
643
657
|
payee_category_id
|
|
644
658
|
payee_category {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.13.0",
|
|
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",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"tsx": "^4.23.15",
|
|
24
24
|
"typescript": "^5.1.6"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "a2e3412dde7cdfd7f33ebc6c5b90b022ab24ae27"
|
|
27
27
|
}
|