@dssp/supervision 1.0.0-alpha.5 → 1.0.0-alpha.51

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 (205) hide show
  1. package/dist-client/graphql/building-inspection.d.ts +1 -0
  2. package/dist-client/graphql/building-inspection.js +100 -0
  3. package/dist-client/graphql/building-inspection.js.map +1 -0
  4. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.d.ts +22 -0
  5. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +169 -0
  6. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -0
  7. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +57 -0
  8. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +825 -0
  9. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -0
  10. package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +8 -6
  11. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +115 -65
  12. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
  13. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +9 -0
  14. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +130 -72
  15. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  16. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -0
  17. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +77 -14
  18. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  19. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +18 -2
  20. package/dist-client/pages/building-inspection/building-inspection-list.js +360 -28
  21. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  22. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +3 -0
  23. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +104 -17
  24. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
  25. package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +27 -0
  26. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +542 -0
  27. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
  28. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
  29. package/dist-client/pages/building-inspection/component/image-preview-popup.js +351 -0
  30. package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -0
  31. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +20 -0
  32. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +432 -0
  33. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -0
  34. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +30 -0
  35. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +479 -0
  36. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -0
  37. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +27 -0
  38. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +416 -0
  39. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +1 -0
  40. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +2 -1
  41. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +39 -17
  42. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  43. package/dist-client/pages/building-inspection/inspection-create-popup.js +22 -9
  44. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  45. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +20 -0
  46. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +433 -57
  47. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
  48. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +131 -17
  49. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
  50. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.d.ts +19 -0
  51. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +205 -0
  52. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +1 -0
  53. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +15 -0
  54. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +430 -0
  55. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +1 -0
  56. package/dist-client/pages/checklist/attachment-list-popup.d.ts +1 -0
  57. package/dist-client/pages/checklist/attachment-list-popup.js +250 -67
  58. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
  59. package/dist-client/pages/checklist/checklist-view.d.ts +5 -0
  60. package/dist-client/pages/checklist/checklist-view.js +99 -29
  61. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  62. package/dist-client/pages/checklist/comment-list-popup.js +14 -3
  63. package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
  64. package/dist-client/pages/checklist/file-preview-popup.js +0 -1
  65. package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
  66. package/dist-client/pages/checklist/inspection-info-popup.d.ts +50 -0
  67. package/dist-client/pages/checklist/inspection-info-popup.js +684 -0
  68. package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -0
  69. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +18 -0
  70. package/dist-client/pages/checklist/inspection-tab-popup.js +196 -0
  71. package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -0
  72. package/dist-client/pages/checklist-template/checklist-template-item.js +14 -3
  73. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
  74. package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
  75. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  76. package/dist-client/route.d.ts +1 -1
  77. package/dist-client/route.js +6 -0
  78. package/dist-client/route.js.map +1 -1
  79. package/dist-client/tsconfig.tsbuildinfo +1 -1
  80. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +3 -3
  81. package/dist-server/service/building-inspection/building-inspection-mutation.js +130 -36
  82. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  83. package/dist-server/service/building-inspection/building-inspection-query.d.ts +3 -5
  84. package/dist-server/service/building-inspection/building-inspection-query.js +16 -29
  85. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  86. package/dist-server/service/building-inspection/building-inspection-type.d.ts +23 -7
  87. package/dist-server/service/building-inspection/building-inspection-type.js +80 -13
  88. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  89. package/dist-server/service/building-inspection/building-inspection.d.ts +4 -0
  90. package/dist-server/service/building-inspection/building-inspection.js +17 -2
  91. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  92. package/dist-server/service/building-inspection/index.d.ts +3 -4
  93. package/dist-server/service/building-inspection/index.js +10 -3
  94. package/dist-server/service/building-inspection/index.js.map +1 -1
  95. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
  96. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +56 -0
  97. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
  98. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +16 -0
  99. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +171 -0
  100. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
  101. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +23 -0
  102. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +90 -0
  103. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
  104. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +33 -0
  105. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +132 -0
  106. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
  107. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
  108. package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
  109. package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
  110. package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +16 -0
  111. package/dist-server/service/building-inspection-history/building-inspection-history-query.js +120 -0
  112. package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +1 -0
  113. package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +5 -0
  114. package/dist-server/service/building-inspection-history/building-inspection-history-type.js +21 -0
  115. package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +1 -0
  116. package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +34 -0
  117. package/dist-server/service/building-inspection-history/building-inspection-history.js +157 -0
  118. package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -0
  119. package/dist-server/service/building-inspection-history/event-subscriber.d.ts +7 -0
  120. package/dist-server/service/building-inspection-history/event-subscriber.js +21 -0
  121. package/dist-server/service/building-inspection-history/event-subscriber.js.map +1 -0
  122. package/dist-server/service/building-inspection-history/index.d.ts +6 -0
  123. package/dist-server/service/building-inspection-history/index.js +10 -0
  124. package/dist-server/service/building-inspection-history/index.js.map +1 -0
  125. package/dist-server/service/checklist/checklist-mutation.d.ts +0 -5
  126. package/dist-server/service/checklist/checklist-mutation.js +1 -67
  127. package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
  128. package/dist-server/service/checklist/checklist-query.d.ts +7 -0
  129. package/dist-server/service/checklist/checklist-query.js +83 -0
  130. package/dist-server/service/checklist/checklist-query.js.map +1 -1
  131. package/dist-server/service/checklist/checklist-type.d.ts +0 -13
  132. package/dist-server/service/checklist/checklist-type.js +1 -49
  133. package/dist-server/service/checklist/checklist-type.js.map +1 -1
  134. package/dist-server/service/checklist/checklist.d.ts +28 -3
  135. package/dist-server/service/checklist/checklist.js +89 -15
  136. package/dist-server/service/checklist/checklist.js.map +1 -1
  137. package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
  138. package/dist-server/service/checklist/event-subscriber.js +21 -0
  139. package/dist-server/service/checklist/event-subscriber.js.map +1 -0
  140. package/dist-server/service/checklist/index.d.ts +1 -2
  141. package/dist-server/service/checklist/index.js +1 -2
  142. package/dist-server/service/checklist/index.js.map +1 -1
  143. package/dist-server/service/checklist-history/checklist-history-query.d.ts +11 -0
  144. package/dist-server/service/checklist-history/checklist-history-query.js +77 -0
  145. package/dist-server/service/checklist-history/checklist-history-query.js.map +1 -0
  146. package/dist-server/service/checklist-history/checklist-history-type.d.ts +5 -0
  147. package/dist-server/service/checklist-history/checklist-history-type.js +21 -0
  148. package/dist-server/service/checklist-history/checklist-history-type.js.map +1 -0
  149. package/dist-server/service/{checklist → checklist-history}/checklist-history.d.ts +19 -1
  150. package/dist-server/service/{checklist → checklist-history}/checklist-history.js +97 -14
  151. package/dist-server/service/checklist-history/checklist-history.js.map +1 -0
  152. package/dist-server/service/checklist-history/event-subscriber.d.ts +7 -0
  153. package/dist-server/service/checklist-history/event-subscriber.js +21 -0
  154. package/dist-server/service/checklist-history/event-subscriber.js.map +1 -0
  155. package/dist-server/service/checklist-history/index.d.ts +6 -0
  156. package/dist-server/service/checklist-history/index.js +10 -0
  157. package/dist-server/service/checklist-history/index.js.map +1 -0
  158. package/dist-server/service/checklist-item/checklist-item-query.d.ts +1 -1
  159. package/dist-server/service/checklist-item/checklist-item-query.js +5 -3
  160. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
  161. package/dist-server/service/checklist-item/index.d.ts +0 -1
  162. package/dist-server/service/checklist-item/index.js +1 -2
  163. package/dist-server/service/checklist-item/index.js.map +1 -1
  164. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +1 -0
  165. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +33 -6
  166. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
  167. package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +16 -0
  168. package/dist-server/service/checklist-item-history/checklist-item-history-query.js +123 -0
  169. package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +1 -0
  170. package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +5 -0
  171. package/dist-server/service/checklist-item-history/checklist-item-history-type.js +21 -0
  172. package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +1 -0
  173. package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +25 -0
  174. package/dist-server/service/checklist-item-history/checklist-item-history.js +123 -0
  175. package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -0
  176. package/dist-server/service/checklist-item-history/event-subscriber.d.ts +7 -0
  177. package/dist-server/service/checklist-item-history/event-subscriber.js +21 -0
  178. package/dist-server/service/checklist-item-history/event-subscriber.js.map +1 -0
  179. package/dist-server/service/checklist-item-history/index.d.ts +6 -0
  180. package/dist-server/service/checklist-item-history/index.js +10 -0
  181. package/dist-server/service/checklist-item-history/index.js.map +1 -0
  182. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +4 -1
  183. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
  184. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +2 -0
  185. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +5 -0
  186. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
  187. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +6 -0
  188. package/dist-server/service/checklist-template-item/checklist-template-item.js +16 -1
  189. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  190. package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +2 -0
  191. package/dist-server/service/checklist-template-item/spec-matching-service.js +50 -0
  192. package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -0
  193. package/dist-server/service/index.d.ts +4 -1
  194. package/dist-server/service/index.js +22 -3
  195. package/dist-server/service/index.js.map +1 -1
  196. package/dist-server/service/project-report/project-report.d.ts +0 -2
  197. package/dist-server/service/project-report/project-report.js +0 -6
  198. package/dist-server/service/project-report/project-report.js.map +1 -1
  199. package/dist-server/tsconfig.tsbuildinfo +1 -1
  200. package/package.json +14 -13
  201. package/things-factory.config.js +2 -0
  202. package/dist-server/service/building-inspection/building-inspection-history.d.ts +0 -17
  203. package/dist-server/service/building-inspection/building-inspection-history.js +0 -86
  204. package/dist-server/service/building-inspection/building-inspection-history.js.map +0 -1
  205. package/dist-server/service/checklist/checklist-history.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"building-inspection-detail-ai-measurement.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-ai-measurement.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,mCAAmC,CAAA;AAC1C,OAAO,wCAAwC,CAAA;AAC/C,OAAO,6CAA6C,CAAA;AAEpD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,WAAW,MAAM,aAAa,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,OAAO,+CAA+C,CAAA;AAG/C,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,QAAQ;IAAtD;;QA4RG,gCAA2B,GAAW,yCAAyC,CAAA;QAE9E,Y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AE;;2EAA+B;AAC9B;IAAR,KAAK,EAAE;;2EAA+F;AAC9F;IAAR,KAAK,EAAE;;iEAA+B;AAC9B;IAAR,KAAK,EAAE;;6DAA2B;AAC1B;IAAR,KAAK,EAAE;;uEAAqC;AAEZ;IAAhC,KAAK,CAAC,gBAAgB,CAAC;8BAAwB,gBAAgB;qEAAA;AAC5B;IAAnC,KAAK,CAAC,mBAAmB,CAAC;8BAA0B,cAAc;uEAAA;AACpC;IAA9B,KAAK,CAAC,cAAc,CAAC;8BAAyB,gBAAgB;sEAAA;AApTpD,+BAA+B;IAD3C,aAAa,CAAC,2CAA2C,CAAC;GAC9C,+BAA+B,CA+vB3C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-switch.js'\nimport '@operato/mini-map/ox-zoomable-image.js'\nimport '@material/web/progress/circular-progress.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, state, query } from 'lit/decorators.js'\nimport html2canvas from 'html2canvas'\n\nimport { PageView } from '@operato/shell'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\n\nimport './component/building-inspection-detail-header'\n\n@customElement('building-inspection-detail-ai-measurement')\nexport class BuildingInspectionAiMeasurement extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 75px 1fr;\n color: #4e5055;\n width: 100%;\n height: 100%;\n background-color: #f7f7f7;\n }\n\n div[body] {\n display: flex;\n justify-items: center;\n gap: var(--spacing-medium);\n margin: var(--spacing-medium);\n min-height: 0;\n }\n\n div[preview] {\n flex: 1;\n border: 2px solid #ddd;\n border-radius: 10px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 0;\n overflow: hidden;\n }\n\n div[preview] img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] video {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] md-icon {\n --md-icon-size: 160px;\n }\n\n .loading-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n }\n\n .loading-text {\n font-size: 14px;\n color: #666;\n }\n\n .frame-container {\n width: 100%;\n height: 100%;\n max-height: 100%;\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px;\n }\n\n .frames-header {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n font-size: 20px;\n font-weight: 700;\n color: #333;\n text-align: center;\n padding-block: 8px;\n }\n\n .frames-count {\n font-size: 16px;\n color: #777;\n font-weight: 600;\n }\n\n .frames-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));\n gap: 12px;\n }\n\n .frame-item {\n border: 1px solid #ddd;\n border-radius: 8px;\n overflow: hidden;\n background: #fff;\n cursor: pointer;\n transition:\n box-shadow 0.2s,\n transform 0.1s;\n }\n\n .frame-item:hover {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n transform: translateY(-1px);\n }\n\n .frame-item img {\n display: block;\n width: 100%;\n height: 120px;\n object-fit: cover;\n }\n\n .image-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n align-content: center;\n text-align: center;\n }\n\n .point-marker {\n position: absolute;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n border: 2px solid #fff;\n transform: translate(-50%, -50%);\n pointer-events: none;\n box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);\n }\n\n .point-1 {\n background-color: #e53935;\n }\n\n .point-2 {\n background-color: #1e88e5;\n }\n\n .line-overlay {\n position: absolute;\n pointer-events: none;\n background-color: #ff9800;\n transform-origin: left center;\n }\n\n .distance-label {\n position: absolute;\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n font-size: 14px;\n padding: 2px 6px;\n border-radius: 4px;\n transform: translate(-50%, -120%);\n pointer-events: none;\n white-space: nowrap;\n }\n\n div[controls] {\n width: 240px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n }\n\n div[action-buttons] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: 15px;\n }\n\n .switch-container {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 24px;\n font-weight: bold;\n }\n\n ox-input-switch {\n --ox-simple-switch-fullwidth: 68px;\n --ox-simple-switch-fullheight: 34px;\n --ox-simple-switch-thumbnail-size: 34px;\n }\n\n .camera-shutter {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n }\n\n .controls-title {\n font-size: 18px;\n font-weight: 700;\n color: #333;\n margin-bottom: 8px;\n text-align: center;\n }\n\n .camera-shutter md-icon {\n --md-icon-size: 100px;\n }\n\n .camera-shutter input {\n opacity: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n cursor: pointer;\n }\n\n button {\n padding: 10px 20px;\n font-size: 16px;\n border-radius: 5px;\n border: none;\n cursor: pointer;\n }\n\n button.save {\n background-color: #4caf50;\n color: white;\n\n &:disabled {\n background-color: #ccc;\n cursor: default;\n }\n }\n\n button.retry {\n background-color: #f0ad4e;\n color: white;\n }\n\n button.photo {\n background-color: #1e88e5;\n color: white;\n\n &:disabled {\n background-color: #ccc;\n cursor: default;\n }\n }\n\n .loading-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n z-index: 2000;\n }\n\n .loading-overlay .loading-container {\n background: white;\n padding: 32px;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n }\n `\n ]\n\n private KEYPOINT_RULER_API_BASE_URL: string = 'https://hatiolab-korea-uni.ettisoft.com'\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() capturedVideoUrl: string | null = null\n @state() videoFile: File | null = null\n @state() frame: any | null = null\n @state() analyzing: boolean = false\n @state() selectedPoints: { x1: number | null; y1: number | null; x2: number | null; y2: number | null } = {\n x1: null,\n y1: null,\n x2: null,\n y2: null\n }\n @state() frameNaturalWidth: number = 0\n @state() frameNaturalHeight: number = 0\n @state() displayedImageRect: { width: number; height: number; left: number; top: number } | null = null\n @state() distance: number | null = null\n @state() unit: string | null = null\n @state() analyzingError: string | null = null\n\n @query('img#frameImage') private frameImageEl!: HTMLImageElement\n @query('div.image-wrapper') private imageWrapperEl!: HTMLDivElement\n @query('#cameraInput') private cameraInputEl!: HTMLInputElement\n\n get context() {\n return {\n title: '검측 관리 상세 - AI 거리 측정'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n <!-- Preview selected or recorded video -->\n <div preview>\n ${this.frame?.download_url\n ? html`\n <div class=\"image-wrapper\" @click=${this._onImageClick}>\n <img\n id=\"frameImage\"\n src=\"${this.KEYPOINT_RULER_API_BASE_URL + this.frame?.download_url}\"\n crossorigin=\"anonymous\"\n alt=\"frame\"\n loading=\"eager\"\n @load=${this._onImageLoad}\n />\n ${this._renderMarkers()}\n </div>\n `\n : // 동영상 선택 후 동영상 프리뷰\n this.capturedVideoUrl\n ? html`<video src=${this.capturedVideoUrl} controls playsinline></video>`\n : // 초기 상태, 동영상 선택 전\n html`<md-icon>videocam</md-icon>`}\n </div>\n\n <div controls>\n <span class=\"controls-title\">동영상 촬영</span>\n\n <!-- 가운데 버튼 -->\n ${this.frame?.download_url && this._hasTwoPoints() && this.distance && this.unit\n ? // 거리 측정 완료 시, 사진 저장 버튼 표시\n html`<button class=\"save\" ?disabled=${this.analyzing} @click=${this._savePhoto}>사진 저장</button>`\n : // 거리 측정 완료 전, 동영상 촬영 버튼 표시\n html`<div class=\"camera-shutter\">\n <md-icon>camera</md-icon>\n <input id=\"cameraInput\" type=\"file\" accept=\"video/*\" @change=\"${this._onVideoSelected}\" />\n </div>`}\n\n <!-- Action buttons -->\n <div action-buttons>\n ${this.frame\n ? html`\n <button class=\"photo\" ?disabled=${this.analyzing || !this._hasTwoPoints()} @click=${this._onAnalyzePhoto}>\n 사진 분석\n </button>\n `\n : html`\n <button class=\"save\" ?disabled=${this.analyzing || !this.capturedVideoUrl} @click=${this._onAnalyzeVideo}>\n 동영상 분석\n </button>\n `}\n <button class=\"retry\" @click=${this._onRetry}>초기화</button>\n </div>\n </div>\n </div>\n\n <!-- 전체 화면을 덮는 로딩 오버레이 -->\n ${this.analyzing\n ? html`<div class=\"loading-overlay\">\n <div class=\"loading-container\">\n <md-circular-progress indeterminate></md-circular-progress>\n <div class=\"loading-text\">분석 중...</div>\n </div>\n </div>`\n : ''}\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {}\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this._onRetry()\n this.buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(this.buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n drawingMarker\n checklist {\n id\n location\n inspectionDrawingType\n }\n buildingLevel {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private _onVideoSelected(event: Event) {\n const input = event.target as HTMLInputElement\n const file = input?.files?.[0]\n if (!file) return\n\n // Only allow video files\n if (!file.type.startsWith('video/')) {\n console.warn('선택된 파일이 동영상이 아닙니다.')\n return\n }\n\n // Revoke old object URL if exists\n if (this.capturedVideoUrl) {\n URL.revokeObjectURL(this.capturedVideoUrl)\n }\n\n this.videoFile = file\n this.capturedVideoUrl = URL.createObjectURL(file)\n }\n\n private async _onAnalyzeVideo() {\n if (!this.videoFile) {\n console.warn('선택된 동영상이 없습니다.')\n return\n }\n\n try {\n this.analyzing = true\n const form = new FormData()\n form.append('files', this.videoFile, this.videoFile.name)\n const response = await fetch(`${this.KEYPOINT_RULER_API_BASE_URL}/api/run/keypoint-ruler`, {\n method: 'POST',\n headers: { Authorization: `Basic ${btoa('admin:admin1234')}` },\n body: form\n })\n\n const data = await response.json()\n\n this.frame = {\n file_id: data?.result?.output_files[0]?.file_id,\n download_url: data?.result?.output_files[0]?.download_url,\n file_path: data?.result?.frames[0]?.file_path,\n calibration: data?.result?.calibration\n }\n } catch (error) {\n console.error('동영상 업로드 실패:', error)\n } finally {\n this.analyzing = false\n }\n }\n\n private _onRetry() {\n // Clear current selection and reopen camera\n if (this.capturedVideoUrl) {\n URL.revokeObjectURL(this.capturedVideoUrl)\n }\n this.capturedVideoUrl = null\n this.videoFile = null\n this.frame = null\n this.selectedPoints = { x1: null, y1: null, x2: null, y2: null }\n this.displayedImageRect = null\n this.frameNaturalWidth = 0\n this.frameNaturalHeight = 0\n this.cameraInputEl.value = ''\n this.distance = null\n this.unit = null\n this.analyzingError = null\n }\n\n private _onImageLoad = () => {\n if (!this.frameImageEl || !this.imageWrapperEl) return\n const img = this.frameImageEl\n const wrapperRect = this.imageWrapperEl.getBoundingClientRect()\n const imgRect = img.getBoundingClientRect()\n this.frameNaturalWidth = img.naturalWidth\n this.frameNaturalHeight = img.naturalHeight\n this.displayedImageRect = {\n width: imgRect.width,\n height: imgRect.height,\n left: imgRect.left - wrapperRect.left,\n top: imgRect.top - wrapperRect.top\n }\n }\n\n private _onImageClick = (event: MouseEvent) => {\n if (!this.frameImageEl || !this.imageWrapperEl) return\n const imgRect = this.frameImageEl.getBoundingClientRect()\n const wrapperRect = this.imageWrapperEl.getBoundingClientRect()\n const clientX = event.clientX\n const clientY = event.clientY\n\n // Ignore clicks outside the displayed image area\n if (clientX < imgRect.left || clientX > imgRect.right || clientY < imgRect.top || clientY > imgRect.bottom) {\n return\n }\n\n // 새로운 마크 입력 시 이전 거리/단위 결과 초기화\n this.distance = null\n this.unit = null\n this.analyzingError = null\n\n const relativeX = clientX - imgRect.left\n const relativeY = clientY - imgRect.top\n\n const xOnNatural = Math.round((relativeX * this.frameNaturalWidth) / imgRect.width)\n const yOnNatural = Math.round((relativeY * this.frameNaturalHeight) / imgRect.height)\n\n if (this.selectedPoints.x1 === null || this.selectedPoints.y1 === null) {\n this.selectedPoints = { ...this.selectedPoints, x1: xOnNatural, y1: yOnNatural }\n } else if (this.selectedPoints.x2 === null || this.selectedPoints.y2 === null) {\n this.selectedPoints = { ...this.selectedPoints, x2: xOnNatural, y2: yOnNatural }\n } else {\n // 세 번째 클릭부터는 초기화 후 첫 점으로 설정\n this.selectedPoints = { x1: xOnNatural, y1: yOnNatural, x2: null, y2: null }\n }\n\n // Update displayed rect cache (in case layout changed)\n this.displayedImageRect = {\n width: imgRect.width,\n height: imgRect.height,\n left: imgRect.left - wrapperRect.left,\n top: imgRect.top - wrapperRect.top\n }\n }\n\n private _hasTwoPoints(): boolean {\n const { x1, y1, x2, y2 } = this.selectedPoints\n return x1 !== null && y1 !== null && x2 !== null && y2 !== null\n }\n\n private _renderMarkers() {\n if (!this.displayedImageRect) return html``\n const { left, top, width, height } = this.displayedImageRect\n const { x1, y1, x2, y2 } = this.selectedPoints\n const toDisplay = (x: number, y: number) => {\n const dx = left + (x * width) / (this.frameNaturalWidth || 1)\n const dy = top + (y * height) / (this.frameNaturalHeight || 1)\n return { dx, dy }\n }\n\n return html`\n <!-- 첫 번째 점 -->\n ${x1 !== null && y1 !== null\n ? (() => {\n const p = toDisplay(x1, y1)\n return html`<div class=\"point-marker point-1\" style=\"left:${p.dx}px; top:${p.dy}px;\"></div>`\n })()\n : ''}\n <!-- 두 번째 점 -->\n ${x2 !== null && y2 !== null\n ? (() => {\n const p = toDisplay(x2, y2)\n return html`<div class=\"point-marker point-2\" style=\"left:${p.dx}px; top:${p.dy}px;\"></div>`\n })()\n : ''}\n <!-- 두점 사이 선 -->\n ${this._hasTwoPoints()\n ? (() => {\n const p1 = toDisplay(x1 as number, y1 as number)\n const p2 = toDisplay(x2 as number, y2 as number)\n const cx = (p1.dx + p2.dx) / 2\n const cy = (p1.dy + p2.dy) / 2\n\n // 선의 길이와 각도 계산\n const length = Math.sqrt(Math.pow(p2.dx - p1.dx, 2) + Math.pow(p2.dy - p1.dy, 2))\n const angle = Math.atan2(p2.dy - p1.dy, p2.dx - p1.dx) * (180 / Math.PI)\n\n return html`\n <!-- DIV로 그린 선 -->\n <div\n class=\"line-overlay\"\n style=\"\n left: ${p1.dx}px; \n top: ${p1.dy}px; \n width: ${length}px; \n height: 3px;\n transform: rotate(${angle}deg);\n \"\n ></div>\n <!-- 거리 라벨 -->\n ${this.analyzingError\n ? html`<div class=\"distance-label\" style=\"left:${cx}px; top:${cy}px;\">${this.analyzingError}</div>`\n : this.distance && this.unit\n ? html`<div class=\"distance-label\" style=\"left:${cx}px; top:${cy}px;\">${this.distance} ${this.unit}</div>`\n : ''}\n `\n })()\n : ''}\n `\n }\n\n private async _onAnalyzePhoto() {\n if (!this.frame) {\n console.warn('분석할 사진이 없습니다.')\n return\n }\n if (!this._hasTwoPoints()) {\n console.warn('두 점을 먼저 선택해 주세요.')\n return\n }\n\n try {\n this.analyzing = true\n const payload = {\n x1: this.selectedPoints.x1,\n y1: this.selectedPoints.y1,\n x2: this.selectedPoints.x2,\n y2: this.selectedPoints.y2,\n file_path: this.frame.file_path,\n calibration: this.frame.calibration\n }\n\n const form = new FormData()\n form.append('input', JSON.stringify(payload))\n const response = await fetch(`${this.KEYPOINT_RULER_API_BASE_URL}/api/run/keypoint-ruler`, {\n method: 'POST',\n headers: { Authorization: `Basic ${btoa('admin:admin1234')}` },\n body: form\n })\n\n const result = await response.json()\n const { distance, unit, error } = result.result || {}\n this.distance = distance\n this.unit = unit\n this.analyzingError = error\n } catch (error) {\n console.error('사진 분석 실패:', error)\n } finally {\n this.analyzing = false\n }\n }\n\n async _savePhoto() {\n if (!this.frame || !this._hasTwoPoints() || this.distance === null || !this.unit) {\n notify({ message: '분석 완료 후 저장할 수 있습니다.', level: 'warn' })\n return\n }\n\n const checklistId = this.buildingInspection?.checklist?.id\n let file: File\n try {\n file = await this.getCurrentImage()\n } catch (e) {\n notify({ message: '이미지 합성에 실패했습니다.', level: 'error' })\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n }\n }\n `,\n variables: {\n attachments: [{ file, refBy: checklistId, refType: 'Checklist', description: this.buildingInspection?.status }]\n },\n context: { hasUpload: true }\n })\n\n if (!response.errors) {\n notify({ message: '사진 대지를 저장하였습니다.', level: 'info' })\n return\n }\n\n return response.data.createAttachments\n }\n\n async getCurrentImage(): Promise<File> {\n if (!this.imageWrapperEl) {\n throw new Error('이미지 영역을 찾을 수 없습니다.')\n }\n\n try {\n // html2canvas로 .image-wrapper 영역 캡처\n const canvas = await html2canvas(this.imageWrapperEl, {\n backgroundColor: null, // 투명 배경\n scale: 1, // 1:1 스케일\n useCORS: true, // CORS 이미지 허용\n allowTaint: false, // 보안상 false\n logging: false // 로그 비활성화\n })\n\n // 캔버스를 Blob으로 변환\n const blob: Blob = await new Promise(resolve => {\n canvas.toBlob(resolve as any, 'image/png', 1.0)\n })\n\n // File 객체로 변환하여 반환\n return new File([blob!], `inspection_${Date.now()}.png`, {\n type: 'image/png'\n })\n } catch (error) {\n console.error('html2canvas 캡처 실패:', error)\n throw new Error('화면 캡처에 실패했습니다.')\n }\n }\n}\n"]}
@@ -1,6 +1,5 @@
1
1
  import '@material/web/icon/icon.js';
2
- import '@operato/input/ox-input-switch.js';
3
- import '@operato/mini-map/ox-zoomable-image.js';
2
+ import '@material/web/progress/circular-progress.js';
4
3
  import { PropertyValues } from 'lit';
5
4
  import { PageView } from '@operato/shell';
6
5
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
@@ -10,8 +9,10 @@ export declare class BuildingInspectionCamera extends PageView {
10
9
  project: any;
11
10
  buildingInspection: any;
12
11
  buildingInspectionId: string;
13
- capturedImage: string | null;
14
- originImage: string | null;
12
+ capturedImageUrl: string | null;
13
+ imageFile: File | null;
14
+ isSaved: boolean;
15
+ private imageInputEl;
15
16
  get context(): {
16
17
  title: string;
17
18
  };
@@ -20,6 +21,7 @@ export declare class BuildingInspectionCamera extends PageView {
20
21
  pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
21
22
  initBuildingInspection(buildingInspectionId?: string): Promise<void>;
22
23
  private _getProjectByBuildingComplexId;
23
- private toggleAI;
24
- private handleImageCapture;
24
+ private _onImageSelected;
25
+ private _onRetry;
26
+ _savePhoto(): Promise<any>;
25
27
  }
@@ -1,13 +1,13 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import '@material/web/icon/icon.js';
3
- import '@operato/input/ox-input-switch.js';
4
- import '@operato/mini-map/ox-zoomable-image.js';
3
+ import '@material/web/progress/circular-progress.js';
5
4
  import gql from 'graphql-tag';
6
5
  import { css, html } from 'lit';
7
- import { customElement, state } from 'lit/decorators.js';
6
+ import { customElement, state, query } from 'lit/decorators.js';
8
7
  import { PageView } from '@operato/shell';
9
8
  import { CommonGristStyles, ScrollbarStyles } from '@operato/styles';
10
9
  import { client } from '@operato/graphql';
10
+ import { notify } from '@operato/layout';
11
11
  import './component/building-inspection-detail-header';
12
12
  let BuildingInspectionCamera = class BuildingInspectionCamera extends PageView {
13
13
  constructor() {
@@ -15,8 +15,9 @@ let BuildingInspectionCamera = class BuildingInspectionCamera extends PageView {
15
15
  this.project = {};
16
16
  this.buildingInspection = {};
17
17
  this.buildingInspectionId = '';
18
- this.capturedImage = null; // For storing the captured image
19
- this.originImage = null;
18
+ this.capturedImageUrl = null;
19
+ this.imageFile = null;
20
+ this.isSaved = false;
20
21
  }
21
22
  get context() {
22
23
  return {
@@ -35,31 +36,26 @@ let BuildingInspectionCamera = class BuildingInspectionCamera extends PageView {
35
36
  ></building-inspection-detail-header>
36
37
 
37
38
  <div body>
38
- <!-- Display the captured image if available -->
39
39
  <div preview>
40
- ${this.capturedImage
41
- ? html `<ox-zoomable-image src=${this.capturedImage} restrict-boundary></ox-zoomable-image>`
42
- : html `<md-icon>photo_camera</md-icon>`}
40
+ <div class="image-wrapper">
41
+ ${this.capturedImageUrl
42
+ ? html `<img id="imageImage" src="${this.capturedImageUrl}" alt="image" />`
43
+ : html `<md-icon>add_a_photo</md-icon>`}
44
+ </div>
43
45
  </div>
44
46
 
45
47
  <div controls>
46
- <!-- AI toggle switch -->
47
- <div class="switch-container">
48
- <label>AI 기능</label>
49
- <ox-input-switch type="checkbox" @change=${this.toggleAI} round></ox-input-switch>
50
- </div>
48
+ <span class="controls-title">사진 촬영</span>
51
49
 
52
- <!-- Camera shutter button -->
53
50
  <div class="camera-shutter">
54
51
  <md-icon>camera</md-icon>
55
- <input type="file" accept="image/*" capture @change="${this.handleImageCapture}" />
52
+ <input id="imageInput" type="file" accept="image/*" @change="${this._onImageSelected}" />
56
53
  </div>
57
54
 
58
55
  <!-- Action buttons -->
59
- <div class="action-buttons">
60
- <button class="save">저장</button>
61
- <button class="retry">재촬영</button>
62
- <button class="cancel" @click=${() => (this.capturedImage = this.originImage)}>취소</button>
56
+ <div action-buttons>
57
+ <button class="save" ?disabled=${!this.imageFile || this.isSaved} @click=${this._savePhoto}>사진 저장</button>
58
+ <button class="retry" @click=${this._onRetry}>초기화</button>
63
59
  </div>
64
60
  </div>
65
61
  </div>
@@ -68,6 +64,7 @@ let BuildingInspectionCamera = class BuildingInspectionCamera extends PageView {
68
64
  async updated(changes) { }
69
65
  async pageUpdated(changes, lifecycle) {
70
66
  if (this.active) {
67
+ this._onRetry();
71
68
  this.buildingInspectionId = lifecycle.resourceId || '';
72
69
  await this.initBuildingInspection(this.buildingInspectionId);
73
70
  }
@@ -81,20 +78,12 @@ let BuildingInspectionCamera = class BuildingInspectionCamera extends PageView {
81
78
  id
82
79
  status
83
80
  requestDate
84
- drawingMarker
85
81
  checklist {
86
- location
87
- inspectionDrawingType
82
+ id
88
83
  }
89
84
  buildingLevel {
90
85
  id
91
86
  floor
92
- mainDrawing {
93
- id
94
- name
95
- fullpath
96
- }
97
- mainDrawingImage
98
87
  building {
99
88
  id
100
89
  name
@@ -133,21 +122,62 @@ let BuildingInspectionCamera = class BuildingInspectionCamera extends PageView {
133
122
  return;
134
123
  this.project = response.data.project;
135
124
  }
136
- toggleAI(e) {
137
- const isChecked = e.target.checked;
138
- console.log(`AI 기능: ${isChecked ? 'ON' : 'OFF'}`);
139
- // Implement additional AI functionality toggling if needed
140
- }
141
- handleImageCapture(event) {
125
+ _onImageSelected(event) {
126
+ var _a;
142
127
  const input = event.target;
143
- if (input.files && input.files[0]) {
144
- const reader = new FileReader();
145
- reader.onload = e => {
146
- var _a;
147
- this.capturedImage = (_a = e.target) === null || _a === void 0 ? void 0 : _a.result;
148
- };
149
- reader.readAsDataURL(input.files[0]);
128
+ const file = (_a = input === null || input === void 0 ? void 0 : input.files) === null || _a === void 0 ? void 0 : _a[0];
129
+ if (!file)
130
+ return;
131
+ // Only allow video files
132
+ if (!file.type.startsWith('image/')) {
133
+ console.warn('선택된 파일이 이미지가 아닙니다.');
134
+ return;
135
+ }
136
+ // Revoke old object URL if exists
137
+ if (this.capturedImageUrl) {
138
+ URL.revokeObjectURL(this.capturedImageUrl);
150
139
  }
140
+ this.imageFile = file;
141
+ this.capturedImageUrl = URL.createObjectURL(file);
142
+ this.isSaved = false; // 새 이미지 선택 시 저장 상태 초기화
143
+ }
144
+ _onRetry() {
145
+ // Clear current selection and reopen camera
146
+ if (this.capturedImageUrl) {
147
+ URL.revokeObjectURL(this.capturedImageUrl);
148
+ }
149
+ this.capturedImageUrl = null;
150
+ this.imageFile = null;
151
+ this.isSaved = false; // 초기화 시 저장 상태도 리셋
152
+ this.imageInputEl.value = '';
153
+ }
154
+ async _savePhoto() {
155
+ var _a, _b, _c;
156
+ if (!this.imageFile) {
157
+ notify({ message: '사진을 선택한 후 저장할 수 있습니다.', level: 'warn' });
158
+ return;
159
+ }
160
+ const checklistId = (_b = (_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) === null || _b === void 0 ? void 0 : _b.id;
161
+ const file = this.imageFile;
162
+ const response = await client.mutate({
163
+ mutation: gql `
164
+ mutation ($attachments: [NewAttachment!]!) {
165
+ createAttachments(attachments: $attachments) {
166
+ id
167
+ }
168
+ }
169
+ `,
170
+ variables: {
171
+ attachments: [{ file, refBy: checklistId, refType: 'Checklist', description: (_c = this.buildingInspection) === null || _c === void 0 ? void 0 : _c.status }]
172
+ },
173
+ context: { hasUpload: true }
174
+ });
175
+ if (!response.errors) {
176
+ notify({ message: '사진 대지를 저장하였습니다.', level: 'info' });
177
+ this.isSaved = true; // 저장 성공 시 상태 업데이트
178
+ return;
179
+ }
180
+ return response.data.createAttachments;
151
181
  }
152
182
  };
153
183
  BuildingInspectionCamera.styles = [
@@ -156,11 +186,11 @@ BuildingInspectionCamera.styles = [
156
186
  css `
157
187
  :host {
158
188
  display: grid;
159
- grid-template-rows: 75px auto;
189
+ grid-template-rows: 75px 1fr;
160
190
  color: #4e5055;
161
191
  width: 100%;
192
+ height: 100%;
162
193
  background-color: #f7f7f7;
163
- overflow-y: auto;
164
194
  }
165
195
 
166
196
  div[body] {
@@ -168,6 +198,7 @@ BuildingInspectionCamera.styles = [
168
198
  justify-items: center;
169
199
  gap: var(--spacing-medium);
170
200
  margin: var(--spacing-medium);
201
+ min-height: 0;
171
202
  }
172
203
 
173
204
  div[preview] {
@@ -178,6 +209,8 @@ BuildingInspectionCamera.styles = [
178
209
  display: flex;
179
210
  justify-content: center;
180
211
  align-items: center;
212
+ min-height: 0;
213
+ overflow: hidden;
181
214
  }
182
215
 
183
216
  div[preview] img {
@@ -186,10 +219,24 @@ BuildingInspectionCamera.styles = [
186
219
  object-fit: contain;
187
220
  }
188
221
 
222
+ div[preview] video {
223
+ max-width: 100%;
224
+ max-height: 100%;
225
+ object-fit: contain;
226
+ }
227
+
189
228
  div[preview] md-icon {
190
229
  --md-icon-size: 160px;
191
230
  }
192
231
 
232
+ .image-wrapper {
233
+ position: relative;
234
+ width: 100%;
235
+ height: 100%;
236
+ align-content: center;
237
+ text-align: center;
238
+ }
239
+
193
240
  div[controls] {
194
241
  width: 240px;
195
242
  display: flex;
@@ -202,20 +249,7 @@ BuildingInspectionCamera.styles = [
202
249
  display: flex;
203
250
  flex-direction: row;
204
251
  justify-content: space-between;
205
- }
206
-
207
- .switch-container {
208
- display: flex;
209
- align-items: center;
210
- gap: 10px;
211
- font-size: 24px;
212
- font-weight: bold;
213
- }
214
-
215
- ox-input-switch {
216
- --ox-simple-switch-fullwidth: 68px;
217
- --ox-simple-switch-fullheight: 34px;
218
- --ox-simple-switch-thumbnail-size: 34px;
252
+ gap: 15px;
219
253
  }
220
254
 
221
255
  .camera-shutter {
@@ -226,6 +260,14 @@ BuildingInspectionCamera.styles = [
226
260
  position: relative;
227
261
  }
228
262
 
263
+ .controls-title {
264
+ font-size: 18px;
265
+ font-weight: 700;
266
+ color: #333;
267
+ margin-bottom: 8px;
268
+ text-align: center;
269
+ }
270
+
229
271
  .camera-shutter md-icon {
230
272
  --md-icon-size: 100px;
231
273
  }
@@ -251,17 +293,17 @@ BuildingInspectionCamera.styles = [
251
293
  button.save {
252
294
  background-color: #4caf50;
253
295
  color: white;
296
+
297
+ &:disabled {
298
+ background-color: #ccc;
299
+ cursor: default;
300
+ }
254
301
  }
255
302
 
256
303
  button.retry {
257
304
  background-color: #f0ad4e;
258
305
  color: white;
259
306
  }
260
-
261
- button.cancel {
262
- background-color: #d9534f;
263
- color: white;
264
- }
265
307
  `
266
308
  ];
267
309
  __decorate([
@@ -279,11 +321,19 @@ __decorate([
279
321
  __decorate([
280
322
  state(),
281
323
  __metadata("design:type", Object)
282
- ], BuildingInspectionCamera.prototype, "capturedImage", void 0);
324
+ ], BuildingInspectionCamera.prototype, "capturedImageUrl", void 0);
283
325
  __decorate([
284
326
  state(),
285
327
  __metadata("design:type", Object)
286
- ], BuildingInspectionCamera.prototype, "originImage", void 0);
328
+ ], BuildingInspectionCamera.prototype, "imageFile", void 0);
329
+ __decorate([
330
+ state(),
331
+ __metadata("design:type", Boolean)
332
+ ], BuildingInspectionCamera.prototype, "isSaved", void 0);
333
+ __decorate([
334
+ query('#imageInput'),
335
+ __metadata("design:type", HTMLInputElement)
336
+ ], BuildingInspectionCamera.prototype, "imageInputEl", void 0);
287
337
  BuildingInspectionCamera = __decorate([
288
338
  customElement('building-inspection-detail-camera')
289
339
  ], BuildingInspectionCamera);
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection-detail-camera.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-camera.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,mCAAmC,CAAA;AAC1C,OAAO,wCAAwC,CAAA;AAE/C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,Q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CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;QACjD,2DAA2D;IAC7D,CAAC;IAEO,kBAAkB,CAAC,KAAY;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAA;QAC9C,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YAClC,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;YAC/B,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE;;gBAClB,IAAI,CAAC,aAAa,GAAG,MAAA,CAAC,CAAC,MAAM,0CAAE,MAAgB,CAAA;YACjD,CAAC,CAAA;YACD,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;QACtC,CAAC;IACH,CAAC;;AAlQM,+BAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6GF;CACF,AAjHY,CAiHZ;AAEQ;IAAR,KAAK,EAAE;;yDAAkB;AACjB;IAAR,KAAK,EAAE;;oEAA6B;AAC5B;IAAR,KAAK,EAAE;;sEAAkC;AACjC;IAAR,KAAK,EAAE;;+DAAoC;AACnC;IAAR,KAAK,EAAE;;6DAAkC;AAxH/B,wBAAwB;IADpC,aAAa,CAAC,mCAAmC,CAAC;GACtC,wBAAwB,CAoQpC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-switch.js'\nimport '@operato/mini-map/ox-zoomable-image.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\n\nimport { PageView } from '@operato/shell'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\n\nimport './component/building-inspection-detail-header'\n\n@customElement('building-inspection-detail-camera')\nexport class BuildingInspectionCamera extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 75px auto;\n color: #4e5055;\n width: 100%;\n background-color: #f7f7f7;\n overflow-y: auto;\n }\n\n div[body] {\n display: flex;\n justify-items: center;\n gap: var(--spacing-medium);\n margin: var(--spacing-medium);\n }\n\n div[preview] {\n flex: 1;\n border: 2px solid #ddd;\n border-radius: 10px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n div[preview] img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] md-icon {\n --md-icon-size: 160px;\n }\n\n div[controls] {\n width: 240px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n }\n\n div[action-buttons] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n\n .switch-container {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 24px;\n font-weight: bold;\n }\n\n ox-input-switch {\n --ox-simple-switch-fullwidth: 68px;\n --ox-simple-switch-fullheight: 34px;\n --ox-simple-switch-thumbnail-size: 34px;\n }\n\n .camera-shutter {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n }\n\n .camera-shutter md-icon {\n --md-icon-size: 100px;\n }\n\n .camera-shutter input {\n opacity: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n cursor: pointer;\n }\n\n button {\n padding: 10px 20px;\n font-size: 16px;\n border-radius: 5px;\n border: none;\n cursor: pointer;\n }\n\n button.save {\n background-color: #4caf50;\n color: white;\n }\n\n button.retry {\n background-color: #f0ad4e;\n color: white;\n }\n\n button.cancel {\n background-color: #d9534f;\n color: white;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() capturedImage: string | null = null // For storing the captured image\n @state() originImage: string | null = null\n\n get context() {\n return {\n title: '검측 관리 상세 - 사진 촬영'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n <!-- Display the captured image if available -->\n <div preview>\n ${this.capturedImage\n ? html`<ox-zoomable-image src=${this.capturedImage} restrict-boundary></ox-zoomable-image>`\n : html`<md-icon>photo_camera</md-icon>`}\n </div>\n\n <div controls>\n <!-- AI toggle switch -->\n <div class=\"switch-container\">\n <label>AI 기능</label>\n <ox-input-switch type=\"checkbox\" @change=${this.toggleAI} round></ox-input-switch>\n </div>\n\n <!-- Camera shutter button -->\n <div class=\"camera-shutter\">\n <md-icon>camera</md-icon>\n <input type=\"file\" accept=\"image/*\" capture @change=\"${this.handleImageCapture}\" />\n </div>\n\n <!-- Action buttons -->\n <div class=\"action-buttons\">\n <button class=\"save\">저장</button>\n <button class=\"retry\">재촬영</button>\n <button class=\"cancel\" @click=${() => (this.capturedImage = this.originImage)}>취소</button>\n </div>\n </div>\n </div>\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {}\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this.buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(this.buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n drawingMarker\n checklist {\n location\n inspectionDrawingType\n }\n buildingLevel {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private toggleAI(e: Event) {\n const isChecked = (e.target as HTMLInputElement).checked\n console.log(`AI 기능: ${isChecked ? 'ON' : 'OFF'}`)\n // Implement additional AI functionality toggling if needed\n }\n\n private handleImageCapture(event: Event) {\n const input = event.target as HTMLInputElement\n if (input.files && input.files[0]) {\n const reader = new FileReader()\n reader.onload = e => {\n this.capturedImage = e.target?.result as string\n }\n reader.readAsDataURL(input.files[0])\n }\n }\n}\n"]}
1
+ {"version":3,"file":"building-inspection-detail-camera.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-camera.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,6CAA6C,CAAA;AAEpD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,OAAO,+CAA+C,CAAA;AAG/C,IAAM,wBAA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,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAA,IAAI,CAAC,kBAAkB,0CAAE,MAAM,EAAE,CAAC;aAChH;YACD,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;SAC7B,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACrB,MAAM,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;YACrD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA,CAAC,kBAAkB;YACtC,OAAM;QACR,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAA;IACxC,CAAC;;AApTM,+BAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyHF;CACF,AA7HY,CA6HZ;AAEQ;IAAR,KAAK,EAAE;;yDAAkB;AACjB;IAAR,KAAK,EAAE;;oEAA6B;AAC5B;IAAR,KAAK,EAAE;;sEAAkC;AACjC;IAAR,KAAK,EAAE;;kEAAuC;AACtC;IAAR,KAAK,EAAE;;2DAA8B;AAC7B;IAAR,KAAK,EAAE;;yDAAyB;AAEH;IAA7B,KAAK,CAAC,aAAa,CAAC;8BAAwB,gBAAgB;8DAAA;AAvIlD,wBAAwB;IADpC,aAAa,CAAC,mCAAmC,CAAC;GACtC,wBAAwB,CAsTpC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/progress/circular-progress.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, state, query } from 'lit/decorators.js'\n\nimport { PageView } from '@operato/shell'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\n\nimport './component/building-inspection-detail-header'\n\n@customElement('building-inspection-detail-camera')\nexport class BuildingInspectionCamera extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 75px 1fr;\n color: #4e5055;\n width: 100%;\n height: 100%;\n background-color: #f7f7f7;\n }\n\n div[body] {\n display: flex;\n justify-items: center;\n gap: var(--spacing-medium);\n margin: var(--spacing-medium);\n min-height: 0;\n }\n\n div[preview] {\n flex: 1;\n border: 2px solid #ddd;\n border-radius: 10px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 0;\n overflow: hidden;\n }\n\n div[preview] img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] video {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] md-icon {\n --md-icon-size: 160px;\n }\n\n .image-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n align-content: center;\n text-align: center;\n }\n\n div[controls] {\n width: 240px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n }\n\n div[action-buttons] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: 15px;\n }\n\n .camera-shutter {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n }\n\n .controls-title {\n font-size: 18px;\n font-weight: 700;\n color: #333;\n margin-bottom: 8px;\n text-align: center;\n }\n\n .camera-shutter md-icon {\n --md-icon-size: 100px;\n }\n\n .camera-shutter input {\n opacity: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n cursor: pointer;\n }\n\n button {\n padding: 10px 20px;\n font-size: 16px;\n border-radius: 5px;\n border: none;\n cursor: pointer;\n }\n\n button.save {\n background-color: #4caf50;\n color: white;\n\n &:disabled {\n background-color: #ccc;\n cursor: default;\n }\n }\n\n button.retry {\n background-color: #f0ad4e;\n color: white;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() capturedImageUrl: string | null = null\n @state() imageFile: File | null = null\n @state() isSaved: boolean = false\n\n @query('#imageInput') private imageInputEl!: HTMLInputElement\n\n get context() {\n return {\n title: '검측 관리 상세 - 사진 촬영'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n <div preview>\n <div class=\"image-wrapper\">\n ${this.capturedImageUrl\n ? html`<img id=\"imageImage\" src=\"${this.capturedImageUrl}\" alt=\"image\" />`\n : html`<md-icon>add_a_photo</md-icon>`}\n </div>\n </div>\n\n <div controls>\n <span class=\"controls-title\">사진 촬영</span>\n\n <div class=\"camera-shutter\">\n <md-icon>camera</md-icon>\n <input id=\"imageInput\" type=\"file\" accept=\"image/*\" @change=\"${this._onImageSelected}\" />\n </div>\n\n <!-- Action buttons -->\n <div action-buttons>\n <button class=\"save\" ?disabled=${!this.imageFile || this.isSaved} @click=${this._savePhoto}>사진 저장</button>\n <button class=\"retry\" @click=${this._onRetry}>초기화</button>\n </div>\n </div>\n </div>\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {}\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this._onRetry()\n this.buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(this.buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n checklist {\n id\n }\n buildingLevel {\n id\n floor\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private _onImageSelected(event: Event) {\n const input = event.target as HTMLInputElement\n const file = input?.files?.[0]\n if (!file) return\n\n // Only allow video files\n if (!file.type.startsWith('image/')) {\n console.warn('선택된 파일이 이미지가 아닙니다.')\n return\n }\n\n // Revoke old object URL if exists\n if (this.capturedImageUrl) {\n URL.revokeObjectURL(this.capturedImageUrl)\n }\n\n this.imageFile = file\n this.capturedImageUrl = URL.createObjectURL(file)\n this.isSaved = false // 새 이미지 선택 시 저장 상태 초기화\n }\n\n private _onRetry() {\n // Clear current selection and reopen camera\n if (this.capturedImageUrl) {\n URL.revokeObjectURL(this.capturedImageUrl)\n }\n this.capturedImageUrl = null\n this.imageFile = null\n this.isSaved = false // 초기화 시 저장 상태도 리셋\n this.imageInputEl.value = ''\n }\n\n async _savePhoto() {\n if (!this.imageFile) {\n notify({ message: '사진을 선택한 후 저장할 수 있습니다.', level: 'warn' })\n return\n }\n\n const checklistId = this.buildingInspection?.checklist?.id\n const file = this.imageFile\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n }\n }\n `,\n variables: {\n attachments: [{ file, refBy: checklistId, refType: 'Checklist', description: this.buildingInspection?.status }]\n },\n context: { hasUpload: true }\n })\n\n if (!response.errors) {\n notify({ message: '사진 대지를 저장하였습니다.', level: 'info' })\n this.isSaved = true // 저장 성공 시 상태 업데이트\n return\n }\n\n return response.data.createAttachments\n }\n}\n"]}
@@ -3,6 +3,8 @@ import '@operato/data-grist';
3
3
  import { PageView } from '@operato/shell';
4
4
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
5
5
  import './component/building-inspection-detail-header';
6
+ import './component/inspection-document/inspection-request-document';
7
+ import './component/inspection-document/inspection-result-notification';
6
8
  import '../checklist/checklist-view';
7
9
  export declare class BuildingInspectionDetailChecklist extends PageView {
8
10
  static styles: import("lit").CSSResult[];
@@ -17,4 +19,11 @@ export declare class BuildingInspectionDetailChecklist extends PageView {
17
19
  private _getProjectByBuildingComplexId;
18
20
  private _onClickModifyChecklist;
19
21
  private validateChecklist;
22
+ private _showInspectionRequestDocument;
23
+ private _showInspectionResultNotification;
24
+ private _onInspectionMemoChange;
25
+ private _onInspectionResultChange;
26
+ private _onInspectionTypeChange;
27
+ private _onInstructionsChange;
28
+ private _uploadNameListFile;
20
29
  }