@infrab4a/connect 3.10.0-beta.4 → 3.10.0-beta.6
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/bundles/infrab4a-connect.umd.js +10 -4
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/domain/catalog/models/product.js +6 -1
- package/esm2015/infra/hasura-graphql/mixins/helpers/graphql-field.helper.js +6 -2
- package/esm2015/infra/hasura-graphql/models/product-hasura-graphql.js +1 -1
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +2 -2
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +4 -3
- package/fesm2015/infrab4a-connect.js +13 -4
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/hasura-graphql/models/product-hasura-graphql.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1359,6 +1359,10 @@
|
|
|
1359
1359
|
});
|
|
1360
1360
|
return Product;
|
|
1361
1361
|
}(BaseModel));
|
|
1362
|
+
__decorate([
|
|
1363
|
+
classTransformer.Type(function () { return Category; }),
|
|
1364
|
+
__metadata("design:type", Category)
|
|
1365
|
+
], Product.prototype, "category", void 0);
|
|
1362
1366
|
__decorate([
|
|
1363
1367
|
classTransformer.Type(function () { return KitProduct; }),
|
|
1364
1368
|
__metadata("design:type", Array)
|
|
@@ -3396,7 +3400,8 @@
|
|
|
3396
3400
|
return Object.keys(foreignKeyColumn).reduce(function (object, current) {
|
|
3397
3401
|
var _b;
|
|
3398
3402
|
var _a;
|
|
3399
|
-
|
|
3403
|
+
var foreignColumnName = AttributeOptionHelper.FindByAttribute(foreignKeyColumn[current], fields).columnName;
|
|
3404
|
+
return Object.assign(Object.assign({}, object), (_b = {}, _b[foreignColumnName] = (_a = data[attributeName]) === null || _a === void 0 ? void 0 : _a[current], _b));
|
|
3400
3405
|
}, Object.assign({}, result));
|
|
3401
3406
|
if (update && lodash.isObject(data[attributeName]) && !lodash.isNil(attributeFields) && !lodash.isDate(data[attributeName]))
|
|
3402
3407
|
return result;
|
|
@@ -3984,7 +3989,7 @@
|
|
|
3984
3989
|
{
|
|
3985
3990
|
parent: {
|
|
3986
3991
|
columnName: 'parent',
|
|
3987
|
-
foreignKeyColumn: {
|
|
3992
|
+
foreignKeyColumn: { id: 'parentId' },
|
|
3988
3993
|
fields: ['id', 'name', 'reference', 'slug'],
|
|
3989
3994
|
},
|
|
3990
3995
|
},
|
|
@@ -4748,10 +4753,11 @@
|
|
|
4748
4753
|
},
|
|
4749
4754
|
},
|
|
4750
4755
|
{ shoppingCount: { columnName: 'shopping_count' } },
|
|
4756
|
+
{ categoryId: { columnName: 'category_id' } },
|
|
4751
4757
|
{
|
|
4752
4758
|
category: {
|
|
4753
|
-
columnName: '
|
|
4754
|
-
foreignKeyColumn: {
|
|
4759
|
+
columnName: 'category',
|
|
4760
|
+
foreignKeyColumn: { id: 'categoryId' },
|
|
4755
4761
|
fields: ['id', 'name', 'reference', 'slug'],
|
|
4756
4762
|
},
|
|
4757
4763
|
},
|