@dssp/project 1.0.0 → 1.0.2

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 (327) hide show
  1. package/dist-client/bootstrap.d.ts +0 -0
  2. package/dist-client/bootstrap.js +2 -0
  3. package/dist-client/bootstrap.js.map +1 -0
  4. package/dist-client/index.d.ts +1 -0
  5. package/dist-client/index.js +2 -0
  6. package/dist-client/index.js.map +1 -0
  7. package/dist-client/pages/lib/chatbot-widget.d.ts +53 -0
  8. package/dist-client/pages/lib/chatbot-widget.js +631 -0
  9. package/dist-client/pages/lib/chatbot-widget.js.map +1 -0
  10. package/dist-client/pages/lib/select2-component.d.ts +23 -0
  11. package/dist-client/pages/lib/select2-component.js +181 -0
  12. package/dist-client/pages/lib/select2-component.js.map +1 -0
  13. package/dist-client/pages/lib/waether.d.ts +7 -0
  14. package/dist-client/pages/lib/waether.js +156 -0
  15. package/dist-client/pages/lib/waether.js.map +1 -0
  16. package/dist-client/pages/project/component/pagenation.d.ts +18 -0
  17. package/dist-client/pages/project/component/pagenation.js +142 -0
  18. package/dist-client/pages/project/component/pagenation.js.map +1 -0
  19. package/dist-client/pages/project/component/project-update-header.d.ts +1 -0
  20. package/dist-client/pages/project/component/project-update-header.js +121 -0
  21. package/dist-client/pages/project/component/project-update-header.js.map +1 -0
  22. package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.d.ts +1 -0
  23. package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.js +308 -0
  24. package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.js.map +1 -0
  25. package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.d.ts +1 -0
  26. package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.js +356 -0
  27. package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.js.map +1 -0
  28. package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.d.ts +1 -0
  29. package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.js +682 -0
  30. package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.js.map +1 -0
  31. package/dist-client/pages/project/popup/checklist/task-checklist-view.d.ts +33 -0
  32. package/dist-client/pages/project/popup/checklist/task-checklist-view.js +676 -0
  33. package/dist-client/pages/project/popup/checklist/task-checklist-view.js.map +1 -0
  34. package/dist-client/pages/project/popup/popup-plan-export.d.ts +10 -0
  35. package/dist-client/pages/project/popup/popup-plan-export.js +242 -0
  36. package/dist-client/pages/project/popup/popup-plan-export.js.map +1 -0
  37. package/dist-client/pages/project/popup/popup-plan-upload.d.ts +13 -0
  38. package/dist-client/pages/project/popup/popup-plan-upload.js +265 -0
  39. package/dist-client/pages/project/popup/popup-plan-upload.js.map +1 -0
  40. package/dist-client/pages/project/popup/popup-project-create.d.ts +12 -0
  41. package/dist-client/pages/project/popup/popup-project-create.js +152 -0
  42. package/dist-client/pages/project/popup/popup-project-create.js.map +1 -0
  43. package/dist-client/pages/project/popup/popup-task-upload.d.ts +9 -0
  44. package/dist-client/pages/project/popup/popup-task-upload.js +105 -0
  45. package/dist-client/pages/project/popup/popup-task-upload.js.map +1 -0
  46. package/dist-client/pages/project/project-completed-list.d.ts +23 -0
  47. package/dist-client/pages/project/project-completed-list.js +322 -0
  48. package/dist-client/pages/project/project-completed-list.js.map +1 -0
  49. package/dist-client/pages/project/project-detail.d.ts +47 -0
  50. package/dist-client/pages/project/project-detail.js +1065 -0
  51. package/dist-client/pages/project/project-detail.js.map +1 -0
  52. package/dist-client/pages/project/project-list.d.ts +201 -0
  53. package/dist-client/pages/project/project-list.js +410 -0
  54. package/dist-client/pages/project/project-list.js.map +1 -0
  55. package/dist-client/pages/project/project-plan-management.d.ts +33 -0
  56. package/dist-client/pages/project/project-plan-management.js +492 -0
  57. package/dist-client/pages/project/project-plan-management.js.map +1 -0
  58. package/dist-client/pages/project/project-setting-list.d.ts +31 -0
  59. package/dist-client/pages/project/project-setting-list.js +456 -0
  60. package/dist-client/pages/project/project-setting-list.js.map +1 -0
  61. package/dist-client/pages/project/project-task-list.d.ts +18 -0
  62. package/dist-client/pages/project/project-task-list.js +306 -0
  63. package/dist-client/pages/project/project-task-list.js.map +1 -0
  64. package/dist-client/pages/project/project-task.d.ts +51 -0
  65. package/dist-client/pages/project/project-task.js +692 -0
  66. package/dist-client/pages/project/project-task.js.map +1 -0
  67. package/dist-client/pages/project/project-update.d.ts +81 -0
  68. package/dist-client/pages/project/project-update.js +1477 -0
  69. package/dist-client/pages/project/project-update.js.map +1 -0
  70. package/dist-client/pages/resource/construction-detail-type-popup.d.ts +2 -0
  71. package/dist-client/pages/resource/construction-detail-type-popup.js +197 -0
  72. package/dist-client/pages/resource/construction-detail-type-popup.js.map +1 -0
  73. package/dist-client/pages/resource/construction-type-management.d.ts +34 -0
  74. package/dist-client/pages/resource/construction-type-management.js +214 -0
  75. package/dist-client/pages/resource/construction-type-management.js.map +1 -0
  76. package/dist-client/pages/resource/inspection-drawing-type-management.d.ts +48 -0
  77. package/dist-client/pages/resource/inspection-drawing-type-management.js +234 -0
  78. package/dist-client/pages/resource/inspection-drawing-type-management.js.map +1 -0
  79. package/dist-client/pages/resource/inspection-part-popup.d.ts +2 -0
  80. package/dist-client/pages/resource/inspection-part-popup.js +197 -0
  81. package/dist-client/pages/resource/inspection-part-popup.js.map +1 -0
  82. package/dist-client/pages/resource/resource-importer.d.ts +10 -0
  83. package/dist-client/pages/resource/resource-importer.js +101 -0
  84. package/dist-client/pages/resource/resource-importer.js.map +1 -0
  85. package/dist-client/pages/resource/resource-list-page.d.ts +62 -0
  86. package/dist-client/pages/resource/resource-list-page.js +331 -0
  87. package/dist-client/pages/resource/resource-list-page.js.map +1 -0
  88. package/dist-client/pages/resource/worker-type-management.d.ts +34 -0
  89. package/dist-client/pages/resource/worker-type-management.js +180 -0
  90. package/dist-client/pages/resource/worker-type-management.js.map +1 -0
  91. package/dist-client/pages/task/task-importer.d.ts +10 -0
  92. package/dist-client/pages/task/task-importer.js +101 -0
  93. package/dist-client/pages/task/task-importer.js.map +1 -0
  94. package/dist-client/pages/task/task-list-page.d.ts +62 -0
  95. package/dist-client/pages/task/task-list-page.js +322 -0
  96. package/dist-client/pages/task/task-list-page.js.map +1 -0
  97. package/dist-client/pages/task-resource/task-resource-importer.d.ts +10 -0
  98. package/dist-client/pages/task-resource/task-resource-importer.js +101 -0
  99. package/dist-client/pages/task-resource/task-resource-importer.js.map +1 -0
  100. package/dist-client/pages/task-resource/task-resource-list-page.d.ts +62 -0
  101. package/dist-client/pages/task-resource/task-resource-list-page.js +331 -0
  102. package/dist-client/pages/task-resource/task-resource-list-page.js.map +1 -0
  103. package/dist-client/route.d.ts +1 -0
  104. package/dist-client/route.js +44 -0
  105. package/dist-client/route.js.map +1 -0
  106. package/dist-client/shared/domain-context.d.ts +18 -0
  107. package/dist-client/shared/domain-context.js +28 -0
  108. package/dist-client/shared/domain-context.js.map +1 -0
  109. package/dist-client/tsconfig.tsbuildinfo +1 -0
  110. package/dist-client/viewparts/domain-switch.d.ts +19 -0
  111. package/dist-client/viewparts/domain-switch.js +274 -0
  112. package/dist-client/viewparts/domain-switch.js.map +1 -0
  113. package/dist-server/controllers/export-tasks.d.ts +7 -0
  114. package/dist-server/controllers/export-tasks.js +29 -0
  115. package/dist-server/controllers/export-tasks.js.map +1 -0
  116. package/dist-server/controllers/import-task.d.ts +3 -0
  117. package/dist-server/controllers/import-task.js +113 -0
  118. package/dist-server/controllers/import-task.js.map +1 -0
  119. package/dist-server/controllers/index.d.ts +0 -0
  120. package/dist-server/controllers/index.js +1 -0
  121. package/dist-server/controllers/index.js.map +1 -0
  122. package/dist-server/controllers/parse-excel.d.ts +2 -0
  123. package/dist-server/controllers/parse-excel.js +74 -0
  124. package/dist-server/controllers/parse-excel.js.map +1 -0
  125. package/dist-server/controllers/types.d.ts +18 -0
  126. package/dist-server/controllers/types.js +3 -0
  127. package/dist-server/controllers/types.js.map +1 -0
  128. package/dist-server/index.d.ts +3 -0
  129. package/dist-server/index.js +7 -0
  130. package/dist-server/index.js.map +1 -0
  131. package/dist-server/middlewares/index.d.ts +1 -0
  132. package/dist-server/middlewares/index.js +7 -0
  133. package/dist-server/middlewares/index.js.map +1 -0
  134. package/dist-server/migrations/1723861466413-seed-roles.d.ts +5 -0
  135. package/dist-server/migrations/1723861466413-seed-roles.js +117 -0
  136. package/dist-server/migrations/1723861466413-seed-roles.js.map +1 -0
  137. package/dist-server/migrations/1723861466414-seed-codes.d.ts +5 -0
  138. package/dist-server/migrations/1723861466414-seed-codes.js +150 -0
  139. package/dist-server/migrations/1723861466414-seed-codes.js.map +1 -0
  140. package/dist-server/migrations/1723861476419-seed-resources.d.ts +5 -0
  141. package/dist-server/migrations/1723861476419-seed-resources.js +57 -0
  142. package/dist-server/migrations/1723861476419-seed-resources.js.map +1 -0
  143. package/dist-server/migrations/1723861478420-seed-/bsample-project.d.ts +5 -0
  144. package/dist-server/migrations/1723861478420-seed-/bsample-project.js +68 -0
  145. package/dist-server/migrations/1723861478420-seed-/bsample-project.js.map +1 -0
  146. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.d.ts +5 -0
  147. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.js +189 -0
  148. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.js.map +1 -0
  149. package/dist-server/migrations/index.d.ts +1 -0
  150. package/dist-server/migrations/index.js +12 -0
  151. package/dist-server/migrations/index.js.map +1 -0
  152. package/dist-server/routes.d.ts +1 -0
  153. package/dist-server/routes.js +105 -0
  154. package/dist-server/routes.js.map +1 -0
  155. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.d.ts +6 -0
  156. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.js +56 -0
  157. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.js.map +1 -0
  158. package/dist-server/service/construction-detail-type/construction-detail-type-query.d.ts +9 -0
  159. package/dist-server/service/construction-detail-type/construction-detail-type-query.js +53 -0
  160. package/dist-server/service/construction-detail-type/construction-detail-type-query.js.map +1 -0
  161. package/dist-server/service/construction-detail-type/construction-detail-type-type.d.ts +11 -0
  162. package/dist-server/service/construction-detail-type/construction-detail-type-type.js +43 -0
  163. package/dist-server/service/construction-detail-type/construction-detail-type-type.js.map +1 -0
  164. package/dist-server/service/construction-detail-type/construction-detail-type.d.ts +15 -0
  165. package/dist-server/service/construction-detail-type/construction-detail-type.js +69 -0
  166. package/dist-server/service/construction-detail-type/construction-detail-type.js.map +1 -0
  167. package/dist-server/service/construction-detail-type/index.d.ts +5 -0
  168. package/dist-server/service/construction-detail-type/index.js +9 -0
  169. package/dist-server/service/construction-detail-type/index.js.map +1 -0
  170. package/dist-server/service/construction-type/construction-type-mutation.d.ts +6 -0
  171. package/dist-server/service/construction-type/construction-type-mutation.js +64 -0
  172. package/dist-server/service/construction-type/construction-type-mutation.js.map +1 -0
  173. package/dist-server/service/construction-type/construction-type-query.d.ts +13 -0
  174. package/dist-server/service/construction-type/construction-type-query.js +87 -0
  175. package/dist-server/service/construction-type/construction-type-query.js.map +1 -0
  176. package/dist-server/service/construction-type/construction-type-type.d.ts +12 -0
  177. package/dist-server/service/construction-type/construction-type-type.js +47 -0
  178. package/dist-server/service/construction-type/construction-type-type.js.map +1 -0
  179. package/dist-server/service/construction-type/construction-type.d.ts +19 -0
  180. package/dist-server/service/construction-type/construction-type.js +88 -0
  181. package/dist-server/service/construction-type/construction-type.js.map +1 -0
  182. package/dist-server/service/construction-type/index.d.ts +5 -0
  183. package/dist-server/service/construction-type/index.js +9 -0
  184. package/dist-server/service/construction-type/index.js.map +1 -0
  185. package/dist-server/service/index.d.ts +15 -0
  186. package/dist-server/service/index.js +59 -0
  187. package/dist-server/service/index.js.map +1 -0
  188. package/dist-server/service/inspection-drawing-type/index.d.ts +5 -0
  189. package/dist-server/service/inspection-drawing-type/index.js +9 -0
  190. package/dist-server/service/inspection-drawing-type/index.js.map +1 -0
  191. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.d.ts +6 -0
  192. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.js +64 -0
  193. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.js.map +1 -0
  194. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.d.ts +12 -0
  195. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js +78 -0
  196. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js.map +1 -0
  197. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.d.ts +10 -0
  198. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.js +39 -0
  199. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.js.map +1 -0
  200. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.d.ts +16 -0
  201. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.js +72 -0
  202. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.js.map +1 -0
  203. package/dist-server/service/inspection-part/index.d.ts +5 -0
  204. package/dist-server/service/inspection-part/index.js +9 -0
  205. package/dist-server/service/inspection-part/index.js.map +1 -0
  206. package/dist-server/service/inspection-part/inspection-part-mutation.d.ts +6 -0
  207. package/dist-server/service/inspection-part/inspection-part-mutation.js +55 -0
  208. package/dist-server/service/inspection-part/inspection-part-mutation.js.map +1 -0
  209. package/dist-server/service/inspection-part/inspection-part-query.d.ts +10 -0
  210. package/dist-server/service/inspection-part/inspection-part-query.js +66 -0
  211. package/dist-server/service/inspection-part/inspection-part-query.js.map +1 -0
  212. package/dist-server/service/inspection-part/inspection-part-type.d.ts +11 -0
  213. package/dist-server/service/inspection-part/inspection-part-type.js +43 -0
  214. package/dist-server/service/inspection-part/inspection-part-type.js.map +1 -0
  215. package/dist-server/service/inspection-part/inspection-part.d.ts +15 -0
  216. package/dist-server/service/inspection-part/inspection-part.js +69 -0
  217. package/dist-server/service/inspection-part/inspection-part.js.map +1 -0
  218. package/dist-server/service/manager/index.d.ts +7 -0
  219. package/dist-server/service/manager/index.js +11 -0
  220. package/dist-server/service/manager/index.js.map +1 -0
  221. package/dist-server/service/manager/manager-mutation.d.ts +5 -0
  222. package/dist-server/service/manager/manager-mutation.js +39 -0
  223. package/dist-server/service/manager/manager-mutation.js.map +1 -0
  224. package/dist-server/service/manager/manager-query.d.ts +4 -0
  225. package/dist-server/service/manager/manager-query.js +35 -0
  226. package/dist-server/service/manager/manager-query.js.map +1 -0
  227. package/dist-server/service/manager/manager-type.d.ts +15 -0
  228. package/dist-server/service/manager/manager-type.js +62 -0
  229. package/dist-server/service/manager/manager-type.js.map +1 -0
  230. package/dist-server/service/manager/manager.d.ts +8 -0
  231. package/dist-server/service/manager/manager.js +41 -0
  232. package/dist-server/service/manager/manager.js.map +1 -0
  233. package/dist-server/service/project/index.d.ts +5 -0
  234. package/dist-server/service/project/index.js +9 -0
  235. package/dist-server/service/project/index.js.map +1 -0
  236. package/dist-server/service/project/issue-project-code.d.ts +7 -0
  237. package/dist-server/service/project/issue-project-code.js +27 -0
  238. package/dist-server/service/project/issue-project-code.js.map +1 -0
  239. package/dist-server/service/project/project-mutation.d.ts +28 -0
  240. package/dist-server/service/project/project-mutation.js +499 -0
  241. package/dist-server/service/project/project-mutation.js.map +1 -0
  242. package/dist-server/service/project/project-query.d.ts +31 -0
  243. package/dist-server/service/project/project-query.js +307 -0
  244. package/dist-server/service/project/project-query.js.map +1 -0
  245. package/dist-server/service/project/project-type.d.ts +42 -0
  246. package/dist-server/service/project/project-type.js +152 -0
  247. package/dist-server/service/project/project-type.js.map +1 -0
  248. package/dist-server/service/project/project.d.ts +66 -0
  249. package/dist-server/service/project/project.js +247 -0
  250. package/dist-server/service/project/project.js.map +1 -0
  251. package/dist-server/service/resource/index.d.ts +6 -0
  252. package/dist-server/service/resource/index.js +10 -0
  253. package/dist-server/service/resource/index.js.map +1 -0
  254. package/dist-server/service/resource/resource-mutation.d.ts +10 -0
  255. package/dist-server/service/resource/resource-mutation.js +131 -0
  256. package/dist-server/service/resource/resource-mutation.js.map +1 -0
  257. package/dist-server/service/resource/resource-query.d.ts +11 -0
  258. package/dist-server/service/resource/resource-query.js +76 -0
  259. package/dist-server/service/resource/resource-query.js.map +1 -0
  260. package/dist-server/service/resource/resource-type.d.ts +17 -0
  261. package/dist-server/service/resource/resource-type.js +65 -0
  262. package/dist-server/service/resource/resource-type.js.map +1 -0
  263. package/dist-server/service/resource/resource.d.ts +24 -0
  264. package/dist-server/service/resource/resource.js +93 -0
  265. package/dist-server/service/resource/resource.js.map +1 -0
  266. package/dist-server/service/task/index.d.ts +5 -0
  267. package/dist-server/service/task/index.js +9 -0
  268. package/dist-server/service/task/index.js.map +1 -0
  269. package/dist-server/service/task/task-mutation.d.ts +10 -0
  270. package/dist-server/service/task/task-mutation.js +135 -0
  271. package/dist-server/service/task/task-mutation.js.map +1 -0
  272. package/dist-server/service/task/task-query.d.ts +21 -0
  273. package/dist-server/service/task/task-query.js +219 -0
  274. package/dist-server/service/task/task-query.js.map +1 -0
  275. package/dist-server/service/task/task-type.d.ts +31 -0
  276. package/dist-server/service/task/task-type.js +114 -0
  277. package/dist-server/service/task/task-type.js.map +1 -0
  278. package/dist-server/service/task/task.d.ts +35 -0
  279. package/dist-server/service/task/task.js +151 -0
  280. package/dist-server/service/task/task.js.map +1 -0
  281. package/dist-server/service/task-checklist-binding/index.d.ts +5 -0
  282. package/dist-server/service/task-checklist-binding/index.js +9 -0
  283. package/dist-server/service/task-checklist-binding/index.js.map +1 -0
  284. package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.d.ts +5 -0
  285. package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.js +188 -0
  286. package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.js.map +1 -0
  287. package/dist-server/service/task-checklist-binding/task-checklist-binding-query.d.ts +8 -0
  288. package/dist-server/service/task-checklist-binding/task-checklist-binding-query.js +61 -0
  289. package/dist-server/service/task-checklist-binding/task-checklist-binding-query.js.map +1 -0
  290. package/dist-server/service/task-checklist-binding/task-checklist-binding-type.d.ts +15 -0
  291. package/dist-server/service/task-checklist-binding/task-checklist-binding-type.js +57 -0
  292. package/dist-server/service/task-checklist-binding/task-checklist-binding-type.js.map +1 -0
  293. package/dist-server/service/task-checklist-binding/task-checklist-binding.d.ts +22 -0
  294. package/dist-server/service/task-checklist-binding/task-checklist-binding.js +106 -0
  295. package/dist-server/service/task-checklist-binding/task-checklist-binding.js.map +1 -0
  296. package/dist-server/service/task-resource/index.d.ts +6 -0
  297. package/dist-server/service/task-resource/index.js +10 -0
  298. package/dist-server/service/task-resource/index.js.map +1 -0
  299. package/dist-server/service/task-resource/task-resource-mutation.d.ts +10 -0
  300. package/dist-server/service/task-resource/task-resource-mutation.js +132 -0
  301. package/dist-server/service/task-resource/task-resource-mutation.js.map +1 -0
  302. package/dist-server/service/task-resource/task-resource-query.d.ts +7 -0
  303. package/dist-server/service/task-resource/task-resource-query.js +45 -0
  304. package/dist-server/service/task-resource/task-resource-query.js.map +1 -0
  305. package/dist-server/service/task-resource/task-resource-type.d.ts +17 -0
  306. package/dist-server/service/task-resource/task-resource-type.js +65 -0
  307. package/dist-server/service/task-resource/task-resource-type.js.map +1 -0
  308. package/dist-server/service/task-resource/task-resource.d.ts +13 -0
  309. package/dist-server/service/task-resource/task-resource.js +59 -0
  310. package/dist-server/service/task-resource/task-resource.js.map +1 -0
  311. package/dist-server/service/worker-type/index.d.ts +5 -0
  312. package/dist-server/service/worker-type/index.js +9 -0
  313. package/dist-server/service/worker-type/index.js.map +1 -0
  314. package/dist-server/service/worker-type/worker-type-mutation.d.ts +6 -0
  315. package/dist-server/service/worker-type/worker-type-mutation.js +64 -0
  316. package/dist-server/service/worker-type/worker-type-mutation.js.map +1 -0
  317. package/dist-server/service/worker-type/worker-type-query.d.ts +11 -0
  318. package/dist-server/service/worker-type/worker-type-query.js +73 -0
  319. package/dist-server/service/worker-type/worker-type-query.js.map +1 -0
  320. package/dist-server/service/worker-type/worker-type-type.d.ts +11 -0
  321. package/dist-server/service/worker-type/worker-type-type.js +43 -0
  322. package/dist-server/service/worker-type/worker-type-type.js.map +1 -0
  323. package/dist-server/service/worker-type/worker-type.d.ts +16 -0
  324. package/dist-server/service/worker-type/worker-type.js +77 -0
  325. package/dist-server/service/worker-type/worker-type.js.map +1 -0
  326. package/dist-server/tsconfig.tsbuildinfo +1 -0
  327. package/package.json +4 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-query.js","sourceRoot":"","sources":["../../../server/service/task/task-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAiH;AACjH,iDAAuG;AACvG,yDAAgD;AAChD,iCAAuC;AACvC,2CAAsC;AACtC,kEAA6D;AAC7D,6FAAuF;AAGhF,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAM5B,CAAA;AANY,4CAAgB;AAE3B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;;8CACnC;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;;mDAC5B;2BALP,gBAAgB;IAD5B,IAAA,yBAAU,GAAE;GACA,gBAAgB,CAM5B;AAGM,IAAM,SAAS,GAAf,MAAM,SAAS;IAGd,AAAN,KAAK,CAAC,IAAI,CAAY,EAAU,EAAS,OAAwB;QAC/D,OAAO,MAAM,IAAA,qBAAa,EAAC,WAAI,CAAC,CAAC,OAAO,CAAC;YACvC,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,SAAS,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC;SACvC,CAAC,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,KAAK,CAAS,MAAiB,EAAS,OAAwB;QACpE,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,WAAI,CAAC;YACrC,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CA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IACrE,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAO,WAAI;;wCAE/B;oBA1JU,SAAS;IADrB,IAAA,uBAAQ,EAAC,WAAI,CAAC;GACF,SAAS,CA2JrB","sourcesContent":["import { Resolver, Query, Field, FieldResolver, ObjectType, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Task, TaskType } from './task'\nimport { TaskList } from './task-type'\nimport { TaskResource } from '../task-resource/task-resource'\nimport { TaskChecklistBinding } from '../task-checklist-binding/task-checklist-binding'\n\n@ObjectType()\nexport class DigestedResource {\n @Field({ nullable: true, description: '자원 유형' })\n type?: string\n\n @Field({ nullable: true, description: '할당량' })\n allocated?: number\n}\n\n@Resolver(Task)\nexport class TaskQuery {\n @Directive('@privilege(category: \"project\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => Task!, { nullable: true, description: 'Fetch a single Task by its ID' })\n async task(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Task> {\n return await getRepository(Task).findOne({\n where: { id },\n relations: ['parent', 'taskResources']\n })\n }\n\n @Directive('@privilege(category: \"project\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => TaskList, { description: 'Fetch multiple Tasks based on list parameters' })\n async tasks(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<TaskList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(Task),\n alias: 'tasks',\n searchables: ['name', 'code']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n // @FieldResolver(type => Date, { nullable: true, description: 'Calculate or return the start date of the task' })\n // async startDate(@Root() task: Task): Promise<Date | undefined> {\n // if (task.type === TaskType.TASK) {\n // return task.startDate\n // } else {\n // const children = await getRepository(Task).find({ where: { parent: { id: task.id } } })\n // return children.reduce(\n // (earliest, child) => {\n // if (!earliest || (child.startDate && child.startDate < earliest)) {\n // return child.startDate\n // }\n // return earliest\n // },\n // undefined as Date | undefined\n // )\n // }\n // }\n\n // @FieldResolver(type => Date, { nullable: true, description: 'Calculate or return the end date of the task' })\n // async endDate(@Root() task: Task): Promise<Date | undefined> {\n // if (task.type === TaskType.TASK) {\n // return task.endDate\n // } else {\n // const children = await getRepository(Task).find({ where: { parent: { id: task.id } } })\n // return children.reduce(\n // (latest, child) => {\n // if (!latest || (child.endDate && child.endDate > latest)) {\n // return child.endDate\n // }\n // return latest\n // },\n // undefined as Date | undefined\n // )\n // }\n // }\n\n // @FieldResolver(type => Number, { nullable: true, description: 'Calculate the duration of the task in days' })\n // async duration(@Root() task: Task): Promise<number | undefined> {\n // if (task.type === TaskType.TASK) {\n // return task.duration\n // } else {\n // const startDate = await this.startDate(task)\n // const endDate = await this.endDate(task)\n\n // if (startDate && endDate) {\n // const durationInMs = endDate.getTime() - startDate.getTime()\n // const durationInDays = Math.ceil(durationInMs / (1000 * 60 * 60 * 24))\n // return durationInDays\n // }\n\n // return\n // }\n // }\n\n @FieldResolver(type => String, { nullable: true, description: 'Calculate the duration of the task in days' })\n async length(@Root() task: Task): Promise<string | undefined> {\n // if (task.type === TaskType.TASK) {\n return `${task.duration || 1}d`\n // } else {\n // const startDate = await this.startDate(task)\n // const endDate = await this.endDate(task)\n\n // if (startDate && endDate) {\n // const durationInMs = endDate.getTime() - startDate.getTime()\n // const durationInDays = Math.ceil(durationInMs / (1000 * 60 * 60 * 24))\n // return `${durationInDays || 1}d`\n // }\n\n // return\n // }\n }\n\n @FieldResolver(type => [Task])\n async children(\n @Root() task: Task,\n @Args(type => ListParam) params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<Task[]> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n alias: 'tasks',\n repository: await getRepository(Task),\n searchables: ['name', 'code']\n }).andWhere({ parent: { id: task.id } })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return items\n }\n\n @FieldResolver(type => [TaskResource], { description: 'Return the list of resources allocated to the task' })\n async taskResources(@Root() task: Task): Promise<TaskResource[]> {\n return task?.id && (await getRepository(TaskResource).find({ where: { task: { id: task.id } } }))\n }\n\n @FieldResolver(type => [DigestedResource], { description: 'Return the simple list of resources allocated to the task' })\n async resources(@Root() task: Task): Promise<DigestedResource[]> {\n const taskResources =\n task?.id &&\n (await getRepository(TaskResource).find({\n where: {\n task: { id: task.id }\n },\n relations: ['resource']\n }))\n\n return (taskResources || []).map(taskResource => {\n return {\n type: taskResource.resource.name,\n allocated: taskResource.quantity\n }\n })\n }\n\n @FieldResolver(type => TaskChecklistBinding, { description: 'Fetch the task checklist binding' })\n async taskChecklistBinding(@Root() task: Task): Promise<TaskChecklistBinding> {\n return await getRepository(TaskChecklistBinding).findOneBy({ taskCode: task.code, project: { id: task.projectId } })\n }\n\n @FieldResolver(type => User, { description: 'Fetch the user who last updated the task' })\n async updater(@Root() task: Task): Promise<User> {\n return await getRepository(User).findOneBy({ id: task.updaterId })\n }\n\n @FieldResolver(type => User, { description: 'Fetch the user who created the task' })\n async creator(@Root() task: Task): Promise<User> {\n return await getRepository(User).findOneBy({ id: task.creatorId })\n }\n}\n"]}
@@ -0,0 +1,31 @@
1
+ import { ObjectRef } from '@things-factory/shell';
2
+ import { Task } from './task';
3
+ export declare class ObjectRefForProject extends ObjectRef {
4
+ name?: string;
5
+ }
6
+ export declare class ObjectRefForTask extends ObjectRef {
7
+ code?: string;
8
+ }
9
+ export declare class NewTask {
10
+ code: string;
11
+ name: string;
12
+ project?: ObjectRefForProject;
13
+ parent?: ObjectRefForTask;
14
+ description?: string;
15
+ active?: boolean;
16
+ params?: string;
17
+ }
18
+ export declare class TaskPatch {
19
+ id?: string;
20
+ code?: string;
21
+ name?: string;
22
+ project?: ObjectRefForProject;
23
+ parent?: ObjectRefForTask;
24
+ description?: string;
25
+ active?: boolean;
26
+ cuFlag?: string;
27
+ }
28
+ export declare class TaskList {
29
+ items: Task[];
30
+ total: number;
31
+ }
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskList = exports.TaskPatch = exports.NewTask = exports.ObjectRefForTask = exports.ObjectRefForProject = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const shell_1 = require("@things-factory/shell");
7
+ const task_1 = require("./task");
8
+ let ObjectRefForProject = class ObjectRefForProject extends shell_1.ObjectRef {
9
+ };
10
+ exports.ObjectRefForProject = ObjectRefForProject;
11
+ tslib_1.__decorate([
12
+ (0, type_graphql_1.Field)({ nullable: true, description: '프로젝트 이름 (선택 사항)' }),
13
+ tslib_1.__metadata("design:type", String)
14
+ ], ObjectRefForProject.prototype, "name", void 0);
15
+ exports.ObjectRefForProject = ObjectRefForProject = tslib_1.__decorate([
16
+ (0, type_graphql_1.InputType)()
17
+ ], ObjectRefForProject);
18
+ let ObjectRefForTask = class ObjectRefForTask extends shell_1.ObjectRef {
19
+ };
20
+ exports.ObjectRefForTask = ObjectRefForTask;
21
+ tslib_1.__decorate([
22
+ (0, type_graphql_1.Field)({ nullable: true, description: '작업 코드 (선택 사항)' }),
23
+ tslib_1.__metadata("design:type", String)
24
+ ], ObjectRefForTask.prototype, "code", void 0);
25
+ exports.ObjectRefForTask = ObjectRefForTask = tslib_1.__decorate([
26
+ (0, type_graphql_1.InputType)()
27
+ ], ObjectRefForTask);
28
+ let NewTask = class NewTask {
29
+ };
30
+ exports.NewTask = NewTask;
31
+ tslib_1.__decorate([
32
+ (0, type_graphql_1.Field)({ description: '프로젝트 내에서 유니크한 작업 코드' }),
33
+ tslib_1.__metadata("design:type", String)
34
+ ], NewTask.prototype, "code", void 0);
35
+ tslib_1.__decorate([
36
+ (0, type_graphql_1.Field)({ description: '작업의 이름' }),
37
+ tslib_1.__metadata("design:type", String)
38
+ ], NewTask.prototype, "name", void 0);
39
+ tslib_1.__decorate([
40
+ (0, type_graphql_1.Field)(type => ObjectRefForProject, { nullable: true, description: '작업이 속한 프로젝트 (선택 사항)' }),
41
+ tslib_1.__metadata("design:type", ObjectRefForProject)
42
+ ], NewTask.prototype, "project", void 0);
43
+ tslib_1.__decorate([
44
+ (0, type_graphql_1.Field)(type => ObjectRefForTask, { nullable: true, description: '부모 작업, 해당 작업이 하위 작업인 경우 (선택 사항)' }),
45
+ tslib_1.__metadata("design:type", ObjectRefForTask)
46
+ ], NewTask.prototype, "parent", void 0);
47
+ tslib_1.__decorate([
48
+ (0, type_graphql_1.Field)({ nullable: true, description: '작업에 대한 설명 (선택 사항)' }),
49
+ tslib_1.__metadata("design:type", String)
50
+ ], NewTask.prototype, "description", void 0);
51
+ tslib_1.__decorate([
52
+ (0, type_graphql_1.Field)({ nullable: true, description: '작업이 활성 상태인지 여부 (선택 사항)' }),
53
+ tslib_1.__metadata("design:type", Boolean)
54
+ ], NewTask.prototype, "active", void 0);
55
+ tslib_1.__decorate([
56
+ (0, type_graphql_1.Field)({ nullable: true, description: '작업에 대한 추가 파라미터, JSON 형식으로 저장 (선택 사항)' }),
57
+ tslib_1.__metadata("design:type", String)
58
+ ], NewTask.prototype, "params", void 0);
59
+ exports.NewTask = NewTask = tslib_1.__decorate([
60
+ (0, type_graphql_1.InputType)()
61
+ ], NewTask);
62
+ let TaskPatch = class TaskPatch {
63
+ };
64
+ exports.TaskPatch = TaskPatch;
65
+ tslib_1.__decorate([
66
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true, description: '수정할 작업의 ID (선택 사항)' }),
67
+ tslib_1.__metadata("design:type", String)
68
+ ], TaskPatch.prototype, "id", void 0);
69
+ tslib_1.__decorate([
70
+ (0, type_graphql_1.Field)({ nullable: true, description: '프로젝트 내에서 유니크한 작업 코드 (선택 사항)' }),
71
+ tslib_1.__metadata("design:type", String)
72
+ ], TaskPatch.prototype, "code", void 0);
73
+ tslib_1.__decorate([
74
+ (0, type_graphql_1.Field)({ nullable: true, description: '작업의 이름 (선택 사항)' }),
75
+ tslib_1.__metadata("design:type", String)
76
+ ], TaskPatch.prototype, "name", void 0);
77
+ tslib_1.__decorate([
78
+ (0, type_graphql_1.Field)(type => ObjectRefForProject, { nullable: true, description: '작업이 속한 프로젝트 (선택 사항)' }),
79
+ tslib_1.__metadata("design:type", ObjectRefForProject)
80
+ ], TaskPatch.prototype, "project", void 0);
81
+ tslib_1.__decorate([
82
+ (0, type_graphql_1.Field)(type => ObjectRefForTask, { nullable: true, description: '부모 작업, 해당 작업이 하위 작업인 경우 (선택 사항)' }),
83
+ tslib_1.__metadata("design:type", ObjectRefForTask)
84
+ ], TaskPatch.prototype, "parent", void 0);
85
+ tslib_1.__decorate([
86
+ (0, type_graphql_1.Field)({ nullable: true, description: '작업에 대한 설명 (선택 사항)' }),
87
+ tslib_1.__metadata("design:type", String)
88
+ ], TaskPatch.prototype, "description", void 0);
89
+ tslib_1.__decorate([
90
+ (0, type_graphql_1.Field)({ nullable: true, description: '작업이 활성 상태인지 여부 (선택 사항)' }),
91
+ tslib_1.__metadata("design:type", Boolean)
92
+ ], TaskPatch.prototype, "active", void 0);
93
+ tslib_1.__decorate([
94
+ (0, type_graphql_1.Field)({ nullable: true, description: "생성('+') 또는 수정('M') 플래그 (선택 사항)" }),
95
+ tslib_1.__metadata("design:type", String)
96
+ ], TaskPatch.prototype, "cuFlag", void 0);
97
+ exports.TaskPatch = TaskPatch = tslib_1.__decorate([
98
+ (0, type_graphql_1.InputType)()
99
+ ], TaskPatch);
100
+ let TaskList = class TaskList {
101
+ };
102
+ exports.TaskList = TaskList;
103
+ tslib_1.__decorate([
104
+ (0, type_graphql_1.Field)(type => [task_1.Task], { description: '작업 리스트 항목들' }),
105
+ tslib_1.__metadata("design:type", Array)
106
+ ], TaskList.prototype, "items", void 0);
107
+ tslib_1.__decorate([
108
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: '전체 작업 수' }),
109
+ tslib_1.__metadata("design:type", Number)
110
+ ], TaskList.prototype, "total", void 0);
111
+ exports.TaskList = TaskList = tslib_1.__decorate([
112
+ (0, type_graphql_1.ObjectType)()
113
+ ], TaskList);
114
+ //# sourceMappingURL=task-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-type.js","sourceRoot":"","sources":["../../../server/service/task/task-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AACtF,iDAA+D;AAC/D,iCAA6B;AAGtB,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,iBAAS;CAGjD,CAAA;AAHY,kDAAmB;AAE9B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;;iDAC7C;8BAFF,mBAAmB;IAD/B,IAAA,wBAAS,GAAE;GACC,mBAAmB,CAG/B;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,iBAAS;CAG9C,CAAA;AAHY,4CAAgB;AAE3B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;;8CAC3C;2BAFF,gBAAgB;IAD5B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CAG5B;AAGM,IAAM,OAAO,GAAb,MAAM,OAAO;CAqBnB,CAAA;AArBY,0BAAO;AAElB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;;qCAClC;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;;qCACrB;AAGZ;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;sCACjF,mBAAmB;wCAAA;AAG7B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;s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,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;;yCACjD;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;;yCAC1D;oBAvBJ,SAAS;IADrB,IAAA,wBAAS,GAAE;GACC,SAAS,CAwBrB;AAGM,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAMpB,CAAA;AANY,4BAAQ;AAEnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAI,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;;uCACxC;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;;uCAClC;mBALF,QAAQ;IADpB,IAAA,yBAAU,GAAE;GACA,QAAQ,CAMpB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\nimport { Task } from './task'\n\n@InputType()\nexport class ObjectRefForProject extends ObjectRef {\n @Field({ nullable: true, description: '프로젝트 이름 (선택 사항)' })\n name?: string\n}\n\n@InputType()\nexport class ObjectRefForTask extends ObjectRef {\n @Field({ nullable: true, description: '작업 코드 (선택 사항)' })\n code?: string\n}\n\n@InputType()\nexport class NewTask {\n @Field({ description: '프로젝트 내에서 유니크한 작업 코드' })\n code: string\n\n @Field({ description: '작업의 이름' })\n name: string\n\n @Field(type => ObjectRefForProject, { nullable: true, description: '작업이 속한 프로젝트 (선택 사항)' })\n project?: ObjectRefForProject\n\n @Field(type => ObjectRefForTask, { nullable: true, description: '부모 작업, 해당 작업이 하위 작업인 경우 (선택 사항)' })\n parent?: ObjectRefForTask\n\n @Field({ nullable: true, description: '작업에 대한 설명 (선택 사항)' })\n description?: string\n\n @Field({ nullable: true, description: '작업이 활성 상태인지 여부 (선택 사항)' })\n active?: boolean\n\n @Field({ nullable: true, description: '작업에 대한 추가 파라미터, JSON 형식으로 저장 (선택 사항)' })\n params?: string\n}\n\n@InputType()\nexport class TaskPatch {\n @Field(type => ID, { nullable: true, description: '수정할 작업의 ID (선택 사항)' })\n id?: string\n\n @Field({ nullable: true, description: '프로젝트 내에서 유니크한 작업 코드 (선택 사항)' })\n code?: string\n\n @Field({ nullable: true, description: '작업의 이름 (선택 사항)' })\n name?: string\n\n @Field(type => ObjectRefForProject, { nullable: true, description: '작업이 속한 프로젝트 (선택 사항)' })\n project?: ObjectRefForProject\n\n @Field(type => ObjectRefForTask, { nullable: true, description: '부모 작업, 해당 작업이 하위 작업인 경우 (선택 사항)' })\n parent?: ObjectRefForTask\n\n @Field({ nullable: true, description: '작업에 대한 설명 (선택 사항)' })\n description?: string\n\n @Field({ nullable: true, description: '작업이 활성 상태인지 여부 (선택 사항)' })\n active?: boolean\n\n @Field({ nullable: true, description: \"생성('+') 또는 수정('M') 플래그 (선택 사항)\" })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class TaskList {\n @Field(type => [Task], { description: '작업 리스트 항목들' })\n items: Task[]\n\n @Field(type => Int, { description: '전체 작업 수' })\n total: number\n}\n"]}
@@ -0,0 +1,35 @@
1
+ import { User } from '@things-factory/auth-base';
2
+ import { Project } from '../project/project';
3
+ import { TaskResource } from '../task-resource/task-resource';
4
+ import { TaskChecklistBinding } from '../task-checklist-binding/task-checklist-binding';
5
+ export declare enum TaskType {
6
+ GROUP = "group",
7
+ TASK = "task"
8
+ }
9
+ export declare class Task {
10
+ readonly id: string;
11
+ code: string;
12
+ name?: string;
13
+ type?: TaskType;
14
+ parent: Task;
15
+ parentId?: string;
16
+ children?: Task[];
17
+ startDate?: Date;
18
+ endDate?: Date;
19
+ duration?: number;
20
+ dependsOn?: string;
21
+ project?: Project;
22
+ projectId?: string;
23
+ tags?: string[];
24
+ progress?: number;
25
+ style?: string;
26
+ taskResources?: TaskResource[];
27
+ taskChecklistBinding?: TaskChecklistBinding;
28
+ createdAt?: Date;
29
+ updatedAt?: Date;
30
+ deletedAt?: Date;
31
+ creator?: User;
32
+ creatorId?: string;
33
+ updater?: User;
34
+ updaterId?: string;
35
+ }
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Task = exports.TaskType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ const project_1 = require("../project/project");
10
+ // import { Checklist } from '@dssp/supervisor'
11
+ const task_resource_1 = require("../task-resource/task-resource");
12
+ const task_checklist_binding_1 = require("../task-checklist-binding/task-checklist-binding");
13
+ var TaskType;
14
+ (function (TaskType) {
15
+ TaskType["GROUP"] = "group";
16
+ TaskType["TASK"] = "task";
17
+ })(TaskType || (exports.TaskType = TaskType = {}));
18
+ (0, type_graphql_1.registerEnumType)(TaskType, {
19
+ name: 'TaskType',
20
+ description: '작업 타입'
21
+ });
22
+ let Task = class Task {
23
+ };
24
+ exports.Task = Task;
25
+ tslib_1.__decorate([
26
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
27
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
28
+ tslib_1.__metadata("design:type", String)
29
+ ], Task.prototype, "id", void 0);
30
+ tslib_1.__decorate([
31
+ (0, typeorm_1.Column)({ nullable: false, comment: '프로젝트 내에서 유니크한 작업 코드' }),
32
+ (0, type_graphql_1.Field)({ nullable: false }),
33
+ tslib_1.__metadata("design:type", String)
34
+ ], Task.prototype, "code", void 0);
35
+ tslib_1.__decorate([
36
+ (0, typeorm_1.Column)({ nullable: true, comment: '작업 명' }),
37
+ (0, type_graphql_1.Field)({ nullable: true }),
38
+ tslib_1.__metadata("design:type", String)
39
+ ], Task.prototype, "name", void 0);
40
+ tslib_1.__decorate([
41
+ (0, typeorm_1.Column)({ nullable: true, comment: '테스크 타입 (group: 공종, task: 세부 공종)' }),
42
+ (0, type_graphql_1.Field)({ nullable: true }),
43
+ tslib_1.__metadata("design:type", String)
44
+ ], Task.prototype, "type", void 0);
45
+ tslib_1.__decorate([
46
+ (0, typeorm_1.ManyToOne)(type => Task, task => task.children, { nullable: true }),
47
+ (0, type_graphql_1.Field)({ nullable: true }),
48
+ tslib_1.__metadata("design:type", Task)
49
+ ], Task.prototype, "parent", void 0);
50
+ tslib_1.__decorate([
51
+ (0, typeorm_1.RelationId)((task) => task.parent),
52
+ tslib_1.__metadata("design:type", String)
53
+ ], Task.prototype, "parentId", void 0);
54
+ tslib_1.__decorate([
55
+ (0, typeorm_1.OneToMany)(type => Task, task => task.parent, { nullable: true }),
56
+ (0, type_graphql_1.Field)(type => [Task], { nullable: true }),
57
+ tslib_1.__metadata("design:type", Array)
58
+ ], Task.prototype, "children", void 0);
59
+ tslib_1.__decorate([
60
+ (0, typeorm_1.Column)({ nullable: true, comment: '시작일' }),
61
+ (0, type_graphql_1.Field)({ nullable: true }),
62
+ tslib_1.__metadata("design:type", Date)
63
+ ], Task.prototype, "startDate", void 0);
64
+ tslib_1.__decorate([
65
+ (0, typeorm_1.Column)({ nullable: true, comment: '종료일' }),
66
+ (0, type_graphql_1.Field)({ nullable: true }),
67
+ tslib_1.__metadata("design:type", Date)
68
+ ], Task.prototype, "endDate", void 0);
69
+ tslib_1.__decorate([
70
+ (0, typeorm_1.Column)({ nullable: true, comment: '기간' }),
71
+ (0, type_graphql_1.Field)({ nullable: true }),
72
+ tslib_1.__metadata("design:type", Number)
73
+ ], Task.prototype, "duration", void 0);
74
+ tslib_1.__decorate([
75
+ (0, typeorm_1.Column)({ nullable: true, comment: '선행 태스크 코드' }),
76
+ (0, type_graphql_1.Field)({ nullable: true }),
77
+ tslib_1.__metadata("design:type", String)
78
+ ], Task.prototype, "dependsOn", void 0);
79
+ tslib_1.__decorate([
80
+ (0, typeorm_1.ManyToOne)(type => project_1.Project, project => project.tasks),
81
+ (0, type_graphql_1.Field)(type => project_1.Project),
82
+ tslib_1.__metadata("design:type", project_1.Project)
83
+ ], Task.prototype, "project", void 0);
84
+ tslib_1.__decorate([
85
+ (0, typeorm_1.RelationId)((task) => task.project),
86
+ tslib_1.__metadata("design:type", String)
87
+ ], Task.prototype, "projectId", void 0);
88
+ tslib_1.__decorate([
89
+ (0, typeorm_1.Column)('simple-json', { nullable: true, default: null }),
90
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
91
+ tslib_1.__metadata("design:type", Array)
92
+ ], Task.prototype, "tags", void 0);
93
+ tslib_1.__decorate([
94
+ (0, typeorm_1.Column)({ nullable: true, comment: '진행율' }),
95
+ (0, type_graphql_1.Field)({ nullable: true }),
96
+ tslib_1.__metadata("design:type", Number)
97
+ ], Task.prototype, "progress", void 0);
98
+ tslib_1.__decorate([
99
+ (0, typeorm_1.Column)({ nullable: true, comment: '스타일' }),
100
+ (0, type_graphql_1.Field)({ nullable: true }),
101
+ tslib_1.__metadata("design:type", String)
102
+ ], Task.prototype, "style", void 0);
103
+ tslib_1.__decorate([
104
+ (0, typeorm_1.OneToMany)(type => task_resource_1.TaskResource, taskResource => taskResource.task, { cascade: true }),
105
+ (0, type_graphql_1.Field)(type => [task_resource_1.TaskResource], { nullable: true }),
106
+ tslib_1.__metadata("design:type", Array)
107
+ ], Task.prototype, "taskResources", void 0);
108
+ tslib_1.__decorate([
109
+ (0, typeorm_1.OneToOne)(type => task_checklist_binding_1.TaskChecklistBinding, binding => binding.task, { nullable: true }),
110
+ (0, type_graphql_1.Field)(type => task_checklist_binding_1.TaskChecklistBinding, { nullable: true }),
111
+ tslib_1.__metadata("design:type", task_checklist_binding_1.TaskChecklistBinding)
112
+ ], Task.prototype, "taskChecklistBinding", void 0);
113
+ tslib_1.__decorate([
114
+ (0, typeorm_1.CreateDateColumn)(),
115
+ (0, type_graphql_1.Field)({ nullable: true }),
116
+ tslib_1.__metadata("design:type", Date)
117
+ ], Task.prototype, "createdAt", void 0);
118
+ tslib_1.__decorate([
119
+ (0, typeorm_1.UpdateDateColumn)(),
120
+ (0, type_graphql_1.Field)({ nullable: true }),
121
+ tslib_1.__metadata("design:type", Date)
122
+ ], Task.prototype, "updatedAt", void 0);
123
+ tslib_1.__decorate([
124
+ (0, typeorm_1.DeleteDateColumn)(),
125
+ (0, type_graphql_1.Field)({ nullable: true }),
126
+ tslib_1.__metadata("design:type", Date)
127
+ ], Task.prototype, "deletedAt", void 0);
128
+ tslib_1.__decorate([
129
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
130
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
131
+ tslib_1.__metadata("design:type", auth_base_1.User)
132
+ ], Task.prototype, "creator", void 0);
133
+ tslib_1.__decorate([
134
+ (0, typeorm_1.RelationId)((task) => task.creator),
135
+ tslib_1.__metadata("design:type", String)
136
+ ], Task.prototype, "creatorId", void 0);
137
+ tslib_1.__decorate([
138
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
139
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
140
+ tslib_1.__metadata("design:type", auth_base_1.User)
141
+ ], Task.prototype, "updater", void 0);
142
+ tslib_1.__decorate([
143
+ (0, typeorm_1.RelationId)((task) => task.updater),
144
+ tslib_1.__metadata("design:type", String)
145
+ ], Task.prototype, "updaterId", void 0);
146
+ exports.Task = Task = tslib_1.__decorate([
147
+ (0, typeorm_1.Entity)(),
148
+ (0, typeorm_1.Index)('ix_task_project_code', (task) => [task.project, task.code], { unique: true, where: '"deleted_at" IS NULL' }),
149
+ (0, type_graphql_1.ObjectType)({ description: '공정표 작업 정보' })
150
+ ], Task);
151
+ //# sourceMappingURL=task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.js","sourceRoot":"","sources":["../../../server/service/task/task.ts"],"names":[],"mappings":";;;;AAAA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yBAAU,EAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;GAC5B,IAAI,CAgGhB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n OneToOne,\n JoinColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\n\nimport { ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Project } from '../project/project'\n// import { Checklist } from '@dssp/supervisor'\nimport { TaskResource } from '../task-resource/task-resource'\nimport { TaskChecklistBinding } from '../task-checklist-binding/task-checklist-binding'\n\nexport enum TaskType {\n GROUP = 'group',\n TASK = 'task'\n}\n\nregisterEnumType(TaskType, {\n name: 'TaskType',\n description: '작업 타입'\n})\n\n@Entity()\n@Index('ix_task_project_code', (task: Task) => [task.project, task.code], { unique: true, where: '\"deleted_at\" IS NULL' })\n@ObjectType({ description: '공정표 작업 정보' })\nexport class Task {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: false, comment: '프로젝트 내에서 유니크한 작업 코드' })\n @Field({ nullable: false })\n code: string\n\n @Column({ nullable: true, comment: '작업 명' })\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true, comment: '테스크 타입 (group: 공종, task: 세부 공종)' })\n @Field({ nullable: true })\n type?: TaskType\n\n @ManyToOne(type => Task, task => task.children, { nullable: true })\n @Field({ nullable: true })\n parent: Task\n\n @RelationId((task: Task) => task.parent)\n parentId?: string\n\n @OneToMany(type => Task, task => task.parent, { nullable: true })\n @Field(type => [Task], { nullable: true })\n children?: Task[]\n\n @Column({ nullable: true, comment: '시작일' })\n @Field({ nullable: true })\n startDate?: Date\n\n @Column({ nullable: true, comment: '종료일' })\n @Field({ nullable: true })\n endDate?: Date\n\n @Column({ nullable: true, comment: '기간' })\n @Field({ nullable: true })\n duration?: number\n\n @Column({ nullable: true, comment: '선행 태스크 코드' })\n @Field({ nullable: true })\n dependsOn?: string\n\n @ManyToOne(type => Project, project => project.tasks)\n @Field(type => Project)\n project?: Project\n\n @RelationId((task: Task) => task.project)\n projectId?: string\n\n @Column('simple-json', { nullable: true, default: null })\n @Field(type => ScalarObject, { nullable: true })\n tags?: string[]\n\n @Column({ nullable: true, comment: '진행율' })\n @Field({ nullable: true })\n progress?: number\n\n @Column({ nullable: true, comment: '스타일' })\n @Field({ nullable: true })\n style?: string\n\n @OneToMany(type => TaskResource, taskResource => taskResource.task, { cascade: true })\n @Field(type => [TaskResource], { nullable: true })\n taskResources?: TaskResource[]\n\n @OneToOne(type => TaskChecklistBinding, binding => binding.task, { nullable: true })\n @Field(type => TaskChecklistBinding, { nullable: true })\n taskChecklistBinding?: TaskChecklistBinding\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((task: Task) => task.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((task: Task) => task.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { TaskChecklistBinding } from './task-checklist-binding';
2
+ import { TaskChecklistBindingQuery } from './task-checklist-binding-query';
3
+ import { TaskChecklistBindingMutation } from './task-checklist-binding-mutation';
4
+ export declare const entities: (typeof TaskChecklistBinding)[];
5
+ export declare const resolvers: (typeof TaskChecklistBindingQuery | typeof TaskChecklistBindingMutation)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const task_checklist_binding_1 = require("./task-checklist-binding");
5
+ const task_checklist_binding_query_1 = require("./task-checklist-binding-query");
6
+ const task_checklist_binding_mutation_1 = require("./task-checklist-binding-mutation");
7
+ exports.entities = [task_checklist_binding_1.TaskChecklistBinding];
8
+ exports.resolvers = [task_checklist_binding_query_1.TaskChecklistBindingQuery, task_checklist_binding_mutation_1.TaskChecklistBindingMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/task-checklist-binding/index.ts"],"names":[],"mappings":";;;AAAA,qEAA+D;AAC/D,iFAA0E;AAC1E,uFAAgF;AAEnE,QAAA,QAAQ,GAAG,CAAC,6CAAoB,CAAC,CAAA;AACjC,QAAA,SAAS,GAAG,CAAC,wDAAyB,EAAE,8DAA4B,CAAC,CAAA","sourcesContent":["import { TaskChecklistBinding } from './task-checklist-binding'\nimport { TaskChecklistBindingQuery } from './task-checklist-binding-query'\nimport { TaskChecklistBindingMutation } from './task-checklist-binding-mutation'\n\nexport const entities = [TaskChecklistBinding]\nexport const resolvers = [TaskChecklistBindingQuery, TaskChecklistBindingMutation]\n"]}
@@ -0,0 +1,5 @@
1
+ import { NewTaskChecklist, UpdateTaskChecklistSubmitType } from './task-checklist-binding-type';
2
+ export declare class TaskChecklistBindingMutation {
3
+ createTaskChecklist(patch: NewTaskChecklist, context: ResolverContext): Promise<boolean>;
4
+ updateTaskChecklist(taskChecklist: UpdateTaskChecklistSubmitType, context: ResolverContext): Promise<boolean>;
5
+ }
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskChecklistBindingMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const task_checklist_binding_1 = require("./task-checklist-binding");
7
+ const supervision_1 = require("@dssp/supervision");
8
+ const task_checklist_binding_type_1 = require("./task-checklist-binding-type");
9
+ let TaskChecklistBindingMutation = class TaskChecklistBindingMutation {
10
+ async createTaskChecklist(patch, context) {
11
+ const { user, tx } = context.state;
12
+ const { checklist, checklistItem, managerId } = patch;
13
+ const { projectId, taskCode } = checklist;
14
+ const checklistRepository = tx.getRepository(supervision_1.Checklist);
15
+ const checklistItemRepository = tx.getRepository(supervision_1.ChecklistItem);
16
+ const taskChecklistBindingRepository = tx.getRepository(task_checklist_binding_1.TaskChecklistBinding);
17
+ // 1. 벨리데이션
18
+ if (!checklist.constructionType)
19
+ throw new Error('공종 타입이 없습니다.');
20
+ if (!checklist.constructionDetailType)
21
+ throw new Error('상세 공종 타입이 없습니다.');
22
+ if (!checklist.name)
23
+ throw new Error('체크리스트 이름이 없습니다.');
24
+ if (checklistItem.length === 0)
25
+ throw new Error('체크리스트 아이템이 없습니다.');
26
+ // 2. checklist 저장
27
+ const documentNo = await getRecentDocumentNoByTaskCode(tx);
28
+ const savedChecklist = await checklistRepository.save(Object.assign(Object.assign({}, checklist), { documentNo, projectType: supervision_1.ProjectType.DSSP, checklistReferenceType: supervision_1.ChecklistReferenceType.TASK, creator: user, updater: user }));
29
+ // 3. checklistItem 저장
30
+ const checklistItems = checklistItem.map((item, idx) => ({
31
+ name: item.name,
32
+ mainType: item.mainType,
33
+ detailType: item.detailType,
34
+ inspctionCriteria: item.inspctionCriteria,
35
+ kcsCriteria: item.kcsCriteria,
36
+ siteSpecCriteria: item.siteSpecCriteria,
37
+ sequence: idx,
38
+ checklist: savedChecklist,
39
+ creator: user,
40
+ updater: user
41
+ }));
42
+ await checklistItemRepository.save(checklistItems);
43
+ // 4. taskChecklistBinding 저장
44
+ await taskChecklistBindingRepository.save({
45
+ project: { id: projectId },
46
+ taskCode,
47
+ checklist: savedChecklist,
48
+ status: supervision_1.BuildingInspectionStatus.WAIT,
49
+ manager: { id: managerId },
50
+ creator: user,
51
+ updater: user
52
+ });
53
+ return true;
54
+ }
55
+ // 체크리스트 상태 변경 & 체크리스트 갱신
56
+ async updateTaskChecklist(taskChecklist, context) {
57
+ const { user, tx } = context.state;
58
+ const { checklistId, checklist, checklistItem } = taskChecklist;
59
+ const checklistRepo = tx.getRepository(supervision_1.Checklist);
60
+ const checklistItemRepo = tx.getRepository(supervision_1.ChecklistItem);
61
+ const taskChecklistBindingRepository = tx.getRepository(task_checklist_binding_1.TaskChecklistBinding);
62
+ const currChecklist = await checklistRepo.findOneBy({ id: checklistId });
63
+ const currTaskChecklistBinding = await taskChecklistBindingRepository.findOneBy({ checklist: { id: checklistId } });
64
+ const status = currTaskChecklistBinding.status;
65
+ const isConstructor = status == supervision_1.BuildingInspectionStatus.WAIT ||
66
+ status == supervision_1.BuildingInspectionStatus.OVERALL_WAIT ||
67
+ status == supervision_1.BuildingInspectionStatus.FAIL;
68
+ let taskChecklistStatus = null;
69
+ // 1. 벨리데이션
70
+ if (status == supervision_1.BuildingInspectionStatus.PASS)
71
+ throw new Error('체크리스트 상태가 수정할 수 있는 상태가 아닙니다.');
72
+ if (isConstructor) {
73
+ // 시공자 타입별 밸리데이션
74
+ if (checklistItem.length !== checklistItem.filter(v => v.constructionConfirmStatus).length) {
75
+ throw new Error('아이템을 모두 체크해야 합니다.');
76
+ }
77
+ if (status == supervision_1.BuildingInspectionStatus.OVERALL_WAIT && !checklist.overallConstructorSignature) {
78
+ throw new Error('총괄 시공책임자 사인이 없습니다.');
79
+ }
80
+ if (status == supervision_1.BuildingInspectionStatus.WAIT && !checklist.taskConstructorSignature) {
81
+ throw new Error('공종별 시공관리자 사인이 없습니다.');
82
+ }
83
+ // 시공자 상태 데이터
84
+ const isPassed = checklistItem.length === checklistItem.filter(v => v.constructionConfirmStatus === 'T').length;
85
+ if (!isPassed) {
86
+ // 1. 검측이 불햡격 = 상태는 불합격으로, 시공자 싸인은 모두 초기화
87
+ taskChecklistStatus = supervision_1.BuildingInspectionStatus.FAIL;
88
+ checklist.overallConstructorSignature = null;
89
+ checklist.taskConstructorSignature = null;
90
+ }
91
+ else if (isPassed && (status === supervision_1.BuildingInspectionStatus.WAIT || status === supervision_1.BuildingInspectionStatus.FAIL)) {
92
+ // 2. 검측이 합격이면서 공종 시공자 스탭 = 상태는 총괄 시공자 스탭으로
93
+ taskChecklistStatus = supervision_1.BuildingInspectionStatus.OVERALL_WAIT;
94
+ }
95
+ else if (isPassed && status === supervision_1.BuildingInspectionStatus.OVERALL_WAIT) {
96
+ // 3. 검측이 합격이면서 총괄 시공자 스탭 = 상태는 공종 감리자 스탭으로, 감리자 싸인은 모두 초기화
97
+ taskChecklistStatus = supervision_1.BuildingInspectionStatus.REQUEST;
98
+ checklist.overallSupervisorySignature = null;
99
+ checklist.taskSupervisorySignature = null;
100
+ }
101
+ }
102
+ else {
103
+ // 감리자 타입별 밸리데이션
104
+ if (checklistItem.length !== checklistItem.filter(v => v.supervisoryConfirmStatus).length) {
105
+ throw new Error('아이템을 모두 체크해야 합니다.');
106
+ }
107
+ if (status == supervision_1.BuildingInspectionStatus.OVERALL_REQUEST && !checklist.overallSupervisorySignature) {
108
+ throw new Error('총괄 감리책임자 사인이 없습니다.');
109
+ }
110
+ if (status == supervision_1.BuildingInspectionStatus.REQUEST && !checklist.taskSupervisorySignature) {
111
+ throw new Error('공종별 감리 책임자 사인이 없습니다.');
112
+ }
113
+ // 감리자 상태 데이터
114
+ const isPassed = checklistItem.length === checklistItem.filter(v => v.supervisoryConfirmStatus === 'T').length;
115
+ if (!isPassed) {
116
+ // 1. 검측이 불햡격 = 상태는 불합격으로, 시공자 싸인은 모두 초기화
117
+ taskChecklistStatus = supervision_1.BuildingInspectionStatus.FAIL;
118
+ checklist.overallConstructorSignature = null;
119
+ checklist.taskConstructorSignature = null;
120
+ }
121
+ else if (isPassed && status === supervision_1.BuildingInspectionStatus.REQUEST) {
122
+ // 2. 검측이 합격이면서 공종 감리자 스탭 = 상태는 총괄 감리자 스탭으로
123
+ taskChecklistStatus = supervision_1.BuildingInspectionStatus.OVERALL_REQUEST;
124
+ }
125
+ else if (isPassed && status === supervision_1.BuildingInspectionStatus.OVERALL_REQUEST) {
126
+ // 3. 검측이 합격이면서 총괄 감리자 스탭 = 상태는 합격으로
127
+ taskChecklistStatus = supervision_1.BuildingInspectionStatus.PASS;
128
+ }
129
+ }
130
+ // 3. checklist 저장
131
+ const inspectionDateField = isConstructor ? 'constructionInspectionDate' : 'supervisorInspectionDate';
132
+ await checklistRepo.save(Object.assign(Object.assign({}, currChecklist), { [inspectionDateField]: new Date(), overallConstructorSignature: checklist.overallConstructorSignature, taskConstructorSignature: checklist.taskConstructorSignature, overallSupervisorySignature: checklist.overallSupervisorySignature, taskSupervisorySignature: checklist.taskSupervisorySignature, updater: user }));
133
+ // 4. checklistItem 저장
134
+ for (let item of checklistItem) {
135
+ const confirmStatusField = isConstructor ? 'constructionConfirmStatus' : 'supervisoryConfirmStatus';
136
+ await checklistItemRepo.update(item.id, {
137
+ [confirmStatusField]: item[confirmStatusField],
138
+ updater: user
139
+ });
140
+ }
141
+ // 5. taskChecklistBinding 저장
142
+ await taskChecklistBindingRepository.save(Object.assign(Object.assign({}, currTaskChecklistBinding), { status: taskChecklistStatus, updater: user }));
143
+ return true;
144
+ }
145
+ };
146
+ exports.TaskChecklistBindingMutation = TaskChecklistBindingMutation;
147
+ tslib_1.__decorate([
148
+ (0, type_graphql_1.Directive)('@transaction'),
149
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To create Task Checklist information' }),
150
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patch')),
151
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
152
+ tslib_1.__metadata("design:type", Function),
153
+ tslib_1.__metadata("design:paramtypes", [task_checklist_binding_type_1.NewTaskChecklist, Object]),
154
+ tslib_1.__metadata("design:returntype", Promise)
155
+ ], TaskChecklistBindingMutation.prototype, "createTaskChecklist", null);
156
+ tslib_1.__decorate([
157
+ (0, type_graphql_1.Directive)('@transaction'),
158
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To update Task Checklist information' }),
159
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('taskChecklist')),
160
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
161
+ tslib_1.__metadata("design:type", Function),
162
+ tslib_1.__metadata("design:paramtypes", [task_checklist_binding_type_1.UpdateTaskChecklistSubmitType, Object]),
163
+ tslib_1.__metadata("design:returntype", Promise)
164
+ ], TaskChecklistBindingMutation.prototype, "updateTaskChecklist", null);
165
+ exports.TaskChecklistBindingMutation = TaskChecklistBindingMutation = tslib_1.__decorate([
166
+ (0, type_graphql_1.Resolver)(task_checklist_binding_1.TaskChecklistBinding)
167
+ ], TaskChecklistBindingMutation);
168
+ async function getRecentDocumentNoByTaskCode(tx) {
169
+ // 날짜 6자리 생성 YYMMDD
170
+ const date = new Date();
171
+ const year = date.getFullYear().toString().slice(-2);
172
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
173
+ const day = date.getDate().toString().padStart(2, '0');
174
+ const DocNum = `${year}${month}${day}`;
175
+ const latestChecklist = await tx
176
+ .getRepository(supervision_1.Checklist)
177
+ .createQueryBuilder('c')
178
+ .where('c.document_no LIKE :pattern', { pattern: `${DocNum}-%` })
179
+ .orderBy('c.created_at', 'DESC')
180
+ .getOne();
181
+ let documentNo = '000001';
182
+ if (latestChecklist) {
183
+ const lastNo = latestChecklist.documentNo.split('-')[2];
184
+ documentNo = (Number(lastNo) + 1).toString().padStart(6, '0');
185
+ }
186
+ return `${DocNum}-${documentNo}`;
187
+ }
188
+ //# sourceMappingURL=task-checklist-binding-mutation.js.map