@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,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistTemplateItemMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const checklist_template_item_1 = require("./checklist-template-item");
|
|
8
|
+
const checklist_template_item_type_1 = require("./checklist-template-item-type");
|
|
9
|
+
const checklist_template_1 = require("../checklist-template/checklist-template");
|
|
10
|
+
const spec_matching_service_1 = require("./spec-matching-service");
|
|
11
|
+
const env_1 = require("@things-factory/env");
|
|
12
|
+
const building_inspection_1 = require("../building-inspection/building-inspection");
|
|
13
|
+
const projectType = env_1.config.get('projectType', building_inspection_1.ProjectType.DSSP);
|
|
14
|
+
let ChecklistTemplateItemMutation = class ChecklistTemplateItemMutation {
|
|
15
|
+
async updateMultipleChecklistTemplateItems(patches, checklistTemplateId, context) {
|
|
16
|
+
const { domain, user, tx } = context.state;
|
|
17
|
+
let results = [];
|
|
18
|
+
const checklistTemplateItemRepo = tx.getRepository(checklist_template_item_1.ChecklistTemplateItem);
|
|
19
|
+
const checklistTemplate = await tx.getRepository(checklist_template_1.ChecklistTemplate).findOneBy({ id: checklistTemplateId });
|
|
20
|
+
await checklistTemplateItemRepo.delete({ checklistTemplate: { id: checklistTemplateId } });
|
|
21
|
+
for (let i = 0; i < patches.length; i++) {
|
|
22
|
+
const result = await checklistTemplateItemRepo.save(Object.assign(Object.assign({}, patches[i]), { sequence: i, checklistTemplate, inspctionCriteria: '', criteriaRequestStatus: checklist_template_item_1.CriteriaRequestStatus.REQUEST, creator: user, updater: user }));
|
|
23
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
24
|
+
}
|
|
25
|
+
// DSSP가 아닌 경우에는 검측 정보 AI 요청
|
|
26
|
+
if (projectType !== building_inspection_1.ProjectType.DSSP) {
|
|
27
|
+
// 1. inspctionCriteria 데이터 초기화
|
|
28
|
+
const checklistTemplateItemIds = results.map(v => v.id);
|
|
29
|
+
checklistTemplateItemRepo.update({ id: (0, typeorm_1.In)(checklistTemplateItemIds) }, { inspctionCriteria: '', criteriaRequestStatus: checklist_template_item_1.CriteriaRequestStatus.REQUEST });
|
|
30
|
+
// 2. inspctionCriteria 비동기 업데이트 트리거 (ChecklistTemplateItem.name -> 외부 API 호출)
|
|
31
|
+
(0, spec_matching_service_1.queueUpdateInspctionCriteria)(results.map(v => v.id));
|
|
32
|
+
}
|
|
33
|
+
return results;
|
|
34
|
+
}
|
|
35
|
+
async deleteChecklistTemplateItem(id, context) {
|
|
36
|
+
const { domain, tx } = context.state;
|
|
37
|
+
await tx.getRepository(checklist_template_item_1.ChecklistTemplateItem).delete({ id });
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
async deleteChecklistTemplateItems(ids, context) {
|
|
41
|
+
const { domain, tx } = context.state;
|
|
42
|
+
await tx.getRepository(checklist_template_item_1.ChecklistTemplateItem).delete({
|
|
43
|
+
id: (0, typeorm_1.In)(ids)
|
|
44
|
+
});
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.ChecklistTemplateItemMutation = ChecklistTemplateItemMutation;
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
51
|
+
(0, type_graphql_1.Mutation)(returns => [checklist_template_item_1.ChecklistTemplateItem], { description: "To modify multiple ChecklistTemplateItems' information" }),
|
|
52
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [checklist_template_item_type_1.ChecklistTemplateItemPatch])),
|
|
53
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('checklistTemplateId')),
|
|
54
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
55
|
+
tslib_1.__metadata("design:type", Function),
|
|
56
|
+
tslib_1.__metadata("design:paramtypes", [Array, String, Object]),
|
|
57
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
58
|
+
], ChecklistTemplateItemMutation.prototype, "updateMultipleChecklistTemplateItems", null);
|
|
59
|
+
tslib_1.__decorate([
|
|
60
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
61
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete ChecklistTemplateItem' }),
|
|
62
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
63
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
64
|
+
tslib_1.__metadata("design:type", Function),
|
|
65
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
66
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
67
|
+
], ChecklistTemplateItemMutation.prototype, "deleteChecklistTemplateItem", null);
|
|
68
|
+
tslib_1.__decorate([
|
|
69
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
70
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple ChecklistTemplateItems' }),
|
|
71
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
72
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
73
|
+
tslib_1.__metadata("design:type", Function),
|
|
74
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
75
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
76
|
+
], ChecklistTemplateItemMutation.prototype, "deleteChecklistTemplateItems", null);
|
|
77
|
+
exports.ChecklistTemplateItemMutation = ChecklistTemplateItemMutation = tslib_1.__decorate([
|
|
78
|
+
(0, type_graphql_1.Resolver)(checklist_template_item_1.ChecklistTemplateItem)
|
|
79
|
+
], ChecklistTemplateItemMutation);
|
|
80
|
+
//# sourceMappingURL=checklist-template-item-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-template-item-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/checklist-template-item-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,uEAAwF;AACxF,iFAA2E;AAC3E,iFAA4E;AAC5E,mEAAsE;AACtE,6CAA4C;AAC5C,oFAAwE;AAExE,MAAM,WAAW,GAAG,YAAM,CAAC,GAAG,CAAC,aAAa,EAAE,iCAAW,CAAC,IAAI,CAAC,CAAA;AAExD,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAGlC,AAAN,KAAK,CAAC,oCAAoC,CACc,OAAqC,EAC/D,mBAA2B,EAChD,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,IAAI,OAAO,GAAG,EAAE,CAAA;QAEhB,MAAM,yBAAyB,GAAG,EAAE,CAAC,aAAa,CAAC,+CAAqB,CAAC,CAAA;QACzE,MAAM,iBAAiB,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,sCAAiB,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAA;QAE1G,MAAM,yBAAyB,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,EAAE,CAAC,CAAA;QAE1F,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,MAAM,GAAG,MAAM,y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 'type-graphql'\nimport { In } from 'typeorm'\nimport { ChecklistTemplateItem, CriteriaRequestStatus } from './checklist-template-item'\nimport { ChecklistTemplateItemPatch } from './checklist-template-item-type'\nimport { ChecklistTemplate } from '../checklist-template/checklist-template'\nimport { queueUpdateInspctionCriteria } from './spec-matching-service'\nimport { config } from '@things-factory/env'\nimport { ProjectType } from '../building-inspection/building-inspection'\n\nconst projectType = config.get('projectType', ProjectType.DSSP)\n@Resolver(ChecklistTemplateItem)\nexport class ChecklistTemplateItemMutation {\n @Directive('@transaction')\n @Mutation(returns => [ChecklistTemplateItem], { description: \"To modify multiple ChecklistTemplateItems' information\" })\n async updateMultipleChecklistTemplateItems(\n @Arg('patches', type => [ChecklistTemplateItemPatch]) patches: ChecklistTemplateItemPatch[],\n @Arg('checklistTemplateId') checklistTemplateId: string,\n @Ctx() context: ResolverContext\n ): Promise<ChecklistTemplateItem[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n\n const checklistTemplateItemRepo = tx.getRepository(ChecklistTemplateItem)\n const checklistTemplate = await tx.getRepository(ChecklistTemplate).findOneBy({ id: checklistTemplateId })\n\n await checklistTemplateItemRepo.delete({ checklistTemplate: { id: checklistTemplateId } })\n\n for (let i = 0; i < patches.length; i++) {\n const result = await checklistTemplateItemRepo.save({\n ...patches[i],\n sequence: i,\n checklistTemplate,\n inspctionCriteria: '',\n criteriaRequestStatus: CriteriaRequestStatus.REQUEST,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n\n // DSSP가 아닌 경우에는 검측 정보 AI 요청\n if (projectType !== ProjectType.DSSP) {\n // 1. inspctionCriteria 데이터 초기화\n const checklistTemplateItemIds = results.map(v => v.id)\n checklistTemplateItemRepo.update(\n { id: In(checklistTemplateItemIds) },\n { inspctionCriteria: '', criteriaRequestStatus: CriteriaRequestStatus.REQUEST }\n )\n\n // 2. inspctionCriteria 비동기 업데이트 트리거 (ChecklistTemplateItem.name -> 외부 API 호출)\n queueUpdateInspctionCriteria(results.map(v => v.id))\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete ChecklistTemplateItem' })\n async deleteChecklistTemplateItem(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(ChecklistTemplateItem).delete({ id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple ChecklistTemplateItems' })\n async deleteChecklistTemplateItems(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(ChecklistTemplateItem).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ListParam } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { ChecklistTemplateItem } from './checklist-template-item';
|
|
4
|
+
import { ChecklistTemplateItemList } from './checklist-template-item-type';
|
|
5
|
+
export declare class ChecklistTemplateItemQuery {
|
|
6
|
+
checklistTemplateItem(id: string, context: ResolverContext): Promise<ChecklistTemplateItem>;
|
|
7
|
+
checklistTemplateItems(params: ListParam, context: ResolverContext): Promise<ChecklistTemplateItemList>;
|
|
8
|
+
detailTypeName(checklistTemplateItem: ChecklistTemplateItem): Promise<string>;
|
|
9
|
+
updater(checklistTemplateItem: ChecklistTemplateItem): Promise<User>;
|
|
10
|
+
creator(checklistTemplateItem: ChecklistTemplateItem): Promise<User>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistTemplateItemQuery = 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_template_item_1 = require("./checklist-template-item");
|
|
9
|
+
const checklist_template_item_type_1 = require("./checklist-template-item-type");
|
|
10
|
+
const checklist_type_1 = require("../checklist-type/checklist-type");
|
|
11
|
+
let ChecklistTemplateItemQuery = class ChecklistTemplateItemQuery {
|
|
12
|
+
async checklistTemplateItem(id, context) {
|
|
13
|
+
return await (0, shell_1.getRepository)(checklist_template_item_1.ChecklistTemplateItem).findOne({
|
|
14
|
+
where: { id }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
async checklistTemplateItems(params, context) {
|
|
18
|
+
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
19
|
+
params,
|
|
20
|
+
repository: await (0, shell_1.getRepository)(checklist_template_item_1.ChecklistTemplateItem),
|
|
21
|
+
searchables: ['name', 'description']
|
|
22
|
+
});
|
|
23
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
24
|
+
return { items, total };
|
|
25
|
+
}
|
|
26
|
+
async detailTypeName(checklistTemplateItem) {
|
|
27
|
+
var _a;
|
|
28
|
+
return ((_a = (await (0, shell_1.getRepository)(checklist_type_1.ChecklistType).findOneBy({ id: checklistTemplateItem.detailType }))) === null || _a === void 0 ? void 0 : _a.detailType) || '';
|
|
29
|
+
}
|
|
30
|
+
async updater(checklistTemplateItem) {
|
|
31
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklistTemplateItem.updaterId });
|
|
32
|
+
}
|
|
33
|
+
async creator(checklistTemplateItem) {
|
|
34
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklistTemplateItem.creatorId });
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.ChecklistTemplateItemQuery = ChecklistTemplateItemQuery;
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, type_graphql_1.Query)(returns => checklist_template_item_1.ChecklistTemplateItem, { nullable: true, description: 'To fetch a ChecklistTemplateItem' }),
|
|
40
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
41
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
42
|
+
tslib_1.__metadata("design:type", Function),
|
|
43
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
44
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
45
|
+
], ChecklistTemplateItemQuery.prototype, "checklistTemplateItem", null);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, type_graphql_1.Query)(returns => checklist_template_item_type_1.ChecklistTemplateItemList, { description: 'To fetch multiple ChecklistTemplateItems' }),
|
|
48
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
49
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
50
|
+
tslib_1.__metadata("design:type", Function),
|
|
51
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
52
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
53
|
+
], ChecklistTemplateItemQuery.prototype, "checklistTemplateItems", null);
|
|
54
|
+
tslib_1.__decorate([
|
|
55
|
+
(0, type_graphql_1.FieldResolver)(type => String),
|
|
56
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
57
|
+
tslib_1.__metadata("design:type", Function),
|
|
58
|
+
tslib_1.__metadata("design:paramtypes", [checklist_template_item_1.ChecklistTemplateItem]),
|
|
59
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
60
|
+
], ChecklistTemplateItemQuery.prototype, "detailTypeName", null);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
63
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
64
|
+
tslib_1.__metadata("design:type", Function),
|
|
65
|
+
tslib_1.__metadata("design:paramtypes", [checklist_template_item_1.ChecklistTemplateItem]),
|
|
66
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
67
|
+
], ChecklistTemplateItemQuery.prototype, "updater", null);
|
|
68
|
+
tslib_1.__decorate([
|
|
69
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
70
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
71
|
+
tslib_1.__metadata("design:type", Function),
|
|
72
|
+
tslib_1.__metadata("design:paramtypes", [checklist_template_item_1.ChecklistTemplateItem]),
|
|
73
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
74
|
+
], ChecklistTemplateItemQuery.prototype, "creator", null);
|
|
75
|
+
exports.ChecklistTemplateItemQuery = ChecklistTemplateItemQuery = tslib_1.__decorate([
|
|
76
|
+
(0, type_graphql_1.Resolver)(checklist_template_item_1.ChecklistTemplateItem)
|
|
77
|
+
], ChecklistTemplateItemQuery);
|
|
78
|
+
//# sourceMappingURL=checklist-template-item-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-template-item-query.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/checklist-template-item-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAA+F;AAC/F,yDAAgD;AAChD,uEAAiE;AACjE,iFAA0E;AAC1E,qEAAgE;AAGzD,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAE/B,AAAN,KAAK,CAAC,qBAAqB,CAAY,EAAU,EAAS,OAAwB;QAChF,OAAO,MAAM,IAAA,qBAAa,EAAC,+CAAqB,CAAC,CAAC,OAAO,CAAC;YACxD,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,+CAAqB,CAAC;YACtD,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA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,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC;IACR,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;gEAExE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;yDAEjE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;yDAEjE;qCAlCU,0BAA0B;IADtC,IAAA,uBAAQ,EAAC,+CAAqB,CAAC;GACnB,0BAA0B,CAmCtC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistTemplateItem } from './checklist-template-item'\nimport { ChecklistTemplateItemList } from './checklist-template-item-type'\nimport { ChecklistType } from '../checklist-type/checklist-type'\n\n@Resolver(ChecklistTemplateItem)\nexport class ChecklistTemplateItemQuery {\n @Query(returns => ChecklistTemplateItem!, { nullable: true, description: 'To fetch a ChecklistTemplateItem' })\n async checklistTemplateItem(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<ChecklistTemplateItem> {\n return await getRepository(ChecklistTemplateItem).findOne({\n where: { id }\n })\n }\n\n @Query(returns => ChecklistTemplateItemList, { description: 'To fetch multiple ChecklistTemplateItems' })\n async checklistTemplateItems(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ChecklistTemplateItemList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(ChecklistTemplateItem),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => String)\n async detailTypeName(@Root() checklistTemplateItem: ChecklistTemplateItem): Promise<string> {\n return (await getRepository(ChecklistType).findOneBy({ id: checklistTemplateItem.detailType }))?.detailType || ''\n }\n\n @FieldResolver(type => User)\n async updater(@Root() checklistTemplateItem: ChecklistTemplateItem): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistTemplateItem.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() checklistTemplateItem: ChecklistTemplateItem): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistTemplateItem.creatorId })\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChecklistTemplateItem } from './checklist-template-item';
|
|
2
|
+
import { ChecklistTypeMainType } from '../checklist-type/checklist-type';
|
|
3
|
+
import { CriteriaRequestStatus } from './checklist-template-item';
|
|
4
|
+
export declare class ChecklistTemplateItemPatch {
|
|
5
|
+
id?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
inspctionCriteria?: string;
|
|
8
|
+
criteriaRequestStatus?: CriteriaRequestStatus;
|
|
9
|
+
inspctionCriteriaText?: string;
|
|
10
|
+
sequence?: number;
|
|
11
|
+
mainType?: ChecklistTypeMainType;
|
|
12
|
+
detailType?: string;
|
|
13
|
+
checklistTemplateId?: string;
|
|
14
|
+
cuFlag?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class ChecklistTemplateItemList {
|
|
17
|
+
items: ChecklistTemplateItem[];
|
|
18
|
+
total: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistTemplateItemList = exports.ChecklistTemplateItemPatch = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const checklist_template_item_1 = require("./checklist-template-item");
|
|
7
|
+
const checklist_type_1 = require("../checklist-type/checklist-type");
|
|
8
|
+
const checklist_template_item_2 = require("./checklist-template-item");
|
|
9
|
+
let ChecklistTemplateItemPatch = class ChecklistTemplateItemPatch {
|
|
10
|
+
};
|
|
11
|
+
exports.ChecklistTemplateItemPatch = ChecklistTemplateItemPatch;
|
|
12
|
+
tslib_1.__decorate([
|
|
13
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
14
|
+
tslib_1.__metadata("design:type", String)
|
|
15
|
+
], ChecklistTemplateItemPatch.prototype, "id", void 0);
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
18
|
+
tslib_1.__metadata("design:type", String)
|
|
19
|
+
], ChecklistTemplateItemPatch.prototype, "name", void 0);
|
|
20
|
+
tslib_1.__decorate([
|
|
21
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
22
|
+
tslib_1.__metadata("design:type", String)
|
|
23
|
+
], ChecklistTemplateItemPatch.prototype, "inspctionCriteria", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, type_graphql_1.Field)(type => checklist_template_item_2.CriteriaRequestStatus, { nullable: true }),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
27
|
+
], ChecklistTemplateItemPatch.prototype, "criteriaRequestStatus", void 0);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
31
|
+
], ChecklistTemplateItemPatch.prototype, "inspctionCriteriaText", void 0);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
34
|
+
tslib_1.__metadata("design:type", Number)
|
|
35
|
+
], ChecklistTemplateItemPatch.prototype, "sequence", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
39
|
+
], ChecklistTemplateItemPatch.prototype, "mainType", void 0);
|
|
40
|
+
tslib_1.__decorate([
|
|
41
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
42
|
+
tslib_1.__metadata("design:type", String)
|
|
43
|
+
], ChecklistTemplateItemPatch.prototype, "detailType", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
47
|
+
], ChecklistTemplateItemPatch.prototype, "checklistTemplateId", void 0);
|
|
48
|
+
tslib_1.__decorate([
|
|
49
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
50
|
+
tslib_1.__metadata("design:type", String)
|
|
51
|
+
], ChecklistTemplateItemPatch.prototype, "cuFlag", void 0);
|
|
52
|
+
exports.ChecklistTemplateItemPatch = ChecklistTemplateItemPatch = tslib_1.__decorate([
|
|
53
|
+
(0, type_graphql_1.InputType)()
|
|
54
|
+
], ChecklistTemplateItemPatch);
|
|
55
|
+
let ChecklistTemplateItemList = class ChecklistTemplateItemList {
|
|
56
|
+
};
|
|
57
|
+
exports.ChecklistTemplateItemList = ChecklistTemplateItemList;
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, type_graphql_1.Field)(type => [checklist_template_item_1.ChecklistTemplateItem]),
|
|
60
|
+
tslib_1.__metadata("design:type", Array)
|
|
61
|
+
], ChecklistTemplateItemList.prototype, "items", void 0);
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
64
|
+
tslib_1.__metadata("design:type", Number)
|
|
65
|
+
], ChecklistTemplateItemList.prototype, "total", void 0);
|
|
66
|
+
exports.ChecklistTemplateItemList = ChecklistTemplateItemList = tslib_1.__decorate([
|
|
67
|
+
(0, type_graphql_1.ObjectType)()
|
|
68
|
+
], ChecklistTemplateItemList);
|
|
69
|
+
//# sourceMappingURL=checklist-template-item-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-template-item-type.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/checklist-template-item-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,uEAAiE;AACjE,qEAAwE;AACxE,uEAAiE;AAG1D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CA8BtC,CAAA;AA9BY,gEAA0B;AAErC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qEACA;AAG1B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,+CAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yEACZ;AAG7C;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yEACI;AAG9B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACtB;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACM;AAGhC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACP;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uEACE;AAG5B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACX;qCA7BJ,0BAA0B;IADtC,IAAA,wBAAS,GAAE;GACC,0BAA0B,CA8BtC;AAGM,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAMrC,CAAA;AANY,8DAAyB;AAEpC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,+CAAqB,CAAC,CAAC;;wDACT;AAG9B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;wDACN;oCALF,yBAAyB;IADrC,IAAA,yBAAU,GAAE;GACA,yBAAyB,CAMrC","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { ChecklistTemplateItem } from './checklist-template-item'\nimport { ChecklistTypeMainType } from '../checklist-type/checklist-type'\nimport { CriteriaRequestStatus } from './checklist-template-item'\n\n@InputType()\nexport class ChecklistTemplateItemPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n inspctionCriteria?: string\n\n @Field(type => CriteriaRequestStatus, { nullable: true })\n criteriaRequestStatus?: CriteriaRequestStatus\n\n @Field({ nullable: true })\n inspctionCriteriaText?: string\n\n @Field(type => Int, { nullable: true })\n sequence?: number\n\n @Field({ nullable: true })\n mainType?: ChecklistTypeMainType\n\n @Field({ nullable: true })\n detailType?: string\n\n @Field({ nullable: true })\n checklistTemplateId?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ChecklistTemplateItemList {\n @Field(type => [ChecklistTemplateItem])\n items: ChecklistTemplateItem[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { ChecklistTemplate } from '../checklist-template/checklist-template';
|
|
3
|
+
import { ChecklistTypeMainType } from '../checklist-type/checklist-type';
|
|
4
|
+
export declare enum CriteriaRequestStatus {
|
|
5
|
+
REQUEST = "10",
|
|
6
|
+
SUCCESS = "20",
|
|
7
|
+
FAIL = "30"
|
|
8
|
+
}
|
|
9
|
+
export declare class ChecklistTemplateItem {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
inspctionCriteria?: string;
|
|
13
|
+
criteriaRequestStatus?: CriteriaRequestStatus;
|
|
14
|
+
inspctionCriteriaText?: string;
|
|
15
|
+
sequence?: number;
|
|
16
|
+
mainType: ChecklistTypeMainType;
|
|
17
|
+
detailType: string;
|
|
18
|
+
checklistTemplate?: ChecklistTemplate;
|
|
19
|
+
checklistTemplateId?: string;
|
|
20
|
+
createdAt?: Date;
|
|
21
|
+
updatedAt?: Date;
|
|
22
|
+
creator?: User;
|
|
23
|
+
creatorId?: string;
|
|
24
|
+
updater?: User;
|
|
25
|
+
updaterId?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistTemplateItem = exports.CriteriaRequestStatus = 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_template_1 = require("../checklist-template/checklist-template");
|
|
9
|
+
const checklist_type_1 = require("../checklist-type/checklist-type");
|
|
10
|
+
var CriteriaRequestStatus;
|
|
11
|
+
(function (CriteriaRequestStatus) {
|
|
12
|
+
CriteriaRequestStatus["REQUEST"] = "10";
|
|
13
|
+
CriteriaRequestStatus["SUCCESS"] = "20";
|
|
14
|
+
CriteriaRequestStatus["FAIL"] = "30";
|
|
15
|
+
})(CriteriaRequestStatus || (exports.CriteriaRequestStatus = CriteriaRequestStatus = {}));
|
|
16
|
+
(0, type_graphql_1.registerEnumType)(CriteriaRequestStatus, {
|
|
17
|
+
name: 'CriteriaRequestStatus',
|
|
18
|
+
description: '검사 기준 API 요청 상태'
|
|
19
|
+
});
|
|
20
|
+
let ChecklistTemplateItem = class ChecklistTemplateItem {
|
|
21
|
+
};
|
|
22
|
+
exports.ChecklistTemplateItem = ChecklistTemplateItem;
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
25
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
27
|
+
], ChecklistTemplateItem.prototype, "id", void 0);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ nullable: false, comment: '검사 항목' }),
|
|
30
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
32
|
+
], ChecklistTemplateItem.prototype, "name", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검사 기준 (AI)' }),
|
|
35
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
36
|
+
tslib_1.__metadata("design:type", String)
|
|
37
|
+
], ChecklistTemplateItem.prototype, "inspctionCriteria", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검사 기준 API 요청 상태 (10: API 요청, 20: 성공, 30: 실패)' }),
|
|
40
|
+
(0, type_graphql_1.Field)(type => CriteriaRequestStatus, { nullable: true }),
|
|
41
|
+
tslib_1.__metadata("design:type", String)
|
|
42
|
+
], ChecklistTemplateItem.prototype, "criteriaRequestStatus", void 0);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '검사 기준 (텍스트) - DSSP는 텍스트로 사용' }),
|
|
45
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
47
|
+
], ChecklistTemplateItem.prototype, "inspctionCriteriaText", void 0);
|
|
48
|
+
tslib_1.__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ nullable: true, comment: '시퀀스' }),
|
|
50
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
51
|
+
tslib_1.__metadata("design:type", Number)
|
|
52
|
+
], ChecklistTemplateItem.prototype, "sequence", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' }),
|
|
55
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
56
|
+
tslib_1.__metadata("design:type", String)
|
|
57
|
+
], ChecklistTemplateItem.prototype, "mainType", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ nullable: false, comment: '상세 구분 ID (F.K)' }),
|
|
60
|
+
(0, type_graphql_1.Field)({ nullable: false }),
|
|
61
|
+
tslib_1.__metadata("design:type", String)
|
|
62
|
+
], ChecklistTemplateItem.prototype, "detailType", void 0);
|
|
63
|
+
tslib_1.__decorate([
|
|
64
|
+
(0, typeorm_1.ManyToOne)(type => checklist_template_1.ChecklistTemplate),
|
|
65
|
+
(0, type_graphql_1.Field)(type => checklist_template_1.ChecklistTemplate, { nullable: true }),
|
|
66
|
+
tslib_1.__metadata("design:type", checklist_template_1.ChecklistTemplate)
|
|
67
|
+
], ChecklistTemplateItem.prototype, "checklistTemplate", void 0);
|
|
68
|
+
tslib_1.__decorate([
|
|
69
|
+
(0, typeorm_1.RelationId)((checklistTemplateItem) => checklistTemplateItem.checklistTemplate),
|
|
70
|
+
tslib_1.__metadata("design:type", String)
|
|
71
|
+
], ChecklistTemplateItem.prototype, "checklistTemplateId", void 0);
|
|
72
|
+
tslib_1.__decorate([
|
|
73
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
74
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
75
|
+
tslib_1.__metadata("design:type", Date)
|
|
76
|
+
], ChecklistTemplateItem.prototype, "createdAt", void 0);
|
|
77
|
+
tslib_1.__decorate([
|
|
78
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
79
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
80
|
+
tslib_1.__metadata("design:type", Date)
|
|
81
|
+
], ChecklistTemplateItem.prototype, "updatedAt", void 0);
|
|
82
|
+
tslib_1.__decorate([
|
|
83
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
84
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
85
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
86
|
+
], ChecklistTemplateItem.prototype, "creator", void 0);
|
|
87
|
+
tslib_1.__decorate([
|
|
88
|
+
(0, typeorm_1.RelationId)((checklistTemplateItem) => checklistTemplateItem.creator),
|
|
89
|
+
tslib_1.__metadata("design:type", String)
|
|
90
|
+
], ChecklistTemplateItem.prototype, "creatorId", void 0);
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
93
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
94
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
95
|
+
], ChecklistTemplateItem.prototype, "updater", void 0);
|
|
96
|
+
tslib_1.__decorate([
|
|
97
|
+
(0, typeorm_1.RelationId)((checklistTemplateItem) => checklistTemplateItem.updater),
|
|
98
|
+
tslib_1.__metadata("design:type", String)
|
|
99
|
+
], ChecklistTemplateItem.prototype, "updaterId", void 0);
|
|
100
|
+
exports.ChecklistTemplateItem = ChecklistTemplateItem = tslib_1.__decorate([
|
|
101
|
+
(0, typeorm_1.Entity)({ comment: '체크리스트 템플릿 아이템' }),
|
|
102
|
+
(0, typeorm_1.Index)('ix_checklist_template_item_0', (cti) => [cti.checklistTemplate, cti.mainType, cti.detailType, cti.name], { unique: true }),
|
|
103
|
+
(0, typeorm_1.Index)('ix_checklist_template_item_1', (cti) => [cti.detailType]),
|
|
104
|
+
(0, type_graphql_1.ObjectType)()
|
|
105
|
+
], ChecklistTemplateItem);
|
|
106
|
+
//# sourceMappingURL=checklist-template-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-template-item.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/checklist-template-item.ts"],"names":[],"mappings":";;;;AAAA,qCAAkI;AAClI,+CAA2E;AAE3E,yDAAgD;AAChD,iFAA4E;AAC5E,qEAAwE;AAExE,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,uCAAc,CAAA;IACd,uCAAc,CAAA;IACd,oCAAW,CAAA;AACb,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,IAAA,+BAAgB,EAAC,qBAAqB,EAAE;IACtC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,iBAAiB;CAC/B,CAAC,CAAA;AAUK,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CA8DjC,CAAA;AA9DY,sDAAqB;AAGvB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;iDACC;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC7C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;mDACf;AAIZ;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IACjD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACA;AAI1B;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,8CAA8C,EAAE,CAAC;IACnF,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oEACZ;AAI7C;IAFC,IAAA,gBAAM,EAAC,EAAE,QAA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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;sDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,qBAA4C,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC;;wDAC1E;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;sDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,qBAA4C,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC;;wDAC1E;gCA7DP,qBAAqB;IARjC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;IACpC,IAAA,eAAK,EACJ,8BAA8B,EAC9B,CAAC,GAA0B,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,EAC/F,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EAAC,8BAA8B,EAAE,CAAC,GAA0B,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACvF,IAAA,yBAAU,GAAE;GACA,qBAAqB,CA8DjC","sourcesContent":["import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'\nimport { ObjectType, Field, ID, Int, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistTemplate } from '../checklist-template/checklist-template'\nimport { ChecklistTypeMainType } from '../checklist-type/checklist-type'\n\nexport enum CriteriaRequestStatus {\n REQUEST = '10',\n SUCCESS = '20',\n FAIL = '30'\n}\n\nregisterEnumType(CriteriaRequestStatus, {\n name: 'CriteriaRequestStatus',\n description: '검사 기준 API 요청 상태'\n})\n\n@Entity({ comment: '체크리스트 템플릿 아이템' })\n@Index(\n 'ix_checklist_template_item_0',\n (cti: ChecklistTemplateItem) => [cti.checklistTemplate, cti.mainType, cti.detailType, cti.name],\n { unique: true }\n)\n@Index('ix_checklist_template_item_1', (cti: ChecklistTemplateItem) => [cti.detailType])\n@ObjectType()\nexport class ChecklistTemplateItem {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: false, comment: '검사 항목' })\n @Field({ nullable: false })\n name: string\n\n @Column({ nullable: true, comment: '검사 기준 (AI)' })\n @Field({ nullable: true })\n inspctionCriteria?: string\n\n @Column({ nullable: true, comment: '검사 기준 API 요청 상태 (10: API 요청, 20: 성공, 30: 실패)' })\n @Field(type => CriteriaRequestStatus, { nullable: true })\n criteriaRequestStatus?: CriteriaRequestStatus\n\n @Column({ nullable: true, comment: '검사 기준 (텍스트) - DSSP는 텍스트로 사용' })\n @Field({ nullable: true })\n inspctionCriteriaText?: string\n\n @Column({ nullable: true, comment: '시퀀스' })\n @Field(type => Int, { nullable: true })\n sequence?: number\n\n @Column({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' })\n @Field({ nullable: false })\n mainType: ChecklistTypeMainType\n\n @Column({ nullable: false, comment: '상세 구분 ID (F.K)' })\n @Field({ nullable: false })\n detailType: string\n\n // 체크리스트 템플릿 정보 (상위 테이블 참조)\n @ManyToOne(type => ChecklistTemplate)\n @Field(type => ChecklistTemplate, { nullable: true })\n checklistTemplate?: ChecklistTemplate\n\n @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.checklistTemplate)\n checklistTemplateId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ChecklistTemplateItem } from './checklist-template-item';
|
|
2
|
+
import { ChecklistTemplateItemQuery } from './checklist-template-item-query';
|
|
3
|
+
import { ChecklistTemplateItemMutation } from './checklist-template-item-mutation';
|
|
4
|
+
export declare const entities: (typeof ChecklistTemplateItem)[];
|
|
5
|
+
export declare const resolvers: (typeof ChecklistTemplateItemQuery | typeof ChecklistTemplateItemMutation)[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const checklist_template_item_1 = require("./checklist-template-item");
|
|
5
|
+
const checklist_template_item_query_1 = require("./checklist-template-item-query");
|
|
6
|
+
const checklist_template_item_mutation_1 = require("./checklist-template-item-mutation");
|
|
7
|
+
exports.entities = [checklist_template_item_1.ChecklistTemplateItem];
|
|
8
|
+
exports.resolvers = [checklist_template_item_query_1.ChecklistTemplateItemQuery, checklist_template_item_mutation_1.ChecklistTemplateItemMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/index.ts"],"names":[],"mappings":";;;AAAA,uEAAiE;AACjE,mFAA4E;AAC5E,yFAAkF;AAErE,QAAA,QAAQ,GAAG,CAAC,+CAAqB,CAAC,CAAA;AAClC,QAAA,SAAS,GAAG,CAAC,0DAA0B,EAAE,gEAA6B,CAAC,CAAA","sourcesContent":["import { ChecklistTemplateItem } from './checklist-template-item'\nimport { ChecklistTemplateItemQuery } from './checklist-template-item-query'\nimport { ChecklistTemplateItemMutation } from './checklist-template-item-mutation'\n\nexport const entities = [ChecklistTemplateItem]\nexport const resolvers = [ChecklistTemplateItemQuery, ChecklistTemplateItemMutation]\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateInspctionCriteriaForChecklistTemplateItems = updateInspctionCriteriaForChecklistTemplateItems;
|
|
4
|
+
exports.queueUpdateInspctionCriteria = queueUpdateInspctionCriteria;
|
|
5
|
+
const shell_1 = require("@things-factory/shell");
|
|
6
|
+
const checklist_template_item_1 = require("./checklist-template-item");
|
|
7
|
+
const SPEC_MATCHING_API_BASE_URL = 'https://hatiolab-korea-uni.ettisoft.com';
|
|
8
|
+
const API_USERNAME = 'admin';
|
|
9
|
+
const API_PASSWORD = 'admin1234';
|
|
10
|
+
async function updateInspctionCriteriaForChecklistTemplateItems(ids) {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
const repository = (0, shell_1.getRepository)(checklist_template_item_1.ChecklistTemplateItem);
|
|
13
|
+
const url = `${SPEC_MATCHING_API_BASE_URL}/api/run/spec-matching`;
|
|
14
|
+
const headers = {};
|
|
15
|
+
headers['Authorization'] = `Basic ${Buffer.from(`${API_USERNAME}:${API_PASSWORD}`).toString('base64')}`;
|
|
16
|
+
for (const id of ids) {
|
|
17
|
+
try {
|
|
18
|
+
const item = await repository.findOneBy({ id });
|
|
19
|
+
const form = new FormData();
|
|
20
|
+
form.append('input', JSON.stringify({ item: item.name }));
|
|
21
|
+
const response = await fetch(url, {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
headers,
|
|
24
|
+
body: form
|
|
25
|
+
});
|
|
26
|
+
const data = ((_a = (await (response === null || response === void 0 ? void 0 : response.json()))) === null || _a === void 0 ? void 0 : _a.result) || {};
|
|
27
|
+
console.log('검사기준 :', item.name);
|
|
28
|
+
console.log('data :', data);
|
|
29
|
+
if ((data === null || data === void 0 ? void 0 : data.status) === 'success') {
|
|
30
|
+
const criteria = ((_b = data.result) === null || _b === void 0 ? void 0 : _b['검사기준']) || '';
|
|
31
|
+
await repository.update({ id }, { inspctionCriteria: criteria, criteriaRequestStatus: checklist_template_item_1.CriteriaRequestStatus.SUCCESS });
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
await repository.update({ id }, { criteriaRequestStatus: checklist_template_item_1.CriteriaRequestStatus.FAIL });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
await repository.update({ id }, { criteriaRequestStatus: checklist_template_item_1.CriteriaRequestStatus.FAIL });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function queueUpdateInspctionCriteria(ids) {
|
|
43
|
+
if (!ids || ids.length === 0)
|
|
44
|
+
return;
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
updateInspctionCriteriaForChecklistTemplateItems(ids).catch(err => {
|
|
47
|
+
console.error('Background spec-matching update failed:', err);
|
|
48
|
+
});
|
|
49
|
+
}, 0);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=spec-matching-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-matching-service.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/spec-matching-service.ts"],"names":[],"mappings":";;AAOA,4GAiCC;AAED,oEAQC;AAlDD,iDAAqD;AACrD,uEAAwF;AAExF,MAAM,0BAA0B,GAAW,yCAAyC,CAAA;AACpF,MAAM,YAAY,GAAW,OAAO,CAAA;AACpC,MAAM,YAAY,GAAW,WAAW,CAAA;AAEjC,KAAK,UAAU,gDAAgD,CA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,EAAE,CAAA;gBAC5C,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,+CAAqB,CAAC,OAAO,EAAE,CAAC,CAAA;YACxH,CAAC;iBAAM,CAAC;gBACN,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,qBAAqB,EAAE,+CAAqB,CAAC,IAAI,EAAE,CAAC,CAAA;YACxF,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,qBAAqB,EAAE,+CAAqB,CAAC,IAAI,EAAE,CAAC,CAAA;QACxF,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,4BAA4B,CAAC,GAAa;IACxD,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAM;IAEpC,UAAU,CAAC,GAAG,EAAE;QACd,gDAAgD,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YAChE,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,GAAG,CAAC,CAAA;QAC/D,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,CAAC,CAAA;AACP,CAAC","sourcesContent":["import { getRepository } from '@things-factory/shell'\nimport { ChecklistTemplateItem, CriteriaRequestStatus } from './checklist-template-item'\n\nconst SPEC_MATCHING_API_BASE_URL: string = 'https://hatiolab-korea-uni.ettisoft.com'\nconst API_USERNAME: string = 'admin'\nconst API_PASSWORD: string = 'admin1234'\n\nexport async function updateInspctionCriteriaForChecklistTemplateItems(ids: string[]): Promise<void> {\n const repository = getRepository(ChecklistTemplateItem)\n\n const url = `${SPEC_MATCHING_API_BASE_URL}/api/run/spec-matching`\n const headers: any = {}\n headers['Authorization'] = `Basic ${Buffer.from(`${API_USERNAME}:${API_PASSWORD}`).toString('base64')}`\n\n for (const id of ids) {\n try {\n const item = await repository.findOneBy({ id })\n const form = new FormData()\n form.append('input', JSON.stringify({ item: item.name }))\n const response = await fetch(url, {\n method: 'POST',\n headers,\n body: form\n })\n\n const data = (await response?.json())?.result || {}\n\n console.log('검사기준 :', item.name)\n console.log('data :', data)\n\n if (data?.status === 'success') {\n const criteria = data.result?.['검사기준'] || ''\n await repository.update({ id }, { inspctionCriteria: criteria, criteriaRequestStatus: CriteriaRequestStatus.SUCCESS })\n } else {\n await repository.update({ id }, { criteriaRequestStatus: CriteriaRequestStatus.FAIL })\n }\n } catch (error) {\n await repository.update({ id }, { criteriaRequestStatus: CriteriaRequestStatus.FAIL })\n }\n }\n}\n\nexport function queueUpdateInspctionCriteria(ids: string[]): void {\n if (!ids || ids.length === 0) return\n\n setTimeout(() => {\n updateInspctionCriteriaForChecklistTemplateItems(ids).catch(err => {\n console.error('Background spec-matching update failed:', err)\n })\n }, 0)\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChecklistType } from './checklist-type';
|
|
2
|
+
import { ChecklistTypePatch } from './checklist-type-type';
|
|
3
|
+
export declare class ChecklistTypeMutation {
|
|
4
|
+
updateMultipleChecklistType(patches: ChecklistTypePatch[], context: ResolverContext): Promise<ChecklistType[]>;
|
|
5
|
+
deleteChecklistTypes(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChecklistTypeMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const checklist_type_1 = require("./checklist-type");
|
|
8
|
+
const checklist_type_type_1 = require("./checklist-type-type");
|
|
9
|
+
let ChecklistTypeMutation = class ChecklistTypeMutation {
|
|
10
|
+
async updateMultipleChecklistType(patches, context) {
|
|
11
|
+
const { domain, user, tx } = context.state;
|
|
12
|
+
let results = [];
|
|
13
|
+
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
14
|
+
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
15
|
+
const checklistTypeRepo = tx.getRepository(checklist_type_1.ChecklistType);
|
|
16
|
+
if (_createRecords.length > 0) {
|
|
17
|
+
for (let i = 0; i < _createRecords.length; i++) {
|
|
18
|
+
const newRecord = _createRecords[i];
|
|
19
|
+
const result = await checklistTypeRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
20
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (_updateRecords.length > 0) {
|
|
24
|
+
for (let i = 0; i < _updateRecords.length; i++) {
|
|
25
|
+
const updateRecord = _updateRecords[i];
|
|
26
|
+
const checklistType = await checklistTypeRepo.findOneBy({ id: updateRecord.id });
|
|
27
|
+
const result = await checklistTypeRepo.save(Object.assign(Object.assign(Object.assign({}, checklistType), updateRecord), { updater: user }));
|
|
28
|
+
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return results;
|
|
32
|
+
}
|
|
33
|
+
async deleteChecklistTypes(ids, context) {
|
|
34
|
+
const { domain, tx } = context.state;
|
|
35
|
+
await tx.getRepository(checklist_type_1.ChecklistType).delete({
|
|
36
|
+
domain: { id: domain.id },
|
|
37
|
+
id: (0, typeorm_1.In)(ids)
|
|
38
|
+
});
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.ChecklistTypeMutation = ChecklistTypeMutation;
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
45
|
+
(0, type_graphql_1.Mutation)(returns => [checklist_type_1.ChecklistType], { description: "To modify multiple ChecklistTypes' information" }),
|
|
46
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [checklist_type_type_1.ChecklistTypePatch])),
|
|
47
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
48
|
+
tslib_1.__metadata("design:type", Function),
|
|
49
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
50
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
51
|
+
], ChecklistTypeMutation.prototype, "updateMultipleChecklistType", null);
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
54
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple ChecklistTypes' }),
|
|
55
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
56
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
57
|
+
tslib_1.__metadata("design:type", Function),
|
|
58
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
59
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
60
|
+
], ChecklistTypeMutation.prototype, "deleteChecklistTypes", null);
|
|
61
|
+
exports.ChecklistTypeMutation = ChecklistTypeMutation = tslib_1.__decorate([
|
|
62
|
+
(0, type_graphql_1.Resolver)(checklist_type_1.ChecklistType)
|
|
63
|
+
], ChecklistTypeMutation);
|
|
64
|
+
//# sourceMappingURL=checklist-type-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist-type-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-type/checklist-type-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,qDAAgD;AAChD,+DAA0D;AAGnD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAG1B,AAAN,KAAK,CAAC,2BAA2B,CACe,OAA6B,EACpE,OAAwB;QA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AA;;;;iEAS7E;gCA1DU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,qBAAqB,CA2DjC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { ChecklistType } from './checklist-type'\nimport { ChecklistTypePatch } from './checklist-type-type'\n\n@Resolver(ChecklistType)\nexport class ChecklistTypeMutation {\n @Directive('@transaction')\n @Mutation(returns => [ChecklistType], { description: \"To modify multiple ChecklistTypes' information\" })\n async updateMultipleChecklistType(\n @Arg('patches', type => [ChecklistTypePatch]) patches: ChecklistTypePatch[],\n @Ctx() context: ResolverContext\n ): Promise<ChecklistType[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const checklistTypeRepo = tx.getRepository(ChecklistType)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await checklistTypeRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const checklistType = await checklistTypeRepo.findOneBy({ id: updateRecord.id })\n\n const result = await checklistTypeRepo.save({\n ...checklistType,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple ChecklistTypes' })\n async deleteChecklistTypes(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(ChecklistType).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|