@things-factory/routing-base 4.0.22

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE.md +21 -0
  3. package/client/actions/main.js +1 -0
  4. package/client/bootstrap.js +8 -0
  5. package/client/index.js +1 -0
  6. package/client/reducers/main.js +17 -0
  7. package/client/themes/app-theme.css +59 -0
  8. package/config/config.development.js +1 -0
  9. package/config/config.production.js +1 -0
  10. package/dist-server/controllers/index.js +1 -0
  11. package/dist-server/controllers/index.js.map +1 -0
  12. package/dist-server/index.js +17 -0
  13. package/dist-server/index.js.map +1 -0
  14. package/dist-server/middlewares/index.js +8 -0
  15. package/dist-server/middlewares/index.js.map +1 -0
  16. package/dist-server/migrations/index.js +12 -0
  17. package/dist-server/migrations/index.js.map +1 -0
  18. package/dist-server/routes.js +25 -0
  19. package/dist-server/routes.js.map +1 -0
  20. package/dist-server/service/index.js +30 -0
  21. package/dist-server/service/index.js.map +1 -0
  22. package/dist-server/service/operation/index.js +9 -0
  23. package/dist-server/service/operation/index.js.map +1 -0
  24. package/dist-server/service/operation/operation-mutation.js +120 -0
  25. package/dist-server/service/operation/operation-mutation.js.map +1 -0
  26. package/dist-server/service/operation/operation-query.js +87 -0
  27. package/dist-server/service/operation/operation-query.js.map +1 -0
  28. package/dist-server/service/operation/operation-type.js +97 -0
  29. package/dist-server/service/operation/operation-type.js.map +1 -0
  30. package/dist-server/service/operation/operation.js +127 -0
  31. package/dist-server/service/operation/operation.js.map +1 -0
  32. package/dist-server/service/routing/index.js +9 -0
  33. package/dist-server/service/routing/index.js.map +1 -0
  34. package/dist-server/service/routing/routing-mutation.js +120 -0
  35. package/dist-server/service/routing/routing-mutation.js.map +1 -0
  36. package/dist-server/service/routing/routing-query.js +232 -0
  37. package/dist-server/service/routing/routing-query.js.map +1 -0
  38. package/dist-server/service/routing/routing-type.js +81 -0
  39. package/dist-server/service/routing/routing-type.js.map +1 -0
  40. package/dist-server/service/routing/routing.js +107 -0
  41. package/dist-server/service/routing/routing.js.map +1 -0
  42. package/dist-server/service/routing-item/index.js +9 -0
  43. package/dist-server/service/routing-item/index.js.map +1 -0
  44. package/dist-server/service/routing-item/routing-item-mutation.js +120 -0
  45. package/dist-server/service/routing-item/routing-item-mutation.js.map +1 -0
  46. package/dist-server/service/routing-item/routing-item-query.js +88 -0
  47. package/dist-server/service/routing-item/routing-item-query.js.map +1 -0
  48. package/dist-server/service/routing-item/routing-item-type.js +107 -0
  49. package/dist-server/service/routing-item/routing-item-type.js.map +1 -0
  50. package/dist-server/service/routing-item/routing-item.js +136 -0
  51. package/dist-server/service/routing-item/routing-item.js.map +1 -0
  52. package/package.json +30 -0
  53. package/server/controllers/index.ts +0 -0
  54. package/server/index.ts +5 -0
  55. package/server/middlewares/index.ts +3 -0
  56. package/server/migrations/index.ts +9 -0
  57. package/server/routes.ts +28 -0
  58. package/server/service/index.ts +28 -0
  59. package/server/service/operation/index.ts +6 -0
  60. package/server/service/operation/operation-mutation.ts +109 -0
  61. package/server/service/operation/operation-query.ts +43 -0
  62. package/server/service/operation/operation-type.ts +66 -0
  63. package/server/service/operation/operation.ts +111 -0
  64. package/server/service/routing/index.ts +6 -0
  65. package/server/service/routing/routing-mutation.ts +112 -0
  66. package/server/service/routing/routing-query.ts +211 -0
  67. package/server/service/routing/routing-type.ts +48 -0
  68. package/server/service/routing/routing.ts +88 -0
  69. package/server/service/routing-item/index.ts +6 -0
  70. package/server/service/routing-item/routing-item-mutation.ts +119 -0
  71. package/server/service/routing-item/routing-item-query.ts +61 -0
  72. package/server/service/routing-item/routing-item-type.ts +67 -0
  73. package/server/service/routing-item/routing-item.ts +118 -0
  74. package/things-factory.config.js +5 -0
  75. package/translations/en.json +1 -0
  76. package/translations/ko.json +1 -0
  77. package/translations/ms.json +1 -0
  78. package/translations/zh.json +1 -0
  79. package/tsconfig.json +9 -0
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var _a, _b, _c;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.Operation = exports.OperationStatus = void 0;
14
+ const type_graphql_1 = require("type-graphql");
15
+ const typeorm_1 = require("typeorm");
16
+ const auth_base_1 = require("@things-factory/auth-base");
17
+ const shell_1 = require("@things-factory/shell");
18
+ var OperationStatus;
19
+ (function (OperationStatus) {
20
+ OperationStatus["STATUS_A"] = "STATUS_A";
21
+ OperationStatus["STATUS_B"] = "STATUS_B";
22
+ OperationStatus["ASSY"] = "Assembly";
23
+ OperationStatus["INV"] = "Inventory";
24
+ OperationStatus["PACK"] = "Packing";
25
+ OperationStatus["SMT"] = "SMT";
26
+ OperationStatus["STD"] = "Standard";
27
+ OperationStatus["TEST"] = "Test";
28
+ })(OperationStatus = exports.OperationStatus || (exports.OperationStatus = {}));
29
+ (0, type_graphql_1.registerEnumType)(OperationStatus, {
30
+ name: 'OperationStatus',
31
+ description: 'state enumeration of a operation'
32
+ });
33
+ let Operation = class Operation {
34
+ };
35
+ __decorate([
36
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
37
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: false }),
38
+ __metadata("design:type", String)
39
+ ], Operation.prototype, "id", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
42
+ (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: false }),
43
+ __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
44
+ ], Operation.prototype, "domain", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.RelationId)((operation) => operation.domain),
47
+ __metadata("design:type", String)
48
+ ], Operation.prototype, "domainId", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)(),
51
+ (0, type_graphql_1.Field)({ nullable: false }),
52
+ __metadata("design:type", String)
53
+ ], Operation.prototype, "name", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({
56
+ nullable: true
57
+ }),
58
+ (0, type_graphql_1.Field)({ nullable: true }),
59
+ __metadata("design:type", String)
60
+ ], Operation.prototype, "description", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({
63
+ nullable: true
64
+ }),
65
+ (0, type_graphql_1.Field)({ nullable: true }),
66
+ __metadata("design:type", String)
67
+ ], Operation.prototype, "type", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({
70
+ nullable: true
71
+ }),
72
+ (0, type_graphql_1.Field)({ nullable: true }),
73
+ __metadata("design:type", String)
74
+ ], Operation.prototype, "operationStdChart", void 0);
75
+ __decorate([
76
+ (0, typeorm_1.Column)({
77
+ nullable: true
78
+ }),
79
+ (0, type_graphql_1.Field)({ nullable: true }),
80
+ __metadata("design:type", String)
81
+ ], Operation.prototype, "operationStdTime", void 0);
82
+ __decorate([
83
+ (0, typeorm_1.Column)({
84
+ nullable: true
85
+ }),
86
+ (0, type_graphql_1.Field)({ nullable: true }),
87
+ __metadata("design:type", Boolean)
88
+ ], Operation.prototype, "active", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
91
+ nullable: true
92
+ }),
93
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
94
+ __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
95
+ ], Operation.prototype, "creator", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.RelationId)((operation) => operation.creator),
98
+ __metadata("design:type", String)
99
+ ], Operation.prototype, "creatorId", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
102
+ nullable: true
103
+ }),
104
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
105
+ __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
106
+ ], Operation.prototype, "updater", void 0);
107
+ __decorate([
108
+ (0, typeorm_1.RelationId)((operation) => operation.creator),
109
+ __metadata("design:type", String)
110
+ ], Operation.prototype, "updaterId", void 0);
111
+ __decorate([
112
+ (0, typeorm_1.CreateDateColumn)(),
113
+ (0, type_graphql_1.Field)({ nullable: true }),
114
+ __metadata("design:type", Date)
115
+ ], Operation.prototype, "createdAt", void 0);
116
+ __decorate([
117
+ (0, typeorm_1.UpdateDateColumn)(),
118
+ (0, type_graphql_1.Field)({ nullable: true }),
119
+ __metadata("design:type", Date)
120
+ ], Operation.prototype, "updatedAt", void 0);
121
+ Operation = __decorate([
122
+ (0, typeorm_1.Entity)(),
123
+ (0, typeorm_1.Index)('ix_operation_0', (operation) => [operation.domain, operation.name], { unique: true }),
124
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for Operation' })
125
+ ], Operation);
126
+ exports.Operation = Operation;
127
+ //# sourceMappingURL=operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../server/service/operation/operation.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAKqB;AACrB,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,IAAY,eASX;AATD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,m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AA,eAAK,EAAC,gBAAgB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;GACvC,SAAS,CAuErB;AAvEY,8BAAS"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const routing_1 = require("./routing");
5
+ const routing_query_1 = require("./routing-query");
6
+ const routing_mutation_1 = require("./routing-mutation");
7
+ exports.entities = [routing_1.Routing];
8
+ exports.resolvers = [routing_query_1.RoutingQuery, routing_mutation_1.RoutingMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/routing/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,mDAA8C;AAC9C,yDAAoD;AAEvC,QAAA,QAAQ,GAAG,CAAC,iBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.RoutingMutation = void 0;
16
+ const type_graphql_1 = require("type-graphql");
17
+ const typeorm_1 = require("typeorm");
18
+ const routing_1 = require("./routing");
19
+ const routing_type_1 = require("./routing-type");
20
+ let RoutingMutation = class RoutingMutation {
21
+ async createRouting(routing, context) {
22
+ const { domain, user, tx } = context.state;
23
+ return await tx.getRepository(routing_1.Routing).save(Object.assign(Object.assign({}, routing), { domain, creator: user, updater: user }));
24
+ }
25
+ async updateRouting(id, patch, context) {
26
+ const { domain, user, tx } = context.state;
27
+ const repository = tx.getRepository(routing_1.Routing);
28
+ const routing = await repository.findOne({
29
+ where: { domain, id }
30
+ });
31
+ return await repository.save(Object.assign(Object.assign(Object.assign({}, routing), patch), { updater: user }));
32
+ }
33
+ async updateMultipleRouting(patches, context) {
34
+ const { domain, user, tx } = context.state;
35
+ let results = [];
36
+ const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
37
+ const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
38
+ const routingRepo = tx.getRepository(routing_1.Routing);
39
+ if (_createRecords.length > 0) {
40
+ for (let i = 0; i < _createRecords.length; i++) {
41
+ const newRecord = _createRecords[i];
42
+ const result = await routingRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
43
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
44
+ }
45
+ }
46
+ if (_updateRecords.length > 0) {
47
+ for (let i = 0; i < _updateRecords.length; i++) {
48
+ const newRecord = _updateRecords[i];
49
+ const routing = await routingRepo.findOne(newRecord.id);
50
+ const result = await routingRepo.save(Object.assign(Object.assign(Object.assign({}, routing), newRecord), { updater: user }));
51
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
52
+ }
53
+ }
54
+ return results;
55
+ }
56
+ async deleteRouting(id, context) {
57
+ const { domain, tx } = context.state;
58
+ await tx.getRepository(routing_1.Routing).delete({ domain, id });
59
+ return true;
60
+ }
61
+ async deleteRoutings(ids, context) {
62
+ const { domain, tx } = context.state;
63
+ await tx.getRepository(routing_1.Routing).delete({
64
+ domain,
65
+ id: (0, typeorm_1.In)(ids)
66
+ });
67
+ return true;
68
+ }
69
+ };
70
+ __decorate([
71
+ (0, type_graphql_1.Directive)('@transaction'),
72
+ (0, type_graphql_1.Mutation)(returns => routing_1.Routing, { description: 'To create new Routing' }),
73
+ __param(0, (0, type_graphql_1.Arg)('routing')),
74
+ __param(1, (0, type_graphql_1.Ctx)()),
75
+ __metadata("design:type", Function),
76
+ __metadata("design:paramtypes", [routing_type_1.NewRouting, Object]),
77
+ __metadata("design:returntype", Promise)
78
+ ], RoutingMutation.prototype, "createRouting", null);
79
+ __decorate([
80
+ (0, type_graphql_1.Directive)('@transaction'),
81
+ (0, type_graphql_1.Mutation)(returns => routing_1.Routing, { description: 'To modify Routing information' }),
82
+ __param(0, (0, type_graphql_1.Arg)('id')),
83
+ __param(1, (0, type_graphql_1.Arg)('patch')),
84
+ __param(2, (0, type_graphql_1.Ctx)()),
85
+ __metadata("design:type", Function),
86
+ __metadata("design:paramtypes", [String, routing_type_1.RoutingPatch, Object]),
87
+ __metadata("design:returntype", Promise)
88
+ ], RoutingMutation.prototype, "updateRouting", null);
89
+ __decorate([
90
+ (0, type_graphql_1.Directive)('@transaction'),
91
+ (0, type_graphql_1.Mutation)(returns => [routing_1.Routing], { description: "To modify multiple Routings' information" }),
92
+ __param(0, (0, type_graphql_1.Arg)('patches', type => [routing_type_1.RoutingPatch])),
93
+ __param(1, (0, type_graphql_1.Ctx)()),
94
+ __metadata("design:type", Function),
95
+ __metadata("design:paramtypes", [Array, Object]),
96
+ __metadata("design:returntype", Promise)
97
+ ], RoutingMutation.prototype, "updateMultipleRouting", null);
98
+ __decorate([
99
+ (0, type_graphql_1.Directive)('@transaction'),
100
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Routing' }),
101
+ __param(0, (0, type_graphql_1.Arg)('id')),
102
+ __param(1, (0, type_graphql_1.Ctx)()),
103
+ __metadata("design:type", Function),
104
+ __metadata("design:paramtypes", [String, Object]),
105
+ __metadata("design:returntype", Promise)
106
+ ], RoutingMutation.prototype, "deleteRouting", null);
107
+ __decorate([
108
+ (0, type_graphql_1.Directive)('@transaction'),
109
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple routings' }),
110
+ __param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
111
+ __param(1, (0, type_graphql_1.Ctx)()),
112
+ __metadata("design:type", Function),
113
+ __metadata("design:paramtypes", [Array, Object]),
114
+ __metadata("design:returntype", Promise)
115
+ ], RoutingMutation.prototype, "deleteRoutings", null);
116
+ RoutingMutation = __decorate([
117
+ (0, type_graphql_1.Resolver)(routing_1.Routing)
118
+ ], RoutingMutation);
119
+ exports.RoutingMutation = RoutingMutation;
120
+ //# sourceMappingURL=routing-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing-mutation.js","sourceRoot":"","sources":["../../../server/service/routing/routing-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA2C;AAC3C,uCAAmC;AACnC,iDAAyD;AAGzD,IAAa,eAAe,GAA5B,MAAa,eAAe;IAG1B,KAAK,CAAC,aAAa,CAAiB,OAAmB,EAAS,OAAY;QAC1E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,iBAAO,CAAC,CAAC,IAAI,iCACtC,OAAO,KACV,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,aAAa,CACN,EAAU,EACP,KAAmB,EAC1B,OAAY;QAEnB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K,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;qDAUP;AAxGU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,iBAAO,CAAC;GACL,eAAe,CAyG3B;AAzGY,0CAAe"}
@@ -0,0 +1,232 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var _a;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.lastOperation = exports.prevOperation = exports.nextOperation = exports.firstOperation = exports.RoutingQuery = void 0;
17
+ const type_graphql_1 = require("type-graphql");
18
+ const typeorm_1 = require("typeorm");
19
+ const auth_base_1 = require("@things-factory/auth-base");
20
+ const shell_1 = require("@things-factory/shell");
21
+ const operation_1 = require("../operation/operation");
22
+ const routing_1 = require("./routing");
23
+ const routing_type_1 = require("./routing-type");
24
+ let RoutingQuery = class RoutingQuery {
25
+ async routing(id, context) {
26
+ const { domain } = context.state;
27
+ return await (0, typeorm_1.getRepository)(routing_1.Routing).findOne({
28
+ where: { domain, name }
29
+ });
30
+ }
31
+ async routings(params, context) {
32
+ const { domain } = context.state;
33
+ const convertedParams = (0, shell_1.convertListParams)(params, domain.id);
34
+ const [items, total] = await (0, typeorm_1.getRepository)(routing_1.Routing).findAndCount(convertedParams);
35
+ return { items, total };
36
+ }
37
+ async domain(routing) {
38
+ return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(routing.domainId);
39
+ }
40
+ async updater(routing) {
41
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(routing.updaterId);
42
+ }
43
+ async creator(routing) {
44
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(routing.creatorId);
45
+ }
46
+ };
47
+ __decorate([
48
+ (0, type_graphql_1.Query)(returns => routing_1.Routing, { description: 'To fetch a Routing' }),
49
+ __param(0, (0, type_graphql_1.Arg)('id')),
50
+ __param(1, (0, type_graphql_1.Ctx)()),
51
+ __metadata("design:type", Function),
52
+ __metadata("design:paramtypes", [String, Object]),
53
+ __metadata("design:returntype", Promise)
54
+ ], RoutingQuery.prototype, "routing", null);
55
+ __decorate([
56
+ (0, type_graphql_1.Query)(returns => routing_type_1.RoutingList, { description: 'To fetch multiple Routings' }),
57
+ __param(0, (0, type_graphql_1.Args)()),
58
+ __param(1, (0, type_graphql_1.Ctx)()),
59
+ __metadata("design:type", Function),
60
+ __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
61
+ __metadata("design:returntype", Promise)
62
+ ], RoutingQuery.prototype, "routings", null);
63
+ __decorate([
64
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
65
+ __param(0, (0, type_graphql_1.Root)()),
66
+ __metadata("design:type", Function),
67
+ __metadata("design:paramtypes", [routing_1.Routing]),
68
+ __metadata("design:returntype", Promise)
69
+ ], RoutingQuery.prototype, "domain", null);
70
+ __decorate([
71
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
72
+ __param(0, (0, type_graphql_1.Root)()),
73
+ __metadata("design:type", Function),
74
+ __metadata("design:paramtypes", [routing_1.Routing]),
75
+ __metadata("design:returntype", Promise)
76
+ ], RoutingQuery.prototype, "updater", null);
77
+ __decorate([
78
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
79
+ __param(0, (0, type_graphql_1.Root)()),
80
+ __metadata("design:type", Function),
81
+ __metadata("design:paramtypes", [routing_1.Routing]),
82
+ __metadata("design:returntype", Promise)
83
+ ], RoutingQuery.prototype, "creator", null);
84
+ RoutingQuery = __decorate([
85
+ (0, type_graphql_1.Resolver)(routing_1.Routing)
86
+ ], RoutingQuery);
87
+ exports.RoutingQuery = RoutingQuery;
88
+ async function firstOperation(routingId, context) {
89
+ const operation = await (0, typeorm_1.getRepository)(operation_1.Operation).query(`
90
+ select
91
+ *
92
+ from
93
+ operations
94
+ where
95
+ id =
96
+ (
97
+ select
98
+ operation_id
99
+ from
100
+ routing_items
101
+ where
102
+ routing_id = '${routingId}'
103
+ and
104
+ rank =
105
+ (
106
+ select
107
+ min(rank)
108
+ from
109
+ routing_items
110
+ where
111
+ routing_id = '${routingId}'
112
+ )
113
+ )
114
+ `);
115
+ return operation;
116
+ }
117
+ exports.firstOperation = firstOperation;
118
+ async function nextOperation(operationId, routingId, context) {
119
+ const operation = await (0, typeorm_1.getRepository)(operation_1.Operation).query(`
120
+ select
121
+ *
122
+ from
123
+ operations
124
+ where
125
+ id =
126
+ (
127
+ select
128
+ operation_id
129
+ from
130
+ routing_items
131
+ where
132
+ routing_id = '${routingId}'
133
+ and
134
+ rank =
135
+ (
136
+ select
137
+ min(rank)
138
+ from
139
+ routing_items
140
+ where
141
+ routing_id = '${routingId}'
142
+ and
143
+ rank >
144
+ (
145
+ select
146
+ rank
147
+ from
148
+ routing_items
149
+ where
150
+ routing_id = '${routingId}'
151
+ and
152
+ operation_id = '${operationId}'
153
+ )
154
+ )
155
+ )
156
+ `);
157
+ return operation;
158
+ }
159
+ exports.nextOperation = nextOperation;
160
+ async function prevOperation(operationId, routingId, context) {
161
+ const operation = await (0, typeorm_1.getRepository)(operation_1.Operation).query(`
162
+ select
163
+ *
164
+ from
165
+ operations
166
+ where
167
+ id =
168
+ (
169
+ select
170
+ operation_id
171
+ from
172
+ routing_items
173
+ where
174
+ routing_id = '${routingId}'
175
+ and
176
+ rank =
177
+ (
178
+ select
179
+ max(rank)
180
+ from
181
+ routing_items
182
+ where
183
+ routing_id = '${routingId}'
184
+ and
185
+ rank <
186
+ (
187
+ select
188
+ rank
189
+ from
190
+ routing_items
191
+ where
192
+ routing_id = '${routingId}'
193
+ and
194
+ operation_id = '${operationId}'
195
+ )
196
+ )
197
+ )
198
+ `);
199
+ return operation;
200
+ }
201
+ exports.prevOperation = prevOperation;
202
+ async function lastOperation(routingId, context) {
203
+ const operation = await (0, typeorm_1.getRepository)(operation_1.Operation).query(`
204
+ select
205
+ *
206
+ from
207
+ operations
208
+ where
209
+ id =
210
+ (
211
+ select
212
+ operation_id
213
+ from
214
+ routing_items
215
+ where
216
+ routing_id = '${routingId}'
217
+ and
218
+ rank =
219
+ (
220
+ select
221
+ max(rank)
222
+ from
223
+ routing_items
224
+ where
225
+ routing_id = '${routingId}'
226
+ )
227
+ )
228
+ `);
229
+ return operation;
230
+ }
231
+ exports.lastOperation = lastOperation;
232
+ //# sourceMappingURL=routing-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing-query.js","sourceRoot":"","sources":["../../../server/service/routing/routing-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAQqB;AACrB,qCAAuC;AAEvC,yDAAgD;AAChD,iDAI8B;AAE9B,sDAAkD;AAClD,uCAAmC;AACnC,iDAA4C;AAG5C,IAAa,YAAY,GAAzB,MAAa,YAAY;IAEvB,KAAK,CAAC,OAAO,CAAY,EAAU,EAAS,OAAY;QACtD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,iBAAO,CAAC,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SACxB,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pD;;;;;;;;;;;;;gCAa4B,SAAS;;;;;;;;;sCASH,SAAS;;;;;;;;;4CASH,SAAS;;8CAEP,WAAW;;;;OAIlD,CACJ,CAAA;IAED,OAAO,SAAS,CAAA;AAClB,CAAC;AA3CD,sCA2CC;AAEM,KAAK,UAAU,aAAa,CAAC,SAAiB,EAAE,OAAY;IACjE,MAAM,SAAS,GAAG,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,KAAK,CACpD;;;;;;;;;;;;;gCAa4B,SAAS;;;;;;;;;sCASH,SAAS;;;OAGxC,CACJ,CAAA;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AA9BD,sCA8BC"}
@@ -0,0 +1,81 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RoutingList = exports.RoutingPatch = exports.NewRouting = void 0;
13
+ const type_graphql_1 = require("type-graphql");
14
+ const routing_1 = require("./routing");
15
+ let NewRouting = class NewRouting {
16
+ };
17
+ __decorate([
18
+ (0, type_graphql_1.Field)({ nullable: false }),
19
+ __metadata("design:type", String)
20
+ ], NewRouting.prototype, "name", void 0);
21
+ __decorate([
22
+ (0, type_graphql_1.Field)({ nullable: true }),
23
+ __metadata("design:type", String)
24
+ ], NewRouting.prototype, "description", void 0);
25
+ __decorate([
26
+ (0, type_graphql_1.Field)({ nullable: true }),
27
+ __metadata("design:type", Boolean)
28
+ ], NewRouting.prototype, "createdLot", void 0);
29
+ __decorate([
30
+ (0, type_graphql_1.Field)({ nullable: true }),
31
+ __metadata("design:type", Boolean)
32
+ ], NewRouting.prototype, "active", void 0);
33
+ NewRouting = __decorate([
34
+ (0, type_graphql_1.InputType)()
35
+ ], NewRouting);
36
+ exports.NewRouting = NewRouting;
37
+ let RoutingPatch = class RoutingPatch {
38
+ };
39
+ __decorate([
40
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
41
+ __metadata("design:type", String)
42
+ ], RoutingPatch.prototype, "id", void 0);
43
+ __decorate([
44
+ (0, type_graphql_1.Field)({ nullable: true }),
45
+ __metadata("design:type", String)
46
+ ], RoutingPatch.prototype, "name", void 0);
47
+ __decorate([
48
+ (0, type_graphql_1.Field)({ nullable: true }),
49
+ __metadata("design:type", String)
50
+ ], RoutingPatch.prototype, "description", void 0);
51
+ __decorate([
52
+ (0, type_graphql_1.Field)({ nullable: true }),
53
+ __metadata("design:type", Boolean)
54
+ ], RoutingPatch.prototype, "createdLot", void 0);
55
+ __decorate([
56
+ (0, type_graphql_1.Field)({ nullable: true }),
57
+ __metadata("design:type", Boolean)
58
+ ], RoutingPatch.prototype, "active", void 0);
59
+ __decorate([
60
+ (0, type_graphql_1.Field)(),
61
+ __metadata("design:type", String)
62
+ ], RoutingPatch.prototype, "cuFlag", void 0);
63
+ RoutingPatch = __decorate([
64
+ (0, type_graphql_1.InputType)()
65
+ ], RoutingPatch);
66
+ exports.RoutingPatch = RoutingPatch;
67
+ let RoutingList = class RoutingList {
68
+ };
69
+ __decorate([
70
+ (0, type_graphql_1.Field)(type => [routing_1.Routing]),
71
+ __metadata("design:type", Array)
72
+ ], RoutingList.prototype, "items", void 0);
73
+ __decorate([
74
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
75
+ __metadata("design:type", Number)
76
+ ], RoutingList.prototype, "total", void 0);
77
+ RoutingList = __decorate([
78
+ (0, type_graphql_1.ObjectType)()
79
+ ], RoutingList);
80
+ exports.RoutingList = RoutingList;
81
+ //# sourceMappingURL=routing-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing-type.js","sourceRoot":"","sources":["../../../server/service/routing/routing-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAsF;AAEtF,uCAAmC;AAGnC,IAAa,UAAU,GAAvB,MAAa,UAAU;CAYtB,CAAA;AAVC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;wCACf;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACV;AAXL,UAAU;IADtB,IAAA,wBAAS,GAAE;GACC,UAAU,CAYtB;AAZY,gCAAU;AAevB,IAAa,YAAY,GAAzB,MAAa,YAAY;CAkBxB,CAAA;AAhBC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAC5B;AAGV;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACd;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACV;AAGhB;IADC,IAAA,oBAAK,GAAE;;4CACM;AAjBH,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAA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