@things-factory/product-base 4.3.651 → 4.3.654
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/dist-server/constants/index.js +18 -0
- package/dist-server/constants/index.js.map +1 -0
- package/dist-server/constants/product.js +25 -0
- package/dist-server/constants/product.js.map +1 -0
- package/dist-server/controllers/index.js +1 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/index.js +19 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/middlewares/index.js +1 -0
- package/dist-server/middlewares/index.js.map +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/service/index.js +74 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/product/index.js +10 -0
- package/dist-server/service/product/index.js.map +1 -0
- package/dist-server/service/product/product-mutation.js +408 -0
- package/dist-server/service/product/product-mutation.js.map +1 -0
- package/dist-server/service/product/product-query.js +373 -0
- package/dist-server/service/product/product-query.js.map +1 -0
- package/dist-server/service/product/product-types.js +618 -0
- package/dist-server/service/product/product-types.js.map +1 -0
- package/dist-server/service/product/product.js +615 -0
- package/dist-server/service/product/product.js.map +1 -0
- package/dist-server/service/product/validate-product.js +26 -0
- package/dist-server/service/product/validate-product.js.map +1 -0
- package/dist-server/service/product-barcode/index.js +9 -0
- package/dist-server/service/product-barcode/index.js.map +1 -0
- package/dist-server/service/product-barcode/product-barcode-mutation.js +120 -0
- package/dist-server/service/product-barcode/product-barcode-mutation.js.map +1 -0
- package/dist-server/service/product-barcode/product-barcode-query.js +87 -0
- package/dist-server/service/product-barcode/product-barcode-query.js.map +1 -0
- package/dist-server/service/product-barcode/product-barcode-type.js +63 -0
- package/dist-server/service/product-barcode/product-barcode-type.js.map +1 -0
- package/dist-server/service/product-barcode/product-barcode.js +104 -0
- package/dist-server/service/product-barcode/product-barcode.js.map +1 -0
- package/dist-server/service/product-bundle/index.js +9 -0
- package/dist-server/service/product-bundle/index.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-mutation.js +130 -0
- package/dist-server/service/product-bundle/product-bundle-mutation.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-query.js +128 -0
- package/dist-server/service/product-bundle/product-bundle-query.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle-types.js +85 -0
- package/dist-server/service/product-bundle/product-bundle-types.js.map +1 -0
- package/dist-server/service/product-bundle/product-bundle.js +128 -0
- package/dist-server/service/product-bundle/product-bundle.js.map +1 -0
- package/dist-server/service/product-bundle-setting/index.js +9 -0
- package/dist-server/service/product-bundle-setting/index.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js +165 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js +113 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js +69 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js.map +1 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js +63 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js.map +1 -0
- package/dist-server/service/product-combination/index.js +9 -0
- package/dist-server/service/product-combination/index.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-mutation.js +137 -0
- package/dist-server/service/product-combination/product-combination-mutation.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-query.js +86 -0
- package/dist-server/service/product-combination/product-combination-query.js.map +1 -0
- package/dist-server/service/product-combination/product-combination-type.js +83 -0
- package/dist-server/service/product-combination/product-combination-type.js.map +1 -0
- package/dist-server/service/product-combination/product-combination.js +133 -0
- package/dist-server/service/product-combination/product-combination.js.map +1 -0
- package/dist-server/service/product-combination-setting/index.js +9 -0
- package/dist-server/service/product-combination-setting/index.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js +221 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js +177 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js +75 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js.map +1 -0
- package/dist-server/service/product-combination-setting/product-combination-setting.js +105 -0
- package/dist-server/service/product-combination-setting/product-combination-setting.js.map +1 -0
- package/dist-server/service/product-detail/index.js +9 -0
- package/dist-server/service/product-detail/index.js.map +1 -0
- package/dist-server/service/product-detail/product-detail-mutation.js +374 -0
- package/dist-server/service/product-detail/product-detail-mutation.js.map +1 -0
- package/dist-server/service/product-detail/product-detail-query.js +223 -0
- package/dist-server/service/product-detail/product-detail-query.js.map +1 -0
- package/dist-server/service/product-detail/product-detail-types.js +392 -0
- package/dist-server/service/product-detail/product-detail-types.js.map +1 -0
- package/dist-server/service/product-detail/product-detail.js +444 -0
- package/dist-server/service/product-detail/product-detail.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/index.js +9 -0
- package/dist-server/service/product-detail-bizplace-setting/index.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js +118 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js +107 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js +99 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js.map +1 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js +120 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map +1 -0
- package/dist-server/service/product-set/index.js +9 -0
- package/dist-server/service/product-set/index.js.map +1 -0
- package/dist-server/service/product-set/product-set-mutation.js +146 -0
- package/dist-server/service/product-set/product-set-mutation.js.map +1 -0
- package/dist-server/service/product-set/product-set-query.js +136 -0
- package/dist-server/service/product-set/product-set-query.js.map +1 -0
- package/dist-server/service/product-set/product-set-types.js +77 -0
- package/dist-server/service/product-set/product-set-types.js.map +1 -0
- package/dist-server/service/product-set/product-set.js +118 -0
- package/dist-server/service/product-set/product-set.js.map +1 -0
- package/dist-server/utils/index.js +18 -0
- package/dist-server/utils/index.js.map +1 -0
- package/dist-server/utils/product-util.js +16 -0
- package/dist-server/utils/product-util.js.map +1 -0
- package/package.json +2 -2
- package/server/service/product/index.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-product.js","sourceRoot":"","sources":["../../../server/service/product/validate-product.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAsB;AAQf,KAAK,UAAU,eAAe,CAAC,OAAgB,EAAE,OAAY;IAClE,MAAM,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;IAE/E,IAAI,MAAM,GAAG,EAAE,CAAA;IAEf,IAAI,gBAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE;QAChC,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAA;KACvC;IACD,IAAI,gBAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;QACjC,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;KACxC;IACD,IAAI,gBAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;QACjC,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;KACxC;IAEC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;KACnC;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AApBD,0CAoBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const product_barcode_1 = require("./product-barcode");
|
|
5
|
+
const product_barcode_query_1 = require("./product-barcode-query");
|
|
6
|
+
const product_barcode_mutation_1 = require("./product-barcode-mutation");
|
|
7
|
+
exports.entities = [product_barcode_1.ProductBarcode];
|
|
8
|
+
exports.resolvers = [product_barcode_query_1.ProductBarcodeQuery, product_barcode_mutation_1.ProductBarcodeMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/product-barcode/index.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAClD,mEAA6D;AAC7D,yEAAmE;AAEtD,QAAA,QAAQ,GAAG,CAAC,gCAAc,CAAC,CAAA;AAC3B,QAAA,SAAS,GAAG,CAAC,2CAAmB,EAAE,iDAAsB,CAAC,CAAA"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ProductBarcodeMutation = void 0;
|
|
16
|
+
const type_graphql_1 = require("type-graphql");
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
const product_barcode_1 = require("./product-barcode");
|
|
19
|
+
const product_barcode_type_1 = require("./product-barcode-type");
|
|
20
|
+
let ProductBarcodeMutation = class ProductBarcodeMutation {
|
|
21
|
+
async createProductBarcode(productBarcode, context) {
|
|
22
|
+
const { domain, user, tx } = context.state;
|
|
23
|
+
return await tx.getRepository(product_barcode_1.ProductBarcode).save(Object.assign(Object.assign({}, productBarcode), { domain, creator: user, updater: user }));
|
|
24
|
+
}
|
|
25
|
+
async updateProductBarcode(id, patch, context) {
|
|
26
|
+
const { domain, user, tx } = context.state;
|
|
27
|
+
const repository = tx.getRepository(product_barcode_1.ProductBarcode);
|
|
28
|
+
const productBarcode = await repository.findOne({
|
|
29
|
+
where: { domain, id }
|
|
30
|
+
});
|
|
31
|
+
return await repository.save(Object.assign(Object.assign(Object.assign({}, productBarcode), patch), { updater: user }));
|
|
32
|
+
}
|
|
33
|
+
async updateMultipleProductBarcode(patches, context) {
|
|
34
|
+
const { domain, user, tx } = context.state;
|
|
35
|
+
let results = [];
|
|
36
|
+
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
37
|
+
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
38
|
+
const productBarcodeRepo = tx.getRepository(product_barcode_1.ProductBarcode);
|
|
39
|
+
if (_createRecords.length > 0) {
|
|
40
|
+
for (let i = 0; i < _createRecords.length; i++) {
|
|
41
|
+
const newRecord = _createRecords[i];
|
|
42
|
+
const result = await productBarcodeRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
43
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (_updateRecords.length > 0) {
|
|
47
|
+
for (let i = 0; i < _updateRecords.length; i++) {
|
|
48
|
+
const newRecord = _updateRecords[i];
|
|
49
|
+
const productBarcode = await productBarcodeRepo.findOne(newRecord.id);
|
|
50
|
+
const result = await productBarcodeRepo.save(Object.assign(Object.assign(Object.assign({}, productBarcode), newRecord), { updater: user }));
|
|
51
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return results;
|
|
55
|
+
}
|
|
56
|
+
async deleteProductBarcode(id, context) {
|
|
57
|
+
const { domain, tx } = context.state;
|
|
58
|
+
await tx.getRepository(product_barcode_1.ProductBarcode).delete({ domain, id });
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
async deleteProductBarcodes(ids, context) {
|
|
62
|
+
const { domain, tx } = context.state;
|
|
63
|
+
await tx.getRepository(product_barcode_1.ProductBarcode).delete({
|
|
64
|
+
domain,
|
|
65
|
+
id: (0, typeorm_1.In)(ids)
|
|
66
|
+
});
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
72
|
+
(0, type_graphql_1.Mutation)(returns => product_barcode_1.ProductBarcode, { description: 'To create new ProductBarcode' }),
|
|
73
|
+
__param(0, (0, type_graphql_1.Arg)('productBarcode')),
|
|
74
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
75
|
+
__metadata("design:type", Function),
|
|
76
|
+
__metadata("design:paramtypes", [product_barcode_type_1.NewProductBarcode, Object]),
|
|
77
|
+
__metadata("design:returntype", Promise)
|
|
78
|
+
], ProductBarcodeMutation.prototype, "createProductBarcode", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
81
|
+
(0, type_graphql_1.Mutation)(returns => product_barcode_1.ProductBarcode, { description: 'To modify ProductBarcode information' }),
|
|
82
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
83
|
+
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
84
|
+
__param(2, (0, type_graphql_1.Ctx)()),
|
|
85
|
+
__metadata("design:type", Function),
|
|
86
|
+
__metadata("design:paramtypes", [String, product_barcode_type_1.ProductBarcodePatch, Object]),
|
|
87
|
+
__metadata("design:returntype", Promise)
|
|
88
|
+
], ProductBarcodeMutation.prototype, "updateProductBarcode", null);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
91
|
+
(0, type_graphql_1.Mutation)(returns => [product_barcode_1.ProductBarcode], { description: "To modify multiple ProductBarcodes' information" }),
|
|
92
|
+
__param(0, (0, type_graphql_1.Arg)('patches', type => [product_barcode_type_1.ProductBarcodePatch])),
|
|
93
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
94
|
+
__metadata("design:type", Function),
|
|
95
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
96
|
+
__metadata("design:returntype", Promise)
|
|
97
|
+
], ProductBarcodeMutation.prototype, "updateMultipleProductBarcode", null);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
100
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete ProductBarcode' }),
|
|
101
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
102
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], ProductBarcodeMutation.prototype, "deleteProductBarcode", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
109
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple productBarcodes' }),
|
|
110
|
+
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
111
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
112
|
+
__metadata("design:type", Function),
|
|
113
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
114
|
+
__metadata("design:returntype", Promise)
|
|
115
|
+
], ProductBarcodeMutation.prototype, "deleteProductBarcodes", null);
|
|
116
|
+
ProductBarcodeMutation = __decorate([
|
|
117
|
+
(0, type_graphql_1.Resolver)(product_barcode_1.ProductBarcode)
|
|
118
|
+
], ProductBarcodeMutation);
|
|
119
|
+
exports.ProductBarcodeMutation = ProductBarcodeMutation;
|
|
120
|
+
//# sourceMappingURL=product-barcode-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-barcode-mutation.js","sourceRoot":"","sources":["../../../server/service/product-barcode/product-barcode-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA2C;AAC3C,uDAAkD;AAClD,iEAA+E;AAGxE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG3B,AAAN,KAAK,CAAC,oBAAoB,CACD,cAAiC,EACjD,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,gCAAc,CAAC,CAAC,IAAI,iCAC7C,cAAc,KACjB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,oBAAoB,CACb,EAAU,EACP,KAA0B,EACjC,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,gCA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AAG,GAAE,CAAA;;;;mEAS9E;AAxGU,sBAAsB;IADlC,IAAA,uBAAQ,EAAC,gCAAc,CAAC;GACZ,sBAAsB,CAyGlC;AAzGY,wDAAsB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var _a;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ProductBarcodeQuery = void 0;
|
|
17
|
+
const type_graphql_1 = require("type-graphql");
|
|
18
|
+
const typeorm_1 = require("typeorm");
|
|
19
|
+
const shell_1 = require("@things-factory/shell");
|
|
20
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
21
|
+
const product_barcode_1 = require("./product-barcode");
|
|
22
|
+
const product_barcode_type_1 = require("./product-barcode-type");
|
|
23
|
+
let ProductBarcodeQuery = class ProductBarcodeQuery {
|
|
24
|
+
async productBarcode(id, context) {
|
|
25
|
+
const { domain } = context.state;
|
|
26
|
+
return await (0, typeorm_1.getRepository)(product_barcode_1.ProductBarcode).findOne({
|
|
27
|
+
where: { domain, id }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async productBarcodes(params, context) {
|
|
31
|
+
const { domain } = context.state;
|
|
32
|
+
const convertedParams = (0, shell_1.convertListParams)(params, domain.id);
|
|
33
|
+
const [items, total] = await (0, typeorm_1.getRepository)(product_barcode_1.ProductBarcode).findAndCount(convertedParams);
|
|
34
|
+
return { items, total };
|
|
35
|
+
}
|
|
36
|
+
async domain(productBarcode) {
|
|
37
|
+
return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(productBarcode.domainId);
|
|
38
|
+
}
|
|
39
|
+
async updater(productBarcode) {
|
|
40
|
+
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productBarcode.updaterId);
|
|
41
|
+
}
|
|
42
|
+
async creator(productBarcode) {
|
|
43
|
+
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(productBarcode.creatorId);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, type_graphql_1.Query)(returns => product_barcode_1.ProductBarcode, { description: 'To fetch a ProductBarcode' }),
|
|
48
|
+
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
49
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
50
|
+
__metadata("design:type", Function),
|
|
51
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
52
|
+
__metadata("design:returntype", Promise)
|
|
53
|
+
], ProductBarcodeQuery.prototype, "productBarcode", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, type_graphql_1.Query)(returns => product_barcode_type_1.ProductBarcodeList, { description: 'To fetch multiple ProductBarcodes' }),
|
|
56
|
+
__param(0, (0, type_graphql_1.Args)()),
|
|
57
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
58
|
+
__metadata("design:type", Function),
|
|
59
|
+
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
60
|
+
__metadata("design:returntype", Promise)
|
|
61
|
+
], ProductBarcodeQuery.prototype, "productBarcodes", null);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
64
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
65
|
+
__metadata("design:type", Function),
|
|
66
|
+
__metadata("design:paramtypes", [product_barcode_1.ProductBarcode]),
|
|
67
|
+
__metadata("design:returntype", Promise)
|
|
68
|
+
], ProductBarcodeQuery.prototype, "domain", null);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
71
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
72
|
+
__metadata("design:type", Function),
|
|
73
|
+
__metadata("design:paramtypes", [product_barcode_1.ProductBarcode]),
|
|
74
|
+
__metadata("design:returntype", Promise)
|
|
75
|
+
], ProductBarcodeQuery.prototype, "updater", null);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
78
|
+
__param(0, (0, type_graphql_1.Root)()),
|
|
79
|
+
__metadata("design:type", Function),
|
|
80
|
+
__metadata("design:paramtypes", [product_barcode_1.ProductBarcode]),
|
|
81
|
+
__metadata("design:returntype", Promise)
|
|
82
|
+
], ProductBarcodeQuery.prototype, "creator", null);
|
|
83
|
+
ProductBarcodeQuery = __decorate([
|
|
84
|
+
(0, type_graphql_1.Resolver)(product_barcode_1.ProductBarcode)
|
|
85
|
+
], ProductBarcodeQuery);
|
|
86
|
+
exports.ProductBarcodeQuery = ProductBarcodeQuery;
|
|
87
|
+
//# sourceMappingURL=product-barcode-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-barcode-query.js","sourceRoot":"","sources":["../../../server/service/product-barcode/product-barcode-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA8F;AAC9F,qCAAuC;AACvC,iDAA4E;AAC5E,yDAA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AAO,CAAC,EAAE,CAAC,gCAAc,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACzD,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;yDAMjD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,yCAAkB,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;IACpE,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;0DAO9C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAiB,gCAAc;;iDAElD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAiB,gCAAc;;kDAEnD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAiB,gCAAc;;kDAEnD;AAjCU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,gCAAc,CAAC;GACZ,mBAAmB,CAkC/B;AAlCY,kDAAmB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var _a;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ProductBarcodeList = exports.ProductBarcodePatch = exports.NewProductBarcode = void 0;
|
|
14
|
+
const type_graphql_1 = require("type-graphql");
|
|
15
|
+
const shell_1 = require("@things-factory/shell");
|
|
16
|
+
const product_barcode_1 = require("./product-barcode");
|
|
17
|
+
let NewProductBarcode = class NewProductBarcode {
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, type_graphql_1.Field)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], NewProductBarcode.prototype, "name", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, type_graphql_1.Field)(),
|
|
25
|
+
__metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
|
|
26
|
+
], NewProductBarcode.prototype, "productDetail", void 0);
|
|
27
|
+
NewProductBarcode = __decorate([
|
|
28
|
+
(0, type_graphql_1.InputType)()
|
|
29
|
+
], NewProductBarcode);
|
|
30
|
+
exports.NewProductBarcode = NewProductBarcode;
|
|
31
|
+
let ProductBarcodePatch = class ProductBarcodePatch {
|
|
32
|
+
};
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ProductBarcodePatch.prototype, "id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ProductBarcodePatch.prototype, "gtin", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], ProductBarcodePatch.prototype, "cuFlag", void 0);
|
|
45
|
+
ProductBarcodePatch = __decorate([
|
|
46
|
+
(0, type_graphql_1.InputType)()
|
|
47
|
+
], ProductBarcodePatch);
|
|
48
|
+
exports.ProductBarcodePatch = ProductBarcodePatch;
|
|
49
|
+
let ProductBarcodeList = class ProductBarcodeList {
|
|
50
|
+
};
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, type_graphql_1.Field)(type => [product_barcode_1.ProductBarcode]),
|
|
53
|
+
__metadata("design:type", Array)
|
|
54
|
+
], ProductBarcodeList.prototype, "items", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], ProductBarcodeList.prototype, "total", void 0);
|
|
59
|
+
ProductBarcodeList = __decorate([
|
|
60
|
+
(0, type_graphql_1.ObjectType)()
|
|
61
|
+
], ProductBarcodeList);
|
|
62
|
+
exports.ProductBarcodeList = ProductBarcodeList;
|
|
63
|
+
//# sourceMappingURL=product-barcode-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-barcode-type.js","sourceRoot":"","sources":["../../../server/service/product-barcode/product-barcode-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAsF;AAEtF,iDAAiD;AAEjD,uDAAkD;AAG3C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAM7B,CAAA;AALC;IAAC,IAAA,oBAAK,GAAE;;+CACI;AAEZ;IAAC,IAAA,oBAAK,GAAE;kDACO,iBAAS,oBAAT,iBAAS;wDAAA;AALb,iBAAiB;IAD7B,IAAA,wBAAS,GAAE;GACC,iBAAiB,CAM7B;AANY,8CAAiB;AASvB,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAS/B,CAAA;AARC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACZ;AARH,mBAAmB;IAD/B,IAAA,wBAAS,GAAE;GACC,mBAAmB,CAS/B;AATY,kDAAmB;AAYzB,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAM9B,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gCAAc,CAAC,CAAC;;iDACT;AAEvB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;iDACN;AALF,kBAAkB;IAD9B,IAAA,yBAAU,GAAE;GACA,kBAAkB,CAM9B;AANY,gDAAkB"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ProductBarcode = void 0;
|
|
14
|
+
const type_graphql_1 = require("type-graphql");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
17
|
+
const shell_1 = require("@things-factory/shell");
|
|
18
|
+
const product_detail_1 = require("../product-detail/product-detail");
|
|
19
|
+
const product_1 = require("../product/product");
|
|
20
|
+
let ProductBarcode = class ProductBarcode {
|
|
21
|
+
};
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
24
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ProductBarcode.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
29
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
30
|
+
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
31
|
+
], ProductBarcode.prototype, "domain", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.RelationId)((productBarcode) => productBarcode.domain),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ProductBarcode.prototype, "domainId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)(),
|
|
38
|
+
(0, type_graphql_1.Field)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ProductBarcode.prototype, "gtin", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.ManyToOne)(type => product_1.Product),
|
|
43
|
+
(0, type_graphql_1.Field)(type => product_1.Product),
|
|
44
|
+
__metadata("design:type", product_1.Product)
|
|
45
|
+
], ProductBarcode.prototype, "product", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.RelationId)((productBarcode) => productBarcode.product),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], ProductBarcode.prototype, "productId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.ManyToOne)(type => product_detail_1.ProductDetail),
|
|
52
|
+
(0, type_graphql_1.Field)(type => product_detail_1.ProductDetail),
|
|
53
|
+
__metadata("design:type", product_detail_1.ProductDetail)
|
|
54
|
+
], ProductBarcode.prototype, "productDetail", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.RelationId)((productBarcode) => productBarcode.productDetail),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], ProductBarcode.prototype, "productDetailId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
61
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
62
|
+
__metadata("design:type", Date)
|
|
63
|
+
], ProductBarcode.prototype, "deletedAt", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
66
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
67
|
+
__metadata("design:type", Date)
|
|
68
|
+
], ProductBarcode.prototype, "createdAt", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
71
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
72
|
+
__metadata("design:type", Date)
|
|
73
|
+
], ProductBarcode.prototype, "updatedAt", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
76
|
+
nullable: true
|
|
77
|
+
}),
|
|
78
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
79
|
+
__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
80
|
+
], ProductBarcode.prototype, "creator", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.RelationId)((productBarcode) => productBarcode.creator),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], ProductBarcode.prototype, "creatorId", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
87
|
+
nullable: true
|
|
88
|
+
}),
|
|
89
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
90
|
+
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
91
|
+
], ProductBarcode.prototype, "updater", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.RelationId)((productBarcode) => productBarcode.updater),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], ProductBarcode.prototype, "updaterId", void 0);
|
|
96
|
+
ProductBarcode = __decorate([
|
|
97
|
+
(0, typeorm_1.Entity)(),
|
|
98
|
+
(0, typeorm_1.Index)('ix_product_barcode_0', (productBarcode) => [productBarcode.domain, productBarcode.id], {
|
|
99
|
+
unique: true
|
|
100
|
+
}),
|
|
101
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for ProductBarcode' })
|
|
102
|
+
], ProductBarcode);
|
|
103
|
+
exports.ProductBarcode = ProductBarcode;
|
|
104
|
+
//# sourceMappingURL=product-barcode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-barcode.js","sourceRoot":"","sources":["../../../server/service/product-barcode/product-barcode.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAIqB;AACrB,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,qEAAgE;AAChE,gDAA4C;AAOrC,IAAM,cAAc,GAApB,MAAM,cAAc;CA2D1B,CAAA;AA1DC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;0CACC;AAEnB;IAAC,IAAA,mBAAS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C,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAChB,gBAAI,oBAAJ,gBAAI;+CAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,cAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC;;iDACrD;AAElB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAChB,gBAAI,oBAAJ,gBAAI;+CAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,cAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC;;iDACrD;AA1DP,cAAc;IAL1B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,sBAAsB,EAAE,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,CAAC,EAAE;QAC7G,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;GAC5C,cAAc,CA2D1B;AA3DY,wCAAc"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const product_bundle_1 = require("./product-bundle");
|
|
5
|
+
const product_bundle_mutation_1 = require("./product-bundle-mutation");
|
|
6
|
+
const product_bundle_query_1 = require("./product-bundle-query");
|
|
7
|
+
exports.entities = [product_bundle_1.ProductBundle];
|
|
8
|
+
exports.resolvers = [product_bundle_query_1.ProductBundleQuery, product_bundle_mutation_1.ProductBundleMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/product-bundle/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAChD,uEAAiE;AACjE,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,8BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,yCAAkB,EAAE,+CAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ProductBundleMutation = void 0;
|
|
16
|
+
const type_graphql_1 = require("type-graphql");
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
19
|
+
const constants_1 = require("../../constants");
|
|
20
|
+
const product_bundle_1 = require("./product-bundle");
|
|
21
|
+
const product_bundle_types_1 = require("./product-bundle-types");
|
|
22
|
+
let ProductBundleMutation = class ProductBundleMutation {
|
|
23
|
+
async createProductBundle(productBundle, context) {
|
|
24
|
+
const { domain, user } = context.state;
|
|
25
|
+
return await (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle).save(Object.assign(Object.assign({}, productBundle), { domain, creator: user, updater: user }));
|
|
26
|
+
}
|
|
27
|
+
async updateProductBundle(name, patch, context) {
|
|
28
|
+
const { domain, user } = context.state;
|
|
29
|
+
const repository = (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle);
|
|
30
|
+
const productBundle = await repository.findOne({
|
|
31
|
+
where: { domain, name }
|
|
32
|
+
});
|
|
33
|
+
return await repository.save(Object.assign(Object.assign(Object.assign({}, productBundle), patch), { updater: user }));
|
|
34
|
+
}
|
|
35
|
+
async updateMultipleProductBundle(patches, context) {
|
|
36
|
+
const { domain, user } = context.state;
|
|
37
|
+
let results = [];
|
|
38
|
+
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
39
|
+
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
40
|
+
const productBundleRepo = (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle);
|
|
41
|
+
const bizplaceRepo = (0, typeorm_1.getRepository)(biz_base_1.Bizplace);
|
|
42
|
+
let bizplace;
|
|
43
|
+
if (_createRecords.length > 0) {
|
|
44
|
+
for (let i = 0; i < _createRecords.length; i++) {
|
|
45
|
+
let newRecord = _createRecords[i];
|
|
46
|
+
let status = newRecord.status || '';
|
|
47
|
+
bizplace = await bizplaceRepo.findOne({ where: { name: domain.name } });
|
|
48
|
+
if (!newRecord.status || newRecord.status === '') {
|
|
49
|
+
newRecord.status = constants_1.PRODUCT_BUNDLE_STATUS.INACTIVE;
|
|
50
|
+
}
|
|
51
|
+
const result = await productBundleRepo.save(Object.assign(Object.assign({}, newRecord), { domain,
|
|
52
|
+
bizplace, status: newRecord.status.toUpperCase(), creator: user, updater: user }));
|
|
53
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (_updateRecords.length > 0) {
|
|
57
|
+
for (let i = 0; i < _updateRecords.length; i++) {
|
|
58
|
+
const newRecord = _updateRecords[i];
|
|
59
|
+
const productBundle = await productBundleRepo.findOne({ domain, id: newRecord.id });
|
|
60
|
+
if (newRecord.status) {
|
|
61
|
+
newRecord.status = newRecord.status.toUpperCase();
|
|
62
|
+
}
|
|
63
|
+
const result = await productBundleRepo.save(Object.assign(Object.assign(Object.assign({}, productBundle), newRecord), { updater: user }));
|
|
64
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return results;
|
|
68
|
+
}
|
|
69
|
+
async deleteProductBundle(name, context) {
|
|
70
|
+
const { domain, user } = context.state;
|
|
71
|
+
await (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle).delete({ domain, name });
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
async deleteProductBundles(ids, context) {
|
|
75
|
+
const { tx, user } = context.state;
|
|
76
|
+
const productBundleRepo = (0, typeorm_1.getRepository)(product_bundle_1.ProductBundle) || tx.getRepository(product_bundle_1.ProductBundle);
|
|
77
|
+
let productBundles = await productBundleRepo.find({ where: { id: (0, typeorm_1.In)(ids) } });
|
|
78
|
+
for (let i = 0; i < productBundles.length; i++) {
|
|
79
|
+
const product = productBundles[i];
|
|
80
|
+
const result = await productBundleRepo.save(Object.assign(Object.assign({}, product), { status: constants_1.PRODUCT_BUNDLE_STATUS.DELETED, updater: user }));
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, type_graphql_1.Mutation)(returns => product_bundle_1.ProductBundle),
|
|
87
|
+
__param(0, (0, type_graphql_1.Arg)('productBundle')),
|
|
88
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [product_bundle_types_1.NewProductBundle, Object]),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], ProductBundleMutation.prototype, "createProductBundle", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, type_graphql_1.Mutation)(returns => product_bundle_1.ProductBundle),
|
|
95
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
96
|
+
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
97
|
+
__param(2, (0, type_graphql_1.Ctx)()),
|
|
98
|
+
__metadata("design:type", Function),
|
|
99
|
+
__metadata("design:paramtypes", [String, product_bundle_types_1.ProductBundlePatch, Object]),
|
|
100
|
+
__metadata("design:returntype", Promise)
|
|
101
|
+
], ProductBundleMutation.prototype, "updateProductBundle", null);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, type_graphql_1.Mutation)(returns => [product_bundle_1.ProductBundle]),
|
|
104
|
+
__param(0, (0, type_graphql_1.Arg)('patches', type => [product_bundle_types_1.ProductBundlePatch])),
|
|
105
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
106
|
+
__metadata("design:type", Function),
|
|
107
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
108
|
+
__metadata("design:returntype", Promise)
|
|
109
|
+
], ProductBundleMutation.prototype, "updateMultipleProductBundle", null);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
112
|
+
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
113
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
114
|
+
__metadata("design:type", Function),
|
|
115
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
116
|
+
__metadata("design:returntype", Promise)
|
|
117
|
+
], ProductBundleMutation.prototype, "deleteProductBundle", null);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
120
|
+
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
121
|
+
__param(1, (0, type_graphql_1.Ctx)()),
|
|
122
|
+
__metadata("design:type", Function),
|
|
123
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
124
|
+
__metadata("design:returntype", Promise)
|
|
125
|
+
], ProductBundleMutation.prototype, "deleteProductBundles", null);
|
|
126
|
+
ProductBundleMutation = __decorate([
|
|
127
|
+
(0, type_graphql_1.Resolver)(product_bundle_1.ProductBundle)
|
|
128
|
+
], ProductBundleMutation);
|
|
129
|
+
exports.ProductBundleMutation = ProductBundleMutation;
|
|
130
|
+
//# sourceMappingURL=product-bundle-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-bundle-mutation.js","sourceRoot":"","sources":["../../../server/service/product-bundle/product-bundle-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,qCAAsE;AAGtE,uDAAmD;AAEnD,+CAAuD;AACvD,qDAAgD;AAChD,iEAA6E;AAGtE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAE1B,AAAN,KAAK,CAAC,mBAAmB,CACD,aAA+B,EAC9C,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEtC,OAAO,MAAM,IAAA,uBAAa,EAAC,8BAAa,CAAC,CAAC,IAAI,iCACzC,aAAa,KAChB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,mBAAmB,CACV,IAAY,EACX,KAAyB,EAChC,OAAY;QAEnB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEtC,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,8BAAa,CAAC,CAAA;QAC/C,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,MAAM,E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