@things-factory/routing-base 5.0.2 → 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/controllers/index.js.map +1 -1
- package/dist-server/index.js +4 -17
- 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/routes.js +0 -1
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/index.js +13 -26
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/operation/index.js +3 -16
- package/dist-server/service/operation/index.js.map +1 -1
- package/dist-server/service/operation/operation-mutation.js +33 -44
- package/dist-server/service/operation/operation-mutation.js.map +1 -1
- package/dist-server/service/operation/operation-query.js +34 -45
- package/dist-server/service/operation/operation-query.js.map +1 -1
- package/dist-server/service/operation/operation-type.js +41 -52
- package/dist-server/service/operation/operation-type.js.map +1 -1
- package/dist-server/service/operation/operation.js +34 -42
- package/dist-server/service/operation/operation.js.map +1 -1
- package/dist-server/service/routing/index.js +3 -16
- package/dist-server/service/routing/index.js.map +1 -1
- package/dist-server/service/routing/routing-mutation.js +33 -44
- package/dist-server/service/routing/routing-mutation.js.map +1 -1
- package/dist-server/service/routing/routing-query.js +29 -40
- package/dist-server/service/routing/routing-query.js.map +1 -1
- package/dist-server/service/routing/routing-type.js +28 -36
- package/dist-server/service/routing/routing-type.js.map +1 -1
- package/dist-server/service/routing/routing.js +28 -36
- package/dist-server/service/routing/routing.js.map +1 -1
- package/dist-server/service/routing-item/index.js +3 -16
- package/dist-server/service/routing-item/index.js.map +1 -1
- package/dist-server/service/routing-item/routing-item-mutation.js +33 -44
- package/dist-server/service/routing-item/routing-item-mutation.js.map +1 -1
- package/dist-server/service/routing-item/routing-item-query.js +34 -45
- package/dist-server/service/routing-item/routing-item-query.js.map +1 -1
- package/dist-server/service/routing-item/routing-item-type.js +40 -48
- package/dist-server/service/routing-item/routing-item-type.js.map +1 -1
- package/dist-server/service/routing-item/routing-item.js +38 -46
- package/dist-server/service/routing-item/routing-item.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +5 -5
- package/server/routes.ts +0 -2
- package/server/service/routing-item/routing-item-query.ts +3 -3
|
@@ -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;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.Operation = exports.OperationStatus = 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");
|
|
@@ -32,97 +24,97 @@ var OperationStatus;
|
|
|
32
24
|
});
|
|
33
25
|
let Operation = class Operation {
|
|
34
26
|
};
|
|
35
|
-
__decorate([
|
|
27
|
+
tslib_1.__decorate([
|
|
36
28
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
37
29
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: false }),
|
|
38
|
-
__metadata("design:type", String)
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
39
31
|
], Operation.prototype, "id", void 0);
|
|
40
|
-
__decorate([
|
|
32
|
+
tslib_1.__decorate([
|
|
41
33
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
42
34
|
(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)
|
|
35
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
44
36
|
], Operation.prototype, "domain", void 0);
|
|
45
|
-
__decorate([
|
|
37
|
+
tslib_1.__decorate([
|
|
46
38
|
(0, typeorm_1.RelationId)((operation) => operation.domain),
|
|
47
|
-
__metadata("design:type", String)
|
|
39
|
+
tslib_1.__metadata("design:type", String)
|
|
48
40
|
], Operation.prototype, "domainId", void 0);
|
|
49
|
-
__decorate([
|
|
41
|
+
tslib_1.__decorate([
|
|
50
42
|
(0, typeorm_1.Column)(),
|
|
51
43
|
(0, type_graphql_1.Field)({ nullable: false }),
|
|
52
|
-
__metadata("design:type", String)
|
|
44
|
+
tslib_1.__metadata("design:type", String)
|
|
53
45
|
], Operation.prototype, "name", void 0);
|
|
54
|
-
__decorate([
|
|
46
|
+
tslib_1.__decorate([
|
|
55
47
|
(0, typeorm_1.Column)({
|
|
56
48
|
nullable: true
|
|
57
49
|
}),
|
|
58
50
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
-
__metadata("design:type", String)
|
|
51
|
+
tslib_1.__metadata("design:type", String)
|
|
60
52
|
], Operation.prototype, "description", void 0);
|
|
61
|
-
__decorate([
|
|
53
|
+
tslib_1.__decorate([
|
|
62
54
|
(0, typeorm_1.Column)({
|
|
63
55
|
nullable: true
|
|
64
56
|
}),
|
|
65
57
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
66
|
-
__metadata("design:type", String)
|
|
58
|
+
tslib_1.__metadata("design:type", String)
|
|
67
59
|
], Operation.prototype, "type", void 0);
|
|
68
|
-
__decorate([
|
|
60
|
+
tslib_1.__decorate([
|
|
69
61
|
(0, typeorm_1.Column)({
|
|
70
62
|
nullable: true
|
|
71
63
|
}),
|
|
72
64
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
-
__metadata("design:type", String)
|
|
65
|
+
tslib_1.__metadata("design:type", String)
|
|
74
66
|
], Operation.prototype, "operationStdChart", void 0);
|
|
75
|
-
__decorate([
|
|
67
|
+
tslib_1.__decorate([
|
|
76
68
|
(0, typeorm_1.Column)({
|
|
77
69
|
nullable: true
|
|
78
70
|
}),
|
|
79
71
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
80
|
-
__metadata("design:type", String)
|
|
72
|
+
tslib_1.__metadata("design:type", String)
|
|
81
73
|
], Operation.prototype, "operationStdTime", void 0);
|
|
82
|
-
__decorate([
|
|
74
|
+
tslib_1.__decorate([
|
|
83
75
|
(0, typeorm_1.Column)({
|
|
84
76
|
nullable: true
|
|
85
77
|
}),
|
|
86
78
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
87
|
-
__metadata("design:type", Boolean)
|
|
79
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
88
80
|
], Operation.prototype, "active", void 0);
|
|
89
|
-
__decorate([
|
|
81
|
+
tslib_1.__decorate([
|
|
90
82
|
(0, type_graphql_1.Field)(type => String, { nullable: true }),
|
|
91
|
-
__metadata("design:type", String)
|
|
83
|
+
tslib_1.__metadata("design:type", String)
|
|
92
84
|
], Operation.prototype, "thumbnail", void 0);
|
|
93
|
-
__decorate([
|
|
85
|
+
tslib_1.__decorate([
|
|
94
86
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
95
87
|
nullable: true
|
|
96
88
|
}),
|
|
97
89
|
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
98
|
-
__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
90
|
+
tslib_1.__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
99
91
|
], Operation.prototype, "creator", void 0);
|
|
100
|
-
__decorate([
|
|
92
|
+
tslib_1.__decorate([
|
|
101
93
|
(0, typeorm_1.RelationId)((operation) => operation.creator),
|
|
102
|
-
__metadata("design:type", String)
|
|
94
|
+
tslib_1.__metadata("design:type", String)
|
|
103
95
|
], Operation.prototype, "creatorId", void 0);
|
|
104
|
-
__decorate([
|
|
96
|
+
tslib_1.__decorate([
|
|
105
97
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
106
98
|
nullable: true
|
|
107
99
|
}),
|
|
108
100
|
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
109
|
-
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
101
|
+
tslib_1.__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
110
102
|
], Operation.prototype, "updater", void 0);
|
|
111
|
-
__decorate([
|
|
103
|
+
tslib_1.__decorate([
|
|
112
104
|
(0, typeorm_1.RelationId)((operation) => operation.creator),
|
|
113
|
-
__metadata("design:type", String)
|
|
105
|
+
tslib_1.__metadata("design:type", String)
|
|
114
106
|
], Operation.prototype, "updaterId", void 0);
|
|
115
|
-
__decorate([
|
|
107
|
+
tslib_1.__decorate([
|
|
116
108
|
(0, typeorm_1.CreateDateColumn)(),
|
|
117
109
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
118
|
-
__metadata("design:type", Date)
|
|
110
|
+
tslib_1.__metadata("design:type", Date)
|
|
119
111
|
], Operation.prototype, "createdAt", void 0);
|
|
120
|
-
__decorate([
|
|
112
|
+
tslib_1.__decorate([
|
|
121
113
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
122
114
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
123
|
-
__metadata("design:type", Date)
|
|
115
|
+
tslib_1.__metadata("design:type", Date)
|
|
124
116
|
], Operation.prototype, "updatedAt", void 0);
|
|
125
|
-
Operation = __decorate([
|
|
117
|
+
Operation = tslib_1.__decorate([
|
|
126
118
|
(0, typeorm_1.Entity)(),
|
|
127
119
|
(0, typeorm_1.Index)('ix_operation_0', (operation) => [operation.domain, operation.name], { unique: true }),
|
|
128
120
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Operation' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../server/service/operation/operation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../server/service/operation/operation.ts"],"names":[],"mappings":";;;;;AAAA,+CAAsE;AACtE,qCASgB;AAEhB,yDAAgD;AAChD,iDAA8C;AAE9C,IAAY,eASX;AATD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,mCAAgB,CAAA;IAChB,8BAAW,CAAA;IACX,mCAAgB,CAAA;IAChB,gCAAa,CAAA;AACf,CAAC,EATW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAS1B;AAED,IAAA,+BAAgB,EAAC,eAAe,EAAE;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kCAAkC;CAChD,CAAC,CAAA;AAKF,IAAa,SAAS,GAAtB,MAAa,SAAS;CA0ErB,CAAA;AAvEC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;qCACpB;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI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AAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAC9B,gBAAI,oBAAJ,gBAAI;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;AAMlB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAC9B,gBAAI,oBAAJ,gBAAI;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;AAIlB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;4CAAA;AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;4CAAA;AAzEL,SAAS;IAHrB,IAAA,gBAAM,GAAE;IACR,IAAA,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,CA0ErB;AA1EY,8BAAS","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } 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 { Domain } from '@things-factory/shell'\n\nexport enum OperationStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B',\n ASSY = 'Assembly',\n INV = 'Inventory',\n PACK = 'Packing',\n SMT = 'SMT',\n STD = 'Standard',\n TEST = 'Test'\n}\n\nregisterEnumType(OperationStatus, {\n name: 'OperationStatus',\n description: 'state enumeration of a operation'\n})\n\n@Entity()\n@Index('ix_operation_0', (operation: Operation) => [operation.domain, operation.name], { unique: true })\n@ObjectType({ description: 'Entity for Operation' })\nexport class Operation {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { nullable: false })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: false })\n domain: Domain\n\n @RelationId((operation: Operation) => operation.domain)\n domainId: string\n\n @Column()\n @Field({ nullable: false })\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n type?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n operationStdChart?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n operationStdTime?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((operation: Operation) => operation.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((operation: Operation) => operation.creator)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n}\n"]}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
18
5
|
const routing_1 = require("./routing");
|
|
19
6
|
const routing_mutation_1 = require("./routing-mutation");
|
|
20
7
|
const routing_query_1 = require("./routing-query");
|
|
21
8
|
exports.entities = [routing_1.Routing];
|
|
22
9
|
exports.resolvers = [routing_query_1.RoutingQuery, routing_mutation_1.RoutingMutation];
|
|
23
|
-
__exportStar(require("./routing-query"), exports);
|
|
24
|
-
__exportStar(require("./routing-mutation"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./routing-query"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./routing-mutation"), exports);
|
|
25
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/routing/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/routing/index.ts"],"names":[],"mappings":";;;;AAAA,uCAAmC;AACnC,yDAAoD;AACpD,mDAA8C;AAEjC,QAAA,QAAQ,GAAG,CAAC,iBAAO,CAAC,CAAA;AACpB,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA;AAExD,0DAA+B;AAC/B,6DAAkC","sourcesContent":["import { Routing } from './routing'\nimport { RoutingMutation } from './routing-mutation'\nimport { RoutingQuery } from './routing-query'\n\nexport const entities = [Routing]\nexport const resolvers = [RoutingQuery, RoutingMutation]\n\nexport * from './routing-query'\nexport * from './routing-mutation'\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.RoutingMutation = 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 routing_1 = require("./routing");
|
|
@@ -67,53 +56,53 @@ let RoutingMutation = class RoutingMutation {
|
|
|
67
56
|
return true;
|
|
68
57
|
}
|
|
69
58
|
};
|
|
70
|
-
__decorate([
|
|
59
|
+
tslib_1.__decorate([
|
|
71
60
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
72
61
|
(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)
|
|
62
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('routing')),
|
|
63
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
64
|
+
tslib_1.__metadata("design:type", Function),
|
|
65
|
+
tslib_1.__metadata("design:paramtypes", [routing_type_1.NewRouting, Object]),
|
|
66
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
78
67
|
], RoutingMutation.prototype, "createRouting", null);
|
|
79
|
-
__decorate([
|
|
68
|
+
tslib_1.__decorate([
|
|
80
69
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
81
70
|
(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)
|
|
71
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
72
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
73
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
74
|
+
tslib_1.__metadata("design:type", Function),
|
|
75
|
+
tslib_1.__metadata("design:paramtypes", [String, routing_type_1.RoutingPatch, Object]),
|
|
76
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
88
77
|
], RoutingMutation.prototype, "updateRouting", null);
|
|
89
|
-
__decorate([
|
|
78
|
+
tslib_1.__decorate([
|
|
90
79
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
91
80
|
(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)
|
|
81
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [routing_type_1.RoutingPatch])),
|
|
82
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
83
|
+
tslib_1.__metadata("design:type", Function),
|
|
84
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
85
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
97
86
|
], RoutingMutation.prototype, "updateMultipleRouting", null);
|
|
98
|
-
__decorate([
|
|
87
|
+
tslib_1.__decorate([
|
|
99
88
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
100
89
|
(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)
|
|
90
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
91
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
92
|
+
tslib_1.__metadata("design:type", Function),
|
|
93
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
94
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
106
95
|
], RoutingMutation.prototype, "deleteRouting", null);
|
|
107
|
-
__decorate([
|
|
96
|
+
tslib_1.__decorate([
|
|
108
97
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
109
98
|
(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)
|
|
99
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
100
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
101
|
+
tslib_1.__metadata("design:type", Function),
|
|
102
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
103
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
115
104
|
], RoutingMutation.prototype, "deleteRoutings", null);
|
|
116
|
-
RoutingMutation = __decorate([
|
|
105
|
+
RoutingMutation = tslib_1.__decorate([
|
|
117
106
|
(0, type_graphql_1.Resolver)(routing_1.Routing)
|
|
118
107
|
], RoutingMutation);
|
|
119
108
|
exports.RoutingMutation = RoutingMutation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-mutation.js","sourceRoot":"","sources":["../../../server/service/routing/routing-mutation.ts"],"names":[],"mappings":"
|
|
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,CA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AAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;oDAKhD;AAID;IAFC,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAE1E,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qDAUP;AAxGU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,iBAAO,CAAC;GACL,eAAe,CAyG3B;AAzGY,0CAAe","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { getRepository, In } from 'typeorm'\nimport { Routing } from './routing'\nimport { NewRouting, RoutingPatch } from './routing-type'\n\n@Resolver(Routing)\nexport class RoutingMutation {\n @Directive('@transaction')\n @Mutation(returns => Routing, { description: 'To create new Routing' })\n async createRouting(@Arg('routing') routing: NewRouting, @Ctx() context: any): Promise<Routing> {\n const { domain, user, tx } = context.state\n\n return await tx.getRepository(Routing).save({\n ...routing,\n domain,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Routing, { description: 'To modify Routing information' })\n async updateRouting(\n @Arg('id') id: string,\n @Arg('patch') patch: RoutingPatch,\n @Ctx() context: any\n ): Promise<Routing> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Routing)\n const routing = await repository.findOne({\n where: { domain, id }\n })\n\n return await repository.save({\n ...routing,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Routing], { description: \"To modify multiple Routings' information\" })\n async updateMultipleRouting(\n @Arg('patches', type => [RoutingPatch]) patches: RoutingPatch[],\n @Ctx() context: any\n ): Promise<Routing[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const routingRepo = tx.getRepository(Routing)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await routingRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\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 routing = await routingRepo.findOne(newRecord.id)\n\n const result = await routingRepo.save({\n ...routing,\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, { description: 'To delete Routing' })\n async deleteRouting(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Routing).delete({ domain, id })\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple routings' })\n async deleteRoutings(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: any\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Routing).delete({\n domain,\n id: In(ids)\n })\n\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;
|
|
15
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
4
|
exports.lastOperation = exports.prevOperation = exports.nextOperation = exports.firstOperation = exports.RoutingQuery = 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");
|
|
@@ -49,44 +38,44 @@ let RoutingQuery = class RoutingQuery {
|
|
|
49
38
|
return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(routing.creatorId);
|
|
50
39
|
}
|
|
51
40
|
};
|
|
52
|
-
__decorate([
|
|
41
|
+
tslib_1.__decorate([
|
|
53
42
|
(0, type_graphql_1.Query)(returns => routing_1.Routing, { description: 'To fetch a Routing' }),
|
|
54
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
55
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
56
|
-
__metadata("design:type", Function),
|
|
57
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
58
|
-
__metadata("design:returntype", Promise)
|
|
43
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
44
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
45
|
+
tslib_1.__metadata("design:type", Function),
|
|
46
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
47
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
59
48
|
], RoutingQuery.prototype, "routing", null);
|
|
60
|
-
__decorate([
|
|
49
|
+
tslib_1.__decorate([
|
|
61
50
|
(0, type_graphql_1.Query)(returns => routing_type_1.RoutingList, { description: 'To fetch multiple Routings' }),
|
|
62
|
-
__param(0, (0, type_graphql_1.Args)()),
|
|
63
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
64
|
-
__metadata("design:type", Function),
|
|
65
|
-
__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
66
|
-
__metadata("design:returntype", Promise)
|
|
51
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
52
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
53
|
+
tslib_1.__metadata("design:type", Function),
|
|
54
|
+
tslib_1.__metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
|
|
55
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
67
56
|
], RoutingQuery.prototype, "routings", null);
|
|
68
|
-
__decorate([
|
|
57
|
+
tslib_1.__decorate([
|
|
69
58
|
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
70
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
71
|
-
__metadata("design:type", Function),
|
|
72
|
-
__metadata("design:paramtypes", [routing_1.Routing]),
|
|
73
|
-
__metadata("design:returntype", Promise)
|
|
59
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
60
|
+
tslib_1.__metadata("design:type", Function),
|
|
61
|
+
tslib_1.__metadata("design:paramtypes", [routing_1.Routing]),
|
|
62
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
74
63
|
], RoutingQuery.prototype, "domain", null);
|
|
75
|
-
__decorate([
|
|
64
|
+
tslib_1.__decorate([
|
|
76
65
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
77
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
78
|
-
__metadata("design:type", Function),
|
|
79
|
-
__metadata("design:paramtypes", [routing_1.Routing]),
|
|
80
|
-
__metadata("design:returntype", Promise)
|
|
66
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
67
|
+
tslib_1.__metadata("design:type", Function),
|
|
68
|
+
tslib_1.__metadata("design:paramtypes", [routing_1.Routing]),
|
|
69
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
81
70
|
], RoutingQuery.prototype, "updater", null);
|
|
82
|
-
__decorate([
|
|
71
|
+
tslib_1.__decorate([
|
|
83
72
|
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
84
|
-
__param(0, (0, type_graphql_1.Root)()),
|
|
85
|
-
__metadata("design:type", Function),
|
|
86
|
-
__metadata("design:paramtypes", [routing_1.Routing]),
|
|
87
|
-
__metadata("design:returntype", Promise)
|
|
73
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
74
|
+
tslib_1.__metadata("design:type", Function),
|
|
75
|
+
tslib_1.__metadata("design:paramtypes", [routing_1.Routing]),
|
|
76
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
88
77
|
], RoutingQuery.prototype, "creator", null);
|
|
89
|
-
RoutingQuery = __decorate([
|
|
78
|
+
RoutingQuery = tslib_1.__decorate([
|
|
90
79
|
(0, type_graphql_1.Resolver)(routing_1.Routing)
|
|
91
80
|
], RoutingQuery);
|
|
92
81
|
exports.RoutingQuery = RoutingQuery;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-query.js","sourceRoot":"","sources":["../../../server/service/routing/routing-query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routing-query.js","sourceRoot":"","sources":["../../../server/service/routing/routing-query.ts"],"names":[],"mappings":";;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAAwF;AAExF,sDAAkD;AAClD,uCAAmC;AACnC,iDAA4C;AAG5C,IAAa,YAAY,GAAzB,MAAa,YAAY;IAEvB,KAAK,CAAC,OAAO,CAAY,EAAU,EA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,EAAC,qBAAS,CAAC,CAAC,KAAK,CACpD;;;;;;;;;;;;;gCAa4B,SAAS;;;;;;;;;sCASH,SAAS;;;;;;;;;4CASH,SAAS;;8CAEP,WAAW;;;;OAIlD,CACJ,CAAA;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AA1CD,sCA0CC;AAEM,KAAK,UAAU,aAAa,CAAC,WAAmB,EAAE,SAAiB,EAAE,OAAY;IACtF,MAAM,SAAS,GAAG,MAAM,IAAA,uBAAa,EAAC,qBAAS,CAAC,CAAC,KAAK,CACpD;;;;;;;;;;;;;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","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\nimport { getRepository } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, getQueryBuilderFromListParams, ListParam } from '@things-factory/shell'\n\nimport { Operation } from '../operation/operation'\nimport { Routing } from './routing'\nimport { RoutingList } from './routing-type'\n\n@Resolver(Routing)\nexport class RoutingQuery {\n @Query(returns => Routing, { description: 'To fetch a Routing' })\n async routing(@Arg('id') id: string, @Ctx() context: any): Promise<Routing> {\n const { domain } = context.state\n\n return await getRepository(Routing).findOne({\n where: { domain, name }\n })\n }\n\n @Query(returns => RoutingList, { description: 'To fetch multiple Routings' })\n async routings(@Args() params: ListParam, @Ctx() context: any): Promise<RoutingList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n repository: getRepository(Routing),\n params,\n domain,\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() routing: Routing): Promise<Domain> {\n return await getRepository(Domain).findOne(routing.domainId)\n }\n\n @FieldResolver(type => User)\n async updater(@Root() routing: Routing): Promise<User> {\n return await getRepository(User).findOne(routing.updaterId)\n }\n\n @FieldResolver(type => User)\n async creator(@Root() routing: Routing): Promise<User> {\n return await getRepository(User).findOne(routing.creatorId)\n }\n}\n\nexport async function firstOperation(routingId: string, context: any): Promise<Operation> {\n const { domain, user, tx } = context.state\n const operation: Operation = await tx.getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n min(rank) \n from \n routing_items \n where \n routing_id = '${routingId}'\n )\n )\n `\n )\n return operation\n}\n\nexport async function nextOperation(operationId: string, routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n min(rank) \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank > \n (\n select \n rank \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n operation_id = '${operationId}'\n )\n )\n )\n `\n )\n return operation\n}\n\nexport async function prevOperation(operationId: string, routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n max(rank) \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank < \n (\n select \n rank \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n operation_id = '${operationId}'\n )\n )\n )\n `\n )\n\n return operation\n}\n\nexport async function lastOperation(routingId: string, context: any): Promise<Operation> {\n const operation = await getRepository(Operation).query(\n `\n select \n * \n from \n operations \n where \n id = \n (\n select \n operation_id \n from \n routing_items \n where \n routing_id = '${routingId}' \n and \n rank = \n (\n select \n max(rank) \n from \n routing_items \n where \n routing_id = '${routingId}'\n )\n )\n `\n )\n return operation\n}\n"]}
|
|
@@ -1,80 +1,72 @@
|
|
|
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.RoutingList = exports.RoutingPatch = exports.NewRouting = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
13
5
|
const type_graphql_1 = require("type-graphql");
|
|
14
6
|
const routing_1 = require("./routing");
|
|
15
7
|
let NewRouting = class NewRouting {
|
|
16
8
|
};
|
|
17
|
-
__decorate([
|
|
9
|
+
tslib_1.__decorate([
|
|
18
10
|
(0, type_graphql_1.Field)({ nullable: false }),
|
|
19
|
-
__metadata("design:type", String)
|
|
11
|
+
tslib_1.__metadata("design:type", String)
|
|
20
12
|
], NewRouting.prototype, "name", void 0);
|
|
21
|
-
__decorate([
|
|
13
|
+
tslib_1.__decorate([
|
|
22
14
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
-
__metadata("design:type", String)
|
|
15
|
+
tslib_1.__metadata("design:type", String)
|
|
24
16
|
], NewRouting.prototype, "description", void 0);
|
|
25
|
-
__decorate([
|
|
17
|
+
tslib_1.__decorate([
|
|
26
18
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
|
-
__metadata("design:type", Boolean)
|
|
19
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
28
20
|
], NewRouting.prototype, "createdLot", void 0);
|
|
29
|
-
__decorate([
|
|
21
|
+
tslib_1.__decorate([
|
|
30
22
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
31
|
-
__metadata("design:type", Boolean)
|
|
23
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
32
24
|
], NewRouting.prototype, "active", void 0);
|
|
33
|
-
NewRouting = __decorate([
|
|
25
|
+
NewRouting = tslib_1.__decorate([
|
|
34
26
|
(0, type_graphql_1.InputType)()
|
|
35
27
|
], NewRouting);
|
|
36
28
|
exports.NewRouting = NewRouting;
|
|
37
29
|
let RoutingPatch = class RoutingPatch {
|
|
38
30
|
};
|
|
39
|
-
__decorate([
|
|
31
|
+
tslib_1.__decorate([
|
|
40
32
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
41
|
-
__metadata("design:type", String)
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
42
34
|
], RoutingPatch.prototype, "id", void 0);
|
|
43
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
44
36
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
|
-
__metadata("design:type", String)
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
46
38
|
], RoutingPatch.prototype, "name", void 0);
|
|
47
|
-
__decorate([
|
|
39
|
+
tslib_1.__decorate([
|
|
48
40
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
49
|
-
__metadata("design:type", String)
|
|
41
|
+
tslib_1.__metadata("design:type", String)
|
|
50
42
|
], RoutingPatch.prototype, "description", void 0);
|
|
51
|
-
__decorate([
|
|
43
|
+
tslib_1.__decorate([
|
|
52
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
53
|
-
__metadata("design:type", Boolean)
|
|
45
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
54
46
|
], RoutingPatch.prototype, "createdLot", void 0);
|
|
55
|
-
__decorate([
|
|
47
|
+
tslib_1.__decorate([
|
|
56
48
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
57
|
-
__metadata("design:type", Boolean)
|
|
49
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
58
50
|
], RoutingPatch.prototype, "active", void 0);
|
|
59
|
-
__decorate([
|
|
51
|
+
tslib_1.__decorate([
|
|
60
52
|
(0, type_graphql_1.Field)(),
|
|
61
|
-
__metadata("design:type", String)
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
62
54
|
], RoutingPatch.prototype, "cuFlag", void 0);
|
|
63
|
-
RoutingPatch = __decorate([
|
|
55
|
+
RoutingPatch = tslib_1.__decorate([
|
|
64
56
|
(0, type_graphql_1.InputType)()
|
|
65
57
|
], RoutingPatch);
|
|
66
58
|
exports.RoutingPatch = RoutingPatch;
|
|
67
59
|
let RoutingList = class RoutingList {
|
|
68
60
|
};
|
|
69
|
-
__decorate([
|
|
61
|
+
tslib_1.__decorate([
|
|
70
62
|
(0, type_graphql_1.Field)(type => [routing_1.Routing]),
|
|
71
|
-
__metadata("design:type", Array)
|
|
63
|
+
tslib_1.__metadata("design:type", Array)
|
|
72
64
|
], RoutingList.prototype, "items", void 0);
|
|
73
|
-
__decorate([
|
|
65
|
+
tslib_1.__decorate([
|
|
74
66
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
75
|
-
__metadata("design:type", Number)
|
|
67
|
+
tslib_1.__metadata("design:type", Number)
|
|
76
68
|
], RoutingList.prototype, "total", void 0);
|
|
77
|
-
RoutingList = __decorate([
|
|
69
|
+
RoutingList = tslib_1.__decorate([
|
|
78
70
|
(0, type_graphql_1.ObjectType)()
|
|
79
71
|
], RoutingList);
|
|
80
72
|
exports.RoutingList = RoutingList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-type.js","sourceRoot":"","sources":["../../../server/service/routing/routing-type.ts"],"names":[],"mappings":"
|
|
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,YAAY,CAkBxB;AAlBY,oCAAY;AAqBzB,IAAa,WAAW,GAAxB,MAAa,WAAW;CAMvB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAO,CAAC,CAAC;;0CACT;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;0CACN;AALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB;AANY,kCAAW","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Routing } from './routing'\n\n@InputType()\nexport class NewRouting {\n @Field({ nullable: false })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n createdLot?: boolean\n\n @Field({ nullable: true })\n active?: boolean\n}\n\n@InputType()\nexport class RoutingPatch {\n @Field(type => ID, { nullable: true })\n id: string\n\n @Field({ nullable: true })\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n createdLot?: boolean\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field()\n cuFlag: string\n}\n\n@ObjectType()\nexport class RoutingList {\n @Field(type => [Routing])\n items: Routing[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|