@dssp/supervision 1.0.0 → 1.0.1
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/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +2 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/graphql/building-inspection.d.ts +1 -0
- package/dist-client/graphql/building-inspection.js +102 -0
- package/dist-client/graphql/building-inspection.js.map +1 -0
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/action-plan/action-plan-importer.d.ts +10 -0
- package/dist-client/pages/action-plan/action-plan-importer.js +101 -0
- package/dist-client/pages/action-plan/action-plan-importer.js.map +1 -0
- package/dist-client/pages/action-plan/action-plan-list-page.d.ts +62 -0
- package/dist-client/pages/action-plan/action-plan-list-page.js +322 -0
- package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.d.ts +22 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +171 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +71 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +1407 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.d.ts +59 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js +868 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +27 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +342 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +31 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +332 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +36 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +369 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +98 -0
- package/dist-client/pages/building-inspection/building-inspection-list.js +914 -0
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-management.d.ts +82 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js +1527 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +178 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -0
- 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/field-document/field-document-constants.d.ts +18 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js +630 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js.map +1 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.d.ts +10 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js +219 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.d.ts +25 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js +546 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js.map +1 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-popup.d.ts +42 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js +738 -0
- package/dist-client/pages/building-inspection/component/field-document/field-document-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 +348 -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 +25 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +491 -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 +31 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +485 -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 +416 -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 +9 -0
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +190 -0
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.d.ts +3 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.js +841 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +4 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +844 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
- 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 +1135 -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 +3 -0
- package/dist-client/pages/checklist/attachment-list-popup.js +492 -0
- package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -0
- package/dist-client/pages/checklist/checklist-view.d.ts +16 -0
- package/dist-client/pages/checklist/checklist-view.js +926 -0
- package/dist-client/pages/checklist/checklist-view.js.map +1 -0
- package/dist-client/pages/checklist/comment-list-popup.d.ts +1 -0
- package/dist-client/pages/checklist/comment-list-popup.js +367 -0
- package/dist-client/pages/checklist/comment-list-popup.js.map +1 -0
- package/dist-client/pages/checklist/file-preview-popup.d.ts +1 -0
- package/dist-client/pages/checklist/file-preview-popup.js +77 -0
- package/dist-client/pages/checklist/file-preview-popup.js.map +1 -0
- package/dist-client/pages/checklist/inspection-info-popup.d.ts +49 -0
- package/dist-client/pages/checklist/inspection-info-popup.js +683 -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/kcs-criteria-popup.d.ts +16 -0
- package/dist-client/pages/checklist/kcs-criteria-popup.js +179 -0
- package/dist-client/pages/checklist/kcs-criteria-popup.js.map +1 -0
- package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
- package/dist-client/pages/checklist-database/checklist-database.js +540 -0
- package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-template-item.d.ts +2 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js +278 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-template-list.d.ts +53 -0
- package/dist-client/pages/checklist-template/checklist-template-list.js +350 -0
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-type-management.d.ts +55 -0
- package/dist-client/pages/checklist-template/checklist-type-management.js +250 -0
- package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +223 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js +404 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
- package/dist-client/pages/issue/issue-importer.d.ts +10 -0
- package/dist-client/pages/issue/issue-importer.js +101 -0
- package/dist-client/pages/issue/issue-importer.js.map +1 -0
- package/dist-client/pages/issue/issue-list-page.d.ts +62 -0
- package/dist-client/pages/issue/issue-list-page.js +322 -0
- package/dist-client/pages/issue/issue-list-page.js.map +1 -0
- package/dist-client/pages/project-checklist/project-checklist-management.d.ts +62 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js +1145 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
- package/dist-client/pages/project-report/project-report-importer.d.ts +10 -0
- package/dist-client/pages/project-report/project-report-importer.js +101 -0
- package/dist-client/pages/project-report/project-report-importer.js.map +1 -0
- package/dist-client/pages/project-report/project-report-list-page.d.ts +62 -0
- package/dist-client/pages/project-report/project-report-list-page.js +322 -0
- package/dist-client/pages/project-report/project-report-list-page.js.map +1 -0
- package/dist-client/pages/supervisor/supervisor-importer.d.ts +10 -0
- package/dist-client/pages/supervisor/supervisor-importer.js +101 -0
- package/dist-client/pages/supervisor/supervisor-importer.js.map +1 -0
- package/dist-client/pages/supervisor/supervisor-list-page.d.ts +62 -0
- package/dist-client/pages/supervisor/supervisor-list-page.js +322 -0
- package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +44 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/stt/speech-to-text.d.ts +41 -0
- package/dist-client/stt/speech-to-text.js +331 -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 -0
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/controllers/index.js +1 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/index.d.ts +3 -0
- package/dist-server/index.js +7 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/middlewares/index.d.ts +1 -0
- package/dist-server/middlewares/index.js +7 -0
- package/dist-server/middlewares/index.js.map +1 -0
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/routes.d.ts +0 -0
- package/dist-server/routes.js +25 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/action-plan/action-plan-mutation.d.ts +10 -0
- package/dist-server/service/action-plan/action-plan-mutation.js +167 -0
- package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -0
- package/dist-server/service/action-plan/action-plan-query.d.ts +12 -0
- package/dist-server/service/action-plan/action-plan-query.js +91 -0
- package/dist-server/service/action-plan/action-plan-query.js.map +1 -0
- package/dist-server/service/action-plan/action-plan-type.d.ts +23 -0
- package/dist-server/service/action-plan/action-plan-type.js +86 -0
- package/dist-server/service/action-plan/action-plan-type.js.map +1 -0
- package/dist-server/service/action-plan/action-plan.d.ts +27 -0
- package/dist-server/service/action-plan/action-plan.js +116 -0
- package/dist-server/service/action-plan/action-plan.js.map +1 -0
- package/dist-server/service/action-plan/index.d.ts +5 -0
- package/dist-server/service/action-plan/index.js +9 -0
- package/dist-server/service/action-plan/index.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +9 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js +404 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +24 -0
- package/dist-server/service/building-inspection/building-inspection-query.js +406 -0
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +89 -0
- package/dist-server/service/building-inspection/building-inspection-type.js +330 -0
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection.d.ts +42 -0
- package/dist-server/service/building-inspection/building-inspection.js +186 -0
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -0
- package/dist-server/service/building-inspection/index.d.ts +7 -0
- package/dist-server/service/building-inspection/index.js +19 -0
- package/dist-server/service/building-inspection/index.js.map +1 -0
- 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 +66 -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 +35 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.js +162 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -0
- package/dist-server/service/building-inspection-history/event-subscriber.d.ts +7 -0
- package/dist-server/service/building-inspection-history/event-subscriber.js +21 -0
- 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-mutation.d.ts +3 -0
- package/dist-server/service/checklist/checklist-mutation.js +30 -0
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -0
- package/dist-server/service/checklist/checklist-query.d.ts +21 -0
- package/dist-server/service/checklist/checklist-query.js +177 -0
- package/dist-server/service/checklist/checklist-query.js.map +1 -0
- package/dist-server/service/checklist/checklist-type.d.ts +5 -0
- package/dist-server/service/checklist/checklist-type.js +21 -0
- package/dist-server/service/checklist/checklist-type.js.map +1 -0
- package/dist-server/service/checklist/checklist.d.ts +66 -0
- package/dist-server/service/checklist/checklist.js +259 -0
- package/dist-server/service/checklist/checklist.js.map +1 -0
- package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist/event-subscriber.js +21 -0
- package/dist-server/service/checklist/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist/index.d.ts +5 -0
- package/dist-server/service/checklist/index.js +9 -0
- package/dist-server/service/checklist/index.js.map +1 -0
- 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-mutation.d.ts +4 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.js +39 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-query.d.ts +18 -0
- package/dist-server/service/checklist-item/checklist-item-query.js +138 -0
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-type.d.ts +9 -0
- package/dist-server/service/checklist-item/checklist-item-type.js +35 -0
- package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item.d.ts +29 -0
- package/dist-server/service/checklist-item/checklist-item.js +124 -0
- package/dist-server/service/checklist-item/checklist-item.js.map +1 -0
- package/dist-server/service/checklist-item/index.d.ts +5 -0
- package/dist-server/service/checklist-item/index.js +9 -0
- package/dist-server/service/checklist-item/index.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.d.ts +16 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +83 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +8 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +114 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.d.ts +7 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +49 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.d.ts +14 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +53 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment.d.ts +12 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js +57 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +1 -0
- package/dist-server/service/checklist-item-comment/index.d.ts +5 -0
- package/dist-server/service/checklist-item-comment/index.js +10 -0
- package/dist-server/service/checklist-item-comment/index.js.map +1 -0
- 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 +27 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.js +133 -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/checklist-template-mutation.d.ts +6 -0
- package/dist-server/service/checklist-template/checklist-template-mutation.js +64 -0
- package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-query.d.ts +10 -0
- package/dist-server/service/checklist-template/checklist-template-query.js +62 -0
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-type.d.ts +10 -0
- package/dist-server/service/checklist-template/checklist-template-type.js +39 -0
- package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template.d.ts +17 -0
- package/dist-server/service/checklist-template/checklist-template.js +78 -0
- package/dist-server/service/checklist-template/checklist-template.js.map +1 -0
- package/dist-server/service/checklist-template/index.d.ts +5 -0
- package/dist-server/service/checklist-template/index.js +9 -0
- package/dist-server/service/checklist-template/index.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.d.ts +7 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +80 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +11 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js +78 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +19 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +69 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +26 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js +106 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -0
- package/dist-server/service/checklist-template-item/index.d.ts +5 -0
- package/dist-server/service/checklist-template-item/index.js +9 -0
- package/dist-server/service/checklist-template-item/index.js.map +1 -0
- package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +2 -0
- package/dist-server/service/checklist-template-item/spec-matching-service.js +51 -0
- package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.d.ts +6 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.js +64 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-query.d.ts +10 -0
- package/dist-server/service/checklist-type/checklist-type-query.js +62 -0
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-type.d.ts +11 -0
- package/dist-server/service/checklist-type/checklist-type-type.js +43 -0
- package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type.d.ts +19 -0
- package/dist-server/service/checklist-type/checklist-type.js +78 -0
- package/dist-server/service/checklist-type/checklist-type.js.map +1 -0
- package/dist-server/service/checklist-type/index.d.ts +5 -0
- package/dist-server/service/checklist-type/index.js +9 -0
- package/dist-server/service/checklist-type/index.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
- package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
- package/dist-server/service/construction-checklist-template/index.js +9 -0
- package/dist-server/service/construction-checklist-template/index.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +56 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
- package/dist-server/service/construction-checklist-template-item/index.js +9 -0
- package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
- package/dist-server/service/field-document/field-document-auto-file.d.ts +21 -0
- package/dist-server/service/field-document/field-document-auto-file.js +47 -0
- package/dist-server/service/field-document/field-document-auto-file.js.map +1 -0
- package/dist-server/service/field-document/field-document-mutation.d.ts +9 -0
- package/dist-server/service/field-document/field-document-mutation.js +139 -0
- package/dist-server/service/field-document/field-document-mutation.js.map +1 -0
- package/dist-server/service/field-document/field-document-query.d.ts +14 -0
- package/dist-server/service/field-document/field-document-query.js +120 -0
- package/dist-server/service/field-document/field-document-query.js.map +1 -0
- package/dist-server/service/field-document/field-document-summary-service.d.ts +10 -0
- package/dist-server/service/field-document/field-document-summary-service.js +79 -0
- package/dist-server/service/field-document/field-document-summary-service.js.map +1 -0
- package/dist-server/service/field-document/field-document-type.d.ts +24 -0
- package/dist-server/service/field-document/field-document-type.js +88 -0
- package/dist-server/service/field-document/field-document-type.js.map +1 -0
- package/dist-server/service/field-document/field-document.d.ts +29 -0
- package/dist-server/service/field-document/field-document.js +127 -0
- package/dist-server/service/field-document/field-document.js.map +1 -0
- package/dist-server/service/field-document/index.d.ts +5 -0
- package/dist-server/service/field-document/index.js +9 -0
- package/dist-server/service/field-document/index.js.map +1 -0
- package/dist-server/service/index.d.ts +23 -0
- package/dist-server/service/index.js +98 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/issue/index.d.ts +5 -0
- package/dist-server/service/issue/index.js +9 -0
- package/dist-server/service/issue/index.js.map +1 -0
- package/dist-server/service/issue/issue-mutation.d.ts +10 -0
- package/dist-server/service/issue/issue-mutation.js +167 -0
- package/dist-server/service/issue/issue-mutation.js.map +1 -0
- package/dist-server/service/issue/issue-query.d.ts +12 -0
- package/dist-server/service/issue/issue-query.js +91 -0
- package/dist-server/service/issue/issue-query.js.map +1 -0
- package/dist-server/service/issue/issue-type.d.ts +23 -0
- package/dist-server/service/issue/issue-type.js +86 -0
- package/dist-server/service/issue/issue-type.js.map +1 -0
- package/dist-server/service/issue/issue.d.ts +26 -0
- package/dist-server/service/issue/issue.js +111 -0
- package/dist-server/service/issue/issue.js.map +1 -0
- package/dist-server/service/project-checklist/index.d.ts +5 -0
- package/dist-server/service/project-checklist/index.js +9 -0
- package/dist-server/service/project-checklist/index.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.js +118 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
- package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
- package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
- package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
- package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
- package/dist-server/service/project-checklist/project-checklist.js +90 -0
- package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
- package/dist-server/service/project-checklist/spec-matching-service.d.ts +17 -0
- package/dist-server/service/project-checklist/spec-matching-service.js +140 -0
- package/dist-server/service/project-checklist/spec-matching-service.js.map +1 -0
- package/dist-server/service/project-checklist-item/index.d.ts +4 -0
- package/dist-server/service/project-checklist-item/index.js +9 -0
- package/dist-server/service/project-checklist-item/index.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +19 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js +92 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
- package/dist-server/service/project-report/index.d.ts +5 -0
- package/dist-server/service/project-report/index.js +9 -0
- package/dist-server/service/project-report/index.js.map +1 -0
- package/dist-server/service/project-report/project-report-mutation.d.ts +10 -0
- package/dist-server/service/project-report/project-report-mutation.js +167 -0
- package/dist-server/service/project-report/project-report-mutation.js.map +1 -0
- package/dist-server/service/project-report/project-report-query.d.ts +12 -0
- package/dist-server/service/project-report/project-report-query.js +91 -0
- package/dist-server/service/project-report/project-report-query.js.map +1 -0
- package/dist-server/service/project-report/project-report-type.d.ts +23 -0
- package/dist-server/service/project-report/project-report-type.js +86 -0
- package/dist-server/service/project-report/project-report-type.js.map +1 -0
- package/dist-server/service/project-report/project-report.d.ts +28 -0
- package/dist-server/service/project-report/project-report.js +121 -0
- package/dist-server/service/project-report/project-report.js.map +1 -0
- package/dist-server/service/supervisor/index.d.ts +5 -0
- package/dist-server/service/supervisor/index.js +9 -0
- package/dist-server/service/supervisor/index.js.map +1 -0
- package/dist-server/service/supervisor/supervisor-mutation.d.ts +10 -0
- package/dist-server/service/supervisor/supervisor-mutation.js +167 -0
- package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -0
- package/dist-server/service/supervisor/supervisor-query.d.ts +12 -0
- package/dist-server/service/supervisor/supervisor-query.js +91 -0
- package/dist-server/service/supervisor/supervisor-query.js.map +1 -0
- package/dist-server/service/supervisor/supervisor-type.d.ts +23 -0
- package/dist-server/service/supervisor/supervisor-type.js +86 -0
- package/dist-server/service/supervisor/supervisor-type.js.map +1 -0
- package/dist-server/service/supervisor/supervisor.d.ts +28 -0
- package/dist-server/service/supervisor/supervisor.js +121 -0
- package/dist-server/service/supervisor/supervisor.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistItemCommentMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const checklist_item_comment_1 = require("./checklist-item-comment");
|
|
8
|
+
const checklist_item_comment_type_1 = require("./checklist-item-comment-type");
|
|
9
|
+
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
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");
|
|
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
|
+
}
|
|
38
|
+
async createChecklistItemComment(checklistItemComment, context) {
|
|
39
|
+
const { user, tx } = context.state;
|
|
40
|
+
const { comment, checklistItemId } = checklistItemComment;
|
|
41
|
+
// 합격 상태인지 체크
|
|
42
|
+
const status = await this.getStatusByChecklistItemId(checklistItemId, tx);
|
|
43
|
+
if (status === building_inspection_1.BuildingInspectionStatus.PASS) {
|
|
44
|
+
throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.');
|
|
45
|
+
}
|
|
46
|
+
const result = await (0, shell_1.getRepository)(checklist_item_comment_1.ChecklistItemComment, tx).save({
|
|
47
|
+
comment,
|
|
48
|
+
checklistItem: { id: checklistItemId },
|
|
49
|
+
createdAt: new Date(),
|
|
50
|
+
creator: user,
|
|
51
|
+
updater: user
|
|
52
|
+
});
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
async updateChecklistItemComment(id, patch, context) {
|
|
56
|
+
const { user, tx } = context.state;
|
|
57
|
+
const repository = (0, shell_1.getRepository)(checklist_item_comment_1.ChecklistItemComment, tx);
|
|
58
|
+
const checklistItemComment = await repository.findOne({
|
|
59
|
+
where: { id }
|
|
60
|
+
});
|
|
61
|
+
const result = await repository.save(Object.assign(Object.assign(Object.assign({}, checklistItemComment), patch), { updater: user }));
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
async deleteChecklistItemComment(id, context) {
|
|
65
|
+
const { tx } = context.state;
|
|
66
|
+
const repository = (0, shell_1.getRepository)(checklist_item_comment_1.ChecklistItemComment, tx);
|
|
67
|
+
const checklistItemComment = await repository.findOne({
|
|
68
|
+
where: { id }
|
|
69
|
+
});
|
|
70
|
+
if (!checklistItemComment) {
|
|
71
|
+
throw new Error('체크리스트 아이템 코멘트를 찾을 수 없습니다.');
|
|
72
|
+
}
|
|
73
|
+
// 합격 상태인지 체크
|
|
74
|
+
const status = await this.getStatusByChecklistItemId(checklistItemComment.checklistItemId, tx);
|
|
75
|
+
if (status === building_inspection_1.BuildingInspectionStatus.PASS) {
|
|
76
|
+
throw new Error('완료 상태인 검측정보를 변경할 수 없습니다.');
|
|
77
|
+
}
|
|
78
|
+
await repository.softDelete({ id });
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
exports.ChecklistItemCommentMutation = ChecklistItemCommentMutation;
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
85
|
+
(0, type_graphql_1.Mutation)(returns => checklist_item_comment_1.ChecklistItemComment, { description: 'To create new ChecklistItemComment' }),
|
|
86
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('checklistItemComment')),
|
|
87
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
88
|
+
tslib_1.__metadata("design:type", Function),
|
|
89
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_comment_type_1.NewChecklistItemComment, Object]),
|
|
90
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
91
|
+
], ChecklistItemCommentMutation.prototype, "createChecklistItemComment", null);
|
|
92
|
+
tslib_1.__decorate([
|
|
93
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
94
|
+
(0, type_graphql_1.Mutation)(returns => checklist_item_comment_1.ChecklistItemComment, { description: 'To modify ChecklistItemComment information' }),
|
|
95
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
96
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
97
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
98
|
+
tslib_1.__metadata("design:type", Function),
|
|
99
|
+
tslib_1.__metadata("design:paramtypes", [String, checklist_item_comment_type_1.ChecklistItemCommentPatch, Object]),
|
|
100
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
101
|
+
], ChecklistItemCommentMutation.prototype, "updateChecklistItemComment", null);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
104
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete ChecklistItemComment' }),
|
|
105
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
106
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
107
|
+
tslib_1.__metadata("design:type", Function),
|
|
108
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
109
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
110
|
+
], ChecklistItemCommentMutation.prototype, "deleteChecklistItemComment", null);
|
|
111
|
+
exports.ChecklistItemCommentMutation = ChecklistItemCommentMutation = tslib_1.__decorate([
|
|
112
|
+
(0, type_graphql_1.Resolver)(checklist_item_comment_1.ChecklistItemComment)
|
|
113
|
+
], ChecklistItemCommentMutation);
|
|
114
|
+
//# sourceMappingURL=checklist-item-comment-mutation.js.map
|
|
@@ -0,0 +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;AACr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ADe,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"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Pagination } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { ChecklistItemComment } from './checklist-item-comment';
|
|
4
|
+
export declare class ChecklistItemCommentQuery {
|
|
5
|
+
checklistItemComments(checklistItemId: string, pagination: Pagination, context: ResolverContext): Promise<ChecklistItemComment[]>;
|
|
6
|
+
creator(checklistItemComment: ChecklistItemComment): Promise<User>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistItemCommentQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
+
const checklist_item_comment_1 = require("./checklist-item-comment");
|
|
9
|
+
let ChecklistItemCommentQuery = class ChecklistItemCommentQuery {
|
|
10
|
+
async checklistItemComments(checklistItemId, pagination, context) {
|
|
11
|
+
const { limit, page } = pagination;
|
|
12
|
+
// 페이지네이션을 위한 offset 계산
|
|
13
|
+
const offset = (page - 1) * limit;
|
|
14
|
+
// 코멘트와 총 개수를 가져오는 쿼리
|
|
15
|
+
const items = await (0, shell_1.getRepository)(checklist_item_comment_1.ChecklistItemComment)
|
|
16
|
+
.createQueryBuilder('cic')
|
|
17
|
+
.innerJoin('cic.checklistItem', 'ci')
|
|
18
|
+
.where('cic.checklistItem = :checklistItemId', { checklistItemId })
|
|
19
|
+
.skip(offset)
|
|
20
|
+
.take(limit)
|
|
21
|
+
.orderBy('cic.createdAt', 'DESC')
|
|
22
|
+
.getMany();
|
|
23
|
+
return items;
|
|
24
|
+
}
|
|
25
|
+
async creator(checklistItemComment) {
|
|
26
|
+
return checklistItemComment.creatorId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklistItemComment.creatorId }));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.ChecklistItemCommentQuery = ChecklistItemCommentQuery;
|
|
30
|
+
tslib_1.__decorate([
|
|
31
|
+
(0, type_graphql_1.Query)(returns => [checklist_item_comment_1.ChecklistItemComment], { description: 'To fetch multiple ChecklistItemComments' }),
|
|
32
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('checklistItemId')),
|
|
33
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('pagination')),
|
|
34
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
35
|
+
tslib_1.__metadata("design:type", Function),
|
|
36
|
+
tslib_1.__metadata("design:paramtypes", [String, shell_1.Pagination, Object]),
|
|
37
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
38
|
+
], ChecklistItemCommentQuery.prototype, "checklistItemComments", null);
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
41
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
42
|
+
tslib_1.__metadata("design:type", Function),
|
|
43
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_comment_1.ChecklistItemComment]),
|
|
44
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
45
|
+
], ChecklistItemCommentQuery.prototype, "creator", null);
|
|
46
|
+
exports.ChecklistItemCommentQuery = ChecklistItemCommentQuery = tslib_1.__decorate([
|
|
47
|
+
(0, type_graphql_1.Resolver)(checklist_item_comment_1.ChecklistItemComment)
|
|
48
|
+
], ChecklistItemCommentQuery);
|
|
49
|
+
//# sourceMappingURL=checklist-item-comment-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-item-comment-query.js","sourceRoot":"","sources":["../../../server/service/checklist-item-comment/checklist-item-comment-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA6E;AAC7E,iDAAi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AAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAuB,6CAAoB;;wDAE/D;oCA5BU,yBAAyB;IADrC,IAAA,uBAAQ,EAAC,6CAAoB,CAAC;GAClB,yBAAyB,CA6BrC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Arg, Ctx } from 'type-graphql'\nimport { getRepository, Pagination } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistItemComment } from './checklist-item-comment'\n\n@Resolver(ChecklistItemComment)\nexport class ChecklistItemCommentQuery {\n @Query(returns => [ChecklistItemComment], { description: 'To fetch multiple ChecklistItemComments' })\n async checklistItemComments(\n @Arg('checklistItemId') checklistItemId: string,\n @Arg('pagination') pagination: Pagination,\n @Ctx() context: ResolverContext\n ): Promise<ChecklistItemComment[]> {\n const { limit, page } = pagination\n\n // 페이지네이션을 위한 offset 계산\n const offset = (page - 1) * limit\n\n // 코멘트와 총 개수를 가져오는 쿼리\n const items = await getRepository(ChecklistItemComment)\n .createQueryBuilder('cic')\n .innerJoin('cic.checklistItem', 'ci')\n .where('cic.checklistItem = :checklistItemId', { checklistItemId })\n .skip(offset)\n .take(limit)\n .orderBy('cic.createdAt', 'DESC')\n .getMany()\n\n return items\n }\n\n @FieldResolver(type => User)\n async creator(@Root() checklistItemComment: ChecklistItemComment): Promise<User> {\n return checklistItemComment.creatorId && (await getRepository(User).findOneBy({ id: checklistItemComment.creatorId }))\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChecklistItemComment } from './checklist-item-comment';
|
|
2
|
+
export declare class NewChecklistItemComment {
|
|
3
|
+
comment?: string;
|
|
4
|
+
checklistItemId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class ChecklistItemCommentPatch {
|
|
7
|
+
id?: string;
|
|
8
|
+
comment?: string;
|
|
9
|
+
checklistItemId?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class ChecklistItemCommentList {
|
|
12
|
+
items: ChecklistItemComment[];
|
|
13
|
+
total: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistItemCommentList = exports.ChecklistItemCommentPatch = exports.NewChecklistItemComment = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const checklist_item_comment_1 = require("./checklist-item-comment");
|
|
7
|
+
let NewChecklistItemComment = class NewChecklistItemComment {
|
|
8
|
+
};
|
|
9
|
+
exports.NewChecklistItemComment = NewChecklistItemComment;
|
|
10
|
+
tslib_1.__decorate([
|
|
11
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
12
|
+
tslib_1.__metadata("design:type", String)
|
|
13
|
+
], NewChecklistItemComment.prototype, "comment", void 0);
|
|
14
|
+
tslib_1.__decorate([
|
|
15
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
16
|
+
tslib_1.__metadata("design:type", String)
|
|
17
|
+
], NewChecklistItemComment.prototype, "checklistItemId", void 0);
|
|
18
|
+
exports.NewChecklistItemComment = NewChecklistItemComment = tslib_1.__decorate([
|
|
19
|
+
(0, type_graphql_1.InputType)()
|
|
20
|
+
], NewChecklistItemComment);
|
|
21
|
+
let ChecklistItemCommentPatch = class ChecklistItemCommentPatch {
|
|
22
|
+
};
|
|
23
|
+
exports.ChecklistItemCommentPatch = ChecklistItemCommentPatch;
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
27
|
+
], ChecklistItemCommentPatch.prototype, "id", void 0);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
31
|
+
], ChecklistItemCommentPatch.prototype, "comment", void 0);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
34
|
+
tslib_1.__metadata("design:type", String)
|
|
35
|
+
], ChecklistItemCommentPatch.prototype, "checklistItemId", void 0);
|
|
36
|
+
exports.ChecklistItemCommentPatch = ChecklistItemCommentPatch = tslib_1.__decorate([
|
|
37
|
+
(0, type_graphql_1.InputType)()
|
|
38
|
+
], ChecklistItemCommentPatch);
|
|
39
|
+
let ChecklistItemCommentList = class ChecklistItemCommentList {
|
|
40
|
+
};
|
|
41
|
+
exports.ChecklistItemCommentList = ChecklistItemCommentList;
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, type_graphql_1.Field)(type => [checklist_item_comment_1.ChecklistItemComment]),
|
|
44
|
+
tslib_1.__metadata("design:type", Array)
|
|
45
|
+
], ChecklistItemCommentList.prototype, "items", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
48
|
+
tslib_1.__metadata("design:type", Number)
|
|
49
|
+
], ChecklistItemCommentList.prototype, "total", void 0);
|
|
50
|
+
exports.ChecklistItemCommentList = ChecklistItemCommentList = tslib_1.__decorate([
|
|
51
|
+
(0, type_graphql_1.ObjectType)()
|
|
52
|
+
], ChecklistItemCommentList);
|
|
53
|
+
//# sourceMappingURL=checklist-item-comment-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-item-comment-type.js","sourceRoot":"","sources":["../../../server/service/checklist-item-comment/checklist-item-comment-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,qEAA+D;AAGxD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAMnC,CAAA;AANY,0DAAuB;AAElC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACF;kCALb,uBAAuB;IADnC,IAAA,wBAAS,GAAE;GACC,uBAAuB,CAMnC;AAGM,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CASrC,CAAA;AATY,8DAAyB;AAEpC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACF;oCARb,yBAAyB;IADrC,IAAA,wBAAS,GAAE;GACC,yBAAyB,CASrC;AAGM,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;CAMpC,CAAA;AANY,4DAAwB;AAEnC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,6CAAoB,CAAC,CAAC;;uDACT;AAG7B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;uDACN;mCALF,wBAAwB;IADpC,IAAA,yBAAU,GAAE;GACA,wBAAwB,CAMpC","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { ChecklistItemComment } from './checklist-item-comment'\n\n@InputType()\nexport class NewChecklistItemComment {\n @Field({ nullable: true })\n comment?: string\n\n @Field({ nullable: true })\n checklistItemId?: string\n}\n\n@InputType()\nexport class ChecklistItemCommentPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n comment?: string\n\n @Field({ nullable: true })\n checklistItemId?: string\n}\n\n@ObjectType()\nexport class ChecklistItemCommentList {\n @Field(type => [ChecklistItemComment])\n items: ChecklistItemComment[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { ChecklistItem } from '../checklist-item/checklist-item';
|
|
3
|
+
export declare class ChecklistItemComment {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
comment?: string;
|
|
6
|
+
checklistItem?: ChecklistItem;
|
|
7
|
+
checklistItemId?: string;
|
|
8
|
+
createdAt?: Date;
|
|
9
|
+
deletedAt?: Date;
|
|
10
|
+
creator?: User;
|
|
11
|
+
creatorId?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistItemComment = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const type_graphql_1 = require("type-graphql");
|
|
7
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
+
const checklist_item_1 = require("../checklist-item/checklist-item");
|
|
9
|
+
let ChecklistItemComment = class ChecklistItemComment {
|
|
10
|
+
};
|
|
11
|
+
exports.ChecklistItemComment = ChecklistItemComment;
|
|
12
|
+
tslib_1.__decorate([
|
|
13
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
14
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
15
|
+
tslib_1.__metadata("design:type", String)
|
|
16
|
+
], ChecklistItemComment.prototype, "id", void 0);
|
|
17
|
+
tslib_1.__decorate([
|
|
18
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '조치 사항 코멘트' }),
|
|
19
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
20
|
+
tslib_1.__metadata("design:type", String)
|
|
21
|
+
], ChecklistItemComment.prototype, "comment", void 0);
|
|
22
|
+
tslib_1.__decorate([
|
|
23
|
+
(0, typeorm_1.ManyToOne)(type => checklist_item_1.ChecklistItem),
|
|
24
|
+
(0, type_graphql_1.Field)(type => checklist_item_1.ChecklistItem, { nullable: true }),
|
|
25
|
+
tslib_1.__metadata("design:type", checklist_item_1.ChecklistItem)
|
|
26
|
+
], ChecklistItemComment.prototype, "checklistItem", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, typeorm_1.RelationId)((checklistItemComment) => checklistItemComment.checklistItem),
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
30
|
+
], ChecklistItemComment.prototype, "checklistItemId", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
33
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
34
|
+
tslib_1.__metadata("design:type", Date)
|
|
35
|
+
], ChecklistItemComment.prototype, "createdAt", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
38
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
|
+
tslib_1.__metadata("design:type", Date)
|
|
40
|
+
], ChecklistItemComment.prototype, "deletedAt", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
43
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
44
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
45
|
+
], ChecklistItemComment.prototype, "creator", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, typeorm_1.RelationId)((checklistItemComment) => checklistItemComment.creator),
|
|
48
|
+
tslib_1.__metadata("design:type", String)
|
|
49
|
+
], ChecklistItemComment.prototype, "creatorId", void 0);
|
|
50
|
+
exports.ChecklistItemComment = ChecklistItemComment = tslib_1.__decorate([
|
|
51
|
+
(0, typeorm_1.Entity)(),
|
|
52
|
+
(0, typeorm_1.Index)('ix_checklist_item_comment_0', (checklistItemComment) => [checklistItemComment.checklistItem, checklistItemComment.createdAt], {
|
|
53
|
+
where: '"deleted_at" IS NULL'
|
|
54
|
+
}),
|
|
55
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for ChecklistItemComment' })
|
|
56
|
+
], ChecklistItemComment);
|
|
57
|
+
//# sourceMappingURL=checklist-item-comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-item-comment.js","sourceRoot":"","sources":["../../../server/service/checklist-item-comment/checklist-item-comment.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AACpD,yDAAgD;AAChD,qEAAgE;AAWzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CA+BhC,CAAA;AA/BY,oDAAoB;AAGtB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;gDACC;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAChD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACV;AAKhB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAa,CAAC;IAChC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjC,8BAAa;2DAAA;AAG7B;IADC,IAAA,oBAAU,EAAC,CAAC,oBAA0C,EAAE,EAAE,CAAC,oBAAoB,CAAC,aAAa,CAAC;;6DACvE;AAIxB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;uDAAA;AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACd,IAAI;uDAAA;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;qDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,oBAA0C,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC;;uDACvE;+BA9BP,oBAAoB;IAThC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,6BAA6B,EAC7B,CAAC,oBAA0C,EAAE,EAAE,CAAC,CAAC,oBAAoB,CAAC,aAAa,EAAE,oBAAoB,CAAC,SAAS,CAAC,EACpH;QACE,KAAK,EAAE,sBAAsB;KAC9B,CACF;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;GAClD,oBAAoB,CA+BhC","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistItem } from '../checklist-item/checklist-item'\n\n@Entity()\n@Index(\n 'ix_checklist_item_comment_0',\n (checklistItemComment: ChecklistItemComment) => [checklistItemComment.checklistItem, checklistItemComment.createdAt],\n {\n where: '\"deleted_at\" IS NULL'\n }\n)\n@ObjectType({ description: 'Entity for ChecklistItemComment' })\nexport class ChecklistItemComment {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, comment: '조치 사항 코멘트' })\n @Field({ nullable: true })\n comment?: string\n\n // 체크리스트 아이템 정보 (상위 테이블 참조)\n @ManyToOne(type => ChecklistItem)\n @Field(type => ChecklistItem, { nullable: true })\n checklistItem?: ChecklistItem\n\n @RelationId((checklistItemComment: ChecklistItemComment) => checklistItemComment.checklistItem)\n checklistItemId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: 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((checklistItemComment: ChecklistItemComment) => checklistItemComment.creator)\n creatorId?: string\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ChecklistItemComment } from './checklist-item-comment';
|
|
2
|
+
import { ChecklistItemCommentQuery } from './checklist-item-comment-query';
|
|
3
|
+
import { ChecklistItemCommentMutation } from './checklist-item-comment-mutation';
|
|
4
|
+
export declare const entities: (typeof ChecklistItemComment)[];
|
|
5
|
+
export declare const resolvers: (typeof ChecklistItemCommentQuery | typeof ChecklistItemCommentMutation)[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const checklist_item_comment_1 = require("./checklist-item-comment");
|
|
5
|
+
const checklist_item_comment_history_1 = require("./checklist-item-comment-history");
|
|
6
|
+
const checklist_item_comment_query_1 = require("./checklist-item-comment-query");
|
|
7
|
+
const checklist_item_comment_mutation_1 = require("./checklist-item-comment-mutation");
|
|
8
|
+
exports.entities = [checklist_item_comment_1.ChecklistItemComment, checklist_item_comment_history_1.ChecklistItemCommentHistory];
|
|
9
|
+
exports.resolvers = [checklist_item_comment_query_1.ChecklistItemCommentQuery, checklist_item_comment_mutation_1.ChecklistItemCommentMutation];
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist-item-comment/index.ts"],"names":[],"mappings":";;;AAAA,qEAA+D;AAC/D,qFAA8E;AAC9E,iFAA0E;AAC1E,uFAAgF;AAEnE,QAAA,QAAQ,GAAG,CAAC,6CAAoB,EAAE,4DAA2B,CAAC,CAAA;AAC9D,QAAA,SAAS,GAAG,CAAC,wDAAyB,EAAE,8DAA4B,CAAC,CAAA","sourcesContent":["import { ChecklistItemComment } from './checklist-item-comment'\nimport { ChecklistItemCommentHistory } from './checklist-item-comment-history'\nimport { ChecklistItemCommentQuery } from './checklist-item-comment-query'\nimport { ChecklistItemCommentMutation } from './checklist-item-comment-mutation'\n\nexport const entities = [ChecklistItemComment, ChecklistItemCommentHistory]\nexport const resolvers = [ChecklistItemCommentQuery, ChecklistItemCommentMutation]\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Attachment } from '@things-factory/attachment-base';
|
|
2
|
+
import { ListParam } from '@things-factory/shell';
|
|
3
|
+
import { User } from '@things-factory/auth-base';
|
|
4
|
+
import { ChecklistItemHistory } from './checklist-item-history';
|
|
5
|
+
import { ChecklistItemHistoryList } from './checklist-item-history-type';
|
|
6
|
+
import { ChecklistItemComment } from '../checklist-item-comment/checklist-item-comment';
|
|
7
|
+
export declare class ChecklistItemHistoryQuery {
|
|
8
|
+
checklistItemHistory(id: string, context: ResolverContext): Promise<ChecklistItemHistory>;
|
|
9
|
+
checklistItemHistories(params: ListParam, context: ResolverContext): Promise<ChecklistItemHistoryList>;
|
|
10
|
+
checklistItemComments(checklistItemHistory: ChecklistItemHistory): Promise<ChecklistItemComment[]>;
|
|
11
|
+
checklistItemCommentCount(checklistItemHistory: ChecklistItemHistory): Promise<number>;
|
|
12
|
+
checklistItemAttachments(checklistItemHistory: ChecklistItemHistory, description?: string): Promise<Attachment[]>;
|
|
13
|
+
checklistItemAttachmentCount(checklistItemHistory: ChecklistItemHistory): Promise<number>;
|
|
14
|
+
updater(checklistItemHistory: ChecklistItemHistory): Promise<User>;
|
|
15
|
+
creator(checklistItemHistory: ChecklistItemHistory): Promise<User>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistItemHistoryQuery = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const attachment_base_1 = require("@things-factory/attachment-base");
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
|
+
const checklist_item_history_1 = require("./checklist-item-history");
|
|
10
|
+
const checklist_item_history_type_1 = require("./checklist-item-history-type");
|
|
11
|
+
const checklist_item_comment_1 = require("../checklist-item-comment/checklist-item-comment");
|
|
12
|
+
let ChecklistItemHistoryQuery = class ChecklistItemHistoryQuery {
|
|
13
|
+
async checklistItemHistory(id, context) {
|
|
14
|
+
return await (0, shell_1.getRepository)(checklist_item_history_1.ChecklistItemHistory).findOne({
|
|
15
|
+
where: { id }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async checklistItemHistories(params, context) {
|
|
19
|
+
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
20
|
+
params,
|
|
21
|
+
repository: await (0, shell_1.getRepository)(checklist_item_history_1.ChecklistItemHistory),
|
|
22
|
+
searchables: ['name', 'description']
|
|
23
|
+
});
|
|
24
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
25
|
+
return { items, total };
|
|
26
|
+
}
|
|
27
|
+
async checklistItemComments(checklistItemHistory) {
|
|
28
|
+
return await (0, shell_1.getRepository)(checklist_item_comment_1.ChecklistItemComment).findBy({ checklistItem: { id: checklistItemHistory.id } });
|
|
29
|
+
}
|
|
30
|
+
async checklistItemCommentCount(checklistItemHistory) {
|
|
31
|
+
return await (0, shell_1.getRepository)(checklist_item_comment_1.ChecklistItemComment).countBy({ checklistItem: { id: checklistItemHistory.id } });
|
|
32
|
+
}
|
|
33
|
+
async checklistItemAttachments(checklistItemHistory, description) {
|
|
34
|
+
return await (0, shell_1.getRepository)(attachment_base_1.Attachment).find({
|
|
35
|
+
where: {
|
|
36
|
+
refType: checklist_item_history_1.ChecklistItemHistory.name,
|
|
37
|
+
refBy: checklistItemHistory.id,
|
|
38
|
+
description: description // 검측 상태로 받으며 어떤 스탭에 올렸는지로 시공자/감리자 구분
|
|
39
|
+
},
|
|
40
|
+
order: {
|
|
41
|
+
createdAt: 'DESC'
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async checklistItemAttachmentCount(checklistItemHistory) {
|
|
46
|
+
return await (0, shell_1.getRepository)(attachment_base_1.Attachment).count({
|
|
47
|
+
where: {
|
|
48
|
+
refType: checklist_item_history_1.ChecklistItemHistory.name,
|
|
49
|
+
refBy: checklistItemHistory.id
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async updater(checklistItemHistory) {
|
|
54
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklistItemHistory.updaterId });
|
|
55
|
+
}
|
|
56
|
+
async creator(checklistItemHistory) {
|
|
57
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklistItemHistory.creatorId });
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.ChecklistItemHistoryQuery = ChecklistItemHistoryQuery;
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, type_graphql_1.Query)(returns => checklist_item_history_1.ChecklistItemHistory, { nullable: true, description: 'To fetch a ChecklistItemHistory' }),
|
|
63
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
64
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
65
|
+
tslib_1.__metadata("design:type", Function),
|
|
66
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
67
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
68
|
+
], ChecklistItemHistoryQuery.prototype, "checklistItemHistory", null);
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, type_graphql_1.Query)(returns => checklist_item_history_type_1.ChecklistItemHistoryList, { description: 'To fetch multiple ChecklistItems' }),
|
|
71
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
72
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
73
|
+
tslib_1.__metadata("design:type", Function),
|
|
74
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
75
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
76
|
+
], ChecklistItemHistoryQuery.prototype, "checklistItemHistories", null);
|
|
77
|
+
tslib_1.__decorate([
|
|
78
|
+
(0, type_graphql_1.FieldResolver)(type => [checklist_item_comment_1.ChecklistItemComment]),
|
|
79
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
80
|
+
tslib_1.__metadata("design:type", Function),
|
|
81
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_history_1.ChecklistItemHistory]),
|
|
82
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
83
|
+
], ChecklistItemHistoryQuery.prototype, "checklistItemComments", null);
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, type_graphql_1.FieldResolver)(type => Number),
|
|
86
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
87
|
+
tslib_1.__metadata("design:type", Function),
|
|
88
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_history_1.ChecklistItemHistory]),
|
|
89
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
90
|
+
], ChecklistItemHistoryQuery.prototype, "checklistItemCommentCount", null);
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, type_graphql_1.FieldResolver)(type => [attachment_base_1.Attachment]),
|
|
93
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
94
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('description', { nullable: true })),
|
|
95
|
+
tslib_1.__metadata("design:type", Function),
|
|
96
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_history_1.ChecklistItemHistory, String]),
|
|
97
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
98
|
+
], ChecklistItemHistoryQuery.prototype, "checklistItemAttachments", null);
|
|
99
|
+
tslib_1.__decorate([
|
|
100
|
+
(0, type_graphql_1.FieldResolver)(type => Number),
|
|
101
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
102
|
+
tslib_1.__metadata("design:type", Function),
|
|
103
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_history_1.ChecklistItemHistory]),
|
|
104
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
105
|
+
], ChecklistItemHistoryQuery.prototype, "checklistItemAttachmentCount", null);
|
|
106
|
+
tslib_1.__decorate([
|
|
107
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
108
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
109
|
+
tslib_1.__metadata("design:type", Function),
|
|
110
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_history_1.ChecklistItemHistory]),
|
|
111
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
112
|
+
], ChecklistItemHistoryQuery.prototype, "updater", null);
|
|
113
|
+
tslib_1.__decorate([
|
|
114
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
115
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
116
|
+
tslib_1.__metadata("design:type", Function),
|
|
117
|
+
tslib_1.__metadata("design:paramtypes", [checklist_item_history_1.ChecklistItemHistory]),
|
|
118
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
119
|
+
], ChecklistItemHistoryQuery.prototype, "creator", null);
|
|
120
|
+
exports.ChecklistItemHistoryQuery = ChecklistItemHistoryQuery = tslib_1.__decorate([
|
|
121
|
+
(0, type_graphql_1.Resolver)(checklist_item_history_1.ChecklistItemHistory)
|
|
122
|
+
], ChecklistItemHistoryQuery);
|
|
123
|
+
//# sourceMappingURL=checklist-item-history-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-item-history-query.js","sourceRoot":"","sources":["../../../server/service/checklist-item-history/checklist-item-history-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,qEAA4D;AAC5D,iDAA+F;AAC/F,yDAAgD;AAChD,qEAA+D;AAC/D,+EAAwE;AACxE,6FAAuF;AAGhF,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAE9B,AAAN,KAAK,CAAC,oBAAoB,CAAY,EAAU,EAAS,OAAwB;QAC/E,OAAO,MAAM,IAAA,qBAAa,EAAC,6CAAoB,CAAC,CAAC,OAAO,CAAC;YACvD,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,sBAAsB,CAAS,MAAiB,EAAS,OAAwB;QACrF,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,6CAAoB,CAAC;YACrD,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,qBAAqB,CAAS,oBAA0C;QAC5E,OAAO,MAAM,IAAA,qBAAa,EAAC,6CAAoB,CAAC,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,oBAAoB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IAC7G,CAAC;IAGK,AAAN,KAAK,CAAC,yBAAyB,CAAS,oBAA0C;QAChF,OAAO,MAAM,IAAA,qBAAa,EAAC,6CAAoB,CAAC,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,EAA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,yBAAyB,CAmErC","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 { ChecklistItemHistory } from './checklist-item-history'\nimport { ChecklistItemHistoryList } from './checklist-item-history-type'\nimport { ChecklistItemComment } from '../checklist-item-comment/checklist-item-comment'\n\n@Resolver(ChecklistItemHistory)\nexport class ChecklistItemHistoryQuery {\n @Query(returns => ChecklistItemHistory!, { nullable: true, description: 'To fetch a ChecklistItemHistory' })\n async checklistItemHistory(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<ChecklistItemHistory> {\n return await getRepository(ChecklistItemHistory).findOne({\n where: { id }\n })\n }\n\n @Query(returns => ChecklistItemHistoryList, { description: 'To fetch multiple ChecklistItems' })\n async checklistItemHistories(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ChecklistItemHistoryList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(ChecklistItemHistory),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [ChecklistItemComment])\n async checklistItemComments(@Root() checklistItemHistory: ChecklistItemHistory): Promise<ChecklistItemComment[]> {\n return await getRepository(ChecklistItemComment).findBy({ checklistItem: { id: checklistItemHistory.id } })\n }\n\n @FieldResolver(type => Number)\n async checklistItemCommentCount(@Root() checklistItemHistory: ChecklistItemHistory): Promise<number> {\n return await getRepository(ChecklistItemComment).countBy({ checklistItem: { id: checklistItemHistory.id } })\n }\n\n @FieldResolver(type => [Attachment])\n async checklistItemAttachments(\n @Root() checklistItemHistory: ChecklistItemHistory,\n @Arg('description', { nullable: true }) description?: string\n ): Promise<Attachment[]> {\n return await getRepository(Attachment).find({\n where: {\n refType: ChecklistItemHistory.name,\n refBy: checklistItemHistory.id,\n description: description // 검측 상태로 받으며 어떤 스탭에 올렸는지로 시공자/감리자 구분\n },\n order: {\n createdAt: 'DESC'\n }\n })\n }\n\n @FieldResolver(type => Number)\n async checklistItemAttachmentCount(@Root() checklistItemHistory: ChecklistItemHistory): Promise<number> {\n return await getRepository(Attachment).count({\n where: {\n refType: ChecklistItemHistory.name,\n refBy: checklistItemHistory.id\n }\n })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() checklistItemHistory: ChecklistItemHistory): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistItemHistory.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() checklistItemHistory: ChecklistItemHistory): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistItemHistory.creatorId })\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistItemHistoryList = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const checklist_item_history_1 = require("./checklist-item-history");
|
|
7
|
+
let ChecklistItemHistoryList = class ChecklistItemHistoryList {
|
|
8
|
+
};
|
|
9
|
+
exports.ChecklistItemHistoryList = ChecklistItemHistoryList;
|
|
10
|
+
tslib_1.__decorate([
|
|
11
|
+
(0, type_graphql_1.Field)(type => [checklist_item_history_1.ChecklistItemHistory]),
|
|
12
|
+
tslib_1.__metadata("design:type", Array)
|
|
13
|
+
], ChecklistItemHistoryList.prototype, "items", void 0);
|
|
14
|
+
tslib_1.__decorate([
|
|
15
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
16
|
+
tslib_1.__metadata("design:type", Number)
|
|
17
|
+
], ChecklistItemHistoryList.prototype, "total", void 0);
|
|
18
|
+
exports.ChecklistItemHistoryList = ChecklistItemHistoryList = tslib_1.__decorate([
|
|
19
|
+
(0, type_graphql_1.ObjectType)()
|
|
20
|
+
], ChecklistItemHistoryList);
|
|
21
|
+
//# sourceMappingURL=checklist-item-history-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-item-history-type.js","sourceRoot":"","sources":["../../../server/service/checklist-item-history/checklist-item-history-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAqD;AACrD,qEAA+D;AAGxD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;CAMpC,CAAA;AANY,4DAAwB;AAEnC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,6CAAoB,CAAC,CAAC;;uDACT;AAG7B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;uDACN;mCALF,wBAAwB;IADpC,IAAA,yBAAU,GAAE;GACA,wBAAwB,CAMpC","sourcesContent":["import { ObjectType, Field, Int } from 'type-graphql'\nimport { ChecklistItemHistory } from './checklist-item-history'\n\n@ObjectType()\nexport class ChecklistItemHistoryList {\n @Field(type => [ChecklistItemHistory])\n items: ChecklistItemHistory[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HistoryActionType, HistoryEntityInterface } from '@operato/typeorm-history';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { ChecklistItem, ChecklistItemConfirmStatus } from '../checklist-item/checklist-item';
|
|
4
|
+
import { ChecklistHistory } from '../checklist-history/checklist-history';
|
|
5
|
+
export declare class ChecklistItemHistory implements HistoryEntityInterface<ChecklistItem> {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
originalId: string;
|
|
8
|
+
sequence?: number;
|
|
9
|
+
mainType?: string;
|
|
10
|
+
detailType?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
inspctionCriteria?: string;
|
|
13
|
+
kcsCriteria?: string;
|
|
14
|
+
siteSpecCriteria?: string;
|
|
15
|
+
constructionConfirmStatus?: ChecklistItemConfirmStatus;
|
|
16
|
+
supervisoryConfirmStatus?: ChecklistItemConfirmStatus;
|
|
17
|
+
checklistId?: string;
|
|
18
|
+
checklistHistory?: ChecklistHistory;
|
|
19
|
+
checklistHistoryId?: string;
|
|
20
|
+
createdAt?: Date;
|
|
21
|
+
loggedAt?: Date;
|
|
22
|
+
creator?: User;
|
|
23
|
+
creatorId?: string;
|
|
24
|
+
updater?: User;
|
|
25
|
+
updaterId?: string;
|
|
26
|
+
action: HistoryActionType;
|
|
27
|
+
}
|