@dssp/supervision 1.0.0-alpha.7 → 1.0.0-alpha.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/dist-client/graphql/building-inspection.d.ts +1 -0
  2. package/dist-client/graphql/building-inspection.js +101 -0
  3. package/dist-client/graphql/building-inspection.js.map +1 -0
  4. package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -2
  5. package/dist-client/pages/action-plan/action-plan-list-page.js +1 -2
  6. package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
  7. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.d.ts +22 -0
  8. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +171 -0
  9. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -0
  10. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +59 -0
  11. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +868 -0
  12. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -0
  13. package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +8 -6
  14. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +116 -65
  15. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
  16. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +11 -0
  17. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +147 -72
  18. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  19. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -0
  20. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +78 -14
  21. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  22. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +26 -2
  23. package/dist-client/pages/building-inspection/building-inspection-list.js +375 -34
  24. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  25. package/dist-client/pages/building-inspection/building-inspection-management.d.ts +72 -0
  26. package/dist-client/pages/building-inspection/building-inspection-management.js +1256 -0
  27. package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -0
  28. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +3 -0
  29. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +112 -20
  30. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
  31. package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +27 -0
  32. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +542 -0
  33. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
  34. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
  35. package/dist-client/pages/building-inspection/component/image-preview-popup.js +348 -0
  36. package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -0
  37. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +25 -0
  38. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +491 -0
  39. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -0
  40. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +31 -0
  41. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +485 -0
  42. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -0
  43. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +27 -0
  44. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +416 -0
  45. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +1 -0
  46. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +2 -1
  47. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +42 -18
  48. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  49. package/dist-client/pages/building-inspection/inspection-create-popup.js +17 -5
  50. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  51. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +3 -0
  52. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +791 -0
  53. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
  54. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +16 -2
  55. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +249 -45
  56. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
  57. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +9 -3
  58. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
  59. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.d.ts +19 -0
  60. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +205 -0
  61. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +1 -0
  62. package/dist-client/pages/checklist/attachment-list-popup.d.ts +1 -0
  63. package/dist-client/pages/checklist/attachment-list-popup.js +251 -69
  64. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
  65. package/dist-client/pages/checklist/checklist-view.d.ts +5 -0
  66. package/dist-client/pages/checklist/checklist-view.js +191 -30
  67. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  68. package/dist-client/pages/checklist/comment-list-popup.js +15 -5
  69. package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
  70. package/dist-client/pages/checklist/file-preview-popup.js +0 -1
  71. package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
  72. package/dist-client/pages/checklist/inspection-info-popup.d.ts +49 -0
  73. package/dist-client/pages/checklist/inspection-info-popup.js +683 -0
  74. package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -0
  75. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +18 -0
  76. package/dist-client/pages/checklist/inspection-tab-popup.js +196 -0
  77. package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -0
  78. package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
  79. package/dist-client/pages/checklist-database/checklist-database.js +539 -0
  80. package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
  81. package/dist-client/pages/checklist-template/checklist-template-item.js +39 -3
  82. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
  83. package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
  84. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  85. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
  86. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +242 -0
  87. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
  88. package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
  89. package/dist-client/pages/checklist-template/construction-checklist-template-list.js +409 -0
  90. package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
  91. package/dist-client/pages/issue/issue-list-page.d.ts +1 -2
  92. package/dist-client/pages/issue/issue-list-page.js +1 -2
  93. package/dist-client/pages/issue/issue-list-page.js.map +1 -1
  94. package/dist-client/pages/project-checklist/project-checklist-management.d.ts +50 -0
  95. package/dist-client/pages/project-checklist/project-checklist-management.js +910 -0
  96. package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
  97. package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -2
  98. package/dist-client/pages/project-report/project-report-list-page.js +1 -2
  99. package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
  100. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -2
  101. package/dist-client/pages/supervisor/supervisor-list-page.js +1 -2
  102. package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
  103. package/dist-client/route.d.ts +1 -1
  104. package/dist-client/route.js +18 -0
  105. package/dist-client/route.js.map +1 -1
  106. package/dist-client/stt/speech-to-text.d.ts +13 -8
  107. package/dist-client/stt/speech-to-text.js +282 -40
  108. package/dist-client/stt/speech-to-text.js.map +1 -1
  109. package/dist-client/tsconfig.tsbuildinfo +1 -1
  110. package/dist-server/service/action-plan/action-plan-mutation.js +5 -6
  111. package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
  112. package/dist-server/service/action-plan/action-plan-query.d.ts +2 -2
  113. package/dist-server/service/action-plan/action-plan-query.js +5 -11
  114. package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
  115. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +2 -3
  116. package/dist-server/service/building-inspection/building-inspection-mutation.js +77 -39
  117. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  118. package/dist-server/service/building-inspection/building-inspection-query.d.ts +5 -7
  119. package/dist-server/service/building-inspection/building-inspection-query.js +54 -52
  120. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  121. package/dist-server/service/building-inspection/building-inspection-type.d.ts +26 -7
  122. package/dist-server/service/building-inspection/building-inspection-type.js +92 -13
  123. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  124. package/dist-server/service/building-inspection/building-inspection.d.ts +5 -0
  125. package/dist-server/service/building-inspection/building-inspection.js +37 -4
  126. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  127. package/dist-server/service/building-inspection/index.d.ts +3 -4
  128. package/dist-server/service/building-inspection/index.js +10 -3
  129. package/dist-server/service/building-inspection/index.js.map +1 -1
  130. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
  131. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +56 -0
  132. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
  133. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +16 -0
  134. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +171 -0
  135. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
  136. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +23 -0
  137. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +90 -0
  138. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
  139. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +33 -0
  140. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +132 -0
  141. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
  142. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
  143. package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
  144. package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
  145. package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +16 -0
  146. package/dist-server/service/building-inspection-history/building-inspection-history-query.js +120 -0
  147. package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +1 -0
  148. package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +5 -0
  149. package/dist-server/service/building-inspection-history/building-inspection-history-type.js +21 -0
  150. package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +1 -0
  151. package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +35 -0
  152. package/dist-server/service/building-inspection-history/building-inspection-history.js +162 -0
  153. package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -0
  154. package/dist-server/service/building-inspection-history/event-subscriber.d.ts +7 -0
  155. package/dist-server/service/building-inspection-history/event-subscriber.js +21 -0
  156. package/dist-server/service/building-inspection-history/event-subscriber.js.map +1 -0
  157. package/dist-server/service/building-inspection-history/index.d.ts +6 -0
  158. package/dist-server/service/building-inspection-history/index.js +10 -0
  159. package/dist-server/service/building-inspection-history/index.js.map +1 -0
  160. package/dist-server/service/checklist/checklist-mutation.d.ts +0 -5
  161. package/dist-server/service/checklist/checklist-mutation.js +1 -67
  162. package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
  163. package/dist-server/service/checklist/checklist-query.d.ts +7 -0
  164. package/dist-server/service/checklist/checklist-query.js +83 -0
  165. package/dist-server/service/checklist/checklist-query.js.map +1 -1
  166. package/dist-server/service/checklist/checklist-type.d.ts +0 -13
  167. package/dist-server/service/checklist/checklist-type.js +1 -49
  168. package/dist-server/service/checklist/checklist-type.js.map +1 -1
  169. package/dist-server/service/checklist/checklist.d.ts +28 -3
  170. package/dist-server/service/checklist/checklist.js +89 -15
  171. package/dist-server/service/checklist/checklist.js.map +1 -1
  172. package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
  173. package/dist-server/service/checklist/event-subscriber.js +21 -0
  174. package/dist-server/service/checklist/event-subscriber.js.map +1 -0
  175. package/dist-server/service/checklist/index.d.ts +1 -2
  176. package/dist-server/service/checklist/index.js +1 -2
  177. package/dist-server/service/checklist/index.js.map +1 -1
  178. package/dist-server/service/checklist-history/checklist-history-query.d.ts +11 -0
  179. package/dist-server/service/checklist-history/checklist-history-query.js +77 -0
  180. package/dist-server/service/checklist-history/checklist-history-query.js.map +1 -0
  181. package/dist-server/service/checklist-history/checklist-history-type.d.ts +5 -0
  182. package/dist-server/service/checklist-history/checklist-history-type.js +21 -0
  183. package/dist-server/service/checklist-history/checklist-history-type.js.map +1 -0
  184. package/dist-server/service/{checklist → checklist-history}/checklist-history.d.ts +19 -1
  185. package/dist-server/service/{checklist → checklist-history}/checklist-history.js +97 -14
  186. package/dist-server/service/checklist-history/checklist-history.js.map +1 -0
  187. package/dist-server/service/checklist-history/event-subscriber.d.ts +7 -0
  188. package/dist-server/service/checklist-history/event-subscriber.js +21 -0
  189. package/dist-server/service/checklist-history/event-subscriber.js.map +1 -0
  190. package/dist-server/service/checklist-history/index.d.ts +6 -0
  191. package/dist-server/service/checklist-history/index.js +10 -0
  192. package/dist-server/service/checklist-history/index.js.map +1 -0
  193. package/dist-server/service/checklist-item/checklist-item-query.d.ts +1 -1
  194. package/dist-server/service/checklist-item/checklist-item-query.js +5 -3
  195. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
  196. package/dist-server/service/checklist-item/index.d.ts +0 -1
  197. package/dist-server/service/checklist-item/index.js +1 -2
  198. package/dist-server/service/checklist-item/index.js.map +1 -1
  199. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +1 -0
  200. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +33 -6
  201. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
  202. package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +16 -0
  203. package/dist-server/service/checklist-item-history/checklist-item-history-query.js +123 -0
  204. package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +1 -0
  205. package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +5 -0
  206. package/dist-server/service/checklist-item-history/checklist-item-history-type.js +21 -0
  207. package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +1 -0
  208. package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +25 -0
  209. package/dist-server/service/checklist-item-history/checklist-item-history.js +123 -0
  210. package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -0
  211. package/dist-server/service/checklist-item-history/event-subscriber.d.ts +7 -0
  212. package/dist-server/service/checklist-item-history/event-subscriber.js +21 -0
  213. package/dist-server/service/checklist-item-history/event-subscriber.js.map +1 -0
  214. package/dist-server/service/checklist-item-history/index.d.ts +6 -0
  215. package/dist-server/service/checklist-item-history/index.js +10 -0
  216. package/dist-server/service/checklist-item-history/index.js.map +1 -0
  217. package/dist-server/service/checklist-template/checklist-template-query.d.ts +1 -1
  218. package/dist-server/service/checklist-template/checklist-template-query.js +2 -5
  219. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
  220. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +13 -1
  221. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
  222. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +3 -0
  223. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +9 -0
  224. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
  225. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +7 -0
  226. package/dist-server/service/checklist-template-item/checklist-template-item.js +22 -2
  227. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  228. package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +2 -0
  229. package/dist-server/service/checklist-template-item/spec-matching-service.js +51 -0
  230. package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -0
  231. package/dist-server/service/checklist-type/checklist-type-query.d.ts +1 -1
  232. package/dist-server/service/checklist-type/checklist-type-query.js +2 -5
  233. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
  234. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
  235. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
  236. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
  237. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
  238. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
  239. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
  240. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
  241. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
  242. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
  243. package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
  244. package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
  245. package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
  246. package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
  247. package/dist-server/service/construction-checklist-template/index.js +9 -0
  248. package/dist-server/service/construction-checklist-template/index.js.map +1 -0
  249. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
  250. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +60 -0
  251. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
  252. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
  253. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
  254. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
  255. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
  256. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
  257. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
  258. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
  259. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
  260. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
  261. package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
  262. package/dist-server/service/construction-checklist-template-item/index.js +9 -0
  263. package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
  264. package/dist-server/service/construction-checklist-template-item/spec-matching-service.d.ts +2 -0
  265. package/dist-server/service/construction-checklist-template-item/spec-matching-service.js +50 -0
  266. package/dist-server/service/construction-checklist-template-item/spec-matching-service.js.map +1 -0
  267. package/dist-server/service/index.d.ts +8 -1
  268. package/dist-server/service/index.js +38 -3
  269. package/dist-server/service/index.js.map +1 -1
  270. package/dist-server/service/issue/issue-mutation.js +5 -6
  271. package/dist-server/service/issue/issue-mutation.js.map +1 -1
  272. package/dist-server/service/issue/issue-query.d.ts +2 -2
  273. package/dist-server/service/issue/issue-query.js +5 -11
  274. package/dist-server/service/issue/issue-query.js.map +1 -1
  275. package/dist-server/service/project-checklist/index.d.ts +5 -0
  276. package/dist-server/service/project-checklist/index.js +9 -0
  277. package/dist-server/service/project-checklist/index.js.map +1 -0
  278. package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
  279. package/dist-server/service/project-checklist/project-checklist-mutation.js +109 -0
  280. package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
  281. package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
  282. package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
  283. package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
  284. package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
  285. package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
  286. package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
  287. package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
  288. package/dist-server/service/project-checklist/project-checklist.js +90 -0
  289. package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
  290. package/dist-server/service/project-checklist-item/index.d.ts +4 -0
  291. package/dist-server/service/project-checklist-item/index.js +9 -0
  292. package/dist-server/service/project-checklist-item/index.js.map +1 -0
  293. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
  294. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
  295. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
  296. package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
  297. package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
  298. package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
  299. package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
  300. package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
  301. package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
  302. package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +17 -0
  303. package/dist-server/service/project-checklist-item/project-checklist-item.js +82 -0
  304. package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
  305. package/dist-server/service/project-report/project-report-mutation.js +5 -6
  306. package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
  307. package/dist-server/service/project-report/project-report-query.d.ts +2 -2
  308. package/dist-server/service/project-report/project-report-query.js +5 -11
  309. package/dist-server/service/project-report/project-report-query.js.map +1 -1
  310. package/dist-server/service/project-report/project-report.d.ts +0 -2
  311. package/dist-server/service/project-report/project-report.js +0 -6
  312. package/dist-server/service/project-report/project-report.js.map +1 -1
  313. package/dist-server/service/supervisor/supervisor-mutation.js +5 -6
  314. package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
  315. package/dist-server/service/supervisor/supervisor-query.d.ts +2 -2
  316. package/dist-server/service/supervisor/supervisor-query.js +5 -11
  317. package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
  318. package/dist-server/tsconfig.tsbuildinfo +1 -1
  319. package/package.json +14 -13
  320. package/things-factory.config.js +9 -1
  321. package/dist-server/service/building-inspection/building-inspection-history.d.ts +0 -17
  322. package/dist-server/service/building-inspection/building-inspection-history.js +0 -86
  323. package/dist-server/service/building-inspection/building-inspection-history.js.map +0 -1
  324. package/dist-server/service/checklist/checklist-history.js.map +0 -1
@@ -7,12 +7,17 @@ import { css, html } from 'lit';
7
7
  import { customElement, state } from 'lit/decorators.js';
8
8
  import { keyed } from 'lit/directives/keyed.js';
9
9
  import { client } from '@operato/graphql';
10
- import { notify } from '@operato/layout';
10
+ import { notify, openPopup } from '@operato/layout';
11
+ import { store } from '@operato/shell';
11
12
  import gql from 'graphql-tag';
12
13
  import { verifyBiometric } from '@things-factory/auth-base/dist-client';
13
14
  import './component/building-inspection-detail-header';
15
+ import './component/inspection-document/inspection-request-document';
16
+ import './component/inspection-document/inspection-result-notification';
14
17
  import '../checklist/checklist-view';
15
18
  import { BuildingInspectionStatus } from './building-inspection-list';
19
+ import { getBuildingInspectionForChecklist } from '../../graphql/building-inspection';
20
+ import { InspectionMode } from './component/inspection-document/inspection-request-document';
16
21
  let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist extends PageView {
17
22
  constructor() {
18
23
  super(...arguments);
@@ -33,6 +38,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
33
38
  .projectName=${this.project.name}
34
39
  .buildingName=${(_f = (_e = (_d = this.buildingInspection) === null || _d === void 0 ? void 0 : _d.buildingLevel) === null || _e === void 0 ? void 0 : _e.building) === null || _f === void 0 ? void 0 : _f.name}
35
40
  .buildingLevelFloor=${(_h = (_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.buildingLevel) === null || _h === void 0 ? void 0 : _h.floor}
41
+ .projectId=${this.project.id}
36
42
  ></building-inspection-detail-header>
37
43
 
38
44
  <div body>
@@ -40,8 +46,10 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
40
46
  <checklist-view
41
47
  .mode=${"EDITOR" /* ChecklistMode.EDITOR */}
42
48
  status=${this.buildingInspection.status}
49
+ .failCount=${this.buildingInspection.failCount || 0}
43
50
  .checklist=${this.buildingInspection.checklist || {}}
44
51
  .buildingComplex=${((_l = (_k = (_j = this.buildingInspection) === null || _j === void 0 ? void 0 : _j.buildingLevel) === null || _k === void 0 ? void 0 : _k.building) === null || _l === void 0 ? void 0 : _l.buildingComplex) || {}}
52
+ .projectType=${this.project.projectType}
45
53
  ></checklist-view>
46
54
  `)}
47
55
 
@@ -64,74 +72,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
64
72
  }
65
73
  async initBuildingInspection(buildingInspectionId = '') {
66
74
  var _a, _b, _c, _d;
67
- const response = await client.query({
68
- query: gql `
69
- query BuildingInspection($buildingInspectionId: String!) {
70
- buildingInspection(id: $buildingInspectionId) {
71
- id
72
- status
73
- requestDate
74
- checklist {
75
- id
76
- name
77
- constructionType
78
- constructionDetailType
79
- location
80
- inspectionParts
81
- documentNo
82
- constructionInspectionDate
83
- supervisorInspectionDate
84
- overallConstructorSignature
85
- taskConstructorSignature
86
- overallSupervisorySignature
87
- taskSupervisorySignature
88
- buildingInspection {
89
- status
90
- }
91
- checklistItems {
92
- id
93
- name
94
- sequence
95
- mainType
96
- detailType
97
- inspctionCriteria
98
- constructionConfirmStatus
99
- supervisoryConfirmStatus
100
- checklistItemCommentCount
101
- checklistItemAttachmentCount
102
- }
103
- }
104
- buildingLevel {
105
- id
106
- floor
107
- mainDrawing {
108
- id
109
- name
110
- fullpath
111
- }
112
- mainDrawingImage
113
- building {
114
- id
115
- name
116
- buildingComplex {
117
- id
118
- overallConstructorEmails
119
- taskConstructorEmails
120
- overallSupervisoryEmails
121
- taskSupervisoryEmails
122
- }
123
- }
124
- }
125
- }
126
- }
127
- `,
128
- variables: {
129
- buildingInspectionId
130
- }
131
- });
132
- if (response.errors)
133
- return;
134
- this.buildingInspection = response.data.buildingInspection;
75
+ this.buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId);
135
76
  await this._getProjectByBuildingComplexId((_d = (_c = (_b = (_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.buildingLevel) === null || _b === void 0 ? void 0 : _b.building) === null || _c === void 0 ? void 0 : _c.buildingComplex) === null || _d === void 0 ? void 0 : _d.id);
136
77
  }
137
78
  async _getProjectByBuildingComplexId(buildingComplexId) {
@@ -141,6 +82,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
141
82
  project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {
142
83
  id
143
84
  name
85
+ projectType
144
86
  }
145
87
  }
146
88
  `,
@@ -156,7 +98,18 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
156
98
  this.validateChecklist(this.buildingInspection.checklist);
157
99
  }
158
100
  async validateChecklist(checklist) {
159
- var _a, _b;
101
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
102
+ // 사용자 권한 체크
103
+ const email = (_b = (_a = store.getState().auth) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.email;
104
+ const isOverallConstructor = ((_g = (_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.overallConstructorEmails) === null || _g === void 0 ? void 0 : _g.includes(email)) || false;
105
+ const isOverallSupervisory = ((_m = (_l = (_k = (_j = (_h = this.buildingInspection) === null || _h === void 0 ? void 0 : _h.buildingLevel) === null || _j === void 0 ? void 0 : _j.building) === null || _k === void 0 ? void 0 : _k.buildingComplex) === null || _l === void 0 ? void 0 : _l.overallSupervisoryEmails) === null || _m === void 0 ? void 0 : _m.includes(email)) || false;
106
+ // 권한에 따라 적절한 문서 표시
107
+ if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_WAIT && isOverallConstructor) {
108
+ await this._showInspectionRequestDocument(checklist);
109
+ }
110
+ else if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_REQUEST && isOverallSupervisory) {
111
+ await this._showInspectionResultNotification(checklist);
112
+ }
160
113
  try {
161
114
  const result = await verifyBiometric();
162
115
  if (result.verified) {
@@ -171,6 +124,10 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
171
124
  notify({ message: 'Error during biometric verification:' + error });
172
125
  return;
173
126
  }
127
+ // 실명부 파일 업로드 처리 (새로 업로드된 경우만)
128
+ if (checklist.isNameListAttachmentUploaded) {
129
+ await this._uploadNameListFile(checklist);
130
+ }
174
131
  const response = await client.mutate({
175
132
  mutation: gql `
176
133
  mutation UpdateBuildingInspectionChecklist($buildingInspection: UpdateBuildingInspectionSubmitType!) {
@@ -180,12 +137,17 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
180
137
  variables: {
181
138
  buildingInspection: {
182
139
  id: this.buildingInspection.id,
140
+ requestDate: this._toISODate(this.buildingInspection.requestDate),
183
141
  checklist: {
184
142
  id: checklist.id,
185
143
  overallConstructorSignature: checklist.overallConstructorSignature,
186
144
  taskConstructorSignature: checklist.taskConstructorSignature,
187
145
  overallSupervisorySignature: checklist.overallSupervisorySignature,
188
- taskSupervisorySignature: checklist.taskSupervisorySignature
146
+ taskSupervisorySignature: checklist.taskSupervisorySignature,
147
+ inspectionRequestMemo: checklist.inspectionRequestMemo,
148
+ inspectionResultMemo: checklist.inspectionResultMemo,
149
+ inspectionResultStatus: checklist.inspectionResultStatus,
150
+ inspectionResultType: checklist.inspectionResultType
189
151
  },
190
152
  checklistItem: checklist.checklistItems.map(item => ({
191
153
  id: item.id,
@@ -200,7 +162,120 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
200
162
  this.initBuildingInspection(this.buildingInspection.id);
201
163
  }
202
164
  else {
203
- notify({ message: ((_b = (_a = response.errors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.message) || '검측 요청서 등록에 실패하였습니다.', level: 'error' });
165
+ notify({ message: ((_p = (_o = response.errors) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.message) || '검측 요청서 등록에 실패하였습니다.', level: 'error' });
166
+ }
167
+ }
168
+ // resolve 호출 전까지 싱크를 위해 Promise 사용
169
+ async _showInspectionRequestDocument(checklist) {
170
+ return new Promise(resolve => {
171
+ openPopup(html `
172
+ <inspection-request-document
173
+ .checklist=${checklist}
174
+ .buildingInspection=${this.buildingInspection}
175
+ .mode=${this.buildingInspection.status == BuildingInspectionStatus.PASS ? InspectionMode.VIEW : InspectionMode.EDIT}
176
+ @request-date-change=${this._onRequestDateChange.bind(this)}
177
+ @inspection-memo-change=${this._onInspectionMemoChange.bind(this)}
178
+ @name-list-file-selected=${(e) => {
179
+ // checklist에 선택된 파일 저장
180
+ checklist.nameListAttachment = e.detail.file;
181
+ checklist.isNameListAttachmentUploaded = true;
182
+ }}
183
+ @popup-close=${() => resolve()}
184
+ ></inspection-request-document>
185
+ `, { backdrop: true, size: 'large', title: '검측요청결과 통보내용' });
186
+ });
187
+ }
188
+ async _showInspectionResultNotification(checklist) {
189
+ return new Promise(resolve => {
190
+ openPopup(html `
191
+ <inspection-result-notification
192
+ .checklist=${checklist}
193
+ .buildingInspection=${this.buildingInspection}
194
+ .project=${this.project}
195
+ .mode=${this.buildingInspection.status == BuildingInspectionStatus.PASS ? InspectionMode.VIEW : InspectionMode.EDIT}
196
+ @inspection-result-change=${this._onInspectionResultChange.bind(this)}
197
+ @inspection-type-change=${this._onInspectionTypeChange.bind(this)}
198
+ @instructions-change=${this._onInstructionsChange.bind(this)}
199
+ @popup-close=${() => resolve()}
200
+ ></inspection-result-notification>
201
+ `, { backdrop: true, size: 'large', title: '검측 결과 통보' });
202
+ });
203
+ }
204
+ _toISODate(value) {
205
+ if (!value)
206
+ return undefined;
207
+ const d = typeof value === 'string' && /^\d+$/.test(value) ? new Date(Number(value)) : new Date(value);
208
+ return isNaN(d.getTime()) ? undefined : d.toISOString();
209
+ }
210
+ _onRequestDateChange(e) {
211
+ const { requestDate } = e.detail;
212
+ if (this.buildingInspection) {
213
+ this.buildingInspection.requestDate = requestDate;
214
+ }
215
+ this.requestUpdate();
216
+ }
217
+ _onInspectionMemoChange(e) {
218
+ var _a;
219
+ const { inspectionRequestMemo } = e.detail;
220
+ if ((_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) {
221
+ this.buildingInspection.checklist.inspectionRequestMemo = inspectionRequestMemo;
222
+ }
223
+ this.requestUpdate();
224
+ }
225
+ _onInspectionResultChange(e) {
226
+ var _a;
227
+ const { inspectionResultStatus } = e.detail;
228
+ // checklist 업데이트 (레퍼런스 유지하여 호출부 인자에도 반영)
229
+ if ((_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) {
230
+ this.buildingInspection.checklist.inspectionResultStatus = inspectionResultStatus;
231
+ }
232
+ this.requestUpdate();
233
+ }
234
+ _onInspectionTypeChange(e) {
235
+ var _a;
236
+ const { inspectionResultType } = e.detail;
237
+ // checklist 업데이트 (레퍼런스 유지)
238
+ if ((_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) {
239
+ this.buildingInspection.checklist.inspectionResultType = inspectionResultType;
240
+ }
241
+ this.requestUpdate();
242
+ }
243
+ _onInstructionsChange(e) {
244
+ var _a;
245
+ const { inspectionResultMemo } = e.detail;
246
+ // checklist 업데이트 (레퍼런스 유지)
247
+ if ((_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) {
248
+ this.buildingInspection.checklist.inspectionResultMemo = inspectionResultMemo;
249
+ }
250
+ this.requestUpdate();
251
+ }
252
+ // 실명부 파일 업로드
253
+ async _uploadNameListFile(checklist) {
254
+ var _a;
255
+ if (!checklist.isNameListAttachmentUploaded || !checklist.nameListAttachment) {
256
+ return;
257
+ }
258
+ const response = await client.mutate({
259
+ mutation: gql `
260
+ mutation CreateAttachments($attachments: [NewAttachment!]!) {
261
+ createAttachments(attachments: $attachments) {
262
+ id
263
+ }
264
+ }
265
+ `,
266
+ variables: {
267
+ attachments: [
268
+ {
269
+ file: checklist.nameListAttachment,
270
+ refBy: checklist.id,
271
+ refType: 'Checklist_NameList'
272
+ }
273
+ ]
274
+ },
275
+ context: { hasUpload: true }
276
+ });
277
+ if (response.errors) {
278
+ throw new Error(((_a = response.errors[0]) === null || _a === void 0 ? void 0 : _a.message) || '실명부 파일 업로드에 실패했습니다.');
204
279
  }
205
280
  }
206
281
  };
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection-detail-checklist.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-checklist.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM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;YACrB,MAAM,CAAC,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAA;YACvC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAA;QACzD,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA,MAAA,MAAA,QAAQ,CAAC,MAAM,0CAAG,CAAC,CAAC,0CAAE,OAAO,KAAI,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;QAC7F,CAAC;IACH,CAAC;;AAzOM,wCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCF;CACF,AArCY,CAqCZ;AAEQ;IAAR,KAAK,EAAE;;kEAAkB;AACjB;IAAR,KAAK,EAAE;;6EAA6B;AAzC1B,iCAAiC;IAD7C,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CA2O7C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\n\nimport { verifyBiometric } from '@things-factory/auth-base/dist-client'\n\nimport './component/building-inspection-detail-header'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { BuildingInspectionStatus } from './building-inspection-list'\n\n@customElement('building-inspection-detail-checklist')\nexport class BuildingInspectionDetailChecklist extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[body] {\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n gap: 10px;\n margin-right: 50px;\n margin-bottom: 15px;\n }\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\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 ${keyed(\n new Date(),\n html`\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n .buildingComplex=${this.buildingInspection?.buildingLevel?.building?.buildingComplex || {}}\n ></checklist-view>\n `\n )}\n\n <div button-container>\n <md-elevated-button\n ?disabled=${this.buildingInspection.status == BuildingInspectionStatus.PASS}\n @click=${this._onClickModifyChecklist}\n >\n <md-icon slot=\"icon\">assignment</md-icon>등록\n </md-elevated-button>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n const buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(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 name\n constructionType\n constructionDetailType\n location\n inspectionParts\n documentNo\n constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n buildingInspection {\n status\n }\n checklistItems {\n id\n name\n sequence\n mainType\n detailType\n inspctionCriteria\n constructionConfirmStatus\n supervisoryConfirmStatus\n checklistItemCommentCount\n checklistItemAttachmentCount\n }\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 overallConstructorEmails\n taskConstructorEmails\n overallSupervisoryEmails\n taskSupervisoryEmails\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 _onClickModifyChecklist() {\n this.validateChecklist(this.buildingInspection.checklist)\n }\n\n private async validateChecklist(checklist: any) {\n try {\n const result = await verifyBiometric()\n if (result.verified) {\n console.log('Verification successful. Proceeding with sensitive action.')\n } else {\n notify({ message: 'Verification failed:' + result.message })\n return\n }\n } catch (error) {\n notify({ message: 'Error during biometric verification:' + error })\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation UpdateBuildingInspectionChecklist($buildingInspection: UpdateBuildingInspectionSubmitType!) {\n updateBuildingInspectionChecklist(buildingInspection: $buildingInspection)\n }\n `,\n variables: {\n buildingInspection: {\n id: this.buildingInspection.id,\n checklist: {\n id: checklist.id,\n overallConstructorSignature: checklist.overallConstructorSignature,\n taskConstructorSignature: checklist.taskConstructorSignature,\n overallSupervisorySignature: checklist.overallSupervisorySignature,\n taskSupervisorySignature: checklist.taskSupervisorySignature\n },\n checklistItem: checklist.checklistItems.map(item => ({\n id: item.id,\n constructionConfirmStatus: item.constructionConfirmStatus,\n supervisoryConfirmStatus: item.supervisoryConfirmStatus\n }))\n }\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.initBuildingInspection(this.buildingInspection.id)\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n}\n"]}
1
+ {"version":3,"file":"building-inspection-detail-checklist.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-checklist.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAEvE,OAAO,+CAA+C,CAAA;AACtD,OAAO,6DAA6D,CAAA;AACpE,OAAO,gEAAgE,CAAA;AACvE,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,EAA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E,EAAE,SAAS,EAAE,IAAI,EAAE;SAC7B,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,CAAA,MAAA,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,0CAAE,OAAO,KAAI,qBAAqB,CAAC,CAAA;QACvE,CAAC;IACH,CAAC;;AA7TM,wCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCF;CACF,AArCY,CAqCZ;AAEQ;IAAR,KAAK,EAAE;;kEAAkB;AACjB;IAAR,KAAK,EAAE;;6EAA6B;AAzC1B,iCAAiC;IAD7C,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CA+T7C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify, openPopup } from '@operato/layout'\nimport { store } from '@operato/shell'\nimport gql from 'graphql-tag'\n\nimport { verifyBiometric } from '@things-factory/auth-base/dist-client'\n\nimport './component/building-inspection-detail-header'\nimport './component/inspection-document/inspection-request-document'\nimport './component/inspection-document/inspection-result-notification'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { BuildingInspectionStatus } from './building-inspection-list'\nimport { getBuildingInspectionForChecklist } from '../../graphql/building-inspection'\nimport { InspectionMode } from './component/inspection-document/inspection-request-document'\n\n@customElement('building-inspection-detail-checklist')\nexport class BuildingInspectionDetailChecklist extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[body] {\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n gap: 10px;\n margin-right: 50px;\n margin-bottom: 15px;\n }\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\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 .projectId=${this.project.id}\n ></building-inspection-detail-header>\n\n <div body>\n ${keyed(\n new Date(),\n html`\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .failCount=${this.buildingInspection.failCount || 0}\n .checklist=${this.buildingInspection.checklist || {}}\n .buildingComplex=${this.buildingInspection?.buildingLevel?.building?.buildingComplex || {}}\n .projectType=${this.project.projectType}\n ></checklist-view>\n `\n )}\n\n <div button-container>\n <md-elevated-button\n ?disabled=${this.buildingInspection.status == BuildingInspectionStatus.PASS}\n @click=${this._onClickModifyChecklist}\n >\n <md-icon slot=\"icon\">assignment</md-icon>등록\n </md-elevated-button>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n const buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n this.buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\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 projectType\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 _onClickModifyChecklist() {\n this.validateChecklist(this.buildingInspection.checklist)\n }\n\n private async validateChecklist(checklist: any) {\n // 사용자 권한 체크\n const email = (store.getState() as any).auth?.user?.email\n const isOverallConstructor =\n this.buildingInspection?.buildingLevel?.building?.buildingComplex?.overallConstructorEmails?.includes(email) || false\n const isOverallSupervisory =\n this.buildingInspection?.buildingLevel?.building?.buildingComplex?.overallSupervisoryEmails?.includes(email) || false\n\n // 권한에 따라 적절한 문서 표시\n if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_WAIT && isOverallConstructor) {\n await this._showInspectionRequestDocument(checklist)\n } else if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_REQUEST && isOverallSupervisory) {\n await this._showInspectionResultNotification(checklist)\n }\n\n try {\n const result = await verifyBiometric()\n if (result.verified) {\n console.log('Verification successful. Proceeding with sensitive action.')\n } else {\n notify({ message: 'Verification failed:' + result.message })\n return\n }\n } catch (error) {\n notify({ message: 'Error during biometric verification:' + error })\n return\n }\n\n // 실명부 파일 업로드 처리 (새로 업로드된 경우만)\n if (checklist.isNameListAttachmentUploaded) {\n await this._uploadNameListFile(checklist)\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation UpdateBuildingInspectionChecklist($buildingInspection: UpdateBuildingInspectionSubmitType!) {\n updateBuildingInspectionChecklist(buildingInspection: $buildingInspection)\n }\n `,\n variables: {\n buildingInspection: {\n id: this.buildingInspection.id,\n requestDate: this._toISODate(this.buildingInspection.requestDate),\n checklist: {\n id: checklist.id,\n overallConstructorSignature: checklist.overallConstructorSignature,\n taskConstructorSignature: checklist.taskConstructorSignature,\n overallSupervisorySignature: checklist.overallSupervisorySignature,\n taskSupervisorySignature: checklist.taskSupervisorySignature,\n inspectionRequestMemo: checklist.inspectionRequestMemo,\n inspectionResultMemo: checklist.inspectionResultMemo,\n inspectionResultStatus: checklist.inspectionResultStatus,\n inspectionResultType: checklist.inspectionResultType\n },\n checklistItem: checklist.checklistItems.map(item => ({\n id: item.id,\n constructionConfirmStatus: item.constructionConfirmStatus,\n supervisoryConfirmStatus: item.supervisoryConfirmStatus\n }))\n }\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.initBuildingInspection(this.buildingInspection.id)\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // resolve 호출 전까지 싱크를 위해 Promise 사용\n private async _showInspectionRequestDocument(checklist: any): Promise<void> {\n return new Promise(resolve => {\n openPopup(\n html`\n <inspection-request-document\n .checklist=${checklist}\n .buildingInspection=${this.buildingInspection}\n .mode=${this.buildingInspection.status == BuildingInspectionStatus.PASS ? InspectionMode.VIEW : InspectionMode.EDIT}\n @request-date-change=${this._onRequestDateChange.bind(this)}\n @inspection-memo-change=${this._onInspectionMemoChange.bind(this)}\n @name-list-file-selected=${(e: CustomEvent) => {\n // checklist에 선택된 파일 저장\n checklist.nameListAttachment = e.detail.file\n checklist.isNameListAttachmentUploaded = true\n }}\n @popup-close=${() => resolve()}\n ></inspection-request-document>\n `,\n { backdrop: true, size: 'large', title: '검측요청결과 통보내용' }\n )\n })\n }\n\n private async _showInspectionResultNotification(checklist: any): Promise<void> {\n return new Promise(resolve => {\n openPopup(\n html`\n <inspection-result-notification\n .checklist=${checklist}\n .buildingInspection=${this.buildingInspection}\n .project=${this.project}\n .mode=${this.buildingInspection.status == BuildingInspectionStatus.PASS ? InspectionMode.VIEW : InspectionMode.EDIT}\n @inspection-result-change=${this._onInspectionResultChange.bind(this)}\n @inspection-type-change=${this._onInspectionTypeChange.bind(this)}\n @instructions-change=${this._onInstructionsChange.bind(this)}\n @popup-close=${() => resolve()}\n ></inspection-result-notification>\n `,\n { backdrop: true, size: 'large', title: '검측 결과 통보' }\n )\n })\n }\n\n private _toISODate(value: any): string | undefined {\n if (!value) return undefined\n const d = typeof value === 'string' && /^\\d+$/.test(value) ? new Date(Number(value)) : new Date(value)\n return isNaN(d.getTime()) ? undefined : d.toISOString()\n }\n\n private _onRequestDateChange(e: CustomEvent) {\n const { requestDate } = e.detail\n if (this.buildingInspection) {\n this.buildingInspection.requestDate = requestDate\n }\n this.requestUpdate()\n }\n\n private _onInspectionMemoChange(e: CustomEvent) {\n const { inspectionRequestMemo } = e.detail\n if (this.buildingInspection?.checklist) {\n this.buildingInspection.checklist.inspectionRequestMemo = inspectionRequestMemo\n }\n this.requestUpdate()\n }\n\n private _onInspectionResultChange(e: CustomEvent) {\n const { inspectionResultStatus } = e.detail\n // checklist 업데이트 (레퍼런스 유지하여 호출부 인자에도 반영)\n if (this.buildingInspection?.checklist) {\n this.buildingInspection.checklist.inspectionResultStatus = inspectionResultStatus\n }\n this.requestUpdate()\n }\n\n private _onInspectionTypeChange(e: CustomEvent) {\n const { inspectionResultType } = e.detail\n // checklist 업데이트 (레퍼런스 유지)\n if (this.buildingInspection?.checklist) {\n this.buildingInspection.checklist.inspectionResultType = inspectionResultType\n }\n this.requestUpdate()\n }\n\n private _onInstructionsChange(e: CustomEvent) {\n const { inspectionResultMemo } = e.detail\n // checklist 업데이트 (레퍼런스 유지)\n if (this.buildingInspection?.checklist) {\n this.buildingInspection.checklist.inspectionResultMemo = inspectionResultMemo\n }\n this.requestUpdate()\n }\n\n // 실명부 파일 업로드\n private async _uploadNameListFile(checklist: any) {\n if (!checklist.isNameListAttachmentUploaded || !checklist.nameListAttachment) {\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateAttachments($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n }\n }\n `,\n variables: {\n attachments: [\n {\n file: checklist.nameListAttachment,\n refBy: checklist.id,\n refType: 'Checklist_NameList'\n }\n ]\n },\n context: { hasUpload: true }\n })\n\n if (response.errors) {\n throw new Error(response.errors[0]?.message || '실명부 파일 업로드에 실패했습니다.')\n }\n }\n}\n"]}
@@ -31,5 +31,6 @@ export declare class BuildingInspectionDetailDrawing extends BuildingInspectionD
31
31
  initBuildingInspection(buildingInspectionId?: string): Promise<void>;
32
32
  private _getProjectByBuildingComplexId;
33
33
  private onClickMarkerSave;
34
+ private parseBoxCoordinates;
34
35
  }
35
36
  export {};
@@ -50,26 +50,44 @@ let BuildingInspectionDetailDrawing = class BuildingInspectionDetailDrawing exte
50
50
  .projectName=${this.project.name}
51
51
  .buildingName=${(_f = (_e = (_d = this.buildingInspection) === null || _d === void 0 ? void 0 : _d.buildingLevel) === null || _e === void 0 ? void 0 : _e.building) === null || _f === void 0 ? void 0 : _f.name}
52
52
  .buildingLevelFloor=${(_h = (_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.buildingLevel) === null || _h === void 0 ? void 0 : _h.floor}
53
+ .projectId=${this.project.id}
53
54
  ></building-inspection-detail-header>
54
55
 
55
56
  <div
56
57
  body
57
58
  @link-clicked=${async (e) => {
58
59
  const { link } = e.detail;
59
- const { id, type, symbol, box, dwgId } = JSON.parse(link);
60
- const [x, y, width, height] = (box === null || box === void 0 ? void 0 : box.split(',').map(Number)) || [];
60
+ const { id, type, symbol, box, dwgId } = JSON.parse(link) || {};
61
+ // 좌표 파싱 유효성 검증
62
+ const coordinates = this.parseBoxCoordinates(box, {
63
+ id,
64
+ type,
65
+ symbol,
66
+ dwgId,
67
+ currentPdfId: this.linkUrl || 'unknown',
68
+ buildingInspectionId: this.buildingInspectionId
69
+ });
61
70
  this.linkUrl = `DWGID:${dwgId}`;
62
- this.linkShapes = [
63
- {
64
- id: id,
65
- type: 'link',
66
- x,
67
- y,
68
- width,
69
- height,
70
- link: '{}'
71
- }
72
- ];
71
+ // 유효한 좌표가 있으면 마커 표시, 없으면 빈 배열
72
+ if (coordinates) {
73
+ this.linkShapes = [
74
+ Object.assign(Object.assign({ id: id || 'unknown', type: 'link' }, coordinates), { link: JSON.stringify({ id, type, symbol, dwgId }) })
75
+ ];
76
+ }
77
+ else {
78
+ // 좌표가 유효하지 않아도 팝업은 열고 마커만 숨김
79
+ this.linkShapes = [];
80
+ console.warn('Invalid link coordinates, popup will open without marker:', {
81
+ box,
82
+ id,
83
+ type,
84
+ symbol,
85
+ dwgId,
86
+ currentPdfId: this.linkUrl || 'unknown',
87
+ buildingInspectionId: this.buildingInspectionId,
88
+ fullLink: link
89
+ });
90
+ }
73
91
  if (this.dialog) {
74
92
  this.dialog.showModal();
75
93
  requestAnimationFrame(() => {
@@ -203,7 +221,7 @@ let BuildingInspectionDetailDrawing = class BuildingInspectionDetailDrawing exte
203
221
  async onClickMarkerSave(e) {
204
222
  const response = await client.query({
205
223
  query: gql `
206
- mutation UpdateBuildingInspection($patch: UpdateBuildingInspectionDrawingMarker!) {
224
+ mutation UpdateBuildingInspection($patch: UpdateBuildingInspection!) {
207
225
  updateBuildingInspection(patch: $patch) {
208
226
  id
209
227
  drawingMarker
@@ -221,6 +239,52 @@ let BuildingInspectionDetailDrawing = class BuildingInspectionDetailDrawing exte
221
239
  return;
222
240
  notify({ message: '저장되었습니다.' });
223
241
  }
242
+ parseBoxCoordinates(box, context = {}) {
243
+ if (!box || typeof box !== 'string') {
244
+ console.warn('Invalid box coordinate for link:', {
245
+ box,
246
+ context,
247
+ reason: 'Box is undefined, null, or not a string'
248
+ });
249
+ return null;
250
+ }
251
+ try {
252
+ const coords = box.split(',').map(str => {
253
+ const num = Number(str.trim());
254
+ return Number.isFinite(num) ? num : NaN;
255
+ });
256
+ if (coords.length !== 4 || coords.some(coord => isNaN(coord))) {
257
+ console.warn('Box coordinate should have 4 valid numbers:', {
258
+ box,
259
+ parsedCoords: coords,
260
+ context,
261
+ reason: `Expected 4 numbers, got ${coords.length} values with NaN: ${coords.some(coord => isNaN(coord))}`
262
+ });
263
+ return null;
264
+ }
265
+ const [x, y, width, height] = coords;
266
+ // width, height가 0 이하면 유효하지 않음
267
+ if (width <= 0 || height <= 0) {
268
+ console.warn('Invalid width or height for link:', {
269
+ box,
270
+ coords: { x, y, width, height },
271
+ context,
272
+ reason: `Width (${width}) or height (${height}) is <= 0`
273
+ });
274
+ return null;
275
+ }
276
+ return { x, y, width, height };
277
+ }
278
+ catch (error) {
279
+ console.warn('Error parsing box coordinates:', {
280
+ box,
281
+ context,
282
+ error: error instanceof Error ? error.message : String(error),
283
+ reason: 'Exception thrown during parsing'
284
+ });
285
+ return null;
286
+ }
287
+ }
224
288
  };
225
289
  BuildingInspectionDetailDrawing.styles = [
226
290
  ScrollbarStyles,
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection-detail-drawing.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-drawing.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0CAA0C,CAAA;AACjD,OAAO,+CAA+C,CAAA;AAEtD,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,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,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;AAGxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wEAAwE,CAAA;AAE7G,OAAO,+CAA+C,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE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-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\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'\nimport { Shape } from '@operato/image-marker'\n\nimport { DrawingImageProvider } from '@dssp/drawing/dist-client/drawing-management/drawing-image-provider.js'\n\nimport './component/building-inspection-detail-header'\nimport { BuildingInspectionStatus } from './building-inspection-list'\n\n@customElement('building-inspection-detail-drawing')\nexport class BuildingInspectionDetailDrawing extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n div[body] {\n display: flex;\n justify-content: center;\n\n ox-image-marker-view {\n width: 100%;\n }\n }\n\n dialog ox-image-marker-view {\n width: 80vw;\n height: 80vh;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() imageUrl?: string\n @state() shapes: Shape[] = []\n @state() linkUrl?: string\n @state() linkShapes: Shape[] = []\n\n @state() drawingImageProvider: DrawingImageProvider = new DrawingImageProvider()\n // @consume({ context: OxUserPreferencesContext, subscribe: true })\n\n @query('#image-marker') imageMarker!: any\n @query('#link-viewer') linkViewer!: any\n @query('dialog') dialog!: HTMLDialogElement\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 도면'\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n\n requestAnimationFrame(() => {\n this.dialog.addEventListener('click', event => {\n const rect = this.dialog.getBoundingClientRect()\n const isInDialog =\n rect.top <= event.clientY && event.clientY <= rect.bottom && rect.left <= event.clientX && event.clientX <= rect.right\n\n // 다이아로그 내부를 클릭한 것이 아니면 다이아로그 닫기\n if (!isInDialog) {\n this.dialog.close()\n }\n })\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\n body\n @link-clicked=${async (e: CustomEvent) => {\n const { link } = e.detail\n const { id, type, symbol, box, dwgId } = JSON.parse(link)\n const [x, y, width, height] = box?.split(',').map(Number) || []\n\n this.linkUrl = `DWGID:${dwgId}`\n this.linkShapes = [\n {\n id: id!,\n type: 'link',\n x,\n y,\n width,\n height,\n link: '{}'\n }\n ]\n\n if (this.dialog) {\n this.dialog.showModal()\n\n requestAnimationFrame(() => {\n this.linkViewer.reset()\n })\n }\n }}\n >\n ${this.buildingInspection?.status == BuildingInspectionStatus.PASS\n ? html`<ox-image-marker-view\n id=\"image-marker\"\n .imageUrl=${this.imageUrl}\n .shapes=${this.shapes}\n .imageProvider=${this.drawingImageProvider}\n ></ox-image-marker-view>`\n : html` <ox-image-marker\n id=\"image-marker\"\n .imageUrl=${this.imageUrl}\n .shapes=${this.shapes}\n .imageProvider=${this.drawingImageProvider}\n @shapes-changed=${this.onClickMarkerSave}\n .currentMode=${'view'}\n ></ox-image-marker>`}\n </div>\n\n <dialog>\n <ox-image-marker-view\n id=\"link-viewer\"\n .imageUrl=${this.linkUrl}\n .shapes=${this.linkShapes}\n .imageProvider=${this.drawingImageProvider}\n ></ox-image-marker-view>\n </dialog>\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {\n if (changes.has('buildingInspection') && this.buildingInspection?.checklist) {\n // 1-1. 위치 정보 - 체크리스트에 들어가는 위치정보 텍스트\n const location_1 = this.buildingInspection.checklist?.location\n\n // 1-2. 위치 정보 - 실제 위치정보 텍스트 (동 + 층) - ID 필드를 사용하면 DB ID 필드입니다.\n const location_building = this.buildingInspection.buildingLevel.building.name\n const location_floor = this.buildingInspection.buildingLevel.floor\n\n // 2. 평면도 pdf 파일\n // mainDrawing {\n // id\n // name\n // fullpath\n // }\n const mainDrawing = this.buildingInspection.buildingLevel.mainDrawing\n\n // 3. 선택 도면\n const inspectionDrawingType = this.buildingInspection.checklist.inspectionDrawingType\n\n const shapes = JSON.parse(this.buildingInspection?.drawingMarker || null) || []\n const markers = await this.drawingImageProvider.getMarkers(inspectionDrawingType)\n\n this.imageUrl = String(inspectionDrawingType).normalize('NFC')\n this.shapes = [...shapes, ...markers]\n }\n }\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 this.imageMarker?.reset()\n } else {\n this.dialog?.close()\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 async onClickMarkerSave(e) {\n const response = await client.query({\n query: gql`\n mutation UpdateBuildingInspection($patch: UpdateBuildingInspectionDrawingMarker!) {\n updateBuildingInspection(patch: $patch) {\n id\n drawingMarker\n }\n }\n `,\n variables: {\n patch: {\n id: this.buildingInspectionId,\n drawingMarker: JSON.stringify(e.detail)\n }\n }\n })\n\n if (response.errors) return\n\n notify({ message: '저장되었습니다.' })\n }\n}\n"]}
1
+ {"version":3,"file":"building-inspection-detail-drawing.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-drawing.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0CAA0C,CAAA;AACjD,OAAO,+CAA+C,CAAA;AAEtD,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,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,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;AAGxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wEAAwE,CAAA;AAE7G,OAAO,+CAA+C,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAG9D,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAA3E;;QAkCI,YAAO,GAAQ,EAAE,CAAA;QACjB,uBAAkB,GAAQ,EAAE,CAAA;QAC5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OAAO;gBACP,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;gBAC7D,MAAM,EAAE,iCAAiC;aAC1C,CAAC,CAAA;YACF,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;;AAjWM,sCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BF;CACF,AA/BY,CA+BZ;AAEQ;IAAR,KAAK,EAAE;;gEAAkB;AACjB;IAAR,KAAK,EAAE;;2EAA6B;AAC5B;IAAR,KAAK,EAAE;;6EAAkC;AACjC;IAAR,KAAK,EAAE;;iEAAkB;AACjB;IAAR,KAAK,EAAE;;+DAAqB;AACpB;IAAR,KAAK,EAAE;;gEAAiB;AAChB;IAAR,KAAK,EAAE;;mEAAyB;AAExB;IAAR,KAAK,EAAE;8BAAuB,oBAAoB;6EAA6B;AAGxD;IAAvB,KAAK,CAAC,eAAe,CAAC;;oEAAkB;AAClB;IAAtB,KAAK,CAAC,cAAc,CAAC;;mEAAiB;AACtB;IAAhB,KAAK,CAAC,QAAQ,CAAC;8BAAU,iBAAiB;+DAAA;AA/ChC,+BAA+B;IAD3C,aAAa,CAAC,oCAAoC,CAAC;GACvC,+BAA+B,CAmW3C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/image-marker/ox-image-marker.js'\nimport '@operato/image-marker/ox-image-marker-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\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'\nimport { Shape } from '@operato/image-marker'\n\nimport { DrawingImageProvider } from '@dssp/drawing/dist-client/drawing-management/drawing-image-provider.js'\n\nimport './component/building-inspection-detail-header'\nimport { BuildingInspectionStatus } from './building-inspection-list'\n\n@customElement('building-inspection-detail-drawing')\nexport class BuildingInspectionDetailDrawing extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n div[body] {\n display: flex;\n justify-content: center;\n\n ox-image-marker-view {\n width: 100%;\n }\n }\n\n dialog ox-image-marker-view {\n width: 80vw;\n height: 80vh;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() imageUrl?: string\n @state() shapes: Shape[] = []\n @state() linkUrl?: string\n @state() linkShapes: Shape[] = []\n\n @state() drawingImageProvider: DrawingImageProvider = new DrawingImageProvider()\n // @consume({ context: OxUserPreferencesContext, subscribe: true })\n\n @query('#image-marker') imageMarker!: any\n @query('#link-viewer') linkViewer!: any\n @query('dialog') dialog!: HTMLDialogElement\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 도면'\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n\n requestAnimationFrame(() => {\n this.dialog.addEventListener('click', event => {\n const rect = this.dialog.getBoundingClientRect()\n const isInDialog =\n rect.top <= event.clientY && event.clientY <= rect.bottom && rect.left <= event.clientX && event.clientX <= rect.right\n\n // 다이아로그 내부를 클릭한 것이 아니면 다이아로그 닫기\n if (!isInDialog) {\n this.dialog.close()\n }\n })\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 .projectId=${this.project.id}\n ></building-inspection-detail-header>\n\n <div\n body\n @link-clicked=${async (e: CustomEvent) => {\n const { link } = e.detail\n const { id, type, symbol, box, dwgId } = JSON.parse(link) || {}\n\n // 좌표 파싱 및 유효성 검증\n const coordinates = this.parseBoxCoordinates(box, {\n id,\n type,\n symbol,\n dwgId,\n currentPdfId: this.linkUrl || 'unknown',\n buildingInspectionId: this.buildingInspectionId\n })\n\n this.linkUrl = `DWGID:${dwgId}`\n\n // 유효한 좌표가 있으면 마커 표시, 없으면 빈 배열\n if (coordinates) {\n this.linkShapes = [\n {\n id: id || 'unknown',\n type: 'link' as const,\n ...coordinates,\n link: JSON.stringify({ id, type, symbol, dwgId })\n }\n ]\n } else {\n // 좌표가 유효하지 않아도 팝업은 열고 마커만 숨김\n this.linkShapes = []\n console.warn('Invalid link coordinates, popup will open without marker:', {\n box,\n id,\n type,\n symbol,\n dwgId,\n currentPdfId: this.linkUrl || 'unknown',\n buildingInspectionId: this.buildingInspectionId,\n fullLink: link\n })\n }\n\n if (this.dialog) {\n this.dialog.showModal()\n\n requestAnimationFrame(() => {\n this.linkViewer.reset()\n })\n }\n }}\n >\n ${this.buildingInspection?.status == BuildingInspectionStatus.PASS\n ? html`<ox-image-marker-view\n id=\"image-marker\"\n .imageUrl=${this.imageUrl}\n .shapes=${this.shapes}\n .imageProvider=${this.drawingImageProvider}\n ></ox-image-marker-view>`\n : html` <ox-image-marker\n id=\"image-marker\"\n .imageUrl=${this.imageUrl}\n .shapes=${this.shapes}\n .imageProvider=${this.drawingImageProvider}\n @shapes-changed=${this.onClickMarkerSave}\n .currentMode=${'view'}\n ></ox-image-marker>`}\n </div>\n\n <dialog>\n <ox-image-marker-view\n id=\"link-viewer\"\n .imageUrl=${this.linkUrl}\n .shapes=${this.linkShapes}\n .imageProvider=${this.drawingImageProvider}\n ></ox-image-marker-view>\n </dialog>\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {\n if (changes.has('buildingInspection') && this.buildingInspection?.checklist) {\n // 1-1. 위치 정보 - 체크리스트에 들어가는 위치정보 텍스트\n const location_1 = this.buildingInspection.checklist?.location\n\n // 1-2. 위치 정보 - 실제 위치정보 텍스트 (동 + 층) - ID 필드를 사용하면 DB ID 필드입니다.\n const location_building = this.buildingInspection.buildingLevel.building.name\n const location_floor = this.buildingInspection.buildingLevel.floor\n\n // 2. 평면도 pdf 파일\n // mainDrawing {\n // id\n // name\n // fullpath\n // }\n const mainDrawing = this.buildingInspection.buildingLevel.mainDrawing\n\n // 3. 선택 도면\n const inspectionDrawingType = this.buildingInspection.checklist.inspectionDrawingType\n\n const shapes = JSON.parse(this.buildingInspection?.drawingMarker || null) || []\n const markers = await this.drawingImageProvider.getMarkers(inspectionDrawingType)\n\n this.imageUrl = String(inspectionDrawingType).normalize('NFC')\n this.shapes = [...shapes, ...markers]\n }\n }\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 this.imageMarker?.reset()\n } else {\n this.dialog?.close()\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 async onClickMarkerSave(e) {\n const response = await client.query({\n query: gql`\n mutation UpdateBuildingInspection($patch: UpdateBuildingInspection!) {\n updateBuildingInspection(patch: $patch) {\n id\n drawingMarker\n }\n }\n `,\n variables: {\n patch: {\n id: this.buildingInspectionId,\n drawingMarker: JSON.stringify(e.detail)\n }\n }\n })\n\n if (response.errors) return\n\n notify({ message: '저장되었습니다.' })\n }\n\n private parseBoxCoordinates(\n box: string | undefined,\n context: {\n id?: string\n type?: string\n symbol?: string\n dwgId?: string\n currentPdfId?: string\n buildingInspectionId?: string\n } = {}\n ): {\n x: number\n y: number\n width: number\n height: number\n } | null {\n if (!box || typeof box !== 'string') {\n console.warn('Invalid box coordinate for link:', {\n box,\n context,\n reason: 'Box is undefined, null, or not a string'\n })\n return null\n }\n\n try {\n const coords = box.split(',').map(str => {\n const num = Number(str.trim())\n return Number.isFinite(num) ? num : NaN\n })\n\n if (coords.length !== 4 || coords.some(coord => isNaN(coord))) {\n console.warn('Box coordinate should have 4 valid numbers:', {\n box,\n parsedCoords: coords,\n context,\n reason: `Expected 4 numbers, got ${coords.length} values with NaN: ${coords.some(coord => isNaN(coord))}`\n })\n return null\n }\n\n const [x, y, width, height] = coords\n\n // width, height가 0 이하면 유효하지 않음\n if (width <= 0 || height <= 0) {\n console.warn('Invalid width or height for link:', {\n box,\n coords: { x, y, width, height },\n context,\n reason: `Width (${width}) or height (${height}) is <= 0`\n })\n return null\n }\n\n return { x, y, width, height }\n } catch (error) {\n console.warn('Error parsing box coordinates:', {\n box,\n context,\n error: error instanceof Error ? error.message : String(error),\n reason: 'Exception thrown during parsing'\n })\n return null\n }\n }\n}\n"]}
@@ -1,10 +1,15 @@
1
1
  import '@material/web/icon/icon.js';
2
2
  import '@operato/data-grist';
3
+ import '@operato/image-marker/ox-image-marker-view.js';
3
4
  import { PageView } from '@operato/shell';
4
- import { TemplateResult } from 'lit';
5
5
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
6
6
  import { FetchOption } from '@operato/data-grist';
7
7
  import './inspection-create-popup';
8
+ import './component/inspection-document/photo-album-popup';
9
+ import './component/inspection-document/inspection-request-document';
10
+ import './component/inspection-document/inspection-result-notification';
11
+ import './component/image-preview-popup';
12
+ import './component/daily-worklog-popup';
8
13
  import '@operato/event-view/ox-event-view.js';
9
14
  import { EventProvider } from '@operato/event-view';
10
15
  export declare enum ChecklistTypeMainType {
@@ -31,6 +36,14 @@ export declare const BUILDING_INSPECTION_STATUS_DISPLAY: {
31
36
  PASS: string;
32
37
  FAIL: string;
33
38
  };
39
+ export declare const BUILDING_INSPECTION_RE_STATUS_DISPLAY: {
40
+ WAIT: string;
41
+ OVERALL_WAIT: string;
42
+ REQUEST: string;
43
+ OVERALL_REQUEST: string;
44
+ PASS: string;
45
+ FAIL: string;
46
+ };
34
47
  declare const BuildingInspectionList_base: typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
35
48
  export declare class BuildingInspectionList extends BuildingInspectionList_base {
36
49
  static styles: import("lit").CSSResult[];
@@ -43,6 +56,9 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
43
56
  drawingImage: string;
44
57
  buildingInspectionSummary: any;
45
58
  calendarData?: EventProvider;
59
+ selectedYearMonth: string;
60
+ selectedDate?: string;
61
+ dailyWorklog: any;
46
62
  private grist;
47
63
  private eventView;
48
64
  get context(): {
@@ -59,7 +75,7 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
59
75
  action: () => void;
60
76
  }[];
61
77
  };
62
- render(): TemplateResult<1>;
78
+ render(): import("lit-html").TemplateResult<1>;
63
79
  pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
64
80
  initProject(buildingLevelId?: string): Promise<void>;
65
81
  pageInitialized(lifecycle: any): Promise<void>;
@@ -70,5 +86,13 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
70
86
  private _deleteChecklistType;
71
87
  private _openCreateInspection;
72
88
  private _formatDate;
89
+ private _openChecklistPopup;
90
+ _openPhotoAlbumPopup(checklistId: string): Promise<void>;
91
+ _openInspectionRequestDocument(buildingInspectionId: string): Promise<void>;
92
+ private _showNameListPreview;
93
+ private _openDailyWorklogPopup;
94
+ private _refreshCalendar;
95
+ private _fetchDailyWorklog;
96
+ private _openDrawingPopup;
73
97
  }
74
98
  export {};