@things-factory/warehouse-base 5.0.7 → 5.0.14
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 +6 -19
- package/dist-server/constants/index.js.map +1 -1
- package/dist-server/constants/inventory.js.map +1 -1
- package/dist-server/constants/location.js.map +1 -1
- package/dist-server/constants/pallet.js.map +1 -1
- package/dist-server/constants/rule-type.js.map +1 -1
- package/dist-server/constants/tote.js.map +1 -1
- package/dist-server/controllers/ecommerce/ecommerce-controller.js.map +1 -1
- package/dist-server/controllers/ecommerce/index.js +3 -16
- package/dist-server/controllers/ecommerce/index.js.map +1 -1
- package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +1 -1
- package/dist-server/controllers/index.js +3 -16
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/warehouse-controller.js.map +1 -1
- package/dist-server/index.js +6 -19
- package/dist-server/index.js.map +1 -1
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/service/index.js +28 -41
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/inventory/index.js.map +1 -1
- package/dist-server/service/inventory/inventory-mutation.js +50 -61
- package/dist-server/service/inventory/inventory-mutation.js.map +1 -1
- package/dist-server/service/inventory/inventory-query.js +125 -136
- package/dist-server/service/inventory/inventory-query.js.map +1 -1
- package/dist-server/service/inventory/inventory-types.js +198 -206
- package/dist-server/service/inventory/inventory-types.js.map +1 -1
- package/dist-server/service/inventory/inventory.js +133 -141
- package/dist-server/service/inventory/inventory.js.map +1 -1
- package/dist-server/service/inventory-change/index.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change-mutation.js +51 -62
- package/dist-server/service/inventory-change/inventory-change-mutation.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change-query.js +29 -40
- package/dist-server/service/inventory-change/inventory-change-query.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change-types.js +20 -28
- package/dist-server/service/inventory-change/inventory-change-types.js.map +1 -1
- package/dist-server/service/inventory-change/inventory-change.js +68 -76
- package/dist-server/service/inventory-change/inventory-change.js.map +1 -1
- package/dist-server/service/inventory-history/index.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-mutation.js +33 -44
- package/dist-server/service/inventory-history/inventory-history-mutation.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-query.js +105 -116
- package/dist-server/service/inventory-history/inventory-history-query.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history-types.js +282 -290
- package/dist-server/service/inventory-history/inventory-history-types.js.map +1 -1
- package/dist-server/service/inventory-history/inventory-history.js +82 -90
- package/dist-server/service/inventory-history/inventory-history.js.map +1 -1
- package/dist-server/service/inventory-item/index.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-mutation.js +47 -58
- package/dist-server/service/inventory-item/inventory-item-mutation.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-query.js +41 -52
- package/dist-server/service/inventory-item/inventory-item-query.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item-type.js +44 -52
- package/dist-server/service/inventory-item/inventory-item-type.js.map +1 -1
- package/dist-server/service/inventory-item/inventory-item.js +44 -52
- package/dist-server/service/inventory-item/inventory-item.js.map +1 -1
- package/dist-server/service/inventory-item-change/index.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js +33 -44
- package/dist-server/service/inventory-item-change/inventory-item-change-mutation.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-query.js +29 -40
- package/dist-server/service/inventory-item-change/inventory-item-change-query.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change-type.js +40 -48
- package/dist-server/service/inventory-item-change/inventory-item-change-type.js.map +1 -1
- package/dist-server/service/inventory-item-change/inventory-item-change.js +34 -42
- package/dist-server/service/inventory-item-change/inventory-item-change.js.map +1 -1
- package/dist-server/service/inventory-product/index.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-mutation.js +33 -44
- package/dist-server/service/inventory-product/inventory-product-mutation.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-query.js +29 -40
- package/dist-server/service/inventory-product/inventory-product-query.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product-type.js +34 -42
- package/dist-server/service/inventory-product/inventory-product-type.js.map +1 -1
- package/dist-server/service/inventory-product/inventory-product.js +34 -42
- package/dist-server/service/inventory-product/inventory-product.js.map +1 -1
- package/dist-server/service/location/index.js.map +1 -1
- package/dist-server/service/location/location-mutation.js +39 -50
- package/dist-server/service/location/location-mutation.js.map +1 -1
- package/dist-server/service/location/location-query.js +65 -76
- package/dist-server/service/location/location-query.js.map +1 -1
- package/dist-server/service/location/location-types.js +105 -113
- package/dist-server/service/location/location-types.js.map +1 -1
- package/dist-server/service/location/location.js +41 -49
- package/dist-server/service/location/location.js.map +1 -1
- package/dist-server/service/movement/index.js.map +1 -1
- package/dist-server/service/movement/movement-mutation.js +21 -32
- package/dist-server/service/movement/movement-mutation.js.map +1 -1
- package/dist-server/service/movement/movement-query.js +51 -65
- package/dist-server/service/movement/movement-query.js.map +1 -1
- package/dist-server/service/movement/movement-types.js +43 -51
- package/dist-server/service/movement/movement-types.js.map +1 -1
- package/dist-server/service/movement/movement.js +30 -38
- package/dist-server/service/movement/movement.js.map +1 -1
- package/dist-server/service/pallet/index.js.map +1 -1
- package/dist-server/service/pallet/pallet-mutation.js +39 -50
- package/dist-server/service/pallet/pallet-mutation.js.map +1 -1
- package/dist-server/service/pallet/pallet-query.js +48 -59
- package/dist-server/service/pallet/pallet-query.js.map +1 -1
- package/dist-server/service/pallet/pallet-types.js +39 -47
- package/dist-server/service/pallet/pallet-types.js.map +1 -1
- package/dist-server/service/pallet/pallet.js +34 -42
- package/dist-server/service/pallet/pallet.js.map +1 -1
- package/dist-server/service/pallet-count/index.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count-mutation.js +39 -50
- package/dist-server/service/pallet-count/pallet-count-mutation.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count-query.js +28 -39
- package/dist-server/service/pallet-count/pallet-count-query.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count-types.js +20 -28
- package/dist-server/service/pallet-count/pallet-count-types.js.map +1 -1
- package/dist-server/service/pallet-count/pallet-count.js +26 -34
- package/dist-server/service/pallet-count/pallet-count.js.map +1 -1
- package/dist-server/service/pallet-history/index.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history-mutation.js +33 -44
- package/dist-server/service/pallet-history/pallet-history-mutation.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history-query.js +29 -40
- package/dist-server/service/pallet-history/pallet-history-query.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history-types.js +20 -28
- package/dist-server/service/pallet-history/pallet-history-types.js.map +1 -1
- package/dist-server/service/pallet-history/pallet-history.js +34 -42
- package/dist-server/service/pallet-history/pallet-history.js.map +1 -1
- package/dist-server/service/reduced-inventory-history/index.js.map +1 -1
- package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js +52 -60
- package/dist-server/service/reduced-inventory-history/reduced-inventory-history.js.map +1 -1
- package/dist-server/service/tote/index.js.map +1 -1
- package/dist-server/service/tote/tote-mutation.js +46 -57
- package/dist-server/service/tote/tote-mutation.js.map +1 -1
- package/dist-server/service/tote/tote-query.js +44 -55
- package/dist-server/service/tote/tote-query.js.map +1 -1
- package/dist-server/service/tote/tote-types.js +24 -32
- package/dist-server/service/tote/tote-types.js.map +1 -1
- package/dist-server/service/tote/tote.js +30 -38
- package/dist-server/service/tote/tote.js.map +1 -1
- package/dist-server/service/warehouse/index.js.map +1 -1
- package/dist-server/service/warehouse/warehouse-mutation.js +33 -44
- package/dist-server/service/warehouse/warehouse-mutation.js.map +1 -1
- package/dist-server/service/warehouse/warehouse-query.js +29 -40
- package/dist-server/service/warehouse/warehouse-query.js.map +1 -1
- package/dist-server/service/warehouse/warehouse-types.js +28 -36
- package/dist-server/service/warehouse/warehouse-types.js.map +1 -1
- package/dist-server/service/warehouse/warehouse.js +31 -39
- package/dist-server/service/warehouse/warehouse.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/dist-server/utils/datetime-util.js.map +1 -1
- package/dist-server/utils/index.js +4 -17
- package/dist-server/utils/index.js.map +1 -1
- package/dist-server/utils/inventory-no-generator.js.map +1 -1
- package/dist-server/utils/inventory-util.js.map +1 -1
- package/package.json +8 -8
- package/server/service/inventory/inventory-mutation.ts +2 -2
- package/server/service/inventory/inventory-query.ts +48 -16
- package/server/service/inventory/inventory.ts +6 -5
- package/server/service/inventory-change/inventory-change-mutation.ts +1 -1
- package/server/service/inventory-change/inventory-change-query.ts +2 -2
- package/server/service/inventory-history/inventory-history-query.ts +29 -28
- package/server/service/inventory-history/inventory-history.ts +39 -39
- package/server/service/inventory-item/inventory-item-mutation.ts +3 -3
- package/server/service/movement/movement-query.ts +3 -6
|
@@ -1,16 +1,8 @@
|
|
|
1
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
2
|
var _a, _b, _c, _d, _e;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.PalletHistory = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
|
15
7
|
const typeorm_1 = require("typeorm");
|
|
16
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
@@ -19,84 +11,84 @@ const shell_1 = require("@things-factory/shell");
|
|
|
19
11
|
const pallet_1 = require("../pallet/pallet");
|
|
20
12
|
let PalletHistory = class PalletHistory {
|
|
21
13
|
};
|
|
22
|
-
__decorate([
|
|
14
|
+
tslib_1.__decorate([
|
|
23
15
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
24
16
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
25
|
-
__metadata("design:type", String)
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
26
18
|
], PalletHistory.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
19
|
+
tslib_1.__decorate([
|
|
28
20
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
29
21
|
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
|
|
30
|
-
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
22
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
31
23
|
], PalletHistory.prototype, "domain", void 0);
|
|
32
|
-
__decorate([
|
|
24
|
+
tslib_1.__decorate([
|
|
33
25
|
(0, typeorm_1.RelationId)((palletHistory) => palletHistory.domain),
|
|
34
|
-
__metadata("design:type", String)
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
35
27
|
], PalletHistory.prototype, "domainId", void 0);
|
|
36
|
-
__decorate([
|
|
28
|
+
tslib_1.__decorate([
|
|
37
29
|
(0, typeorm_1.Column)(),
|
|
38
30
|
(0, type_graphql_1.Field)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
40
32
|
], PalletHistory.prototype, "name", void 0);
|
|
41
|
-
__decorate([
|
|
33
|
+
tslib_1.__decorate([
|
|
42
34
|
(0, typeorm_1.Column)({ default: 0 }),
|
|
43
35
|
(0, type_graphql_1.Field)(),
|
|
44
|
-
__metadata("design:type", Number)
|
|
36
|
+
tslib_1.__metadata("design:type", Number)
|
|
45
37
|
], PalletHistory.prototype, "seq", void 0);
|
|
46
|
-
__decorate([
|
|
38
|
+
tslib_1.__decorate([
|
|
47
39
|
(0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace),
|
|
48
40
|
(0, type_graphql_1.Field)(),
|
|
49
|
-
__metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
|
|
41
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
|
|
50
42
|
], PalletHistory.prototype, "owner", void 0);
|
|
51
|
-
__decorate([
|
|
43
|
+
tslib_1.__decorate([
|
|
52
44
|
(0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace),
|
|
53
45
|
(0, type_graphql_1.Field)(),
|
|
54
|
-
__metadata("design:type", typeof (_c = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _c : Object)
|
|
46
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _c : Object)
|
|
55
47
|
], PalletHistory.prototype, "holder", void 0);
|
|
56
|
-
__decorate([
|
|
48
|
+
tslib_1.__decorate([
|
|
57
49
|
(0, typeorm_1.ManyToOne)(type => pallet_1.Pallet),
|
|
58
50
|
(0, type_graphql_1.Field)(),
|
|
59
|
-
__metadata("design:type", pallet_1.Pallet)
|
|
51
|
+
tslib_1.__metadata("design:type", pallet_1.Pallet)
|
|
60
52
|
], PalletHistory.prototype, "pallet", void 0);
|
|
61
|
-
__decorate([
|
|
53
|
+
tslib_1.__decorate([
|
|
62
54
|
(0, typeorm_1.Column)(),
|
|
63
55
|
(0, type_graphql_1.Field)(),
|
|
64
|
-
__metadata("design:type", String)
|
|
56
|
+
tslib_1.__metadata("design:type", String)
|
|
65
57
|
], PalletHistory.prototype, "status", void 0);
|
|
66
|
-
__decorate([
|
|
58
|
+
tslib_1.__decorate([
|
|
67
59
|
(0, typeorm_1.Column)(),
|
|
68
60
|
(0, type_graphql_1.Field)(),
|
|
69
|
-
__metadata("design:type", String)
|
|
61
|
+
tslib_1.__metadata("design:type", String)
|
|
70
62
|
], PalletHistory.prototype, "transactionType", void 0);
|
|
71
|
-
__decorate([
|
|
63
|
+
tslib_1.__decorate([
|
|
72
64
|
(0, typeorm_1.CreateDateColumn)(),
|
|
73
65
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
74
|
-
__metadata("design:type", Date)
|
|
66
|
+
tslib_1.__metadata("design:type", Date)
|
|
75
67
|
], PalletHistory.prototype, "createdAt", void 0);
|
|
76
|
-
__decorate([
|
|
68
|
+
tslib_1.__decorate([
|
|
77
69
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
78
70
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
79
|
-
__metadata("design:type", Date)
|
|
71
|
+
tslib_1.__metadata("design:type", Date)
|
|
80
72
|
], PalletHistory.prototype, "updatedAt", void 0);
|
|
81
|
-
__decorate([
|
|
73
|
+
tslib_1.__decorate([
|
|
82
74
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User),
|
|
83
75
|
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
84
|
-
__metadata("design:type", typeof (_d = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _d : Object)
|
|
76
|
+
tslib_1.__metadata("design:type", typeof (_d = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _d : Object)
|
|
85
77
|
], PalletHistory.prototype, "creator", void 0);
|
|
86
|
-
__decorate([
|
|
78
|
+
tslib_1.__decorate([
|
|
87
79
|
(0, typeorm_1.RelationId)((palletHistory) => palletHistory.creator),
|
|
88
|
-
__metadata("design:type", String)
|
|
80
|
+
tslib_1.__metadata("design:type", String)
|
|
89
81
|
], PalletHistory.prototype, "creatorId", void 0);
|
|
90
|
-
__decorate([
|
|
82
|
+
tslib_1.__decorate([
|
|
91
83
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User),
|
|
92
84
|
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
93
|
-
__metadata("design:type", typeof (_e = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _e : Object)
|
|
85
|
+
tslib_1.__metadata("design:type", typeof (_e = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _e : Object)
|
|
94
86
|
], PalletHistory.prototype, "updater", void 0);
|
|
95
|
-
__decorate([
|
|
87
|
+
tslib_1.__decorate([
|
|
96
88
|
(0, typeorm_1.RelationId)((palletHistory) => palletHistory.updater),
|
|
97
|
-
__metadata("design:type", String)
|
|
89
|
+
tslib_1.__metadata("design:type", String)
|
|
98
90
|
], PalletHistory.prototype, "updaterId", void 0);
|
|
99
|
-
PalletHistory = __decorate([
|
|
91
|
+
PalletHistory = tslib_1.__decorate([
|
|
100
92
|
(0, typeorm_1.Entity)(),
|
|
101
93
|
(0, typeorm_1.Index)('ix_pallet-history_0', (palletHistory) => [palletHistory.domain, palletHistory.id], {
|
|
102
94
|
unique: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pallet-history.js","sourceRoot":"","sources":["../../../server/service/pallet-history/pallet-history.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pallet-history.js","sourceRoot":"","sources":["../../../server/service/pallet-history/pallet-history.ts"],"names":[],"mappings":";;;;;AAAA,+CAAoD;AACpD,qCASgB;AAEhB,yDAAgD;AAChD,uDAAmD;AACnD,iDAA8C;AAE9C,6CAAyC;AAOzC,IAAa,aAAa,GAA1B,MAAa,aAAa;CA6DzB,CAAA;AA1DC;IAFC,IAAA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,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACf,IAAI;gDAAA;AAIf;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACvB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAC/B,gBAAI,oBAAJ,gBAAI;8CAAA;AAGb;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDACnD;AAIjB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACvB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAC/B,gBAAI,oBAAJ,gBAAI;8CAAA;AAGb;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDACnD;AA5DN,aAAa;IALzB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC,EAAE;QACxG,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,GAAE;GACA,aAAa,CA6DzB;AA7DY,sCAAa","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Bizplace } from '@things-factory/biz-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { Pallet } from '../pallet/pallet'\n\n@Entity()\n@Index('ix_pallet-history_0', (palletHistory: PalletHistory) => [palletHistory.domain, palletHistory.id], {\n unique: true\n})\n@ObjectType()\nexport class PalletHistory {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain: Domain\n\n @RelationId((palletHistory: PalletHistory) => palletHistory.domain)\n domainId: string\n\n @Column()\n @Field()\n name: string\n\n @Column({ default: 0 })\n @Field()\n seq: number\n\n @ManyToOne(type => Bizplace)\n @Field()\n owner: Bizplace\n\n @ManyToOne(type => Bizplace)\n @Field()\n holder: Bizplace\n\n @ManyToOne(type => Pallet)\n @Field()\n pallet: Pallet\n\n @Column()\n @Field()\n status: string\n\n @Column()\n @Field()\n transactionType: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @ManyToOne(type => User)\n @Field(type => User, { nullable: true })\n creator: User\n\n @RelationId((palletHistory: PalletHistory) => palletHistory.creator)\n creatorId: string\n\n @ManyToOne(type => User)\n @Field(type => User, { nullable: true })\n updater: User\n\n @RelationId((palletHistory: PalletHistory) => palletHistory.updater)\n updaterId: string\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/reduced-inventory-history/index.ts"],"names":[],"mappings":";;;AAAA,2EAAqE;AAExD,QAAA,QAAQ,GAAG,CAAC,mDAAuB,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/reduced-inventory-history/index.ts"],"names":[],"mappings":";;;AAAA,2EAAqE;AAExD,QAAA,QAAQ,GAAG,CAAC,mDAAuB,CAAC,CAAA","sourcesContent":["import { ReducedInventoryHistory } from './reduced-inventory-history'\n\nexport const entities = [ReducedInventoryHistory]\n"]}
|
|
@@ -1,119 +1,111 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.ReducedInventoryHistory = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const typeorm_1 = require("typeorm");
|
|
14
6
|
let ReducedInventoryHistory = class ReducedInventoryHistory {
|
|
15
7
|
};
|
|
16
|
-
__decorate([
|
|
8
|
+
tslib_1.__decorate([
|
|
17
9
|
(0, typeorm_1.ViewColumn)(),
|
|
18
|
-
__metadata("design:type", String)
|
|
10
|
+
tslib_1.__metadata("design:type", String)
|
|
19
11
|
], ReducedInventoryHistory.prototype, "id", void 0);
|
|
20
|
-
__decorate([
|
|
12
|
+
tslib_1.__decorate([
|
|
21
13
|
(0, typeorm_1.ViewColumn)(),
|
|
22
|
-
__metadata("design:type", Number)
|
|
14
|
+
tslib_1.__metadata("design:type", Number)
|
|
23
15
|
], ReducedInventoryHistory.prototype, "seq", void 0);
|
|
24
|
-
__decorate([
|
|
16
|
+
tslib_1.__decorate([
|
|
25
17
|
(0, typeorm_1.ViewColumn)(),
|
|
26
|
-
__metadata("design:type", String)
|
|
18
|
+
tslib_1.__metadata("design:type", String)
|
|
27
19
|
], ReducedInventoryHistory.prototype, "domainId", void 0);
|
|
28
|
-
__decorate([
|
|
20
|
+
tslib_1.__decorate([
|
|
29
21
|
(0, typeorm_1.ViewColumn)(),
|
|
30
|
-
__metadata("design:type", String)
|
|
22
|
+
tslib_1.__metadata("design:type", String)
|
|
31
23
|
], ReducedInventoryHistory.prototype, "bizplaceId", void 0);
|
|
32
|
-
__decorate([
|
|
24
|
+
tslib_1.__decorate([
|
|
33
25
|
(0, typeorm_1.ViewColumn)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
35
27
|
], ReducedInventoryHistory.prototype, "inventoryId", void 0);
|
|
36
|
-
__decorate([
|
|
28
|
+
tslib_1.__decorate([
|
|
37
29
|
(0, typeorm_1.ViewColumn)(),
|
|
38
|
-
__metadata("design:type", String)
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
39
31
|
], ReducedInventoryHistory.prototype, "refOrderId", void 0);
|
|
40
|
-
__decorate([
|
|
32
|
+
tslib_1.__decorate([
|
|
41
33
|
(0, typeorm_1.ViewColumn)(),
|
|
42
|
-
__metadata("design:type", String)
|
|
34
|
+
tslib_1.__metadata("design:type", String)
|
|
43
35
|
], ReducedInventoryHistory.prototype, "orderNo", void 0);
|
|
44
|
-
__decorate([
|
|
36
|
+
tslib_1.__decorate([
|
|
45
37
|
(0, typeorm_1.ViewColumn)(),
|
|
46
|
-
__metadata("design:type", String)
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
47
39
|
], ReducedInventoryHistory.prototype, "name", void 0);
|
|
48
|
-
__decorate([
|
|
40
|
+
tslib_1.__decorate([
|
|
49
41
|
(0, typeorm_1.ViewColumn)(),
|
|
50
|
-
__metadata("design:type", String)
|
|
42
|
+
tslib_1.__metadata("design:type", String)
|
|
51
43
|
], ReducedInventoryHistory.prototype, "palletId", void 0);
|
|
52
|
-
__decorate([
|
|
44
|
+
tslib_1.__decorate([
|
|
53
45
|
(0, typeorm_1.ViewColumn)(),
|
|
54
|
-
__metadata("design:type", String)
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
55
47
|
], ReducedInventoryHistory.prototype, "cartonId", void 0);
|
|
56
|
-
__decorate([
|
|
48
|
+
tslib_1.__decorate([
|
|
57
49
|
(0, typeorm_1.ViewColumn)(),
|
|
58
|
-
__metadata("design:type", String)
|
|
50
|
+
tslib_1.__metadata("design:type", String)
|
|
59
51
|
], ReducedInventoryHistory.prototype, "batchId", void 0);
|
|
60
|
-
__decorate([
|
|
52
|
+
tslib_1.__decorate([
|
|
61
53
|
(0, typeorm_1.ViewColumn)(),
|
|
62
|
-
__metadata("design:type", String)
|
|
54
|
+
tslib_1.__metadata("design:type", String)
|
|
63
55
|
], ReducedInventoryHistory.prototype, "batchIdRef", void 0);
|
|
64
|
-
__decorate([
|
|
56
|
+
tslib_1.__decorate([
|
|
65
57
|
(0, typeorm_1.ViewColumn)(),
|
|
66
|
-
__metadata("design:type", String)
|
|
58
|
+
tslib_1.__metadata("design:type", String)
|
|
67
59
|
], ReducedInventoryHistory.prototype, "productId", void 0);
|
|
68
|
-
__decorate([
|
|
60
|
+
tslib_1.__decorate([
|
|
69
61
|
(0, typeorm_1.ViewColumn)(),
|
|
70
|
-
__metadata("design:type", String)
|
|
62
|
+
tslib_1.__metadata("design:type", String)
|
|
71
63
|
], ReducedInventoryHistory.prototype, "warehouseId", void 0);
|
|
72
|
-
__decorate([
|
|
64
|
+
tslib_1.__decorate([
|
|
73
65
|
(0, typeorm_1.ViewColumn)(),
|
|
74
|
-
__metadata("design:type", String)
|
|
66
|
+
tslib_1.__metadata("design:type", String)
|
|
75
67
|
], ReducedInventoryHistory.prototype, "locationId", void 0);
|
|
76
|
-
__decorate([
|
|
68
|
+
tslib_1.__decorate([
|
|
77
69
|
(0, typeorm_1.ViewColumn)(),
|
|
78
|
-
__metadata("design:type", String)
|
|
70
|
+
tslib_1.__metadata("design:type", String)
|
|
79
71
|
], ReducedInventoryHistory.prototype, "zone", void 0);
|
|
80
|
-
__decorate([
|
|
72
|
+
tslib_1.__decorate([
|
|
81
73
|
(0, typeorm_1.ViewColumn)(),
|
|
82
|
-
__metadata("design:type", String)
|
|
74
|
+
tslib_1.__metadata("design:type", String)
|
|
83
75
|
], ReducedInventoryHistory.prototype, "orderRefNo", void 0);
|
|
84
|
-
__decorate([
|
|
76
|
+
tslib_1.__decorate([
|
|
85
77
|
(0, typeorm_1.ViewColumn)(),
|
|
86
|
-
__metadata("design:type", String)
|
|
78
|
+
tslib_1.__metadata("design:type", String)
|
|
87
79
|
], ReducedInventoryHistory.prototype, "packingType", void 0);
|
|
88
|
-
__decorate([
|
|
80
|
+
tslib_1.__decorate([
|
|
89
81
|
(0, typeorm_1.ViewColumn)(),
|
|
90
|
-
__metadata("design:type", String)
|
|
82
|
+
tslib_1.__metadata("design:type", String)
|
|
91
83
|
], ReducedInventoryHistory.prototype, "uom", void 0);
|
|
92
|
-
__decorate([
|
|
84
|
+
tslib_1.__decorate([
|
|
93
85
|
(0, typeorm_1.ViewColumn)(),
|
|
94
|
-
__metadata("design:type", Number)
|
|
86
|
+
tslib_1.__metadata("design:type", Number)
|
|
95
87
|
], ReducedInventoryHistory.prototype, "uomValue", void 0);
|
|
96
|
-
__decorate([
|
|
88
|
+
tslib_1.__decorate([
|
|
97
89
|
(0, typeorm_1.ViewColumn)(),
|
|
98
|
-
__metadata("design:type", Number)
|
|
90
|
+
tslib_1.__metadata("design:type", Number)
|
|
99
91
|
], ReducedInventoryHistory.prototype, "openingUomValue", void 0);
|
|
100
|
-
__decorate([
|
|
92
|
+
tslib_1.__decorate([
|
|
101
93
|
(0, typeorm_1.ViewColumn)(),
|
|
102
|
-
__metadata("design:type", Number)
|
|
94
|
+
tslib_1.__metadata("design:type", Number)
|
|
103
95
|
], ReducedInventoryHistory.prototype, "qty", void 0);
|
|
104
|
-
__decorate([
|
|
96
|
+
tslib_1.__decorate([
|
|
105
97
|
(0, typeorm_1.ViewColumn)(),
|
|
106
|
-
__metadata("design:type", Number)
|
|
98
|
+
tslib_1.__metadata("design:type", Number)
|
|
107
99
|
], ReducedInventoryHistory.prototype, "openingQty", void 0);
|
|
108
|
-
__decorate([
|
|
100
|
+
tslib_1.__decorate([
|
|
109
101
|
(0, typeorm_1.ViewColumn)(),
|
|
110
|
-
__metadata("design:type", String)
|
|
102
|
+
tslib_1.__metadata("design:type", String)
|
|
111
103
|
], ReducedInventoryHistory.prototype, "status", void 0);
|
|
112
|
-
__decorate([
|
|
104
|
+
tslib_1.__decorate([
|
|
113
105
|
(0, typeorm_1.ViewColumn)(),
|
|
114
|
-
__metadata("design:type", String)
|
|
106
|
+
tslib_1.__metadata("design:type", String)
|
|
115
107
|
], ReducedInventoryHistory.prototype, "transactionType", void 0);
|
|
116
|
-
ReducedInventoryHistory = __decorate([
|
|
108
|
+
ReducedInventoryHistory = tslib_1.__decorate([
|
|
117
109
|
(0, typeorm_1.ViewEntity)({
|
|
118
110
|
expression: `
|
|
119
111
|
SELECT ih.* FROM inventory_histories ih
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reduced-inventory-history.js","sourceRoot":"","sources":["../../../server/service/reduced-inventory-history/reduced-inventory-history.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reduced-inventory-history.js","sourceRoot":"","sources":["../../../server/service/reduced-inventory-history/reduced-inventory-history.ts"],"names":[],"mappings":";;;;AAAA,qCAAgD;AAgBhD,IAAa,uBAAuB,GAApC,MAAa,uBAAuB;CA2EnC,CAAA;AAzEC;IADC,IAAA,oBAAU,GAAE;;mDACH;AAGV;IADC,IAAA,oBAAU,GAAE;;oDACF;AAGX;IADC,IAAA,oBAAU,GAAE;;yDACG;AAGhB;IADC,IAAA,oBAAU,GAAE;;2DACK;AAGlB;IADC,IAAA,oBAAU,GAAE;;4DACM;AAGnB;IADC,IAAA,oBAAU,GAAE;;2DACK;AAGlB;IADC,IAAA,oBAAU,GAAE;;wDACE;AAGf;IADC,IAAA,oBAAU,GAAE;;qDACD;AAGZ;IADC,IAAA,oBAAU,GAAE;;yDACG;AAGhB;IADC,IAAA,oBAAU,GAAE;;yDACG;AAGhB;IADC,IAAA,oBAAU,GAAE;;wDACE;AAGf;IADC,IAAA,oBAAU,GAAE;;2DACK;AAGlB;IADC,IAAA,oBAAU,GAAE;;0DACI;AAGjB;IADC,IAAA,oBAAU,GAAE;;4DACM;AAGnB;IADC,IAAA,oBAAU,GAAE;;2DACK;AAGlB;IADC,IAAA,oBAAU,GAAE;;qDACD;AAGZ;IADC,IAAA,oBAAU,GAAE;;2DACK;AAGlB;IADC,IAAA,oBAAU,GAAE;;4DACM;AAGnB;IADC,IAAA,oBAAU,GAAE;;oDACF;AAGX;IADC,IAAA,oBAAU,GAAE;;yDACG;AAGhB;IADC,IAAA,oBAAU,GAAE;;gEACU;AAGvB;IADC,IAAA,oBAAU,GAAE;;oDACF;AAGX;IADC,IAAA,oBAAU,GAAE;;2DACK;AAGlB;IADC,IAAA,oBAAU,GAAE;;uDACC;AAGd;IADC,IAAA,oBAAU,GAAE;;gEACU;AA1EZ,uBAAuB;IAdnC,IAAA,oBAAU,EAAC;QACV,UAAU,EAAE;;;;;;;;;;;GAWX;KACF,CAAC;GACW,uBAAuB,CA2EnC;AA3EY,0DAAuB","sourcesContent":["import { ViewColumn, ViewEntity } from 'typeorm'\n\n@ViewEntity({\n expression: `\n SELECT ih.* FROM inventory_histories ih \n WHERE NOT EXISTS ( \n SELECT ih2.id FROM inventory_histories ih2\n WHERE ih2.domain_id = ih.domain_id AND ih2.pallet_id::text = ih.pallet_id::TEXT\n AND (\n ((ih2.transaction_type::text = 'CANCEL_ORDER'::text) AND ih2.ref_order_id::text = ih.ref_order_id::TEXT) \n OR\n ((ih2.seq = (ih.seq + 1) OR ih2.seq = ih.seq) AND (ih2.transaction_type::text = 'UNDO_UNLOADING'::TEXT OR ih2.transaction_type::text = 'UNDO_LOADING'::TEXT))\n )\n )\n `\n})\nexport class ReducedInventoryHistory {\n @ViewColumn()\n id: string\n\n @ViewColumn()\n seq: number\n\n @ViewColumn()\n domainId: string\n\n @ViewColumn()\n bizplaceId: string\n\n @ViewColumn()\n inventoryId: string\n\n @ViewColumn()\n refOrderId: string\n\n @ViewColumn()\n orderNo: string\n\n @ViewColumn()\n name: string\n\n @ViewColumn()\n palletId: string\n\n @ViewColumn()\n cartonId: string\n\n @ViewColumn()\n batchId: string\n\n @ViewColumn()\n batchIdRef: string\n\n @ViewColumn()\n productId: string\n\n @ViewColumn()\n warehouseId: string\n\n @ViewColumn()\n locationId: string\n\n @ViewColumn()\n zone: string\n\n @ViewColumn()\n orderRefNo: string\n\n @ViewColumn()\n packingType: string\n\n @ViewColumn()\n uom: string\n\n @ViewColumn()\n uomValue: number\n\n @ViewColumn()\n openingUomValue: number\n\n @ViewColumn()\n qty: number\n\n @ViewColumn()\n openingQty: number\n\n @ViewColumn()\n status: string\n\n @ViewColumn()\n transactionType: string\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/tote/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,mDAA8C;AAC9C,6CAAwC;AAE3B,QAAA,QAAQ,GAAG,CAAC,WAAI,CAAC,CAAA;AACjB,QAAA,SAAS,GAAG,CAAC,sBAAS,EAAE,4BAAY,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/tote/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,mDAA8C;AAC9C,6CAAwC;AAE3B,QAAA,QAAQ,GAAG,CAAC,WAAI,CAAC,CAAA;AACjB,QAAA,SAAS,GAAG,CAAC,sBAAS,EAAE,4BAAY,CAAC,CAAA","sourcesContent":["import { Tote } from './tote'\nimport { ToteMutation } from './tote-mutation'\nimport { ToteQuery } from './tote-query'\n\nexport const entities = [Tote]\nexport const resolvers = [ToteQuery, ToteMutation]\n"]}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
3
|
exports.ToteMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
16
5
|
const type_graphql_1 = require("type-graphql");
|
|
17
6
|
const typeorm_1 = require("typeorm");
|
|
18
7
|
const biz_base_1 = require("@things-factory/biz-base");
|
|
@@ -120,72 +109,72 @@ let ToteMutation = class ToteMutation {
|
|
|
120
109
|
return true;
|
|
121
110
|
}
|
|
122
111
|
};
|
|
123
|
-
__decorate([
|
|
112
|
+
tslib_1.__decorate([
|
|
124
113
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
125
114
|
(0, type_graphql_1.Mutation)(returns => tote_1.Tote),
|
|
126
|
-
__param(0, (0, type_graphql_1.Arg)('pallet')),
|
|
127
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
128
|
-
__metadata("design:type", Function),
|
|
129
|
-
__metadata("design:paramtypes", [tote_types_1.NewTote, Object]),
|
|
130
|
-
__metadata("design:returntype", Promise)
|
|
115
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('pallet')),
|
|
116
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
117
|
+
tslib_1.__metadata("design:type", Function),
|
|
118
|
+
tslib_1.__metadata("design:paramtypes", [tote_types_1.NewTote, Object]),
|
|
119
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
131
120
|
], ToteMutation.prototype, "createTote", null);
|
|
132
|
-
__decorate([
|
|
121
|
+
tslib_1.__decorate([
|
|
133
122
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
134
123
|
(0, type_graphql_1.Mutation)(returns => tote_1.Tote),
|
|
135
|
-
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
136
|
-
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
137
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
138
|
-
__metadata("design:type", Function),
|
|
139
|
-
__metadata("design:paramtypes", [String, tote_types_1.TotePatch, Object]),
|
|
140
|
-
__metadata("design:returntype", Promise)
|
|
124
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
125
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
126
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
127
|
+
tslib_1.__metadata("design:type", Function),
|
|
128
|
+
tslib_1.__metadata("design:paramtypes", [String, tote_types_1.TotePatch, Object]),
|
|
129
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
141
130
|
], ToteMutation.prototype, "updateTote", null);
|
|
142
|
-
__decorate([
|
|
131
|
+
tslib_1.__decorate([
|
|
143
132
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
144
133
|
(0, type_graphql_1.Mutation)(returns => [tote_1.Tote]),
|
|
145
|
-
__param(0, (0, type_graphql_1.Arg)('patches', type => [tote_types_1.TotePatch])),
|
|
146
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
147
|
-
__metadata("design:type", Function),
|
|
148
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
149
|
-
__metadata("design:returntype", Promise)
|
|
134
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [tote_types_1.TotePatch])),
|
|
135
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
136
|
+
tslib_1.__metadata("design:type", Function),
|
|
137
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
138
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
150
139
|
], ToteMutation.prototype, "updateMultipleTote", null);
|
|
151
|
-
__decorate([
|
|
140
|
+
tslib_1.__decorate([
|
|
152
141
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
153
142
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
154
|
-
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
155
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
156
|
-
__metadata("design:type", Function),
|
|
157
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
158
|
-
__metadata("design:returntype", Promise)
|
|
143
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
144
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
145
|
+
tslib_1.__metadata("design:type", Function),
|
|
146
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
147
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
159
148
|
], ToteMutation.prototype, "deleteTote", null);
|
|
160
|
-
__decorate([
|
|
149
|
+
tslib_1.__decorate([
|
|
161
150
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
162
151
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
163
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
164
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
165
|
-
__metadata("design:type", Function),
|
|
166
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
167
|
-
__metadata("design:returntype", Promise)
|
|
152
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
153
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
154
|
+
tslib_1.__metadata("design:type", Function),
|
|
155
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
156
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
168
157
|
], ToteMutation.prototype, "deleteTotes", null);
|
|
169
|
-
__decorate([
|
|
158
|
+
tslib_1.__decorate([
|
|
170
159
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
171
160
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
172
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
173
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
174
|
-
__metadata("design:type", Function),
|
|
175
|
-
__metadata("design:paramtypes", [Array, Object]),
|
|
176
|
-
__metadata("design:returntype", Promise)
|
|
161
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
162
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
163
|
+
tslib_1.__metadata("design:type", Function),
|
|
164
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
165
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
177
166
|
], ToteMutation.prototype, "undeleteTotes", null);
|
|
178
|
-
__decorate([
|
|
167
|
+
tslib_1.__decorate([
|
|
179
168
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
180
169
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
181
|
-
__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
182
|
-
__param(1, (0, type_graphql_1.Arg)('status', type => String)),
|
|
183
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
184
|
-
__metadata("design:type", Function),
|
|
185
|
-
__metadata("design:paramtypes", [Array, String, Object]),
|
|
186
|
-
__metadata("design:returntype", Promise)
|
|
170
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
171
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('status', type => String)),
|
|
172
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
173
|
+
tslib_1.__metadata("design:type", Function),
|
|
174
|
+
tslib_1.__metadata("design:paramtypes", [Array, String, Object]),
|
|
175
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
187
176
|
], ToteMutation.prototype, "bulkUpdateToteStatus", null);
|
|
188
|
-
ToteMutation = __decorate([
|
|
177
|
+
ToteMutation = tslib_1.__decorate([
|
|
189
178
|
(0, type_graphql_1.Resolver)(tote_1.Tote)
|
|
190
179
|
], ToteMutation);
|
|
191
180
|
exports.ToteMutation = ToteMutation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tote-mutation.js","sourceRoot":"","sources":["../../../server/service/tote/tote-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA2C;AAG3C,uDAAmD;AAInD,iCAA6B;AAC7B,6CAAiD;AAGjD,IAAa,YAAY,GAAzB,MAAa,YAAY;IAGvB,KAAK,CAAC,UAAU,CAAgB,IAAa,EAAS,OAAY;QAChE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAE7F,MAAM,YAAY,GAAa,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,WAAI,CAAC,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAClH,IAAI,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;QAEhF,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,WAAI,CAAC,CAAC,IAAI,iCACnC,IAAI,KACP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,IAAI,EACb,OAAO,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AAG,EAAC,MAAM,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;8CAW/C;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACV,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAqBpE;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACR,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAetE;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IAE1B,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,EAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IAC7B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;wDAgBP;AA1LU,YAAY;IADxB,IAAA,uBAAQ,EAAC,WAAI,CAAC;GACF,YAAY,CA2LxB;AA3LY,oCAAY","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { EntityManager, In } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Bizplace } from '@things-factory/biz-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { PalletHistory } from '../pallet-history/pallet-history'\nimport { Tote } from './tote'\nimport { NewTote, TotePatch } from './tote-types'\n\n@Resolver(Tote)\nexport class ToteMutation {\n @Directive('@transaction')\n @Mutation(returns => Tote)\n async createTote(@Arg('pallet') tote: NewTote, @Ctx() context: any): Promise<Tote> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n const existingTote: string[] = (await tx.getRepository(Tote).find({ relations: ['user'] })).map(tote => tote.name)\n if (existingTote.includes(tote.name)) throw new Error('tote box already exists')\n\n return await tx.getRepository(Tote).save({\n ...tote,\n domain: domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Tote)\n async updateTote(@Arg('name') name: string, @Arg('patch') patch: TotePatch, @Ctx() context: any): Promise<Tote> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n const repository = tx.getRepository(Tote)\n const tote = await repository.findOne({\n where: { domain: domain, name }\n })\n\n return await repository.save({\n ...tote,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Tote])\n async updateMultipleTote(\n @Arg('patches', type => [TotePatch]) patches: TotePatch[],\n @Ctx() context: any\n ): Promise<Tote[]> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n if (newRecord.bizplace && newRecord.bizplace.id) {\n newRecord.bizplace = await tx.getRepository(Bizplace).findOne(newRecord.bizplace.id)\n }\n\n let foundTote = await tx\n .getRepository(Tote)\n .findOne({ where: { domain, name: newRecord.name, bizplace: newRecord.bizplace } })\n\n if (foundTote) {\n throw new Error('Duplicated tote found')\n }\n\n const result: Tote = await tx.getRepository(Tote).save({\n domain: domain,\n creator: user,\n updater: user,\n ...newRecord\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const newRecord = _updateRecords[i]\n const tote = await tx.getRepository(Tote).findOne({\n where: { id: newRecord.id },\n relations: ['bizplace']\n })\n\n if (newRecord.bizplace && newRecord.bizplace.id) {\n newRecord.bizplace = await tx.getRepository(Bizplace).findOne(newRecord.bizplace.id)\n }\n\n let foundTote = await tx\n .getRepository(Tote)\n .findOne({ where: { domain, name: newRecord.name, bizplace: newRecord.bizplace } })\n\n if (foundTote) {\n throw new Error('Duplicated tote found')\n }\n\n const result = await tx.getRepository(Tote).save({\n ...tote,\n ...newRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async deleteTote(@Arg('name') id: string, @Ctx() context: any): Promise<Boolean> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n const foundTote = await tx.getRepository(Tote).find({ where: { id } })\n\n await tx.getRepository(Tote).save({\n ...foundTote,\n deletedAt: new Date(),\n updater: user\n })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async deleteTotes(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<Boolean> {\n const { domain, user, tx }: { domain: Domain; user: User; tx: EntityManager } = context.state\n\n const totes = await tx.getRepository(Tote).find({\n where: {\n domain: domain,\n id: In(ids)\n },\n relations: ['bizplace']\n })\n\n await Promise.all(\n totes.map(async (tote: Tote) => {\n await tx.getRepository(Tote).save({\n ...tote,\n deletedAt: new Date(),\n updater: user\n })\n })\n )\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async undeleteTotes(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<Boolean> {\n const { tx, user }: { tx: EntityManager; user: User } = context.state\n const toteRepo = tx.getRepository(Tote)\n\n await toteRepo.update(\n {\n id: In(ids)\n },\n {\n deletedAt: null,\n updater: user\n }\n )\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async bulkUpdateToteStatus(\n @Arg('ids', type => [String]) ids: string[],\n @Arg('status', type => String) status: string,\n @Ctx() context: any\n ): Promise<Boolean> {\n const { tx, user }: { tx: EntityManager; user: User } = context.state\n const toteRepo = tx.getRepository(Tote)\n\n await toteRepo.update(\n {\n id: In(ids)\n },\n {\n status,\n updater: user\n }\n )\n\n return true\n }\n}\n"]}
|