@infrab4a/connect 5.1.1-beta.0 → 5.1.1-beta.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/index.cjs.js +10 -3
- package/index.esm.js +10 -3
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -2921,7 +2921,13 @@ AttributeOptionHelper.FindByAttribute = (attributeName, fields) => {
|
|
|
2921
2921
|
return { columnName: attributeName.toString(), attributeName };
|
|
2922
2922
|
if (Array.isArray(fieldOption))
|
|
2923
2923
|
return { columnName: attributeName.toString(), attributeName, fields: fieldOption };
|
|
2924
|
-
return {
|
|
2924
|
+
return {
|
|
2925
|
+
attributeName,
|
|
2926
|
+
columnName: attributeName.toString(),
|
|
2927
|
+
...fieldOption,
|
|
2928
|
+
to: (value) => value,
|
|
2929
|
+
from: (value) => value,
|
|
2930
|
+
};
|
|
2925
2931
|
};
|
|
2926
2932
|
AttributeOptionHelper.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName;
|
|
2927
2933
|
AttributeOptionHelper.FindColumnOptionFromList = (columnName, fields) => {
|
|
@@ -3469,6 +3475,7 @@ class HasuraDeleteVariablesHelper {
|
|
|
3469
3475
|
if (lodash.isNil(instance.identifier[identifierBinded]))
|
|
3470
3476
|
return ids;
|
|
3471
3477
|
const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
|
|
3478
|
+
console.warn('columnOption', columnOption);
|
|
3472
3479
|
const value = columnOption?.to(identifiers[identifier], instance) ||
|
|
3473
3480
|
identifiers[identifier];
|
|
3474
3481
|
return {
|
|
@@ -7624,7 +7631,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7624
7631
|
}
|
|
7625
7632
|
async findCatalog(params, mainGender, options) {
|
|
7626
7633
|
// eslint-disable-next-line no-console
|
|
7627
|
-
console.log(JSON.stringify({
|
|
7634
|
+
console.log('findCatalog', JSON.stringify({
|
|
7628
7635
|
...params,
|
|
7629
7636
|
filters: { ...params.filters, published: true },
|
|
7630
7637
|
orderBy: {
|
|
@@ -7637,9 +7644,9 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7637
7644
|
...params,
|
|
7638
7645
|
filters: { ...params.filters, published: true },
|
|
7639
7646
|
orderBy: {
|
|
7647
|
+
hasStock: 'desc',
|
|
7640
7648
|
...(!mainGender ? {} : { intGender: mainGender === 'female' ? 'desc' : 'asc' }),
|
|
7641
7649
|
...lodash.omit(params.orderBy, ['hasStock', 'intGender']),
|
|
7642
|
-
hasStock: 'desc',
|
|
7643
7650
|
},
|
|
7644
7651
|
}, options);
|
|
7645
7652
|
return result;
|
package/index.esm.js
CHANGED
|
@@ -2896,7 +2896,13 @@ AttributeOptionHelper.FindByAttribute = (attributeName, fields) => {
|
|
|
2896
2896
|
return { columnName: attributeName.toString(), attributeName };
|
|
2897
2897
|
if (Array.isArray(fieldOption))
|
|
2898
2898
|
return { columnName: attributeName.toString(), attributeName, fields: fieldOption };
|
|
2899
|
-
return {
|
|
2899
|
+
return {
|
|
2900
|
+
attributeName,
|
|
2901
|
+
columnName: attributeName.toString(),
|
|
2902
|
+
...fieldOption,
|
|
2903
|
+
to: (value) => value,
|
|
2904
|
+
from: (value) => value,
|
|
2905
|
+
};
|
|
2900
2906
|
};
|
|
2901
2907
|
AttributeOptionHelper.CheckIsColumnOption = (fieldValue) => !!fieldValue?.columnName;
|
|
2902
2908
|
AttributeOptionHelper.FindColumnOptionFromList = (columnName, fields) => {
|
|
@@ -3444,6 +3450,7 @@ class HasuraDeleteVariablesHelper {
|
|
|
3444
3450
|
if (isNil(instance.identifier[identifierBinded]))
|
|
3445
3451
|
return ids;
|
|
3446
3452
|
const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
|
|
3453
|
+
console.warn('columnOption', columnOption);
|
|
3447
3454
|
const value = columnOption?.to(identifiers[identifier], instance) ||
|
|
3448
3455
|
identifiers[identifier];
|
|
3449
3456
|
return {
|
|
@@ -7599,7 +7606,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7599
7606
|
}
|
|
7600
7607
|
async findCatalog(params, mainGender, options) {
|
|
7601
7608
|
// eslint-disable-next-line no-console
|
|
7602
|
-
console.log(JSON.stringify({
|
|
7609
|
+
console.log('findCatalog', JSON.stringify({
|
|
7603
7610
|
...params,
|
|
7604
7611
|
filters: { ...params.filters, published: true },
|
|
7605
7612
|
orderBy: {
|
|
@@ -7612,9 +7619,9 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
7612
7619
|
...params,
|
|
7613
7620
|
filters: { ...params.filters, published: true },
|
|
7614
7621
|
orderBy: {
|
|
7622
|
+
hasStock: 'desc',
|
|
7615
7623
|
...(!mainGender ? {} : { intGender: mainGender === 'female' ? 'desc' : 'asc' }),
|
|
7616
7624
|
...omit(params.orderBy, ['hasStock', 'intGender']),
|
|
7617
|
-
hasStock: 'desc',
|
|
7618
7625
|
},
|
|
7619
7626
|
}, options);
|
|
7620
7627
|
return result;
|