@dssp/supervision 1.0.0-alpha.4 → 1.0.0-alpha.40
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 +100 -0
- package/dist-client/graphql/building-inspection.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +9 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +130 -72
- 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 +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +77 -14
- 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 +18 -2
- package/dist-client/pages/building-inspection/building-inspection-list.js +360 -28
- 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/daily-worklog-popup.d.ts +27 -0
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +542 -0
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.js +351 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +20 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +432 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +30 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +479 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -0
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +27 -0
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +401 -0
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +2 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +39 -17
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-create-popup.js +22 -9
- 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 +60 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +1132 -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 +740 -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/grid-inspection-list-layer.d.ts +19 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +205 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.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.d.ts +1 -0
- package/dist-client/pages/checklist/attachment-list-popup.js +250 -67
- package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.d.ts +7 -0
- package/dist-client/pages/checklist/checklist-view.js +363 -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 +0 -1
- package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
- package/dist-client/pages/checklist/inspection-info-popup.d.ts +50 -0
- package/dist-client/pages/checklist/inspection-info-popup.js +684 -0
- package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -0
- package/dist-client/pages/checklist/inspection-tab-popup.d.ts +18 -0
- package/dist-client/pages/checklist/inspection-tab-popup.js +196 -0
- package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -0
- 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 +2 -2
- package/dist-client/pages/checklist-template/checklist-template-list.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/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.d.ts +1 -0
- package/dist-server/service/building-inspection/building-inspection-history.js +5 -0
- package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +3 -3
- package/dist-server/service/building-inspection/building-inspection-mutation.js +145 -34
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +3 -4
- package/dist-server/service/building-inspection/building-inspection-query.js +46 -30
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +28 -9
- package/dist-server/service/building-inspection/building-inspection-type.js +96 -17
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +13 -0
- package/dist-server/service/building-inspection/building-inspection.js +55 -2
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/building-inspection/index.d.ts +5 -8
- package/dist-server/service/building-inspection/index.js +11 -6
- package/dist-server/service/building-inspection/index.js.map +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +56 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +16 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +171 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +23 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +90 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +33 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +132 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
- package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
- package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +16 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.js +120 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +5 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.js +21 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +34 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.js +157 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -0
- package/dist-server/service/{building-inspection → building-inspection-history}/event-subscriber.d.ts +1 -1
- package/dist-server/service/{building-inspection → building-inspection-history}/event-subscriber.js +1 -1
- package/dist-server/service/building-inspection-history/event-subscriber.js.map +1 -0
- package/dist-server/service/building-inspection-history/index.d.ts +6 -0
- package/dist-server/service/building-inspection-history/index.js +10 -0
- package/dist-server/service/building-inspection-history/index.js.map +1 -0
- package/dist-server/service/checklist/checklist-history.d.ts +8 -0
- package/dist-server/service/checklist/checklist-history.js +36 -0
- 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 +1 -67
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
- package/dist-server/service/checklist/checklist-query.d.ts +6 -0
- package/dist-server/service/checklist/checklist-query.js +63 -0
- 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 +1 -49
- package/dist-server/service/checklist/checklist-type.js.map +1 -1
- package/dist-server/service/checklist/checklist.d.ts +38 -3
- package/dist-server/service/checklist/checklist.js +131 -15
- package/dist-server/service/checklist/checklist.js.map +1 -1
- package/dist-server/service/checklist/event-subscriber.d.ts +2 -2
- package/dist-server/service/checklist/event-subscriber.js +2 -2
- package/dist-server/service/checklist/event-subscriber.js.map +1 -1
- package/dist-server/service/checklist/index.d.ts +1 -4
- package/dist-server/service/checklist/index.js +2 -5
- package/dist-server/service/checklist/index.js.map +1 -1
- package/dist-server/service/checklist-history/checklist-history-query.d.ts +11 -0
- package/dist-server/service/checklist-history/checklist-history-query.js +77 -0
- package/dist-server/service/checklist-history/checklist-history-query.js.map +1 -0
- package/dist-server/service/checklist-history/checklist-history-type.d.ts +5 -0
- package/dist-server/service/checklist-history/checklist-history-type.js +21 -0
- package/dist-server/service/checklist-history/checklist-history-type.js.map +1 -0
- package/dist-server/service/checklist-history/checklist-history.d.ts +50 -0
- package/dist-server/service/checklist-history/checklist-history.js +239 -0
- package/dist-server/service/checklist-history/checklist-history.js.map +1 -0
- package/dist-server/service/checklist-history/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist-history/event-subscriber.js +21 -0
- package/dist-server/service/checklist-history/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist-history/index.d.ts +6 -0
- package/dist-server/service/checklist-history/index.js +10 -0
- package/dist-server/service/checklist-history/index.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-query.d.ts +1 -1
- package/dist-server/service/checklist-item/checklist-item-query.js +5 -3
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
- package/dist-server/service/checklist-item/index.d.ts +0 -1
- package/dist-server/service/checklist-item/index.js +1 -2
- package/dist-server/service/checklist-item/index.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 +33 -6
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.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-item-history/checklist-item-history-query.d.ts +16 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-query.js +123 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +1 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +5 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.js +21 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +1 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +25 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.js +123 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -0
- package/dist-server/service/checklist-item-history/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist-item-history/event-subscriber.js +21 -0
- package/dist-server/service/checklist-item-history/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist-item-history/index.d.ts +6 -0
- package/dist-server/service/checklist-item-history/index.js +10 -0
- package/dist-server/service/checklist-item-history/index.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js +2 -4
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
- package/dist-server/service/index.d.ts +4 -2
- package/dist-server/service/index.js +22 -13
- 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/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.d.ts +0 -2
- package/dist-server/service/project-report/project-report.js +0 -6
- 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/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/things-factory.config.js +3 -1
- package/dist-server/service/building-inspection/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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { HistoryActionType, HistoryEntityInterface } from '@operato/typeorm-history';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { Checklist, ChecklistReferenceType, InspectionResultStatus, InspectionResultType } from '../checklist/checklist';
|
|
4
|
+
import { ProjectType } from '../building-inspection/building-inspection';
|
|
5
|
+
import { BuildingInspectionHistory } from '../building-inspection-history/building-inspection-history';
|
|
6
|
+
import { ChecklistItemHistory } from '../checklist-item-history/checklist-item-history';
|
|
7
|
+
export declare class ChecklistHistory implements HistoryEntityInterface<Checklist> {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
documentNo?: string;
|
|
11
|
+
projectType?: ProjectType;
|
|
12
|
+
checklistReferenceType?: ChecklistReferenceType;
|
|
13
|
+
constructionType?: string;
|
|
14
|
+
constructionDetailType?: string;
|
|
15
|
+
location?: string;
|
|
16
|
+
inspectionDrawingType?: string;
|
|
17
|
+
inspectionParts?: string[];
|
|
18
|
+
constructionInspectionDate?: Date;
|
|
19
|
+
supervisorInspectionDate?: Date;
|
|
20
|
+
overallConstructorSignature?: string;
|
|
21
|
+
taskConstructorSignature?: string;
|
|
22
|
+
overallSupervisorySignature?: string;
|
|
23
|
+
taskSupervisorySignature?: string;
|
|
24
|
+
overallConstructor?: User;
|
|
25
|
+
overallConstructorId?: string;
|
|
26
|
+
taskConstructor?: User;
|
|
27
|
+
taskConstructorId?: string;
|
|
28
|
+
overallSupervisory?: User;
|
|
29
|
+
overallSupervisoryId?: string;
|
|
30
|
+
taskSupervisory?: User;
|
|
31
|
+
taskSupervisoryId?: string;
|
|
32
|
+
checklistItemHistories?: ChecklistItemHistory[];
|
|
33
|
+
buildingInspectionHistory?: BuildingInspectionHistory;
|
|
34
|
+
inspectionRequestDocumentNo?: string;
|
|
35
|
+
inspectionRequestMemo?: string;
|
|
36
|
+
inspectionRequestUpdatedAt?: Date;
|
|
37
|
+
inspectionResultDocumentNo?: string;
|
|
38
|
+
inspectionResultMemo?: string;
|
|
39
|
+
inspectionResultStatus?: InspectionResultStatus;
|
|
40
|
+
inspectionResultType?: InspectionResultType;
|
|
41
|
+
inspectionResultUpdatedAt?: Date;
|
|
42
|
+
createdAt?: Date;
|
|
43
|
+
loggedAt?: Date;
|
|
44
|
+
creator?: User;
|
|
45
|
+
creatorId?: string;
|
|
46
|
+
updater?: User;
|
|
47
|
+
updaterId?: string;
|
|
48
|
+
originalId: string;
|
|
49
|
+
action: HistoryActionType;
|
|
50
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistHistory = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const typeorm_history_1 = require("@operato/typeorm-history");
|
|
8
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
|
+
const env_1 = require("@things-factory/env");
|
|
10
|
+
const checklist_1 = require("../checklist/checklist");
|
|
11
|
+
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
12
|
+
const building_inspection_history_1 = require("../building-inspection-history/building-inspection-history");
|
|
13
|
+
const checklist_item_history_1 = require("../checklist-item-history/checklist-item-history");
|
|
14
|
+
const ORMCONFIG = env_1.config.get('ormconfig', {});
|
|
15
|
+
const DATABASE_TYPE = ORMCONFIG.type;
|
|
16
|
+
let ChecklistHistory = class ChecklistHistory {
|
|
17
|
+
};
|
|
18
|
+
exports.ChecklistHistory = ChecklistHistory;
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
22
|
+
tslib_1.__metadata("design:type", String)
|
|
23
|
+
], ChecklistHistory.prototype, "id", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '이름' }),
|
|
26
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
|
+
tslib_1.__metadata("design:type", String)
|
|
28
|
+
], ChecklistHistory.prototype, "name", void 0);
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '문서 번호 - 검측: 동(4자리)-층(3자리)-시퀀스(6자리), 공정표: 날짜(6자리)-시퀀스(6자리)' }),
|
|
31
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
32
|
+
tslib_1.__metadata("design:type", String)
|
|
33
|
+
], ChecklistHistory.prototype, "documentNo", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ nullable: false, comment: '프로젝트 타입', default: building_inspection_1.ProjectType.DSSP }),
|
|
36
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
38
|
+
], ChecklistHistory.prototype, "projectType", void 0);
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ nullable: false, comment: '체크리스트 참조 타입 (구분 용)', default: checklist_1.ChecklistReferenceType.INSPECTION }),
|
|
41
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
42
|
+
tslib_1.__metadata("design:type", String)
|
|
43
|
+
], ChecklistHistory.prototype, "checklistReferenceType", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '공종' }),
|
|
46
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
48
|
+
], ChecklistHistory.prototype, "constructionType", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '세부 공종' }),
|
|
51
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
52
|
+
tslib_1.__metadata("design:type", String)
|
|
53
|
+
], ChecklistHistory.prototype, "constructionDetailType", void 0);
|
|
54
|
+
tslib_1.__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '위치 (x동 x층)' }),
|
|
56
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
57
|
+
tslib_1.__metadata("design:type", String)
|
|
58
|
+
], ChecklistHistory.prototype, "location", void 0);
|
|
59
|
+
tslib_1.__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 도면 타입', default: '' }),
|
|
61
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
62
|
+
tslib_1.__metadata("design:type", String)
|
|
63
|
+
], ChecklistHistory.prototype, "inspectionDrawingType", void 0);
|
|
64
|
+
tslib_1.__decorate([
|
|
65
|
+
(0, typeorm_1.Column)('simple-array', { nullable: true, comment: '검측 부위' }),
|
|
66
|
+
(0, type_graphql_1.Field)(() => [String], { nullable: true }),
|
|
67
|
+
tslib_1.__metadata("design:type", Array)
|
|
68
|
+
], ChecklistHistory.prototype, "inspectionParts", void 0);
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '시공자 점검일' }),
|
|
71
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
72
|
+
tslib_1.__metadata("design:type", Date)
|
|
73
|
+
], ChecklistHistory.prototype, "constructionInspectionDate", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '감리자 점검일' }),
|
|
76
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
77
|
+
tslib_1.__metadata("design:type", Date)
|
|
78
|
+
], ChecklistHistory.prototype, "supervisorInspectionDate", void 0);
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '총괄 시공 책임자 사인' }),
|
|
81
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
82
|
+
tslib_1.__metadata("design:type", String)
|
|
83
|
+
], ChecklistHistory.prototype, "overallConstructorSignature", void 0);
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '공종별 시공 관리자 사인' }),
|
|
86
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
87
|
+
tslib_1.__metadata("design:type", String)
|
|
88
|
+
], ChecklistHistory.prototype, "taskConstructorSignature", void 0);
|
|
89
|
+
tslib_1.__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '총괄 감리 책임자 사인' }),
|
|
91
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
92
|
+
tslib_1.__metadata("design:type", String)
|
|
93
|
+
], ChecklistHistory.prototype, "overallSupervisorySignature", void 0);
|
|
94
|
+
tslib_1.__decorate([
|
|
95
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '건축사보 (공종별 감리 관리자) 사인' }),
|
|
96
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
97
|
+
tslib_1.__metadata("design:type", String)
|
|
98
|
+
], ChecklistHistory.prototype, "taskSupervisorySignature", void 0);
|
|
99
|
+
tslib_1.__decorate([
|
|
100
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
101
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: '총괄 시공 책임자' }),
|
|
102
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
103
|
+
], ChecklistHistory.prototype, "overallConstructor", void 0);
|
|
104
|
+
tslib_1.__decorate([
|
|
105
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.overallConstructor),
|
|
106
|
+
tslib_1.__metadata("design:type", String)
|
|
107
|
+
], ChecklistHistory.prototype, "overallConstructorId", void 0);
|
|
108
|
+
tslib_1.__decorate([
|
|
109
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
110
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: '공종별 시공 관리자' }),
|
|
111
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
112
|
+
], ChecklistHistory.prototype, "taskConstructor", void 0);
|
|
113
|
+
tslib_1.__decorate([
|
|
114
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.taskConstructor),
|
|
115
|
+
tslib_1.__metadata("design:type", String)
|
|
116
|
+
], ChecklistHistory.prototype, "taskConstructorId", void 0);
|
|
117
|
+
tslib_1.__decorate([
|
|
118
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
119
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: '총괄 감리 책임자' }),
|
|
120
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
121
|
+
], ChecklistHistory.prototype, "overallSupervisory", void 0);
|
|
122
|
+
tslib_1.__decorate([
|
|
123
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.overallSupervisory),
|
|
124
|
+
tslib_1.__metadata("design:type", String)
|
|
125
|
+
], ChecklistHistory.prototype, "overallSupervisoryId", void 0);
|
|
126
|
+
tslib_1.__decorate([
|
|
127
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
128
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: '건축사보 (공종별 감리 관리자)' }),
|
|
129
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
130
|
+
], ChecklistHistory.prototype, "taskSupervisory", void 0);
|
|
131
|
+
tslib_1.__decorate([
|
|
132
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.taskSupervisory),
|
|
133
|
+
tslib_1.__metadata("design:type", String)
|
|
134
|
+
], ChecklistHistory.prototype, "taskSupervisoryId", void 0);
|
|
135
|
+
tslib_1.__decorate([
|
|
136
|
+
(0, typeorm_1.OneToMany)(() => checklist_item_history_1.ChecklistItemHistory, checklistItem => checklistItem.checklistHistory),
|
|
137
|
+
(0, type_graphql_1.Field)(() => [checklist_item_history_1.ChecklistItemHistory]),
|
|
138
|
+
tslib_1.__metadata("design:type", Array)
|
|
139
|
+
], ChecklistHistory.prototype, "checklistItemHistories", void 0);
|
|
140
|
+
tslib_1.__decorate([
|
|
141
|
+
(0, typeorm_1.OneToOne)(() => building_inspection_history_1.BuildingInspectionHistory, buildingInspectionHistory => buildingInspectionHistory.checklistHistory),
|
|
142
|
+
(0, type_graphql_1.Field)(() => building_inspection_history_1.BuildingInspectionHistory),
|
|
143
|
+
tslib_1.__metadata("design:type", building_inspection_history_1.BuildingInspectionHistory)
|
|
144
|
+
], ChecklistHistory.prototype, "buildingInspectionHistory", void 0);
|
|
145
|
+
tslib_1.__decorate([
|
|
146
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 요청서 문서번호 - {네이밍} 검측 제02-00001호)' }) // DocumentNoType 참조
|
|
147
|
+
,
|
|
148
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
149
|
+
tslib_1.__metadata("design:type", String)
|
|
150
|
+
], ChecklistHistory.prototype, "inspectionRequestDocumentNo", void 0);
|
|
151
|
+
tslib_1.__decorate([
|
|
152
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 요청서 - 검측 사항' }),
|
|
153
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
154
|
+
tslib_1.__metadata("design:type", String)
|
|
155
|
+
], ChecklistHistory.prototype, "inspectionRequestMemo", void 0);
|
|
156
|
+
tslib_1.__decorate([
|
|
157
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 요청서 - 요청 시간' }),
|
|
158
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
159
|
+
tslib_1.__metadata("design:type", Date)
|
|
160
|
+
], ChecklistHistory.prototype, "inspectionRequestUpdatedAt", void 0);
|
|
161
|
+
tslib_1.__decorate([
|
|
162
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 결과 통보서 문서번호 - {네이밍} 검측 제03-00001호)' }) // DocumentNoType 참조
|
|
163
|
+
,
|
|
164
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
165
|
+
tslib_1.__metadata("design:type", String)
|
|
166
|
+
], ChecklistHistory.prototype, "inspectionResultDocumentNo", void 0);
|
|
167
|
+
tslib_1.__decorate([
|
|
168
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 결과 통보서 - 지시 사항' }),
|
|
169
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
170
|
+
tslib_1.__metadata("design:type", String)
|
|
171
|
+
], ChecklistHistory.prototype, "inspectionResultMemo", void 0);
|
|
172
|
+
tslib_1.__decorate([
|
|
173
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 결과 통보서 - 검측 결과 여부' }),
|
|
174
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
175
|
+
tslib_1.__metadata("design:type", String)
|
|
176
|
+
], ChecklistHistory.prototype, "inspectionResultStatus", void 0);
|
|
177
|
+
tslib_1.__decorate([
|
|
178
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 결과 통보서 - 검측 결과 타입' }),
|
|
179
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
180
|
+
tslib_1.__metadata("design:type", String)
|
|
181
|
+
], ChecklistHistory.prototype, "inspectionResultType", void 0);
|
|
182
|
+
tslib_1.__decorate([
|
|
183
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검측 결과 통보서 - 검측 결과 통보 시간' }),
|
|
184
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
185
|
+
tslib_1.__metadata("design:type", Date)
|
|
186
|
+
], ChecklistHistory.prototype, "inspectionResultUpdatedAt", void 0);
|
|
187
|
+
tslib_1.__decorate([
|
|
188
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
189
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
190
|
+
tslib_1.__metadata("design:type", Date)
|
|
191
|
+
], ChecklistHistory.prototype, "createdAt", void 0);
|
|
192
|
+
tslib_1.__decorate([
|
|
193
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
194
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
195
|
+
tslib_1.__metadata("design:type", Date)
|
|
196
|
+
], ChecklistHistory.prototype, "loggedAt", void 0);
|
|
197
|
+
tslib_1.__decorate([
|
|
198
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
199
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
200
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
201
|
+
], ChecklistHistory.prototype, "creator", void 0);
|
|
202
|
+
tslib_1.__decorate([
|
|
203
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.creator),
|
|
204
|
+
tslib_1.__metadata("design:type", String)
|
|
205
|
+
], ChecklistHistory.prototype, "creatorId", void 0);
|
|
206
|
+
tslib_1.__decorate([
|
|
207
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
208
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
209
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
210
|
+
], ChecklistHistory.prototype, "updater", void 0);
|
|
211
|
+
tslib_1.__decorate([
|
|
212
|
+
(0, typeorm_1.RelationId)((checklist) => checklist.updater),
|
|
213
|
+
tslib_1.__metadata("design:type", String)
|
|
214
|
+
], ChecklistHistory.prototype, "updaterId", void 0);
|
|
215
|
+
tslib_1.__decorate([
|
|
216
|
+
(0, typeorm_history_1.HistoryOriginalIdColumn)({ nullable: true }),
|
|
217
|
+
tslib_1.__metadata("design:type", String)
|
|
218
|
+
], ChecklistHistory.prototype, "originalId", void 0);
|
|
219
|
+
tslib_1.__decorate([
|
|
220
|
+
(0, typeorm_history_1.HistoryActionColumn)({
|
|
221
|
+
nullable: false,
|
|
222
|
+
type: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
|
|
223
|
+
? 'enum'
|
|
224
|
+
: DATABASE_TYPE == 'oracle'
|
|
225
|
+
? 'varchar2'
|
|
226
|
+
: DATABASE_TYPE == 'mssql'
|
|
227
|
+
? 'nvarchar'
|
|
228
|
+
: 'varchar',
|
|
229
|
+
enum: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? typeorm_history_1.HistoryActionType : undefined,
|
|
230
|
+
length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10
|
|
231
|
+
}),
|
|
232
|
+
tslib_1.__metadata("design:type", String)
|
|
233
|
+
], ChecklistHistory.prototype, "action", void 0);
|
|
234
|
+
exports.ChecklistHistory = ChecklistHistory = tslib_1.__decorate([
|
|
235
|
+
(0, typeorm_1.Entity)(),
|
|
236
|
+
(0, typeorm_1.Index)('ix_checklist_history_0', (checklistHistory) => [checklistHistory.originalId]),
|
|
237
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for ChecklistHistory' })
|
|
238
|
+
], ChecklistHistory);
|
|
239
|
+
//# sourceMappingURL=checklist-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-history.js","sourceRoot":"","sources":["../../../server/service/checklist-history/checklist-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAUgB;AAChB,8DAAkI;AAClI,yDAAgD;AAChD,6CAA4C;AAC5C,sDAAwH;AACxH,oFAAwE;AACxE,4GAAsG;AACtG,6FAAuF;AAEvF,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,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IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC,mCAAiB,CAAC,CAAC,CAAC,SAAS;QAC3H,MAAM,EAAE,aAAa,IAAI,UAAU,IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;KAC/G,CAAC;;gDAC+B;2BA7KtB,gBAAgB;IAH5B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,wBAAwB,EAAE,CAAC,gBAAkC,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACtG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;GAC9C,gBAAgB,CA8K5B","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n OneToMany,\n OneToOne,\n PrimaryGeneratedColumn,\n RelationId\n} from 'typeorm'\nimport { HistoryActionColumn, HistoryActionType, HistoryEntityInterface, HistoryOriginalIdColumn } from '@operato/typeorm-history'\nimport { User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { Checklist, ChecklistReferenceType, InspectionResultStatus, InspectionResultType } from '../checklist/checklist'\nimport { ProjectType } from '../building-inspection/building-inspection'\nimport { BuildingInspectionHistory } from '../building-inspection-history/building-inspection-history'\nimport { ChecklistItemHistory } from '../checklist-item-history/checklist-item-history'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index('ix_checklist_history_0', (checklistHistory: ChecklistHistory) => [checklistHistory.originalId])\n@ObjectType({ description: 'Entity for ChecklistHistory' })\nexport class ChecklistHistory implements HistoryEntityInterface<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(() => ChecklistItemHistory, checklistItem => checklistItem.checklistHistory)\n @Field(() => [ChecklistItemHistory])\n checklistItemHistories?: ChecklistItemHistory[]\n\n // 검측 정보 (1:1 하위 테이블 참조)\n @OneToOne(() => BuildingInspectionHistory, buildingInspectionHistory => buildingInspectionHistory.checklistHistory)\n @Field(() => BuildingInspectionHistory)\n buildingInspectionHistory?: BuildingInspectionHistory\n\n @Column({ nullable: true, comment: '검측 요청서 문서번호 - {네이밍} 검측 제02-00001호)' }) // DocumentNoType 참조\n @Field({ nullable: true })\n inspectionRequestDocumentNo?: string\n\n @Column({ nullable: true, comment: '검측 요청서 - 검측 사항' })\n @Field({ nullable: true })\n inspectionRequestMemo?: string\n\n @Column({ nullable: true, comment: '검측 요청서 - 요청 시간' })\n @Field({ nullable: true })\n inspectionRequestUpdatedAt?: Date\n\n @Column({ nullable: true, comment: '검측 결과 통보서 문서번호 - {네이밍} 검측 제03-00001호)' }) // DocumentNoType 참조\n @Field({ nullable: true })\n inspectionResultDocumentNo?: string\n\n @Column({ nullable: true, comment: '검측 결과 통보서 - 지시 사항' })\n @Field({ nullable: true })\n inspectionResultMemo?: string\n\n @Column({ nullable: true, comment: '검측 결과 통보서 - 검측 결과 여부' })\n @Field({ nullable: true })\n inspectionResultStatus?: InspectionResultStatus\n\n @Column({ nullable: true, comment: '검측 결과 통보서 - 검측 결과 타입' })\n @Field({ nullable: true })\n inspectionResultType?: InspectionResultType\n\n @Column({ nullable: true, comment: '검측 결과 통보서 - 검측 결과 통보 시간' })\n @Field({ nullable: true })\n inspectionResultUpdatedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @CreateDateColumn()\n @Field({ nullable: true })\n loggedAt?: 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 @HistoryOriginalIdColumn({ nullable: true })\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? HistoryActionType : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n public action!: HistoryActionType\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HistoryEntitySubscriber } from '@operato/typeorm-history';
|
|
2
|
+
import { Checklist } from '../checklist/checklist';
|
|
3
|
+
import { ChecklistHistory } from './checklist-history';
|
|
4
|
+
export declare class ChecklistHistoryEntitySubscriber extends HistoryEntitySubscriber<Checklist, ChecklistHistory> {
|
|
5
|
+
get entity(): typeof Checklist;
|
|
6
|
+
get historyEntity(): typeof ChecklistHistory;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistHistoryEntitySubscriber = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const typeorm_history_1 = require("@operato/typeorm-history");
|
|
7
|
+
const checklist_1 = require("../checklist/checklist");
|
|
8
|
+
const checklist_history_1 = require("./checklist-history");
|
|
9
|
+
let ChecklistHistoryEntitySubscriber = class ChecklistHistoryEntitySubscriber extends typeorm_history_1.HistoryEntitySubscriber {
|
|
10
|
+
get entity() {
|
|
11
|
+
return checklist_1.Checklist;
|
|
12
|
+
}
|
|
13
|
+
get historyEntity() {
|
|
14
|
+
return checklist_history_1.ChecklistHistory;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.ChecklistHistoryEntitySubscriber = ChecklistHistoryEntitySubscriber;
|
|
18
|
+
exports.ChecklistHistoryEntitySubscriber = ChecklistHistoryEntitySubscriber = tslib_1.__decorate([
|
|
19
|
+
(0, typeorm_1.EventSubscriber)()
|
|
20
|
+
], ChecklistHistoryEntitySubscriber);
|
|
21
|
+
//# sourceMappingURL=event-subscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/checklist-history/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,sDAAkD;AAClD,2DAAsD;AAG/C,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,yCAAoD;IACxG,IAAW,MAAM;QACf,OAAO,qBAAS,CAAA;IAClB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,oCAAgB,CAAA;IACzB,CAAC;CACF,CAAA;AARY,4EAAgC;2CAAhC,gCAAgC;IAD5C,IAAA,yBAAe,GAAE;GACL,gCAAgC,CAQ5C","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { Checklist } from '../checklist/checklist'\nimport { ChecklistHistory } from './checklist-history'\n\n@EventSubscriber()\nexport class ChecklistHistoryEntitySubscriber extends HistoryEntitySubscriber<Checklist, ChecklistHistory> {\n public get entity() {\n return Checklist\n }\n\n public get historyEntity() {\n return ChecklistHistory\n }\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChecklistHistory } from './checklist-history';
|
|
2
|
+
import { ChecklistHistoryQuery } from './checklist-history-query';
|
|
3
|
+
import { ChecklistHistoryEntitySubscriber } from './event-subscriber';
|
|
4
|
+
export declare const entities: (typeof ChecklistHistory)[];
|
|
5
|
+
export declare const resolvers: (typeof ChecklistHistoryQuery)[];
|
|
6
|
+
export declare const subscribers: (typeof ChecklistHistoryEntitySubscriber)[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.subscribers = exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const checklist_history_1 = require("./checklist-history");
|
|
5
|
+
const checklist_history_query_1 = require("./checklist-history-query");
|
|
6
|
+
const event_subscriber_1 = require("./event-subscriber");
|
|
7
|
+
exports.entities = [checklist_history_1.ChecklistHistory];
|
|
8
|
+
exports.resolvers = [checklist_history_query_1.ChecklistHistoryQuery];
|
|
9
|
+
exports.subscribers = [event_subscriber_1.ChecklistHistoryEntitySubscriber];
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist-history/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,uEAAiE;AACjE,yDAAqE;AAExD,QAAA,QAAQ,GAAG,CAAC,oCAAgB,CAAC,CAAA;AAC7B,QAAA,SAAS,GAAG,CAAC,+CAAqB,CAAC,CAAA;AACnC,QAAA,WAAW,GAAG,CAAC,mDAAgC,CAAC,CAAA","sourcesContent":["import { ChecklistHistory } from './checklist-history'\nimport { ChecklistHistoryQuery } from './checklist-history-query'\nimport { ChecklistHistoryEntitySubscriber } from './event-subscriber'\n\nexport const entities = [ChecklistHistory]\nexport const resolvers = [ChecklistHistoryQuery]\nexport const subscribers = [ChecklistHistoryEntitySubscriber]\n"]}
|
|
@@ -11,7 +11,7 @@ export declare class ChecklistItemQuery {
|
|
|
11
11
|
inspectionByChecklistItemId(checklistItemId: string): Promise<BuildingInspection>;
|
|
12
12
|
checklistItemComments(checklistItem: ChecklistItem): Promise<ChecklistItemComment[]>;
|
|
13
13
|
checklistItemCommentCount(checklistItem: ChecklistItem): Promise<number>;
|
|
14
|
-
checklistItemAttachments(checklistItem: ChecklistItem): Promise<Attachment[]>;
|
|
14
|
+
checklistItemAttachments(checklistItem: ChecklistItem, description?: string): Promise<Attachment[]>;
|
|
15
15
|
checklistItemAttachmentCount(checklistItem: ChecklistItem): Promise<number>;
|
|
16
16
|
updater(checklistItem: ChecklistItem): Promise<User>;
|
|
17
17
|
creator(checklistItem: ChecklistItem): Promise<User>;
|
|
@@ -39,11 +39,12 @@ let ChecklistItemQuery = class ChecklistItemQuery {
|
|
|
39
39
|
async checklistItemCommentCount(checklistItem) {
|
|
40
40
|
return await (0, shell_1.getRepository)(checklist_item_comment_1.ChecklistItemComment).countBy({ checklistItem: { id: checklistItem.id } });
|
|
41
41
|
}
|
|
42
|
-
async checklistItemAttachments(checklistItem) {
|
|
42
|
+
async checklistItemAttachments(checklistItem, description) {
|
|
43
43
|
return await (0, shell_1.getRepository)(attachment_base_1.Attachment).find({
|
|
44
44
|
where: {
|
|
45
45
|
refType: checklist_item_1.ChecklistItem.name,
|
|
46
|
-
refBy: checklistItem.id
|
|
46
|
+
refBy: checklistItem.id,
|
|
47
|
+
description: description // 검측 상태로 받으며 어떤 스탭에 올렸는지로 시공자/감리자 구분
|
|
47
48
|
},
|
|
48
49
|
order: {
|
|
49
50
|
createdAt: 'DESC'
|
|
@@ -105,8 +106,9 @@ tslib_1.__decorate([
|
|
|
105
106
|
tslib_1.__decorate([
|
|
106
107
|
(0, type_graphql_1.FieldResolver)(type => [attachment_base_1.Attachment]),
|
|
107
108
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
109
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('description', { nullable: true })),
|
|
108
110
|
tslib_1.__metadata("design:type", Function),
|
|
109
|
-
tslib_1.__metadata("design:paramtypes", [checklist_item_1.ChecklistItem]),
|
|
111
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_1.ChecklistItem, String]),
|
|
110
112
|
tslib_1.__metadata("design:returntype", Promise)
|
|
111
113
|
], ChecklistItemQuery.prototype, "checklistItemAttachments", null);
|
|
112
114
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item-query.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,qEAA4D;AAC5D,iDAA+F;AAC/F,yDAAgD;AAChD,qDAAgD;AAChD,+DAAyD;AACzD,6FAAuF;AACvF,oFAA+E;AAGxE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAEvB,AAAN,KAAK,CAAC,aAAa,CAAY,EAAU,EAAS,OAAwB;QACxE,OAAO,MAAM,IAAA,qBAAa,EAAC,8BAAa,CAAC,CAAC,OAAO,CAAC;YAChD,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,cAAc,CAAS,MAAiB,EAAS,OAAwB;QAC7E,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,8BAAa,CAAC;YAC9C,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,2BAA2B,CAAC,eAAuB;QACvD,OAAO,IAAA,qBAAa,EAAC,wCAAkB,CAAC;aACrC,kBAAkB,CAAC,IAAI,CAAC;aACxB,SAAS,CAAC,YAAY,EAAE,GAAG,EAAE,wBAAwB,CAAC;aACtD,SAAS,CAAC,iBAAiB,EAAE,IAAI,EAAE,wBAAwB,CAAC;aAC5D,KAAK,CAAC,0BAA0B,EAAE,EAAE,eAAe,EAAE,CAAC;aACtD,MAAM,EAAE,CAAA;IACb,CAAC;IAGK,AAAN,KAAK,CAAC,qBAAqB,CAAS,aAA4B;QAC9D,OAAO,MAAM,IAAA,qBAAa,EAAC,6CAAoB,CAAC,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACtG,CAAC;IAGK,AAAN,KAAK,CAAC,yBAAyB,CAAS,aAA4B;QAClE,OAAO,MAAM,IAAA,qBAAa,EAAC,6CAAoB,CAAC,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACvG,CAAC;IAGK,AAAN,KAAK,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"checklist-item-query.js","sourceRoot":"","sources":["../../../server/service/checklist-item/checklist-item-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,qEAA4D;AAC5D,iDAA+F;AAC/F,yDAAgD;AAChD,qDAAgD;AAChD,+DAAyD;AACzD,6FAAuF;AACvF,oFAA+E;AAGxE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAEvB,AAAN,KAAK,CAAC,aAAa,CAAY,EAAU,EAAS,OAAwB;QACx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BA5EU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,kBAAkB,CA6E9B","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(\n @Root() checklistItem: ChecklistItem,\n @Arg('description', { nullable: true }) description?: string\n ): Promise<Attachment[]> {\n return await getRepository(Attachment).find({\n where: {\n refType: ChecklistItem.name,\n refBy: checklistItem.id,\n description: description // 검측 상태로 받으며 어떤 스탭에 올렸는지로 시공자/감리자 구분\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"]}
|
|
@@ -2,4 +2,3 @@ import { ChecklistItem } from './checklist-item';
|
|
|
2
2
|
import { ChecklistItemMutation } from './checklist-item-mutation';
|
|
3
3
|
export declare const entities: (typeof ChecklistItem)[];
|
|
4
4
|
export declare const resolvers: (typeof ChecklistItemMutation)[];
|
|
5
|
-
export declare const subscribers: any[];
|
|
@@ -1,10 +1,9 @@
|
|
|
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_item_1 = require("./checklist-item");
|
|
5
5
|
const checklist_item_query_1 = require("./checklist-item-query");
|
|
6
6
|
const checklist_item_mutation_1 = require("./checklist-item-mutation");
|
|
7
7
|
exports.entities = [checklist_item_1.ChecklistItem];
|
|
8
8
|
exports.resolvers = [checklist_item_query_1.ChecklistItemQuery, checklist_item_mutation_1.ChecklistItemMutation];
|
|
9
|
-
exports.subscribers = [];
|
|
10
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist-item/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAChD,iEAA2D;AAC3D,uEAAiE;AAEpD,QAAA,QAAQ,GAAG,CAAC,8BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,yCAAkB,EAAE,+CAAqB,CAAC,CAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist-item/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAChD,iEAA2D;AAC3D,uEAAiE;AAEpD,QAAA,QAAQ,GAAG,CAAC,8BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,yCAAkB,EAAE,+CAAqB,CAAC,CAAA","sourcesContent":["import { ChecklistItem } from './checklist-item'\nimport { ChecklistItemQuery } from './checklist-item-query'\nimport { ChecklistItemMutation } from './checklist-item-mutation'\n\nexport const entities = [ChecklistItem]\nexport const resolvers = [ChecklistItemQuery, ChecklistItemMutation]\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChecklistItemComment } from './checklist-item-comment';
|
|
2
2
|
import { NewChecklistItemComment, ChecklistItemCommentPatch } from './checklist-item-comment-type';
|
|
3
3
|
export declare class ChecklistItemCommentMutation {
|
|
4
|
+
private getStatusByChecklistItemId;
|
|
4
5
|
createChecklistItemComment(checklistItemComment: NewChecklistItemComment, context: ResolverContext): Promise<ChecklistItemComment>;
|
|
5
6
|
updateChecklistItemComment(id: string, patch: ChecklistItemCommentPatch, context: ResolverContext): Promise<ChecklistItemComment>;
|
|
6
7
|
deleteChecklistItemComment(id: string, context: ResolverContext): Promise<boolean>;
|
|
@@ -8,14 +8,39 @@ const checklist_item_comment_1 = require("./checklist-item-comment");
|
|
|
8
8
|
const checklist_item_comment_type_1 = require("./checklist-item-comment-type");
|
|
9
9
|
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
10
10
|
const checklist_item_query_1 = require("../checklist-item/checklist-item-query");
|
|
11
|
+
const checklist_1 = require("../checklist/checklist");
|
|
12
|
+
const checklist_item_1 = require("../checklist-item/checklist-item");
|
|
11
13
|
let ChecklistItemCommentMutation = class ChecklistItemCommentMutation {
|
|
14
|
+
async getStatusByChecklistItemId(checklistItemId, tx) {
|
|
15
|
+
var _a;
|
|
16
|
+
// 1. ChecklistItem에서 Checklist 정보 조회
|
|
17
|
+
const checklistItem = await (0, shell_1.getRepository)(checklist_item_1.ChecklistItem, tx).findOne({
|
|
18
|
+
where: { id: checklistItemId },
|
|
19
|
+
relations: ['checklist']
|
|
20
|
+
});
|
|
21
|
+
if (!checklistItem || !checklistItem.checklist) {
|
|
22
|
+
throw new Error('체크리스트 아이템을 찾을 수 없습니다.');
|
|
23
|
+
}
|
|
24
|
+
const checklist = checklistItem.checklist;
|
|
25
|
+
// 2. checklistReferenceType에 따라 분기 처리
|
|
26
|
+
if (checklist.checklistReferenceType === checklist_1.ChecklistReferenceType.INSPECTION) {
|
|
27
|
+
// INSPECTION: 기존 방식 - BuildingInspection에서 status 조회
|
|
28
|
+
const checklistItemQuery = new checklist_item_query_1.ChecklistItemQuery();
|
|
29
|
+
const inspection = await checklistItemQuery.inspectionByChecklistItemId(checklistItemId);
|
|
30
|
+
return inspection === null || inspection === void 0 ? void 0 : inspection.status;
|
|
31
|
+
}
|
|
32
|
+
else if (checklist.checklistReferenceType === checklist_1.ChecklistReferenceType.TASK) {
|
|
33
|
+
// TASK: TaskChecklistBinding에서 status 조회
|
|
34
|
+
const result = await tx.query('SELECT status FROM task_checklist_bindings WHERE checklist_id = $1', [checklist.id]);
|
|
35
|
+
return (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a.status;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
12
38
|
async createChecklistItemComment(checklistItemComment, context) {
|
|
13
39
|
const { user, tx } = context.state;
|
|
14
40
|
const { comment, checklistItemId } = checklistItemComment;
|
|
15
41
|
// 합격 상태인지 체크
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
if (inspection.status === building_inspection_1.BuildingInspectionStatus.PASS) {
|
|
42
|
+
const status = await this.getStatusByChecklistItemId(checklistItemId, tx);
|
|
43
|
+
if (status === building_inspection_1.BuildingInspectionStatus.PASS) {
|
|
19
44
|
throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.');
|
|
20
45
|
}
|
|
21
46
|
const result = await (0, shell_1.getRepository)(checklist_item_comment_1.ChecklistItemComment, tx).save({
|
|
@@ -42,10 +67,12 @@ let ChecklistItemCommentMutation = class ChecklistItemCommentMutation {
|
|
|
42
67
|
const checklistItemComment = await repository.findOne({
|
|
43
68
|
where: { id }
|
|
44
69
|
});
|
|
70
|
+
if (!checklistItemComment) {
|
|
71
|
+
throw new Error('체크리스트 아이템 코멘트를 찾을 수 없습니다.');
|
|
72
|
+
}
|
|
45
73
|
// 합격 상태인지 체크
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
if (inspection.status === building_inspection_1.BuildingInspectionStatus.PASS) {
|
|
74
|
+
const status = await this.getStatusByChecklistItemId(checklistItemComment.checklistItemId, tx);
|
|
75
|
+
if (status === building_inspection_1.BuildingInspectionStatus.PASS) {
|
|
49
76
|
throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.');
|
|
50
77
|
}
|
|
51
78
|
await repository.softDelete({ id });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist-item-comment-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-item-comment/checklist-item-comment-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,iDAAqD;AACrD,qEAA+D;AAC/D,+EAAkG;AAClG,oFAAqF;AACrF,iFAA2E;
|
|
1
|
+
{"version":3,"file":"checklist-item-comment-mutation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AAI,CAAC,CAAA;IACT,mBAAA,IAAA,kBAAG,EAAC,OAAO,CAAC,CAAA;IACZ,mBAAA,IAAA,kBAAG,GAAE,CAAA;;qDADe,uDAAyB;;8EAiB/C;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;8EAoB7D;uCAlGU,4BAA4B;IADxC,IAAA,uBAAQ,EAAC,6CAAoB,CAAC;GAClB,4BAA4B,CAmGxC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { getRepository } from '@things-factory/shell'\nimport { ChecklistItemComment } from './checklist-item-comment'\nimport { NewChecklistItemComment, ChecklistItemCommentPatch } from './checklist-item-comment-type'\nimport { BuildingInspectionStatus } from '../building-inspection/building-inspection'\nimport { ChecklistItemQuery } from '../checklist-item/checklist-item-query'\nimport { ChecklistReferenceType } from '../checklist/checklist'\nimport { ChecklistItem } from '../checklist-item/checklist-item'\n\n@Resolver(ChecklistItemComment)\nexport class ChecklistItemCommentMutation {\n private async getStatusByChecklistItemId(checklistItemId: string, tx: any) {\n // 1. ChecklistItem에서 Checklist 정보 조회\n const checklistItem = await getRepository(ChecklistItem, tx).findOne({\n where: { id: checklistItemId },\n relations: ['checklist']\n })\n\n if (!checklistItem || !checklistItem.checklist) {\n throw new Error('체크리스트 아이템을 찾을 수 없습니다.')\n }\n\n const checklist = checklistItem.checklist\n\n // 2. checklistReferenceType에 따라 분기 처리\n if (checklist.checklistReferenceType === ChecklistReferenceType.INSPECTION) {\n // INSPECTION: 기존 방식 - BuildingInspection에서 status 조회\n const checklistItemQuery = new ChecklistItemQuery()\n const inspection = await checklistItemQuery.inspectionByChecklistItemId(checklistItemId)\n return inspection?.status\n } else if (checklist.checklistReferenceType === ChecklistReferenceType.TASK) {\n // TASK: TaskChecklistBinding에서 status 조회\n const result = await tx.query('SELECT status FROM task_checklist_bindings WHERE checklist_id = $1', [checklist.id])\n return result?.[0]?.status\n }\n }\n\n @Directive('@transaction')\n @Mutation(returns => ChecklistItemComment, { description: 'To create new ChecklistItemComment' })\n async createChecklistItemComment(\n @Arg('checklistItemComment') checklistItemComment: NewChecklistItemComment,\n @Ctx() context: ResolverContext\n ): Promise<ChecklistItemComment> {\n const { user, tx } = context.state\n const { comment, checklistItemId } = checklistItemComment\n\n // 합격 상태인지 체크\n const status = await this.getStatusByChecklistItemId(checklistItemId, tx)\n if (status === BuildingInspectionStatus.PASS) {\n throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.')\n }\n\n const result = await getRepository(ChecklistItemComment, tx).save({\n comment,\n checklistItem: { id: checklistItemId },\n createdAt: new Date(),\n creator: user,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => ChecklistItemComment, { description: 'To modify ChecklistItemComment information' })\n async updateChecklistItemComment(\n @Arg('id') id: string,\n @Arg('patch') patch: ChecklistItemCommentPatch,\n @Ctx() context: ResolverContext\n ): Promise<ChecklistItemComment> {\n const { user, tx } = context.state\n\n const repository = getRepository(ChecklistItemComment, tx)\n const checklistItemComment = await repository.findOne({\n where: { id }\n })\n\n const result = await repository.save({\n ...checklistItemComment,\n ...patch,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete ChecklistItemComment' })\n async deleteChecklistItemComment(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { tx } = context.state\n const repository = getRepository(ChecklistItemComment, tx)\n const checklistItemComment = await repository.findOne({\n where: { id }\n })\n\n if (!checklistItemComment) {\n throw new Error('체크리스트 아이템 코멘트를 찾을 수 없습니다.')\n }\n\n // 합격 상태인지 체크\n const status = await this.getStatusByChecklistItemId(checklistItemComment.checklistItemId, tx)\n if (status === BuildingInspectionStatus.PASS) {\n throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.')\n }\n\n await repository.softDelete({ id })\n\n return true\n }\n}\n"]}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ChecklistItemComment } from './checklist-item-comment';
|
|
2
|
-
import { ChecklistItemCommentHistoryEntitySubscriber } from './event-subscriber';
|
|
3
2
|
import { ChecklistItemCommentQuery } from './checklist-item-comment-query';
|
|
4
3
|
import { ChecklistItemCommentMutation } from './checklist-item-comment-mutation';
|
|
5
4
|
export declare const entities: (typeof ChecklistItemComment)[];
|
|
6
5
|
export declare const resolvers: (typeof ChecklistItemCommentQuery | typeof ChecklistItemCommentMutation)[];
|
|
7
|
-
export declare const subscribers: (typeof ChecklistItemCommentHistoryEntitySubscriber)[];
|
|
@@ -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_item_comment_1 = require("./checklist-item-comment");
|
|
5
5
|
const checklist_item_comment_history_1 = require("./checklist-item-comment-history");
|
|
6
|
-
const event_subscriber_1 = require("./event-subscriber");
|
|
7
6
|
const checklist_item_comment_query_1 = require("./checklist-item-comment-query");
|
|
8
7
|
const checklist_item_comment_mutation_1 = require("./checklist-item-comment-mutation");
|
|
9
8
|
exports.entities = [checklist_item_comment_1.ChecklistItemComment, checklist_item_comment_history_1.ChecklistItemCommentHistory];
|
|
10
9
|
exports.resolvers = [checklist_item_comment_query_1.ChecklistItemCommentQuery, checklist_item_comment_mutation_1.ChecklistItemCommentMutation];
|
|
11
|
-
exports.subscribers = [event_subscriber_1.ChecklistItemCommentHistoryEntitySubscriber];
|
|
12
10
|
//# sourceMappingURL=index.js.map
|