@dssp/supervision 1.0.0-alpha.2 → 1.0.0-alpha.20
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-client/graphql/building-inspection.d.ts +1 -0
- package/dist-client/graphql/building-inspection.js +66 -0
- package/dist-client/graphql/building-inspection.js.map +1 -0
- package/dist-client/pages/action-plan/action-plan-importer.js.map +1 -1
- package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +2 -68
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +0 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +16 -11
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +3 -2
- package/dist-client/pages/building-inspection/building-inspection-list.js +118 -13
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +31 -9
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +3 -3
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-create-popup.js +5 -4
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +46 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +953 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +2 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +734 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +1 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +304 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +15 -0
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +430 -0
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +1 -0
- package/dist-client/pages/checklist/attachment-list-popup.js +9 -2
- package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.d.ts +2 -0
- package/dist-client/pages/checklist/checklist-view.js +288 -185
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist/comment-list-popup.js +14 -3
- package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-item.js +8 -3
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-type-management.d.ts +2 -2
- package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -1
- package/dist-client/pages/issue/issue-importer.js.map +1 -1
- package/dist-client/pages/issue/issue-list-page.js.map +1 -1
- package/dist-client/pages/project-report/project-report-importer.js.map +1 -1
- package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
- package/dist-client/pages/supervisor/supervisor-importer.js.map +1 -1
- package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +3 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/stt/speech-to-text.d.ts +36 -0
- package/dist-client/stt/speech-to-text.js +89 -0
- package/dist-client/stt/speech-to-text.js.map +1 -0
- package/dist-client/stt/stt-utils.d.ts +28 -0
- package/dist-client/stt/stt-utils.js +146 -0
- package/dist-client/stt/stt-utils.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/middlewares/index.js +1 -2
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-mutation.js +2 -2
- package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-query.js +2 -2
- package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-type.js +6 -6
- package/dist-server/service/action-plan/action-plan-type.js.map +1 -1
- package/dist-server/service/action-plan/action-plan.js +3 -3
- package/dist-server/service/action-plan/action-plan.js.map +1 -1
- package/dist-server/service/action-plan/index.d.ts +0 -1
- package/dist-server/service/action-plan/index.js +1 -2
- package/dist-server/service/action-plan/index.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-history.js +2 -2
- package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.js +111 -32
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +2 -3
- package/dist-server/service/building-inspection/building-inspection-query.js +39 -29
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +18 -8
- package/dist-server/service/building-inspection/building-inspection-type.js +71 -25
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +9 -0
- package/dist-server/service/building-inspection/building-inspection.js +43 -5
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/building-inspection/index.d.ts +3 -5
- package/dist-server/service/building-inspection/index.js +10 -4
- package/dist-server/service/building-inspection/index.js.map +1 -1
- package/dist-server/service/checklist/checklist-history.d.ts +8 -0
- package/dist-server/service/checklist/checklist-history.js +38 -2
- package/dist-server/service/checklist/checklist-history.js.map +1 -1
- package/dist-server/service/checklist/checklist-mutation.d.ts +0 -5
- package/dist-server/service/checklist/checklist-mutation.js +3 -69
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
- package/dist-server/service/checklist/checklist-query.js +2 -2
- package/dist-server/service/checklist/checklist-query.js.map +1 -1
- package/dist-server/service/checklist/checklist-type.d.ts +0 -13
- package/dist-server/service/checklist/checklist-type.js +3 -51
- package/dist-server/service/checklist/checklist-type.js.map +1 -1
- package/dist-server/service/checklist/checklist.d.ts +15 -3
- package/dist-server/service/checklist/checklist.js +61 -17
- package/dist-server/service/checklist/checklist.js.map +1 -1
- package/dist-server/service/checklist/index.d.ts +0 -2
- package/dist-server/service/checklist/index.js +1 -3
- package/dist-server/service/checklist/index.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item-mutation.js +2 -2
- package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item-query.js +2 -2
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item-type.js +2 -2
- package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item.js +3 -3
- package/dist-server/service/checklist-item/checklist-item.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +2 -2
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +35 -8
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +2 -2
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +6 -6
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js +2 -2
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +1 -1
- package/dist-server/service/checklist-item-comment/index.d.ts +0 -2
- package/dist-server/service/checklist-item-comment/index.js +1 -3
- package/dist-server/service/checklist-item-comment/index.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template-mutation.js +2 -2
- package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template-query.js +2 -2
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template-type.js +4 -4
- package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template.js +2 -2
- package/dist-server/service/checklist-template/checklist-template.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +2 -2
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js +2 -2
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +4 -4
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item.js +4 -6
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type-mutation.js +2 -2
- package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type-query.js +2 -2
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type-type.js +4 -4
- package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type.js +3 -3
- package/dist-server/service/checklist-type/checklist-type.js.map +1 -1
- package/dist-server/service/index.d.ts +2 -2
- package/dist-server/service/index.js +2 -11
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/index.d.ts +0 -1
- package/dist-server/service/issue/index.js +1 -2
- package/dist-server/service/issue/index.js.map +1 -1
- package/dist-server/service/issue/issue-mutation.js +2 -2
- package/dist-server/service/issue/issue-mutation.js.map +1 -1
- package/dist-server/service/issue/issue-query.js +2 -2
- package/dist-server/service/issue/issue-query.js.map +1 -1
- package/dist-server/service/issue/issue-type.js +6 -6
- package/dist-server/service/issue/issue-type.js.map +1 -1
- package/dist-server/service/issue/issue.js +3 -3
- package/dist-server/service/issue/issue.js.map +1 -1
- package/dist-server/service/project-report/index.d.ts +0 -1
- package/dist-server/service/project-report/index.js +1 -2
- package/dist-server/service/project-report/index.js.map +1 -1
- package/dist-server/service/project-report/project-report-mutation.js +2 -2
- package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
- package/dist-server/service/project-report/project-report-query.js +2 -2
- package/dist-server/service/project-report/project-report-query.js.map +1 -1
- package/dist-server/service/project-report/project-report-type.js +6 -6
- package/dist-server/service/project-report/project-report-type.js.map +1 -1
- package/dist-server/service/project-report/project-report.d.ts +0 -2
- package/dist-server/service/project-report/project-report.js +3 -9
- package/dist-server/service/project-report/project-report.js.map +1 -1
- package/dist-server/service/supervisor/index.d.ts +0 -1
- package/dist-server/service/supervisor/index.js +1 -2
- package/dist-server/service/supervisor/index.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-mutation.js +2 -2
- package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-query.js +2 -2
- package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-type.js +6 -6
- package/dist-server/service/supervisor/supervisor-type.js.map +1 -1
- package/dist-server/service/supervisor/supervisor.js +3 -3
- package/dist-server/service/supervisor/supervisor.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -13
- package/things-factory.config.js +3 -1
- package/dist-server/service/building-inspection/event-subscriber.d.ts +0 -7
- package/dist-server/service/building-inspection/event-subscriber.js +0 -21
- package/dist-server/service/building-inspection/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist/event-subscriber.js +0 -21
- package/dist-server/service/checklist/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist-item-comment/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist-item-comment/event-subscriber.js +0 -21
- package/dist-server/service/checklist-item-comment/event-subscriber.js.map +0 -1
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { Checklist } from './checklist';
|
|
2
|
-
import { NewChecklist, ChecklistPatch } from './checklist-type';
|
|
3
1
|
export declare class ChecklistMutation {
|
|
4
|
-
createChecklist(checklist: NewChecklist, context: ResolverContext): Promise<Checklist>;
|
|
5
|
-
updateChecklist(id: string, patch: ChecklistPatch, context: ResolverContext): Promise<Checklist>;
|
|
6
|
-
updateMultipleChecklist(patches: ChecklistPatch[], context: ResolverContext): Promise<Checklist[]>;
|
|
7
2
|
deleteChecklists(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
8
3
|
}
|
|
@@ -5,45 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const typeorm_1 = require("typeorm");
|
|
7
7
|
const checklist_1 = require("./checklist");
|
|
8
|
-
const checklist_type_1 = require("./checklist-type");
|
|
9
8
|
let ChecklistMutation = class ChecklistMutation {
|
|
10
|
-
async createChecklist(checklist, context) {
|
|
11
|
-
const { domain, user, tx } = context.state;
|
|
12
|
-
const result = await tx.getRepository(checklist_1.Checklist).save(Object.assign(Object.assign({}, checklist), { domain, creator: user, updater: user }));
|
|
13
|
-
return result;
|
|
14
|
-
}
|
|
15
|
-
async updateChecklist(id, patch, context) {
|
|
16
|
-
const { domain, user, tx } = context.state;
|
|
17
|
-
const repository = tx.getRepository(checklist_1.Checklist);
|
|
18
|
-
const checklist = await repository.findOne({
|
|
19
|
-
where: { id }
|
|
20
|
-
});
|
|
21
|
-
const result = await repository.save(Object.assign(Object.assign(Object.assign({}, checklist), patch), { updater: user }));
|
|
22
|
-
return result;
|
|
23
|
-
}
|
|
24
|
-
async updateMultipleChecklist(patches, context) {
|
|
25
|
-
const { domain, user, tx } = context.state;
|
|
26
|
-
let results = [];
|
|
27
|
-
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
28
|
-
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
29
|
-
const checklistRepo = tx.getRepository(checklist_1.Checklist);
|
|
30
|
-
if (_createRecords.length > 0) {
|
|
31
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
32
|
-
const newRecord = _createRecords[i];
|
|
33
|
-
const result = await checklistRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
34
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (_updateRecords.length > 0) {
|
|
38
|
-
for (let i = 0; i < _updateRecords.length; i++) {
|
|
39
|
-
const updateRecord = _updateRecords[i];
|
|
40
|
-
const checklist = await checklistRepo.findOneBy({ id: updateRecord.id });
|
|
41
|
-
const result = await checklistRepo.save(Object.assign(Object.assign(Object.assign({}, checklist), updateRecord), { updater: user }));
|
|
42
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return results;
|
|
46
|
-
}
|
|
47
9
|
async deleteChecklists(ids, context) {
|
|
48
10
|
const { domain, tx } = context.state;
|
|
49
11
|
await tx.getRepository(checklist_1.Checklist).softDelete({
|
|
@@ -52,45 +14,17 @@ let ChecklistMutation = class ChecklistMutation {
|
|
|
52
14
|
return true;
|
|
53
15
|
}
|
|
54
16
|
};
|
|
17
|
+
exports.ChecklistMutation = ChecklistMutation;
|
|
55
18
|
tslib_1.__decorate([
|
|
56
19
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
57
|
-
(0, type_graphql_1.Mutation)(returns =>
|
|
58
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('checklist')),
|
|
59
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
60
|
-
tslib_1.__metadata("design:type", Function),
|
|
61
|
-
tslib_1.__metadata("design:paramtypes", [checklist_type_1.NewChecklist, Object]),
|
|
62
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
63
|
-
], ChecklistMutation.prototype, "createChecklist", null);
|
|
64
|
-
tslib_1.__decorate([
|
|
65
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
66
|
-
(0, type_graphql_1.Mutation)(returns => checklist_1.Checklist, { description: 'To modify Checklist information' }),
|
|
67
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
68
|
-
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
69
|
-
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
70
|
-
tslib_1.__metadata("design:type", Function),
|
|
71
|
-
tslib_1.__metadata("design:paramtypes", [String, checklist_type_1.ChecklistPatch, Object]),
|
|
72
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
73
|
-
], ChecklistMutation.prototype, "updateChecklist", null);
|
|
74
|
-
tslib_1.__decorate([
|
|
75
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
76
|
-
(0, type_graphql_1.Mutation)(returns => [checklist_1.Checklist], { description: "To modify multiple Checklists' information" }),
|
|
77
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [checklist_type_1.ChecklistPatch])),
|
|
78
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
79
|
-
tslib_1.__metadata("design:type", Function),
|
|
80
|
-
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
81
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
82
|
-
], ChecklistMutation.prototype, "updateMultipleChecklist", null);
|
|
83
|
-
tslib_1.__decorate([
|
|
84
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
85
|
-
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple Checklists' }),
|
|
20
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To create Building Inspection And Checklist information' }),
|
|
86
21
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
87
22
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
88
23
|
tslib_1.__metadata("design:type", Function),
|
|
89
24
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
90
25
|
tslib_1.__metadata("design:returntype", Promise)
|
|
91
26
|
], ChecklistMutation.prototype, "deleteChecklists", null);
|
|
92
|
-
ChecklistMutation = tslib_1.__decorate([
|
|
27
|
+
exports.ChecklistMutation = ChecklistMutation = tslib_1.__decorate([
|
|
93
28
|
(0, type_graphql_1.Resolver)(checklist_1.Checklist)
|
|
94
29
|
], ChecklistMutation);
|
|
95
|
-
exports.ChecklistMutation = ChecklistMutation;
|
|
96
30
|
//# sourceMappingURL=checklist-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist/checklist-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,2CAAuC;
|
|
1
|
+
{"version":3,"file":"checklist-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist/checklist-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,2CAAuC;AAGhC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAGtB,AAAN,KAAK,CAAC,gBAAgB,CAA+B,GAAa,EAAS,OAAwB;QACjG,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEpC,MAAM,EAAE,CAAC,aAAa,CAAC,qBAAS,CAAC,CAAC,UAAU,CAAC;YAC3C,EAAE,EAAE,IAAA,YAAE,EAAC,GAAG,CAAC;SACZ,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AAZY,8CAAiB;AAGtB;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,yDAAyD,EAAE,CAAC;IACjF,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;yDAQzE;4BAXU,iBAAiB;IAD7B,IAAA,uBAAQ,EAAC,qBAAS,CAAC;GACP,iBAAiB,CAY7B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { Checklist } from './checklist'\n\n@Resolver(Checklist)\nexport class ChecklistMutation {\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To create Building Inspection And Checklist information' })\n async deleteChecklists(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Checklist).softDelete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -43,6 +43,7 @@ let ChecklistQuery = class ChecklistQuery {
|
|
|
43
43
|
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklist.creatorId });
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
+
exports.ChecklistQuery = ChecklistQuery;
|
|
46
47
|
tslib_1.__decorate([
|
|
47
48
|
(0, type_graphql_1.Query)(returns => checklist_1.Checklist, { nullable: true, description: 'To fetch a Checklist' }),
|
|
48
49
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -87,8 +88,7 @@ tslib_1.__decorate([
|
|
|
87
88
|
tslib_1.__metadata("design:paramtypes", [checklist_1.Checklist]),
|
|
88
89
|
tslib_1.__metadata("design:returntype", Promise)
|
|
89
90
|
], ChecklistQuery.prototype, "creator", null);
|
|
90
|
-
ChecklistQuery = tslib_1.__decorate([
|
|
91
|
+
exports.ChecklistQuery = ChecklistQuery = tslib_1.__decorate([
|
|
91
92
|
(0, type_graphql_1.Resolver)(checklist_1.Checklist)
|
|
92
93
|
], ChecklistQuery);
|
|
93
|
-
exports.ChecklistQuery = ChecklistQuery;
|
|
94
94
|
//# sourceMappingURL=checklist-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-query.js","sourceRoot":"","sources":["../../../server/service/checklist/checklist-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAA+F;AAC/F,yDAAgD;AAChD,2CAAuC;AACvC,qDAAgD;AAChD,qEAAgE;AAChE,oFAA+E;AAGxE,IAAM,cAAc,GAApB,MAAM,cAAc;IAEnB,AAAN,KAAK,CAAC,SAAS,CAAY,EAAU,EAAS,OAAwB;QACpE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,qBAAS,CAAC,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,UAAU,CAAS,MAAiB,EAAS,OAAwB;QACzE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,qBAAS,CAAC;YAC1C,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAA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C;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAY,qBAAS;;6CAEzC;yBA/CU,cAAc;IAD1B,IAAA,uBAAQ,EAAC,qBAAS,CAAC;GACP,cAAc,CAgD1B","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Checklist } from './checklist'\nimport { ChecklistList } from './checklist-type'\nimport { ChecklistItem } from '../checklist-item/checklist-item'\nimport { BuildingInspection } from '../building-inspection/building-inspection'\n\n@Resolver(Checklist)\nexport class ChecklistQuery {\n @Query(returns => Checklist!, { nullable: true, description: 'To fetch a Checklist' })\n async checklist(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Checklist> {\n const { domain } = context.state\n\n return await getRepository(Checklist).findOne({\n where: { id }\n })\n }\n\n @Query(returns => ChecklistList, { description: 'To fetch multiple Checklists' })\n async checklists(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ChecklistList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(Checklist),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [ChecklistItem])\n async checklistItems(@Root() checklist: Checklist): Promise<ChecklistItem[]> {\n return await getRepository(ChecklistItem)\n .createQueryBuilder('ci')\n .where('ci.checklist_id = :checklistId', { checklistId: checklist.id })\n .orderBy('ci.sequence', 'ASC')\n .getMany()\n }\n\n @FieldResolver(type => BuildingInspection)\n async buildingInspection(@Root() checklist: Checklist): Promise<BuildingInspection> {\n return await getRepository(BuildingInspection).findOneBy({ checklist: { id: checklist.id } })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() checklist: Checklist): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklist.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() checklist: Checklist): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklist.creatorId })\n }\n}\n"]}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import { Checklist } from './checklist';
|
|
2
|
-
export declare class NewChecklist {
|
|
3
|
-
name: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
active?: boolean;
|
|
6
|
-
params?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class ChecklistPatch {
|
|
9
|
-
id?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
active?: boolean;
|
|
13
|
-
cuFlag?: string;
|
|
14
|
-
}
|
|
15
2
|
export declare class ChecklistList {
|
|
16
3
|
items: Checklist[];
|
|
17
4
|
total: number;
|
|
@@ -1,59 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChecklistList =
|
|
3
|
+
exports.ChecklistList = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const checklist_1 = require("./checklist");
|
|
7
|
-
let NewChecklist = class NewChecklist {
|
|
8
|
-
};
|
|
9
|
-
tslib_1.__decorate([
|
|
10
|
-
(0, type_graphql_1.Field)(),
|
|
11
|
-
tslib_1.__metadata("design:type", String)
|
|
12
|
-
], NewChecklist.prototype, "name", void 0);
|
|
13
|
-
tslib_1.__decorate([
|
|
14
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
15
|
-
tslib_1.__metadata("design:type", String)
|
|
16
|
-
], NewChecklist.prototype, "description", void 0);
|
|
17
|
-
tslib_1.__decorate([
|
|
18
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
19
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
20
|
-
], NewChecklist.prototype, "active", void 0);
|
|
21
|
-
tslib_1.__decorate([
|
|
22
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
-
tslib_1.__metadata("design:type", String)
|
|
24
|
-
], NewChecklist.prototype, "params", void 0);
|
|
25
|
-
NewChecklist = tslib_1.__decorate([
|
|
26
|
-
(0, type_graphql_1.InputType)()
|
|
27
|
-
], NewChecklist);
|
|
28
|
-
exports.NewChecklist = NewChecklist;
|
|
29
|
-
let ChecklistPatch = class ChecklistPatch {
|
|
30
|
-
};
|
|
31
|
-
tslib_1.__decorate([
|
|
32
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
33
|
-
tslib_1.__metadata("design:type", String)
|
|
34
|
-
], ChecklistPatch.prototype, "id", void 0);
|
|
35
|
-
tslib_1.__decorate([
|
|
36
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
37
|
-
tslib_1.__metadata("design:type", String)
|
|
38
|
-
], ChecklistPatch.prototype, "name", void 0);
|
|
39
|
-
tslib_1.__decorate([
|
|
40
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
41
|
-
tslib_1.__metadata("design:type", String)
|
|
42
|
-
], ChecklistPatch.prototype, "description", void 0);
|
|
43
|
-
tslib_1.__decorate([
|
|
44
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
46
|
-
], ChecklistPatch.prototype, "active", void 0);
|
|
47
|
-
tslib_1.__decorate([
|
|
48
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
49
|
-
tslib_1.__metadata("design:type", String)
|
|
50
|
-
], ChecklistPatch.prototype, "cuFlag", void 0);
|
|
51
|
-
ChecklistPatch = tslib_1.__decorate([
|
|
52
|
-
(0, type_graphql_1.InputType)()
|
|
53
|
-
], ChecklistPatch);
|
|
54
|
-
exports.ChecklistPatch = ChecklistPatch;
|
|
55
7
|
let ChecklistList = class ChecklistList {
|
|
56
8
|
};
|
|
9
|
+
exports.ChecklistList = ChecklistList;
|
|
57
10
|
tslib_1.__decorate([
|
|
58
11
|
(0, type_graphql_1.Field)(type => [checklist_1.Checklist]),
|
|
59
12
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -62,8 +15,7 @@ tslib_1.__decorate([
|
|
|
62
15
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
63
16
|
tslib_1.__metadata("design:type", Number)
|
|
64
17
|
], ChecklistList.prototype, "total", void 0);
|
|
65
|
-
ChecklistList = tslib_1.__decorate([
|
|
18
|
+
exports.ChecklistList = ChecklistList = tslib_1.__decorate([
|
|
66
19
|
(0, type_graphql_1.ObjectType)()
|
|
67
20
|
], ChecklistList);
|
|
68
|
-
exports.ChecklistList = ChecklistList;
|
|
69
21
|
//# sourceMappingURL=checklist-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-type.js","sourceRoot":"","sources":["../../../server/service/checklist/checklist-type.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"checklist-type.js","sourceRoot":"","sources":["../../../server/service/checklist/checklist-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAqD;AACrD,2CAAuC;AAEhC,IAAM,aAAa,GAAnB,MAAM,aAAa;CAMzB,CAAA;AANY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAS,CAAC,CAAC;;4CACT;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;wBALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB","sourcesContent":["import { ObjectType, Field, Int } from 'type-graphql'\nimport { Checklist } from './checklist'\n@ObjectType()\nexport class ChecklistList {\n @Field(type => [Checklist])\n items: Checklist[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { User } from '@things-factory/auth-base';
|
|
2
|
-
import { Task } from '@dssp/project';
|
|
3
2
|
import { ChecklistItem } from '../checklist-item/checklist-item';
|
|
4
3
|
import { BuildingInspection } from '../building-inspection/building-inspection';
|
|
4
|
+
import { ProjectType } from '../building-inspection/building-inspection';
|
|
5
|
+
export declare enum ChecklistReferenceType {
|
|
6
|
+
INSPECTION = "INSPECTION",// 검측
|
|
7
|
+
TASK = "TASK"
|
|
8
|
+
}
|
|
5
9
|
export declare class Checklist {
|
|
6
10
|
readonly id: string;
|
|
7
11
|
name?: string;
|
|
8
12
|
documentNo?: string;
|
|
13
|
+
projectType?: ProjectType;
|
|
14
|
+
checklistReferenceType?: ChecklistReferenceType;
|
|
9
15
|
constructionType?: string;
|
|
10
16
|
constructionDetailType?: string;
|
|
11
17
|
location?: string;
|
|
@@ -17,8 +23,14 @@ export declare class Checklist {
|
|
|
17
23
|
taskConstructorSignature?: string;
|
|
18
24
|
overallSupervisorySignature?: string;
|
|
19
25
|
taskSupervisorySignature?: string;
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
overallConstructor?: User;
|
|
27
|
+
overallConstructorId?: string;
|
|
28
|
+
taskConstructor?: User;
|
|
29
|
+
taskConstructorId?: string;
|
|
30
|
+
overallSupervisory?: User;
|
|
31
|
+
overallSupervisoryId?: string;
|
|
32
|
+
taskSupervisory?: User;
|
|
33
|
+
taskSupervisoryId?: string;
|
|
22
34
|
checklistItems?: ChecklistItem[];
|
|
23
35
|
buildingInspection?: BuildingInspection;
|
|
24
36
|
createdAt?: Date;
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Checklist = void 0;
|
|
3
|
+
exports.Checklist = exports.ChecklistReferenceType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const typeorm_1 = require("typeorm");
|
|
6
6
|
const type_graphql_1 = require("type-graphql");
|
|
7
7
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
-
const project_1 = require("@dssp/project");
|
|
9
8
|
const checklist_item_1 = require("../checklist-item/checklist-item");
|
|
10
9
|
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
10
|
+
const building_inspection_2 = require("../building-inspection/building-inspection");
|
|
11
|
+
var ChecklistReferenceType;
|
|
12
|
+
(function (ChecklistReferenceType) {
|
|
13
|
+
ChecklistReferenceType["INSPECTION"] = "INSPECTION";
|
|
14
|
+
ChecklistReferenceType["TASK"] = "TASK"; // 공정표
|
|
15
|
+
})(ChecklistReferenceType || (exports.ChecklistReferenceType = ChecklistReferenceType = {}));
|
|
16
|
+
(0, type_graphql_1.registerEnumType)(ChecklistReferenceType, {
|
|
17
|
+
name: 'ChecklistReferenceType',
|
|
18
|
+
description: '체크리스트 참조 타입'
|
|
19
|
+
});
|
|
11
20
|
let Checklist = class Checklist {
|
|
12
21
|
};
|
|
22
|
+
exports.Checklist = Checklist;
|
|
13
23
|
tslib_1.__decorate([
|
|
14
24
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
15
25
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -21,27 +31,37 @@ tslib_1.__decorate([
|
|
|
21
31
|
tslib_1.__metadata("design:type", String)
|
|
22
32
|
], Checklist.prototype, "name", void 0);
|
|
23
33
|
tslib_1.__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true, comment: '문서 번호 동(4자리)-층(3자리)-시퀀스(6자리)' }),
|
|
34
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '문서 번호 - 검측: 동(4자리)-층(3자리)-시퀀스(6자리), 공정표: 날짜(6자리)-시퀀스(6자리)' }),
|
|
25
35
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
26
36
|
tslib_1.__metadata("design:type", String)
|
|
27
37
|
], Checklist.prototype, "documentNo", void 0);
|
|
28
38
|
tslib_1.__decorate([
|
|
29
|
-
(0, typeorm_1.Column)({ nullable: false, comment: '
|
|
39
|
+
(0, typeorm_1.Column)({ nullable: false, comment: '프로젝트 타입', default: building_inspection_2.ProjectType.DSSP }),
|
|
40
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
41
|
+
tslib_1.__metadata("design:type", String)
|
|
42
|
+
], Checklist.prototype, "projectType", void 0);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: false, comment: '체크리스트 참조 타입 (구분 용)', default: ChecklistReferenceType.INSPECTION }),
|
|
45
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
47
|
+
], Checklist.prototype, "checklistReferenceType", void 0);
|
|
48
|
+
tslib_1.__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '공종' }),
|
|
30
50
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
31
51
|
tslib_1.__metadata("design:type", String)
|
|
32
52
|
], Checklist.prototype, "constructionType", void 0);
|
|
33
53
|
tslib_1.__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ nullable:
|
|
54
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '세부 공종' }),
|
|
35
55
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
36
56
|
tslib_1.__metadata("design:type", String)
|
|
37
57
|
], Checklist.prototype, "constructionDetailType", void 0);
|
|
38
58
|
tslib_1.__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ nullable:
|
|
59
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '위치 (x동 x층)' }),
|
|
40
60
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
41
61
|
tslib_1.__metadata("design:type", String)
|
|
42
62
|
], Checklist.prototype, "location", void 0);
|
|
43
63
|
tslib_1.__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ nullable:
|
|
64
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 도면 타입', default: '' }),
|
|
45
65
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
46
66
|
tslib_1.__metadata("design:type", String)
|
|
47
67
|
], Checklist.prototype, "inspectionDrawingType", void 0);
|
|
@@ -81,15 +101,41 @@ tslib_1.__decorate([
|
|
|
81
101
|
tslib_1.__metadata("design:type", String)
|
|
82
102
|
], Checklist.prototype, "taskSupervisorySignature", void 0);
|
|
83
103
|
tslib_1.__decorate([
|
|
84
|
-
(0, typeorm_1.ManyToOne)(
|
|
85
|
-
(0,
|
|
86
|
-
(
|
|
87
|
-
|
|
88
|
-
], Checklist.prototype, "task", void 0);
|
|
104
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
105
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: '총괄 시공 책임자' }),
|
|
106
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
107
|
+
], Checklist.prototype, "overallConstructor", void 0);
|
|
89
108
|
tslib_1.__decorate([
|
|
90
|
-
(0, typeorm_1.RelationId)((checklist) => checklist.
|
|
109
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.overallConstructor),
|
|
91
110
|
tslib_1.__metadata("design:type", String)
|
|
92
|
-
], Checklist.prototype, "
|
|
111
|
+
], Checklist.prototype, "overallConstructorId", void 0);
|
|
112
|
+
tslib_1.__decorate([
|
|
113
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
114
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: '공종별 시공 관리자' }),
|
|
115
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
116
|
+
], Checklist.prototype, "taskConstructor", void 0);
|
|
117
|
+
tslib_1.__decorate([
|
|
118
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.taskConstructor),
|
|
119
|
+
tslib_1.__metadata("design:type", String)
|
|
120
|
+
], Checklist.prototype, "taskConstructorId", void 0);
|
|
121
|
+
tslib_1.__decorate([
|
|
122
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
123
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: '총괄 감리 책임자' }),
|
|
124
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
125
|
+
], Checklist.prototype, "overallSupervisory", void 0);
|
|
126
|
+
tslib_1.__decorate([
|
|
127
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.overallSupervisory),
|
|
128
|
+
tslib_1.__metadata("design:type", String)
|
|
129
|
+
], Checklist.prototype, "overallSupervisoryId", void 0);
|
|
130
|
+
tslib_1.__decorate([
|
|
131
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
132
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: '건축사보 (공종별 감리 관리자)' }),
|
|
133
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
134
|
+
], Checklist.prototype, "taskSupervisory", void 0);
|
|
135
|
+
tslib_1.__decorate([
|
|
136
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.taskSupervisory),
|
|
137
|
+
tslib_1.__metadata("design:type", String)
|
|
138
|
+
], Checklist.prototype, "taskSupervisoryId", void 0);
|
|
93
139
|
tslib_1.__decorate([
|
|
94
140
|
(0, typeorm_1.OneToMany)(() => checklist_item_1.ChecklistItem, checklistItem => checklistItem.checklist),
|
|
95
141
|
(0, type_graphql_1.Field)(() => [checklist_item_1.ChecklistItem]),
|
|
@@ -133,11 +179,9 @@ tslib_1.__decorate([
|
|
|
133
179
|
(0, typeorm_1.RelationId)((checklist) => checklist.updater),
|
|
134
180
|
tslib_1.__metadata("design:type", String)
|
|
135
181
|
], Checklist.prototype, "updaterId", void 0);
|
|
136
|
-
Checklist = tslib_1.__decorate([
|
|
182
|
+
exports.Checklist = Checklist = tslib_1.__decorate([
|
|
137
183
|
(0, typeorm_1.Entity)({ comment: '체크리스트' }),
|
|
138
|
-
(0, typeorm_1.Index)('ix_checklist_0', (checklist) => [checklist.task], { where: '"deleted_at" IS NULL' }),
|
|
139
184
|
(0, typeorm_1.Index)('ix_checklist_1', (checklist) => [checklist.documentNo, checklist.createdAt], { where: '"deleted_at" IS NULL' }),
|
|
140
185
|
(0, type_graphql_1.ObjectType)()
|
|
141
186
|
], Checklist);
|
|
142
|
-
exports.Checklist = Checklist;
|
|
143
187
|
//# sourceMappingURL=checklist.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist.js","sourceRoot":"","sources":["../../../server/service/checklist/checklist.ts"],"names":[],"mappings":";;;;AAAA,qCAagB;AAChB,+CAAsE;AAEtE,yDAAgD;AAChD,2CAAoC;AACpC,qEAAgE;AAChE,oFAA+E;AAMxE,IAAM,SAAS,GAAf,MAAM,SAAS;CAqGrB,CAAA;AApGC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qCACC;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACzC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACb;AAEb;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;IACnE,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACP;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC1C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACD;AAEzB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC7C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACK;AAE/B;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC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Column,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { Task } from '@dssp/project'\nimport { ChecklistItem } from '../checklist-item/checklist-item'\nimport { BuildingInspection } from '../building-inspection/building-inspection'\n\n@Entity({ comment: '체크리스트' })\n@Index('ix_checklist_0', (checklist: Checklist) => [checklist.task], { where: '\"deleted_at\" IS NULL' })\n@Index('ix_checklist_1', (checklist: Checklist) => [checklist.documentNo, checklist.createdAt], { where: '\"deleted_at\" IS NULL' })\n@ObjectType()\nexport class Checklist {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, comment: '이름' })\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true, comment: '문서 번호 동(4자리)-층(3자리)-시퀀스(6자리)' })\n @Field({ nullable: true })\n documentNo?: string\n\n @Column({ nullable: false, comment: '공종' })\n @Field({ nullable: true })\n constructionType?: string\n\n @Column({ nullable: false, comment: '세부 공종' })\n @Field({ nullable: true })\n constructionDetailType?: string\n\n @Column({ nullable: false, comment: '위치 (x동 x층)' })\n @Field({ nullable: true })\n location?: string\n\n @Column({ nullable: false, comment: '검측 도면 타입', default: '' })\n @Field({ nullable: true })\n inspectionDrawingType?: string\n\n @Column('simple-array', { nullable: true, comment: '검측 부위' })\n @Field(() => [String], { nullable: true })\n inspectionParts?: string[]\n\n @Column({ nullable: true, comment: '시공자 점검일' })\n @Field({ nullable: true })\n constructionInspectionDate?: Date\n\n @Column({ nullable: true, comment: '감리자 점검일' })\n @Field({ nullable: true })\n supervisorInspectionDate?: Date\n\n @Column({ nullable: true, comment: '총괄 시공 책임자 사인' })\n @Field({ nullable: true })\n overallConstructorSignature?: string\n\n @Column({ nullable: true, comment: '공종별 시공 관리자 사인' })\n @Field({ nullable: true })\n taskConstructorSignature?: string\n\n @Column({ nullable: true, comment: '총괄 감리 책임자 사인' })\n @Field({ nullable: true })\n overallSupervisorySignature?: string\n\n @Column({ nullable: true, comment: '건축사보 (공종별 감리 관리자) 사인' })\n @Field({ nullable: true })\n taskSupervisorySignature?: string\n\n // 공정표 작업 정보 (상위 테이블 참조)\n @ManyToOne(() => Task)\n @JoinColumn()\n @Field(() => Task)\n task?: Task\n\n @RelationId((checklist: Checklist) => checklist.task)\n taskId?: string\n\n // 체크리스트 아이템 정보 (하위 테이블 참조)\n @OneToMany(() => ChecklistItem, checklistItem => checklistItem.checklist)\n @Field(() => [ChecklistItem])\n checklistItems?: ChecklistItem[]\n\n // 검측 정보 (1:1 하위 테이블 참조)\n @OneToOne(() => BuildingInspection, buildingInspection => buildingInspection.checklist)\n @Field(() => BuildingInspection)\n buildingInspection?: BuildingInspection\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((checklist: Checklist) => checklist.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((checklist: Checklist) => checklist.updater)\n updaterId?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"checklist.js","sourceRoot":"","sources":["../../../server/service/checklist/checklist.ts"],"names":[],"mappings":";;;;AAAA,qCAYgB;AAChB,+CAAsE;AAEtE,yDAAgD;AAChD,qEAAgE;AAChE,oFAA+E;AAC/E,oFAAwE;AAExE,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,uCAAa,CAAA,CAAC,MAAM;AACtB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC;AAED,IAAA,+BAAgB,EAAC,sBAAsB,EAAE;IACvC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,aAAa;CAC3B,CAAC,C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AAE,IAAI,EAAE,CAAC;sCACd,IAAI;4CAAA;AAIhB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;0CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;;4CACtC;oBA/HP,SAAS;IAHrB,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC5B,IAAA,eAAK,EAAC,gBAAgB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC;IACjI,IAAA,yBAAU,GAAE;GACA,SAAS,CAgIrB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n OneToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistItem } from '../checklist-item/checklist-item'\nimport { BuildingInspection } from '../building-inspection/building-inspection'\nimport { ProjectType } from '../building-inspection/building-inspection'\n\nexport enum ChecklistReferenceType {\n INSPECTION = 'INSPECTION', // 검측\n TASK = 'TASK' // 공정표\n}\n\nregisterEnumType(ChecklistReferenceType, {\n name: 'ChecklistReferenceType',\n description: '체크리스트 참조 타입'\n})\n\n@Entity({ comment: '체크리스트' })\n@Index('ix_checklist_1', (checklist: Checklist) => [checklist.documentNo, checklist.createdAt], { where: '\"deleted_at\" IS NULL' })\n@ObjectType()\nexport class Checklist {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, comment: '이름' })\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true, comment: '문서 번호 - 검측: 동(4자리)-층(3자리)-시퀀스(6자리), 공정표: 날짜(6자리)-시퀀스(6자리)' })\n @Field({ nullable: true })\n documentNo?: string\n\n @Column({ nullable: false, comment: '프로젝트 타입', default: ProjectType.DSSP })\n @Field({ nullable: true })\n projectType?: ProjectType\n\n @Column({ nullable: false, comment: '체크리스트 참조 타입 (구분 용)', default: ChecklistReferenceType.INSPECTION })\n @Field({ nullable: true })\n checklistReferenceType?: ChecklistReferenceType\n\n @Column({ nullable: true, comment: '공종' })\n @Field({ nullable: true })\n constructionType?: string\n\n @Column({ nullable: true, comment: '세부 공종' })\n @Field({ nullable: true })\n constructionDetailType?: string\n\n @Column({ nullable: true, comment: '위치 (x동 x층)' })\n @Field({ nullable: true })\n location?: string\n\n @Column({ nullable: true, comment: '검측 도면 타입', default: '' })\n @Field({ nullable: true })\n inspectionDrawingType?: string\n\n @Column('simple-array', { nullable: true, comment: '검측 부위' })\n @Field(() => [String], { nullable: true })\n inspectionParts?: string[]\n\n @Column({ nullable: true, comment: '시공자 점검일' })\n @Field({ nullable: true })\n constructionInspectionDate?: Date\n\n @Column({ nullable: true, comment: '감리자 점검일' })\n @Field({ nullable: true })\n supervisorInspectionDate?: Date\n\n @Column({ nullable: true, comment: '총괄 시공 책임자 사인' })\n @Field({ nullable: true })\n overallConstructorSignature?: string\n\n @Column({ nullable: true, comment: '공종별 시공 관리자 사인' })\n @Field({ nullable: true })\n taskConstructorSignature?: string\n\n @Column({ nullable: true, comment: '총괄 감리 책임자 사인' })\n @Field({ nullable: true })\n overallSupervisorySignature?: string\n\n @Column({ nullable: true, comment: '건축사보 (공종별 감리 관리자) 사인' })\n @Field({ nullable: true })\n taskSupervisorySignature?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: '총괄 시공 책임자' })\n overallConstructor?: User\n\n @RelationId((checklist: Checklist) => checklist.overallConstructor)\n overallConstructorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: '공종별 시공 관리자' })\n taskConstructor?: User\n\n @RelationId((checklist: Checklist) => checklist.taskConstructor)\n taskConstructorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: '총괄 감리 책임자' })\n overallSupervisory?: User\n\n @RelationId((checklist: Checklist) => checklist.overallSupervisory)\n overallSupervisoryId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: '건축사보 (공종별 감리 관리자)' })\n taskSupervisory?: User\n\n @RelationId((checklist: Checklist) => checklist.taskSupervisory)\n taskSupervisoryId?: string\n\n // 체크리스트 아이템 정보 (하위 테이블 참조)\n @OneToMany(() => ChecklistItem, checklistItem => checklistItem.checklist)\n @Field(() => [ChecklistItem])\n checklistItems?: ChecklistItem[]\n\n // 검측 정보 (1:1 하위 테이블 참조)\n @OneToOne(() => BuildingInspection, buildingInspection => buildingInspection.checklist)\n @Field(() => BuildingInspection)\n buildingInspection?: BuildingInspection\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((checklist: Checklist) => checklist.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((checklist: Checklist) => checklist.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -2,7 +2,5 @@ import { Checklist } from './checklist';
|
|
|
2
2
|
import { ChecklistQuery } from './checklist-query';
|
|
3
3
|
import { ChecklistHistory } from './checklist-history';
|
|
4
4
|
import { ChecklistMutation } from './checklist-mutation';
|
|
5
|
-
import { ChecklistHistoryEntitySubscriber } from './event-subscriber';
|
|
6
5
|
export declare const entities: (typeof Checklist | typeof ChecklistHistory)[];
|
|
7
6
|
export declare const resolvers: (typeof ChecklistQuery | typeof ChecklistMutation)[];
|
|
8
|
-
export declare const subscribers: (typeof ChecklistHistoryEntitySubscriber)[];
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
4
|
const checklist_1 = require("./checklist");
|
|
5
5
|
const checklist_query_1 = require("./checklist-query");
|
|
6
6
|
const checklist_history_1 = require("./checklist-history");
|
|
7
7
|
const checklist_mutation_1 = require("./checklist-mutation");
|
|
8
|
-
const event_subscriber_1 = require("./event-subscriber");
|
|
9
8
|
exports.entities = [checklist_1.Checklist, checklist_history_1.ChecklistHistory];
|
|
10
9
|
exports.resolvers = [checklist_query_1.ChecklistQuery, checklist_mutation_1.ChecklistMutation];
|
|
11
|
-
exports.subscribers = [event_subscriber_1.ChecklistHistoryEntitySubscriber];
|
|
12
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist/index.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,uDAAkD;AAClD,2DAAsD;AACtD,6DAAwD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist/index.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,uDAAkD;AAClD,2DAAsD;AACtD,6DAAwD;AAE3C,QAAA,QAAQ,GAAG,CAAC,qBAAS,EAAE,oCAAgB,CAAC,CAAA;AACxC,QAAA,SAAS,GAAG,CAAC,gCAAc,EAAE,sCAAiB,CAAC,CAAA","sourcesContent":["import { Checklist } from './checklist'\nimport { ChecklistQuery } from './checklist-query'\nimport { ChecklistHistory } from './checklist-history'\nimport { ChecklistMutation } from './checklist-mutation'\n\nexport const entities = [Checklist, ChecklistHistory]\nexport const resolvers = [ChecklistQuery, ChecklistMutation]\n"]}
|
|
@@ -6,8 +6,8 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const checklist_item_1 = require("./checklist-item");
|
|
7
7
|
let ChecklistItemMutation = class ChecklistItemMutation {
|
|
8
8
|
};
|
|
9
|
-
ChecklistItemMutation =
|
|
9
|
+
exports.ChecklistItemMutation = ChecklistItemMutation;
|
|
10
|
+
exports.ChecklistItemMutation = ChecklistItemMutation = tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Resolver)(checklist_item_1.ChecklistItem)
|
|
11
12
|
], ChecklistItemMutation);
|
|
12
|
-
exports.ChecklistItemMutation = ChecklistItemMutation;
|
|
13
13
|
//# sourceMappingURL=checklist-item-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qDAAgD;AAGzC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAAG,CAAA;AAAxB,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,qBAAqB,CAAG
|
|
1
|
+
{"version":3,"file":"checklist-item-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qDAAgD;AAGzC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAAG,CAAA;AAAxB,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,qBAAqB,CAAG","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { ChecklistItem } from './checklist-item'\n\n@Resolver(ChecklistItem)\nexport class ChecklistItemMutation {}\n"]}
|
|
@@ -65,6 +65,7 @@ let ChecklistItemQuery = class ChecklistItemQuery {
|
|
|
65
65
|
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklistItem.creatorId });
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
+
exports.ChecklistItemQuery = ChecklistItemQuery;
|
|
68
69
|
tslib_1.__decorate([
|
|
69
70
|
(0, type_graphql_1.Query)(returns => checklist_item_1.ChecklistItem, { nullable: true, description: 'To fetch a ChecklistItem' }),
|
|
70
71
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -129,8 +130,7 @@ tslib_1.__decorate([
|
|
|
129
130
|
tslib_1.__metadata("design:paramtypes", [checklist_item_1.ChecklistItem]),
|
|
130
131
|
tslib_1.__metadata("design:returntype", Promise)
|
|
131
132
|
], ChecklistItemQuery.prototype, "creator", null);
|
|
132
|
-
ChecklistItemQuery = tslib_1.__decorate([
|
|
133
|
+
exports.ChecklistItemQuery = ChecklistItemQuery = tslib_1.__decorate([
|
|
133
134
|
(0, type_graphql_1.Resolver)(checklist_item_1.ChecklistItem)
|
|
134
135
|
], ChecklistItemQuery);
|
|
135
|
-
exports.ChecklistItemQuery = ChecklistItemQuery;
|
|
136
136
|
//# sourceMappingURL=checklist-item-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item-query.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-query.ts"],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A,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAgB,8BAAa;;iDAEjD;6BAxEU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,kBAAkB,CAyE9B","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { Attachment } from '@things-factory/attachment-base'\nimport { getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistItem } from './checklist-item'\nimport { ChecklistItemList } from './checklist-item-type'\nimport { ChecklistItemComment } from '../checklist-item-comment/checklist-item-comment'\nimport { BuildingInspection } from '../building-inspection/building-inspection'\n\n@Resolver(ChecklistItem)\nexport class ChecklistItemQuery {\n @Query(returns => ChecklistItem!, { nullable: true, description: 'To fetch a ChecklistItem' })\n async checklistItem(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<ChecklistItem> {\n return await getRepository(ChecklistItem).findOne({\n where: { id }\n })\n }\n\n @Query(returns => ChecklistItemList, { description: 'To fetch multiple ChecklistItems' })\n async checklistItems(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ChecklistItemList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(ChecklistItem),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Query(returns => BuildingInspection, { description: 'BuildingInspection By ChecklistItemId' })\n async inspectionByChecklistItemId(checklistItemId: string): Promise<BuildingInspection> {\n return getRepository(BuildingInspection)\n .createQueryBuilder('bi')\n .innerJoin('checklists', 'c', 'bi.checklist_id = c.id')\n .innerJoin('checklist_items', 'ci', 'c.id = ci.checklist_id')\n .where('ci.id = :checklistItemId', { checklistItemId })\n .getOne()\n }\n\n @FieldResolver(type => [ChecklistItemComment])\n async checklistItemComments(@Root() checklistItem: ChecklistItem): Promise<ChecklistItemComment[]> {\n return await getRepository(ChecklistItemComment).findBy({ checklistItem: { id: checklistItem.id } })\n }\n\n @FieldResolver(type => Number)\n async checklistItemCommentCount(@Root() checklistItem: ChecklistItem): Promise<number> {\n return await getRepository(ChecklistItemComment).countBy({ checklistItem: { id: checklistItem.id } })\n }\n\n @FieldResolver(type => [Attachment])\n async checklistItemAttachments(@Root() checklistItem: ChecklistItem): Promise<Attachment[]> {\n return await getRepository(Attachment).find({\n where: {\n refType: ChecklistItem.name,\n refBy: checklistItem.id\n },\n order: {\n createdAt: 'DESC'\n }\n })\n }\n\n @FieldResolver(type => Number)\n async checklistItemAttachmentCount(@Root() checklistItem: ChecklistItem): Promise<number> {\n return await getRepository(Attachment).count({\n where: {\n refType: ChecklistItem.name,\n refBy: checklistItem.id\n }\n })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() checklistItem: ChecklistItem): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistItem.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() checklistItem: ChecklistItem): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistItem.creatorId })\n }\n}\n"]}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const checklist_item_1 = require("./checklist-item");
|
|
7
7
|
let ChecklistItemList = class ChecklistItemList {
|
|
8
8
|
};
|
|
9
|
+
exports.ChecklistItemList = ChecklistItemList;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(type => [checklist_item_1.ChecklistItem]),
|
|
11
12
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -14,8 +15,7 @@ tslib_1.__decorate([
|
|
|
14
15
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
15
16
|
tslib_1.__metadata("design:type", Number)
|
|
16
17
|
], ChecklistItemList.prototype, "total", void 0);
|
|
17
|
-
ChecklistItemList = tslib_1.__decorate([
|
|
18
|
+
exports.ChecklistItemList = ChecklistItemList = tslib_1.__decorate([
|
|
18
19
|
(0, type_graphql_1.ObjectType)()
|
|
19
20
|
], ChecklistItemList);
|
|
20
|
-
exports.ChecklistItemList = ChecklistItemList;
|
|
21
21
|
//# sourceMappingURL=checklist-item-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item-type.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,qDAAgD;AAGzC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAM7B,CAAA;
|
|
1
|
+
{"version":3,"file":"checklist-item-type.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,qDAAgD;AAGzC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAM7B,CAAA;AANY,8CAAiB;AAE5B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,8BAAa,CAAC,CAAC;;gDACT;AAGtB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;gDACN;4BALF,iBAAiB;IAD7B,IAAA,yBAAU,GAAE;GACA,iBAAiB,CAM7B","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { ChecklistItem } from './checklist-item'\n\n@ObjectType()\nexport class ChecklistItemList {\n @Field(type => [ChecklistItem])\n items: ChecklistItem[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|