@dssp/supervision 1.0.0-y.0 → 1.0.1

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 (265) hide show
  1. package/dist-client/graphql/building-inspection.js +3 -1
  2. package/dist-client/graphql/building-inspection.js.map +1 -1
  3. package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -2
  4. package/dist-client/pages/action-plan/action-plan-list-page.js +1 -2
  5. package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
  6. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +2 -0
  7. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -1
  8. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +53 -39
  9. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +1108 -526
  10. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -1
  11. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.d.ts +59 -0
  12. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js +868 -0
  13. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js.map +1 -0
  14. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +1 -0
  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 +2 -0
  17. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +17 -0
  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.js +1 -0
  20. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  21. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +8 -0
  22. package/dist-client/pages/building-inspection/building-inspection-list.js +17 -7
  23. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  24. package/dist-client/pages/building-inspection/building-inspection-management.d.ts +82 -0
  25. package/dist-client/pages/building-inspection/building-inspection-management.js +1527 -0
  26. package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -0
  27. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +0 -3
  28. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +20 -75
  29. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
  30. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.d.ts +18 -0
  31. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js +630 -0
  32. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js.map +1 -0
  33. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.d.ts +10 -0
  34. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js +219 -0
  35. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js.map +1 -0
  36. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.d.ts +25 -0
  37. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js +546 -0
  38. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js.map +1 -0
  39. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.d.ts +42 -0
  40. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js +738 -0
  41. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js.map +1 -0
  42. package/dist-client/pages/building-inspection/component/image-preview-popup.js +0 -3
  43. package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -1
  44. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +5 -0
  45. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +62 -3
  46. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -1
  47. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +1 -0
  48. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +8 -2
  49. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -1
  50. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +3 -2
  51. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +131 -34
  52. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  53. package/dist-client/pages/building-inspection/inspection-create-popup.js +5 -4
  54. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  55. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +4 -0
  56. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +844 -0
  57. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
  58. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +8 -5
  59. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
  60. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +1 -1
  61. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
  62. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +2 -2
  63. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +1 -1
  64. package/dist-client/pages/checklist/attachment-list-popup.js +1 -2
  65. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
  66. package/dist-client/pages/checklist/checklist-view.d.ts +1 -0
  67. package/dist-client/pages/checklist/checklist-view.js +219 -31
  68. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  69. package/dist-client/pages/checklist/comment-list-popup.js +1 -2
  70. package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
  71. package/dist-client/pages/checklist/inspection-info-popup.d.ts +1 -2
  72. package/dist-client/pages/checklist/inspection-info-popup.js +1 -2
  73. package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -1
  74. package/dist-client/pages/checklist/inspection-tab-popup.js +1 -1
  75. package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -1
  76. package/dist-client/pages/checklist/kcs-criteria-popup.d.ts +16 -0
  77. package/dist-client/pages/checklist/kcs-criteria-popup.js +179 -0
  78. package/dist-client/pages/checklist/kcs-criteria-popup.js.map +1 -0
  79. package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
  80. package/dist-client/pages/checklist-database/checklist-database.js +540 -0
  81. package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
  82. package/dist-client/pages/checklist-template/checklist-template-item.js +25 -0
  83. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
  84. package/dist-client/pages/checklist-template/checklist-template-list.js +2 -1
  85. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  86. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
  87. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +223 -0
  88. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
  89. package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
  90. package/dist-client/pages/checklist-template/construction-checklist-template-list.js +404 -0
  91. package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
  92. package/dist-client/pages/issue/issue-list-page.d.ts +1 -2
  93. package/dist-client/pages/issue/issue-list-page.js +1 -2
  94. package/dist-client/pages/issue/issue-list-page.js.map +1 -1
  95. package/dist-client/pages/project-checklist/project-checklist-management.d.ts +62 -0
  96. package/dist-client/pages/project-checklist/project-checklist-management.js +1145 -0
  97. package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
  98. package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -2
  99. package/dist-client/pages/project-report/project-report-list-page.js +1 -2
  100. package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
  101. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -2
  102. package/dist-client/pages/supervisor/supervisor-list-page.js +1 -2
  103. package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
  104. package/dist-client/route.d.ts +1 -1
  105. package/dist-client/route.js +12 -0
  106. package/dist-client/route.js.map +1 -1
  107. package/dist-client/stt/speech-to-text.d.ts +13 -8
  108. package/dist-client/stt/speech-to-text.js +282 -40
  109. package/dist-client/stt/speech-to-text.js.map +1 -1
  110. package/dist-client/tsconfig.tsbuildinfo +1 -1
  111. package/dist-server/service/action-plan/action-plan-mutation.js +5 -6
  112. package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
  113. package/dist-server/service/action-plan/action-plan-query.d.ts +2 -2
  114. package/dist-server/service/action-plan/action-plan-query.js +5 -11
  115. package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
  116. package/dist-server/service/building-inspection/building-inspection-mutation.js +41 -7
  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 +7 -3
  119. package/dist-server/service/building-inspection/building-inspection-query.js +154 -25
  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 +10 -1
  122. package/dist-server/service/building-inspection/building-inspection-type.js +35 -1
  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 +1 -0
  125. package/dist-server/service/building-inspection/building-inspection.js +20 -2
  126. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  127. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +10 -0
  128. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -1
  129. package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +1 -0
  130. package/dist-server/service/building-inspection-history/building-inspection-history.js +6 -1
  131. package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -1
  132. package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +2 -0
  133. package/dist-server/service/checklist-item/checklist-item-mutation.js +26 -0
  134. package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -1
  135. package/dist-server/service/checklist-item/checklist-item-type.d.ts +5 -1
  136. package/dist-server/service/checklist-item/checklist-item-type.js +15 -1
  137. package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -1
  138. package/dist-server/service/checklist-item/checklist-item.d.ts +2 -0
  139. package/dist-server/service/checklist-item/checklist-item.js +11 -1
  140. package/dist-server/service/checklist-item/checklist-item.js.map +1 -1
  141. package/dist-server/service/checklist-item/index.d.ts +2 -1
  142. package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +2 -0
  143. package/dist-server/service/checklist-item-history/checklist-item-history.js +11 -1
  144. package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -1
  145. package/dist-server/service/checklist-template/checklist-template-query.d.ts +1 -1
  146. package/dist-server/service/checklist-template/checklist-template-query.js +2 -5
  147. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
  148. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +11 -2
  149. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
  150. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +1 -0
  151. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +4 -0
  152. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
  153. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +1 -0
  154. package/dist-server/service/checklist-template-item/checklist-template-item.js +6 -1
  155. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  156. package/dist-server/service/checklist-template-item/spec-matching-service.js +1 -0
  157. package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -1
  158. package/dist-server/service/checklist-type/checklist-type-query.d.ts +1 -1
  159. package/dist-server/service/checklist-type/checklist-type-query.js +2 -5
  160. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
  161. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
  162. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
  163. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
  164. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
  165. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
  166. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
  167. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
  168. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
  169. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
  170. package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
  171. package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
  172. package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
  173. package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
  174. package/dist-server/service/construction-checklist-template/index.js +9 -0
  175. package/dist-server/service/construction-checklist-template/index.js.map +1 -0
  176. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
  177. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +56 -0
  178. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
  179. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
  180. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
  181. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
  182. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
  183. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
  184. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
  185. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
  186. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
  187. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
  188. package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
  189. package/dist-server/service/construction-checklist-template-item/index.js +9 -0
  190. package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
  191. package/dist-server/service/field-document/field-document-auto-file.d.ts +21 -0
  192. package/dist-server/service/field-document/field-document-auto-file.js +47 -0
  193. package/dist-server/service/field-document/field-document-auto-file.js.map +1 -0
  194. package/dist-server/service/field-document/field-document-mutation.d.ts +9 -0
  195. package/dist-server/service/field-document/field-document-mutation.js +139 -0
  196. package/dist-server/service/field-document/field-document-mutation.js.map +1 -0
  197. package/dist-server/service/field-document/field-document-query.d.ts +14 -0
  198. package/dist-server/service/field-document/field-document-query.js +120 -0
  199. package/dist-server/service/field-document/field-document-query.js.map +1 -0
  200. package/dist-server/service/field-document/field-document-summary-service.d.ts +10 -0
  201. package/dist-server/service/field-document/field-document-summary-service.js +79 -0
  202. package/dist-server/service/field-document/field-document-summary-service.js.map +1 -0
  203. package/dist-server/service/field-document/field-document-type.d.ts +24 -0
  204. package/dist-server/service/field-document/field-document-type.js +88 -0
  205. package/dist-server/service/field-document/field-document-type.js.map +1 -0
  206. package/dist-server/service/field-document/field-document.d.ts +29 -0
  207. package/dist-server/service/field-document/field-document.js +127 -0
  208. package/dist-server/service/field-document/field-document.js.map +1 -0
  209. package/dist-server/service/field-document/index.d.ts +5 -0
  210. package/dist-server/service/field-document/index.js +9 -0
  211. package/dist-server/service/field-document/index.js.map +1 -0
  212. package/dist-server/service/index.d.ts +7 -2
  213. package/dist-server/service/index.js +20 -0
  214. package/dist-server/service/index.js.map +1 -1
  215. package/dist-server/service/issue/issue-mutation.js +5 -6
  216. package/dist-server/service/issue/issue-mutation.js.map +1 -1
  217. package/dist-server/service/issue/issue-query.d.ts +2 -2
  218. package/dist-server/service/issue/issue-query.js +5 -11
  219. package/dist-server/service/issue/issue-query.js.map +1 -1
  220. package/dist-server/service/project-checklist/index.d.ts +5 -0
  221. package/dist-server/service/project-checklist/index.js +9 -0
  222. package/dist-server/service/project-checklist/index.js.map +1 -0
  223. package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
  224. package/dist-server/service/project-checklist/project-checklist-mutation.js +118 -0
  225. package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
  226. package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
  227. package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
  228. package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
  229. package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
  230. package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
  231. package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
  232. package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
  233. package/dist-server/service/project-checklist/project-checklist.js +90 -0
  234. package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
  235. package/dist-server/service/project-checklist/spec-matching-service.d.ts +17 -0
  236. package/dist-server/service/project-checklist/spec-matching-service.js +140 -0
  237. package/dist-server/service/project-checklist/spec-matching-service.js.map +1 -0
  238. package/dist-server/service/project-checklist-item/index.d.ts +4 -0
  239. package/dist-server/service/project-checklist-item/index.js +9 -0
  240. package/dist-server/service/project-checklist-item/index.js.map +1 -0
  241. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
  242. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
  243. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
  244. package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
  245. package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
  246. package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
  247. package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
  248. package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
  249. package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
  250. package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +19 -0
  251. package/dist-server/service/project-checklist-item/project-checklist-item.js +92 -0
  252. package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
  253. package/dist-server/service/project-report/project-report-mutation.js +5 -6
  254. package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
  255. package/dist-server/service/project-report/project-report-query.d.ts +2 -2
  256. package/dist-server/service/project-report/project-report-query.js +5 -11
  257. package/dist-server/service/project-report/project-report-query.js.map +1 -1
  258. package/dist-server/service/supervisor/supervisor-mutation.js +5 -6
  259. package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
  260. package/dist-server/service/supervisor/supervisor-query.d.ts +2 -2
  261. package/dist-server/service/supervisor/supervisor-query.js +5 -11
  262. package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
  263. package/dist-server/tsconfig.tsbuildinfo +1 -1
  264. package/package.json +14 -12
  265. package/things-factory.config.js +7 -1
@@ -9,6 +9,7 @@ export async function getBuildingInspectionForChecklist(buildingInspectionId = '
9
9
  buildingInspection(id: $buildingInspectionId) {
10
10
  id
11
11
  status
12
+ failCount
12
13
  requestDate
13
14
  memo
14
15
  checklist {
@@ -61,7 +62,8 @@ export async function getBuildingInspectionForChecklist(buildingInspectionId = '
61
62
  sequence
62
63
  mainType
63
64
  detailType
64
- inspctionCriteria
65
+ kcsCriteria
66
+ siteSpecCriteria
65
67
  constructionConfirmStatus
66
68
  supervisoryConfirmStatus
67
69
  checklistItemCommentCount
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection.js","sourceRoot":"","sources":["../../client/graphql/building-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,uBAA+B,EAAE;IACvF,IAAI,CAAC,oBAAoB;QAAE,OAAO,IAAI,CAAA;IAEtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoFT;QACD,SAAS,EAAE;YACT,oBAAoB;SACrB;KACF,CAAC,CAAA;IAEF,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAEhC,OAAO,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAA;AACzC,CAAC","sourcesContent":["import { client } from '@operato/graphql'\nimport { gql } from '@apollo/client'\n\nexport async function getBuildingInspectionForChecklist(buildingInspectionId: string = '') {\n if (!buildingInspectionId) return null\n\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 memo\n checklist {\n id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n documentNo\n inspectionRequestDocumentNo\n inspectionRequestMemo\n inspectionRequestUpdatedAt\n inspectionResultDocumentNo\n inspectionResultStatus\n inspectionResultType\n inspectionResultMemo\n inspectionResultUpdatedAt\n constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n nameListAttachment {\n id\n name\n fullpath\n }\n taskConstructor {\n id\n name\n }\n overallConstructor {\n id\n name\n }\n taskSupervisory {\n id\n name\n }\n overallSupervisory {\n id\n name\n }\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\n buildingLevel {\n id\n floor\n\n building {\n id\n buildingComplex {\n id\n overallConstructorEmails\n taskConstructorEmails\n overallSupervisoryEmails\n taskSupervisoryEmails\n supervisoryCompany\n constructionCompany\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return null\n\n return response.data.buildingInspection\n}\n"]}
1
+ {"version":3,"file":"building-inspection.js","sourceRoot":"","sources":["../../client/graphql/building-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,uBAA+B,EAAE;IACvF,IAAI,CAAC,oBAAoB;QAAE,OAAO,IAAI,CAAA;IAEtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsFT;QACD,SAAS,EAAE;YACT,oBAAoB;SACrB;KACF,CAAC,CAAA;IAEF,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAEhC,OAAO,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAA;AACzC,CAAC","sourcesContent":["import { client } from '@operato/graphql'\nimport { gql } from '@apollo/client'\n\nexport async function getBuildingInspectionForChecklist(buildingInspectionId: string = '') {\n if (!buildingInspectionId) return null\n\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n failCount\n requestDate\n memo\n checklist {\n id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n documentNo\n inspectionRequestDocumentNo\n inspectionRequestMemo\n inspectionRequestUpdatedAt\n inspectionResultDocumentNo\n inspectionResultStatus\n inspectionResultType\n inspectionResultMemo\n inspectionResultUpdatedAt\n constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n nameListAttachment {\n id\n name\n fullpath\n }\n taskConstructor {\n id\n name\n }\n overallConstructor {\n id\n name\n }\n taskSupervisory {\n id\n name\n }\n overallSupervisory {\n id\n name\n }\n\n checklistItems {\n id\n name\n sequence\n mainType\n detailType\n kcsCriteria\n siteSpecCriteria\n constructionConfirmStatus\n supervisoryConfirmStatus\n checklistItemCommentCount\n checklistItemAttachmentCount\n }\n }\n\n buildingLevel {\n id\n floor\n\n building {\n id\n buildingComplex {\n id\n overallConstructorEmails\n taskConstructorEmails\n overallSupervisoryEmails\n taskSupervisoryEmails\n supervisoryCompany\n constructionCompany\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return null\n\n return response.data.buildingInspection\n}\n"]}
@@ -4,11 +4,10 @@ import { PageView } from '@operato/shell';
4
4
  import { FetchOption } from '@operato/data-grist';
5
5
  import { ActionPlanImporter } from './action-plan-importer';
6
6
  declare const ActionPlanListPage_base: (new (...args: any[]) => {
7
- _storeUnsubscribe: import("redux").Unsubscribe;
7
+ _storeUnsubscribe: () => void;
8
8
  connectedCallback(): void;
9
9
  disconnectedCallback(): void;
10
10
  stateChanged(_state: unknown): void;
11
- readonly isConnected: boolean;
12
11
  }) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
13
12
  export declare class ActionPlanListPage extends ActionPlanListPage_base {
14
13
  static styles: import("lit").CSSResult[];
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
2
2
  import '@material/web/icon/icon.js';
3
3
  import '@operato/data-grist';
4
4
  import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
5
- import { PageView, store } from '@operato/shell';
5
+ import { PageView, store, connect } from '@operato/shell';
6
6
  import { css, html } from 'lit';
7
7
  import { customElement, query, state } from 'lit/decorators.js';
8
8
  import { ScopedElementsMixin } from '@open-wc/scoped-elements';
@@ -12,7 +12,6 @@ import { i18next, localize } from '@operato/i18n';
12
12
  import { notify, openPopup } from '@operato/layout';
13
13
  import { OxPopup, OxPrompt } from '@operato/popup';
14
14
  import { isMobileDevice } from '@operato/utils';
15
- import { connect } from 'pwa-helpers/connect-mixin';
16
15
  import gql from 'graphql-tag';
17
16
  import { ActionPlanImporter } from './action-plan-importer';
18
17
  let ActionPlanListPage = class ActionPlanListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
@@ -1 +1 @@
1
- {"version":3,"file":"action-plan-list-page.js","sourceRoot":"","sources":["../../../client/pages/action-plan/action-plan-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAY,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAgB,SAAS,EAA+B,MAAM,qBAAqB,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAGpD,IAAM,kBAAkB,GAAxB,MAAM,kBAA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0B,CAAC;SAC7C,CACF,CAAA;QAED,KAAK,CAAC,QAAQ,GAAG,GAAG,EAAE;YACpB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC,CAAA;IACH,CAAC;;AA5TM,yBAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;KASF;CACF,AAbY,CAaZ;AAQgB;IAAhB,KAAK,EAAE;;uDAAyB;AAChB;IAAhB,KAAK,EAAE;;gDAA4E;AAEzD;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;iDAAA;AACV;IAAjC,KAAK,CAAC,iBAAiB,CAAC;8BAA0B,OAAO;0DAAA;AA1B/C,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CA8T9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup, OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\nimport { ActionPlanImporter } from './action-plan-importer'\n\n@customElement('action-plan-list-page')\nexport class ActionPlanListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'action-plan-importer': ActionPlanImporter\n }\n }\n\n @state() private gristConfig: any\n @state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n @query('#sorter-control') private sortersControl!: OxPopup\n\n get context() {\n return {\n title: i18next.t('title.action-plan list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'supervision/action-plan',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this.updateActionPlan.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this.deleteActionPlan.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.action-plan list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n\n <div id=\"sorters\">\n Sort\n <md-icon\n @click=${e => {\n const target = e.currentTarget\n this.sortersControl.open({\n right: 0,\n top: target.offsetTop + target.offsetHeight\n })\n }}\n >expand_more</md-icon\n >\n <ox-popup id=\"sorter-control\">\n <ox-sorters-control> </ox-sorters-control>\n </ox-popup>\n </div>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: actionPlans(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n active\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n private async deleteActionPlan() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteActionPlans(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n private async updateActionPlan() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [ActionPlanPatch!]!) {\n updateMultipleActionPlan(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n private async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set(['id', 'name', 'description', 'active'])\n\n return exportTargets.map(actionPlan => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = actionPlan[field]\n }\n\n return tempObj\n })\n }\n\n private async importHandler(records) {\n const popup = openPopup(\n html`\n <action-plan-importer\n .actionPlans=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></action-plan-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import action-plan')\n }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n"]}
1
+ {"version":3,"file":"action-plan-list-page.js","sourceRoot":"","sources":["../../../client/pages/action-plan/action-plan-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EA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operato/data-grist'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store, connect } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup, OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport gql from 'graphql-tag'\n\nimport { ActionPlanImporter } from './action-plan-importer'\n\n@customElement('action-plan-list-page')\nexport class ActionPlanListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'action-plan-importer': ActionPlanImporter\n }\n }\n\n @state() private gristConfig: any\n @state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n @query('#sorter-control') private sortersControl!: OxPopup\n\n get context() {\n return {\n title: i18next.t('title.action-plan list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'supervision/action-plan',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this.updateActionPlan.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this.deleteActionPlan.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.action-plan list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n\n <div id=\"sorters\">\n Sort\n <md-icon\n @click=${e => {\n const target = e.currentTarget\n this.sortersControl.open({\n right: 0,\n top: target.offsetTop + target.offsetHeight\n })\n }}\n >expand_more</md-icon\n >\n <ox-popup id=\"sorter-control\">\n <ox-sorters-control> </ox-sorters-control>\n </ox-popup>\n </div>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: actionPlans(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n active\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n private async deleteActionPlan() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteActionPlans(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n private async updateActionPlan() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [ActionPlanPatch!]!) {\n updateMultipleActionPlan(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n private async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set(['id', 'name', 'description', 'active'])\n\n return exportTargets.map(actionPlan => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = actionPlan[field]\n }\n\n return tempObj\n })\n }\n\n private async importHandler(records) {\n const popup = openPopup(\n html`\n <action-plan-importer\n .actionPlans=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></action-plan-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import action-plan')\n }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n"]}
@@ -31,6 +31,7 @@ let BuildingInspectionAiDefect = class BuildingInspectionAiDefect extends PageVi
31
31
  .projectName=${this.project.name}
32
32
  .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}
33
33
  .buildingLevelFloor=${(_h = (_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.buildingLevel) === null || _h === void 0 ? void 0 : _h.floor}
34
+ .projectId=${this.project.id}
34
35
  ></building-inspection-detail-header>
35
36
 
36
37
  <div body>
@@ -144,6 +145,7 @@ BuildingInspectionAiDefect.styles = [
144
145
  }
145
146
 
146
147
  div[preview] video {
148
+ flex: 1;
147
149
  max-width: 100%;
148
150
  max-height: 100%;
149
151
  object-fit: contain;
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection-detail-ai-defect.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-ai-defect.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,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,EAAE;;QAC5D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BT;YACD,SAAS,EAAE;gBACT,oBAAoB;aACrB;SACF,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,MAAM;YAAE,OAAM;QAE3B,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAA;QAE1D,MAAM,IAAI,CAAC,8BAA8B,CAAC,MAAA,MAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,aAAa,0CAAE,QAAQ,0CAAE,eAAe,0CAAE,EAAE,CAAC,CAAA;IAClH,CAAC;IAEO,KAAK,CAAC,8BAA8B,CAAC,iBAAiB;QAC5D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;OAOT;YACD,SAAS,EAAE;gBACT,iBAAiB;aAClB;SACF,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,MAAM;YAAE,OAAM;QAE3B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAA;IACtC,CAAC;;AA9IM,iCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmCF;CACF,AAvCY,CAuCZ;AAEQ;IAAR,KAAK,EAAE;;2DAAkB;AACjB;IAAR,KAAK,EAAE;;sEAA6B;AAC5B;IAAR,KAAK,EAAE;;wEAAkC;AA5C/B,0BAA0B;IADtC,aAAa,CAAC,sCAAsC,CAAC;GACzC,0BAA0B,CAgJtC","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'\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-ai-defect')\nexport class BuildingInspectionAiDefect 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] video {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\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 <div preview>\n <video src=\"/attachment/21e53688-5262-4fae-961a-591db7114b75.mp4\" controls playsinline></video>\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 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"]}
1
+ {"version":3,"file":"building-inspection-detail-ai-defect.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-ai-defect.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,EAAS,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;AAEzC,OAAO,+CAA+C,CAAA;AAG/C,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SA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B,GAAG,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAA;QAE1D,MAAM,IAAI,CAAC,8BAA8B,CAAC,MAAA,MAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,aAAa,0CAAE,QAAQ,0CAAE,eAAe,0CAAE,EAAE,CAAC,CAAA;IAClH,CAAC;IAEO,KAAK,CAAC,8BAA8B,CAAC,iBAAiB;QAC5D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;OAOT;YACD,SAAS,EAAE;gBACT,iBAAiB;aAClB;SACF,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,MAAM;YAAE,OAAM;QAE3B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAA;IACtC,CAAC;;AAhJM,iCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCF;CACF,AAxCY,CAwCZ;AAEQ;IAAR,KAAK,EAAE;;2DAAkB;AACjB;IAAR,KAAK,EAAE;;sEAA6B;AAC5B;IAAR,KAAK,EAAE;;wEAAkC;AA7C/B,0BAA0B;IADtC,aAAa,CAAC,sCAAsC,CAAC;GACzC,0BAA0B,CAkJtC","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'\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-ai-defect')\nexport class BuildingInspectionAiDefect 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] video {\n flex: 1;\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\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 .projectId=${this.project.id}\n ></building-inspection-detail-header>\n\n <div body>\n <div preview>\n <video src=\"/attachment/21e53688-5262-4fae-961a-591db7114b75.mp4\" controls playsinline></video>\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 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"]}
@@ -1,57 +1,71 @@
1
+ /**
2
+ * 검측 관리 상세 - AI 자동 검측
3
+ *
4
+ * 검측 체크리스트 항목을 AI 엔진(inspection-ai)에 보내:
5
+ * 1) 촬영 가이드(plan-shots)를 받아 단계별 촬영 슬롯을 표시하고
6
+ * 2) 촬영된 사진으로 자동 판정(inspect)을 실행한 뒤
7
+ * 3) 항목별 상세 / 추가 촬영(재검사) / 종합 리포트를 거쳐
8
+ * 4) 검사 등록 시 감리자 적합/부적합 자동 반영 + AI판단 근거를 첨부한다.
9
+ */
1
10
  import '@material/web/icon/icon.js';
2
- import '@operato/input/ox-input-switch.js';
3
- import '@operato/mini-map/ox-zoomable-image.js';
4
11
  import '@material/web/progress/circular-progress.js';
5
- import { PropertyValues } from 'lit';
6
12
  import { PageView } from '@operato/shell';
7
13
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
8
14
  import './component/building-inspection-detail-header';
15
+ type PanelMode = 'none' | 'detail' | 'recapture' | 'report';
9
16
  export declare class BuildingInspectionAiMeasurement extends PageView {
10
17
  static styles: import("lit").CSSResult[];
11
- private KEYPOINT_RULER_API_BASE_URL;
12
18
  project: any;
13
19
  buildingInspection: any;
14
20
  buildingInspectionId: string;
15
- capturedVideoUrl: string | null;
16
- videoFile: File | null;
17
- frame: any | null;
18
- analyzing: boolean;
19
- selectedPoints: {
20
- x1: number | null;
21
- y1: number | null;
22
- x2: number | null;
23
- y2: number | null;
24
- };
25
- frameNaturalWidth: number;
26
- frameNaturalHeight: number;
27
- displayedImageRect: {
28
- width: number;
29
- height: number;
30
- left: number;
31
- top: number;
32
- } | null;
33
- distance: number | null;
34
- unit: string | null;
35
- analyzingError: string | null;
36
- private frameImageEl;
37
- private imageWrapperEl;
38
- private cameraInputEl;
21
+ guide: any;
22
+ photos: {
23
+ file: File;
24
+ url: string;
25
+ }[];
26
+ result: any;
27
+ mainPhotoIndex: number;
28
+ panel: PanelMode;
29
+ selectedItem: any;
30
+ recaptureBase: number;
31
+ expandedReportId: string | null;
32
+ loading: boolean;
33
+ loadingText: string;
34
+ private photoInputEl;
35
+ private pendingSlotIndex;
39
36
  get context(): {
40
37
  title: string;
41
38
  };
39
+ get engineChecklist(): {
40
+ item_id: any;
41
+ category: string;
42
+ text: any;
43
+ }[];
42
44
  render(): import("lit-html").TemplateResult<1>;
43
- protected updated(changes: PropertyValues): Promise<void>;
45
+ private _renderGuide;
46
+ private _renderResult;
47
+ private _renderItemCard;
48
+ private _renderSidePane;
49
+ private _renderDetailPane;
50
+ private _renderRecapturePane;
51
+ private _renderReportPane;
44
52
  pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
45
53
  initBuildingInspection(buildingInspectionId?: string): Promise<void>;
46
54
  private _getProjectByBuildingComplexId;
47
- private _onVideoSelected;
48
- private _onAnalyzeVideo;
49
- private _onRetry;
50
- private _onImageLoad;
51
- private _onImageClick;
52
- private _hasTwoPoints;
53
- private _renderMarkers;
54
- private _onAnalyzePhoto;
55
- _savePhoto(): Promise<any>;
56
- getCurrentImage(): Promise<File>;
55
+ private _callEngine;
56
+ private _loadShotGuide;
57
+ private _runInspection;
58
+ private _mergeRecaptureResult;
59
+ private _openPhotoPicker;
60
+ private _onPhotosSelected;
61
+ private _resetPhotos;
62
+ private _resetAll;
63
+ private _openDetail;
64
+ private _openRecapture;
65
+ private _openReport;
66
+ private _toggleReportItem;
67
+ private _closePanel;
68
+ private _sortedItems;
69
+ private _registerInspection;
57
70
  }
71
+ export {};