@dssp/supervision 1.0.0-alpha.8 → 1.0.0-alpha.84

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 (357) 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 +81 -0
  26. package/dist-client/pages/building-inspection/building-inspection-management.js +1512 -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/field-document/field-document-constants.d.ts +18 -0
  35. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js +630 -0
  36. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js.map +1 -0
  37. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.d.ts +10 -0
  38. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js +219 -0
  39. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js.map +1 -0
  40. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.d.ts +25 -0
  41. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js +545 -0
  42. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js.map +1 -0
  43. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.d.ts +39 -0
  44. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js +675 -0
  45. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js.map +1 -0
  46. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
  47. package/dist-client/pages/building-inspection/component/image-preview-popup.js +348 -0
  48. package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -0
  49. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +25 -0
  50. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +491 -0
  51. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -0
  52. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +31 -0
  53. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +485 -0
  54. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -0
  55. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +27 -0
  56. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +416 -0
  57. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +1 -0
  58. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +4 -2
  59. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +156 -37
  60. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  61. package/dist-client/pages/building-inspection/inspection-create-popup.js +17 -5
  62. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  63. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +3 -0
  64. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +791 -0
  65. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
  66. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +16 -2
  67. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +249 -45
  68. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
  69. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +9 -3
  70. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
  71. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.d.ts +19 -0
  72. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +205 -0
  73. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +1 -0
  74. package/dist-client/pages/checklist/attachment-list-popup.d.ts +1 -0
  75. package/dist-client/pages/checklist/attachment-list-popup.js +251 -69
  76. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
  77. package/dist-client/pages/checklist/checklist-view.d.ts +5 -0
  78. package/dist-client/pages/checklist/checklist-view.js +191 -30
  79. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  80. package/dist-client/pages/checklist/comment-list-popup.js +15 -5
  81. package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
  82. package/dist-client/pages/checklist/file-preview-popup.js +0 -1
  83. package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
  84. package/dist-client/pages/checklist/inspection-info-popup.d.ts +49 -0
  85. package/dist-client/pages/checklist/inspection-info-popup.js +683 -0
  86. package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -0
  87. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +18 -0
  88. package/dist-client/pages/checklist/inspection-tab-popup.js +196 -0
  89. package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -0
  90. package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
  91. package/dist-client/pages/checklist-database/checklist-database.js +539 -0
  92. package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
  93. package/dist-client/pages/checklist-template/checklist-template-item.js +39 -3
  94. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
  95. package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
  96. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  97. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
  98. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +242 -0
  99. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
  100. package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
  101. package/dist-client/pages/checklist-template/construction-checklist-template-list.js +404 -0
  102. package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
  103. package/dist-client/pages/issue/issue-list-page.d.ts +1 -2
  104. package/dist-client/pages/issue/issue-list-page.js +1 -2
  105. package/dist-client/pages/issue/issue-list-page.js.map +1 -1
  106. package/dist-client/pages/project-checklist/project-checklist-management.d.ts +52 -0
  107. package/dist-client/pages/project-checklist/project-checklist-management.js +932 -0
  108. package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
  109. package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -2
  110. package/dist-client/pages/project-report/project-report-list-page.js +1 -2
  111. package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
  112. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -2
  113. package/dist-client/pages/supervisor/supervisor-list-page.js +1 -2
  114. package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
  115. package/dist-client/route.d.ts +1 -1
  116. package/dist-client/route.js +18 -0
  117. package/dist-client/route.js.map +1 -1
  118. package/dist-client/stt/speech-to-text.d.ts +13 -8
  119. package/dist-client/stt/speech-to-text.js +282 -40
  120. package/dist-client/stt/speech-to-text.js.map +1 -1
  121. package/dist-client/tsconfig.tsbuildinfo +1 -1
  122. package/dist-server/service/action-plan/action-plan-mutation.js +5 -6
  123. package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
  124. package/dist-server/service/action-plan/action-plan-query.d.ts +2 -2
  125. package/dist-server/service/action-plan/action-plan-query.js +5 -11
  126. package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
  127. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +2 -3
  128. package/dist-server/service/building-inspection/building-inspection-mutation.js +107 -39
  129. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  130. package/dist-server/service/building-inspection/building-inspection-query.d.ts +9 -7
  131. package/dist-server/service/building-inspection/building-inspection-query.js +168 -52
  132. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  133. package/dist-server/service/building-inspection/building-inspection-type.d.ts +30 -7
  134. package/dist-server/service/building-inspection/building-inspection-type.js +106 -13
  135. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  136. package/dist-server/service/building-inspection/building-inspection.d.ts +5 -0
  137. package/dist-server/service/building-inspection/building-inspection.js +37 -4
  138. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  139. package/dist-server/service/building-inspection/index.d.ts +3 -4
  140. package/dist-server/service/building-inspection/index.js +10 -3
  141. package/dist-server/service/building-inspection/index.js.map +1 -1
  142. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
  143. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +66 -0
  144. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
  145. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +16 -0
  146. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +171 -0
  147. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
  148. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +23 -0
  149. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +90 -0
  150. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
  151. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +33 -0
  152. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +132 -0
  153. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
  154. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
  155. package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
  156. package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
  157. package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +16 -0
  158. package/dist-server/service/building-inspection-history/building-inspection-history-query.js +120 -0
  159. package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +1 -0
  160. package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +5 -0
  161. package/dist-server/service/building-inspection-history/building-inspection-history-type.js +21 -0
  162. package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +1 -0
  163. package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +35 -0
  164. package/dist-server/service/building-inspection-history/building-inspection-history.js +162 -0
  165. package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -0
  166. package/dist-server/service/building-inspection-history/event-subscriber.d.ts +7 -0
  167. package/dist-server/service/building-inspection-history/event-subscriber.js +21 -0
  168. package/dist-server/service/building-inspection-history/event-subscriber.js.map +1 -0
  169. package/dist-server/service/building-inspection-history/index.d.ts +6 -0
  170. package/dist-server/service/building-inspection-history/index.js +10 -0
  171. package/dist-server/service/building-inspection-history/index.js.map +1 -0
  172. package/dist-server/service/checklist/checklist-mutation.d.ts +0 -5
  173. package/dist-server/service/checklist/checklist-mutation.js +1 -67
  174. package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
  175. package/dist-server/service/checklist/checklist-query.d.ts +7 -0
  176. package/dist-server/service/checklist/checklist-query.js +83 -0
  177. package/dist-server/service/checklist/checklist-query.js.map +1 -1
  178. package/dist-server/service/checklist/checklist-type.d.ts +0 -13
  179. package/dist-server/service/checklist/checklist-type.js +1 -49
  180. package/dist-server/service/checklist/checklist-type.js.map +1 -1
  181. package/dist-server/service/checklist/checklist.d.ts +28 -3
  182. package/dist-server/service/checklist/checklist.js +89 -15
  183. package/dist-server/service/checklist/checklist.js.map +1 -1
  184. package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
  185. package/dist-server/service/checklist/event-subscriber.js +21 -0
  186. package/dist-server/service/checklist/event-subscriber.js.map +1 -0
  187. package/dist-server/service/checklist/index.d.ts +1 -2
  188. package/dist-server/service/checklist/index.js +1 -2
  189. package/dist-server/service/checklist/index.js.map +1 -1
  190. package/dist-server/service/checklist-history/checklist-history-query.d.ts +11 -0
  191. package/dist-server/service/checklist-history/checklist-history-query.js +77 -0
  192. package/dist-server/service/checklist-history/checklist-history-query.js.map +1 -0
  193. package/dist-server/service/checklist-history/checklist-history-type.d.ts +5 -0
  194. package/dist-server/service/checklist-history/checklist-history-type.js +21 -0
  195. package/dist-server/service/checklist-history/checklist-history-type.js.map +1 -0
  196. package/dist-server/service/{checklist → checklist-history}/checklist-history.d.ts +19 -1
  197. package/dist-server/service/{checklist → checklist-history}/checklist-history.js +97 -14
  198. package/dist-server/service/checklist-history/checklist-history.js.map +1 -0
  199. package/dist-server/service/checklist-history/event-subscriber.d.ts +7 -0
  200. package/dist-server/service/checklist-history/event-subscriber.js +21 -0
  201. package/dist-server/service/checklist-history/event-subscriber.js.map +1 -0
  202. package/dist-server/service/checklist-history/index.d.ts +6 -0
  203. package/dist-server/service/checklist-history/index.js +10 -0
  204. package/dist-server/service/checklist-history/index.js.map +1 -0
  205. package/dist-server/service/checklist-item/checklist-item-query.d.ts +1 -1
  206. package/dist-server/service/checklist-item/checklist-item-query.js +5 -3
  207. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
  208. package/dist-server/service/checklist-item/index.d.ts +0 -1
  209. package/dist-server/service/checklist-item/index.js +1 -2
  210. package/dist-server/service/checklist-item/index.js.map +1 -1
  211. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +1 -0
  212. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +33 -6
  213. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
  214. package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +16 -0
  215. package/dist-server/service/checklist-item-history/checklist-item-history-query.js +123 -0
  216. package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +1 -0
  217. package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +5 -0
  218. package/dist-server/service/checklist-item-history/checklist-item-history-type.js +21 -0
  219. package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +1 -0
  220. package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +25 -0
  221. package/dist-server/service/checklist-item-history/checklist-item-history.js +123 -0
  222. package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -0
  223. package/dist-server/service/checklist-item-history/event-subscriber.d.ts +7 -0
  224. package/dist-server/service/checklist-item-history/event-subscriber.js +21 -0
  225. package/dist-server/service/checklist-item-history/event-subscriber.js.map +1 -0
  226. package/dist-server/service/checklist-item-history/index.d.ts +6 -0
  227. package/dist-server/service/checklist-item-history/index.js +10 -0
  228. package/dist-server/service/checklist-item-history/index.js.map +1 -0
  229. package/dist-server/service/checklist-template/checklist-template-query.d.ts +1 -1
  230. package/dist-server/service/checklist-template/checklist-template-query.js +2 -5
  231. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
  232. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +13 -1
  233. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
  234. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +3 -0
  235. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +9 -0
  236. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
  237. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +7 -0
  238. package/dist-server/service/checklist-template-item/checklist-template-item.js +22 -2
  239. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  240. package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +2 -0
  241. package/dist-server/service/checklist-template-item/spec-matching-service.js +51 -0
  242. package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -0
  243. package/dist-server/service/checklist-type/checklist-type-query.d.ts +1 -1
  244. package/dist-server/service/checklist-type/checklist-type-query.js +2 -5
  245. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
  246. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
  247. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
  248. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
  249. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
  250. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
  251. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
  252. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
  253. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
  254. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
  255. package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
  256. package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
  257. package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
  258. package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
  259. package/dist-server/service/construction-checklist-template/index.js +9 -0
  260. package/dist-server/service/construction-checklist-template/index.js.map +1 -0
  261. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
  262. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +60 -0
  263. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
  264. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
  265. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
  266. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
  267. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
  268. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
  269. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
  270. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
  271. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
  272. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
  273. package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
  274. package/dist-server/service/construction-checklist-template-item/index.js +9 -0
  275. package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
  276. package/dist-server/service/construction-checklist-template-item/spec-matching-service.d.ts +2 -0
  277. package/dist-server/service/construction-checklist-template-item/spec-matching-service.js +50 -0
  278. package/dist-server/service/construction-checklist-template-item/spec-matching-service.js.map +1 -0
  279. package/dist-server/service/field-document/field-document-auto-file.d.ts +21 -0
  280. package/dist-server/service/field-document/field-document-auto-file.js +47 -0
  281. package/dist-server/service/field-document/field-document-auto-file.js.map +1 -0
  282. package/dist-server/service/field-document/field-document-mutation.d.ts +9 -0
  283. package/dist-server/service/field-document/field-document-mutation.js +136 -0
  284. package/dist-server/service/field-document/field-document-mutation.js.map +1 -0
  285. package/dist-server/service/field-document/field-document-query.d.ts +14 -0
  286. package/dist-server/service/field-document/field-document-query.js +120 -0
  287. package/dist-server/service/field-document/field-document-query.js.map +1 -0
  288. package/dist-server/service/field-document/field-document-summary-service.d.ts +2 -0
  289. package/dist-server/service/field-document/field-document-summary-service.js +55 -0
  290. package/dist-server/service/field-document/field-document-summary-service.js.map +1 -0
  291. package/dist-server/service/field-document/field-document-type.d.ts +23 -0
  292. package/dist-server/service/field-document/field-document-type.js +84 -0
  293. package/dist-server/service/field-document/field-document-type.js.map +1 -0
  294. package/dist-server/service/field-document/field-document.d.ts +29 -0
  295. package/dist-server/service/field-document/field-document.js +127 -0
  296. package/dist-server/service/field-document/field-document.js.map +1 -0
  297. package/dist-server/service/field-document/index.d.ts +5 -0
  298. package/dist-server/service/field-document/index.js +9 -0
  299. package/dist-server/service/field-document/index.js.map +1 -0
  300. package/dist-server/service/index.d.ts +9 -1
  301. package/dist-server/service/index.js +42 -3
  302. package/dist-server/service/index.js.map +1 -1
  303. package/dist-server/service/issue/issue-mutation.js +5 -6
  304. package/dist-server/service/issue/issue-mutation.js.map +1 -1
  305. package/dist-server/service/issue/issue-query.d.ts +2 -2
  306. package/dist-server/service/issue/issue-query.js +5 -11
  307. package/dist-server/service/issue/issue-query.js.map +1 -1
  308. package/dist-server/service/project-checklist/index.d.ts +5 -0
  309. package/dist-server/service/project-checklist/index.js +9 -0
  310. package/dist-server/service/project-checklist/index.js.map +1 -0
  311. package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
  312. package/dist-server/service/project-checklist/project-checklist-mutation.js +109 -0
  313. package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
  314. package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
  315. package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
  316. package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
  317. package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
  318. package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
  319. package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
  320. package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
  321. package/dist-server/service/project-checklist/project-checklist.js +90 -0
  322. package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
  323. package/dist-server/service/project-checklist-item/index.d.ts +4 -0
  324. package/dist-server/service/project-checklist-item/index.js +9 -0
  325. package/dist-server/service/project-checklist-item/index.js.map +1 -0
  326. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
  327. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
  328. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
  329. package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
  330. package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
  331. package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
  332. package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
  333. package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
  334. package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
  335. package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +17 -0
  336. package/dist-server/service/project-checklist-item/project-checklist-item.js +82 -0
  337. package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
  338. package/dist-server/service/project-report/project-report-mutation.js +5 -6
  339. package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
  340. package/dist-server/service/project-report/project-report-query.d.ts +2 -2
  341. package/dist-server/service/project-report/project-report-query.js +5 -11
  342. package/dist-server/service/project-report/project-report-query.js.map +1 -1
  343. package/dist-server/service/project-report/project-report.d.ts +0 -2
  344. package/dist-server/service/project-report/project-report.js +0 -6
  345. package/dist-server/service/project-report/project-report.js.map +1 -1
  346. package/dist-server/service/supervisor/supervisor-mutation.js +5 -6
  347. package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
  348. package/dist-server/service/supervisor/supervisor-query.d.ts +2 -2
  349. package/dist-server/service/supervisor/supervisor-query.js +5 -11
  350. package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
  351. package/dist-server/tsconfig.tsbuildinfo +1 -1
  352. package/package.json +14 -13
  353. package/things-factory.config.js +9 -1
  354. package/dist-server/service/building-inspection/building-inspection-history.d.ts +0 -17
  355. package/dist-server/service/building-inspection/building-inspection-history.js +0 -86
  356. package/dist-server/service/building-inspection/building-inspection-history.js.map +0 -1
  357. package/dist-server/service/checklist/checklist-history.js.map +0 -1
@@ -0,0 +1,932 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import '@material/web/button/elevated-button.js';
4
+ import '@material/web/button/filled-button.js';
5
+ import '@material/web/select/filled-select.js';
6
+ import '@material/web/select/select-option.js';
7
+ import '@material/web/textfield/filled-text-field.js';
8
+ import '@operato/data-grist';
9
+ import '../checklist/checklist-view';
10
+ import { CommonGristStyles, ScrollbarStyles, ButtonContainerStyles } from '@operato/styles';
11
+ import { PageView } from '@operato/shell';
12
+ import { css, html } from 'lit';
13
+ import { customElement, query, state } from 'lit/decorators.js';
14
+ import { DataGrist } from '@operato/data-grist';
15
+ import { client } from '@operato/graphql';
16
+ import { notify, openPopup } from '@operato/layout';
17
+ import gql from 'graphql-tag';
18
+ import { BuildingInspectionStatus } from '../building-inspection/building-inspection-list';
19
+ let ProjectChecklistManagement = class ProjectChecklistManagement extends PageView {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.projectId = '';
23
+ this.projectName = '';
24
+ this.constructionTypes = [];
25
+ this.allDetailTypes = [];
26
+ this.selectedConstructionType = {};
27
+ this.selectedConstructionDetailType = {};
28
+ this.checklistName = '';
29
+ this.templateItems = [];
30
+ this.isEditMode = false;
31
+ this.selectedChecklistId = null;
32
+ }
33
+ get context() {
34
+ return {
35
+ title: this.projectName ? `체크리스트 관리 - ${this.projectName}` : '체크리스트 관리'
36
+ };
37
+ }
38
+ render() {
39
+ var _a, _b, _c;
40
+ return html `
41
+ <div header>
42
+ <h2>
43
+ <md-icon slot="icon" back @click=${() => history.back()}>arrow_back</md-icon>
44
+ 체크리스트 관리
45
+ </h2>
46
+ <div button-container>
47
+ <md-elevated-button href=${`project-detail/${this.projectId}`}>
48
+ <md-icon slot="icon">home</md-icon>프로젝트 홈
49
+ </md-elevated-button>
50
+ </div>
51
+ </div>
52
+
53
+ <div body>
54
+ <div left>
55
+ <div section-header>${this.isEditMode ? '체크리스트 수정' : '체크리스트 등록'}</div>
56
+
57
+ <div form-area>
58
+ <label>공종</label>
59
+ <md-filled-select constructionType @change=${this._onSelectConstructionType}>
60
+ <md-select-option ?selected=${!((_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.id)} value="">
61
+ <div slot="headline">선택</div>
62
+ </md-select-option>
63
+ ${(_b = this.constructionTypes) === null || _b === void 0 ? void 0 : _b.map(ct => {
64
+ var _a;
65
+ const selected = ct.id === ((_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.id);
66
+ return html `<md-select-option ?selected=${selected} .value=${ct.id}>
67
+ <div slot="headline">${ct.name}</div>
68
+ </md-select-option>`;
69
+ })}
70
+ </md-filled-select>
71
+
72
+ <label>세부공종</label>
73
+ <md-filled-select constructionDetailType @change=${this._onSelectConstructionDetailType}>
74
+ ${(((_c = this.selectedConstructionType) === null || _c === void 0 ? void 0 : _c.constructionDetailTypes) || []).map(cdt => {
75
+ var _a;
76
+ const selected = cdt.id === ((_a = this.selectedConstructionDetailType) === null || _a === void 0 ? void 0 : _a.id);
77
+ return html `<md-select-option ?selected=${selected} .value=${cdt.id}>
78
+ <div slot="headline">${cdt.name}</div>
79
+ </md-select-option>`;
80
+ })}
81
+ </md-filled-select>
82
+
83
+ <label>이름</label>
84
+ <md-filled-text-field
85
+ .value=${this.checklistName}
86
+ @input=${e => {
87
+ this.checklistName = e.target.value;
88
+ }}
89
+ ></md-filled-text-field>
90
+ </div>
91
+
92
+ <ox-grist left .mode=${'GRID'} .config=${this.leftGristConfig}></ox-grist>
93
+
94
+ <div button-container>
95
+ <md-elevated-button save @click=${this._save}>
96
+ <md-icon slot="icon">${this.isEditMode ? 'save' : 'add'}</md-icon>
97
+ ${this.isEditMode ? '수정' : '등록'}
98
+ </md-elevated-button>
99
+ <md-elevated-button delete @click=${this._delete}> <md-icon slot="icon">delete</md-icon>삭제 </md-elevated-button>
100
+ </div>
101
+ </div>
102
+
103
+ <div right>
104
+ <div section-header>체크리스트 목록</div>
105
+
106
+ <ox-grist
107
+ right
108
+ .mode=${'GRID'}
109
+ .config=${this.rightGristConfig}
110
+ .fetchHandler=${this._fetchChecklists.bind(this)}
111
+ ></ox-grist>
112
+ </div>
113
+ </div>
114
+ `;
115
+ }
116
+ async pageUpdated(changes, lifecycle) {
117
+ if (this.active) {
118
+ this.projectId = lifecycle.resourceId || '';
119
+ await this._init();
120
+ }
121
+ }
122
+ async pageInitialized(lifecycle) {
123
+ this.projectId = lifecycle.resourceId || '';
124
+ await this._init();
125
+ }
126
+ async _init() {
127
+ await Promise.all([this._fetchProjectName(), this._fetchConstructionTypes()]);
128
+ this._buildLeftGristConfig();
129
+ this._buildRightGristConfig();
130
+ }
131
+ async _fetchProjectName() {
132
+ var _a, _b;
133
+ if (!this.projectId)
134
+ return;
135
+ const response = await client.query({
136
+ query: gql `
137
+ query Project($id: String!) {
138
+ project(id: $id) {
139
+ name
140
+ }
141
+ }
142
+ `,
143
+ variables: { id: this.projectId }
144
+ });
145
+ this.projectName = ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.project) === null || _b === void 0 ? void 0 : _b.name) || '';
146
+ this.updateContext();
147
+ }
148
+ async _fetchConstructionTypes() {
149
+ var _a, _b;
150
+ const response = await client.query({
151
+ query: gql `
152
+ query {
153
+ constructionTypes {
154
+ items {
155
+ id
156
+ name
157
+ projectType
158
+ constructionDetailTypes {
159
+ id
160
+ name
161
+ sequence
162
+ }
163
+ }
164
+ }
165
+ }
166
+ `
167
+ });
168
+ const items = (((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.constructionTypes) === null || _b === void 0 ? void 0 : _b.items) || []).filter((ct) => ct.projectType === 'DCSP' || !ct.projectType);
169
+ this.constructionTypes = items;
170
+ this.allDetailTypes = items.flatMap(ct => (ct.constructionDetailTypes || []).map(dt => (Object.assign(Object.assign({}, dt), { constructionTypeId: ct.id }))));
171
+ // 초기에는 선택하지 않음 (사용자가 직접 선택)
172
+ this.selectedConstructionType = {};
173
+ this.selectedConstructionDetailType = {};
174
+ }
175
+ _buildLeftGristConfig() {
176
+ this.leftGristConfig = {
177
+ columns: [
178
+ { type: 'gutter', gutterName: 'row-selector', multiple: true },
179
+ {
180
+ type: 'gutter',
181
+ gutterName: 'button',
182
+ icon: 'arrow_upward',
183
+ handlers: { click: 'move-up' }
184
+ },
185
+ {
186
+ type: 'gutter',
187
+ gutterName: 'button',
188
+ icon: 'arrow_downward',
189
+ handlers: { click: 'move-down' }
190
+ },
191
+ {
192
+ type: 'string',
193
+ name: 'mainType',
194
+ header: '구분',
195
+ record: { editable: true },
196
+ width: 100
197
+ },
198
+ {
199
+ type: 'text-select',
200
+ name: 'name',
201
+ header: '검사항목',
202
+ record: {
203
+ editable: true,
204
+ options: (value, column, record) => {
205
+ if (!record)
206
+ return [];
207
+ const items = [
208
+ record.originalName,
209
+ record.recommendation1,
210
+ record.recommendation2,
211
+ record.recommendation3,
212
+ record.recommendation4,
213
+ record.recommendation5
214
+ ].filter(Boolean);
215
+ return [...new Set(items)].map(r => ({ display: r, value: r }));
216
+ }
217
+ },
218
+ width: 250
219
+ },
220
+ {
221
+ type: 'string',
222
+ name: 'inspctionCriteria',
223
+ header: '검사 기준',
224
+ record: { editable: true },
225
+ width: 200
226
+ },
227
+ { type: 'string', name: 'originalName', hidden: true },
228
+ { type: 'string', name: 'recommendation1', hidden: true },
229
+ { type: 'string', name: 'recommendation2', hidden: true },
230
+ { type: 'string', name: 'recommendation3', hidden: true },
231
+ { type: 'string', name: 'recommendation4', hidden: true },
232
+ { type: 'string', name: 'recommendation5', hidden: true }
233
+ ],
234
+ rows: {
235
+ selectable: { multiple: true }
236
+ },
237
+ pagination: { infinite: true }
238
+ };
239
+ }
240
+ _buildRightGristConfig() {
241
+ this.rightGristConfig = {
242
+ columns: [
243
+ { type: 'gutter', gutterName: 'row-selector', multiple: false },
244
+ { type: 'gutter', gutterName: 'sequence' },
245
+ {
246
+ type: 'gutter',
247
+ gutterName: 'button',
248
+ fixed: true,
249
+ icon: 'preview',
250
+ handlers: {
251
+ click: async (columns, data, column, record, rowIndex) => {
252
+ if (!record.id)
253
+ return;
254
+ await this._openPreview(record);
255
+ }
256
+ }
257
+ },
258
+ {
259
+ type: 'string',
260
+ name: 'constructionTypeName',
261
+ header: '공종',
262
+ width: 120
263
+ },
264
+ {
265
+ type: 'string',
266
+ name: 'constructionDetailTypeName',
267
+ header: '세부공종',
268
+ width: 120
269
+ },
270
+ {
271
+ type: 'string',
272
+ name: 'name',
273
+ header: '체크리스트명',
274
+ width: 180
275
+ }
276
+ ],
277
+ rows: {
278
+ selectable: { multiple: false },
279
+ appendable: false,
280
+ handlers: {
281
+ click: this._handleRightGristRowClick.bind(this)
282
+ }
283
+ },
284
+ pagination: { infinite: true }
285
+ };
286
+ }
287
+ async _fetchChecklists() {
288
+ var _a, _b, _c, _d;
289
+ if (!this.projectId)
290
+ return { total: 0, records: [] };
291
+ const response = await client.query({
292
+ query: gql `
293
+ query ($filters: [Filter!], $sortings: [Sorting!]) {
294
+ projectChecklists(filters: $filters, sortings: $sortings) {
295
+ items {
296
+ id
297
+ projectId
298
+ constructionTypeId
299
+ constructionDetailTypeId
300
+ name
301
+ updatedAt
302
+ }
303
+ total
304
+ }
305
+ }
306
+ `,
307
+ variables: {
308
+ filters: [{ name: 'projectId', value: this.projectId, operator: 'eq' }],
309
+ sortings: [{ name: 'updatedAt', desc: true }]
310
+ }
311
+ });
312
+ const items = ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.projectChecklists) === null || _b === void 0 ? void 0 : _b.items) || [];
313
+ // 공종/세부공종 이름을 클라이언트에서 매핑
314
+ const records = items.map(item => {
315
+ var _a, _b;
316
+ return (Object.assign(Object.assign({}, item), { constructionTypeName: ((_a = this.constructionTypes.find(ct => ct.id === item.constructionTypeId)) === null || _a === void 0 ? void 0 : _a.name) || '', constructionDetailTypeName: ((_b = this.allDetailTypes.find(dt => dt.id === item.constructionDetailTypeId)) === null || _b === void 0 ? void 0 : _b.name) || '' }));
317
+ });
318
+ return {
319
+ total: ((_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.projectChecklists) === null || _d === void 0 ? void 0 : _d.total) || 0,
320
+ records
321
+ };
322
+ }
323
+ async _onSelectConstructionType(e) {
324
+ var _a, _b;
325
+ const ctId = e.target.value;
326
+ const ct = this.constructionTypes.find(c => c.id === ctId) || {};
327
+ this.selectedConstructionType = ct;
328
+ this.selectedConstructionDetailType = Object.assign({}, (((_a = ct.constructionDetailTypes) === null || _a === void 0 ? void 0 : _a[0]) || {}));
329
+ // re-render 완료 후 세부공종 select UI 동기화
330
+ await this.updateComplete;
331
+ await ((_b = this.htmlSelectConstructionDetailType) === null || _b === void 0 ? void 0 : _b.selectIndex(0));
332
+ if (!this.isEditMode) {
333
+ await this._loadTemplateItems();
334
+ }
335
+ }
336
+ async _onSelectConstructionDetailType(e) {
337
+ var _a, _b;
338
+ const cdtId = e.target.value;
339
+ this.selectedConstructionDetailType = Object.assign({}, (((_b = (_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.constructionDetailTypes) === null || _b === void 0 ? void 0 : _b.find(d => d.id === cdtId)) || {}));
340
+ if (!this.isEditMode) {
341
+ await this._loadTemplateItems();
342
+ }
343
+ }
344
+ async _loadTemplateItems() {
345
+ var _a, _b, _c, _d, _e, _f;
346
+ const ctId = (_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.id;
347
+ const cdtId = (_b = this.selectedConstructionDetailType) === null || _b === void 0 ? void 0 : _b.id;
348
+ if (!ctId || !cdtId) {
349
+ this.templateItems = [];
350
+ this.leftGrist.data = { records: [] };
351
+ return;
352
+ }
353
+ // upsert로 템플릿 찾기/생성
354
+ const upsertRes = await client.mutate({
355
+ mutation: gql `
356
+ mutation ($ctId: String!, $cdtId: String!) {
357
+ upsertConstructionChecklistTemplate(constructionTypeId: $ctId, constructionDetailTypeId: $cdtId) {
358
+ id
359
+ }
360
+ }
361
+ `,
362
+ variables: { ctId, cdtId }
363
+ });
364
+ const templateId = (_d = (_c = upsertRes.data) === null || _c === void 0 ? void 0 : _c.upsertConstructionChecklistTemplate) === null || _d === void 0 ? void 0 : _d.id;
365
+ if (!templateId)
366
+ return;
367
+ const response = await client.query({
368
+ query: gql `
369
+ query ($filters: [Filter!], $sortings: [Sorting!]) {
370
+ constructionChecklistTemplateItems(filters: $filters, sortings: $sortings) {
371
+ items {
372
+ id
373
+ sequence
374
+ mainType
375
+ name
376
+ inspctionCriteria
377
+ recommendation1
378
+ recommendation2
379
+ recommendation3
380
+ recommendation4
381
+ recommendation5
382
+ }
383
+ }
384
+ }
385
+ `,
386
+ variables: {
387
+ filters: [{ name: 'constructionChecklistTemplateId', value: templateId, operator: 'eq' }],
388
+ sortings: [{ name: 'sequence' }]
389
+ }
390
+ });
391
+ const items = ((_f = (_e = response.data) === null || _e === void 0 ? void 0 : _e.constructionChecklistTemplateItems) === null || _f === void 0 ? void 0 : _f.items) || [];
392
+ this.templateItems = items;
393
+ // 왼쪽 그리드에 데이터 셋팅 (recommendation 포함)
394
+ this.leftGrist.data = {
395
+ records: items.map(item => ({
396
+ mainType: item.mainType || '',
397
+ name: item.name || '',
398
+ inspctionCriteria: item.inspctionCriteria || '',
399
+ originalName: item.name || '',
400
+ recommendation1: item.recommendation1 || '',
401
+ recommendation2: item.recommendation2 || '',
402
+ recommendation3: item.recommendation3 || '',
403
+ recommendation4: item.recommendation4 || '',
404
+ recommendation5: item.recommendation5 || ''
405
+ }))
406
+ };
407
+ }
408
+ async _handleRightGristRowClick(columns, data, column, record, rowIndex, field) {
409
+ // 클릭 시 해당 로우 선택/해제 토글
410
+ field === null || field === void 0 ? void 0 : field.dispatchEvent(new CustomEvent('select-record-change', {
411
+ bubbles: true,
412
+ composed: true,
413
+ detail: record['__selected__'] ? { removed: [record] } : { added: [record] }
414
+ }));
415
+ // 토글 반영 후 처리
416
+ setTimeout(async () => {
417
+ var _a, _b, _c, _d;
418
+ const selected = (_b = (_a = this.rightGrist) === null || _a === void 0 ? void 0 : _a.selected) === null || _b === void 0 ? void 0 : _b[0];
419
+ if (!selected || !selected.id) {
420
+ // 선택 해제 → 등록 모드 + 왼쪽 초기화
421
+ await this._resetLeftForm();
422
+ return;
423
+ }
424
+ // 선택 → 수정 모드
425
+ this.isEditMode = true;
426
+ this.selectedChecklistId = selected.id;
427
+ this.checklistName = selected.name || '';
428
+ // 공종/세부공종 세팅
429
+ const ct = this.constructionTypes.find(c => c.id === selected.constructionTypeId) || {};
430
+ this.selectedConstructionType = ct;
431
+ this.selectedConstructionDetailType = Object.assign({}, (((_c = ct.constructionDetailTypes) === null || _c === void 0 ? void 0 : _c.find(d => d.id === selected.constructionDetailTypeId)) || {}));
432
+ // 공종 변경으로 세부공종 options가 re-render 된 후 select UI 동기화
433
+ await this.updateComplete;
434
+ const cdtIndex = (ct.constructionDetailTypes || []).findIndex(d => d.id === selected.constructionDetailTypeId);
435
+ if (cdtIndex >= 0) {
436
+ await ((_d = this.htmlSelectConstructionDetailType) === null || _d === void 0 ? void 0 : _d.selectIndex(cdtIndex));
437
+ }
438
+ // 공종+세부공종의 템플릿 아이템 로드 (추천 options용)
439
+ await this._loadTemplateItemsForEdit(selected.constructionTypeId, selected.constructionDetailTypeId);
440
+ // 저장된 아이템 로드 (FieldResolver 활용)
441
+ const items = await this._fetchChecklistItems(selected.id);
442
+ // templateItems에서 같은 mainType의 recommendation을 매칭
443
+ this.leftGrist.data = {
444
+ records: items.map(item => {
445
+ const tmpl = this.templateItems.find(t => t.mainType === item.mainType) || {};
446
+ return {
447
+ mainType: item.mainType || '',
448
+ name: item.name || '',
449
+ inspctionCriteria: item.inspctionCriteria || '',
450
+ originalName: tmpl.name || item.name || '',
451
+ recommendation1: tmpl.recommendation1 || '',
452
+ recommendation2: tmpl.recommendation2 || '',
453
+ recommendation3: tmpl.recommendation3 || '',
454
+ recommendation4: tmpl.recommendation4 || '',
455
+ recommendation5: tmpl.recommendation5 || ''
456
+ };
457
+ })
458
+ };
459
+ }, 100);
460
+ }
461
+ async _loadTemplateItemsForEdit(ctId, cdtId) {
462
+ var _a, _b, _c, _d;
463
+ if (!ctId || !cdtId) {
464
+ this.templateItems = [];
465
+ return;
466
+ }
467
+ const upsertRes = await client.mutate({
468
+ mutation: gql `
469
+ mutation ($ctId: String!, $cdtId: String!) {
470
+ upsertConstructionChecklistTemplate(constructionTypeId: $ctId, constructionDetailTypeId: $cdtId) {
471
+ id
472
+ }
473
+ }
474
+ `,
475
+ variables: { ctId, cdtId }
476
+ });
477
+ const templateId = (_b = (_a = upsertRes.data) === null || _a === void 0 ? void 0 : _a.upsertConstructionChecklistTemplate) === null || _b === void 0 ? void 0 : _b.id;
478
+ if (!templateId)
479
+ return;
480
+ const response = await client.query({
481
+ query: gql `
482
+ query ($filters: [Filter!], $sortings: [Sorting!]) {
483
+ constructionChecklistTemplateItems(filters: $filters, sortings: $sortings) {
484
+ items {
485
+ id
486
+ sequence
487
+ mainType
488
+ name
489
+ inspctionCriteria
490
+ recommendation1
491
+ recommendation2
492
+ recommendation3
493
+ recommendation4
494
+ recommendation5
495
+ }
496
+ }
497
+ }
498
+ `,
499
+ variables: {
500
+ filters: [{ name: 'constructionChecklistTemplateId', value: templateId, operator: 'eq' }],
501
+ sortings: [{ name: 'sequence' }]
502
+ }
503
+ });
504
+ this.templateItems = ((_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.constructionChecklistTemplateItems) === null || _d === void 0 ? void 0 : _d.items) || [];
505
+ }
506
+ async _save() {
507
+ var _a, _b, _c, _d;
508
+ const ctId = (_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.id;
509
+ const cdtId = (_b = this.selectedConstructionDetailType) === null || _b === void 0 ? void 0 : _b.id;
510
+ const name = (_c = this.checklistName) === null || _c === void 0 ? void 0 : _c.trim();
511
+ if (!ctId || !cdtId) {
512
+ notify({ message: '공종과 세부공종을 선택해주세요.', level: 'warn' });
513
+ return;
514
+ }
515
+ if (!name) {
516
+ notify({ message: '이름을 입력해주세요.', level: 'warn' });
517
+ return;
518
+ }
519
+ // 그리드에서 아이템 추출
520
+ const records = ((_d = this.leftGrist.dirtyData) === null || _d === void 0 ? void 0 : _d.records) || [];
521
+ const items = records.map((row, idx) => ({
522
+ mainType: row.mainType || null,
523
+ name: row.name || '',
524
+ inspctionCriteria: row.inspctionCriteria || null,
525
+ sequence: idx
526
+ }));
527
+ try {
528
+ if (this.isEditMode && this.selectedChecklistId) {
529
+ // 수정
530
+ const response = await client.mutate({
531
+ mutation: gql `
532
+ mutation ($id: String!, $name: String!, $items: [ProjectChecklistItemInput!]!) {
533
+ updateProjectChecklist(id: $id, name: $name, items: $items) {
534
+ id
535
+ }
536
+ }
537
+ `,
538
+ variables: {
539
+ id: this.selectedChecklistId,
540
+ name,
541
+ items
542
+ }
543
+ });
544
+ if (!response.errors) {
545
+ notify({ message: '수정되었습니다.' });
546
+ this.rightGrist.fetch();
547
+ }
548
+ else {
549
+ notify({ message: '수정에 실패하였습니다.', level: 'error' });
550
+ }
551
+ }
552
+ else {
553
+ // 등록
554
+ const response = await client.mutate({
555
+ mutation: gql `
556
+ mutation (
557
+ $projectId: String!
558
+ $constructionTypeId: String!
559
+ $constructionDetailTypeId: String!
560
+ $name: String!
561
+ $items: [ProjectChecklistItemInput!]!
562
+ ) {
563
+ createProjectChecklist(
564
+ projectId: $projectId
565
+ constructionTypeId: $constructionTypeId
566
+ constructionDetailTypeId: $constructionDetailTypeId
567
+ name: $name
568
+ items: $items
569
+ ) {
570
+ id
571
+ }
572
+ }
573
+ `,
574
+ variables: {
575
+ projectId: this.projectId,
576
+ constructionTypeId: ctId,
577
+ constructionDetailTypeId: cdtId,
578
+ name,
579
+ items
580
+ }
581
+ });
582
+ if (!response.errors) {
583
+ notify({ message: '등록되었습니다.' });
584
+ // 오른쪽 그리드 새로고침 + 왼쪽 초기화
585
+ await this.rightGrist.fetch();
586
+ this._resetLeftForm();
587
+ }
588
+ else {
589
+ notify({ message: '등록에 실패하였습니다.', level: 'error' });
590
+ }
591
+ }
592
+ }
593
+ catch (e) {
594
+ notify({ message: '저장 중 오류가 발생하였습니다.', level: 'error' });
595
+ }
596
+ }
597
+ async _resetLeftForm() {
598
+ var _a, _b;
599
+ this.isEditMode = false;
600
+ this.selectedChecklistId = null;
601
+ this.checklistName = '';
602
+ this.selectedConstructionType = {};
603
+ this.selectedConstructionDetailType = {};
604
+ this.templateItems = [];
605
+ this.leftGrist.data = { records: [] };
606
+ await this.updateComplete;
607
+ // md-filled-select 내부 상태 초기화
608
+ (_a = this.htmlSelectConstructionType) === null || _a === void 0 ? void 0 : _a.reset();
609
+ (_b = this.htmlSelectConstructionDetailType) === null || _b === void 0 ? void 0 : _b.reset();
610
+ }
611
+ async _delete() {
612
+ var _a, _b;
613
+ const selectedItems = ((_a = this.leftGrist) === null || _a === void 0 ? void 0 : _a.selected) || [];
614
+ if (selectedItems.length > 0) {
615
+ // 왼쪽 그리드에서 선택된 row 삭제 (클라이언트 측)
616
+ if (confirm('선택된 검사항목을 삭제하시겠습니까?')) {
617
+ const records = ((_b = this.leftGrist.dirtyData) === null || _b === void 0 ? void 0 : _b.records) || [];
618
+ const selectedIndices = new Set(selectedItems.map((_, i) => {
619
+ return records.indexOf(selectedItems[i]);
620
+ }));
621
+ const remaining = records.filter((_, i) => !selectedIndices.has(i));
622
+ this.leftGrist.data = { records: remaining };
623
+ }
624
+ }
625
+ else if (this.isEditMode && this.selectedChecklistId) {
626
+ // 체크리스트 자체 삭제
627
+ if (confirm('이 체크리스트를 삭제하시겠습니까?')) {
628
+ const response = await client.mutate({
629
+ mutation: gql `
630
+ mutation ($ids: [String!]!) {
631
+ deleteProjectChecklists(ids: $ids)
632
+ }
633
+ `,
634
+ variables: { ids: [this.selectedChecklistId] }
635
+ });
636
+ if (!response.errors) {
637
+ notify({ message: '삭제되었습니다.' });
638
+ this.isEditMode = false;
639
+ this.selectedChecklistId = null;
640
+ this.checklistName = '';
641
+ this.leftGrist.data = { records: [] };
642
+ this.rightGrist.fetch();
643
+ }
644
+ }
645
+ }
646
+ else {
647
+ notify({ message: '삭제할 항목을 선택해주세요.', level: 'warn' });
648
+ }
649
+ }
650
+ async _fetchChecklistItems(checklistId) {
651
+ var _a, _b, _c, _d;
652
+ const response = await client.query({
653
+ query: gql `
654
+ query ($filters: [Filter!]) {
655
+ projectChecklists(filters: $filters) {
656
+ items {
657
+ projectChecklistItems {
658
+ id
659
+ mainType
660
+ name
661
+ inspctionCriteria
662
+ sequence
663
+ }
664
+ }
665
+ }
666
+ }
667
+ `,
668
+ variables: {
669
+ filters: [{ name: 'id', value: checklistId, operator: 'eq' }]
670
+ }
671
+ });
672
+ return ((_d = (_c = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.projectChecklists) === null || _b === void 0 ? void 0 : _b.items) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.projectChecklistItems) || [];
673
+ }
674
+ async _openPreview(record) {
675
+ var _a, _b;
676
+ const items = await this._fetchChecklistItems(record.id);
677
+ const ctName = ((_a = this.constructionTypes.find(ct => ct.id === record.constructionTypeId)) === null || _a === void 0 ? void 0 : _a.name) || '';
678
+ const cdtName = ((_b = this.allDetailTypes.find(dt => dt.id === record.constructionDetailTypeId)) === null || _b === void 0 ? void 0 : _b.name) || '';
679
+ const checklist = {
680
+ name: record.name,
681
+ constructionType: ctName,
682
+ constructionDetailType: cdtName,
683
+ location: '',
684
+ documentNo: '',
685
+ inspectionParts: [],
686
+ buildingInspection: {
687
+ status: BuildingInspectionStatus.WAIT
688
+ },
689
+ checklistItems: items.map(item => (Object.assign(Object.assign({}, item), { detailType: '' })))
690
+ };
691
+ openPopup(html `
692
+ <div style="overflow-y: auto;">
693
+ <checklist-view .mode=${"VIEWER" /* ChecklistMode.VIEWER */} .checklist=${checklist}></checklist-view>
694
+ </div>
695
+ `, {
696
+ backdrop: true,
697
+ size: 'large',
698
+ title: `체크리스트 미리보기 - ${record.name}`
699
+ });
700
+ }
701
+ };
702
+ ProjectChecklistManagement.styles = [
703
+ ScrollbarStyles,
704
+ CommonGristStyles,
705
+ ButtonContainerStyles,
706
+ css `
707
+ :host {
708
+ display: flex;
709
+ flex-direction: column;
710
+ width: 100%;
711
+ height: 100%;
712
+ background-color: var(--md-sys-color-surface);
713
+ }
714
+
715
+ div[header] {
716
+ display: flex;
717
+ align-items: center;
718
+ padding: 0px 12px;
719
+
720
+ h2 {
721
+ display: flex;
722
+ gap: 7px;
723
+ flex: 1;
724
+ margin-bottom: 8px;
725
+ color: #3f71a0;
726
+ font-size: 18px;
727
+
728
+ md-icon[back] {
729
+ background: linear-gradient(135deg, #3f71a0 0%, #5a8cc7 100%);
730
+ color: white;
731
+ padding: 8px;
732
+ border-radius: 50%;
733
+ cursor: pointer;
734
+ box-shadow: 0 2px 8px rgba(63, 113, 160, 0.3);
735
+ width: 14px;
736
+ height: 14px;
737
+ --md-icon-size: 20px;
738
+ }
739
+
740
+ md-icon[back]:hover {
741
+ background: linear-gradient(135deg, #2e5c89 0%, #4a7bb0 100%);
742
+ box-shadow: 0 4px 12px rgba(63, 113, 160, 0.4);
743
+ }
744
+ }
745
+
746
+ div[button-container] {
747
+ display: flex;
748
+ align-items: center;
749
+ justify-content: end;
750
+ flex: 1;
751
+ padding-top: 8px;
752
+
753
+ md-elevated-button {
754
+ margin: 0 4px;
755
+ --md-elevated-button-container-height: 32px;
756
+ --md-elevated-button-label-text-size: 16px;
757
+ --md-elevated-button-container-color: #0595e5;
758
+ --md-elevated-button-label-text-color: var(--md-sys-color-on-primary);
759
+ --md-elevated-button-hover-label-text-color: var(--md-sys-color-on-primary);
760
+ --md-elevated-button-pressed-label-text-color: var(--md-sys-color-on-primary);
761
+ --md-elevated-button-focus-label-text-color: var(--md-sys-color-on-primary);
762
+ --md-elevated-button-icon-color: var(--md-sys-color-on-primary);
763
+ --md-elevated-button-hover-icon-color: var(--md-sys-color-on-primary);
764
+ --md-elevated-button-pressed-icon-color: var(--md-sys-color-on-primary);
765
+ --md-elevated-button-focus-icon-color: var(--md-sys-color-on-primary);
766
+ }
767
+ }
768
+ }
769
+
770
+ div[body] {
771
+ display: grid;
772
+ grid-template-columns: 1fr 1fr;
773
+ gap: 15px;
774
+ flex: 1;
775
+ padding: 15px;
776
+ overflow: hidden;
777
+ }
778
+
779
+ div[left],
780
+ div[right] {
781
+ display: flex;
782
+ flex-direction: column;
783
+ overflow: hidden;
784
+ border: 1px solid #ddd;
785
+ border-radius: 8px;
786
+ padding: 15px;
787
+ }
788
+
789
+ div[section-header] {
790
+ font-size: 16px;
791
+ font-weight: 600;
792
+ margin-bottom: 10px;
793
+ color: #0595e5;
794
+ display: flex;
795
+ align-items: center;
796
+ gap: 6px;
797
+ }
798
+
799
+ div[form-area] {
800
+ display: grid;
801
+ grid-template-columns: 80px 1fr;
802
+ gap: 10px;
803
+ margin-bottom: 10px;
804
+
805
+ label {
806
+ display: flex;
807
+ align-items: center;
808
+ justify-content: flex-end;
809
+ font-size: 14px;
810
+ }
811
+ }
812
+
813
+ md-filled-select {
814
+ width: 100%;
815
+ --md-filled-select-text-field-container-color: transparent;
816
+ --md-filled-select-text-field-active-indicator-color: #999;
817
+ --md-filled-select-text-field-input-text-size: 14px;
818
+ }
819
+
820
+ md-filled-text-field {
821
+ width: 100%;
822
+ --md-filled-text-field-container-color: transparent;
823
+ --md-filled-text-field-active-indicator-color: #999;
824
+ --md-filled-text-field-input-text-size: 14px;
825
+ }
826
+
827
+ ox-grist {
828
+ flex: 1;
829
+ overflow-y: auto;
830
+ }
831
+
832
+ div[button-container] {
833
+ display: flex;
834
+ justify-content: flex-end;
835
+ gap: 8px;
836
+ margin-top: 10px;
837
+ }
838
+
839
+ md-elevated-button[save] {
840
+ --md-elevated-button-container-color: #0595e5;
841
+ --md-elevated-button-label-text-color: #fff;
842
+ --md-elevated-button-hover-label-text-color: #fff;
843
+ --md-elevated-button-pressed-label-text-color: #fff;
844
+ --md-elevated-button-focus-label-text-color: #fff;
845
+ --md-elevated-button-icon-color: #fff;
846
+ --md-elevated-button-hover-icon-color: #fff;
847
+ --md-elevated-button-pressed-icon-color: #fff;
848
+ --md-elevated-button-focus-icon-color: #fff;
849
+ }
850
+
851
+ md-elevated-button[delete] {
852
+ --md-elevated-button-container-color: #e53935;
853
+ --md-elevated-button-label-text-color: #fff;
854
+ --md-elevated-button-hover-label-text-color: #fff;
855
+ --md-elevated-button-pressed-label-text-color: #fff;
856
+ --md-elevated-button-focus-label-text-color: #fff;
857
+ --md-elevated-button-icon-color: #fff;
858
+ --md-elevated-button-hover-icon-color: #fff;
859
+ --md-elevated-button-pressed-icon-color: #fff;
860
+ --md-elevated-button-focus-icon-color: #fff;
861
+ }
862
+ `
863
+ ];
864
+ __decorate([
865
+ state(),
866
+ __metadata("design:type", String)
867
+ ], ProjectChecklistManagement.prototype, "projectId", void 0);
868
+ __decorate([
869
+ state(),
870
+ __metadata("design:type", String)
871
+ ], ProjectChecklistManagement.prototype, "projectName", void 0);
872
+ __decorate([
873
+ state(),
874
+ __metadata("design:type", Array)
875
+ ], ProjectChecklistManagement.prototype, "constructionTypes", void 0);
876
+ __decorate([
877
+ state(),
878
+ __metadata("design:type", Array)
879
+ ], ProjectChecklistManagement.prototype, "allDetailTypes", void 0);
880
+ __decorate([
881
+ state(),
882
+ __metadata("design:type", Object)
883
+ ], ProjectChecklistManagement.prototype, "selectedConstructionType", void 0);
884
+ __decorate([
885
+ state(),
886
+ __metadata("design:type", Object)
887
+ ], ProjectChecklistManagement.prototype, "selectedConstructionDetailType", void 0);
888
+ __decorate([
889
+ state(),
890
+ __metadata("design:type", String)
891
+ ], ProjectChecklistManagement.prototype, "checklistName", void 0);
892
+ __decorate([
893
+ state(),
894
+ __metadata("design:type", Array)
895
+ ], ProjectChecklistManagement.prototype, "templateItems", void 0);
896
+ __decorate([
897
+ state(),
898
+ __metadata("design:type", Object)
899
+ ], ProjectChecklistManagement.prototype, "leftGristConfig", void 0);
900
+ __decorate([
901
+ state(),
902
+ __metadata("design:type", Object)
903
+ ], ProjectChecklistManagement.prototype, "rightGristConfig", void 0);
904
+ __decorate([
905
+ state(),
906
+ __metadata("design:type", Boolean)
907
+ ], ProjectChecklistManagement.prototype, "isEditMode", void 0);
908
+ __decorate([
909
+ state(),
910
+ __metadata("design:type", Object)
911
+ ], ProjectChecklistManagement.prototype, "selectedChecklistId", void 0);
912
+ __decorate([
913
+ query('ox-grist[left]'),
914
+ __metadata("design:type", DataGrist)
915
+ ], ProjectChecklistManagement.prototype, "leftGrist", void 0);
916
+ __decorate([
917
+ query('ox-grist[right]'),
918
+ __metadata("design:type", DataGrist)
919
+ ], ProjectChecklistManagement.prototype, "rightGrist", void 0);
920
+ __decorate([
921
+ query('md-filled-select[constructionType]'),
922
+ __metadata("design:type", Object)
923
+ ], ProjectChecklistManagement.prototype, "htmlSelectConstructionType", void 0);
924
+ __decorate([
925
+ query('md-filled-select[constructionDetailType]'),
926
+ __metadata("design:type", Object)
927
+ ], ProjectChecklistManagement.prototype, "htmlSelectConstructionDetailType", void 0);
928
+ ProjectChecklistManagement = __decorate([
929
+ customElement('project-checklist-management')
930
+ ], ProjectChecklistManagement);
931
+ export { ProjectChecklistManagement };
932
+ //# sourceMappingURL=project-checklist-management.js.map