@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
@@ -1,54 +1,172 @@
1
1
  import { html } from 'lit';
2
2
  import gql from 'graphql-tag';
3
3
  import { client } from '@operato/graphql';
4
+ import moment from 'moment-timezone';
4
5
  export class InspectionEventProvider {
5
- constructor(buildingLevelId = '') {
6
- this.buildingLevelId = {};
6
+ constructor(buildingLevelId = '', projectId = '', buildingId = '') {
7
+ this.buildingLevelId = '';
8
+ this.buildingId = '';
9
+ this.projectId = '';
7
10
  this.buildingLevelId = buildingLevelId;
11
+ this.projectId = projectId;
12
+ this.buildingId = buildingId;
8
13
  }
9
14
  async fetchEventsForCalendar(calendar) {
10
- var _a;
15
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
11
16
  const result = new Map();
12
- const startDate = calendar[0]['date'].toISOString().split('T')[0];
13
- const endDate = calendar[calendar.length - 1]['date'].toISOString().split('T')[0];
14
- const response = await client.query({
15
- query: gql `
16
- query BuildingInspectionDateSummaryOfLevelAndPeriod($buildingLevelId: String!, $startDate: String!, $endDate: String!) {
17
- buildingInspectionDateSummaryOfLevelAndPeriod(
18
- buildingLevelId: $buildingLevelId
19
- startDate: $startDate
20
- endDate: $endDate
17
+ const startDate = moment(calendar[0]['date']).format('YYYY-MM-DD');
18
+ const endDate = moment(calendar[calendar.length - 1]['date']).format('YYYY-MM-DD');
19
+ let inspectionData = [];
20
+ let worklogDates = [];
21
+ if (this.buildingLevelId) {
22
+ // 층 레벨 조회
23
+ const response = await client.query({
24
+ query: gql `
25
+ query BuildingInspectionDateSummaryOfLevelAndPeriod(
26
+ $buildingLevelId: String!
27
+ $startDate: String!
28
+ $endDate: String!
29
+ $projectId: String!
21
30
  ) {
22
- requestDate
23
- wait
24
- request
25
- pass
26
- fail
31
+ buildingInspectionDateSummaryOfLevelAndPeriod(
32
+ buildingLevelId: $buildingLevelId
33
+ startDate: $startDate
34
+ endDate: $endDate
35
+ ) {
36
+ requestDate
37
+ wait
38
+ request
39
+ pass
40
+ fail
41
+ reWait
42
+ }
43
+ dailyWorklogDatesOfProject(projectId: $projectId, startDate: $startDate, endDate: $endDate) {
44
+ id
45
+ date
46
+ }
27
47
  }
48
+ `,
49
+ variables: {
50
+ buildingLevelId: this.buildingLevelId,
51
+ projectId: this.projectId,
52
+ startDate,
53
+ endDate
54
+ }
55
+ });
56
+ inspectionData = ((_a = response.data) === null || _a === void 0 ? void 0 : _a.buildingInspectionDateSummaryOfLevelAndPeriod) || [];
57
+ worklogDates = ((_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.dailyWorklogDatesOfProject) === null || _c === void 0 ? void 0 : _c.map(v => v.date)) || [];
28
58
  }
29
- `,
30
- variables: {
31
- buildingLevelId: this.buildingLevelId,
32
- startDate,
33
- endDate
59
+ else if (this.buildingId) {
60
+ // 동 레벨 조회
61
+ const response = await client.query({
62
+ query: gql `
63
+ query BuildingInspectionDateSummaryOfBuilding(
64
+ $buildingId: String!
65
+ $startDate: String!
66
+ $endDate: String!
67
+ $projectId: String!
68
+ ) {
69
+ buildingInspectionDateSummaryOfBuilding(
70
+ buildingId: $buildingId
71
+ startDate: $startDate
72
+ endDate: $endDate
73
+ ) {
74
+ requestDate
75
+ wait
76
+ request
77
+ pass
78
+ fail
79
+ reWait
34
80
  }
35
- });
36
- // if (response.errors) return null
37
- const calendarData = this.getCalendarTemplate((_a = response.data) === null || _a === void 0 ? void 0 : _a.buildingInspectionDateSummaryOfLevelAndPeriod);
81
+ dailyWorklogDatesOfProject(projectId: $projectId, startDate: $startDate, endDate: $endDate) {
82
+ id
83
+ date
84
+ }
85
+ }
86
+ `,
87
+ variables: {
88
+ buildingId: this.buildingId,
89
+ projectId: this.projectId,
90
+ startDate,
91
+ endDate
92
+ }
93
+ });
94
+ inspectionData = ((_d = response.data) === null || _d === void 0 ? void 0 : _d.buildingInspectionDateSummaryOfBuilding) || [];
95
+ worklogDates = ((_f = (_e = response.data) === null || _e === void 0 ? void 0 : _e.dailyWorklogDatesOfProject) === null || _f === void 0 ? void 0 : _f.map(v => v.date)) || [];
96
+ }
97
+ else {
98
+ // 프로젝트 레벨 조회 (동 미선택 시)
99
+ const response = await client.query({
100
+ query: gql `
101
+ query BuildingInspectionDateSummaryOfProject(
102
+ $projectId: String!
103
+ $startDate: String!
104
+ $endDate: String!
105
+ ) {
106
+ buildingInspectionDateSummaryOfProject(
107
+ projectId: $projectId
108
+ startDate: $startDate
109
+ endDate: $endDate
110
+ ) {
111
+ requestDate
112
+ wait
113
+ request
114
+ pass
115
+ fail
116
+ reWait
117
+ }
118
+ dailyWorklogDatesOfProject(projectId: $projectId, startDate: $startDate, endDate: $endDate) {
119
+ id
120
+ date
121
+ }
122
+ }
123
+ `,
124
+ variables: {
125
+ projectId: this.projectId,
126
+ startDate,
127
+ endDate
128
+ }
129
+ });
130
+ inspectionData = ((_g = response.data) === null || _g === void 0 ? void 0 : _g.buildingInspectionDateSummaryOfProject) || [];
131
+ worklogDates = ((_j = (_h = response.data) === null || _h === void 0 ? void 0 : _h.dailyWorklogDatesOfProject) === null || _j === void 0 ? void 0 : _j.map(v => v.date)) || [];
132
+ }
133
+ const calendarData = this.getCalendarTemplate(inspectionData);
134
+ const worklogSet = new Set(worklogDates);
38
135
  calendar.forEach(({ date }) => {
39
136
  const formattedDate = date.toLocaleDateString('en-CA'); // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.
40
137
  const template = calendarData[formattedDate];
41
- if (!template)
42
- return;
43
- result.set(date, [
44
- {
45
- due: formattedDate,
46
- template: template,
47
- title: '',
48
- color: '',
49
- clickEvent: e => console.log('e :', e, template)
50
- }
51
- ]);
138
+ const hasWorklog = worklogSet.has(formattedDate);
139
+ if (template || hasWorklog) {
140
+ result.set(date, [
141
+ {
142
+ due: formattedDate,
143
+ template: html `
144
+ <div style="display:grid;grid-template-columns:repeat(2,1fr);padding-inline:7px;align-items:center;gap:4px;">
145
+ ${template || html ``}
146
+ ${hasWorklog
147
+ ? html `<div style="justify-self:end">
148
+ <md-icon
149
+ style="color:#008000;cursor:pointer;"
150
+ @click=${(e) => {
151
+ e.stopPropagation();
152
+ e.preventDefault();
153
+ e.target.dispatchEvent(new CustomEvent('open-worklog', {
154
+ detail: { date: formattedDate },
155
+ bubbles: true,
156
+ composed: true
157
+ }));
158
+ }}
159
+ >description</md-icon>
160
+ </div>`
161
+ : html ``}
162
+ </div>
163
+ `,
164
+ title: '',
165
+ color: '',
166
+ clickEvent: e => console.log('calendar click', formattedDate)
167
+ }
168
+ ]);
169
+ }
52
170
  });
53
171
  return result;
54
172
  }
@@ -59,9 +177,10 @@ export class InspectionEventProvider {
59
177
  template[date.requestDate] = html `
60
178
  <div style="display: grid; grid-template-columns: repeat(2, 1fr); padding-inline: 7px;">
61
179
  ${date.wait !== 0 ? html `<div><span style="font-size: 1.3em; color: #4e5055">●</span> ${date.wait}</div>` : ''}
62
- ${date.request !== 0 ? html `<div><span style="font-size: 1.3em; color: #3395f1">●</span> ${date.request}</div>` : ''}
180
+ ${date.request !== 0 ? html `<div><span style="font-size: 1.3em; color: #2e79be">●</span> ${date.request}</div>` : ''}
63
181
  ${date.pass !== 0 ? html `<div><span style="font-size: 1.3em; color: #1bb401">●</span> ${date.pass}</div>` : ''}
64
182
  ${date.fail !== 0 ? html `<div><span style="font-size: 1.3em; color: #ff4444">●</span> ${date.fail}</div>` : ''}
183
+ ${date.reWait ? html `<div><span style="font-size: 1.3em; color: #e89c0e">●</span> ${date.reWait}</div>` : ''}
65
184
  </div>
66
185
  `;
67
186
  }
@@ -1 +1 @@
1
- {"version":3,"file":"inspection-event-provider.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/inspection-event-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,MAAM,OAAO,uBAAuB;IAGlC,YAAY,kBAA0B,EAAE;QAFxC,oBAAe,GAAG,EAAE,CAAA;QAGlB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;IACxC,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,QAAkB;;QAC7C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAA;QAC1C,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACjE,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,C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AAQ,CAAC,CAAC,CAAC,EAAE;YAC5G,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE;YAClH,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5G,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;;OAEjH,CAAA;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF","sourcesContent":["import { BizEvent, CALENDAR, EventProvider } from '@operato/event-view'\nimport { html, TemplateResult } from 'lit'\nimport gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\n\nexport class InspectionEventProvider implements EventProvider {\n buildingLevelId = {}\n\n constructor(buildingLevelId: string = '') {\n this.buildingLevelId = buildingLevelId\n }\n\n async fetchEventsForCalendar(calendar: CALENDAR): Promise<Map<Date, BizEvent[]>> {\n const result = new Map<Date, BizEvent[]>()\n const startDate = calendar[0]['date'].toISOString().split('T')[0]\n const endDate = calendar[calendar.length - 1]['date'].toISOString().split('T')[0]\n\n const response = await client.query({\n query: gql`\n query BuildingInspectionDateSummaryOfLevelAndPeriod($buildingLevelId: String!, $startDate: String!, $endDate: String!) {\n buildingInspectionDateSummaryOfLevelAndPeriod(\n buildingLevelId: $buildingLevelId\n startDate: $startDate\n endDate: $endDate\n ) {\n requestDate\n wait\n request\n pass\n fail\n }\n }\n `,\n variables: {\n buildingLevelId: this.buildingLevelId,\n startDate,\n endDate\n }\n })\n\n // if (response.errors) return null\n\n const calendarData = this.getCalendarTemplate(response.data?.buildingInspectionDateSummaryOfLevelAndPeriod)\n\n calendar.forEach(({ date }) => {\n const formattedDate = date.toLocaleDateString('en-CA') // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.\n const template = calendarData[formattedDate]\n\n if (!template) return\n\n result.set(date, [\n {\n due: formattedDate,\n template: template,\n title: '',\n color: '',\n clickEvent: e => console.log('e :', e, template)\n }\n ])\n })\n\n return result\n }\n\n // 검측 개수가 있는 데이터들만 날짜별로 템플릿 만들기\n private getCalendarTemplate(inspectionData: any[] = []): { [date: string]: TemplateResult } {\n const template = {}\n for (let date of inspectionData) {\n template[date.requestDate] = html`\n <div style=\"display: grid; grid-template-columns: repeat(2, 1fr); padding-inline: 7px;\">\n ${date.wait !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #4e5055\">●</span> ${date.wait}</div>` : ''}\n ${date.request !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #3395f1\">●</span> ${date.request}</div>` : ''}\n ${date.pass !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #1bb401\">●</span> ${date.pass}</div>` : ''}\n ${date.fail !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #ff4444\">●</span> ${date.fail}</div>` : ''}\n </div>\n `\n }\n\n return template\n }\n}\n"]}
1
+ {"version":3,"file":"inspection-event-provider.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/inspection-event-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,OAAO,uBAAuB;IAKlC,YAAY,kBAA0B,EAAE,EAAE,YAAoB,EAAE,EAAE,aAAqB,EAAE;QAJzF,oBAAe,GAAW,EAAE,CAAA;QAC5B,eAAU,GAAW,EAAE,CAAA;QACvB,cAAS,GAAW,EAAE,CAAA;QAGpB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,CAAC,SAAS,GAAG,SAA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EAAE;YAC5G,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE;YAClH,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5G,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5G,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE;;OAE/G,CAAA;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF","sourcesContent":["import { BizEvent, CALENDAR, EventProvider } from '@operato/event-view'\nimport { html, TemplateResult } from 'lit'\nimport gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\nimport moment from 'moment-timezone'\n\nexport class InspectionEventProvider implements EventProvider {\n buildingLevelId: string = ''\n buildingId: string = ''\n projectId: string = ''\n\n constructor(buildingLevelId: string = '', projectId: string = '', buildingId: string = '') {\n this.buildingLevelId = buildingLevelId\n this.projectId = projectId\n this.buildingId = buildingId\n }\n\n async fetchEventsForCalendar(calendar: CALENDAR): Promise<Map<Date, BizEvent[]>> {\n const result = new Map<Date, BizEvent[]>()\n const startDate = moment(calendar[0]['date']).format('YYYY-MM-DD')\n const endDate = moment(calendar[calendar.length - 1]['date']).format('YYYY-MM-DD')\n\n let inspectionData: any[] = []\n let worklogDates: string[] = []\n\n if (this.buildingLevelId) {\n // 층 레벨 조회\n const response = await client.query({\n query: gql`\n query BuildingInspectionDateSummaryOfLevelAndPeriod(\n $buildingLevelId: String!\n $startDate: String!\n $endDate: String!\n $projectId: String!\n ) {\n buildingInspectionDateSummaryOfLevelAndPeriod(\n buildingLevelId: $buildingLevelId\n startDate: $startDate\n endDate: $endDate\n ) {\n requestDate\n wait\n request\n pass\n fail\n reWait\n }\n dailyWorklogDatesOfProject(projectId: $projectId, startDate: $startDate, endDate: $endDate) {\n id\n date\n }\n }\n `,\n variables: {\n buildingLevelId: this.buildingLevelId,\n projectId: this.projectId,\n startDate,\n endDate\n }\n })\n\n inspectionData = response.data?.buildingInspectionDateSummaryOfLevelAndPeriod || []\n worklogDates = response.data?.dailyWorklogDatesOfProject?.map(v => v.date) || []\n } else if (this.buildingId) {\n // 동 레벨 조회\n const response = await client.query({\n query: gql`\n query BuildingInspectionDateSummaryOfBuilding(\n $buildingId: String!\n $startDate: String!\n $endDate: String!\n $projectId: String!\n ) {\n buildingInspectionDateSummaryOfBuilding(\n buildingId: $buildingId\n startDate: $startDate\n endDate: $endDate\n ) {\n requestDate\n wait\n request\n pass\n fail\n reWait\n }\n dailyWorklogDatesOfProject(projectId: $projectId, startDate: $startDate, endDate: $endDate) {\n id\n date\n }\n }\n `,\n variables: {\n buildingId: this.buildingId,\n projectId: this.projectId,\n startDate,\n endDate\n }\n })\n\n inspectionData = response.data?.buildingInspectionDateSummaryOfBuilding || []\n worklogDates = response.data?.dailyWorklogDatesOfProject?.map(v => v.date) || []\n } else {\n // 프로젝트 레벨 조회 (동 미선택 시)\n const response = await client.query({\n query: gql`\n query BuildingInspectionDateSummaryOfProject(\n $projectId: String!\n $startDate: String!\n $endDate: String!\n ) {\n buildingInspectionDateSummaryOfProject(\n projectId: $projectId\n startDate: $startDate\n endDate: $endDate\n ) {\n requestDate\n wait\n request\n pass\n fail\n reWait\n }\n dailyWorklogDatesOfProject(projectId: $projectId, startDate: $startDate, endDate: $endDate) {\n id\n date\n }\n }\n `,\n variables: {\n projectId: this.projectId,\n startDate,\n endDate\n }\n })\n\n inspectionData = response.data?.buildingInspectionDateSummaryOfProject || []\n worklogDates = response.data?.dailyWorklogDatesOfProject?.map(v => v.date) || []\n }\n\n const calendarData = this.getCalendarTemplate(inspectionData)\n const worklogSet = new Set(worklogDates)\n\n calendar.forEach(({ date }) => {\n const formattedDate = date.toLocaleDateString('en-CA') // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.\n const template = calendarData[formattedDate]\n\n const hasWorklog = worklogSet.has(formattedDate)\n if (template || hasWorklog) {\n result.set(date, [\n {\n due: formattedDate,\n template: html`\n <div style=\"display:grid;grid-template-columns:repeat(2,1fr);padding-inline:7px;align-items:center;gap:4px;\">\n ${template || html``}\n ${hasWorklog\n ? html`<div style=\"justify-self:end\">\n <md-icon\n style=\"color:#008000;cursor:pointer;\"\n @click=${(e: Event) => {\n e.stopPropagation()\n e.preventDefault()\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('open-worklog', {\n detail: { date: formattedDate },\n bubbles: true,\n composed: true\n })\n )\n }}\n >description</md-icon>\n </div>`\n : html``}\n </div>\n `,\n title: '',\n color: '',\n clickEvent: e => console.log('calendar click', formattedDate)\n }\n ])\n }\n })\n\n return result\n }\n\n // 검측 개수가 있는 데이터들만 날짜별로 템플릿 만들기\n private getCalendarTemplate(inspectionData: any[] = []): { [date: string]: TemplateResult } {\n const template = {}\n for (let date of inspectionData) {\n template[date.requestDate] = html`\n <div style=\"display: grid; grid-template-columns: repeat(2, 1fr); padding-inline: 7px;\">\n ${date.wait !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #4e5055\">●</span> ${date.wait}</div>` : ''}\n ${date.request !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #2e79be\">●</span> ${date.request}</div>` : ''}\n ${date.pass !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #1bb401\">●</span> ${date.pass}</div>` : ''}\n ${date.fail !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #ff4444\">●</span> ${date.fail}</div>` : ''}\n ${date.reWait ? html`<div><span style=\"font-size: 1.3em; color: #e89c0e\">●</span> ${date.reWait}</div>` : ''}\n </div>\n `\n }\n\n return template\n }\n}\n"]}
@@ -17,6 +17,7 @@ let InspectionCreatePopup = class InspectionCreatePopup extends LitElement {
17
17
  this.checklistTemplateId = '';
18
18
  this.selectedBuildingId = '';
19
19
  this.selectedBuildingLevelId = '';
20
+ this.project = {};
20
21
  this.buildings = [];
21
22
  this.selectedBuilding = {};
22
23
  this.selectedLevel = {};
@@ -152,7 +153,11 @@ let InspectionCreatePopup = class InspectionCreatePopup extends LitElement {
152
153
  </div>
153
154
 
154
155
  <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>
155
- <checklist-view .mode=${"VIEWER" /* ChecklistMode.VIEWER */} .checklist=${this.checklist}></checklist-view>
156
+ <checklist-view
157
+ .mode=${"VIEWER" /* ChecklistMode.VIEWER */}
158
+ .projectType=${this.project.projectType}
159
+ .checklist=${this.checklist}
160
+ ></checklist-view>
156
161
  </div>
157
162
  </div>
158
163
 
@@ -163,7 +168,7 @@ let InspectionCreatePopup = class InspectionCreatePopup extends LitElement {
163
168
 
164
169
  <div button-container>
165
170
  <md-elevated-button blue @click=${this._createInspection}>
166
- <md-icon slot="icon">task</md-icon>검측 요청서 등록
171
+ <md-icon slot="icon">task</md-icon>검측 등록
167
172
  </md-elevated-button>
168
173
  <md-elevated-button @click=${this._close}> <md-icon slot="icon">cancel</md-icon>취소</md-elevated-button>
169
174
  </div>
@@ -182,6 +187,8 @@ let InspectionCreatePopup = class InspectionCreatePopup extends LitElement {
182
187
  project(id: $id) {
183
188
  id
184
189
  name
190
+ projectType
191
+ documentNaming
185
192
  buildingComplex {
186
193
  id
187
194
  buildings {
@@ -238,6 +245,7 @@ let InspectionCreatePopup = class InspectionCreatePopup extends LitElement {
238
245
  mainType: v.mainType
239
246
  };
240
247
  });
248
+ this.project = project;
241
249
  this.buildings = [...(((_k = project === null || project === void 0 ? void 0 : project.buildingComplex) === null || _k === void 0 ? void 0 : _k.buildings) || [])];
242
250
  this.constructionTypes = [...constructionTypes];
243
251
  this.inspectionDrawingTypes = [...inspectionDrawingTypes];
@@ -272,7 +280,7 @@ let InspectionCreatePopup = class InspectionCreatePopup extends LitElement {
272
280
  constructionType: (_s = this.selectedConstructionType) === null || _s === void 0 ? void 0 : _s.name,
273
281
  constructionDetailType: (_t = this.selectedConstructionDetailType) === null || _t === void 0 ? void 0 : _t.name,
274
282
  location: `${((_u = this.selectedBuilding) === null || _u === void 0 ? void 0 : _u.name) || ''} ${this.selectedLevel.floorDisplayName || ''}층`,
275
- documentNo: '0000-000-000000',
283
+ documentNo: `${project.documentNaming} 검측 제01-00000호`,
276
284
  buildingInspection: {
277
285
  status: BuildingInspectionStatus.WAIT
278
286
  }
@@ -550,12 +558,12 @@ let InspectionCreatePopup = class InspectionCreatePopup extends LitElement {
550
558
  }
551
559
  });
552
560
  if (!response.errors) {
553
- notify({ message: '검측 요청서를 등록하였습니다.' });
561
+ notify({ message: '검측을 등록하였습니다.' });
554
562
  this.requestRefresh();
555
563
  this._close();
556
564
  }
557
565
  else {
558
- notify({ message: ((_c = (_b = response.errors) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.message) || '검측 요청서 등록에 실패하였습니다.', level: 'error' });
566
+ notify({ message: ((_c = (_b = response.errors) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.message) || '검측 등록에 실패하였습니다.', level: 'error' });
559
567
  }
560
568
  }
561
569
  // Input 요소의 값이 변경될 때 호출되는 콜백 함수
@@ -734,6 +742,10 @@ __decorate([
734
742
  property({ type: String }),
735
743
  __metadata("design:type", String)
736
744
  ], InspectionCreatePopup.prototype, "selectedBuildingLevelId", void 0);
745
+ __decorate([
746
+ state(),
747
+ __metadata("design:type", Object)
748
+ ], InspectionCreatePopup.prototype, "project", void 0);
737
749
  __decorate([
738
750
  state(),
739
751
  __metadata("design:type", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"inspection-create-popup.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/inspection-create-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAA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,KAAK,CAAC,oCAAoC,CAAC;;yEAA2B;AACpB;IAAlD,KAAK,CAAC,0CAA0C,CAAC;;+EAAiC;AACjC;IAAjD,KAAK,CAAC,yCAAyC,CAAC;;8EAAgC;AACtC;IAA1C,KAAK,CAAC,kCAAkC,CAAC;;uEAAyB;AACrB;IAA7C,KAAK,CAAC,qCAAqC,CAAC;;0EAA4B;AACtD;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;oDAAA;AACb;IAAtB,KAAK,CAAC,cAAc,CAAC;8BAA0B,cAAc;qEAAA;AACrC;IAAxB,KAAK,CAAC,gBAAgB,CAAC;8BAAiB,WAAW;4DAAA;AAxKhD,qBAAqB;IAD1B,aAAa,CAAC,yBAAyB,CAAC;GACnC,qBAAqB,CAwwB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST } from './building-inspection-list'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\n\n@customElement('inspection-create-popup')\nclass InspectionCreatePopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n\n background-color: var(--md-sys-color-surface);\n }\n\n md-filled-select {\n width: auto;\n min-width: 150px;\n --md-filled-select-text-field-container-color: transparent;\n --md-filled-select-text-field-active-indicator-color: #999;\n --md-filled-select-text-field-input-text-size: 14px;\n --md-filled-select-text-field-input-text-weight: bold;\n --md-filled-select-text-field-input-text-line-height: 6px;\n }\n md-filled-select[level] {\n min-width: 110px;\n margin-left: 20px;\n }\n\n checklist-view {\n pointer-events: none;\n transform-origin: top left;\n }\n\n div[body] {\n height: 100%;\n overflow-y: auto;\n\n div[tab-container][inactive] {\n display: none !important;\n }\n\n div[edit] {\n width: 100%;\n\n div[detail] {\n margin-bottom: 30px;\n }\n\n h3 {\n position: relative;\n color: #0595e5;\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0;\n margin-bottom: 5px;\n }\n\n div[data-row] {\n display: grid;\n grid-template-columns: 100px 1fr 0.3fr 100px 1fr;\n gap: 15px;\n margin-bottom: 11px;\n\n & > label {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n font-size: 15px;\n }\n\n div[inspection-parts] {\n display: block;\n margin-top: 7px;\n\n & > span {\n display: inline-block;\n margin-right: 5px;\n margin-bottom: 5px;\n\n & > md-checkbox {\n margin-top: 2px;\n }\n }\n }\n }\n }\n\n div[preview] {\n display: flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n }\n\n div[tabs] {\n display: flex;\n\n button {\n background-color: #fff;\n padding: 6px 14px;\n color: #999;\n border: solid 1px #999;\n border-top: none;\n border-radius: 0px 0px 8px 8px;\n margin-right: -2px;\n cursor: pointer;\n\n &[active] {\n color: var(--button-color, var(--md-sys-color-on-secondary-container));\n font-weight: 600;\n }\n }\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n\n md-elevated-button[blue] {\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: #fff;\n --md-elevated-button-hover-label-text-color: #fff;\n --md-elevated-button-pressed-label-text-color: #fff;\n --md-elevated-button-focus-label-text-color: #fff;\n --md-elevated-button-icon-color: #fff;\n --md-elevated-button-hover-icon-color: #fff;\n --md-elevated-button-pressed-icon-color: #fff;\n --md-elevated-button-focus-icon-color: #fff;\n }\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) checklistDetailTypes: any\n @property({ type: String }) projectId: string = ''\n @property({ type: String }) checklistTemplateId: string = ''\n @property({ type: String }) selectedBuildingId: string = ''\n @property({ type: String }) selectedBuildingLevelId: string = ''\n\n @state() buildings: any = []\n @state() selectedBuilding: any = {}\n @state() selectedLevel: any = {}\n\n @state() constructionTypes: any = []\n @state() selectedConstructionType: any = {}\n @state() selectedConstructionDetailType: any = {}\n\n @state() inspectionDrawingTypes: any = []\n @state() selectedInspectionDrawingType: any = {}\n @state() selectedInspectionParts: Array<string> = []\n\n @state() checklistTemplates: any = []\n @state() checklist: any = {}\n\n @state() activeTab: 'edit' | 'preview' = 'edit'\n\n @query('md-filled-select[building]') htmlSelectBuilding\n @query('md-filled-select[level]') htmlSelectLevel\n @query('md-filled-select[constructionType]') htmlSelectConstructionType\n @query('md-filled-select[constructionDetailType]') htmlSelectConstructionDetailType\n @query('md-filled-select[inspectionDrawingType]') htmlSelectInspectionDrawingType\n @query('md-filled-select[inspectionPart]') htmlSelectInspectionPart\n @query('md-filled-select[checklistTemplate]') htmlSelectChecklistTemplate\n @query('ox-grist') grist!: DataGrist\n @query('div[preview]') checklistViewContainer!: HTMLDivElement\n @query('checklist-view') checklistView!: HTMLElement\n\n render() {\n return html`\n <div body>\n <div tab-container ?inactive=${this.activeTab !== 'edit'} edit>\n <div detail>\n <h3>세부 정보</h3>\n\n <div data-row>\n <label>공종</label>\n <md-filled-select constructionType @change=${this._onSelectConstructionType}>\n ${this.constructionTypes?.map(constructionType => {\n const selected = constructionType.id === this.selectedConstructionType?.id\n return html`<md-select-option ?selected=${selected} .value=${constructionType.id}>\n <div slot=\"headline\">${constructionType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>세부 공종</label>\n <md-filled-select constructionDetailType @change=${this._onSelectConstructionDetailType}>\n ${this.selectedConstructionType?.constructionDetailTypes?.map(constructionDetailType => {\n const selected = constructionDetailType.id === this.selectedConstructionDetailType.id\n return html`<md-select-option ?selected=${selected} .value=${constructionDetailType.id}>\n <div slot=\"headline\">${constructionDetailType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n\n <div data-row>\n <label>동</label>\n <md-filled-select building @change=${this._onSelectBuilding}>\n ${this.buildings?.map(building => {\n return html` <md-select-option .value=${building.id}>\n <div slot=\"headline\">${building.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>층</label>\n <md-filled-select level @change=${this._onSelectBuildingLevel}>\n ${this.selectedBuilding?.buildingLevels?.map(level => {\n return html`<md-select-option .value=${level.id}>\n <div slot=\"headline\">${level.floorDisplayName}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n\n <div data-row>\n <label>검측 도면</label>\n <md-filled-select inspectionDrawingType @change=${this._onSelectInspectionDrawingType}>\n ${this.inspectionDrawingTypes?.map(inspectionDrawingType => {\n return html` <md-select-option .value=${inspectionDrawingType.id}>\n <div slot=\"headline\">${inspectionDrawingType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>검측 부위</label>\n <div inspection-parts>\n ${this.selectedInspectionDrawingType?.inspectionParts?.map(inspectionPart => {\n return html`\n <span>\n <md-checkbox\n id=${'check_' + inspectionPart.id}\n ?checked=\"${this.isSelected(inspectionPart)}\"\n @click=${() => this._onSelectInspectionPart(inspectionPart)}\n ></md-checkbox>\n <label>${inspectionPart.name}</label>\n </span>\n `\n })}\n </div>\n </div>\n </div>\n\n <div checklist>\n <h3>체크리스트</h3>\n\n <div data-row>\n <label>이름</label>\n <md-filled-text-field\n name=\"checklistName\"\n type=\"text\"\n .value=${this.checklist?.name || ''}\n @input=${this._onInputChange}\n >\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>템플릿</label>\n <md-filled-select checklistTemplate @change=${this._onSelectChecklistTemplate}>\n <md-select-option></md-select-option>\n ${this.checklistTemplates?.map((checklistTemplate, idx) => {\n return html` <md-select-option .value=${checklistTemplate.id}>\n <div slot=\"headline\">${checklistTemplate.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <ox-grist\n .mode=${'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n @field-change=${this.onChangeGird}\n >\n </ox-grist>\n </div>\n\n <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>\n <checklist-view .mode=${ChecklistMode.VIEWER} .checklist=${this.checklist}></checklist-view>\n </div>\n </div>\n\n <div tabs>\n <button ?active=${this.activeTab === 'edit'} @click=${() => (this.activeTab = 'edit')}>검측 요청 정보</button>\n <button ?active=${this.activeTab === 'preview'} @click=${() => (this.activeTab = 'preview')}>미리보기</button>\n </div>\n\n <div button-container>\n <md-elevated-button blue @click=${this._createInspection}>\n <md-icon slot=\"icon\">task</md-icon>검측 요청서 등록\n </md-elevated-button>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소</md-elevated-button>\n </div>\n `\n }\n\n updated() {\n const ratio = Math.round((this.checklistViewContainer?.offsetWidth / this.checklistView?.offsetWidth) * 100) / 100 || 1\n this.checklistView.style.transform = `scale(${ratio})`\n }\n\n async firstUpdated() {\n const response = await client.query({\n query: gql`\n query Project($id: String!) {\n project(id: $id) {\n id\n name\n buildingComplex {\n id\n buildings {\n id\n name\n }\n }\n }\n\n constructionTypes {\n items {\n name\n id\n }\n }\n\n inspectionDrawingTypes {\n items {\n name\n id\n }\n }\n\n checklistTemplates {\n items {\n id\n name\n }\n }\n\n checklistTypes {\n items {\n id\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n id: this.projectId\n }\n })\n\n if (response.errors) return\n\n const project = response.data?.project\n const constructionTypes = response.data?.constructionTypes?.items || []\n const inspectionDrawingTypes = response.data?.inspectionDrawingTypes?.items || []\n const checklistTemplates = response.data?.checklistTemplates?.items || []\n this.checklistDetailTypes = response.data.checklistTypes?.items?.map(v => {\n return {\n display: v.detailType,\n value: v.id,\n mainType: v.mainType\n }\n })\n\n this.buildings = [...(project?.buildingComplex?.buildings || [])]\n this.constructionTypes = [...constructionTypes]\n this.inspectionDrawingTypes = [...inspectionDrawingTypes]\n this.checklistTemplates = [...checklistTemplates]\n\n // selectedBuildingId가 있으면 해당 빌딩 선택, 없으면 첫번째 빌딩 선택\n this.selectedBuilding = this.selectedBuildingId\n ? this.buildings.find(building => building.id == this.selectedBuildingId)\n : this.buildings[0]\n\n this.selectedConstructionType = constructionTypes?.[0]\n this.selectedInspectionDrawingType = inspectionDrawingTypes?.[0]\n\n // 선택된 동의 층 리스트 가져오기\n this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id)\n this.selectedConstructionType = await this._getConstructionType(this.selectedConstructionType.id)\n this.selectedInspectionDrawingType = await this._getInspectionDrawingType(this.selectedInspectionDrawingType.id)\n\n // selectedBuildingLevelId가 있으면 선택된 층, 없으면 첫번째 층 선택\n this.selectedLevel = this.selectedBuildingLevelId\n ? this.selectedBuilding?.buildingLevels?.find(level => level.id == this.selectedBuildingLevelId)\n : this.selectedBuilding?.buildingLevels?.[0]\n\n this.selectedConstructionDetailType = this.selectedConstructionType?.constructionDetailTypes?.[0]\n this.selectedInspectionParts = []\n\n // 동, 층이 랜더링 된 후에 select를 위해 이 시점에서 랜더링\n this.selectedBuilding = await { ...this.selectedBuilding }\n this.selectedConstructionType = await { ...this.selectedConstructionType }\n\n // 기본 값 셋팅 select\n await this.htmlSelectBuilding.select(this.selectedBuilding.id)\n await this.htmlSelectLevel.select(this.selectedLevel.id)\n await this.htmlSelectConstructionType.select(this.selectedConstructionType.id)\n await this.htmlSelectConstructionDetailType.select(this.selectedConstructionDetailType.id)\n await this.htmlSelectInspectionDrawingType.select(this.selectedInspectionDrawingType.id)\n await this.htmlSelectChecklistTemplate.selectIndex(0)\n\n this.checklist = {\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`,\n documentNo: '0000-000-000000',\n buildingInspection: {\n status: BuildingInspectionStatus.WAIT\n }\n }\n\n // 그리드 셋팅\n this.setGristConfig()\n }\n\n async _getBuilding(buildingId: string = '') {\n const response = await client.query({\n query: gql`\n query Building($id: String!) {\n building(id: $id) {\n id\n name\n buildingLevels {\n id\n floor\n floorDisplayName\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n }\n `,\n variables: {\n id: buildingId\n }\n })\n\n if (response.errors) return\n\n return response.data?.building || {}\n }\n\n async _getConstructionType(id: string = '') {\n const response = await client.query({\n query: gql`\n query ConstructionType($id: String!) {\n constructionType(id: $id) {\n id\n name\n description\n constructionDetailTypes {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n if (response.errors) return\n\n return response.data?.constructionType || {}\n }\n\n async _getInspectionDrawingType(id: string = '') {\n const response = await client.query({\n query: gql`\n query InspectionDrawingType($id: String!) {\n inspectionDrawingType(id: $id) {\n id\n name\n inspectionParts {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n if (response.errors) return\n\n return response.data?.inspectionDrawingType || {}\n }\n\n private async _onSelectBuilding(e) {\n const buildingId = e.target.value\n this.selectedBuilding = await this._getBuilding(buildingId)\n this.selectedLevel = await { ...this.selectedBuilding?.buildingLevels?.[0] }\n this.checklist = {\n ...this.checklist,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`\n }\n\n await this.htmlSelectLevel.selectIndex(0)\n }\n\n private _onSelectBuildingLevel(e) {\n const buildingLevelId = e.target.value\n this.selectedLevel = {\n ...(this.selectedBuilding?.buildingLevels?.find(v => v.id == buildingLevelId) || {})\n }\n this.checklist = {\n ...this.checklist,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`\n }\n }\n\n private async _onSelectConstructionType(e) {\n const constructionTypeId = e.target.value\n this.selectedConstructionType = await this._getConstructionType(constructionTypeId)\n this.selectedConstructionDetailType = await { ...this.selectedConstructionType?.constructionDetailTypes?.[0] }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n }\n\n private _onSelectConstructionDetailType(e) {\n const constructionDetailTypeId = e.target.value\n this.selectedConstructionDetailType = {\n ...(this.selectedConstructionType?.constructionDetailTypes?.find(v => v.id == constructionDetailTypeId) || {})\n }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n }\n\n private async _onSelectInspectionDrawingType(e) {\n const inspectionDrawingTypeId = e.target.value\n this.selectedInspectionDrawingType = await this._getInspectionDrawingType(inspectionDrawingTypeId)\n this.selectedInspectionParts = []\n this.checklist = {\n ...this.checklist,\n inspectionParts: this.selectedInspectionParts\n }\n }\n\n private async _onSelectInspectionPart(part) {\n if (this.selectedInspectionParts.includes(part.name)) {\n this.selectedInspectionParts = this.selectedInspectionParts.filter(item => item !== part.name)\n } else {\n this.selectedInspectionParts.push(part.name)\n }\n\n this.selectedInspectionParts = [...this.selectedInspectionParts]\n this.checklist = {\n ...this.checklist,\n inspectionParts: this.selectedInspectionParts\n }\n }\n\n isSelected(option: any): boolean {\n return this.selectedInspectionParts.includes(option.name)\n }\n\n requestRefresh() {\n this.dispatchEvent(new CustomEvent('requestRefresh'))\n }\n\n private _close() {\n history.back()\n }\n\n setGristConfig() {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'select',\n name: 'mainType',\n header: '구분',\n record: {\n editable: true,\n options: [{ display: '', value: '' }].concat(\n Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))\n )\n },\n width: 100\n },\n {\n type: 'select',\n name: 'detailType',\n header: '상세 구분',\n record: {\n editable: true,\n options: (columns, data, column) => [\n { display: '', value: '' },\n ...this.checklistDetailTypes.filter(v => v.mainType == column.mainType)\n ]\n },\n width: 200\n },\n {\n type: 'string',\n name: 'name',\n header: '검사 항목',\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'inspctionCriteria',\n header: '검사 기준',\n record: {\n editable: true\n },\n width: 200\n }\n ],\n pagination: {\n infinite: true\n },\n sorters: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n }\n\n async fetchHandler() {\n if (!this.checklistTemplateId) return []\n\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n sequence\n name\n inspctionCriteria\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'checklistTemplateId',\n value: this.checklistTemplateId,\n operator: 'eq'\n },\n sortings: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n })\n\n // 체크리스트 아이템 데이터 갱신\n this.onChangeGird()\n\n return {\n records: response.data.checklistTemplateItems.items || []\n }\n }\n\n private _onSelectChecklistTemplate(e) {\n const checklistTemplateId = e.target.value\n\n // 체크 리스트 이름 셋팅\n this.checklist = { ...this.checklist, name: e.target.displayText }\n\n // 그리드 아이템 셋팅\n if (checklistTemplateId) {\n this.checklistTemplateId = checklistTemplateId\n this.grist.fetch()\n }\n }\n\n async _createInspection() {\n let patch: any = {}\n\n patch.buildingLevelId = this.htmlSelectLevel.value\n patch.checklist = {\n name: this.checklist.name,\n constructionType: this.htmlSelectConstructionType.displayText,\n constructionDetailType: this.htmlSelectConstructionDetailType.displayText,\n location: `${this.htmlSelectBuilding.displayText} ${this.htmlSelectLevel.displayText}층`,\n inspectionDrawingType: this.selectedInspectionDrawingType.name,\n inspectionParts: this.checklist.inspectionParts\n }\n patch.checklistItem = this.checklist.checklistItems?.map(item => {\n return {\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria\n }\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateBuildingInspection($patch: NewBuildingInspection!) {\n createBuildingInspection(patch: $patch) {\n id\n }\n }\n `,\n variables: {\n patch\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.requestRefresh()\n this._close()\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private _onInputChange(event: InputEvent) {\n const target = event.target as HTMLInputElement\n this[target.name] = target.value\n this.checklist = { ...this.checklist, name: target.value }\n }\n\n // 체크리스트 아이템 데이터 갱신\n private onChangeGird() {\n const checklistDetailTypes = Object.fromEntries(this.checklistDetailTypes.map(item => [item.value, item.display]))\n const grist = this.grist\n\n // grist field-change가 오는 시점이 데이터 변경 전이라 setTimeout으로 변경\n setTimeout(() => {\n this.checklist.checklistItems = grist.dirtyData.records.map((row, idx) => {\n return {\n ...row,\n detailType: checklistDetailTypes[row.detailType],\n sequence: idx\n }\n })\n this.checklist = { ...this.checklist }\n }, 100)\n }\n}\n"]}
1
+ {"version":3,"file":"inspection-create-popup.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/inspection-create-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAA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EAAyB;AACrB;IAA7C,KAAK,CAAC,qCAAqC,CAAC;;0EAA4B;AACtD;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;oDAAA;AACb;IAAtB,KAAK,CAAC,cAAc,CAAC;8BAA0B,cAAc;qEAAA;AACrC;IAAxB,KAAK,CAAC,gBAAgB,CAAC;8BAAiB,WAAW;4DAAA;AAzKhD,qBAAqB;IAD1B,aAAa,CAAC,yBAAyB,CAAC;GACnC,qBAAqB,CAgxB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST } from './building-inspection-list'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\n\n@customElement('inspection-create-popup')\nclass InspectionCreatePopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n\n background-color: var(--md-sys-color-surface);\n }\n\n md-filled-select {\n width: auto;\n min-width: 150px;\n --md-filled-select-text-field-container-color: transparent;\n --md-filled-select-text-field-active-indicator-color: #999;\n --md-filled-select-text-field-input-text-size: 14px;\n --md-filled-select-text-field-input-text-weight: bold;\n --md-filled-select-text-field-input-text-line-height: 6px;\n }\n md-filled-select[level] {\n min-width: 110px;\n margin-left: 20px;\n }\n\n checklist-view {\n pointer-events: none;\n transform-origin: top left;\n }\n\n div[body] {\n height: 100%;\n overflow-y: auto;\n\n div[tab-container][inactive] {\n display: none !important;\n }\n\n div[edit] {\n width: 100%;\n\n div[detail] {\n margin-bottom: 30px;\n }\n\n h3 {\n position: relative;\n color: #0595e5;\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0;\n margin-bottom: 5px;\n }\n\n div[data-row] {\n display: grid;\n grid-template-columns: 100px 1fr 0.3fr 100px 1fr;\n gap: 15px;\n margin-bottom: 11px;\n\n & > label {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n font-size: 15px;\n }\n\n div[inspection-parts] {\n display: block;\n margin-top: 7px;\n\n & > span {\n display: inline-block;\n margin-right: 5px;\n margin-bottom: 5px;\n\n & > md-checkbox {\n margin-top: 2px;\n }\n }\n }\n }\n }\n\n div[preview] {\n display: flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n }\n\n div[tabs] {\n display: flex;\n\n button {\n background-color: #fff;\n padding: 6px 14px;\n color: #999;\n border: solid 1px #999;\n border-top: none;\n border-radius: 0px 0px 8px 8px;\n margin-right: -2px;\n cursor: pointer;\n\n &[active] {\n color: var(--button-color, var(--md-sys-color-on-secondary-container));\n font-weight: 600;\n }\n }\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n\n md-elevated-button[blue] {\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: #fff;\n --md-elevated-button-hover-label-text-color: #fff;\n --md-elevated-button-pressed-label-text-color: #fff;\n --md-elevated-button-focus-label-text-color: #fff;\n --md-elevated-button-icon-color: #fff;\n --md-elevated-button-hover-icon-color: #fff;\n --md-elevated-button-pressed-icon-color: #fff;\n --md-elevated-button-focus-icon-color: #fff;\n }\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) checklistDetailTypes: any\n @property({ type: String }) projectId: string = ''\n @property({ type: String }) checklistTemplateId: string = ''\n @property({ type: String }) selectedBuildingId: string = ''\n @property({ type: String }) selectedBuildingLevelId: string = ''\n\n @state() project: any = {}\n @state() buildings: any = []\n @state() selectedBuilding: any = {}\n @state() selectedLevel: any = {}\n\n @state() constructionTypes: any = []\n @state() selectedConstructionType: any = {}\n @state() selectedConstructionDetailType: any = {}\n\n @state() inspectionDrawingTypes: any = []\n @state() selectedInspectionDrawingType: any = {}\n @state() selectedInspectionParts: Array<string> = []\n\n @state() checklistTemplates: any = []\n @state() checklist: any = {}\n\n @state() activeTab: 'edit' | 'preview' = 'edit'\n\n @query('md-filled-select[building]') htmlSelectBuilding\n @query('md-filled-select[level]') htmlSelectLevel\n @query('md-filled-select[constructionType]') htmlSelectConstructionType\n @query('md-filled-select[constructionDetailType]') htmlSelectConstructionDetailType\n @query('md-filled-select[inspectionDrawingType]') htmlSelectInspectionDrawingType\n @query('md-filled-select[inspectionPart]') htmlSelectInspectionPart\n @query('md-filled-select[checklistTemplate]') htmlSelectChecklistTemplate\n @query('ox-grist') grist!: DataGrist\n @query('div[preview]') checklistViewContainer!: HTMLDivElement\n @query('checklist-view') checklistView!: HTMLElement\n\n render() {\n return html`\n <div body>\n <div tab-container ?inactive=${this.activeTab !== 'edit'} edit>\n <div detail>\n <h3>세부 정보</h3>\n\n <div data-row>\n <label>공종</label>\n <md-filled-select constructionType @change=${this._onSelectConstructionType}>\n ${this.constructionTypes?.map(constructionType => {\n const selected = constructionType.id === this.selectedConstructionType?.id\n return html`<md-select-option ?selected=${selected} .value=${constructionType.id}>\n <div slot=\"headline\">${constructionType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>세부 공종</label>\n <md-filled-select constructionDetailType @change=${this._onSelectConstructionDetailType}>\n ${this.selectedConstructionType?.constructionDetailTypes?.map(constructionDetailType => {\n const selected = constructionDetailType.id === this.selectedConstructionDetailType.id\n return html`<md-select-option ?selected=${selected} .value=${constructionDetailType.id}>\n <div slot=\"headline\">${constructionDetailType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n\n <div data-row>\n <label>동</label>\n <md-filled-select building @change=${this._onSelectBuilding}>\n ${this.buildings?.map(building => {\n return html` <md-select-option .value=${building.id}>\n <div slot=\"headline\">${building.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>층</label>\n <md-filled-select level @change=${this._onSelectBuildingLevel}>\n ${this.selectedBuilding?.buildingLevels?.map(level => {\n return html`<md-select-option .value=${level.id}>\n <div slot=\"headline\">${level.floorDisplayName}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n\n <div data-row>\n <label>검측 도면</label>\n <md-filled-select inspectionDrawingType @change=${this._onSelectInspectionDrawingType}>\n ${this.inspectionDrawingTypes?.map(inspectionDrawingType => {\n return html` <md-select-option .value=${inspectionDrawingType.id}>\n <div slot=\"headline\">${inspectionDrawingType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>검측 부위</label>\n <div inspection-parts>\n ${this.selectedInspectionDrawingType?.inspectionParts?.map(inspectionPart => {\n return html`\n <span>\n <md-checkbox\n id=${'check_' + inspectionPart.id}\n ?checked=\"${this.isSelected(inspectionPart)}\"\n @click=${() => this._onSelectInspectionPart(inspectionPart)}\n ></md-checkbox>\n <label>${inspectionPart.name}</label>\n </span>\n `\n })}\n </div>\n </div>\n </div>\n\n <div checklist>\n <h3>체크리스트</h3>\n\n <div data-row>\n <label>이름</label>\n <md-filled-text-field\n name=\"checklistName\"\n type=\"text\"\n .value=${this.checklist?.name || ''}\n @input=${this._onInputChange}\n >\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>템플릿</label>\n <md-filled-select checklistTemplate @change=${this._onSelectChecklistTemplate}>\n <md-select-option></md-select-option>\n ${this.checklistTemplates?.map((checklistTemplate, idx) => {\n return html` <md-select-option .value=${checklistTemplate.id}>\n <div slot=\"headline\">${checklistTemplate.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <ox-grist\n .mode=${'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n @field-change=${this.onChangeGird}\n >\n </ox-grist>\n </div>\n\n <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>\n <checklist-view\n .mode=${ChecklistMode.VIEWER}\n .projectType=${this.project.projectType}\n .checklist=${this.checklist}\n ></checklist-view>\n </div>\n </div>\n\n <div tabs>\n <button ?active=${this.activeTab === 'edit'} @click=${() => (this.activeTab = 'edit')}>검측 요청 정보</button>\n <button ?active=${this.activeTab === 'preview'} @click=${() => (this.activeTab = 'preview')}>미리보기</button>\n </div>\n\n <div button-container>\n <md-elevated-button blue @click=${this._createInspection}>\n <md-icon slot=\"icon\">task</md-icon>검측 등록\n </md-elevated-button>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소</md-elevated-button>\n </div>\n `\n }\n\n updated() {\n const ratio = Math.round((this.checklistViewContainer?.offsetWidth / this.checklistView?.offsetWidth) * 100) / 100 || 1\n this.checklistView.style.transform = `scale(${ratio})`\n }\n\n async firstUpdated() {\n const response = await client.query({\n query: gql`\n query Project($id: String!) {\n project(id: $id) {\n id\n name\n projectType\n documentNaming\n buildingComplex {\n id\n buildings {\n id\n name\n }\n }\n }\n\n constructionTypes {\n items {\n name\n id\n }\n }\n\n inspectionDrawingTypes {\n items {\n name\n id\n }\n }\n\n checklistTemplates {\n items {\n id\n name\n }\n }\n\n checklistTypes {\n items {\n id\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n id: this.projectId\n }\n })\n\n if (response.errors) return\n\n const project = response.data?.project\n const constructionTypes = response.data?.constructionTypes?.items || []\n const inspectionDrawingTypes = response.data?.inspectionDrawingTypes?.items || []\n const checklistTemplates = response.data?.checklistTemplates?.items || []\n this.checklistDetailTypes = response.data.checklistTypes?.items?.map(v => {\n return {\n display: v.detailType,\n value: v.id,\n mainType: v.mainType\n }\n })\n\n this.project = project\n this.buildings = [...(project?.buildingComplex?.buildings || [])]\n this.constructionTypes = [...constructionTypes]\n this.inspectionDrawingTypes = [...inspectionDrawingTypes]\n this.checklistTemplates = [...checklistTemplates]\n\n // selectedBuildingId가 있으면 해당 빌딩 선택, 없으면 첫번째 빌딩 선택\n this.selectedBuilding = this.selectedBuildingId\n ? this.buildings.find(building => building.id == this.selectedBuildingId)\n : this.buildings[0]\n\n this.selectedConstructionType = constructionTypes?.[0]\n this.selectedInspectionDrawingType = inspectionDrawingTypes?.[0]\n\n // 선택된 동의 층 리스트 가져오기\n this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id)\n this.selectedConstructionType = await this._getConstructionType(this.selectedConstructionType.id)\n this.selectedInspectionDrawingType = await this._getInspectionDrawingType(this.selectedInspectionDrawingType.id)\n\n // selectedBuildingLevelId가 있으면 선택된 층, 없으면 첫번째 층 선택\n this.selectedLevel = this.selectedBuildingLevelId\n ? this.selectedBuilding?.buildingLevels?.find(level => level.id == this.selectedBuildingLevelId)\n : this.selectedBuilding?.buildingLevels?.[0]\n\n this.selectedConstructionDetailType = this.selectedConstructionType?.constructionDetailTypes?.[0]\n this.selectedInspectionParts = []\n\n // 동, 층이 랜더링 된 후에 select를 위해 이 시점에서 랜더링\n this.selectedBuilding = await { ...this.selectedBuilding }\n this.selectedConstructionType = await { ...this.selectedConstructionType }\n\n // 기본 값 셋팅 select\n await this.htmlSelectBuilding.select(this.selectedBuilding.id)\n await this.htmlSelectLevel.select(this.selectedLevel.id)\n await this.htmlSelectConstructionType.select(this.selectedConstructionType.id)\n await this.htmlSelectConstructionDetailType.select(this.selectedConstructionDetailType.id)\n await this.htmlSelectInspectionDrawingType.select(this.selectedInspectionDrawingType.id)\n await this.htmlSelectChecklistTemplate.selectIndex(0)\n\n this.checklist = {\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`,\n documentNo: `${project.documentNaming} 검측 제01-00000호`,\n buildingInspection: {\n status: BuildingInspectionStatus.WAIT\n }\n }\n\n // 그리드 셋팅\n this.setGristConfig()\n }\n\n async _getBuilding(buildingId: string = '') {\n const response = await client.query({\n query: gql`\n query Building($id: String!) {\n building(id: $id) {\n id\n name\n buildingLevels {\n id\n floor\n floorDisplayName\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n }\n `,\n variables: {\n id: buildingId\n }\n })\n\n if (response.errors) return\n\n return response.data?.building || {}\n }\n\n async _getConstructionType(id: string = '') {\n const response = await client.query({\n query: gql`\n query ConstructionType($id: String!) {\n constructionType(id: $id) {\n id\n name\n description\n constructionDetailTypes {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n if (response.errors) return\n\n return response.data?.constructionType || {}\n }\n\n async _getInspectionDrawingType(id: string = '') {\n const response = await client.query({\n query: gql`\n query InspectionDrawingType($id: String!) {\n inspectionDrawingType(id: $id) {\n id\n name\n inspectionParts {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n if (response.errors) return\n\n return response.data?.inspectionDrawingType || {}\n }\n\n private async _onSelectBuilding(e) {\n const buildingId = e.target.value\n this.selectedBuilding = await this._getBuilding(buildingId)\n this.selectedLevel = await { ...this.selectedBuilding?.buildingLevels?.[0] }\n this.checklist = {\n ...this.checklist,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`\n }\n\n await this.htmlSelectLevel.selectIndex(0)\n }\n\n private _onSelectBuildingLevel(e) {\n const buildingLevelId = e.target.value\n this.selectedLevel = {\n ...(this.selectedBuilding?.buildingLevels?.find(v => v.id == buildingLevelId) || {})\n }\n this.checklist = {\n ...this.checklist,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`\n }\n }\n\n private async _onSelectConstructionType(e) {\n const constructionTypeId = e.target.value\n this.selectedConstructionType = await this._getConstructionType(constructionTypeId)\n this.selectedConstructionDetailType = await { ...this.selectedConstructionType?.constructionDetailTypes?.[0] }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n }\n\n private _onSelectConstructionDetailType(e) {\n const constructionDetailTypeId = e.target.value\n this.selectedConstructionDetailType = {\n ...(this.selectedConstructionType?.constructionDetailTypes?.find(v => v.id == constructionDetailTypeId) || {})\n }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n }\n\n private async _onSelectInspectionDrawingType(e) {\n const inspectionDrawingTypeId = e.target.value\n this.selectedInspectionDrawingType = await this._getInspectionDrawingType(inspectionDrawingTypeId)\n this.selectedInspectionParts = []\n this.checklist = {\n ...this.checklist,\n inspectionParts: this.selectedInspectionParts\n }\n }\n\n private async _onSelectInspectionPart(part) {\n if (this.selectedInspectionParts.includes(part.name)) {\n this.selectedInspectionParts = this.selectedInspectionParts.filter(item => item !== part.name)\n } else {\n this.selectedInspectionParts.push(part.name)\n }\n\n this.selectedInspectionParts = [...this.selectedInspectionParts]\n this.checklist = {\n ...this.checklist,\n inspectionParts: this.selectedInspectionParts\n }\n }\n\n isSelected(option: any): boolean {\n return this.selectedInspectionParts.includes(option.name)\n }\n\n requestRefresh() {\n this.dispatchEvent(new CustomEvent('requestRefresh'))\n }\n\n private _close() {\n history.back()\n }\n\n setGristConfig() {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'select',\n name: 'mainType',\n header: '구분',\n record: {\n editable: true,\n options: [{ display: '', value: '' }].concat(\n Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))\n )\n },\n width: 100\n },\n {\n type: 'select',\n name: 'detailType',\n header: '상세 구분',\n record: {\n editable: true,\n options: (columns, data, column) => [\n { display: '', value: '' },\n ...this.checklistDetailTypes.filter(v => v.mainType == column.mainType)\n ]\n },\n width: 200\n },\n {\n type: 'string',\n name: 'name',\n header: '검사 항목',\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'inspctionCriteria',\n header: '검사 기준',\n record: {\n editable: true\n },\n width: 200\n }\n ],\n pagination: {\n infinite: true\n },\n sorters: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n }\n\n async fetchHandler() {\n if (!this.checklistTemplateId) return []\n\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n sequence\n name\n inspctionCriteria\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'checklistTemplateId',\n value: this.checklistTemplateId,\n operator: 'eq'\n },\n sortings: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n })\n\n // 체크리스트 아이템 데이터 갱신\n this.onChangeGird()\n\n return {\n records: response.data.checklistTemplateItems.items || []\n }\n }\n\n private _onSelectChecklistTemplate(e) {\n const checklistTemplateId = e.target.value\n\n // 체크 리스트 이름 셋팅\n this.checklist = { ...this.checklist, name: e.target.displayText }\n\n // 그리드 아이템 셋팅\n if (checklistTemplateId) {\n this.checklistTemplateId = checklistTemplateId\n this.grist.fetch()\n }\n }\n\n async _createInspection() {\n let patch: any = {}\n\n patch.buildingLevelId = this.htmlSelectLevel.value\n patch.checklist = {\n name: this.checklist.name,\n constructionType: this.htmlSelectConstructionType.displayText,\n constructionDetailType: this.htmlSelectConstructionDetailType.displayText,\n location: `${this.htmlSelectBuilding.displayText} ${this.htmlSelectLevel.displayText}층`,\n inspectionDrawingType: this.selectedInspectionDrawingType.name,\n inspectionParts: this.checklist.inspectionParts\n }\n patch.checklistItem = this.checklist.checklistItems?.map(item => {\n return {\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria\n }\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateBuildingInspection($patch: NewBuildingInspection!) {\n createBuildingInspection(patch: $patch) {\n id\n }\n }\n `,\n variables: {\n patch\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측을 등록하였습니다.' })\n this.requestRefresh()\n this._close()\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 등록에 실패하였습니다.', level: 'error' })\n }\n }\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private _onInputChange(event: InputEvent) {\n const target = event.target as HTMLInputElement\n this[target.name] = target.value\n this.checklist = { ...this.checklist, name: target.value }\n }\n\n // 체크리스트 아이템 데이터 갱신\n private onChangeGird() {\n const checklistDetailTypes = Object.fromEntries(this.checklistDetailTypes.map(item => [item.value, item.display]))\n const grist = this.grist\n\n // grist field-change가 오는 시점이 데이터 변경 전이라 setTimeout으로 변경\n setTimeout(() => {\n this.checklist.checklistItems = grist.dirtyData.records.map((row, idx) => {\n return {\n ...row,\n detailType: checklistDetailTypes[row.detailType],\n sequence: idx\n }\n })\n this.checklist = { ...this.checklist }\n }, 100)\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import '@material/web/icon/icon.js';
2
+ import '@operato/data-grist/ox-grist.js';
3
+ import '../checklist/checklist-view';