@things-factory/work-shift 5.0.7 → 6.0.0-alpha.0
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 +4 -6
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/index.js +5 -18
- 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 +2 -15
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/work-shift/index.js.map +1 -1
- package/dist-server/service/work-shift/work-shift-mutation.js +15 -26
- package/dist-server/service/work-shift/work-shift-mutation.js.map +1 -1
- package/dist-server/service/work-shift/work-shift-query.js +40 -53
- package/dist-server/service/work-shift/work-shift-query.js.map +1 -1
- package/dist-server/service/work-shift/work-shift-type.js +24 -32
- package/dist-server/service/work-shift/work-shift-type.js.map +1 -1
- package/dist-server/service/work-shift/work-shift.js +32 -41
- package/dist-server/service/work-shift/work-shift.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +6 -6
- package/server/controllers/index.ts +1 -2
- package/server/routes.ts +0 -2
- package/server/service/work-shift/work-shift-mutation.ts +8 -4
- package/server/service/work-shift/work-shift-query.ts +9 -7
|
@@ -1,16 +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 _a, _b, _c;
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
exports.WorkShift = exports.WorkShiftDateType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
14
5
|
const typeorm_1 = require("typeorm");
|
|
15
6
|
const type_graphql_1 = require("type-graphql");
|
|
16
7
|
const shell_1 = require("@things-factory/shell");
|
|
@@ -27,85 +18,85 @@ var WorkShiftDateType;
|
|
|
27
18
|
});
|
|
28
19
|
let WorkShift = class WorkShift {
|
|
29
20
|
};
|
|
30
|
-
__decorate([
|
|
21
|
+
tslib_1.__decorate([
|
|
31
22
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
32
23
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
33
|
-
__metadata("design:type", String)
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
34
25
|
], WorkShift.prototype, "id", void 0);
|
|
35
|
-
__decorate([
|
|
26
|
+
tslib_1.__decorate([
|
|
36
27
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
37
28
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
38
|
-
__metadata("design:type",
|
|
29
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
39
30
|
], WorkShift.prototype, "domain", void 0);
|
|
40
|
-
__decorate([
|
|
31
|
+
tslib_1.__decorate([
|
|
41
32
|
(0, typeorm_1.RelationId)((workShift) => workShift.domain),
|
|
42
|
-
__metadata("design:type", String)
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
43
34
|
], WorkShift.prototype, "domainId", void 0);
|
|
44
|
-
__decorate([
|
|
35
|
+
tslib_1.__decorate([
|
|
45
36
|
(0, typeorm_1.Column)(),
|
|
46
37
|
(0, type_graphql_1.Field)(),
|
|
47
|
-
__metadata("design:type", String)
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
48
39
|
], WorkShift.prototype, "name", void 0);
|
|
49
|
-
__decorate([
|
|
40
|
+
tslib_1.__decorate([
|
|
50
41
|
(0, typeorm_1.Column)({
|
|
51
42
|
nullable: true
|
|
52
43
|
}),
|
|
53
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
54
|
-
__metadata("design:type", String)
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
55
46
|
], WorkShift.prototype, "description", void 0);
|
|
56
|
-
__decorate([
|
|
47
|
+
tslib_1.__decorate([
|
|
57
48
|
(0, typeorm_1.Column)(),
|
|
58
49
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
-
__metadata("design:type", Number)
|
|
50
|
+
tslib_1.__metadata("design:type", Number)
|
|
60
51
|
], WorkShift.prototype, "fromDate", void 0);
|
|
61
|
-
__decorate([
|
|
52
|
+
tslib_1.__decorate([
|
|
62
53
|
(0, typeorm_1.Column)(),
|
|
63
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
64
|
-
__metadata("design:type", String)
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
65
56
|
], WorkShift.prototype, "fromTime", void 0);
|
|
66
|
-
__decorate([
|
|
57
|
+
tslib_1.__decorate([
|
|
67
58
|
(0, typeorm_1.Column)(),
|
|
68
59
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
69
|
-
__metadata("design:type", Number)
|
|
60
|
+
tslib_1.__metadata("design:type", Number)
|
|
70
61
|
], WorkShift.prototype, "toDate", void 0);
|
|
71
|
-
__decorate([
|
|
62
|
+
tslib_1.__decorate([
|
|
72
63
|
(0, typeorm_1.Column)(),
|
|
73
64
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
74
|
-
__metadata("design:type", String)
|
|
65
|
+
tslib_1.__metadata("design:type", String)
|
|
75
66
|
], WorkShift.prototype, "toTime", void 0);
|
|
76
|
-
__decorate([
|
|
67
|
+
tslib_1.__decorate([
|
|
77
68
|
(0, typeorm_1.CreateDateColumn)(),
|
|
78
69
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
79
|
-
__metadata("design:type", Date)
|
|
70
|
+
tslib_1.__metadata("design:type", Date)
|
|
80
71
|
], WorkShift.prototype, "createdAt", void 0);
|
|
81
|
-
__decorate([
|
|
72
|
+
tslib_1.__decorate([
|
|
82
73
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
83
74
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
84
|
-
__metadata("design:type", Date)
|
|
75
|
+
tslib_1.__metadata("design:type", Date)
|
|
85
76
|
], WorkShift.prototype, "updatedAt", void 0);
|
|
86
|
-
__decorate([
|
|
77
|
+
tslib_1.__decorate([
|
|
87
78
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
88
79
|
nullable: true
|
|
89
80
|
}),
|
|
90
81
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
91
|
-
__metadata("design:type",
|
|
82
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
92
83
|
], WorkShift.prototype, "creator", void 0);
|
|
93
|
-
__decorate([
|
|
84
|
+
tslib_1.__decorate([
|
|
94
85
|
(0, typeorm_1.RelationId)((workShift) => workShift.creator),
|
|
95
|
-
__metadata("design:type", String)
|
|
86
|
+
tslib_1.__metadata("design:type", String)
|
|
96
87
|
], WorkShift.prototype, "creatorId", void 0);
|
|
97
|
-
__decorate([
|
|
88
|
+
tslib_1.__decorate([
|
|
98
89
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
99
90
|
nullable: true
|
|
100
91
|
}),
|
|
101
92
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
102
|
-
__metadata("design:type",
|
|
93
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
103
94
|
], WorkShift.prototype, "updater", void 0);
|
|
104
|
-
__decorate([
|
|
95
|
+
tslib_1.__decorate([
|
|
105
96
|
(0, typeorm_1.RelationId)((workShift) => workShift.creator),
|
|
106
|
-
__metadata("design:type", String)
|
|
97
|
+
tslib_1.__metadata("design:type", String)
|
|
107
98
|
], WorkShift.prototype, "updaterId", void 0);
|
|
108
|
-
WorkShift = __decorate([
|
|
99
|
+
WorkShift = tslib_1.__decorate([
|
|
109
100
|
(0, typeorm_1.Entity)(),
|
|
110
101
|
(0, typeorm_1.Index)('ix_work_shift_0', (workShift) => [workShift.domain, workShift.name], { unique: true }),
|
|
111
102
|
(0, typeorm_1.Index)('ix_work_shift_1', (workShift) => [workShift.domain, workShift.fromDate, workShift.fromTime], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-shift.js","sourceRoot":"","sources":["../../../server/service/work-shift/work-shift.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"work-shift.js","sourceRoot":"","sources":["../../../server/service/work-shift/work-shift.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,0EAAiB,CAAA;IACjB,6DAAU,CAAA;IACV,uEAAe,CAAA;AACjB,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAED,IAAA,+BAAgB,EAAC,iBAAiB,EAAE;IAClC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,6BAA6B;CAC3C,CAAC,CAAA;AAQF,IAAa,SAAS,GAAtB,MAAa,SAAS;CA+DrB,CAAA;AA5DC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,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C;;4CACtC;AAMlB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAChB,gBAAI;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;AA9DP,SAAS;IANrB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,iBAAiB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACxG,IAAA,eAAK,EAAC,iBAAiB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE;QAC9G,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;GACvC,SAAS,CA+DrB;AA/DY,8BAAS","sourcesContent":["import {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { Field, ID, Int, ObjectType, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum WorkShiftDateType {\n TheDayBefore = -1,\n TheDay = 0,\n TheDayAfter = 1\n}\n\nregisterEnumType(WorkShiftDateType, {\n name: 'WorkShiftDateType',\n description: 'enumeration of a shift date'\n})\n\n@Entity()\n@Index('ix_work_shift_0', (workShift: WorkShift) => [workShift.domain, workShift.name], { unique: true })\n@Index('ix_work_shift_1', (workShift: WorkShift) => [workShift.domain, workShift.fromDate, workShift.fromTime], {\n unique: true\n})\n@ObjectType({ description: 'Entity for WorkShift' })\nexport class WorkShift {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((workShift: WorkShift) => workShift.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column()\n @Field({ nullable: true })\n fromDate: WorkShiftDateType\n\n @Column()\n @Field({ nullable: true })\n fromTime: string\n\n @Column()\n @Field({ nullable: true })\n toDate: WorkShiftDateType\n\n @Column()\n @Field({ nullable: true })\n toTime: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((workShift: WorkShift) => workShift.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((workShift: WorkShift) => workShift.creator)\n updaterId?: string\n}\n"]}
|