@dssp/supervision 1.0.0-alpha.7 → 1.0.0-alpha.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/graphql/building-inspection.d.ts +1 -0
- package/dist-client/graphql/building-inspection.js +101 -0
- package/dist-client/graphql/building-inspection.js.map +1 -0
- package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -2
- package/dist-client/pages/action-plan/action-plan-list-page.js +1 -2
- package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
- 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 +59 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +868 -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-camera.d.ts +8 -6
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +116 -65
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +11 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +147 -72
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +78 -14
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +26 -2
- package/dist-client/pages/building-inspection/building-inspection-list.js +375 -34
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-management.d.ts +72 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js +1256 -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 +3 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +112 -20
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +27 -0
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +542 -0
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.js +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 +2 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +42 -18
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-create-popup.js +17 -5
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +3 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +791 -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 +16 -2
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +249 -45
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +9 -3
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
- 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/checklist/attachment-list-popup.d.ts +1 -0
- package/dist-client/pages/checklist/attachment-list-popup.js +251 -69
- package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.d.ts +5 -0
- package/dist-client/pages/checklist/checklist-view.js +191 -30
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist/comment-list-popup.js +15 -5
- package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/file-preview-popup.js +0 -1
- package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
- package/dist-client/pages/checklist/inspection-info-popup.d.ts +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-database/checklist-database.d.ts +35 -0
- package/dist-client/pages/checklist-database/checklist-database.js +539 -0
- package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js +39 -3
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +242 -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 +409 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
- package/dist-client/pages/issue/issue-list-page.d.ts +1 -2
- package/dist-client/pages/issue/issue-list-page.js +1 -2
- package/dist-client/pages/issue/issue-list-page.js.map +1 -1
- package/dist-client/pages/project-checklist/project-checklist-management.d.ts +50 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js +910 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
- package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -2
- package/dist-client/pages/project-report/project-report-list-page.js +1 -2
- package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
- package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -2
- package/dist-client/pages/supervisor/supervisor-list-page.js +1 -2
- package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +18 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/stt/speech-to-text.d.ts +13 -8
- package/dist-client/stt/speech-to-text.js +282 -40
- package/dist-client/stt/speech-to-text.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/action-plan/action-plan-mutation.js +5 -6
- package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-query.d.ts +2 -2
- package/dist-server/service/action-plan/action-plan-query.js +5 -11
- package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +2 -3
- package/dist-server/service/building-inspection/building-inspection-mutation.js +77 -39
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +5 -7
- package/dist-server/service/building-inspection/building-inspection-query.js +54 -52
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +26 -7
- package/dist-server/service/building-inspection/building-inspection-type.js +92 -13
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +5 -0
- package/dist-server/service/building-inspection/building-inspection.js +37 -4
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/building-inspection/index.d.ts +3 -4
- package/dist-server/service/building-inspection/index.js +10 -3
- package/dist-server/service/building-inspection/index.js.map +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +56 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +16 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +171 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +23 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +90 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +33 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +132 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
- package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
- package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +16 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.js +120 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +5 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.js +21 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +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 +0 -5
- package/dist-server/service/checklist/checklist-mutation.js +1 -67
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
- package/dist-server/service/checklist/checklist-query.d.ts +7 -0
- package/dist-server/service/checklist/checklist-query.js +83 -0
- package/dist-server/service/checklist/checklist-query.js.map +1 -1
- package/dist-server/service/checklist/checklist-type.d.ts +0 -13
- package/dist-server/service/checklist/checklist-type.js +1 -49
- package/dist-server/service/checklist/checklist-type.js.map +1 -1
- package/dist-server/service/checklist/checklist.d.ts +28 -3
- package/dist-server/service/checklist/checklist.js +89 -15
- package/dist-server/service/checklist/checklist.js.map +1 -1
- 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 +1 -2
- package/dist-server/service/checklist/index.js +1 -2
- package/dist-server/service/checklist/index.js.map +1 -1
- package/dist-server/service/checklist-history/checklist-history-query.d.ts +11 -0
- package/dist-server/service/checklist-history/checklist-history-query.js +77 -0
- package/dist-server/service/checklist-history/checklist-history-query.js.map +1 -0
- package/dist-server/service/checklist-history/checklist-history-type.d.ts +5 -0
- package/dist-server/service/checklist-history/checklist-history-type.js +21 -0
- package/dist-server/service/checklist-history/checklist-history-type.js.map +1 -0
- package/dist-server/service/{checklist → checklist-history}/checklist-history.d.ts +19 -1
- package/dist-server/service/{checklist → checklist-history}/checklist-history.js +97 -14
- package/dist-server/service/checklist-history/checklist-history.js.map +1 -0
- package/dist-server/service/checklist-history/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist-history/event-subscriber.js +21 -0
- package/dist-server/service/checklist-history/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist-history/index.d.ts +6 -0
- package/dist-server/service/checklist-history/index.js +10 -0
- package/dist-server/service/checklist-history/index.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-query.d.ts +1 -1
- package/dist-server/service/checklist-item/checklist-item-query.js +5 -3
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
- package/dist-server/service/checklist-item/index.d.ts +0 -1
- package/dist-server/service/checklist-item/index.js +1 -2
- package/dist-server/service/checklist-item/index.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +33 -6
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
- package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +16 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-query.js +123 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +1 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +5 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.js +21 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +1 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +25 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.js +123 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -0
- package/dist-server/service/checklist-item-history/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist-item-history/event-subscriber.js +21 -0
- package/dist-server/service/checklist-item-history/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist-item-history/index.d.ts +6 -0
- package/dist-server/service/checklist-item-history/index.js +10 -0
- package/dist-server/service/checklist-item-history/index.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-query.d.ts +1 -1
- package/dist-server/service/checklist-template/checklist-template-query.js +2 -5
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +13 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +3 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +9 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +7 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js +22 -2
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
- 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-query.d.ts +1 -1
- package/dist-server/service/checklist-type/checklist-type-query.js +2 -5
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
- 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 +60 -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/construction-checklist-template-item/spec-matching-service.d.ts +2 -0
- package/dist-server/service/construction-checklist-template-item/spec-matching-service.js +50 -0
- package/dist-server/service/construction-checklist-template-item/spec-matching-service.js.map +1 -0
- package/dist-server/service/index.d.ts +8 -1
- package/dist-server/service/index.js +38 -3
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/issue-mutation.js +5 -6
- package/dist-server/service/issue/issue-mutation.js.map +1 -1
- package/dist-server/service/issue/issue-query.d.ts +2 -2
- package/dist-server/service/issue/issue-query.js +5 -11
- package/dist-server/service/issue/issue-query.js.map +1 -1
- 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 +109 -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-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 +17 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js +82 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
- package/dist-server/service/project-report/project-report-mutation.js +5 -6
- package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
- package/dist-server/service/project-report/project-report-query.d.ts +2 -2
- package/dist-server/service/project-report/project-report-query.js +5 -11
- package/dist-server/service/project-report/project-report-query.js.map +1 -1
- package/dist-server/service/project-report/project-report.d.ts +0 -2
- package/dist-server/service/project-report/project-report.js +0 -6
- package/dist-server/service/project-report/project-report.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-mutation.js +5 -6
- package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-query.d.ts +2 -2
- package/dist-server/service/supervisor/supervisor-query.js +5 -11
- package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -13
- package/things-factory.config.js +9 -1
- package/dist-server/service/building-inspection/building-inspection-history.d.ts +0 -17
- package/dist-server/service/building-inspection/building-inspection-history.js +0 -86
- package/dist-server/service/building-inspection/building-inspection-history.js.map +0 -1
- package/dist-server/service/checklist/checklist-history.js.map +0 -1
|
@@ -8,8 +8,15 @@ export * from './checklist-item/checklist-item';
|
|
|
8
8
|
export * from './checklist-item-comment/checklist-item-comment';
|
|
9
9
|
export * from './checklist-template/checklist-template';
|
|
10
10
|
export * from './checklist-template-item/checklist-template-item';
|
|
11
|
+
export * from './construction-checklist-template/construction-checklist-template';
|
|
12
|
+
export * from './construction-checklist-template-item/construction-checklist-template-item';
|
|
13
|
+
export * from './project-checklist/project-checklist';
|
|
14
|
+
export * from './project-checklist-item/project-checklist-item';
|
|
11
15
|
export * from './building-inspection/building-inspection';
|
|
12
|
-
export
|
|
16
|
+
export * from './building-inspection/building-inspection-type';
|
|
17
|
+
export * from './building-inspection-daily-worklog/building-inspection-daily-worklog';
|
|
18
|
+
export declare const entities: (typeof import("./issue/issue").Issue | typeof import("./action-plan/action-plan").ActionPlan | typeof import("./supervisor/supervisor").Supervisor | typeof import("./project-report/project-report").ProjectReport | typeof import("./checklist-type/checklist-type").ChecklistType | typeof import("./checklist-item-comment/checklist-item-comment").ChecklistItemComment | typeof import("./checklist-item/checklist-item").ChecklistItem | typeof import("./checklist/checklist").Checklist | typeof import("./building-inspection/building-inspection").BuildingInspection | typeof import("./building-inspection-daily-worklog/building-inspection-daily-worklog").BuildingInspectionDailyWorklog | typeof import("./checklist-template-item/checklist-template-item").ChecklistTemplateItem | typeof import("./checklist-template/checklist-template").ChecklistTemplate | typeof import("./construction-checklist-template-item/construction-checklist-template-item").ConstructionChecklistTemplateItem | typeof import("./construction-checklist-template/construction-checklist-template").ConstructionChecklistTemplate | typeof import("./project-checklist-item/project-checklist-item").ProjectChecklistItem | typeof import("./project-checklist/project-checklist").ProjectChecklist | typeof import("./building-inspection-history/building-inspection-history").BuildingInspectionHistory | typeof import("./checklist-history/checklist-history").ChecklistHistory | typeof import("./checklist-item-history/checklist-item-history").ChecklistItemHistory)[];
|
|
13
19
|
export declare const schema: {
|
|
14
20
|
resolverClasses: typeof import("./checklist-item/checklist-item-mutation").ChecklistItemMutation[];
|
|
15
21
|
};
|
|
22
|
+
export declare const subscribers: (typeof import("./checklist-history/event-subscriber").ChecklistHistoryEntitySubscriber | typeof import("./checklist-item-history/event-subscriber").ChecklistItemHistoryEntitySubscriber | typeof import("./building-inspection-history/event-subscriber").BuildingInspectionHistoryEntitySubscriber)[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.schema = exports.entities = void 0;
|
|
3
|
+
exports.subscribers = exports.schema = exports.entities = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* EXPORT ENTITY TYPES */
|
|
6
6
|
tslib_1.__exportStar(require("./action-plan/action-plan"), exports);
|
|
@@ -13,19 +13,33 @@ tslib_1.__exportStar(require("./checklist-item/checklist-item"), exports);
|
|
|
13
13
|
tslib_1.__exportStar(require("./checklist-item-comment/checklist-item-comment"), exports);
|
|
14
14
|
tslib_1.__exportStar(require("./checklist-template/checklist-template"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./checklist-template-item/checklist-template-item"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./construction-checklist-template/construction-checklist-template"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./construction-checklist-template-item/construction-checklist-template-item"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./project-checklist/project-checklist"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./project-checklist-item/project-checklist-item"), exports);
|
|
16
20
|
tslib_1.__exportStar(require("./building-inspection/building-inspection"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./building-inspection/building-inspection-type"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./building-inspection-daily-worklog/building-inspection-daily-worklog"), exports);
|
|
17
23
|
/* IMPORT ENTITIES AND RESOLVERS */
|
|
18
24
|
const action_plan_1 = require("./action-plan");
|
|
19
25
|
const issue_1 = require("./issue");
|
|
20
26
|
const project_report_1 = require("./project-report");
|
|
21
27
|
const supervisor_1 = require("./supervisor");
|
|
22
28
|
const checklist_1 = require("./checklist");
|
|
29
|
+
const checklist_history_1 = require("./checklist-history");
|
|
23
30
|
const checklist_item_1 = require("./checklist-item");
|
|
31
|
+
const checklist_item_history_1 = require("./checklist-item-history");
|
|
24
32
|
const checklist_item_comment_1 = require("./checklist-item-comment");
|
|
25
33
|
const checklist_type_1 = require("./checklist-type");
|
|
26
34
|
const checklist_template_1 = require("./checklist-template");
|
|
27
35
|
const checklist_template_item_1 = require("./checklist-template-item");
|
|
36
|
+
const construction_checklist_template_1 = require("./construction-checklist-template");
|
|
37
|
+
const construction_checklist_template_item_1 = require("./construction-checklist-template-item");
|
|
38
|
+
const project_checklist_1 = require("./project-checklist");
|
|
39
|
+
const project_checklist_item_1 = require("./project-checklist-item");
|
|
28
40
|
const building_inspection_1 = require("./building-inspection");
|
|
41
|
+
const building_inspection_history_1 = require("./building-inspection-history");
|
|
42
|
+
const building_inspection_daily_worklog_1 = require("./building-inspection-daily-worklog");
|
|
29
43
|
exports.entities = [
|
|
30
44
|
/* ENTITIES */
|
|
31
45
|
...action_plan_1.entities,
|
|
@@ -33,12 +47,20 @@ exports.entities = [
|
|
|
33
47
|
...project_report_1.entities,
|
|
34
48
|
...supervisor_1.entities,
|
|
35
49
|
...checklist_1.entities,
|
|
50
|
+
...checklist_history_1.entities,
|
|
36
51
|
...checklist_item_1.entities,
|
|
52
|
+
...checklist_item_history_1.entities,
|
|
37
53
|
...checklist_item_comment_1.entities,
|
|
38
54
|
...checklist_type_1.entities,
|
|
39
55
|
...checklist_template_item_1.entities,
|
|
40
56
|
...checklist_template_1.entities,
|
|
41
|
-
...
|
|
57
|
+
...construction_checklist_template_1.entities,
|
|
58
|
+
...construction_checklist_template_item_1.entities,
|
|
59
|
+
...project_checklist_1.entities,
|
|
60
|
+
...project_checklist_item_1.entities,
|
|
61
|
+
...building_inspection_1.entities,
|
|
62
|
+
...building_inspection_history_1.entities,
|
|
63
|
+
...building_inspection_daily_worklog_1.entities
|
|
42
64
|
];
|
|
43
65
|
exports.schema = {
|
|
44
66
|
resolverClasses: [
|
|
@@ -48,12 +70,25 @@ exports.schema = {
|
|
|
48
70
|
...project_report_1.resolvers,
|
|
49
71
|
...supervisor_1.resolvers,
|
|
50
72
|
...checklist_1.resolvers,
|
|
73
|
+
...checklist_history_1.resolvers,
|
|
51
74
|
...checklist_item_1.resolvers,
|
|
75
|
+
...checklist_item_history_1.resolvers,
|
|
52
76
|
...checklist_item_comment_1.resolvers,
|
|
53
77
|
...checklist_type_1.resolvers,
|
|
54
78
|
...checklist_template_item_1.resolvers,
|
|
55
79
|
...checklist_template_1.resolvers,
|
|
56
|
-
...
|
|
80
|
+
...construction_checklist_template_1.resolvers,
|
|
81
|
+
...construction_checklist_template_item_1.resolvers,
|
|
82
|
+
...project_checklist_1.resolvers,
|
|
83
|
+
...project_checklist_item_1.resolvers,
|
|
84
|
+
...building_inspection_1.resolvers,
|
|
85
|
+
...building_inspection_history_1.resolvers,
|
|
86
|
+
...building_inspection_daily_worklog_1.resolvers
|
|
57
87
|
]
|
|
58
88
|
};
|
|
89
|
+
exports.subscribers = [
|
|
90
|
+
...checklist_history_1.subscribers,
|
|
91
|
+
...checklist_item_history_1.subscribers,
|
|
92
|
+
...building_inspection_history_1.subscribers
|
|
93
|
+
];
|
|
59
94
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,oEAAyC;AACzC,wDAA6B;AAC7B,0EAA+C;AAC/C,kEAAuC;AACvC,0EAA+C;AAC/C,gEAAqC;AACrC,0EAA+C;AAC/C,0FAA+D;AAC/D,kFAAuD;AACvD,4FAAiE;AACjE,oFAAyD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,oEAAyC;AACzC,wDAA6B;AAC7B,0EAA+C;AAC/C,kEAAuC;AACvC,0EAA+C;AAC/C,gEAAqC;AACrC,0EAA+C;AAC/C,0FAA+D;AAC/D,kFAAuD;AACvD,4FAAiE;AAC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QAChC,GAAG,+BAA2B;QAC9B,GAAG,uCAAkC;QACrC,GAAG,6CAAuC;KAC3C;CACF,CAAA;AAEY,QAAA,WAAW,GAAG;IACzB,GAAG,+BAA2B;IAC9B,GAAG,oCAA+B;IAClC,GAAG,yCAAoC;CACxC,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './action-plan/action-plan'\nexport * from './issue/issue'\nexport * from './project-report/project-report'\nexport * from './supervisor/supervisor'\nexport * from './checklist-type/checklist-type'\nexport * from './checklist/checklist'\nexport * from './checklist-item/checklist-item'\nexport * from './checklist-item-comment/checklist-item-comment'\nexport * from './checklist-template/checklist-template'\nexport * from './checklist-template-item/checklist-template-item'\nexport * from './construction-checklist-template/construction-checklist-template'\nexport * from './construction-checklist-template-item/construction-checklist-template-item'\nexport * from './project-checklist/project-checklist'\nexport * from './project-checklist-item/project-checklist-item'\nexport * from './building-inspection/building-inspection'\nexport * from './building-inspection/building-inspection-type'\nexport * from './building-inspection-daily-worklog/building-inspection-daily-worklog'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as ActionPlanEntities, resolvers as ActionPlanResolvers } from './action-plan'\nimport { entities as IssueEntities, resolvers as IssueResolvers } from './issue'\nimport { entities as ProjectReportEntities, resolvers as ProjectReportResolvers } from './project-report'\nimport { entities as SupervisorEntities, resolvers as SupervisorResolvers } from './supervisor'\nimport { entities as ChecklistEntities, resolvers as ChecklistResolvers } from './checklist'\nimport {\n entities as ChecklistHistoryEntities,\n resolvers as ChecklistHistoryResolvers,\n subscribers as ChecklistHistorySubscribers\n} from './checklist-history'\nimport { entities as ChecklistItemEntities, resolvers as ChecklistItemResolvers } from './checklist-item'\nimport {\n entities as ChecklistItemHistoryEntities,\n resolvers as ChecklistItemHistoryResolvers,\n subscribers as ChecklistItemHistorySubscribers\n} from './checklist-item-history'\nimport { entities as ChecklistItemCommentEntities, resolvers as ChecklistItemCommentResolvers } from './checklist-item-comment'\nimport { entities as ChecklistTypeEntities, resolvers as ChecklistTypeResolvers } from './checklist-type'\nimport { entities as ChecklistTemplateEntities, resolvers as ChecklistTemplateResolvers } from './checklist-template'\nimport { entities as ChecklistTemplateItemEntities, resolvers as ChecklistTemplateItemResolvers } from './checklist-template-item'\nimport {\n entities as ConstructionChecklistTemplateEntities,\n resolvers as ConstructionChecklistTemplateResolvers\n} from './construction-checklist-template'\nimport {\n entities as ConstructionChecklistTemplateItemEntities,\n resolvers as ConstructionChecklistTemplateItemResolvers\n} from './construction-checklist-template-item'\nimport { entities as ProjectChecklistEntities, resolvers as ProjectChecklistResolvers } from './project-checklist'\nimport {\n entities as ProjectChecklistItemEntities,\n resolvers as ProjectChecklistItemResolvers\n} from './project-checklist-item'\nimport { entities as BuildingInspectionEntities, resolvers as BuildingInspectionResolvers } from './building-inspection'\nimport {\n entities as BuildingInspectionHistoryEntities,\n resolvers as BuildingInspectionHistoryResolvers,\n subscribers as BuildingInspectionHistorySubscribers\n} from './building-inspection-history'\nimport {\n entities as BuildingInspectionDailyWorklogEntities,\n resolvers as BuildingInspectionDailyWorklogResolvers\n} from './building-inspection-daily-worklog'\n\nexport const entities = [\n /* ENTITIES */\n ...ActionPlanEntities,\n ...IssueEntities,\n ...ProjectReportEntities,\n ...SupervisorEntities,\n ...ChecklistEntities,\n ...ChecklistHistoryEntities,\n ...ChecklistItemEntities,\n ...ChecklistItemHistoryEntities,\n ...ChecklistItemCommentEntities,\n ...ChecklistTypeEntities,\n ...ChecklistTemplateItemEntities,\n ...ChecklistTemplateEntities,\n ...ConstructionChecklistTemplateEntities,\n ...ConstructionChecklistTemplateItemEntities,\n ...ProjectChecklistEntities,\n ...ProjectChecklistItemEntities,\n ...BuildingInspectionEntities,\n ...BuildingInspectionHistoryEntities,\n ...BuildingInspectionDailyWorklogEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...ActionPlanResolvers,\n ...IssueResolvers,\n ...ProjectReportResolvers,\n ...SupervisorResolvers,\n ...ChecklistResolvers,\n ...ChecklistHistoryResolvers,\n ...ChecklistItemResolvers,\n ...ChecklistItemHistoryResolvers,\n ...ChecklistItemCommentResolvers,\n ...ChecklistTypeResolvers,\n ...ChecklistTemplateItemResolvers,\n ...ChecklistTemplateResolvers,\n ...ConstructionChecklistTemplateResolvers,\n ...ConstructionChecklistTemplateItemResolvers,\n ...ProjectChecklistResolvers,\n ...ProjectChecklistItemResolvers,\n ...BuildingInspectionResolvers,\n ...BuildingInspectionHistoryResolvers,\n ...BuildingInspectionDailyWorklogResolvers\n ]\n}\n\nexport const subscribers = [\n ...ChecklistHistorySubscribers,\n ...ChecklistItemHistorySubscribers,\n ...BuildingInspectionHistorySubscribers\n]\n"]}
|
|
@@ -23,10 +23,10 @@ let IssueMutation = class IssueMutation {
|
|
|
23
23
|
return result;
|
|
24
24
|
}
|
|
25
25
|
async updateIssue(id, patch, context) {
|
|
26
|
-
const {
|
|
26
|
+
const { user, tx } = context.state;
|
|
27
27
|
const repository = tx.getRepository(issue_1.Issue);
|
|
28
28
|
const issue = await repository.findOne({
|
|
29
|
-
where: {
|
|
29
|
+
where: { id }
|
|
30
30
|
});
|
|
31
31
|
const result = await repository.save(Object.assign(Object.assign(Object.assign({}, issue), patch), { updater: user }));
|
|
32
32
|
if (patch.thumbnail) {
|
|
@@ -84,15 +84,14 @@ let IssueMutation = class IssueMutation {
|
|
|
84
84
|
return results;
|
|
85
85
|
}
|
|
86
86
|
async deleteIssue(id, context) {
|
|
87
|
-
const {
|
|
88
|
-
await tx.getRepository(issue_1.Issue).delete({
|
|
87
|
+
const { tx } = context.state;
|
|
88
|
+
await tx.getRepository(issue_1.Issue).delete({ id });
|
|
89
89
|
await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: [id] }, context);
|
|
90
90
|
return true;
|
|
91
91
|
}
|
|
92
92
|
async deleteIssues(ids, context) {
|
|
93
|
-
const {
|
|
93
|
+
const { tx } = context.state;
|
|
94
94
|
await tx.getRepository(issue_1.Issue).delete({
|
|
95
|
-
domain: { id: domain.id },
|
|
96
95
|
id: (0, typeorm_1.In)(ids)
|
|
97
96
|
});
|
|
98
97
|
await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: ids }, context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue-mutation.js","sourceRoot":"","sources":["../../../server/service/issue/issue-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,mCAA+B;AAC/B,6CAAmD;AAG5C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGlB,AAAN,KAAK,CAAC,WAAW,CAAe,KAAe,EAAS,OAAwB;QAC9E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,aAAK,CAAC,CAAC,IAAI,iCAC5C,KAAK,KACR,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,IAAA,kCAAgB,EACpB,IAAI,EACJ;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,KAAK,CAAC,SAAS;oBACrB,OAAO,EAAE,aAAK,CAAC,IAAI;oBACnB,KAAK,EAAE,MAAM,CAAC,EAAE;iBACjB;aACF,EACD,OAAO,CACR,CAAA;QACH,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAIK,AAAN,KAAK,CAAC,WAAW,CACJ,EAAU,EACP,KAAiB,EACxB,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,aAAK,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACrC,KA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CAAC,uBAAU,CAAC,CAAC,CAAA;IACpC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;wDAqEP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;gDAO9C;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAExE,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAYP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAExE,mBAAA,IAAA,kBAAG,EAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,uBAAU,CAAC,CAAC,CAAA;IACnC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAWP;wBA3LU,aAAa;IADzB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,aAAa,CA4LzB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { createAttachment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { Issue } from './issue'\nimport { NewIssue, IssuePatch } from './issue-type'\n\n@Resolver(Issue)\nexport class IssueMutation {\n @Directive('@transaction')\n @Mutation(returns => Issue, { description: 'To create new Issue' })\n async createIssue(@Arg('issue') issue: NewIssue, @Ctx() context: ResolverContext): Promise<Issue> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(Issue).save({\n ...issue,\n domain,\n creator: user,\n updater: user\n })\n\n if (issue.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: issue.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Issue, { description: 'To modify Issue information' })\n async updateIssue(\n @Arg('id') id: string,\n @Arg('patch') patch: IssuePatch,\n @Ctx() context: ResolverContext\n ): Promise<Issue> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Issue)\n const issue = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...issue,\n ...patch,\n updater: user\n })\n\n if (patch.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: patch.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Issue], { description: \"To modify multiple Issues' information\" })\n async updateMultipleIssue(\n @Arg('patches', type => [IssuePatch]) patches: IssuePatch[],\n @Ctx() context: ResolverContext\n ): Promise<Issue[]> {\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 issueRepo = tx.getRepository(Issue)\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 issueRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\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 issue = await issueRepo.findOneBy({ id: updateRecord.id })\n\n const result = await issueRepo.save({\n ...issue,\n ...updateRecord,\n updater: user\n })\n\n if (updateRecord.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: updateRecord.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\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 Issue' })\n async deleteIssue(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Issue).delete({ domain: { id: domain.id }, id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Issues' })\n async deleteIssues(\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(Issue).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Issues' })\n async importIssues(\n @Arg('issues', type => [IssuePatch]) issues: IssuePatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n issues.map(async (issue: IssuePatch) => {\n const createdIssue: Issue = await tx.getRepository(Issue).save({ domain, ...issue })\n })\n )\n\n return true\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"issue-mutation.js","sourceRoot":"","sources":["../../../server/service/issue/issue-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B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A,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAWP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAExE,mBAAA,IAAA,kBAAG,EAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,uBAAU,CAAC,CAAC,CAAA;IACnC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAWP;wBA1LU,aAAa;IADzB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,aAAa,CA2LzB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { createAttachment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { Issue } from './issue'\nimport { NewIssue, IssuePatch } from './issue-type'\n\n@Resolver(Issue)\nexport class IssueMutation {\n @Directive('@transaction')\n @Mutation(returns => Issue, { description: 'To create new Issue' })\n async createIssue(@Arg('issue') issue: NewIssue, @Ctx() context: ResolverContext): Promise<Issue> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(Issue).save({\n ...issue,\n domain,\n creator: user,\n updater: user\n })\n\n if (issue.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: issue.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Issue, { description: 'To modify Issue information' })\n async updateIssue(\n @Arg('id') id: string,\n @Arg('patch') patch: IssuePatch,\n @Ctx() context: ResolverContext\n ): Promise<Issue> {\n const { user, tx } = context.state\n\n const repository = tx.getRepository(Issue)\n const issue = await repository.findOne({\n where: { id }\n })\n\n const result = await repository.save({\n ...issue,\n ...patch,\n updater: user\n })\n\n if (patch.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: patch.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Issue], { description: \"To modify multiple Issues' information\" })\n async updateMultipleIssue(\n @Arg('patches', type => [IssuePatch]) patches: IssuePatch[],\n @Ctx() context: ResolverContext\n ): Promise<Issue[]> {\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 issueRepo = tx.getRepository(Issue)\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 issueRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\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 issue = await issueRepo.findOneBy({ id: updateRecord.id })\n\n const result = await issueRepo.save({\n ...issue,\n ...updateRecord,\n updater: user\n })\n\n if (updateRecord.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: updateRecord.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\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 Issue' })\n async deleteIssue(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(Issue).delete({ id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Issues' })\n async deleteIssues(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(Issue).delete({\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Issues' })\n async importIssues(\n @Arg('issues', type => [IssuePatch]) issues: IssuePatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n issues.map(async (issue: IssuePatch) => {\n const createdIssue: Issue = await tx.getRepository(Issue).save({ domain, ...issue })\n })\n )\n\n return true\n }\n}\n"]}
|
|
@@ -3,8 +3,8 @@ import { User } from '@things-factory/auth-base';
|
|
|
3
3
|
import { Issue } from './issue';
|
|
4
4
|
import { IssueList } from './issue-type';
|
|
5
5
|
export declare class IssueQuery {
|
|
6
|
-
issue(id: string
|
|
7
|
-
issues(params: ListParam
|
|
6
|
+
issue(id: string): Promise<Issue>;
|
|
7
|
+
issues(params: ListParam): Promise<IssueList>;
|
|
8
8
|
thumbnail(issue: Issue): Promise<string | undefined>;
|
|
9
9
|
domain(issue: Issue): Promise<Domain>;
|
|
10
10
|
updater(issue: Issue): Promise<User>;
|
|
@@ -9,16 +9,13 @@ const auth_base_1 = require("@things-factory/auth-base");
|
|
|
9
9
|
const issue_1 = require("./issue");
|
|
10
10
|
const issue_type_1 = require("./issue-type");
|
|
11
11
|
let IssueQuery = class IssueQuery {
|
|
12
|
-
async issue(id
|
|
13
|
-
const { domain } = context.state;
|
|
12
|
+
async issue(id) {
|
|
14
13
|
return await (0, shell_1.getRepository)(issue_1.Issue).findOne({
|
|
15
|
-
where: {
|
|
14
|
+
where: { id }
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
|
-
async issues(params
|
|
19
|
-
const { domain } = context.state;
|
|
17
|
+
async issues(params) {
|
|
20
18
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
21
|
-
domain,
|
|
22
19
|
params,
|
|
23
20
|
repository: await (0, shell_1.getRepository)(issue_1.Issue),
|
|
24
21
|
searchables: ['name', 'description']
|
|
@@ -29,7 +26,6 @@ let IssueQuery = class IssueQuery {
|
|
|
29
26
|
async thumbnail(issue) {
|
|
30
27
|
const attachment = await (0, shell_1.getRepository)(attachment_base_1.Attachment).findOne({
|
|
31
28
|
where: {
|
|
32
|
-
domain: { id: issue.domainId },
|
|
33
29
|
refType: issue_1.Issue.name,
|
|
34
30
|
refBy: issue.id
|
|
35
31
|
}
|
|
@@ -50,17 +46,15 @@ exports.IssueQuery = IssueQuery;
|
|
|
50
46
|
tslib_1.__decorate([
|
|
51
47
|
(0, type_graphql_1.Query)(returns => issue_1.Issue, { nullable: true, description: 'To fetch a Issue' }),
|
|
52
48
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
53
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
54
49
|
tslib_1.__metadata("design:type", Function),
|
|
55
|
-
tslib_1.__metadata("design:paramtypes", [String
|
|
50
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
56
51
|
tslib_1.__metadata("design:returntype", Promise)
|
|
57
52
|
], IssueQuery.prototype, "issue", null);
|
|
58
53
|
tslib_1.__decorate([
|
|
59
54
|
(0, type_graphql_1.Query)(returns => issue_type_1.IssueList, { description: 'To fetch multiple Issues' }),
|
|
60
55
|
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
61
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
62
56
|
tslib_1.__metadata("design:type", Function),
|
|
63
|
-
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam
|
|
57
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
|
|
64
58
|
tslib_1.__metadata("design:returntype", Promise)
|
|
65
59
|
], IssueQuery.prototype, "issues", null);
|
|
66
60
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue-query.js","sourceRoot":"","sources":["../../../server/service/issue/issue-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,qEAA4D;AAC5D,iDAAuG;AACvG,yDAAgD;AAChD,mCAA+B;AAC/B,6CAAwC;AAGjC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAEf,AAAN,KAAK,CAAC,KAAK,CAAY,EAAU
|
|
1
|
+
{"version":3,"file":"issue-query.js","sourceRoot":"","sources":["../../../server/service/issue/issue-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,qEAA4D;AAC5D,iDAAuG;AACvG,yDAAgD;AAChD,mCAA+B;AAC/B,6CAAwC;AAGjC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAEf,AAAN,KAAK,CAAC,KAAK,CAAY,EAAU;QAC/B,OAAO,MAAM,IAAA,qBAAa,EAAC,aAAK,CAAC,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,MAAiB;QACpC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,aAAK,CAAC;YACtC,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAAS,KAAY;QAClC,MAAM,UAAU,GAAe,MAAM,IAAA,qBAAa,EAA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AI,GAAE,CAAA;;6CAAQ,aAAK;;2CASnC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;wCAEhC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;yCAEjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;yCAEjC;qBA9CU,UAAU;IADtB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,UAAU,CA+CtB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Attachment } from '@things-factory/attachment-base'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Issue } from './issue'\nimport { IssueList } from './issue-type'\n\n@Resolver(Issue)\nexport class IssueQuery {\n @Query(returns => Issue!, { nullable: true, description: 'To fetch a Issue' })\n async issue(@Arg('id') id: string): Promise<Issue> {\n return await getRepository(Issue).findOne({\n where: { id }\n })\n }\n\n @Query(returns => IssueList, { description: 'To fetch multiple Issues' })\n async issues(@Args() params: ListParam): Promise<IssueList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(Issue),\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 thumbnail(@Root() issue: Issue): Promise<string | undefined> {\n const attachment: Attachment = await getRepository(Attachment).findOne({\n where: {\n refType: Issue.name,\n refBy: issue.id\n }\n })\n\n return attachment?.fullpath\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() issue: Issue): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: issue.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() issue: Issue): Promise<User> {\n return await getRepository(User).findOneBy({ id: issue.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() issue: Issue): Promise<User> {\n return await getRepository(User).findOneBy({ id: issue.creatorId })\n }\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ProjectChecklist } from './project-checklist';
|
|
2
|
+
import { ProjectChecklistQuery } from './project-checklist-query';
|
|
3
|
+
import { ProjectChecklistMutation } from './project-checklist-mutation';
|
|
4
|
+
export declare const entities: (typeof ProjectChecklist)[];
|
|
5
|
+
export declare const resolvers: (typeof ProjectChecklistQuery | typeof ProjectChecklistMutation)[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const project_checklist_1 = require("./project-checklist");
|
|
5
|
+
const project_checklist_query_1 = require("./project-checklist-query");
|
|
6
|
+
const project_checklist_mutation_1 = require("./project-checklist-mutation");
|
|
7
|
+
exports.entities = [project_checklist_1.ProjectChecklist];
|
|
8
|
+
exports.resolvers = [project_checklist_query_1.ProjectChecklistQuery, project_checklist_mutation_1.ProjectChecklistMutation];
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/project-checklist/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,uEAAiE;AACjE,6EAAuE;AAE1D,QAAA,QAAQ,GAAG,CAAC,oCAAgB,CAAC,CAAA;AAC7B,QAAA,SAAS,GAAG,CAAC,+CAAqB,EAAE,qDAAwB,CAAC,CAAA","sourcesContent":["import { ProjectChecklist } from './project-checklist'\nimport { ProjectChecklistQuery } from './project-checklist-query'\nimport { ProjectChecklistMutation } from './project-checklist-mutation'\n\nexport const entities = [ProjectChecklist]\nexport const resolvers = [ProjectChecklistQuery, ProjectChecklistMutation]\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProjectChecklist } from './project-checklist';
|
|
2
|
+
import { ProjectChecklistItemInput } from './project-checklist-type';
|
|
3
|
+
export declare class ProjectChecklistMutation {
|
|
4
|
+
createProjectChecklist(projectId: string, constructionTypeId: string, constructionDetailTypeId: string, name: string, items: ProjectChecklistItemInput[], context: ResolverContext): Promise<ProjectChecklist>;
|
|
5
|
+
updateProjectChecklist(id: string, name: string, items: ProjectChecklistItemInput[], context: ResolverContext): Promise<ProjectChecklist>;
|
|
6
|
+
deleteProjectChecklists(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectChecklistMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const project_checklist_1 = require("./project-checklist");
|
|
8
|
+
const project_checklist_type_1 = require("./project-checklist-type");
|
|
9
|
+
const project_checklist_item_1 = require("../project-checklist-item/project-checklist-item");
|
|
10
|
+
let ProjectChecklistMutation = class ProjectChecklistMutation {
|
|
11
|
+
async createProjectChecklist(projectId, constructionTypeId, constructionDetailTypeId, name, items, context) {
|
|
12
|
+
const { domain, user, tx } = context.state;
|
|
13
|
+
const checklistRepo = tx.getRepository(project_checklist_1.ProjectChecklist);
|
|
14
|
+
const itemRepo = tx.getRepository(project_checklist_item_1.ProjectChecklistItem);
|
|
15
|
+
const checklist = await checklistRepo.save({
|
|
16
|
+
domain,
|
|
17
|
+
projectId,
|
|
18
|
+
constructionTypeId,
|
|
19
|
+
constructionDetailTypeId,
|
|
20
|
+
name,
|
|
21
|
+
creator: user,
|
|
22
|
+
updater: user
|
|
23
|
+
});
|
|
24
|
+
for (let i = 0; i < items.length; i++) {
|
|
25
|
+
const item = items[i];
|
|
26
|
+
await itemRepo.save({
|
|
27
|
+
projectChecklist: checklist,
|
|
28
|
+
mainType: item.mainType || null,
|
|
29
|
+
name: item.name,
|
|
30
|
+
inspctionCriteria: item.inspctionCriteria || null,
|
|
31
|
+
sequence: i,
|
|
32
|
+
creator: user,
|
|
33
|
+
updater: user
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return checklist;
|
|
37
|
+
}
|
|
38
|
+
async updateProjectChecklist(id, name, items, context) {
|
|
39
|
+
const { user, tx } = context.state;
|
|
40
|
+
const checklistRepo = tx.getRepository(project_checklist_1.ProjectChecklist);
|
|
41
|
+
const itemRepo = tx.getRepository(project_checklist_item_1.ProjectChecklistItem);
|
|
42
|
+
const checklist = await checklistRepo.findOneBy({ id });
|
|
43
|
+
// 이름 수정
|
|
44
|
+
checklist.name = name;
|
|
45
|
+
checklist.updater = user;
|
|
46
|
+
await checklistRepo.save(checklist);
|
|
47
|
+
// 기존 아이템 삭제 후 재삽입
|
|
48
|
+
await itemRepo.delete({ projectChecklist: { id } });
|
|
49
|
+
for (let i = 0; i < items.length; i++) {
|
|
50
|
+
const item = items[i];
|
|
51
|
+
await itemRepo.save({
|
|
52
|
+
projectChecklist: checklist,
|
|
53
|
+
mainType: item.mainType || null,
|
|
54
|
+
name: item.name,
|
|
55
|
+
inspctionCriteria: item.inspctionCriteria || null,
|
|
56
|
+
sequence: i,
|
|
57
|
+
creator: user,
|
|
58
|
+
updater: user
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return checklist;
|
|
62
|
+
}
|
|
63
|
+
async deleteProjectChecklists(ids, context) {
|
|
64
|
+
const { domain, tx } = context.state;
|
|
65
|
+
await tx.getRepository(project_checklist_1.ProjectChecklist).softDelete({
|
|
66
|
+
domain: { id: domain.id },
|
|
67
|
+
id: (0, typeorm_1.In)(ids)
|
|
68
|
+
});
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.ProjectChecklistMutation = ProjectChecklistMutation;
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
75
|
+
(0, type_graphql_1.Mutation)(returns => project_checklist_1.ProjectChecklist, { description: '프로젝트 체크리스트 생성' }),
|
|
76
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('projectId')),
|
|
77
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('constructionTypeId')),
|
|
78
|
+
tslib_1.__param(2, (0, type_graphql_1.Arg)('constructionDetailTypeId')),
|
|
79
|
+
tslib_1.__param(3, (0, type_graphql_1.Arg)('name')),
|
|
80
|
+
tslib_1.__param(4, (0, type_graphql_1.Arg)('items', type => [project_checklist_type_1.ProjectChecklistItemInput])),
|
|
81
|
+
tslib_1.__param(5, (0, type_graphql_1.Ctx)()),
|
|
82
|
+
tslib_1.__metadata("design:type", Function),
|
|
83
|
+
tslib_1.__metadata("design:paramtypes", [String, String, String, String, Array, Object]),
|
|
84
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
85
|
+
], ProjectChecklistMutation.prototype, "createProjectChecklist", null);
|
|
86
|
+
tslib_1.__decorate([
|
|
87
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
88
|
+
(0, type_graphql_1.Mutation)(returns => project_checklist_1.ProjectChecklist, { description: '프로젝트 체크리스트 수정' }),
|
|
89
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
90
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('name')),
|
|
91
|
+
tslib_1.__param(2, (0, type_graphql_1.Arg)('items', type => [project_checklist_type_1.ProjectChecklistItemInput])),
|
|
92
|
+
tslib_1.__param(3, (0, type_graphql_1.Ctx)()),
|
|
93
|
+
tslib_1.__metadata("design:type", Function),
|
|
94
|
+
tslib_1.__metadata("design:paramtypes", [String, String, Array, Object]),
|
|
95
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
96
|
+
], ProjectChecklistMutation.prototype, "updateProjectChecklist", null);
|
|
97
|
+
tslib_1.__decorate([
|
|
98
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
99
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: '프로젝트 체크리스트 삭제' }),
|
|
100
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
|
|
101
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
102
|
+
tslib_1.__metadata("design:type", Function),
|
|
103
|
+
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
104
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
105
|
+
], ProjectChecklistMutation.prototype, "deleteProjectChecklists", null);
|
|
106
|
+
exports.ProjectChecklistMutation = ProjectChecklistMutation = tslib_1.__decorate([
|
|
107
|
+
(0, type_graphql_1.Resolver)(project_checklist_1.ProjectChecklist)
|
|
108
|
+
], ProjectChecklistMutation);
|
|
109
|
+
//# sourceMappingURL=project-checklist-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-checklist-mutation.js","sourceRoot":"","sources":["../../../server/service/project-checklist/project-checklist-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,2DAAsD;AACtD,qEAAoE;AACpE,6FAAuF;AAGhF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAG7B,AAAN,KAAK,CAAC,sBAAsB,CACR,SAAiB,EACR,kBAA0B,EACpB,wBAAgC,EACpD,IAAY,EAC0B,KAAkC,EAC9E,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,aAAa,GAAG,EAAE,CAAC,aAAa,CAAC,oCAAgB,CAAC,CAAA;QACxD,MAAM,QAAQ,GAAG,E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,mBAAA,IAAA,kBAAG,EAAC,oBAAoB,CAAC,CAAA;IACzB,mBAAA,IAAA,kBAAG,EAAC,0BAA0B,CAAC,CAAA;IAC/B,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,kDAAyB,CAAC,CAAC,CAAA;IACjD,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sEA+BP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,oCAAgB,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;IAErE,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IACT,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,kDAAyB,CAAC,CAAC,CAAA;IACjD,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sEA+BP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;IAE5D,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uEAUP;mCA/FU,wBAAwB;IADpC,IAAA,uBAAQ,EAAC,oCAAgB,CAAC;GACd,wBAAwB,CAgGpC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { ProjectChecklist } from './project-checklist'\nimport { ProjectChecklistItemInput } from './project-checklist-type'\nimport { ProjectChecklistItem } from '../project-checklist-item/project-checklist-item'\n\n@Resolver(ProjectChecklist)\nexport class ProjectChecklistMutation {\n @Directive('@transaction')\n @Mutation(returns => ProjectChecklist, { description: '프로젝트 체크리스트 생성' })\n async createProjectChecklist(\n @Arg('projectId') projectId: string,\n @Arg('constructionTypeId') constructionTypeId: string,\n @Arg('constructionDetailTypeId') constructionDetailTypeId: string,\n @Arg('name') name: string,\n @Arg('items', type => [ProjectChecklistItemInput]) items: ProjectChecklistItemInput[],\n @Ctx() context: ResolverContext\n ): Promise<ProjectChecklist> {\n const { domain, user, tx } = context.state\n\n const checklistRepo = tx.getRepository(ProjectChecklist)\n const itemRepo = tx.getRepository(ProjectChecklistItem)\n\n const checklist = await checklistRepo.save({\n domain,\n projectId,\n constructionTypeId,\n constructionDetailTypeId,\n name,\n creator: user,\n updater: user\n })\n\n for (let i = 0; i < items.length; i++) {\n const item = items[i]\n await itemRepo.save({\n projectChecklist: checklist,\n mainType: item.mainType || null,\n name: item.name,\n inspctionCriteria: item.inspctionCriteria || null,\n sequence: i,\n creator: user,\n updater: user\n })\n }\n\n return checklist\n }\n\n @Directive('@transaction')\n @Mutation(returns => ProjectChecklist, { description: '프로젝트 체크리스트 수정' })\n async updateProjectChecklist(\n @Arg('id') id: string,\n @Arg('name') name: string,\n @Arg('items', type => [ProjectChecklistItemInput]) items: ProjectChecklistItemInput[],\n @Ctx() context: ResolverContext\n ): Promise<ProjectChecklist> {\n const { user, tx } = context.state\n\n const checklistRepo = tx.getRepository(ProjectChecklist)\n const itemRepo = tx.getRepository(ProjectChecklistItem)\n\n const checklist = await checklistRepo.findOneBy({ id })\n\n // 이름 수정\n checklist.name = name\n checklist.updater = user\n await checklistRepo.save(checklist)\n\n // 기존 아이템 삭제 후 재삽입\n await itemRepo.delete({ projectChecklist: { id } })\n\n for (let i = 0; i < items.length; i++) {\n const item = items[i]\n await itemRepo.save({\n projectChecklist: checklist,\n mainType: item.mainType || null,\n name: item.name,\n inspctionCriteria: item.inspctionCriteria || null,\n sequence: i,\n creator: user,\n updater: user\n })\n }\n\n return checklist\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: '프로젝트 체크리스트 삭제' })\n async deleteProjectChecklists(\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(ProjectChecklist).softDelete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Domain, ListParam } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { ProjectChecklist } from './project-checklist';
|
|
4
|
+
import { ProjectChecklistList } from './project-checklist-type';
|
|
5
|
+
import { ProjectChecklistItem } from '../project-checklist-item/project-checklist-item';
|
|
6
|
+
export declare class ProjectChecklistQuery {
|
|
7
|
+
projectChecklists(params: ListParam): Promise<ProjectChecklistList>;
|
|
8
|
+
domain(t: ProjectChecklist): Promise<Domain>;
|
|
9
|
+
updater(t: ProjectChecklist): Promise<User>;
|
|
10
|
+
creator(t: ProjectChecklist): Promise<User>;
|
|
11
|
+
projectChecklistItems(t: ProjectChecklist): Promise<ProjectChecklistItem[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectChecklistQuery = 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 project_checklist_1 = require("./project-checklist");
|
|
9
|
+
const project_checklist_type_1 = require("./project-checklist-type");
|
|
10
|
+
const project_checklist_item_1 = require("../project-checklist-item/project-checklist-item");
|
|
11
|
+
let ProjectChecklistQuery = class ProjectChecklistQuery {
|
|
12
|
+
async projectChecklists(params) {
|
|
13
|
+
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
14
|
+
params,
|
|
15
|
+
repository: await (0, shell_1.getRepository)(project_checklist_1.ProjectChecklist),
|
|
16
|
+
searchables: ['name']
|
|
17
|
+
});
|
|
18
|
+
const [items, total] = await queryBuilder.getManyAndCount();
|
|
19
|
+
return { items, total };
|
|
20
|
+
}
|
|
21
|
+
async domain(t) {
|
|
22
|
+
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: t.domainId });
|
|
23
|
+
}
|
|
24
|
+
async updater(t) {
|
|
25
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: t.updaterId });
|
|
26
|
+
}
|
|
27
|
+
async creator(t) {
|
|
28
|
+
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: t.creatorId });
|
|
29
|
+
}
|
|
30
|
+
async projectChecklistItems(t) {
|
|
31
|
+
return await (0, shell_1.getRepository)(project_checklist_item_1.ProjectChecklistItem).find({
|
|
32
|
+
where: { projectChecklist: { id: t.id } },
|
|
33
|
+
order: { sequence: 'ASC' }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.ProjectChecklistQuery = ProjectChecklistQuery;
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, type_graphql_1.Query)(returns => project_checklist_type_1.ProjectChecklistList, { description: '프로젝트 체크리스트 목록' }),
|
|
40
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
41
|
+
tslib_1.__metadata("design:type", Function),
|
|
42
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
|
|
43
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
44
|
+
], ProjectChecklistQuery.prototype, "projectChecklists", null);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
47
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
48
|
+
tslib_1.__metadata("design:type", Function),
|
|
49
|
+
tslib_1.__metadata("design:paramtypes", [project_checklist_1.ProjectChecklist]),
|
|
50
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
51
|
+
], ProjectChecklistQuery.prototype, "domain", null);
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
54
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
55
|
+
tslib_1.__metadata("design:type", Function),
|
|
56
|
+
tslib_1.__metadata("design:paramtypes", [project_checklist_1.ProjectChecklist]),
|
|
57
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
58
|
+
], ProjectChecklistQuery.prototype, "updater", null);
|
|
59
|
+
tslib_1.__decorate([
|
|
60
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
61
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
62
|
+
tslib_1.__metadata("design:type", Function),
|
|
63
|
+
tslib_1.__metadata("design:paramtypes", [project_checklist_1.ProjectChecklist]),
|
|
64
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
65
|
+
], ProjectChecklistQuery.prototype, "creator", null);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, type_graphql_1.FieldResolver)(type => [project_checklist_item_1.ProjectChecklistItem]),
|
|
68
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
69
|
+
tslib_1.__metadata("design:type", Function),
|
|
70
|
+
tslib_1.__metadata("design:paramtypes", [project_checklist_1.ProjectChecklist]),
|
|
71
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
72
|
+
], ProjectChecklistQuery.prototype, "projectChecklistItems", null);
|
|
73
|
+
exports.ProjectChecklistQuery = ProjectChecklistQuery = tslib_1.__decorate([
|
|
74
|
+
(0, type_graphql_1.Resolver)(project_checklist_1.ProjectChecklist)
|
|
75
|
+
], ProjectChecklistQuery);
|
|
76
|
+
//# sourceMappingURL=project-checklist-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-checklist-query.js","sourceRoot":"","sources":["../../../server/service/project-checklist/project-checklist-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8E;AAC9E,iDAAuG;AACvG,yDAAgD;AAChD,2DAAsD;AACtD,qEAA+D;AAC/D,6FAAuF;AAGhF,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAE1B,AAAN,KAAK,CAAC,iBAAiB,CAAS,MAAiB;QAC/C,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,oCAAgB,CAAC;YACjD,WAAW,EAAE,CAAC,MAAM,CAAC;SACtB,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,CAAmB;QACtC,OAAO,MAAM,IAAA,qBAAa,EAAC,cAAM,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;IAClE,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,CAAmB;QACvC,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAA;IACjE,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,CAAmB;QACvC,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAA;IACjE,CAAC;IAGK,AAAN,KAAK,CAAC,qBAAqB,CAAS,CAAmB;QACrD,OAAO,MAAM,IAAA,qBAAa,EAAC,6CAAoB,CAAC,CAAC,IAAI,CAAC;YACpD,KAAK,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE;YACzC,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC3B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AApCY,sDAAqB;AAE1B;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,6CAAoB,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;IAChD,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAS,iBAAS;;8DAUhD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAI,oCAAgB;;mDAEvC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAI,oCAAgB;;oDAExC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAI,oCAAgB;;oDAExC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,6CAAoB,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAI,oCAAgB;;kEAKtD;gCAnCU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,oCAAgB,CAAC;GACd,qBAAqB,CAoCjC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ProjectChecklist } from './project-checklist'\nimport { ProjectChecklistList } from './project-checklist-type'\nimport { ProjectChecklistItem } from '../project-checklist-item/project-checklist-item'\n\n@Resolver(ProjectChecklist)\nexport class ProjectChecklistQuery {\n @Query(returns => ProjectChecklistList, { description: '프로젝트 체크리스트 목록' })\n async projectChecklists(@Args() params: ListParam): Promise<ProjectChecklistList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(ProjectChecklist),\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() t: ProjectChecklist): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: t.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() t: ProjectChecklist): Promise<User> {\n return await getRepository(User).findOneBy({ id: t.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() t: ProjectChecklist): Promise<User> {\n return await getRepository(User).findOneBy({ id: t.creatorId })\n }\n\n @FieldResolver(type => [ProjectChecklistItem])\n async projectChecklistItems(@Root() t: ProjectChecklist): Promise<ProjectChecklistItem[]> {\n return await getRepository(ProjectChecklistItem).find({\n where: { projectChecklist: { id: t.id } },\n order: { sequence: 'ASC' }\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProjectChecklist } from './project-checklist';
|
|
2
|
+
export declare class ProjectChecklistPatch {
|
|
3
|
+
id?: string;
|
|
4
|
+
projectId?: string;
|
|
5
|
+
constructionTypeId?: string;
|
|
6
|
+
constructionDetailTypeId?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class ProjectChecklistItemInput {
|
|
10
|
+
mainType?: string;
|
|
11
|
+
name: string;
|
|
12
|
+
inspctionCriteria?: string;
|
|
13
|
+
sequence?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class ProjectChecklistList {
|
|
16
|
+
items: ProjectChecklist[];
|
|
17
|
+
total: number;
|
|
18
|
+
}
|