@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
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@operato/context/ox-context-page-toolbar.js';
|
|
4
|
+
import '@operato/data-grist';
|
|
5
|
+
import './construction-checklist-template-item-popup';
|
|
6
|
+
import '../checklist/checklist-view';
|
|
7
|
+
import { CommonGristStyles, CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles';
|
|
8
|
+
import { PageView } from '@operato/shell';
|
|
9
|
+
import { css, html } from 'lit';
|
|
10
|
+
import { customElement, query, state } from 'lit/decorators.js';
|
|
11
|
+
import { DataGrist } from '@operato/data-grist';
|
|
12
|
+
import { client } from '@operato/graphql';
|
|
13
|
+
import { notify, openPopup } from '@operato/layout';
|
|
14
|
+
import { i18next, localize } from '@operato/i18n';
|
|
15
|
+
import { p13n } from '@operato/p13n';
|
|
16
|
+
import gql from 'graphql-tag';
|
|
17
|
+
import { BuildingInspectionStatus } from '../building-inspection/building-inspection-list';
|
|
18
|
+
let ConstructionChecklistTemplateList = class ConstructionChecklistTemplateList extends p13n(localize(i18next)(PageView)) {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.constructionTypes = [];
|
|
22
|
+
this.allDetailTypes = [];
|
|
23
|
+
}
|
|
24
|
+
get context() {
|
|
25
|
+
var _a;
|
|
26
|
+
return {
|
|
27
|
+
title: '공종 체크리스트 템플릿',
|
|
28
|
+
search: {
|
|
29
|
+
handler: (search) => {
|
|
30
|
+
this.grist.searchText = search;
|
|
31
|
+
},
|
|
32
|
+
value: (_a = this.grist) === null || _a === void 0 ? void 0 : _a.searchText
|
|
33
|
+
},
|
|
34
|
+
filter: {
|
|
35
|
+
handler: () => {
|
|
36
|
+
this.grist.toggleHeadroom();
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
actions: [
|
|
40
|
+
Object.assign({ title: '저장', action: this._save.bind(this) }, CommonButtonStyles.submit),
|
|
41
|
+
Object.assign({ title: '삭제', action: this._delete.bind(this) }, CommonButtonStyles.delete)
|
|
42
|
+
],
|
|
43
|
+
toolbar: false
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
return html `
|
|
48
|
+
<ox-grist
|
|
49
|
+
.mode=${'GRID'}
|
|
50
|
+
.config=${this.gristConfig}
|
|
51
|
+
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
52
|
+
.personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')}
|
|
53
|
+
>
|
|
54
|
+
<div slot="headroom" class="header">
|
|
55
|
+
<div class="filters">
|
|
56
|
+
<ox-filters-form autofocus without-search></ox-filters-form>
|
|
57
|
+
</div>
|
|
58
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
59
|
+
</div>
|
|
60
|
+
<ox-grist-personalizer slot="setting"></ox-grist-personalizer>
|
|
61
|
+
</ox-grist>
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
64
|
+
async pageUpdated(changes, lifecycle) {
|
|
65
|
+
if (this.active) {
|
|
66
|
+
await this._fetchConstructionTypes();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async pageInitialized(lifecycle) {
|
|
70
|
+
await this._fetchConstructionTypes();
|
|
71
|
+
this._buildGristConfig();
|
|
72
|
+
}
|
|
73
|
+
_buildGristConfig() {
|
|
74
|
+
const ctOptions = [
|
|
75
|
+
{ display: '', value: '' },
|
|
76
|
+
...this.constructionTypes.map(ct => ({ display: ct.name, value: ct.id }))
|
|
77
|
+
];
|
|
78
|
+
this.gristConfig = {
|
|
79
|
+
columns: [
|
|
80
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
81
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
82
|
+
{
|
|
83
|
+
type: 'gutter',
|
|
84
|
+
gutterName: 'button',
|
|
85
|
+
fixed: true,
|
|
86
|
+
icon: 'reorder',
|
|
87
|
+
handlers: {
|
|
88
|
+
click: async (columns, data, column, record, rowIndex) => {
|
|
89
|
+
var _a, _b, _c;
|
|
90
|
+
if (!record.constructionTypeId || !record.constructionDetailTypeId) {
|
|
91
|
+
notify({ message: '공종과 세부공종을 먼저 선택해주세요.', level: 'warn' });
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
// upsert로 템플릿 find-or-create
|
|
95
|
+
const response = await client.mutate({
|
|
96
|
+
mutation: gql `
|
|
97
|
+
mutation ($ctId: String!, $cdtId: String!) {
|
|
98
|
+
upsertConstructionChecklistTemplate(
|
|
99
|
+
constructionTypeId: $ctId
|
|
100
|
+
constructionDetailTypeId: $cdtId
|
|
101
|
+
) {
|
|
102
|
+
id
|
|
103
|
+
constructionTypeId
|
|
104
|
+
constructionDetailTypeId
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`,
|
|
108
|
+
variables: {
|
|
109
|
+
ctId: record.constructionTypeId,
|
|
110
|
+
cdtId: record.constructionDetailTypeId
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
if (response.errors) {
|
|
114
|
+
notify({ message: '템플릿 생성에 실패했습니다.', level: 'error' });
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const template = (_a = response.data) === null || _a === void 0 ? void 0 : _a.upsertConstructionChecklistTemplate;
|
|
118
|
+
const ctName = ((_b = this.constructionTypes.find(ct => ct.id === record.constructionTypeId)) === null || _b === void 0 ? void 0 : _b.name) || '';
|
|
119
|
+
const cdtName = ((_c = this.allDetailTypes.find(dt => dt.id === record.constructionDetailTypeId)) === null || _c === void 0 ? void 0 : _c.name) || '';
|
|
120
|
+
openPopup(html `
|
|
121
|
+
<construction-checklist-template-item-popup
|
|
122
|
+
.constructionChecklistTemplate=${template}
|
|
123
|
+
@requestRefresh="${() => this.grist.fetch()}"
|
|
124
|
+
></construction-checklist-template-item-popup>
|
|
125
|
+
`, {
|
|
126
|
+
backdrop: true,
|
|
127
|
+
size: 'large',
|
|
128
|
+
title: `검사항목 - ${ctName} > ${cdtName}`
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'gutter',
|
|
135
|
+
gutterName: 'button',
|
|
136
|
+
fixed: true,
|
|
137
|
+
icon: 'preview',
|
|
138
|
+
handlers: {
|
|
139
|
+
click: async (columns, data, column, record, rowIndex) => {
|
|
140
|
+
var _a, _b;
|
|
141
|
+
if (!record.id)
|
|
142
|
+
return;
|
|
143
|
+
const items = await this._getTemplateItems(record.id);
|
|
144
|
+
const ctName = ((_a = this.constructionTypes.find(ct => ct.id === record.constructionTypeId)) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
145
|
+
const cdtName = ((_b = this.allDetailTypes.find(dt => dt.id === record.constructionDetailTypeId)) === null || _b === void 0 ? void 0 : _b.name) || '';
|
|
146
|
+
const checklist = {
|
|
147
|
+
name: `${ctName} - ${cdtName}`,
|
|
148
|
+
constructionType: ctName,
|
|
149
|
+
constructionDetailType: cdtName,
|
|
150
|
+
location: '',
|
|
151
|
+
documentNo: '',
|
|
152
|
+
inspectionParts: [],
|
|
153
|
+
buildingInspection: {
|
|
154
|
+
status: BuildingInspectionStatus.WAIT
|
|
155
|
+
},
|
|
156
|
+
checklistItems: items.map(item => (Object.assign(Object.assign({}, item), { detailType: '', inspctionCriteria: '' })))
|
|
157
|
+
};
|
|
158
|
+
openPopup(html `
|
|
159
|
+
<div style="overflow-y: auto;">
|
|
160
|
+
<checklist-view
|
|
161
|
+
.mode=${"VIEWER" /* ChecklistMode.VIEWER */}
|
|
162
|
+
.checklist=${checklist}
|
|
163
|
+
></checklist-view>
|
|
164
|
+
</div>
|
|
165
|
+
`, {
|
|
166
|
+
backdrop: true,
|
|
167
|
+
size: 'large',
|
|
168
|
+
title: `체크리스트 미리보기 - ${ctName} > ${cdtName}`
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: 'select',
|
|
175
|
+
name: 'constructionTypeId',
|
|
176
|
+
header: '공종',
|
|
177
|
+
record: {
|
|
178
|
+
editable: true,
|
|
179
|
+
options: ctOptions
|
|
180
|
+
},
|
|
181
|
+
width: 180
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
type: 'select',
|
|
185
|
+
name: 'constructionDetailTypeId',
|
|
186
|
+
header: '세부공종',
|
|
187
|
+
record: {
|
|
188
|
+
editable: true,
|
|
189
|
+
options: (columns, data, column) => {
|
|
190
|
+
const ctId = column.constructionTypeId;
|
|
191
|
+
if (!ctId)
|
|
192
|
+
return [{ display: '', value: '' }];
|
|
193
|
+
return [
|
|
194
|
+
{ display: '', value: '' },
|
|
195
|
+
...this.allDetailTypes
|
|
196
|
+
.filter(dt => dt.constructionTypeId === ctId)
|
|
197
|
+
.map(dt => ({ display: dt.name, value: dt.id }))
|
|
198
|
+
];
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
width: 180
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
type: 'resource-object',
|
|
205
|
+
name: 'updater',
|
|
206
|
+
header: '수정자',
|
|
207
|
+
record: { editable: false },
|
|
208
|
+
width: 120
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
type: 'datetime',
|
|
212
|
+
name: 'updatedAt',
|
|
213
|
+
header: '수정일시',
|
|
214
|
+
record: { editable: false },
|
|
215
|
+
width: 180
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
rows: {
|
|
219
|
+
selectable: { multiple: true }
|
|
220
|
+
},
|
|
221
|
+
sorters: [{ name: 'updatedAt' }]
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
async _fetchConstructionTypes() {
|
|
225
|
+
var _a, _b;
|
|
226
|
+
const response = await client.query({
|
|
227
|
+
query: gql `
|
|
228
|
+
query ConstructionTypes {
|
|
229
|
+
constructionTypes {
|
|
230
|
+
items {
|
|
231
|
+
id
|
|
232
|
+
name
|
|
233
|
+
constructionDetailTypes {
|
|
234
|
+
id
|
|
235
|
+
name
|
|
236
|
+
sequence
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
total
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
`
|
|
243
|
+
});
|
|
244
|
+
const items = ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.constructionTypes) === null || _b === void 0 ? void 0 : _b.items) || [];
|
|
245
|
+
this.constructionTypes = items;
|
|
246
|
+
// 모든 세부공종을 평탄화 (constructionTypeId 포함)
|
|
247
|
+
this.allDetailTypes = items.flatMap(ct => (ct.constructionDetailTypes || []).map(dt => (Object.assign(Object.assign({}, dt), { constructionTypeId: ct.id }))));
|
|
248
|
+
// config가 이미 만들어진 경우 갱신
|
|
249
|
+
if (this.gristConfig) {
|
|
250
|
+
this._buildGristConfig();
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
|
|
254
|
+
var _a, _b, _c, _d;
|
|
255
|
+
const response = await client.query({
|
|
256
|
+
query: gql `
|
|
257
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
258
|
+
responses: constructionChecklistTemplates(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
259
|
+
items {
|
|
260
|
+
id
|
|
261
|
+
constructionTypeId
|
|
262
|
+
constructionDetailTypeId
|
|
263
|
+
updater { id name }
|
|
264
|
+
updatedAt
|
|
265
|
+
}
|
|
266
|
+
total
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
`,
|
|
270
|
+
variables: {
|
|
271
|
+
filters,
|
|
272
|
+
pagination: { page, limit },
|
|
273
|
+
sortings
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
const items = ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.responses) === null || _b === void 0 ? void 0 : _b.items) || [];
|
|
277
|
+
const records = items;
|
|
278
|
+
return {
|
|
279
|
+
total: ((_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.responses) === null || _d === void 0 ? void 0 : _d.total) || 0,
|
|
280
|
+
records
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
async _save() {
|
|
284
|
+
let patches = this.grist.dirtyRecords;
|
|
285
|
+
if (patches && patches.length) {
|
|
286
|
+
patches = patches.map(patch => {
|
|
287
|
+
let patchField = patch.id ? { id: patch.id } : {};
|
|
288
|
+
const dirtyFields = patch.__dirtyfields__;
|
|
289
|
+
for (let key in dirtyFields) {
|
|
290
|
+
patchField[key] = dirtyFields[key].after;
|
|
291
|
+
}
|
|
292
|
+
patchField.cuFlag = patch.__dirty__;
|
|
293
|
+
return patchField;
|
|
294
|
+
});
|
|
295
|
+
const response = await client.mutate({
|
|
296
|
+
mutation: gql `
|
|
297
|
+
mutation ($patches: [ConstructionChecklistTemplatePatch!]!) {
|
|
298
|
+
updateMultipleConstructionChecklistTemplate(patches: $patches) {
|
|
299
|
+
id
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
`,
|
|
303
|
+
variables: { patches }
|
|
304
|
+
});
|
|
305
|
+
if (!response.errors) {
|
|
306
|
+
this.grist.fetch();
|
|
307
|
+
notify({ message: '저장되었습니다.' });
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
notify({ message: '저장에 실패하였습니다.', level: 'error' });
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
async _delete() {
|
|
315
|
+
if (confirm('삭제하시겠습니까?')) {
|
|
316
|
+
const ids = this.grist.selected.map(record => record.id);
|
|
317
|
+
if (ids && ids.length > 0) {
|
|
318
|
+
const response = await client.mutate({
|
|
319
|
+
mutation: gql `
|
|
320
|
+
mutation ($ids: [String!]!) {
|
|
321
|
+
deleteConstructionChecklistTemplates(ids: $ids)
|
|
322
|
+
}
|
|
323
|
+
`,
|
|
324
|
+
variables: { ids }
|
|
325
|
+
});
|
|
326
|
+
if (!response.errors) {
|
|
327
|
+
this.grist.fetch();
|
|
328
|
+
notify({ message: '삭제되었습니다.' });
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
async _getTemplateItems(templateId) {
|
|
334
|
+
var _a, _b;
|
|
335
|
+
const response = await client.query({
|
|
336
|
+
query: gql `
|
|
337
|
+
query ($filters: [Filter!], $sortings: [Sorting!]) {
|
|
338
|
+
constructionChecklistTemplateItems(filters: $filters, sortings: $sortings) {
|
|
339
|
+
items {
|
|
340
|
+
id
|
|
341
|
+
sequence
|
|
342
|
+
mainType
|
|
343
|
+
name
|
|
344
|
+
recommendation1
|
|
345
|
+
recommendation2
|
|
346
|
+
recommendation3
|
|
347
|
+
recommendation4
|
|
348
|
+
recommendation5
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
`,
|
|
353
|
+
variables: {
|
|
354
|
+
filters: {
|
|
355
|
+
name: 'constructionChecklistTemplateId',
|
|
356
|
+
value: templateId,
|
|
357
|
+
operator: 'eq'
|
|
358
|
+
},
|
|
359
|
+
sortings: [{ name: 'sequence' }]
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
return ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.constructionChecklistTemplateItems) === null || _b === void 0 ? void 0 : _b.items) || [];
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
ConstructionChecklistTemplateList.styles = [
|
|
366
|
+
ScrollbarStyles,
|
|
367
|
+
CommonGristStyles,
|
|
368
|
+
CommonHeaderStyles,
|
|
369
|
+
css `
|
|
370
|
+
:host {
|
|
371
|
+
display: flex;
|
|
372
|
+
flex-direction: column;
|
|
373
|
+
width: 100%;
|
|
374
|
+
|
|
375
|
+
--grid-record-emphasized-background-color: red;
|
|
376
|
+
--grid-record-emphasized-color: yellow;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
ox-grist {
|
|
380
|
+
overflow-y: auto;
|
|
381
|
+
flex: 1;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.header {
|
|
385
|
+
grid-template-areas: 'filters actions';
|
|
386
|
+
}
|
|
387
|
+
`
|
|
388
|
+
];
|
|
389
|
+
__decorate([
|
|
390
|
+
state(),
|
|
391
|
+
__metadata("design:type", Object)
|
|
392
|
+
], ConstructionChecklistTemplateList.prototype, "gristConfig", void 0);
|
|
393
|
+
__decorate([
|
|
394
|
+
state(),
|
|
395
|
+
__metadata("design:type", Array)
|
|
396
|
+
], ConstructionChecklistTemplateList.prototype, "constructionTypes", void 0);
|
|
397
|
+
__decorate([
|
|
398
|
+
state(),
|
|
399
|
+
__metadata("design:type", Array)
|
|
400
|
+
], ConstructionChecklistTemplateList.prototype, "allDetailTypes", void 0);
|
|
401
|
+
__decorate([
|
|
402
|
+
query('ox-grist'),
|
|
403
|
+
__metadata("design:type", DataGrist)
|
|
404
|
+
], ConstructionChecklistTemplateList.prototype, "grist", void 0);
|
|
405
|
+
ConstructionChecklistTemplateList = __decorate([
|
|
406
|
+
customElement('construction-checklist-template-list')
|
|
407
|
+
], ConstructionChecklistTemplateList);
|
|
408
|
+
export { ConstructionChecklistTemplateList };
|
|
409
|
+
//# sourceMappingURL=construction-checklist-template-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construction-checklist-template-list.js","sourceRoot":"","sources":["../../../client/pages/checklist-template/construction-checklist-template-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,6CAA6C,CAAA;AACpD,OAAO,qBAAqB,CAAA;AAC5B,OAAO,8CAA8C,CAAA;AACrD,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5G,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAe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CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;aACjC;SACF,CAAC,CAAA;QAEF,OAAO,CAAA,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,kCAAkC,0CAAE,KAAK,KAAI,EAAE,CAAA;IACvE,CAAC;;AAzZM,wCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;;;;;;;KAkBF;CACF,AAvBY,CAuBZ;AAEgB;IAAhB,KAAK,EAAE;;sEAAyB;AAChB;IAAhB,KAAK,EAAE;;4EAAsC;AAC7B;IAAhB,KAAK,EAAE;;yEAAmC;AAChB;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;gEAAA;AA7BjC,iCAAiC;IAD7C,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CA2Z7C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/context/ox-context-page-toolbar.js'\nimport '@operato/data-grist'\nimport './construction-checklist-template-item-popup'\nimport '../checklist/checklist-view'\n\nimport { CommonGristStyles, CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { notify, openPopup } from '@operato/layout'\nimport { i18next, localize } from '@operato/i18n'\nimport { p13n } from '@operato/p13n'\n\nimport gql from 'graphql-tag'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { BuildingInspectionStatus } from '../building-inspection/building-inspection-list'\n\n@customElement('construction-checklist-template-list')\nexport class ConstructionChecklistTemplateList extends p13n(localize(i18next)(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n\n .header {\n grid-template-areas: 'filters actions';\n }\n `\n ]\n\n @state() private gristConfig: any\n @state() private constructionTypes: any[] = []\n @state() private allDetailTypes: any[] = []\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: '공종 체크리스트 템플릿',\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n actions: [\n {\n title: '저장',\n action: this._save.bind(this),\n ...CommonButtonStyles.submit\n },\n {\n title: '삭제',\n action: this._delete.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n toolbar: false\n }\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}\n >\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n </div>\n <ox-context-page-toolbar class=\"actions\" .context=${this.context}></ox-context-page-toolbar>\n </div>\n <ox-grist-personalizer slot=\"setting\"></ox-grist-personalizer>\n </ox-grist>\n `\n }\n\n async pageUpdated(changes: any, lifecycle) {\n if (this.active) {\n await this._fetchConstructionTypes()\n }\n }\n\n async pageInitialized(lifecycle: any) {\n await this._fetchConstructionTypes()\n this._buildGristConfig()\n }\n\n private _buildGristConfig() {\n const ctOptions = [\n { display: '', value: '' },\n ...this.constructionTypes.map(ct => ({ display: ct.name, value: ct.id }))\n ]\n\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n fixed: true,\n icon: 'reorder',\n handlers: {\n click: async (columns, data, column, record, rowIndex) => {\n if (!record.constructionTypeId || !record.constructionDetailTypeId) {\n notify({ message: '공종과 세부공종을 먼저 선택해주세요.', level: 'warn' })\n return\n }\n\n // upsert로 템플릿 find-or-create\n const response = await client.mutate({\n mutation: gql`\n mutation ($ctId: String!, $cdtId: String!) {\n upsertConstructionChecklistTemplate(\n constructionTypeId: $ctId\n constructionDetailTypeId: $cdtId\n ) {\n id\n constructionTypeId\n constructionDetailTypeId\n }\n }\n `,\n variables: {\n ctId: record.constructionTypeId,\n cdtId: record.constructionDetailTypeId\n }\n })\n\n if (response.errors) {\n notify({ message: '템플릿 생성에 실패했습니다.', level: 'error' })\n return\n }\n\n const template = response.data?.upsertConstructionChecklistTemplate\n const ctName = this.constructionTypes.find(ct => ct.id === record.constructionTypeId)?.name || ''\n const cdtName = this.allDetailTypes.find(dt => dt.id === record.constructionDetailTypeId)?.name || ''\n\n openPopup(\n html`\n <construction-checklist-template-item-popup\n .constructionChecklistTemplate=${template}\n @requestRefresh=\"${() => this.grist.fetch()}\"\n ></construction-checklist-template-item-popup>\n `,\n {\n backdrop: true,\n size: 'large',\n title: `검사항목 - ${ctName} > ${cdtName}`\n }\n )\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n fixed: true,\n icon: 'preview',\n handlers: {\n click: async (columns, data, column, record, rowIndex) => {\n if (!record.id) return\n\n const items = await this._getTemplateItems(record.id)\n const ctName = this.constructionTypes.find(ct => ct.id === record.constructionTypeId)?.name || ''\n const cdtName = this.allDetailTypes.find(dt => dt.id === record.constructionDetailTypeId)?.name || ''\n\n const checklist = {\n name: `${ctName} - ${cdtName}`,\n constructionType: ctName,\n constructionDetailType: cdtName,\n location: '',\n documentNo: '',\n inspectionParts: [],\n buildingInspection: {\n status: BuildingInspectionStatus.WAIT\n },\n checklistItems: items.map(item => ({\n ...item,\n detailType: '',\n inspctionCriteria: ''\n }))\n }\n\n openPopup(\n html`\n <div style=\"overflow-y: auto;\">\n <checklist-view\n .mode=${ChecklistMode.VIEWER}\n .checklist=${checklist}\n ></checklist-view>\n </div>\n `,\n {\n backdrop: true,\n size: 'large',\n title: `체크리스트 미리보기 - ${ctName} > ${cdtName}`\n }\n )\n }\n }\n },\n {\n type: 'select',\n name: 'constructionTypeId',\n header: '공종',\n record: {\n editable: true,\n options: ctOptions\n },\n width: 180\n },\n {\n type: 'select',\n name: 'constructionDetailTypeId',\n header: '세부공종',\n record: {\n editable: true,\n options: (columns, data, column) => {\n const ctId = column.constructionTypeId\n if (!ctId) return [{ display: '', value: '' }]\n return [\n { display: '', value: '' },\n ...this.allDetailTypes\n .filter(dt => dt.constructionTypeId === ctId)\n .map(dt => ({ display: dt.name, value: dt.id }))\n ]\n }\n },\n width: 180\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: '수정자',\n record: { editable: false },\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: '수정일시',\n record: { editable: false },\n width: 180\n }\n ],\n rows: {\n selectable: { multiple: true }\n },\n sorters: [{ name: 'updatedAt' }]\n }\n }\n\n private async _fetchConstructionTypes() {\n const response = await client.query({\n query: gql`\n query ConstructionTypes {\n constructionTypes {\n items {\n id\n name\n constructionDetailTypes {\n id\n name\n sequence\n }\n }\n total\n }\n }\n `\n })\n\n const items = response.data?.constructionTypes?.items || []\n this.constructionTypes = items\n\n // 모든 세부공종을 평탄화 (constructionTypeId 포함)\n this.allDetailTypes = items.flatMap(ct =>\n (ct.constructionDetailTypes || []).map(dt => ({\n ...dt,\n constructionTypeId: ct.id\n }))\n )\n\n // config가 이미 만들어진 경우 갱신\n if (this.gristConfig) {\n this._buildGristConfig()\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: constructionChecklistTemplates(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n constructionTypeId\n constructionDetailTypeId\n updater { id name }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n const items = response.data?.responses?.items || []\n const records = items\n\n return {\n total: response.data?.responses?.total || 0,\n records\n }\n }\n\n private async _save() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [ConstructionChecklistTemplatePatch!]!) {\n updateMultipleConstructionChecklistTemplate(patches: $patches) {\n id\n }\n }\n `,\n variables: { patches }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '저장되었습니다.' })\n } else {\n notify({ message: '저장에 실패하였습니다.', level: 'error' })\n }\n }\n }\n\n private async _delete() {\n if (confirm('삭제하시겠습니까?')) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteConstructionChecklistTemplates(ids: $ids)\n }\n `,\n variables: { ids }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '삭제되었습니다.' })\n }\n }\n }\n }\n\n private async _getTemplateItems(templateId: string) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $sortings: [Sorting!]) {\n constructionChecklistTemplateItems(filters: $filters, sortings: $sortings) {\n items {\n id\n sequence\n mainType\n name\n recommendation1\n recommendation2\n recommendation3\n recommendation4\n recommendation5\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'constructionChecklistTemplateId',\n value: templateId,\n operator: 'eq'\n },\n sortings: [{ name: 'sequence' }]\n }\n })\n\n return response.data?.constructionChecklistTemplateItems?.items || []\n }\n}\n"]}
|
|
@@ -4,11 +4,10 @@ import { PageView } from '@operato/shell';
|
|
|
4
4
|
import { FetchOption } from '@operato/data-grist';
|
|
5
5
|
import { IssueImporter } from './issue-importer';
|
|
6
6
|
declare const IssueListPage_base: (new (...args: any[]) => {
|
|
7
|
-
_storeUnsubscribe:
|
|
7
|
+
_storeUnsubscribe: () => void;
|
|
8
8
|
connectedCallback(): void;
|
|
9
9
|
disconnectedCallback(): void;
|
|
10
10
|
stateChanged(_state: unknown): void;
|
|
11
|
-
readonly isConnected: boolean;
|
|
12
11
|
}) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
13
12
|
export declare class IssueListPage extends IssueListPage_base {
|
|
14
13
|
static styles: import("lit").CSSResult[];
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import '@material/web/icon/icon.js';
|
|
3
3
|
import '@operato/data-grist';
|
|
4
4
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
|
5
|
-
import { PageView, store } from '@operato/shell';
|
|
5
|
+
import { PageView, store, connect } from '@operato/shell';
|
|
6
6
|
import { css, html } from 'lit';
|
|
7
7
|
import { customElement, query, state } from 'lit/decorators.js';
|
|
8
8
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
@@ -12,7 +12,6 @@ import { i18next, localize } from '@operato/i18n';
|
|
|
12
12
|
import { notify, openPopup } from '@operato/layout';
|
|
13
13
|
import { OxPopup, OxPrompt } from '@operato/popup';
|
|
14
14
|
import { isMobileDevice } from '@operato/utils';
|
|
15
|
-
import { connect } from 'pwa-helpers/connect-mixin';
|
|
16
15
|
import gql from 'graphql-tag';
|
|
17
16
|
import { IssueImporter } from './issue-importer';
|
|
18
17
|
let IssueListPage = class IssueListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue-list-page.js","sourceRoot":"","sources":["../../../client/pages/issue/issue-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EA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8BAA0B,OAAO;qDAAA;AA1B/C,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CA8TzB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup, OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\nimport { IssueImporter } from './issue-importer'\n\n@customElement('issue-list-page')\nexport class IssueListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'issue-importer': IssueImporter\n }\n }\n\n @state() private gristConfig: any\n @state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n @query('#sorter-control') private sortersControl!: OxPopup\n\n get context() {\n return {\n title: i18next.t('title.issue list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'supervision/issue',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this.updateIssue.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this.deleteIssue.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.issue list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n\n <div id=\"sorters\">\n Sort\n <md-icon\n @click=${e => {\n const target = e.currentTarget\n this.sortersControl.open({\n right: 0,\n top: target.offsetTop + target.offsetHeight\n })\n }}\n >expand_more</md-icon\n >\n <ox-popup id=\"sorter-control\">\n <ox-sorters-control> </ox-sorters-control>\n </ox-popup>\n </div>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: issues(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n active\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n private async deleteIssue() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteIssues(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n private async updateIssue() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [IssuePatch!]!) {\n updateMultipleIssue(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n private async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set(['id', 'name', 'description', 'active'])\n\n return exportTargets.map(issue => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = issue[field]\n }\n\n return tempObj\n })\n }\n\n private async importHandler(records) {\n const popup = openPopup(\n html`\n <issue-importer\n .issues=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></issue-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import issue')\n }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"issue-list-page.js","sourceRoot":"","sources":["../../../client/pages/issue/issue-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAY,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAgB,SAAS,EAA+B,MAAM,qBAAqB,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE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AI,EAAE,CAAA;YACd,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC;;OAEJ,EACD;YACE,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC;SACvC,CACF,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,GAAG,EAAE;YACpB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC,CAAA;IACH,CAAC;;AA5TM,oBAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;KASF;CACF,AAbY,CAaZ;AAQgB;IAAhB,KAAK,EAAE;;kDAAyB;AAChB;IAAhB,KAAK,EAAE;;2CAA4E;AAEzD;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;4CAAA;AACV;IAAjC,KAAK,CAAC,iBAAiB,CAAC;8BAA0B,OAAO;qDAAA;AA1B/C,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CA8TzB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store, connect } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup, OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport gql from 'graphql-tag'\n\nimport { IssueImporter } from './issue-importer'\n\n@customElement('issue-list-page')\nexport class IssueListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'issue-importer': IssueImporter\n }\n }\n\n @state() private gristConfig: any\n @state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n @query('#sorter-control') private sortersControl!: OxPopup\n\n get context() {\n return {\n title: i18next.t('title.issue list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'supervision/issue',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this.updateIssue.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this.deleteIssue.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.issue list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n\n <div id=\"sorters\">\n Sort\n <md-icon\n @click=${e => {\n const target = e.currentTarget\n this.sortersControl.open({\n right: 0,\n top: target.offsetTop + target.offsetHeight\n })\n }}\n >expand_more</md-icon\n >\n <ox-popup id=\"sorter-control\">\n <ox-sorters-control> </ox-sorters-control>\n </ox-popup>\n </div>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: issues(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n active\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n private async deleteIssue() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteIssues(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n private async updateIssue() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [IssuePatch!]!) {\n updateMultipleIssue(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n private async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set(['id', 'name', 'description', 'active'])\n\n return exportTargets.map(issue => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = issue[field]\n }\n\n return tempObj\n })\n }\n\n private async importHandler(records) {\n const popup = openPopup(\n html`\n <issue-importer\n .issues=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></issue-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import issue')\n }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '@material/web/button/elevated-button.js';
|
|
3
|
+
import '@material/web/button/filled-button.js';
|
|
4
|
+
import '@material/web/select/filled-select.js';
|
|
5
|
+
import '@material/web/select/select-option.js';
|
|
6
|
+
import '@material/web/textfield/filled-text-field.js';
|
|
7
|
+
import '@operato/data-grist';
|
|
8
|
+
import '../checklist/checklist-view';
|
|
9
|
+
import { PageView } from '@operato/shell';
|
|
10
|
+
import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
|
|
11
|
+
import { DataGrist } from '@operato/data-grist';
|
|
12
|
+
export declare class ProjectChecklistManagement extends PageView {
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
projectId: string;
|
|
15
|
+
constructionTypes: any[];
|
|
16
|
+
allDetailTypes: any[];
|
|
17
|
+
selectedConstructionType: any;
|
|
18
|
+
selectedConstructionDetailType: any;
|
|
19
|
+
checklistName: string;
|
|
20
|
+
templateItems: any[];
|
|
21
|
+
leftGristConfig: any;
|
|
22
|
+
rightGristConfig: any;
|
|
23
|
+
isEditMode: boolean;
|
|
24
|
+
selectedChecklistId: string | null;
|
|
25
|
+
leftGrist: DataGrist;
|
|
26
|
+
rightGrist: DataGrist;
|
|
27
|
+
htmlSelectConstructionType: any;
|
|
28
|
+
htmlSelectConstructionDetailType: any;
|
|
29
|
+
get context(): {
|
|
30
|
+
title: string;
|
|
31
|
+
};
|
|
32
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
33
|
+
pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
|
|
34
|
+
pageInitialized(lifecycle: any): Promise<void>;
|
|
35
|
+
private _init;
|
|
36
|
+
private _fetchConstructionTypes;
|
|
37
|
+
private _buildLeftGristConfig;
|
|
38
|
+
private _buildRightGristConfig;
|
|
39
|
+
private _fetchChecklists;
|
|
40
|
+
private _onSelectConstructionType;
|
|
41
|
+
private _onSelectConstructionDetailType;
|
|
42
|
+
private _loadTemplateItems;
|
|
43
|
+
private _handleRightGristRowClick;
|
|
44
|
+
private _loadTemplateItemsForEdit;
|
|
45
|
+
private _save;
|
|
46
|
+
private _resetLeftForm;
|
|
47
|
+
private _delete;
|
|
48
|
+
private _fetchChecklistItems;
|
|
49
|
+
private _openPreview;
|
|
50
|
+
}
|