@dssp/supervision 1.0.0-alpha.26 → 1.0.0-alpha.28

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.
Files changed (83) hide show
  1. package/dist-client/graphql/building-inspection.js +6 -0
  2. package/dist-client/graphql/building-inspection.js.map +1 -1
  3. package/dist-client/pages/action-plan/action-plan-importer.d.ts +1 -1
  4. package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -1
  5. package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +1 -1
  6. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +1 -1
  7. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +25 -11
  8. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  9. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -1
  10. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +1 -1
  11. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  12. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +11 -2
  13. package/dist-client/pages/building-inspection/building-inspection-list.js +141 -10
  14. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  15. package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +22 -0
  16. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +431 -0
  17. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
  18. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +1 -1
  19. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +1 -1
  20. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +17 -21
  21. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -1
  22. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +4 -1
  23. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +45 -19
  24. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -1
  25. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +1 -1
  26. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +2 -1
  27. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +39 -17
  28. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  29. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +2 -2
  30. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +1 -1
  31. package/dist-client/pages/checklist/checklist-view.js +28 -3
  32. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  33. package/dist-client/pages/checklist/inspection-info-popup.d.ts +1 -1
  34. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +1 -1
  35. package/dist-client/pages/checklist-template/checklist-template-list.d.ts +1 -1
  36. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +1 -1
  37. package/dist-client/pages/issue/issue-importer.d.ts +1 -1
  38. package/dist-client/pages/issue/issue-list-page.d.ts +1 -1
  39. package/dist-client/pages/project-report/project-report-importer.d.ts +1 -1
  40. package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -1
  41. package/dist-client/pages/supervisor/supervisor-importer.d.ts +1 -1
  42. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -1
  43. package/dist-client/tsconfig.tsbuildinfo +1 -1
  44. package/dist-server/service/building-inspection/building-inspection-mutation.js +7 -2
  45. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  46. package/dist-server/service/building-inspection/building-inspection-query.js +7 -1
  47. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  48. package/dist-server/service/building-inspection/building-inspection-type.d.ts +2 -0
  49. package/dist-server/service/building-inspection/building-inspection-type.js +8 -0
  50. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  51. package/dist-server/service/building-inspection/building-inspection.d.ts +3 -0
  52. package/dist-server/service/building-inspection/building-inspection.js +10 -0
  53. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  54. package/dist-server/service/building-inspection/index.d.ts +1 -1
  55. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
  56. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +56 -0
  57. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
  58. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +14 -0
  59. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +135 -0
  60. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
  61. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +19 -0
  62. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +74 -0
  63. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
  64. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +27 -0
  65. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +104 -0
  66. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
  67. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
  68. package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
  69. package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
  70. package/dist-server/service/checklist/checklist.d.ts +4 -1
  71. package/dist-server/service/checklist/checklist.js +15 -4
  72. package/dist-server/service/checklist/checklist.js.map +1 -1
  73. package/dist-server/service/index.d.ts +2 -1
  74. package/dist-server/service/index.js +6 -2
  75. package/dist-server/service/index.js.map +1 -1
  76. package/dist-server/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +5 -4
  78. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.d.ts +0 -21
  79. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js +0 -327
  80. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js.map +0 -1
  81. package/dist-client/pages/building-inspection/component/photo-album-popup.d.ts +0 -41
  82. package/dist-client/pages/building-inspection/component/photo-album-popup.js +0 -406
  83. package/dist-client/pages/building-inspection/component/photo-album-popup.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"inspection-request-document.js","sourceRoot":"","sources":["../../../../../client/pages/building-inspection/component/inspection-document/inspection-request-document.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAIjD,OAAO,qBAAqB,CAAA;AAE5B,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAGM,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAwPuB,cAAS,GAAQ,EAAE,CAAA;QACnB,uBAAkB,GAAQ,EAAE,CAAA;QAC5B,SAAI,GAAmB,cAAc,CAAC,IAAI,CAAA;IAsKxE,CAAC;IApKC,MAAM;;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAA;QACnF,MAAM,eAAe,GAAG,MAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB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,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;QACrE,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;;AA9ZM,gCAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkPF;CACF,AArPY,CAqPZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qEAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAA2C;AA1P3D,yBAAyB;IADrC,aAAa,CAAC,6BAA6B,CAAC;GAChC,yBAAyB,CAgarC","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/icon/icon.js'\nimport '@material/web/button/outlined-button.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { openPopup } from '@operato/layout'\nimport { client } from '@operato/graphql'\nimport gql from 'graphql-tag'\nimport './photo-album-popup'\n\nexport enum InspectionMode {\n EDIT = 'EDIT',\n VIEW = 'VIEW'\n}\n\n@customElement('inspection-request-document')\nexport class InspectionRequestDocument extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: block;\n padding: 20px;\n font-family: 'Noto Sans KR', sans-serif;\n line-height: 1.4;\n overflow-y: auto;\n }\n\n .document-container {\n max-width: 800px;\n margin: 0 auto;\n background: white;\n border: 2px solid #333;\n }\n\n .document-header {\n text-align: center;\n padding: 15px;\n border-bottom: 1px solid #333;\n }\n\n .document-title {\n font-size: 18px;\n font-weight: bold;\n margin-bottom: 10px;\n }\n\n .document-body {\n padding: 20px;\n }\n\n .request-info {\n margin-bottom: 20px;\n }\n\n .request-table {\n width: 100%;\n border-collapse: collapse;\n margin-bottom: 20px;\n }\n\n .request-table th,\n .request-table td {\n border: 1px solid #333;\n padding: 8px;\n text-align: left;\n }\n\n .request-table th {\n background-color: #f5f5f5;\n font-weight: bold;\n width: 120px;\n }\n\n .inspection-items {\n margin: 20px 0;\n }\n\n .inspection-items textarea {\n width: 100%;\n min-height: 100px;\n border: 1px solid #ddd;\n padding: 10px;\n font-family: inherit;\n resize: vertical;\n }\n\n .signature-section {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 15px;\n }\n\n .signature-box {\n display: flex;\n align-items: center;\n gap: 15px;\n text-align: right;\n }\n\n .signature-title {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n min-width: 120px;\n }\n\n .signature-name {\n font-size: 14px;\n color: #333;\n }\n\n .signature-container {\n position: relative;\n min-width: 100px;\n min-height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .signature-container::after {\n content: '(인)';\n position: absolute;\n bottom: 5px;\n right: 5px;\n font-size: 12px;\n color: #333;\n font-weight: bold;\n z-index: 2;\n }\n\n .signature-image {\n max-width: 140px;\n max-height: 60px;\n width: auto;\n height: auto;\n }\n\n .attachment-section {\n margin-top: 30px;\n margin-bottom: 30px;\n }\n\n .attachment-title {\n font-weight: bold;\n font-size: 14px;\n color: #333;\n margin-bottom: 10px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .attachment-list {\n margin-left: 30px;\n }\n\n .attachment-item {\n margin-bottom: 5px;\n color: #2196f3;\n font-size: 14px;\n line-height: 1.5;\n }\n\n .attachment-item.upload {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .attachment-item.upload md-outlined-button {\n --md-outlined-button-container-height: 24px;\n --md-outlined-button-label-text-size: 12px;\n --md-outlined-button-outline-color: #666;\n --md-outlined-button-label-text-color: #666;\n }\n\n .attachment-item.upload span {\n color: #666;\n font-size: 12px;\n }\n\n .attachment-icon {\n display: none;\n }\n\n .date-section {\n text-align: right;\n margin-bottom: 20px;\n font-size: 14px;\n }\n\n .form-row {\n display: flex;\n align-items: flex-start;\n margin-bottom: 10px;\n }\n\n .form-label {\n font-weight: bold;\n width: 100px;\n margin-right: 10px;\n }\n\n .recipient-section {\n margin-bottom: 30px;\n }\n\n .recipient-item {\n display: flex;\n margin-bottom: 5px;\n }\n\n .recipient-label {\n font-weight: bold;\n margin-right: 18px;\n }\n\n .inspection-memo-input {\n width: 100%;\n max-width: -webkit-fill-available;\n height: 40px;\n border: 1px solid #ddd;\n padding: 10px;\n font-size: 15px;\n border-radius: 5px;\n }\n\n .inspection-memo-text {\n padding: 10px;\n font-size: 15px;\n color: #495057;\n border: 1px solid #e9ecef;\n border-radius: 5px;\n min-height: 20px;\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n padding: 15px 0;\n border-top: 1px solid #ddd;\n }\n\n .button-container md-elevated-button {\n background-color: #3498db;\n color: white;\n padding: 12px 30px;\n font-size: 16px;\n font-weight: bold;\n border-radius: 8px;\n }\n\n .document-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n `\n ]\n\n @property({ type: Object }) checklist: any = {}\n @property({ type: Object }) buildingInspection: any = {}\n @property({ type: String }) mode: InspectionMode = InspectionMode.VIEW\n\n render() {\n const today = this._formatDate(new Date())\n const requestDate = this._formatDate(new Date(this.buildingInspection.requestDate))\n const attachmentCount = this.buildingInspection?.checklist?.checklistItems?.reduce((acc, item) => {\n return acc + item.checklistItemAttachmentCount\n }, 0)\n\n return html`\n <div class=\"document-container\">\n <div class=\"document-header\">\n <div class=\"document-title\">검측요청서</div>\n </div>\n\n <div class=\"document-body\">\n <div class=\"date-section\">${today}</div>\n\n <div class=\"request-info\">\n <div class=\"recipient-section\">\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">문서 번호:</span>\n <span>${this.checklist?.inspectionRequestDocumentNo || ''}</span>\n </div>\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">수신:</span>\n <span>${this.buildingInspection?.buildingLevel?.building?.buildingComplex?.supervisoryCompany}</span>\n </div>\n </div>\n\n <div style=\"margin: 15px 0;\">다음과 같은 세부공종에 대하여 검측요청 하오니 검사 후 승인하여 주시 기 바랍니다.</div>\n\n <table class=\"request-table\">\n <tr>\n <th>위치 및 공종</th>\n <td>${(this.checklist?.location || '') + ' - ' + (this.checklist?.constructionType || '')}</td>\n </tr>\n <tr>\n <th>검측 부위</th>\n <td>${this.checklist?.inspectionParts?.join(', ') || ''}</td>\n </tr>\n <tr>\n <th>검측 요구일시</th>\n <td>${requestDate}</td>\n </tr>\n <tr>\n <th>검측 사항</th>\n <td>\n ${this.mode === InspectionMode.EDIT\n ? html`\n <input\n type=\"text\"\n name=\"memo\"\n class=\"inspection-memo-input\"\n .value=${this.buildingInspection?.memo || ''}\n @input=${this._onInspectionMemoChange}\n placeholder=\"검측사항을 입력하세요.\"\n />\n `\n : html` <div class=\"inspection-memo-text\">${this.buildingInspection?.memo}</div> `}\n </td>\n </tr>\n </table>\n </div>\n\n <div class=\"document-footer\">\n <div class=\"attachment-section\">\n <div class=\"attachment-title\">첨부 파일</div>\n <div class=\"attachment-list\">\n <div class=\"attachment-item\">시공자의 검측 체크리스트</div>\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"attachment-item upload\">\n 실명부\n <md-outlined-button @click=${this._onNameListUpload.bind(this)}>\n ${this.checklist?.nameListAttachment ? '다시 업로드' : '업로드'}\n </md-outlined-button>\n ${this.checklist?.nameListAttachment ? html`<span>(업로드 완료)</span>` : ''}\n </div>\n `\n : this.checklist?.nameListAttachment\n ? html`<div class=\"attachment-item\">실명부</div>`\n : ''}\n ${attachmentCount > 0 ? html`<div class=\"attachment-item\">첨부 사진 ${attachmentCount}개</div>` : ''}\n </div>\n </div>\n\n <div class=\"signature-section\">\n <div class=\"signature-box\">\n <div class=\"signature-title\">공종별 시공 관리자</div>\n <div class=\"signature-name\">${this.checklist?.taskConstructor?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.taskConstructorSignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.taskConstructorSignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n <div class=\"signature-box\">\n <div class=\"signature-title\">총괄 시공 책임자</div>\n <div class=\"signature-name\">${this.checklist?.overallConstructor?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.overallConstructorSignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.overallConstructorSignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"button-container\">\n <md-elevated-button @click=${this._onConfirm}> 확인 </md-elevated-button>\n </div>\n `\n : ''}\n `\n }\n\n private _formatDate(date: Date): string {\n return `${date.getFullYear()}. ${String(date.getMonth() + 1).padStart(2, '0')}. ${String(date.getDate()).padStart(2, '0')}.`\n }\n\n private _onInspectionMemoChange(e: Event) {\n const target = e.target as HTMLInputElement\n this.buildingInspection = { ...this.buildingInspection, memo: target.value }\n\n // 부모 컴포넌트에 변경사항 전달\n this.dispatchEvent(\n new CustomEvent('inspection-memo-change', {\n detail: { memo: target.value },\n bubbles: true\n })\n )\n }\n\n // 실명부 업로드\n private _onNameListUpload() {\n const input = document.createElement('input')\n input.type = 'file'\n input.accept = '.pdf,.doc,.docx,.jpg,.jpeg,.png'\n input.onchange = (e: any) => {\n const file = e.target.files[0]\n if (file) {\n // checklist에 파일과 업로드 플래그 저장\n this.checklist = {\n ...this.checklist,\n nameListAttachment: file,\n isNameListAttachmentUploaded: true\n }\n\n // 부모 컴포넌트에 변경사항 알림\n this.dispatchEvent(new CustomEvent('name-list-file-selected', { detail: { file } }))\n this.requestUpdate()\n }\n }\n input.click()\n }\n\n // 확인 버튼\n private _onConfirm() {\n this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }))\n history.back()\n }\n}\n"]}
1
+ {"version":3,"file":"inspection-request-document.js","sourceRoot":"","sources":["../../../../../client/pages/building-inspection/component/inspection-document/inspection-request-document.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,qBAAqB,CAAA;AAE5B,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAGM,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAwPuB,cAAS,GAAQ,EAAE,CAAA;QACnB,uBAAkB,GAAQ,EAAE,CAAA;QAC5B,SAAI,GAAmB,cAAc,CAAC,IAAI,CAAA;IAkKxE,CAAC;IAhKC,MAAM;;QACJ,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,0BAA0B,KAAI,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QACvG,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAA;QACnF,MAAM,eAAe,GAAG,MAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,SAAS,0CAAE,cAAc,0CAAE,M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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkPF;CACF,AArPY,CAqPZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qEAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAA2C;AA1P3D,yBAAyB;IADrC,aAAa,CAAC,6BAA6B,CAAC;GAChC,yBAAyB,CA4ZrC","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/icon/icon.js'\nimport '@material/web/button/outlined-button.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport './photo-album-popup'\n\nexport enum InspectionMode {\n EDIT = 'EDIT',\n VIEW = 'VIEW'\n}\n\n@customElement('inspection-request-document')\nexport class InspectionRequestDocument extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: block;\n padding: 20px;\n font-family: 'Noto Sans KR', sans-serif;\n line-height: 1.4;\n overflow-y: auto;\n }\n\n .document-container {\n max-width: 800px;\n margin: 0 auto;\n background: white;\n border: 2px solid #333;\n }\n\n .document-header {\n text-align: center;\n padding: 15px;\n border-bottom: 1px solid #333;\n }\n\n .document-title {\n font-size: 18px;\n font-weight: bold;\n margin-bottom: 10px;\n }\n\n .document-body {\n padding: 20px;\n }\n\n .request-info {\n margin-bottom: 20px;\n }\n\n .request-table {\n width: 100%;\n border-collapse: collapse;\n margin-bottom: 20px;\n }\n\n .request-table th,\n .request-table td {\n border: 1px solid #333;\n padding: 8px;\n text-align: left;\n }\n\n .request-table th {\n background-color: #f5f5f5;\n font-weight: bold;\n width: 120px;\n }\n\n .inspection-items {\n margin: 20px 0;\n }\n\n .inspection-items textarea {\n width: 100%;\n min-height: 100px;\n border: 1px solid #ddd;\n padding: 10px;\n font-family: inherit;\n resize: vertical;\n }\n\n .signature-section {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 15px;\n }\n\n .signature-box {\n display: flex;\n align-items: center;\n gap: 15px;\n text-align: right;\n }\n\n .signature-title {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n min-width: 120px;\n }\n\n .signature-name {\n font-size: 14px;\n color: #333;\n }\n\n .signature-container {\n position: relative;\n min-width: 100px;\n min-height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .signature-container::after {\n content: '(인)';\n position: absolute;\n bottom: 5px;\n right: 5px;\n font-size: 12px;\n color: #333;\n font-weight: bold;\n z-index: 2;\n }\n\n .signature-image {\n max-width: 140px;\n max-height: 60px;\n width: auto;\n height: auto;\n }\n\n .attachment-section {\n margin-top: 30px;\n margin-bottom: 30px;\n }\n\n .attachment-title {\n font-weight: bold;\n font-size: 14px;\n color: #333;\n margin-bottom: 10px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .attachment-list {\n margin-left: 30px;\n }\n\n .attachment-item {\n margin-bottom: 5px;\n color: #2196f3;\n font-size: 14px;\n line-height: 1.5;\n }\n\n .attachment-item.upload {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .attachment-item.upload md-outlined-button {\n --md-outlined-button-container-height: 24px;\n --md-outlined-button-label-text-size: 12px;\n --md-outlined-button-outline-color: #666;\n --md-outlined-button-label-text-color: #666;\n }\n\n .attachment-item.upload span {\n color: #666;\n font-size: 12px;\n }\n\n .attachment-icon {\n display: none;\n }\n\n .date-section {\n text-align: right;\n margin-bottom: 20px;\n font-size: 14px;\n }\n\n .form-row {\n display: flex;\n align-items: flex-start;\n margin-bottom: 10px;\n }\n\n .form-label {\n font-weight: bold;\n width: 100px;\n margin-right: 10px;\n }\n\n .recipient-section {\n margin-bottom: 30px;\n }\n\n .recipient-item {\n display: flex;\n margin-bottom: 5px;\n }\n\n .recipient-label {\n font-weight: bold;\n margin-right: 18px;\n }\n\n .inspection-memo-input {\n width: 100%;\n max-width: -webkit-fill-available;\n height: 40px;\n border: 1px solid #ddd;\n padding: 10px;\n font-size: 15px;\n border-radius: 5px;\n }\n\n .inspection-memo-text {\n padding: 10px;\n font-size: 15px;\n color: #495057;\n border: 1px solid #e9ecef;\n border-radius: 5px;\n min-height: 20px;\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n padding: 15px 0;\n border-top: 1px solid #ddd;\n }\n\n .button-container md-elevated-button {\n background-color: #3498db;\n color: white;\n padding: 12px 30px;\n font-size: 16px;\n font-weight: bold;\n border-radius: 8px;\n }\n\n .document-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n `\n ]\n\n @property({ type: Object }) checklist: any = {}\n @property({ type: Object }) buildingInspection: any = {}\n @property({ type: String }) mode: InspectionMode = InspectionMode.VIEW\n\n render() {\n const headerDate = this._formatDate(new Date(this.checklist?.inspectionRequestUpdatedAt || Date.now()))\n const requestDate = this._formatDate(new Date(this.buildingInspection.requestDate))\n const attachmentCount = this.buildingInspection?.checklist?.checklistItems?.reduce((acc, item) => {\n return acc + item.checklistItemAttachmentCount\n }, 0)\n\n return html`\n <div class=\"document-container\">\n <div class=\"document-header\">\n <div class=\"document-title\">검측요청서</div>\n </div>\n\n <div class=\"document-body\">\n <div class=\"date-section\">${headerDate}</div>\n\n <div class=\"request-info\">\n <div class=\"recipient-section\">\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">문서 번호:</span>\n <span>${this.checklist?.inspectionRequestDocumentNo || ''}</span>\n </div>\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">수신:</span>\n <span>${this.buildingInspection?.buildingLevel?.building?.buildingComplex?.supervisoryCompany}</span>\n </div>\n </div>\n\n <div style=\"margin: 15px 0;\">다음과 같은 세부공종에 대하여 검측요청 하오니 검사 후 승인하여 주시 기 바랍니다.</div>\n\n <table class=\"request-table\">\n <tr>\n <th>위치 및 공종</th>\n <td>${(this.checklist?.location || '') + ' - ' + (this.checklist?.constructionType || '')}</td>\n </tr>\n <tr>\n <th>검측 부위</th>\n <td>${this.checklist?.inspectionParts?.join(', ') || ''}</td>\n </tr>\n <tr>\n <th>검측 요구일시</th>\n <td>${requestDate}</td>\n </tr>\n <tr>\n <th>검측 사항</th>\n <td>\n <input\n type=\"text\"\n class=\"inspection-memo-input\"\n .value=${this.checklist?.inspectionRequestMemo || ''}\n @input=${this._onInspectionMemoChange}\n ?disabled=${this.mode === InspectionMode.VIEW}\n placeholder=\"검측사항을 입력하세요.\"\n />\n </td>\n </tr>\n </table>\n </div>\n\n <div class=\"document-footer\">\n <div class=\"attachment-section\">\n <div class=\"attachment-title\">첨부 파일</div>\n <div class=\"attachment-list\">\n <div class=\"attachment-item\">시공자의 검측 체크리스트</div>\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"attachment-item upload\">\n 실명부\n <md-outlined-button @click=${this._onNameListUpload.bind(this)}>\n ${this.checklist?.nameListAttachment ? '다시 업로드' : '업로드'}\n </md-outlined-button>\n ${this.checklist?.nameListAttachment ? html`<span>(업로드 완료)</span>` : ''}\n </div>\n `\n : this.checklist?.nameListAttachment\n ? html`<div class=\"attachment-item\">실명부</div>`\n : ''}\n ${attachmentCount > 0 ? html`<div class=\"attachment-item\">첨부 사진 ${attachmentCount}개</div>` : ''}\n </div>\n </div>\n\n <div class=\"signature-section\">\n <div class=\"signature-box\">\n <div class=\"signature-title\">공종별 시공 관리자</div>\n <div class=\"signature-name\">${this.checklist?.taskConstructor?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.taskConstructorSignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.taskConstructorSignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n <div class=\"signature-box\">\n <div class=\"signature-title\">총괄 시공 책임자</div>\n <div class=\"signature-name\">${this.checklist?.overallConstructor?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.overallConstructorSignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.overallConstructorSignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"button-container\">\n <md-elevated-button @click=${this._onConfirm}> 확인 </md-elevated-button>\n </div>\n `\n : ''}\n `\n }\n\n private _formatDate(date: Date): string {\n return `${date.getFullYear()}. ${String(date.getMonth() + 1).padStart(2, '0')}. ${String(date.getDate()).padStart(2, '0')}.`\n }\n\n private _onInspectionMemoChange(e: Event) {\n const target = e.target as HTMLInputElement\n this.checklist = { ...this.checklist, inspectionRequestMemo: target.value }\n\n // 부모 컴포넌트에 변경사항 전달\n this.dispatchEvent(\n new CustomEvent('inspection-memo-change', {\n detail: { inspectionRequestMemo: target.value },\n bubbles: true\n })\n )\n }\n\n // 실명부 업로드\n private _onNameListUpload() {\n const input = document.createElement('input')\n input.type = 'file'\n input.accept = '.pdf,.doc,.docx,.jpg,.jpeg,.png'\n input.onchange = (e: any) => {\n const file = e.target.files[0]\n if (file) {\n // checklist에 파일과 업로드 플래그 저장\n this.checklist = {\n ...this.checklist,\n nameListAttachment: file,\n isNameListAttachmentUploaded: true\n }\n\n // 부모 컴포넌트에 변경사항 알림\n this.dispatchEvent(new CustomEvent('name-list-file-selected', { detail: { file } }))\n this.requestUpdate()\n }\n }\n input.click()\n }\n\n // 확인 버튼\n private _onConfirm() {\n this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }))\n history.back()\n }\n}\n"]}
@@ -3,6 +3,7 @@ import '@material/web/icon/icon.js';
3
3
  import '@material/web/radio/radio.js';
4
4
  import '@material/web/textfield/outlined-text-field.js';
5
5
  import { LitElement } from 'lit';
6
+ import { InspectionMode } from './inspection-request-document';
6
7
  export declare enum InspectionResultStatus {
7
8
  PASS = "PASS",// 합격
8
9
  FAIL = "FAIL"
@@ -17,7 +18,9 @@ export declare class InspectionResultNotification extends LitElement {
17
18
  checklist: any;
18
19
  buildingInspection: any;
19
20
  project: any;
20
- render(): import("lit-html").TemplateResult<1>;
21
+ mode: InspectionMode;
22
+ render(): import("lit").TemplateResult<1>;
23
+ protected updated(): void;
21
24
  private _formatDate;
22
25
  private _getAttachmentCount;
23
26
  private _getOverallResult;
@@ -6,6 +6,7 @@ import '@material/web/textfield/outlined-text-field.js';
6
6
  import { css, html, LitElement } from 'lit';
7
7
  import { customElement, property } from 'lit/decorators.js';
8
8
  import { ScrollbarStyles } from '@operato/styles';
9
+ import { InspectionMode } from './inspection-request-document';
9
10
  export var InspectionResultStatus;
10
11
  (function (InspectionResultStatus) {
11
12
  InspectionResultStatus["PASS"] = "PASS";
@@ -23,33 +24,34 @@ let InspectionResultNotification = class InspectionResultNotification extends Li
23
24
  this.checklist = {};
24
25
  this.buildingInspection = {};
25
26
  this.project = {};
27
+ this.mode = InspectionMode.VIEW;
26
28
  }
27
29
  render() {
28
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
29
- const today = this._formatDate(new Date());
30
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
31
+ const headerDate = this._formatDate(new Date(((_a = this.checklist) === null || _a === void 0 ? void 0 : _a.inspectionResultUpdatedAt) || Date.now()));
30
32
  return html `
31
33
  <div class="document-container">
32
34
  <div class="document-header">
33
- <div class="document-title">검측결과통보</div>
35
+ <div class="document-title">검측 결과 통보</div>
34
36
  </div>
35
37
 
36
38
  <div class="document-body">
37
- <div class="date-section">${today}</div>
39
+ <div class="date-section">${headerDate}</div>
38
40
 
39
41
  <div class="recipient-section">
40
42
  <div class="recipient-item">
41
43
  <span class="recipient-label">문서 번호:</span>
42
- <span>${((_a = this.checklist) === null || _a === void 0 ? void 0 : _a.inspectionResultDocumentNo) || ''}</span>
44
+ <span>${((_b = this.checklist) === null || _b === void 0 ? void 0 : _b.inspectionResultDocumentNo) || ''}</span>
43
45
  </div>
44
46
  <div class="recipient-item">
45
47
  <span class="recipient-label">수신:</span>
46
- <span>${(_e = (_d = (_c = (_b = this.buildingInspection) === null || _b === void 0 ? void 0 : _b.buildingLevel) === null || _c === void 0 ? void 0 : _c.building) === null || _d === void 0 ? void 0 : _d.buildingComplex) === null || _e === void 0 ? void 0 : _e.constructionCompany}</span>
48
+ <span>${(_f = (_e = (_d = (_c = this.buildingInspection) === null || _c === void 0 ? void 0 : _c.buildingLevel) === null || _d === void 0 ? void 0 : _d.building) === null || _e === void 0 ? void 0 : _e.buildingComplex) === null || _f === void 0 ? void 0 : _f.constructionCompany}</span>
47
49
  </div>
48
50
  </div>
49
51
 
50
52
  <div class="content-section">
51
- 문서번호 ${((_f = this.checklist) === null || _f === void 0 ? void 0 : _f.inspectionRequestDocumentNo) || ''} 검측 요청한 건에 대하여
52
- ${this._formatDate(new Date((_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.requestDate))} 검측한 결과를 다음과 같이 통보합니다.
53
+ 문서번호 ${((_g = this.checklist) === null || _g === void 0 ? void 0 : _g.inspectionRequestDocumentNo) || ''} 검측 요청한 건에 대하여
54
+ ${this._formatDate(new Date((_h = this.buildingInspection) === null || _h === void 0 ? void 0 : _h.requestDate))} 검측한 결과를 다음과 같이 통보합니다.
53
55
  </div>
54
56
 
55
57
  <table class="request-table">
@@ -86,7 +88,8 @@ let InspectionResultNotification = class InspectionResultNotification extends Li
86
88
  <md-radio
87
89
  name="inspectionResultType"
88
90
  value="GENERAL"
89
- ?checked=${((_h = this.checklist) === null || _h === void 0 ? void 0 : _h.inspectionResultType) === InspectionResultType.GENERAL}
91
+ ?checked=${((_j = this.checklist) === null || _j === void 0 ? void 0 : _j.inspectionResultType) === InspectionResultType.GENERAL}
92
+ ?disabled=${this.mode === InspectionMode.VIEW}
90
93
  @change=${this._onInspectionTypeChange}
91
94
  ></md-radio>
92
95
  <span>일반</span>
@@ -95,7 +98,8 @@ let InspectionResultNotification = class InspectionResultNotification extends Li
95
98
  <md-radio
96
99
  name="inspectionResultType"
97
100
  value="FOCUS"
98
- ?checked=${((_j = this.checklist) === null || _j === void 0 ? void 0 : _j.inspectionResultType) === InspectionResultType.FOCUS}
101
+ ?checked=${((_k = this.checklist) === null || _k === void 0 ? void 0 : _k.inspectionResultType) === InspectionResultType.FOCUS}
102
+ ?disabled=${this.mode === InspectionMode.VIEW}
99
103
  @change=${this._onInspectionTypeChange}
100
104
  ></md-radio>
101
105
  <span>중점</span>
@@ -104,7 +108,8 @@ let InspectionResultNotification = class InspectionResultNotification extends Li
104
108
  <md-radio
105
109
  name="inspectionResultType"
106
110
  value="CONCEALED_WORK"
107
- ?checked=${((_k = this.checklist) === null || _k === void 0 ? void 0 : _k.inspectionResultType) === InspectionResultType.CONCEALED_WORK}
111
+ ?checked=${((_l = this.checklist) === null || _l === void 0 ? void 0 : _l.inspectionResultType) === InspectionResultType.CONCEALED_WORK}
112
+ ?disabled=${this.mode === InspectionMode.VIEW}
108
113
  @change=${this._onInspectionTypeChange}
109
114
  ></md-radio>
110
115
  <span>매몰부위</span>
@@ -118,7 +123,8 @@ let InspectionResultNotification = class InspectionResultNotification extends Li
118
123
  <input
119
124
  type="text"
120
125
  class="instructions-field"
121
- .value=${((_l = this.checklist) === null || _l === void 0 ? void 0 : _l.inspectionResultMemo) || ''}
126
+ .value=${((_m = this.checklist) === null || _m === void 0 ? void 0 : _m.inspectionResultMemo) || ''}
127
+ ?disabled=${this.mode === InspectionMode.VIEW}
122
128
  @input=${this._onInstructionsChange}
123
129
  placeholder="지시 사항을 입력하세요."
124
130
  />
@@ -140,18 +146,18 @@ let InspectionResultNotification = class InspectionResultNotification extends Li
140
146
  <div class="signature-section">
141
147
  <div class="signature-box">
142
148
  <div class="signature-title">공종별 감리 책임자</div>
143
- <div class="signature-name">${(_o = (_m = this.checklist) === null || _m === void 0 ? void 0 : _m.taskSupervisory) === null || _o === void 0 ? void 0 : _o.name}</div>
149
+ <div class="signature-name">${(_p = (_o = this.checklist) === null || _o === void 0 ? void 0 : _o.taskSupervisory) === null || _p === void 0 ? void 0 : _p.name}</div>
144
150
  <div class="signature-container">
145
- ${((_p = this.checklist) === null || _p === void 0 ? void 0 : _p.taskSupervisorySignature)
151
+ ${((_q = this.checklist) === null || _q === void 0 ? void 0 : _q.taskSupervisorySignature)
146
152
  ? html `<img class="signature-image" src="${this.checklist.taskSupervisorySignature}" alt="서명" />`
147
153
  : ''}
148
154
  </div>
149
155
  </div>
150
156
  <div class="signature-box">
151
157
  <div class="signature-title">총괄 감리 책임자</div>
152
- <div class="signature-name">${(_r = (_q = this.checklist) === null || _q === void 0 ? void 0 : _q.overallSupervisory) === null || _r === void 0 ? void 0 : _r.name}</div>
158
+ <div class="signature-name">${(_s = (_r = this.checklist) === null || _r === void 0 ? void 0 : _r.overallSupervisory) === null || _s === void 0 ? void 0 : _s.name}</div>
153
159
  <div class="signature-container">
154
- ${((_s = this.checklist) === null || _s === void 0 ? void 0 : _s.overallSupervisorySignature)
160
+ ${((_t = this.checklist) === null || _t === void 0 ? void 0 : _t.overallSupervisorySignature)
155
161
  ? html `<img class="signature-image" src="${this.checklist.overallSupervisorySignature}" alt="서명" />`
156
162
  : ''}
157
163
  </div>
@@ -161,11 +167,25 @@ let InspectionResultNotification = class InspectionResultNotification extends Li
161
167
  </div>
162
168
  </div>
163
169
 
164
- <div class="button-container">
165
- <md-elevated-button @click=${this._onConfirm}> 확인 </md-elevated-button>
166
- </div>
170
+ ${this.mode === InspectionMode.EDIT
171
+ ? html `
172
+ <div class="button-container">
173
+ <md-elevated-button @click=${this._onConfirm}> 확인 </md-elevated-button>
174
+ </div>
175
+ `
176
+ : ''}
167
177
  `;
168
178
  }
179
+ updated() {
180
+ var _a;
181
+ const overall = this._getOverallResult();
182
+ if (((_a = this.checklist) === null || _a === void 0 ? void 0 : _a.inspectionResultStatus) !== overall) {
183
+ this.dispatchEvent(new CustomEvent('inspection-result-change', {
184
+ detail: { inspectionResultStatus: overall },
185
+ bubbles: true
186
+ }));
187
+ }
188
+ }
169
189
  _formatDate(date) {
170
190
  return `${date.getFullYear()}. ${String(date.getMonth() + 1).padStart(2, '0')}. ${String(date.getDate()).padStart(2, '0')}.`;
171
191
  }
@@ -198,8 +218,10 @@ let InspectionResultNotification = class InspectionResultNotification extends Li
198
218
  bubbles: true
199
219
  }));
200
220
  }
221
+ // 확인 버튼
201
222
  _onConfirm() {
202
223
  this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }));
224
+ history.back();
203
225
  }
204
226
  };
205
227
  InspectionResultNotification.styles = [
@@ -446,6 +468,10 @@ __decorate([
446
468
  property({ type: Object }),
447
469
  __metadata("design:type", Object)
448
470
  ], InspectionResultNotification.prototype, "project", void 0);
471
+ __decorate([
472
+ property({ type: String }),
473
+ __metadata("design:type", String)
474
+ ], InspectionResultNotification.prototype, "mode", void 0);
449
475
  InspectionResultNotification = __decorate([
450
476
  customElement('inspection-result-notification')
451
477
  ], InspectionResultNotification);
@@ -1 +1 @@
1
- {"version":3,"file":"inspection-result-notification.js","sourceRoot":"","sources":["../../../../../client/pages/building-inspection/component/inspection-document/inspection-result-notification.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AACrC,OAAO,gDAAgD,CAAA;AAEvD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IACh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AC,aAAa,CAChB,IAAI,WAAW,CAAC,qBAAqB,EAAE;YACrC,MAAM,EAAE,EAAE,oBAAoB,EAAE,MAAM,CAAC,KAAK,EAAE;YAC9C,OAAO,EAAE,IAAI;SACd,CAAC,CACH,CAAA;IACH,CAAC;IAEO,UAAU;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACvE,CAAC;;AA7aM,mCAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoOF;CACF,AAvOY,CAuOZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+DAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wEAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6DAAkB;AA5OlC,4BAA4B;IADxC,aAAa,CAAC,gCAAgC,CAAC;GACnC,4BAA4B,CA+axC","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/icon/icon.js'\nimport '@material/web/radio/radio.js'\nimport '@material/web/textfield/outlined-text-field.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { ScrollbarStyles } from '@operato/styles'\n\nexport enum InspectionResultStatus {\n PASS = 'PASS', // 합격\n FAIL = 'FAIL' // 불합격\n}\n\nexport enum InspectionResultType {\n GENERAL = 'GENERAL', // 일반\n FOCUS = 'FOCUS', // 중점\n CONCEALED_WORK = 'CONCEALED_WORK' // 매몰부위\n}\n\n@customElement('inspection-result-notification')\nexport class InspectionResultNotification extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: block;\n padding: 20px;\n font-family: 'Noto Sans KR', sans-serif;\n line-height: 1.4;\n overflow-y: auto;\n }\n\n .document-container {\n max-width: 800px;\n margin: 0 auto;\n background: white;\n border: 2px solid #333;\n }\n\n .document-header {\n text-align: center;\n padding: 15px;\n border-bottom: 1px solid #333;\n }\n\n .document-title {\n font-size: 18px;\n font-weight: bold;\n margin-bottom: 10px;\n }\n\n .document-body {\n padding: 20px;\n }\n\n .date-section {\n text-align: right;\n margin-bottom: 20px;\n font-size: 14px;\n }\n\n .recipient-section {\n margin-bottom: 30px;\n }\n\n .recipient-item {\n display: flex;\n margin-bottom: 5px;\n }\n\n .recipient-label {\n font-weight: bold;\n margin-right: 18px;\n }\n\n .content-section {\n margin-bottom: 20px;\n line-height: 1.6;\n }\n\n .request-table {\n width: 100%;\n border-collapse: collapse;\n margin-bottom: 20px;\n }\n\n .request-table th,\n .request-table td {\n border: 1px solid #333;\n padding: 8px;\n text-align: left;\n }\n\n .request-table th {\n background-color: #f5f5f5;\n font-weight: bold;\n width: 120px;\n }\n\n .radio-group {\n display: flex;\n gap: 20px;\n align-items: center;\n }\n\n .radio-item {\n display: flex;\n align-items: center;\n gap: 5px;\n }\n\n .signature-section {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 15px;\n }\n\n .signature-box {\n display: flex;\n align-items: center;\n gap: 15px;\n text-align: right;\n }\n\n .signature-title {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n min-width: 120px;\n }\n\n .signature-name {\n font-size: 14px;\n color: #333;\n }\n\n .signature-container {\n position: relative;\n min-width: 100px;\n min-height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .signature-container::after {\n content: '(인)';\n position: absolute;\n bottom: 5px;\n right: 5px;\n font-size: 12px;\n color: #333;\n font-weight: bold;\n z-index: 2;\n }\n\n .signature-image {\n max-width: 140px;\n max-height: 60px;\n width: auto;\n height: auto;\n }\n\n .attachment-section {\n margin-top: 30px;\n margin-bottom: 30px;\n }\n\n .attachment-title {\n font-weight: bold;\n font-size: 14px;\n color: #333;\n margin-bottom: 10px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .attachment-list {\n margin-left: 30px;\n }\n\n .attachment-item {\n margin-bottom: 5px;\n color: #2196f3;\n font-size: 14px;\n line-height: 1.5;\n }\n\n .instructions-field {\n width: 100%;\n max-width: -webkit-fill-available;\n height: 40px;\n border: 1px solid #ddd;\n padding: 10px;\n font-size: 15px;\n border-radius: 5px;\n }\n\n .document-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .signature-container::after {\n content: '(인)';\n position: absolute;\n bottom: 5px;\n right: 5px;\n font-size: 12px;\n color: #333;\n font-weight: bold;\n z-index: 2;\n }\n\n .signature-line {\n border-bottom: 1px solid #333;\n height: 60px;\n margin-bottom: 5px;\n position: relative;\n min-width: 100px;\n }\n\n .signature-label {\n font-size: 12px;\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n padding: 15px 0;\n border-top: 1px solid #ddd;\n }\n\n .button-container md-elevated-button {\n background-color: #3498db;\n color: white;\n padding: 12px 30px;\n font-size: 16px;\n font-weight: bold;\n border-radius: 8px;\n }\n\n .document-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n `\n ]\n\n @property({ type: Object }) checklist: any = {}\n @property({ type: Object }) buildingInspection: any = {}\n @property({ type: Object }) project: any = {}\n\n render() {\n const today = this._formatDate(new Date())\n\n return html`\n <div class=\"document-container\">\n <div class=\"document-header\">\n <div class=\"document-title\">검측결과통보</div>\n </div>\n\n <div class=\"document-body\">\n <div class=\"date-section\">${today}</div>\n\n <div class=\"recipient-section\">\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">문서 번호:</span>\n <span>${this.checklist?.inspectionResultDocumentNo || ''}</span>\n </div>\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">수신:</span>\n <span>${this.buildingInspection?.buildingLevel?.building?.buildingComplex?.constructionCompany}</span>\n </div>\n </div>\n\n <div class=\"content-section\">\n 문서번호 ${this.checklist?.inspectionRequestDocumentNo || ''} 검측 요청한 건에 대하여\n ${this._formatDate(new Date(this.buildingInspection?.requestDate))} 검측한 결과를 다음과 같이 통보합니다.\n </div>\n\n <table class=\"request-table\">\n <tr>\n <th>검측 결과</th>\n <td>\n <div class=\"radio-group\">\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultStatus\"\n value=\"PASS\"\n ?checked=${this._getOverallResult() === InspectionResultStatus.PASS}\n disabled\n ></md-radio>\n <span>합격</span>\n </div>\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultStatus\"\n value=\"FAIL\"\n ?checked=${this._getOverallResult() === InspectionResultStatus.FAIL}\n disabled\n ></md-radio>\n <span>불합격</span>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <th>검측 종류</th>\n <td>\n <div class=\"radio-group\">\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultType\"\n value=\"GENERAL\"\n ?checked=${this.checklist?.inspectionResultType === InspectionResultType.GENERAL}\n @change=${this._onInspectionTypeChange}\n ></md-radio>\n <span>일반</span>\n </div>\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultType\"\n value=\"FOCUS\"\n ?checked=${this.checklist?.inspectionResultType === InspectionResultType.FOCUS}\n @change=${this._onInspectionTypeChange}\n ></md-radio>\n <span>중점</span>\n </div>\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultType\"\n value=\"CONCEALED_WORK\"\n ?checked=${this.checklist?.inspectionResultType === InspectionResultType.CONCEALED_WORK}\n @change=${this._onInspectionTypeChange}\n ></md-radio>\n <span>매몰부위</span>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <th>지시 사항</th>\n <td>\n <input\n type=\"text\"\n class=\"instructions-field\"\n .value=${this.checklist?.inspectionResultMemo || ''}\n @input=${this._onInstructionsChange}\n placeholder=\"지시 사항을 입력하세요.\"\n />\n </td>\n </tr>\n </table>\n\n <div class=\"document-footer\">\n <div class=\"attachment-section\">\n <div class=\"attachment-title\">첨부 파일</div>\n <div class=\"attachment-list\">\n <div class=\"attachment-item\">시공자의 검측 체크리스트</div>\n ${this._getAttachmentCount() > 0\n ? html`<div class=\"attachment-item\">첨부 사진 ${this._getAttachmentCount()}개</div>`\n : ''}\n </div>\n </div>\n\n <div class=\"signature-section\">\n <div class=\"signature-box\">\n <div class=\"signature-title\">공종별 감리 책임자</div>\n <div class=\"signature-name\">${this.checklist?.taskSupervisory?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.taskSupervisorySignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.taskSupervisorySignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n <div class=\"signature-box\">\n <div class=\"signature-title\">총괄 감리 책임자</div>\n <div class=\"signature-name\">${this.checklist?.overallSupervisory?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.overallSupervisorySignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.overallSupervisorySignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"button-container\">\n <md-elevated-button @click=${this._onConfirm}> 확인 </md-elevated-button>\n </div>\n `\n }\n\n private _formatDate(date: Date): string {\n return `${date.getFullYear()}. ${String(date.getMonth() + 1).padStart(2, '0')}. ${String(date.getDate()).padStart(2, '0')}.`\n }\n\n private _getAttachmentCount(): number {\n return (\n this.buildingInspection?.checklist?.checklistItems?.reduce((acc, item) => {\n return acc + item.checklistItemAttachmentCount\n }, 0) || 0\n )\n }\n\n private _getOverallResult(): string {\n const hasFailedItems = this.checklist?.checklistItems?.some(item => item.supervisoryConfirmStatus === 'F')\n return hasFailedItems ? InspectionResultStatus.FAIL : InspectionResultStatus.PASS\n }\n\n private _onInspectionTypeChange(e: Event) {\n const target = e.target as any\n this.checklist = {\n ...this.checklist,\n inspectionResultType: target.value\n }\n this.requestUpdate()\n this.dispatchEvent(\n new CustomEvent('inspection-type-change', {\n detail: { inspectionResultType: target.value },\n bubbles: true\n })\n )\n }\n\n private _onInstructionsChange(e: Event) {\n const target = e.target as HTMLInputElement\n this.checklist = {\n ...this.checklist,\n inspectionResultMemo: target.value\n }\n this.requestUpdate()\n this.dispatchEvent(\n new CustomEvent('instructions-change', {\n detail: { inspectionResultMemo: target.value },\n bubbles: true\n })\n )\n }\n\n private _onConfirm() {\n this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }))\n }\n}\n"]}
1
+ {"version":3,"file":"inspection-result-notification.js","sourceRoot":"","sources":["../../../../../client/pages/building-inspection/component/inspection-document/inspection-result-notification.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AACrC,OAAO,gDAAgD,CAAA;AAEvD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAE9D,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,uCAAa,CAAA;IACb,uCAAa,CAAA,CAAC,MAAM;AACtB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAED,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,yDAAiC,CAAA,CAAC,OAAO;AAC3C,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAGM,IAAM,4BAA4B,GAAl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;;+DAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wEAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6DAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DAA2C;AA7O3D,4BAA4B;IADxC,aAAa,CAAC,gCAAgC,CAAC;GACnC,4BAA4B,CAscxC","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/icon/icon.js'\nimport '@material/web/radio/radio.js'\nimport '@material/web/textfield/outlined-text-field.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { InspectionMode } from './inspection-request-document'\n\nexport enum InspectionResultStatus {\n PASS = 'PASS', // 합격\n FAIL = 'FAIL' // 불합격\n}\n\nexport enum InspectionResultType {\n GENERAL = 'GENERAL', // 일반\n FOCUS = 'FOCUS', // 중점\n CONCEALED_WORK = 'CONCEALED_WORK' // 매몰부위\n}\n\n@customElement('inspection-result-notification')\nexport class InspectionResultNotification extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: block;\n padding: 20px;\n font-family: 'Noto Sans KR', sans-serif;\n line-height: 1.4;\n overflow-y: auto;\n }\n\n .document-container {\n max-width: 800px;\n margin: 0 auto;\n background: white;\n border: 2px solid #333;\n }\n\n .document-header {\n text-align: center;\n padding: 15px;\n border-bottom: 1px solid #333;\n }\n\n .document-title {\n font-size: 18px;\n font-weight: bold;\n margin-bottom: 10px;\n }\n\n .document-body {\n padding: 20px;\n }\n\n .date-section {\n text-align: right;\n margin-bottom: 20px;\n font-size: 14px;\n }\n\n .recipient-section {\n margin-bottom: 30px;\n }\n\n .recipient-item {\n display: flex;\n margin-bottom: 5px;\n }\n\n .recipient-label {\n font-weight: bold;\n margin-right: 18px;\n }\n\n .content-section {\n margin-bottom: 20px;\n line-height: 1.6;\n }\n\n .request-table {\n width: 100%;\n border-collapse: collapse;\n margin-bottom: 20px;\n }\n\n .request-table th,\n .request-table td {\n border: 1px solid #333;\n padding: 8px;\n text-align: left;\n }\n\n .request-table th {\n background-color: #f5f5f5;\n font-weight: bold;\n width: 120px;\n }\n\n .radio-group {\n display: flex;\n gap: 20px;\n align-items: center;\n }\n\n .radio-item {\n display: flex;\n align-items: center;\n gap: 5px;\n }\n\n .signature-section {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 15px;\n }\n\n .signature-box {\n display: flex;\n align-items: center;\n gap: 15px;\n text-align: right;\n }\n\n .signature-title {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n min-width: 120px;\n }\n\n .signature-name {\n font-size: 14px;\n color: #333;\n }\n\n .signature-container {\n position: relative;\n min-width: 100px;\n min-height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .signature-container::after {\n content: '(인)';\n position: absolute;\n bottom: 5px;\n right: 5px;\n font-size: 12px;\n color: #333;\n font-weight: bold;\n z-index: 2;\n }\n\n .signature-image {\n max-width: 140px;\n max-height: 60px;\n width: auto;\n height: auto;\n }\n\n .attachment-section {\n margin-top: 30px;\n margin-bottom: 30px;\n }\n\n .attachment-title {\n font-weight: bold;\n font-size: 14px;\n color: #333;\n margin-bottom: 10px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .attachment-list {\n margin-left: 30px;\n }\n\n .attachment-item {\n margin-bottom: 5px;\n color: #2196f3;\n font-size: 14px;\n line-height: 1.5;\n }\n\n .instructions-field {\n width: 100%;\n max-width: -webkit-fill-available;\n height: 40px;\n border: 1px solid #ddd;\n padding: 10px;\n font-size: 15px;\n border-radius: 5px;\n }\n\n .document-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .signature-container::after {\n content: '(인)';\n position: absolute;\n bottom: 5px;\n right: 5px;\n font-size: 12px;\n color: #333;\n font-weight: bold;\n z-index: 2;\n }\n\n .signature-line {\n border-bottom: 1px solid #333;\n height: 60px;\n margin-bottom: 5px;\n position: relative;\n min-width: 100px;\n }\n\n .signature-label {\n font-size: 12px;\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n padding: 15px 0;\n border-top: 1px solid #ddd;\n }\n\n .button-container md-elevated-button {\n background-color: #3498db;\n color: white;\n padding: 12px 30px;\n font-size: 16px;\n font-weight: bold;\n border-radius: 8px;\n }\n\n .document-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n `\n ]\n\n @property({ type: Object }) checklist: any = {}\n @property({ type: Object }) buildingInspection: any = {}\n @property({ type: Object }) project: any = {}\n @property({ type: String }) mode: InspectionMode = InspectionMode.VIEW\n\n render() {\n const headerDate = this._formatDate(new Date(this.checklist?.inspectionResultUpdatedAt || Date.now()))\n\n return html`\n <div class=\"document-container\">\n <div class=\"document-header\">\n <div class=\"document-title\">검측 결과 통보</div>\n </div>\n\n <div class=\"document-body\">\n <div class=\"date-section\">${headerDate}</div>\n\n <div class=\"recipient-section\">\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">문서 번호:</span>\n <span>${this.checklist?.inspectionResultDocumentNo || ''}</span>\n </div>\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">수신:</span>\n <span>${this.buildingInspection?.buildingLevel?.building?.buildingComplex?.constructionCompany}</span>\n </div>\n </div>\n\n <div class=\"content-section\">\n 문서번호 ${this.checklist?.inspectionRequestDocumentNo || ''} 검측 요청한 건에 대하여\n ${this._formatDate(new Date(this.buildingInspection?.requestDate))} 검측한 결과를 다음과 같이 통보합니다.\n </div>\n\n <table class=\"request-table\">\n <tr>\n <th>검측 결과</th>\n <td>\n <div class=\"radio-group\">\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultStatus\"\n value=\"PASS\"\n ?checked=${this._getOverallResult() === InspectionResultStatus.PASS}\n disabled\n ></md-radio>\n <span>합격</span>\n </div>\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultStatus\"\n value=\"FAIL\"\n ?checked=${this._getOverallResult() === InspectionResultStatus.FAIL}\n disabled\n ></md-radio>\n <span>불합격</span>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <th>검측 종류</th>\n <td>\n <div class=\"radio-group\">\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultType\"\n value=\"GENERAL\"\n ?checked=${this.checklist?.inspectionResultType === InspectionResultType.GENERAL}\n ?disabled=${this.mode === InspectionMode.VIEW}\n @change=${this._onInspectionTypeChange}\n ></md-radio>\n <span>일반</span>\n </div>\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultType\"\n value=\"FOCUS\"\n ?checked=${this.checklist?.inspectionResultType === InspectionResultType.FOCUS}\n ?disabled=${this.mode === InspectionMode.VIEW}\n @change=${this._onInspectionTypeChange}\n ></md-radio>\n <span>중점</span>\n </div>\n <div class=\"radio-item\">\n <md-radio\n name=\"inspectionResultType\"\n value=\"CONCEALED_WORK\"\n ?checked=${this.checklist?.inspectionResultType === InspectionResultType.CONCEALED_WORK}\n ?disabled=${this.mode === InspectionMode.VIEW}\n @change=${this._onInspectionTypeChange}\n ></md-radio>\n <span>매몰부위</span>\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <th>지시 사항</th>\n <td>\n <input\n type=\"text\"\n class=\"instructions-field\"\n .value=${this.checklist?.inspectionResultMemo || ''}\n ?disabled=${this.mode === InspectionMode.VIEW}\n @input=${this._onInstructionsChange}\n placeholder=\"지시 사항을 입력하세요.\"\n />\n </td>\n </tr>\n </table>\n\n <div class=\"document-footer\">\n <div class=\"attachment-section\">\n <div class=\"attachment-title\">첨부 파일</div>\n <div class=\"attachment-list\">\n <div class=\"attachment-item\">시공자의 검측 체크리스트</div>\n ${this._getAttachmentCount() > 0\n ? html`<div class=\"attachment-item\">첨부 사진 ${this._getAttachmentCount()}개</div>`\n : ''}\n </div>\n </div>\n\n <div class=\"signature-section\">\n <div class=\"signature-box\">\n <div class=\"signature-title\">공종별 감리 책임자</div>\n <div class=\"signature-name\">${this.checklist?.taskSupervisory?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.taskSupervisorySignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.taskSupervisorySignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n <div class=\"signature-box\">\n <div class=\"signature-title\">총괄 감리 책임자</div>\n <div class=\"signature-name\">${this.checklist?.overallSupervisory?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.overallSupervisorySignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.overallSupervisorySignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"button-container\">\n <md-elevated-button @click=${this._onConfirm}> 확인 </md-elevated-button>\n </div>\n `\n : ''}\n `\n }\n\n protected updated() {\n const overall = this._getOverallResult()\n if (this.checklist?.inspectionResultStatus !== overall) {\n this.dispatchEvent(\n new CustomEvent('inspection-result-change', {\n detail: { inspectionResultStatus: overall },\n bubbles: true\n })\n )\n }\n }\n\n private _formatDate(date: Date): string {\n return `${date.getFullYear()}. ${String(date.getMonth() + 1).padStart(2, '0')}. ${String(date.getDate()).padStart(2, '0')}.`\n }\n\n private _getAttachmentCount(): number {\n return (\n this.buildingInspection?.checklist?.checklistItems?.reduce((acc, item) => {\n return acc + item.checklistItemAttachmentCount\n }, 0) || 0\n )\n }\n\n private _getOverallResult(): string {\n const hasFailedItems = this.checklist?.checklistItems?.some(item => item.supervisoryConfirmStatus === 'F')\n return hasFailedItems ? InspectionResultStatus.FAIL : InspectionResultStatus.PASS\n }\n\n private _onInspectionTypeChange(e: Event) {\n const target = e.target as any\n this.checklist = {\n ...this.checklist,\n inspectionResultType: target.value\n }\n this.requestUpdate()\n this.dispatchEvent(\n new CustomEvent('inspection-type-change', {\n detail: { inspectionResultType: target.value },\n bubbles: true\n })\n )\n }\n\n private _onInstructionsChange(e: Event) {\n const target = e.target as HTMLInputElement\n this.checklist = {\n ...this.checklist,\n inspectionResultMemo: target.value\n }\n this.requestUpdate()\n this.dispatchEvent(\n new CustomEvent('instructions-change', {\n detail: { inspectionResultMemo: target.value },\n bubbles: true\n })\n )\n }\n\n // 확인 버튼\n private _onConfirm() {\n this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }))\n history.back()\n }\n}\n"]}
@@ -14,7 +14,7 @@ export declare class PhotoAlbumPopup extends LitElement {
14
14
  activeTab: PhotoTab;
15
15
  constructorFiles: any[];
16
16
  supervisorFiles: any[];
17
- render(): import("lit-html").TemplateResult<1>;
17
+ render(): import("lit").TemplateResult<1>;
18
18
  firstUpdated(): Promise<void>;
19
19
  private _loadPhotos;
20
20
  private _isImageFile;
@@ -1,7 +1,8 @@
1
1
  import { BizEvent, CALENDAR, EventProvider } from '@operato/event-view';
2
2
  export declare class InspectionEventProvider implements EventProvider {
3
3
  buildingLevelId: {};
4
- constructor(buildingLevelId?: string);
4
+ projectId: string;
5
+ constructor(buildingLevelId?: string, projectId?: string);
5
6
  fetchEventsForCalendar(calendar: CALENDAR): Promise<Map<Date, BizEvent[]>>;
6
7
  private getCalendarTemplate;
7
8
  }
@@ -1,19 +1,27 @@
1
1
  import { html } from 'lit';
2
2
  import gql from 'graphql-tag';
3
3
  import { client } from '@operato/graphql';
4
+ import moment from 'moment-timezone';
4
5
  export class InspectionEventProvider {
5
- constructor(buildingLevelId = '') {
6
+ constructor(buildingLevelId = '', projectId = '') {
6
7
  this.buildingLevelId = {};
8
+ this.projectId = '';
7
9
  this.buildingLevelId = buildingLevelId;
10
+ this.projectId = projectId;
8
11
  }
9
12
  async fetchEventsForCalendar(calendar) {
10
- var _a;
13
+ var _a, _b;
11
14
  const result = new Map();
12
- const startDate = calendar[0]['date'].toISOString().split('T')[0];
13
- const endDate = calendar[calendar.length - 1]['date'].toISOString().split('T')[0];
15
+ const startDate = moment(calendar[0]['date']).format('YYYY-MM-DD');
16
+ const endDate = moment(calendar[calendar.length - 1]['date']).format('YYYY-MM-DD');
14
17
  const response = await client.query({
15
18
  query: gql `
16
- query BuildingInspectionDateSummaryOfLevelAndPeriod($buildingLevelId: String!, $startDate: String!, $endDate: String!) {
19
+ query BuildingInspectionDateSummaryOfLevelAndPeriod(
20
+ $buildingLevelId: String!
21
+ $startDate: String!
22
+ $endDate: String!
23
+ $projectId: String!
24
+ ) {
17
25
  buildingInspectionDateSummaryOfLevelAndPeriod(
18
26
  buildingLevelId: $buildingLevelId
19
27
  startDate: $startDate
@@ -25,30 +33,44 @@ export class InspectionEventProvider {
25
33
  pass
26
34
  fail
27
35
  }
36
+ dailyWorklogDatesOfProject(projectId: $projectId, startDate: $startDate, endDate: $endDate) {
37
+ id
38
+ date
39
+ }
28
40
  }
29
41
  `,
30
42
  variables: {
31
43
  buildingLevelId: this.buildingLevelId,
44
+ projectId: this.projectId,
32
45
  startDate,
33
46
  endDate
34
47
  }
35
48
  });
36
- // if (response.errors) return null
37
49
  const calendarData = this.getCalendarTemplate((_a = response.data) === null || _a === void 0 ? void 0 : _a.buildingInspectionDateSummaryOfLevelAndPeriod);
50
+ const worklogDates = ((_b = response.data) === null || _b === void 0 ? void 0 : _b.dailyWorklogDatesOfProject.map(v => v.date)) || [];
51
+ const worklogSet = new Set(worklogDates);
38
52
  calendar.forEach(({ date }) => {
39
53
  const formattedDate = date.toLocaleDateString('en-CA'); // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.
40
54
  const template = calendarData[formattedDate];
41
- if (!template)
42
- return;
43
- result.set(date, [
44
- {
45
- due: formattedDate,
46
- template: template,
47
- title: '',
48
- color: '',
49
- clickEvent: e => console.log('e :', e, template)
50
- }
51
- ]);
55
+ const hasWorklog = worklogSet.has(formattedDate);
56
+ if (template || hasWorklog) {
57
+ result.set(date, [
58
+ {
59
+ due: formattedDate,
60
+ template: html `
61
+ <div style="display:grid;grid-template-columns:repeat(2,1fr);padding-inline:7px;align-items:center;gap:4px;">
62
+ ${template || html ``}
63
+ ${hasWorklog
64
+ ? html `<div style="justify-self:end"><md-icon style="color:#008000;">description</md-icon></div>`
65
+ : html ``}
66
+ </div>
67
+ `,
68
+ title: '',
69
+ color: '',
70
+ clickEvent: e => console.log('calendar click', formattedDate)
71
+ }
72
+ ]);
73
+ }
52
74
  });
53
75
  return result;
54
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"inspection-event-provider.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/inspection-event-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,MAAM,OAAO,uBAAuB;IAGlC,YAAY,kBAA0B,EAAE;QAFxC,oBAAe,GAAG,EAAE,CAAA;QAGlB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;IACxC,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,QAAkB;;QAC7C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAA;QAC1C,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACjE,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAEjF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;OAcT;YACD,SAAS,EAAE;gBACT,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,SAAS;gBACT,OAAO;aACR;SACF,CAAC,CAAA;QAEF,mCAAmC;QAEnC,MAAM,YAAY,GAAG,IAAI,CA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,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;;OAEjH,CAAA;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF","sourcesContent":["import { BizEvent, CALENDAR, EventProvider } from '@operato/event-view'\nimport { html, TemplateResult } from 'lit'\nimport gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\n\nexport class InspectionEventProvider implements EventProvider {\n buildingLevelId = {}\n\n constructor(buildingLevelId: string = '') {\n this.buildingLevelId = buildingLevelId\n }\n\n async fetchEventsForCalendar(calendar: CALENDAR): Promise<Map<Date, BizEvent[]>> {\n const result = new Map<Date, BizEvent[]>()\n const startDate = calendar[0]['date'].toISOString().split('T')[0]\n const endDate = calendar[calendar.length - 1]['date'].toISOString().split('T')[0]\n\n const response = await client.query({\n query: gql`\n query BuildingInspectionDateSummaryOfLevelAndPeriod($buildingLevelId: String!, $startDate: String!, $endDate: String!) {\n buildingInspectionDateSummaryOfLevelAndPeriod(\n buildingLevelId: $buildingLevelId\n startDate: $startDate\n endDate: $endDate\n ) {\n requestDate\n wait\n request\n pass\n fail\n }\n }\n `,\n variables: {\n buildingLevelId: this.buildingLevelId,\n startDate,\n endDate\n }\n })\n\n // if (response.errors) return null\n\n const calendarData = this.getCalendarTemplate(response.data?.buildingInspectionDateSummaryOfLevelAndPeriod)\n\n calendar.forEach(({ date }) => {\n const formattedDate = date.toLocaleDateString('en-CA') // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.\n const template = calendarData[formattedDate]\n\n if (!template) return\n\n result.set(date, [\n {\n due: formattedDate,\n template: template,\n title: '',\n color: '',\n clickEvent: e => console.log('e :', e, template)\n }\n ])\n })\n\n return result\n }\n\n // 검측 개수가 있는 데이터들만 날짜별로 템플릿 만들기\n private getCalendarTemplate(inspectionData: any[] = []): { [date: string]: TemplateResult } {\n const template = {}\n for (let date of inspectionData) {\n template[date.requestDate] = html`\n <div style=\"display: grid; grid-template-columns: repeat(2, 1fr); padding-inline: 7px;\">\n ${date.wait !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #4e5055\">●</span> ${date.wait}</div>` : ''}\n ${date.request !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #3395f1\">●</span> ${date.request}</div>` : ''}\n ${date.pass !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #1bb401\">●</span> ${date.pass}</div>` : ''}\n ${date.fail !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #ff4444\">●</span> ${date.fail}</div>` : ''}\n </div>\n `\n }\n\n return template\n }\n}\n"]}
1
+ {"version":3,"file":"inspection-event-provider.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/inspection-event-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,OAAO,uBAAuB;IAIlC,YAAY,kBAA0B,EAAE,EAAE,YAAoB,EAAE;QAHhE,oBAAe,GAAG,EAAE,CAAA;QACpB,cAAS,GAAW,EAAE,CAAA;QAGpB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,QAAkB;;QAC7C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAA;QAC1C,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;QAClE,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CA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wBACT,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,aAAa,CAAC;qBAC9D;iBACF,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;IAED,+BAA+B;IACvB,mBAAmB,CAAC,iBAAwB,EAAE;QACpD,MAAM,QAAQ,GAAG,EAAE,CAAA;QACnB,KAAK,IAAI,IAAI,IAAI,cAAc,EAAE,CAAC;YAChC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAA;;YAE3B,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5G,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE;YAClH,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5G,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;;OAEjH,CAAA;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF","sourcesContent":["import { BizEvent, CALENDAR, EventProvider } from '@operato/event-view'\nimport { html, TemplateResult } from 'lit'\nimport gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\nimport moment from 'moment-timezone'\n\nexport class InspectionEventProvider implements EventProvider {\n buildingLevelId = {}\n projectId: string = ''\n\n constructor(buildingLevelId: string = '', projectId: string = '') {\n this.buildingLevelId = buildingLevelId\n this.projectId = projectId\n }\n\n async fetchEventsForCalendar(calendar: CALENDAR): Promise<Map<Date, BizEvent[]>> {\n const result = new Map<Date, BizEvent[]>()\n const startDate = moment(calendar[0]['date']).format('YYYY-MM-DD')\n const endDate = moment(calendar[calendar.length - 1]['date']).format('YYYY-MM-DD')\n\n const response = await client.query({\n query: gql`\n query BuildingInspectionDateSummaryOfLevelAndPeriod(\n $buildingLevelId: String!\n $startDate: String!\n $endDate: String!\n $projectId: String!\n ) {\n buildingInspectionDateSummaryOfLevelAndPeriod(\n buildingLevelId: $buildingLevelId\n startDate: $startDate\n endDate: $endDate\n ) {\n requestDate\n wait\n request\n pass\n fail\n }\n dailyWorklogDatesOfProject(projectId: $projectId, startDate: $startDate, endDate: $endDate) {\n id\n date\n }\n }\n `,\n variables: {\n buildingLevelId: this.buildingLevelId,\n projectId: this.projectId,\n startDate,\n endDate\n }\n })\n\n const calendarData = this.getCalendarTemplate(response.data?.buildingInspectionDateSummaryOfLevelAndPeriod)\n const worklogDates: string[] = response.data?.dailyWorklogDatesOfProject.map(v => v.date) || []\n const worklogSet = new Set(worklogDates)\n\n calendar.forEach(({ date }) => {\n const formattedDate = date.toLocaleDateString('en-CA') // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.\n const template = calendarData[formattedDate]\n\n const hasWorklog = worklogSet.has(formattedDate)\n if (template || hasWorklog) {\n result.set(date, [\n {\n due: formattedDate,\n template: html`\n <div style=\"display:grid;grid-template-columns:repeat(2,1fr);padding-inline:7px;align-items:center;gap:4px;\">\n ${template || html``}\n ${hasWorklog\n ? html`<div style=\"justify-self:end\"><md-icon style=\"color:#008000;\">description</md-icon></div>`\n : html``}\n </div>\n `,\n title: '',\n color: '',\n clickEvent: e => console.log('calendar click', formattedDate)\n }\n ])\n }\n })\n\n return result\n }\n\n // 검측 개수가 있는 데이터들만 날짜별로 템플릿 만들기\n private getCalendarTemplate(inspectionData: any[] = []): { [date: string]: TemplateResult } {\n const template = {}\n for (let date of inspectionData) {\n template[date.requestDate] = html`\n <div style=\"display: grid; grid-template-columns: repeat(2, 1fr); padding-inline: 7px;\">\n ${date.wait !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #4e5055\">●</span> ${date.wait}</div>` : ''}\n ${date.request !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #3395f1\">●</span> ${date.request}</div>` : ''}\n ${date.pass !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #1bb401\">●</span> ${date.pass}</div>` : ''}\n ${date.fail !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #ff4444\">●</span> ${date.fail}</div>` : ''}\n </div>\n `\n }\n\n return template\n }\n}\n"]}
@@ -26,7 +26,7 @@ export declare class BuildingInspectionGridDetail extends BuildingInspectionGrid
26
26
  cell: string;
27
27
  htmlSelectBuilding: any;
28
28
  htmlSelectLevel: any;
29
- render(): import("lit-html").TemplateResult<1>;
29
+ render(): import("lit").TemplateResult<1>;
30
30
  pageInitialized(lifecycle: PageLifecycle): Promise<void>;
31
31
  pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
32
32
  initProject(projectId?: string, buildingId?: string, levelId?: string): Promise<void>;
@@ -39,7 +39,7 @@ export declare class BuildingInspectionGridDetail extends BuildingInspectionGrid
39
39
  _onClickCreateInspection(): void;
40
40
  _onClickUpdateInspection(initialTab?: number): void;
41
41
  refresh(buildingInspectionId?: string): Promise<void>;
42
- _getIconHtmlByStatus(status: string): import("lit-html").TemplateResult<1> | "";
42
+ _getIconHtmlByStatus(status: string): import("lit").TemplateResult<1> | "";
43
43
  private validateChecklist;
44
44
  _onClickApplyToAll(): Promise<void>;
45
45
  _openPlanPreviewPopup(): void;
@@ -4,7 +4,7 @@ export declare class PlanPreviewPopup extends LitElement {
4
4
  buildingLevelId: string;
5
5
  private buildingLevel;
6
6
  connectedCallback(): Promise<void>;
7
- render(): import("lit-html").TemplateResult<1>;
7
+ render(): import("lit").TemplateResult<1>;
8
8
  private _loadBuildingLevel;
9
9
  private _openPreview;
10
10
  private _openImagePreview;
@@ -15,6 +15,7 @@ import './comment-list-popup';
15
15
  import './attachment-list-popup';
16
16
  import '../../stt/speech-to-text';
17
17
  import { parseSpeechCommand } from '../../stt/stt-utils';
18
+ import { notify } from '@operato/layout';
18
19
  let ChecklistView = class ChecklistView extends connect(store)(LitElement) {
19
20
  constructor() {
20
21
  super(...arguments);
@@ -65,7 +66,7 @@ let ChecklistView = class ChecklistView extends connect(store)(LitElement) {
65
66
  /**
66
67
  * 음성 명령 해석 결과를 체크리스트에 반영
67
68
  */
68
- _applySpeechCommand(parsed) {
69
+ async _applySpeechCommand(parsed) {
69
70
  // 합격/불합격 처리 예시 (시공자 기준)
70
71
  if (parsed.rowIds && parsed.isPass !== null) {
71
72
  this.checklist.checklistItems = this.checklist.checklistItems.map((item, idx) => parsed.rowIds.includes(idx + 1) ? Object.assign(Object.assign({}, item), { constructionConfirmStatus: parsed.isPass ? 'T' : 'F' }) : item);
@@ -73,9 +74,33 @@ let ChecklistView = class ChecklistView extends connect(store)(LitElement) {
73
74
  }
74
75
  // 조치사항 처리 예시
75
76
  if (parsed.rowIds && parsed.actionText) {
76
- this.checklist.checklistItems = this.checklist.checklistItems.map((item, idx) => parsed.rowIds.includes(idx + 1) ? Object.assign(Object.assign({}, item), { action: parsed.actionText }) : item);
77
- this.requestUpdate();
77
+ const { rowIds, actionText } = parsed;
78
+ const checklistItems = this.checklist.checklistItems;
79
+ const ids = rowIds.length > 0 ? rowIds : Array.from({ length: checklistItems.length }, (_, i) => i + 1); // rowIds가 빈값이면 모든 아이템에 대해 조치사항 등록
80
+ let count = 0;
81
+ for (const rowId of ids) {
82
+ const item = checklistItems[rowId - 1];
83
+ count += await this._createChecklistItemComment(item.id, actionText);
84
+ this._refreshItem({ detail: { checklistItemId: item.id } });
85
+ }
86
+ notify({ message: `${count}건의 조치사항을 등록했습니다.` });
87
+ }
88
+ }
89
+ // 체크리스트 아이템 코멘트 생성
90
+ async _createChecklistItemComment(checklistItemId, comment) {
91
+ const response = await client.mutate({
92
+ mutation: gql `
93
+ mutation CreateChecklistItemComment($checklistItemComment: NewChecklistItemComment!) {
94
+ createChecklistItemComment(checklistItemComment: $checklistItemComment) {
95
+ id
96
+ }
78
97
  }
98
+ `,
99
+ variables: {
100
+ checklistItemComment: { comment, checklistItemId }
101
+ }
102
+ });
103
+ return !response.errors ? 1 : 0;
79
104
  }
80
105
  render() {
81
106
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;