@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,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.MovementMutation = 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");
|
|
@@ -42,38 +31,38 @@ let MovementMutation = class MovementMutation {
|
|
|
42
31
|
return true;
|
|
43
32
|
}
|
|
44
33
|
};
|
|
45
|
-
__decorate([
|
|
34
|
+
tslib_1.__decorate([
|
|
46
35
|
(0, type_graphql_1.Directive)('@privilege(category: "movement", privilege: "mutation")'),
|
|
47
36
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
48
37
|
(0, type_graphql_1.Mutation)(returns => movement_1.Movement),
|
|
49
|
-
__param(0, (0, type_graphql_1.Arg)('movement')),
|
|
50
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
51
|
-
__metadata("design:type", Function),
|
|
52
|
-
__metadata("design:paramtypes", [movement_types_1.NewMovement, Object]),
|
|
53
|
-
__metadata("design:returntype", Promise)
|
|
38
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('movement')),
|
|
39
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
40
|
+
tslib_1.__metadata("design:type", Function),
|
|
41
|
+
tslib_1.__metadata("design:paramtypes", [movement_types_1.NewMovement, Object]),
|
|
42
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
54
43
|
], MovementMutation.prototype, "createMovement", null);
|
|
55
|
-
__decorate([
|
|
44
|
+
tslib_1.__decorate([
|
|
56
45
|
(0, type_graphql_1.Directive)('@privilege(category: "movement", privilege: "mutation")'),
|
|
57
46
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
58
47
|
(0, type_graphql_1.Mutation)(returns => movement_1.Movement),
|
|
59
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
60
|
-
__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
61
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
62
|
-
__metadata("design:type", Function),
|
|
63
|
-
__metadata("design:paramtypes", [String, movement_types_1.MovementPatch, Object]),
|
|
64
|
-
__metadata("design:returntype", Promise)
|
|
48
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
49
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
50
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
51
|
+
tslib_1.__metadata("design:type", Function),
|
|
52
|
+
tslib_1.__metadata("design:paramtypes", [String, movement_types_1.MovementPatch, Object]),
|
|
53
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
65
54
|
], MovementMutation.prototype, "updateMovement", null);
|
|
66
|
-
__decorate([
|
|
55
|
+
tslib_1.__decorate([
|
|
67
56
|
(0, type_graphql_1.Directive)('@privilege(category: "movement", privilege: "mutation")'),
|
|
68
57
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
69
58
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
70
|
-
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
71
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
72
|
-
__metadata("design:type", Function),
|
|
73
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
74
|
-
__metadata("design:returntype", Promise)
|
|
59
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
60
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
61
|
+
tslib_1.__metadata("design:type", Function),
|
|
62
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
63
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
75
64
|
], MovementMutation.prototype, "deleteMovement", null);
|
|
76
|
-
MovementMutation = __decorate([
|
|
65
|
+
MovementMutation = tslib_1.__decorate([
|
|
77
66
|
(0, type_graphql_1.Resolver)(movement_1.Movement)
|
|
78
67
|
], MovementMutation);
|
|
79
68
|
exports.MovementMutation = MovementMutation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"movement-mutation.js","sourceRoot":"","sources":["../../../server/service/movement/movement-mutation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"movement-mutation.js","sourceRoot":"","sources":["../../../server/service/movement/movement-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA2C;AAG3C,uDAAkE;AAGlE,sDAAkD;AAClD,yCAAqC;AACrC,qDAA6D;AAG7D,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAI3B,KAAK,CAAC,cAAc,CAAkB,QAAqB,EAAS,OAAY;QAC9E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAmC,OAAO,CAAC,KAAK,CAAA;QACtE,OAAO,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,iCACpC,QAAQ,KACX,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAKD,KAAK,CAAC,cAAc,CACP,EAAU,EACP,KAAoB,EAC3B,OAAY;QAEnB,MAAM,QAAQ,GAAG,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;YACrD,KAAK,EAAE;gBACL,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;gBAC5B,EAAE;gBACF,QAAQ,EAAE,IAAA,YAAE,EAAC,MAAM,IAAA,kCAAuB,EAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aACtF;SACF,CAAC,CAAA;QAEF,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE;YACzC,KAAK,CAAC,SAAS,GAAG,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;SAC7E;QAED,OAAO,MAAM,IAAA,uBAAa,EA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":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { getRepository, In } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { getPermittedBizplaceIds } from '@things-factory/biz-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { Inventory } from '../inventory/inventory'\nimport { Movement } from './movement'\nimport { MovementPatch, NewMovement } from './movement-types'\n\n@Resolver(Movement)\nexport class MovementMutation {\n @Directive('@privilege(category: \"movement\", privilege: \"mutation\")')\n @Directive('@transaction')\n @Mutation(returns => Movement)\n async createMovement(@Arg('movement') movement: NewMovement, @Ctx() context: any): Promise<Movement> {\n const { domain, user }: { domain: Domain; user: User } = context.state\n return await getRepository(Movement).save({\n ...movement,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@privilege(category: \"movement\", privilege: \"mutation\")')\n @Directive('@transaction')\n @Mutation(returns => Movement)\n async updateMovement(\n @Arg('id') id: string,\n @Arg('patch') patch: MovementPatch,\n @Ctx() context: any\n ): Promise<Movement> {\n const movement = await getRepository(Movement).findOne({\n where: {\n domain: context.state.domain,\n id,\n bizplace: In(await getPermittedBizplaceIds(context.state.domain, context.state.user))\n }\n })\n\n if (patch.inventory && patch.inventory.id) {\n patch.inventory = await getRepository(Inventory).findOne(patch.inventory.id)\n }\n\n return await getRepository(Movement).save({\n ...movement,\n ...patch,\n updater: context.state.user\n })\n }\n\n @Directive('@privilege(category: \"movement\", privilege: \"mutation\")')\n @Directive('@transaction')\n @Mutation(returns => Boolean)\n async deleteMovement(@Arg('name') name: string, @Ctx() context: any): Promise<Boolean> {\n await getRepository(Movement).delete(name)\n return true\n }\n}\n"]}
|
|
@@ -1,19 +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
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
2
|
var _a, _b, _c;
|
|
15
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
4
|
exports.MovementQuery = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
17
6
|
const type_graphql_1 = require("type-graphql");
|
|
18
7
|
const typeorm_1 = require("typeorm");
|
|
19
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
@@ -41,8 +30,7 @@ let MovementQuery = class MovementQuery {
|
|
|
41
30
|
}
|
|
42
31
|
async inboundMovementsCounter(params, context) {
|
|
43
32
|
const { domain, user } = context.state;
|
|
44
|
-
let bizplaces = await (0, biz_base_1.getPermittedBizplaceIds)(domain, user)
|
|
45
|
-
bizplaces = bizplaces
|
|
33
|
+
let bizplaces = (await (0, biz_base_1.getPermittedBizplaceIds)(domain, user))
|
|
46
34
|
.map(bizplace => {
|
|
47
35
|
return "'" + bizplace.trim() + "'";
|
|
48
36
|
})
|
|
@@ -91,8 +79,7 @@ let MovementQuery = class MovementQuery {
|
|
|
91
79
|
}
|
|
92
80
|
async outboundMovementsCounter(params, context) {
|
|
93
81
|
const { domain, user } = context.state;
|
|
94
|
-
let bizplaces = await (0, biz_base_1.getPermittedBizplaceIds)(domain, user)
|
|
95
|
-
bizplaces = bizplaces
|
|
82
|
+
let bizplaces = (await (0, biz_base_1.getPermittedBizplaceIds)(domain, user))
|
|
96
83
|
.map(bizplace => {
|
|
97
84
|
return "'" + bizplace.trim() + "'";
|
|
98
85
|
})
|
|
@@ -143,8 +130,7 @@ let MovementQuery = class MovementQuery {
|
|
|
143
130
|
}
|
|
144
131
|
async weeklyMovementsCounter(month, year, context) {
|
|
145
132
|
const { domain, user } = context.state;
|
|
146
|
-
let bizplaces = await (0, biz_base_1.getPermittedBizplaceIds)(domain, user)
|
|
147
|
-
bizplaces = bizplaces
|
|
133
|
+
let bizplaces = (await (0, biz_base_1.getPermittedBizplaceIds)(domain, user))
|
|
148
134
|
.map(bizplace => {
|
|
149
135
|
return "'" + bizplace.trim() + "'";
|
|
150
136
|
})
|
|
@@ -206,71 +192,71 @@ let MovementQuery = class MovementQuery {
|
|
|
206
192
|
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(movement.creatorId);
|
|
207
193
|
}
|
|
208
194
|
};
|
|
209
|
-
__decorate([
|
|
195
|
+
tslib_1.__decorate([
|
|
210
196
|
(0, type_graphql_1.Directive)('@privilege(category: "movement", privilege: "query")'),
|
|
211
197
|
(0, type_graphql_1.Query)(returns => movement_types_1.MovementList),
|
|
212
|
-
__param(0, (0, type_graphql_1.Args)()),
|
|
213
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
214
|
-
__metadata("design:type", Function),
|
|
215
|
-
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
216
|
-
__metadata("design:returntype", Promise)
|
|
198
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
199
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
200
|
+
tslib_1.__metadata("design:type", Function),
|
|
201
|
+
tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
202
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
217
203
|
], MovementQuery.prototype, "movements", null);
|
|
218
|
-
__decorate([
|
|
204
|
+
tslib_1.__decorate([
|
|
219
205
|
(0, type_graphql_1.Directive)('@privilege(category: "movement", privilege: "query")'),
|
|
220
206
|
(0, type_graphql_1.Query)(returns => movement_1.Movement),
|
|
221
|
-
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
222
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
223
|
-
__metadata("design:type", Function),
|
|
224
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
225
|
-
__metadata("design:returntype", Promise)
|
|
207
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
208
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
209
|
+
tslib_1.__metadata("design:type", Function),
|
|
210
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
211
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
226
212
|
], MovementQuery.prototype, "movement", null);
|
|
227
|
-
__decorate([
|
|
213
|
+
tslib_1.__decorate([
|
|
228
214
|
(0, type_graphql_1.Query)(returns => [movement_types_1.MovementCount]),
|
|
229
|
-
__param(0, (0, type_graphql_1.Args)()),
|
|
230
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
231
|
-
__metadata("design:type", Function),
|
|
232
|
-
__metadata("design:paramtypes", [typeof (_b = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _b : Object, Object]),
|
|
233
|
-
__metadata("design:returntype", Promise)
|
|
215
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
216
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
217
|
+
tslib_1.__metadata("design:type", Function),
|
|
218
|
+
tslib_1.__metadata("design:paramtypes", [typeof (_b = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _b : Object, Object]),
|
|
219
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
234
220
|
], MovementQuery.prototype, "inboundMovementsCounter", null);
|
|
235
|
-
__decorate([
|
|
221
|
+
tslib_1.__decorate([
|
|
236
222
|
(0, type_graphql_1.Query)(returns => [movement_types_1.MovementCount]),
|
|
237
|
-
__param(0, (0, type_graphql_1.Args)()),
|
|
238
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
239
|
-
__metadata("design:type", Function),
|
|
240
|
-
__metadata("design:paramtypes", [typeof (_c = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _c : Object, Object]),
|
|
241
|
-
__metadata("design:returntype", Promise)
|
|
223
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
224
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
225
|
+
tslib_1.__metadata("design:type", Function),
|
|
226
|
+
tslib_1.__metadata("design:paramtypes", [typeof (_c = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _c : Object, Object]),
|
|
227
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
242
228
|
], MovementQuery.prototype, "outboundMovementsCounter", null);
|
|
243
|
-
__decorate([
|
|
229
|
+
tslib_1.__decorate([
|
|
244
230
|
(0, type_graphql_1.Query)(returns => [movement_types_1.MovementCount]),
|
|
245
|
-
__param(0, (0, type_graphql_1.Arg)('month')),
|
|
246
|
-
__param(1, (0, type_graphql_1.Arg)('year')),
|
|
247
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
248
|
-
__metadata("design:type", Function),
|
|
249
|
-
__metadata("design:paramtypes", [Number, Number, Object]),
|
|
250
|
-
__metadata("design:returntype", Promise)
|
|
231
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('month')),
|
|
232
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('year')),
|
|
233
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
234
|
+
tslib_1.__metadata("design:type", Function),
|
|
235
|
+
tslib_1.__metadata("design:paramtypes", [Number, Number, Object]),
|
|
236
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
251
237
|
], MovementQuery.prototype, "weeklyMovementsCounter", null);
|
|
252
|
-
__decorate([
|
|
238
|
+
tslib_1.__decorate([
|
|
253
239
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
254
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
255
|
-
__metadata("design:type", Function),
|
|
256
|
-
__metadata("design:paramtypes", [movement_1.Movement]),
|
|
257
|
-
__metadata("design:returntype", Promise)
|
|
240
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
241
|
+
tslib_1.__metadata("design:type", Function),
|
|
242
|
+
tslib_1.__metadata("design:paramtypes", [movement_1.Movement]),
|
|
243
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
258
244
|
], MovementQuery.prototype, "domain", null);
|
|
259
|
-
__decorate([
|
|
245
|
+
tslib_1.__decorate([
|
|
260
246
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
261
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
262
|
-
__metadata("design:type", Function),
|
|
263
|
-
__metadata("design:paramtypes", [movement_1.Movement]),
|
|
264
|
-
__metadata("design:returntype", Promise)
|
|
247
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
248
|
+
tslib_1.__metadata("design:type", Function),
|
|
249
|
+
tslib_1.__metadata("design:paramtypes", [movement_1.Movement]),
|
|
250
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
265
251
|
], MovementQuery.prototype, "updater", null);
|
|
266
|
-
__decorate([
|
|
252
|
+
tslib_1.__decorate([
|
|
267
253
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
268
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
269
|
-
__metadata("design:type", Function),
|
|
270
|
-
__metadata("design:paramtypes", [movement_1.Movement]),
|
|
271
|
-
__metadata("design:returntype", Promise)
|
|
254
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
255
|
+
tslib_1.__metadata("design:type", Function),
|
|
256
|
+
tslib_1.__metadata("design:paramtypes", [movement_1.Movement]),
|
|
257
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
272
258
|
], MovementQuery.prototype, "creator", null);
|
|
273
|
-
MovementQuery = __decorate([
|
|
259
|
+
MovementQuery = tslib_1.__decorate([
|
|
274
260
|
(0, type_graphql_1.Resolver)(movement_1.Movement)
|
|
275
261
|
], MovementQuery);
|
|
276
262
|
exports.MovementQuery = MovementQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"movement-query.js","sourceRoot":"","sources":["../../../server/service/movement/movement-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA8F;AAC9F,qCAA2C;AAE3C,yDAAgD;AAChD,uDAAkE;AAClE,iDAA4E;AAE5E,8EAAyE;AACzE,yCAAqC;AACrC,qDAA8D;AAG9D,IAAa,aAAa,GAA1B,MAAa,aAAa;IAGxB,KAAK,CAAC,SAAS,CAAS,MAAiB,EAAS,OAAY;QAC5D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;QACjD,eAAe,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAA,YAAE,EAAC,MAAM,IAAA,kCAAuB,EAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;QAE5G,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,YAAY,iCAC5D,eAAe,KAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,IACpE,CAAA;QACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAID,KAAK,CAAC,QAAQ,CAAc,IAAY,EAAS,OAAY;QAC3D,OAAO,MAAM,IAAA,uB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;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,mBAAQ;;2CAEtC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,mBAAQ;;4CAEvC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,mBAAQ;;4CAEvC;AAnOU,aAAa;IADzB,IAAA,uBAAQ,EAAC,mBAAQ,CAAC;GACN,aAAa,CAoOzB;AApOY,sCAAa;AAsO1B,SAAS,iBAAiB,CAAC,IAAI,EAAE,KAAK;IACpC,OAAO,IAAI;SACR,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;SACnG,MAAM,CACL,CAAC,KAA4C,EAAE,IAAI,EAAE,EAAE;QACrD,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAC3C,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAE7C,OAAO,KAAK,CAAA;IACd,CAAC,EACD,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAC5B,CAAA;AACL,CAAC","sourcesContent":["import { Arg, Args, Ctx, Directive, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository, In } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { getPermittedBizplaceIds } from '@things-factory/biz-base'\nimport { convertListParams, Domain, ListParam } from '@things-factory/shell'\n\nimport { InventoryHistory } from '../inventory-history/inventory-history'\nimport { Movement } from './movement'\nimport { MovementCount, MovementList } from './movement-types'\n\n@Resolver(Movement)\nexport class MovementQuery {\n @Directive('@privilege(category: \"movement\", privilege: \"query\")')\n @Query(returns => MovementList)\n async movements(@Args() params: ListParam, @Ctx() context: any): Promise<MovementList> {\n const convertedParams = convertListParams(params)\n convertedParams.where.bizplace = In(await getPermittedBizplaceIds(context.state.domain, context.state.user))\n\n const [items, total] = await getRepository(Movement).findAndCount({\n ...convertedParams,\n relations: ['domain', 'bizplace', 'inventory', 'creator', 'updater']\n })\n return { items, total }\n }\n\n @Directive('@privilege(category: \"movement\", privilege: \"query\")')\n @Query(returns => Movement)\n async movement(@Arg('name') name: string, @Ctx() context: any): Promise<Movement> {\n return await getRepository(Movement).findOne({\n where: {\n domain: context.state.domain,\n name,\n bizplace: In(await getPermittedBizplaceIds(context.state.domain, context.state.user))\n },\n relations: ['domain', 'bizplace', 'inventory', 'creator', 'updater']\n })\n }\n\n @Query(returns => [MovementCount])\n async inboundMovementsCounter(@Args() params: ListParam, @Ctx() context: any): Promise<MovementCount[]> {\n const { domain, user }: { domain: Domain; user: User } = context.state\n\n let bizplaces = (await getPermittedBizplaceIds(domain, user))\n .map(bizplace => {\n return \"'\" + bizplace.trim() + \"'\"\n })\n .join(',')\n\n let startDate = new Date()\n let endDate = new Date()\n startDate.setDate(startDate.getDate() - 30)\n startDate.setHours(0)\n startDate.setMinutes(0)\n startDate.setSeconds(0)\n const timeNow = `${endDate.getHours()}:${endDate.getMinutes()}:${endDate.getSeconds()}`\n\n const counter = await getRepository(InventoryHistory).query(`\n select inbound_date, count(*) from(\n select date(ih.created_at) inbound_date from inventory_histories ih\n where ih.bizplace_id in (${bizplaces})\n and ih.transaction_type in ('NEW', 'PUTAWAY')\n and created_at between '${startDate.toLocaleDateString()} 00:00:00' and '${endDate.toLocaleDateString()} ${timeNow}'\n and domain_id = '${domain.id}'\n ) as foo\n group by inbound_date\n order by inbound_date asc\n `)\n\n let items = []\n for (let i = 0; i < 30; i++) {\n const month = startDate.toLocaleString('default', { month: 'short' })\n const day = startDate.getDate()\n\n items.push({\n date: `${month} ${day.toString().padStart(2, '0')}`,\n count: '0'\n })\n startDate.setDate(startDate.getDate() + 1)\n }\n\n let compareDate = new Date()\n compareDate.setDate(compareDate.getDate() - 30)\n compareDate.setHours(0)\n compareDate.setMinutes(0)\n compareDate.setSeconds(0)\n\n items = items.map((item: { date: string; count: number }) => {\n item.count =\n counter.find(ctr => ctr.inbound_date.toLocaleDateString() === compareDate.toLocaleDateString())?.count || 0\n\n compareDate.setDate(compareDate.getDate() + 1)\n\n return item\n })\n\n return items\n }\n\n @Query(returns => [MovementCount])\n async outboundMovementsCounter(@Args() params: ListParam, @Ctx() context: any): Promise<MovementCount[]> {\n const { domain, user }: { domain: Domain; user: User } = context.state\n\n let bizplaces = (await getPermittedBizplaceIds(domain, user))\n .map(bizplace => {\n return \"'\" + bizplace.trim() + \"'\"\n })\n .join(',')\n\n let startDate = new Date()\n let endDate = new Date()\n startDate.setDate(startDate.getDate() - 30)\n startDate.setHours(0)\n startDate.setMinutes(0)\n startDate.setSeconds(0)\n const timeNow = `${endDate.getHours()}:${endDate.getMinutes()}:${endDate.getSeconds()}`\n\n const counter = await getRepository(InventoryHistory).query(`\n select outbound_date, count(*) from(\n select date(ih.created_at) outbound_date, row_number() over(partition by ih.pallet_id order by ih.created_at desc) as rn, ih.*, iv.bizplace_id\n from inventory_histories ih\n inner join inventories iv on iv.pallet_id = ih.pallet_id and iv.domain_id = ih.domain_id\n where ih.domain_id='${domain.id}'\n and iv.bizplace_id in (${bizplaces}) and ih.status = 'TERMINATED'\n ) as src \n where rn = 1\n and created_at between '${startDate.toLocaleDateString()} 00:00:00' and '${endDate.toLocaleDateString()} ${timeNow}'\n group by src.outbound_date\n order by src.outbound_date\n `)\n\n let items = []\n for (let i = 0; i < 30; i++) {\n const month = startDate.toLocaleString('default', { month: 'short' })\n const day = startDate.getDate()\n\n items.push({\n date: `${month} ${day.toString().padStart(2, '0')}`,\n count: '0'\n })\n startDate.setDate(startDate.getDate() + 1)\n }\n\n let compareDate = new Date()\n compareDate.setDate(compareDate.getDate() - 30)\n compareDate.setHours(0)\n compareDate.setMinutes(0)\n compareDate.setSeconds(0)\n\n items = items.map((item: { date: string; count: number }) => {\n item.count =\n counter.find(ctr => ctr.outbound_date.toLocaleDateString() === compareDate.toLocaleDateString())?.count || 0\n\n compareDate.setDate(compareDate.getDate() + 1)\n\n return item\n })\n\n return items\n }\n\n @Query(returns => [MovementCount])\n async weeklyMovementsCounter(\n @Arg('month') month: number,\n @Arg('year') year: number,\n @Ctx() context: any\n ): Promise<MovementCount[]> {\n const { domain, user }: { domain: Domain; user: User } = context.state\n\n let bizplaces = (await getPermittedBizplaceIds(domain, user))\n .map(bizplace => {\n return \"'\" + bizplace.trim() + \"'\"\n })\n .join(',')\n\n if (!month && !year) {\n // if user didn't specify the month and year, set default as last month\n var firstOfMonth = new Date()\n var lastOfMonth = new Date()\n\n firstOfMonth.setMonth(firstOfMonth.getMonth() - 1)\n firstOfMonth.setDate(1)\n lastOfMonth.setDate(0)\n } else {\n var firstOfMonth = new Date(year, month - 1, 1)\n var lastOfMonth = new Date(year, month, 0)\n }\n\n // get data from database\n const data = await getRepository(InventoryHistory).query(`\n\t\t\tselect movement_date, sum(outbound_count) as outbound_count, sum(inbound_count) as inbound_count from (\n\t\t\t\tselect movement_date, count(*) as outbound_count, 0 as inbound_count from(\n\t\t\t\t\tselect date(ih.created_at) movement_date, row_number() over(partition by ih.pallet_id order by ih.created_at desc) as rn, ih.*, iv.bizplace_id\n\t\t\t\t\tfrom inventory_histories ih\n\t\t\t\t\tinner join inventories iv on iv.pallet_id = ih.pallet_id and iv.domain_id = ih.domain_id\n\t\t\t\t\twhere ih.domain_id = '${domain.id}'\n\t\t\t\t\tand iv.bizplace_id in (${bizplaces}) and ih.status = 'TERMINATED'\n\t\t\t\t) as src \n\t\t\t\twhere rn = 1\n\t\t\t\tand created_at between '${firstOfMonth.toLocaleDateString()} 00:00:00' and '${lastOfMonth.toLocaleDateString()} 23:59:59'\n\t\t\t\tgroup by movement_date\n\t\t\t\tunion all\n\t\t\t\tselect movement_date, 0 as outbound_count, count(*) as inbound_count from(\n\t\t\t\t\t\tselect date(ih.created_at) movement_date from inventory_histories ih\n\t\t\t\t\t\twhere ih.bizplace_id in (${bizplaces})\n\t\t\t\t\t\tand ih.transaction_type in ('NEW', 'PUTAWAY')\n\t\t\t\t\t\tand created_at between '${firstOfMonth.toLocaleDateString()} 00:00:00' and '${lastOfMonth.toLocaleDateString()} 23:59:59'\n\t\t\t\t\tand domain_id = '${domain.id}'\n\t\t\t\t) as foo\n\t\t\t\tgroup by movement_date\n\t\t\t\torder by movement_date\n\t\t\t) src\n\t\t\tgroup by movement_date\n\t\t`)\n\n let movements = [\n { week: 'Week 01', ...getMovementByWeek(data, [0, 7]) },\n { week: 'Week 02', ...getMovementByWeek(data, [8, 14]) },\n { week: 'Week 03', ...getMovementByWeek(data, [15, 21]) },\n { week: 'Week 04', ...getMovementByWeek(data, [21, 31]) }\n ]\n\n // return total 4 weeks of in/outbound movements for a specific month\n return movements\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() movement: Movement) {\n return await getRepository(Domain).findOne(movement.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() movement: Movement) {\n return await getRepository(User).findOne(movement.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() movement: Movement) {\n return await getRepository(User).findOne(movement.creatorId)\n }\n}\n\nfunction getMovementByWeek(data, range): { inbound: number; outbound: number } {\n return data\n .filter(item => item.movement_date.getDate() > range[0] && item.movement_date.getDate() <= range[1])\n .reduce(\n (inout: { inbound: number; outbound: number }, curr) => {\n inout.inbound += Number(curr.inbound_count)\n inout.outbound += Number(curr.outbound_count)\n\n return inout\n },\n { inbound: 0, outbound: 0 }\n )\n}\n"]}
|
|
@@ -1,116 +1,108 @@
|
|
|
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;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.NewMovement = exports.MovementPatch = exports.MovementList = exports.MovementCount = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
|
15
7
|
const shell_1 = require("@things-factory/shell");
|
|
16
8
|
const movement_1 = require("./movement");
|
|
17
9
|
let MovementCount = class MovementCount {
|
|
18
10
|
};
|
|
19
|
-
__decorate([
|
|
11
|
+
tslib_1.__decorate([
|
|
20
12
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
21
|
-
__metadata("design:type", String)
|
|
13
|
+
tslib_1.__metadata("design:type", String)
|
|
22
14
|
], MovementCount.prototype, "date", void 0);
|
|
23
|
-
__decorate([
|
|
15
|
+
tslib_1.__decorate([
|
|
24
16
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", String)
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
26
18
|
], MovementCount.prototype, "count", void 0);
|
|
27
|
-
__decorate([
|
|
19
|
+
tslib_1.__decorate([
|
|
28
20
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", String)
|
|
21
|
+
tslib_1.__metadata("design:type", String)
|
|
30
22
|
], MovementCount.prototype, "week", void 0);
|
|
31
|
-
__decorate([
|
|
23
|
+
tslib_1.__decorate([
|
|
32
24
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
33
|
-
__metadata("design:type", Number)
|
|
25
|
+
tslib_1.__metadata("design:type", Number)
|
|
34
26
|
], MovementCount.prototype, "inbound", void 0);
|
|
35
|
-
__decorate([
|
|
27
|
+
tslib_1.__decorate([
|
|
36
28
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
37
|
-
__metadata("design:type", Number)
|
|
29
|
+
tslib_1.__metadata("design:type", Number)
|
|
38
30
|
], MovementCount.prototype, "outbound", void 0);
|
|
39
|
-
MovementCount = __decorate([
|
|
31
|
+
MovementCount = tslib_1.__decorate([
|
|
40
32
|
(0, type_graphql_1.ObjectType)()
|
|
41
33
|
], MovementCount);
|
|
42
34
|
exports.MovementCount = MovementCount;
|
|
43
35
|
let MovementList = class MovementList {
|
|
44
36
|
};
|
|
45
|
-
__decorate([
|
|
37
|
+
tslib_1.__decorate([
|
|
46
38
|
(0, type_graphql_1.Field)(type => [movement_1.Movement], { nullable: true }),
|
|
47
|
-
__metadata("design:type", Array)
|
|
39
|
+
tslib_1.__metadata("design:type", Array)
|
|
48
40
|
], MovementList.prototype, "items", void 0);
|
|
49
|
-
__decorate([
|
|
41
|
+
tslib_1.__decorate([
|
|
50
42
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
51
|
-
__metadata("design:type", Number)
|
|
43
|
+
tslib_1.__metadata("design:type", Number)
|
|
52
44
|
], MovementList.prototype, "total", void 0);
|
|
53
|
-
MovementList = __decorate([
|
|
45
|
+
MovementList = tslib_1.__decorate([
|
|
54
46
|
(0, type_graphql_1.ObjectType)()
|
|
55
47
|
], MovementList);
|
|
56
48
|
exports.MovementList = MovementList;
|
|
57
49
|
let MovementPatch = class MovementPatch {
|
|
58
50
|
};
|
|
59
|
-
__decorate([
|
|
51
|
+
tslib_1.__decorate([
|
|
60
52
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
61
|
-
__metadata("design:type", String)
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
62
54
|
], MovementPatch.prototype, "id", void 0);
|
|
63
|
-
__decorate([
|
|
55
|
+
tslib_1.__decorate([
|
|
64
56
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
65
|
-
__metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
|
|
57
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
|
|
66
58
|
], MovementPatch.prototype, "bizplace", void 0);
|
|
67
|
-
__decorate([
|
|
59
|
+
tslib_1.__decorate([
|
|
68
60
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
69
|
-
__metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
|
|
61
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
|
|
70
62
|
], MovementPatch.prototype, "inventory", void 0);
|
|
71
|
-
__decorate([
|
|
63
|
+
tslib_1.__decorate([
|
|
72
64
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
73
|
-
__metadata("design:type", Number)
|
|
65
|
+
tslib_1.__metadata("design:type", Number)
|
|
74
66
|
], MovementPatch.prototype, "inQty", void 0);
|
|
75
|
-
__decorate([
|
|
67
|
+
tslib_1.__decorate([
|
|
76
68
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
77
|
-
__metadata("design:type", Number)
|
|
69
|
+
tslib_1.__metadata("design:type", Number)
|
|
78
70
|
], MovementPatch.prototype, "outQty", void 0);
|
|
79
|
-
__decorate([
|
|
71
|
+
tslib_1.__decorate([
|
|
80
72
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
81
|
-
__metadata("design:type", String)
|
|
73
|
+
tslib_1.__metadata("design:type", String)
|
|
82
74
|
], MovementPatch.prototype, "descrtiption", void 0);
|
|
83
|
-
MovementPatch = __decorate([
|
|
75
|
+
MovementPatch = tslib_1.__decorate([
|
|
84
76
|
(0, type_graphql_1.InputType)()
|
|
85
77
|
], MovementPatch);
|
|
86
78
|
exports.MovementPatch = MovementPatch;
|
|
87
79
|
let NewMovement = class NewMovement {
|
|
88
80
|
};
|
|
89
|
-
__decorate([
|
|
81
|
+
tslib_1.__decorate([
|
|
90
82
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
91
|
-
__metadata("design:type", String)
|
|
83
|
+
tslib_1.__metadata("design:type", String)
|
|
92
84
|
], NewMovement.prototype, "id", void 0);
|
|
93
|
-
__decorate([
|
|
85
|
+
tslib_1.__decorate([
|
|
94
86
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
95
|
-
__metadata("design:type", typeof (_c = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _c : Object)
|
|
87
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _c : Object)
|
|
96
88
|
], NewMovement.prototype, "bizplace", void 0);
|
|
97
|
-
__decorate([
|
|
89
|
+
tslib_1.__decorate([
|
|
98
90
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
99
|
-
__metadata("design:type", typeof (_d = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _d : Object)
|
|
91
|
+
tslib_1.__metadata("design:type", typeof (_d = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _d : Object)
|
|
100
92
|
], NewMovement.prototype, "inventory", void 0);
|
|
101
|
-
__decorate([
|
|
93
|
+
tslib_1.__decorate([
|
|
102
94
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
103
|
-
__metadata("design:type", Number)
|
|
95
|
+
tslib_1.__metadata("design:type", Number)
|
|
104
96
|
], NewMovement.prototype, "inQty", void 0);
|
|
105
|
-
__decorate([
|
|
97
|
+
tslib_1.__decorate([
|
|
106
98
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
107
|
-
__metadata("design:type", Number)
|
|
99
|
+
tslib_1.__metadata("design:type", Number)
|
|
108
100
|
], NewMovement.prototype, "outQty", void 0);
|
|
109
|
-
__decorate([
|
|
101
|
+
tslib_1.__decorate([
|
|
110
102
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
111
|
-
__metadata("design:type", String)
|
|
103
|
+
tslib_1.__metadata("design:type", String)
|
|
112
104
|
], NewMovement.prototype, "description", void 0);
|
|
113
|
-
NewMovement = __decorate([
|
|
105
|
+
NewMovement = tslib_1.__decorate([
|
|
114
106
|
(0, type_graphql_1.InputType)()
|
|
115
107
|
], NewMovement);
|
|
116
108
|
exports.NewMovement = NewMovement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"movement-types.js","sourceRoot":"","sources":["../../../server/service/movement/movement-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"movement-types.js","sourceRoot":"","sources":["../../../server/service/movement/movement-types.ts"],"names":[],"mappings":";;;;;AAAA,+CAAgE;AAEhE,iDAAiD;AAEjD,yCAAqC;AAGrC,IAAa,aAAa,GAA1B,MAAa,aAAa;CAezB,CAAA;AAbC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACZ;AAGd;IADC,IA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;;4CACzB;AAGd;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACxB;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACL;AAjBV,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAkBzB;AAlBY,sCAAa;AAqB1B,IAAa,WAAW,GAAxB,MAAa,WAAW;CAkBvB,CAAA;AAhBC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACf;AAGX;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAClC,iBAAS,oBAAT,iBAAS;6CAAA;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DACjC,iBAAS,oBAAT,iBAAS;8CAAA;AAGrB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;0CACN;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;2CACL;AAGd;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAjBT,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAkBvB;AAlBY,kCAAW","sourcesContent":["import { Field, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { Movement } from './movement'\n\n@ObjectType()\nexport class MovementCount {\n @Field({ nullable: true })\n date?: string\n\n @Field({ nullable: true })\n count?: string\n\n @Field({ nullable: true })\n week?: string\n\n @Field(type => Int, { nullable: true })\n inbound?: number\n\n @Field(type => Int, { nullable: true })\n outbound?: number\n}\n\n@ObjectType()\nexport class MovementList {\n @Field(type => [Movement], { nullable: true })\n items?: Movement[]\n\n @Field(type => Int, { nullable: true })\n total?: number\n}\n\n@InputType()\nexport class MovementPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field(type => ObjectRef, { nullable: true })\n bizplace?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n inventory?: ObjectRef\n\n @Field(type => Int, { nullable: true })\n inQty?: number\n\n @Field(type => Int, { nullable: true })\n outQty?: number\n\n @Field({ nullable: true })\n descrtiption?: string\n}\n\n@InputType()\nexport class NewMovement {\n @Field({ nullable: true })\n id?: string\n\n @Field(type => ObjectRef, { nullable: true })\n bizplace?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n inventory?: ObjectRef\n\n @Field(type => Int)\n inQty: number\n\n @Field(type => Int)\n outQty: number\n\n @Field({ nullable: true })\n description?: string\n}\n"]}
|