@infrab4a/connect 4.3.9-beta.10 → 4.3.9-beta.12
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 +2 -5
- package/index.esm.js +2 -5
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -4114,9 +4114,7 @@ const withFindHasuraGraphQL = (MixinBase) => {
|
|
|
4114
4114
|
...acc,
|
|
4115
4115
|
{
|
|
4116
4116
|
[AttributeOptionHelper.FindByAttribute(current, fields)
|
|
4117
|
-
.columnName]: orderBy[current] === 'asc'
|
|
4118
|
-
? 'asc_nulls_last'
|
|
4119
|
-
: 'desc_nulls_last',
|
|
4117
|
+
.columnName]: orderBy[current] === 'asc' ? 'asc' : 'desc',
|
|
4120
4118
|
},
|
|
4121
4119
|
], []);
|
|
4122
4120
|
this.bindAggretageAttributes = (aggregates, fields) => {
|
|
@@ -5177,8 +5175,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5177
5175
|
], []);
|
|
5178
5176
|
}
|
|
5179
5177
|
async findCatalog(params, mainGender) {
|
|
5180
|
-
return this.find(Object.assign(Object.assign({}, params), { filters: Object.assign(Object.assign({}, params.filters), { published: true
|
|
5181
|
-
// se a busca retornar menos que 24, faz consulta pelos sem estoque ou gender diferente
|
|
5178
|
+
return this.find(Object.assign(Object.assign({}, params), { filters: Object.assign(Object.assign({}, params.filters), { published: true }), orderBy: Object.assign(Object.assign({ hasStock: 'desc' }, (!mainGender ? {} : { intGender: mainGender === 'female' ? 'desc' : 'asc' })), lodash.omit(params.orderBy, ['hasStock', 'intGender'])) }));
|
|
5182
5179
|
}
|
|
5183
5180
|
async updateCategories(productId, { categories }) {
|
|
5184
5181
|
if ('action' in categories && categories.action === 'remove') {
|
package/index.esm.js
CHANGED
|
@@ -4090,9 +4090,7 @@ const withFindHasuraGraphQL = (MixinBase) => {
|
|
|
4090
4090
|
...acc,
|
|
4091
4091
|
{
|
|
4092
4092
|
[AttributeOptionHelper.FindByAttribute(current, fields)
|
|
4093
|
-
.columnName]: orderBy[current] === 'asc'
|
|
4094
|
-
? 'asc_nulls_last'
|
|
4095
|
-
: 'desc_nulls_last',
|
|
4093
|
+
.columnName]: orderBy[current] === 'asc' ? 'asc' : 'desc',
|
|
4096
4094
|
},
|
|
4097
4095
|
], []);
|
|
4098
4096
|
this.bindAggretageAttributes = (aggregates, fields) => {
|
|
@@ -5153,8 +5151,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5153
5151
|
], []);
|
|
5154
5152
|
}
|
|
5155
5153
|
async findCatalog(params, mainGender) {
|
|
5156
|
-
return this.find(Object.assign(Object.assign({}, params), { filters: Object.assign(Object.assign({}, params.filters), { published: true
|
|
5157
|
-
// se a busca retornar menos que 24, faz consulta pelos sem estoque ou gender diferente
|
|
5154
|
+
return this.find(Object.assign(Object.assign({}, params), { filters: Object.assign(Object.assign({}, params.filters), { published: true }), orderBy: Object.assign(Object.assign({ hasStock: 'desc' }, (!mainGender ? {} : { intGender: mainGender === 'female' ? 'desc' : 'asc' })), omit(params.orderBy, ['hasStock', 'intGender'])) }));
|
|
5158
5155
|
}
|
|
5159
5156
|
async updateCategories(productId, { categories }) {
|
|
5160
5157
|
if ('action' in categories && categories.action === 'remove') {
|