@dssp/project 1.0.0-y.0 → 1.0.0

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 (318) hide show
  1. package/package.json +15 -15
  2. package/dist-client/bootstrap.d.ts +0 -0
  3. package/dist-client/bootstrap.js +0 -2
  4. package/dist-client/bootstrap.js.map +0 -1
  5. package/dist-client/index.d.ts +0 -1
  6. package/dist-client/index.js +0 -2
  7. package/dist-client/index.js.map +0 -1
  8. package/dist-client/pages/lib/chatbot-widget.d.ts +0 -53
  9. package/dist-client/pages/lib/chatbot-widget.js +0 -631
  10. package/dist-client/pages/lib/chatbot-widget.js.map +0 -1
  11. package/dist-client/pages/lib/select2-component.d.ts +0 -23
  12. package/dist-client/pages/lib/select2-component.js +0 -181
  13. package/dist-client/pages/lib/select2-component.js.map +0 -1
  14. package/dist-client/pages/lib/waether.d.ts +0 -7
  15. package/dist-client/pages/lib/waether.js +0 -156
  16. package/dist-client/pages/lib/waether.js.map +0 -1
  17. package/dist-client/pages/project/component/pagenation.d.ts +0 -18
  18. package/dist-client/pages/project/component/pagenation.js +0 -142
  19. package/dist-client/pages/project/component/pagenation.js.map +0 -1
  20. package/dist-client/pages/project/component/project-update-header.d.ts +0 -1
  21. package/dist-client/pages/project/component/project-update-header.js +0 -121
  22. package/dist-client/pages/project/component/project-update-header.js.map +0 -1
  23. package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.d.ts +0 -1
  24. package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.js +0 -309
  25. package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.js.map +0 -1
  26. package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.d.ts +0 -1
  27. package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.js +0 -357
  28. package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.js.map +0 -1
  29. package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.d.ts +0 -1
  30. package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.js +0 -681
  31. package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.js.map +0 -1
  32. package/dist-client/pages/project/popup/checklist/task-checklist-view.d.ts +0 -32
  33. package/dist-client/pages/project/popup/checklist/task-checklist-view.js +0 -621
  34. package/dist-client/pages/project/popup/checklist/task-checklist-view.js.map +0 -1
  35. package/dist-client/pages/project/popup/popup-plan-export.d.ts +0 -10
  36. package/dist-client/pages/project/popup/popup-plan-export.js +0 -242
  37. package/dist-client/pages/project/popup/popup-plan-export.js.map +0 -1
  38. package/dist-client/pages/project/popup/popup-plan-upload.d.ts +0 -13
  39. package/dist-client/pages/project/popup/popup-plan-upload.js +0 -265
  40. package/dist-client/pages/project/popup/popup-plan-upload.js.map +0 -1
  41. package/dist-client/pages/project/popup/popup-project-create.d.ts +0 -12
  42. package/dist-client/pages/project/popup/popup-project-create.js +0 -152
  43. package/dist-client/pages/project/popup/popup-project-create.js.map +0 -1
  44. package/dist-client/pages/project/popup/popup-task-upload.d.ts +0 -9
  45. package/dist-client/pages/project/popup/popup-task-upload.js +0 -105
  46. package/dist-client/pages/project/popup/popup-task-upload.js.map +0 -1
  47. package/dist-client/pages/project/project-completed-list.d.ts +0 -23
  48. package/dist-client/pages/project/project-completed-list.js +0 -322
  49. package/dist-client/pages/project/project-completed-list.js.map +0 -1
  50. package/dist-client/pages/project/project-detail.d.ts +0 -41
  51. package/dist-client/pages/project/project-detail.js +0 -959
  52. package/dist-client/pages/project/project-detail.js.map +0 -1
  53. package/dist-client/pages/project/project-list.d.ts +0 -185
  54. package/dist-client/pages/project/project-list.js +0 -402
  55. package/dist-client/pages/project/project-list.js.map +0 -1
  56. package/dist-client/pages/project/project-plan-management.d.ts +0 -33
  57. package/dist-client/pages/project/project-plan-management.js +0 -487
  58. package/dist-client/pages/project/project-plan-management.js.map +0 -1
  59. package/dist-client/pages/project/project-setting-list.d.ts +0 -29
  60. package/dist-client/pages/project/project-setting-list.js +0 -431
  61. package/dist-client/pages/project/project-setting-list.js.map +0 -1
  62. package/dist-client/pages/project/project-task-list.d.ts +0 -18
  63. package/dist-client/pages/project/project-task-list.js +0 -306
  64. package/dist-client/pages/project/project-task-list.js.map +0 -1
  65. package/dist-client/pages/project/project-task.d.ts +0 -51
  66. package/dist-client/pages/project/project-task.js +0 -686
  67. package/dist-client/pages/project/project-task.js.map +0 -1
  68. package/dist-client/pages/project/project-update.d.ts +0 -47
  69. package/dist-client/pages/project/project-update.js +0 -1197
  70. package/dist-client/pages/project/project-update.js.map +0 -1
  71. package/dist-client/pages/resource/construction-detail-type-popup.d.ts +0 -2
  72. package/dist-client/pages/resource/construction-detail-type-popup.js +0 -197
  73. package/dist-client/pages/resource/construction-detail-type-popup.js.map +0 -1
  74. package/dist-client/pages/resource/construction-type-management.d.ts +0 -34
  75. package/dist-client/pages/resource/construction-type-management.js +0 -200
  76. package/dist-client/pages/resource/construction-type-management.js.map +0 -1
  77. package/dist-client/pages/resource/inspection-drawing-type-management.d.ts +0 -48
  78. package/dist-client/pages/resource/inspection-drawing-type-management.js +0 -234
  79. package/dist-client/pages/resource/inspection-drawing-type-management.js.map +0 -1
  80. package/dist-client/pages/resource/inspection-part-popup.d.ts +0 -2
  81. package/dist-client/pages/resource/inspection-part-popup.js +0 -197
  82. package/dist-client/pages/resource/inspection-part-popup.js.map +0 -1
  83. package/dist-client/pages/resource/resource-importer.d.ts +0 -10
  84. package/dist-client/pages/resource/resource-importer.js +0 -101
  85. package/dist-client/pages/resource/resource-importer.js.map +0 -1
  86. package/dist-client/pages/resource/resource-list-page.d.ts +0 -63
  87. package/dist-client/pages/resource/resource-list-page.js +0 -332
  88. package/dist-client/pages/resource/resource-list-page.js.map +0 -1
  89. package/dist-client/pages/resource/worker-type-management.d.ts +0 -34
  90. package/dist-client/pages/resource/worker-type-management.js +0 -180
  91. package/dist-client/pages/resource/worker-type-management.js.map +0 -1
  92. package/dist-client/pages/task/task-importer.d.ts +0 -10
  93. package/dist-client/pages/task/task-importer.js +0 -101
  94. package/dist-client/pages/task/task-importer.js.map +0 -1
  95. package/dist-client/pages/task/task-list-page.d.ts +0 -63
  96. package/dist-client/pages/task/task-list-page.js +0 -323
  97. package/dist-client/pages/task/task-list-page.js.map +0 -1
  98. package/dist-client/pages/task-resource/task-resource-importer.d.ts +0 -10
  99. package/dist-client/pages/task-resource/task-resource-importer.js +0 -101
  100. package/dist-client/pages/task-resource/task-resource-importer.js.map +0 -1
  101. package/dist-client/pages/task-resource/task-resource-list-page.d.ts +0 -63
  102. package/dist-client/pages/task-resource/task-resource-list-page.js +0 -332
  103. package/dist-client/pages/task-resource/task-resource-list-page.js.map +0 -1
  104. package/dist-client/route.d.ts +0 -1
  105. package/dist-client/route.js +0 -44
  106. package/dist-client/route.js.map +0 -1
  107. package/dist-client/tsconfig.tsbuildinfo +0 -1
  108. package/dist-server/controllers/export-tasks.d.ts +0 -7
  109. package/dist-server/controllers/export-tasks.js +0 -29
  110. package/dist-server/controllers/export-tasks.js.map +0 -1
  111. package/dist-server/controllers/import-task.d.ts +0 -3
  112. package/dist-server/controllers/import-task.js +0 -113
  113. package/dist-server/controllers/import-task.js.map +0 -1
  114. package/dist-server/controllers/index.d.ts +0 -0
  115. package/dist-server/controllers/index.js +0 -1
  116. package/dist-server/controllers/index.js.map +0 -1
  117. package/dist-server/controllers/parse-excel.d.ts +0 -2
  118. package/dist-server/controllers/parse-excel.js +0 -74
  119. package/dist-server/controllers/parse-excel.js.map +0 -1
  120. package/dist-server/controllers/types.d.ts +0 -18
  121. package/dist-server/controllers/types.js +0 -3
  122. package/dist-server/controllers/types.js.map +0 -1
  123. package/dist-server/index.d.ts +0 -3
  124. package/dist-server/index.js +0 -7
  125. package/dist-server/index.js.map +0 -1
  126. package/dist-server/middlewares/index.d.ts +0 -1
  127. package/dist-server/middlewares/index.js +0 -7
  128. package/dist-server/middlewares/index.js.map +0 -1
  129. package/dist-server/migrations/1723861466413-seed-roles.d.ts +0 -5
  130. package/dist-server/migrations/1723861466413-seed-roles.js +0 -117
  131. package/dist-server/migrations/1723861466413-seed-roles.js.map +0 -1
  132. package/dist-server/migrations/1723861466414-seed-codes.d.ts +0 -5
  133. package/dist-server/migrations/1723861466414-seed-codes.js +0 -150
  134. package/dist-server/migrations/1723861466414-seed-codes.js.map +0 -1
  135. package/dist-server/migrations/1723861476419-seed-resources.d.ts +0 -5
  136. package/dist-server/migrations/1723861476419-seed-resources.js +0 -57
  137. package/dist-server/migrations/1723861476419-seed-resources.js.map +0 -1
  138. package/dist-server/migrations/1723861478420-seed-/bsample-project.d.ts +0 -5
  139. package/dist-server/migrations/1723861478420-seed-/bsample-project.js +0 -68
  140. package/dist-server/migrations/1723861478420-seed-/bsample-project.js.map +0 -1
  141. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.d.ts +0 -5
  142. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.js +0 -189
  143. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.js.map +0 -1
  144. package/dist-server/migrations/index.d.ts +0 -1
  145. package/dist-server/migrations/index.js +0 -12
  146. package/dist-server/migrations/index.js.map +0 -1
  147. package/dist-server/routes.d.ts +0 -1
  148. package/dist-server/routes.js +0 -105
  149. package/dist-server/routes.js.map +0 -1
  150. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.d.ts +0 -6
  151. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.js +0 -56
  152. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.js.map +0 -1
  153. package/dist-server/service/construction-detail-type/construction-detail-type-query.d.ts +0 -9
  154. package/dist-server/service/construction-detail-type/construction-detail-type-query.js +0 -53
  155. package/dist-server/service/construction-detail-type/construction-detail-type-query.js.map +0 -1
  156. package/dist-server/service/construction-detail-type/construction-detail-type-type.d.ts +0 -11
  157. package/dist-server/service/construction-detail-type/construction-detail-type-type.js +0 -43
  158. package/dist-server/service/construction-detail-type/construction-detail-type-type.js.map +0 -1
  159. package/dist-server/service/construction-detail-type/construction-detail-type.d.ts +0 -15
  160. package/dist-server/service/construction-detail-type/construction-detail-type.js +0 -69
  161. package/dist-server/service/construction-detail-type/construction-detail-type.js.map +0 -1
  162. package/dist-server/service/construction-detail-type/index.d.ts +0 -5
  163. package/dist-server/service/construction-detail-type/index.js +0 -9
  164. package/dist-server/service/construction-detail-type/index.js.map +0 -1
  165. package/dist-server/service/construction-type/construction-type-mutation.d.ts +0 -6
  166. package/dist-server/service/construction-type/construction-type-mutation.js +0 -64
  167. package/dist-server/service/construction-type/construction-type-mutation.js.map +0 -1
  168. package/dist-server/service/construction-type/construction-type-query.d.ts +0 -13
  169. package/dist-server/service/construction-type/construction-type-query.js +0 -92
  170. package/dist-server/service/construction-type/construction-type-query.js.map +0 -1
  171. package/dist-server/service/construction-type/construction-type-type.d.ts +0 -11
  172. package/dist-server/service/construction-type/construction-type-type.js +0 -43
  173. package/dist-server/service/construction-type/construction-type-type.js.map +0 -1
  174. package/dist-server/service/construction-type/construction-type.d.ts +0 -18
  175. package/dist-server/service/construction-type/construction-type.js +0 -83
  176. package/dist-server/service/construction-type/construction-type.js.map +0 -1
  177. package/dist-server/service/construction-type/index.d.ts +0 -5
  178. package/dist-server/service/construction-type/index.js +0 -9
  179. package/dist-server/service/construction-type/index.js.map +0 -1
  180. package/dist-server/service/index.d.ts +0 -15
  181. package/dist-server/service/index.js +0 -59
  182. package/dist-server/service/index.js.map +0 -1
  183. package/dist-server/service/inspection-drawing-type/index.d.ts +0 -5
  184. package/dist-server/service/inspection-drawing-type/index.js +0 -9
  185. package/dist-server/service/inspection-drawing-type/index.js.map +0 -1
  186. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.d.ts +0 -6
  187. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.js +0 -64
  188. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.js.map +0 -1
  189. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.d.ts +0 -12
  190. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js +0 -83
  191. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js.map +0 -1
  192. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.d.ts +0 -10
  193. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.js +0 -39
  194. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.js.map +0 -1
  195. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.d.ts +0 -16
  196. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.js +0 -72
  197. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.js.map +0 -1
  198. package/dist-server/service/inspection-part/index.d.ts +0 -5
  199. package/dist-server/service/inspection-part/index.js +0 -9
  200. package/dist-server/service/inspection-part/index.js.map +0 -1
  201. package/dist-server/service/inspection-part/inspection-part-mutation.d.ts +0 -6
  202. package/dist-server/service/inspection-part/inspection-part-mutation.js +0 -55
  203. package/dist-server/service/inspection-part/inspection-part-mutation.js.map +0 -1
  204. package/dist-server/service/inspection-part/inspection-part-query.d.ts +0 -10
  205. package/dist-server/service/inspection-part/inspection-part-query.js +0 -66
  206. package/dist-server/service/inspection-part/inspection-part-query.js.map +0 -1
  207. package/dist-server/service/inspection-part/inspection-part-type.d.ts +0 -11
  208. package/dist-server/service/inspection-part/inspection-part-type.js +0 -43
  209. package/dist-server/service/inspection-part/inspection-part-type.js.map +0 -1
  210. package/dist-server/service/inspection-part/inspection-part.d.ts +0 -15
  211. package/dist-server/service/inspection-part/inspection-part.js +0 -69
  212. package/dist-server/service/inspection-part/inspection-part.js.map +0 -1
  213. package/dist-server/service/manager/index.d.ts +0 -7
  214. package/dist-server/service/manager/index.js +0 -11
  215. package/dist-server/service/manager/index.js.map +0 -1
  216. package/dist-server/service/manager/manager-mutation.d.ts +0 -5
  217. package/dist-server/service/manager/manager-mutation.js +0 -39
  218. package/dist-server/service/manager/manager-mutation.js.map +0 -1
  219. package/dist-server/service/manager/manager-query.d.ts +0 -4
  220. package/dist-server/service/manager/manager-query.js +0 -39
  221. package/dist-server/service/manager/manager-query.js.map +0 -1
  222. package/dist-server/service/manager/manager-type.d.ts +0 -15
  223. package/dist-server/service/manager/manager-type.js +0 -62
  224. package/dist-server/service/manager/manager-type.js.map +0 -1
  225. package/dist-server/service/manager/manager.d.ts +0 -8
  226. package/dist-server/service/manager/manager.js +0 -41
  227. package/dist-server/service/manager/manager.js.map +0 -1
  228. package/dist-server/service/project/index.d.ts +0 -5
  229. package/dist-server/service/project/index.js +0 -9
  230. package/dist-server/service/project/index.js.map +0 -1
  231. package/dist-server/service/project/project-mutation.d.ts +0 -12
  232. package/dist-server/service/project/project-mutation.js +0 -339
  233. package/dist-server/service/project/project-mutation.js.map +0 -1
  234. package/dist-server/service/project/project-query.d.ts +0 -23
  235. package/dist-server/service/project/project-query.js +0 -215
  236. package/dist-server/service/project/project-query.js.map +0 -1
  237. package/dist-server/service/project/project-type.d.ts +0 -36
  238. package/dist-server/service/project/project-type.js +0 -128
  239. package/dist-server/service/project/project-type.js.map +0 -1
  240. package/dist-server/service/project/project.d.ts +0 -52
  241. package/dist-server/service/project/project.js +0 -190
  242. package/dist-server/service/project/project.js.map +0 -1
  243. package/dist-server/service/resource/index.d.ts +0 -6
  244. package/dist-server/service/resource/index.js +0 -10
  245. package/dist-server/service/resource/index.js.map +0 -1
  246. package/dist-server/service/resource/resource-mutation.d.ts +0 -10
  247. package/dist-server/service/resource/resource-mutation.js +0 -132
  248. package/dist-server/service/resource/resource-mutation.js.map +0 -1
  249. package/dist-server/service/resource/resource-query.d.ts +0 -11
  250. package/dist-server/service/resource/resource-query.js +0 -81
  251. package/dist-server/service/resource/resource-query.js.map +0 -1
  252. package/dist-server/service/resource/resource-type.d.ts +0 -17
  253. package/dist-server/service/resource/resource-type.js +0 -65
  254. package/dist-server/service/resource/resource-type.js.map +0 -1
  255. package/dist-server/service/resource/resource.d.ts +0 -24
  256. package/dist-server/service/resource/resource.js +0 -93
  257. package/dist-server/service/resource/resource.js.map +0 -1
  258. package/dist-server/service/task/index.d.ts +0 -5
  259. package/dist-server/service/task/index.js +0 -9
  260. package/dist-server/service/task/index.js.map +0 -1
  261. package/dist-server/service/task/task-mutation.d.ts +0 -10
  262. package/dist-server/service/task/task-mutation.js +0 -135
  263. package/dist-server/service/task/task-mutation.js.map +0 -1
  264. package/dist-server/service/task/task-query.d.ts +0 -21
  265. package/dist-server/service/task/task-query.js +0 -219
  266. package/dist-server/service/task/task-query.js.map +0 -1
  267. package/dist-server/service/task/task-type.d.ts +0 -31
  268. package/dist-server/service/task/task-type.js +0 -114
  269. package/dist-server/service/task/task-type.js.map +0 -1
  270. package/dist-server/service/task/task.d.ts +0 -35
  271. package/dist-server/service/task/task.js +0 -151
  272. package/dist-server/service/task/task.js.map +0 -1
  273. package/dist-server/service/task-checklist-binding/index.d.ts +0 -5
  274. package/dist-server/service/task-checklist-binding/index.js +0 -9
  275. package/dist-server/service/task-checklist-binding/index.js.map +0 -1
  276. package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.d.ts +0 -5
  277. package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.js +0 -186
  278. package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.js.map +0 -1
  279. package/dist-server/service/task-checklist-binding/task-checklist-binding-query.d.ts +0 -8
  280. package/dist-server/service/task-checklist-binding/task-checklist-binding-query.js +0 -61
  281. package/dist-server/service/task-checklist-binding/task-checklist-binding-query.js.map +0 -1
  282. package/dist-server/service/task-checklist-binding/task-checklist-binding-type.d.ts +0 -15
  283. package/dist-server/service/task-checklist-binding/task-checklist-binding-type.js +0 -57
  284. package/dist-server/service/task-checklist-binding/task-checklist-binding-type.js.map +0 -1
  285. package/dist-server/service/task-checklist-binding/task-checklist-binding.d.ts +0 -22
  286. package/dist-server/service/task-checklist-binding/task-checklist-binding.js +0 -106
  287. package/dist-server/service/task-checklist-binding/task-checklist-binding.js.map +0 -1
  288. package/dist-server/service/task-resource/index.d.ts +0 -6
  289. package/dist-server/service/task-resource/index.js +0 -10
  290. package/dist-server/service/task-resource/index.js.map +0 -1
  291. package/dist-server/service/task-resource/task-resource-mutation.d.ts +0 -10
  292. package/dist-server/service/task-resource/task-resource-mutation.js +0 -132
  293. package/dist-server/service/task-resource/task-resource-mutation.js.map +0 -1
  294. package/dist-server/service/task-resource/task-resource-query.d.ts +0 -7
  295. package/dist-server/service/task-resource/task-resource-query.js +0 -50
  296. package/dist-server/service/task-resource/task-resource-query.js.map +0 -1
  297. package/dist-server/service/task-resource/task-resource-type.d.ts +0 -17
  298. package/dist-server/service/task-resource/task-resource-type.js +0 -65
  299. package/dist-server/service/task-resource/task-resource-type.js.map +0 -1
  300. package/dist-server/service/task-resource/task-resource.d.ts +0 -13
  301. package/dist-server/service/task-resource/task-resource.js +0 -59
  302. package/dist-server/service/task-resource/task-resource.js.map +0 -1
  303. package/dist-server/service/worker-type/index.d.ts +0 -5
  304. package/dist-server/service/worker-type/index.js +0 -9
  305. package/dist-server/service/worker-type/index.js.map +0 -1
  306. package/dist-server/service/worker-type/worker-type-mutation.d.ts +0 -6
  307. package/dist-server/service/worker-type/worker-type-mutation.js +0 -64
  308. package/dist-server/service/worker-type/worker-type-mutation.js.map +0 -1
  309. package/dist-server/service/worker-type/worker-type-query.d.ts +0 -11
  310. package/dist-server/service/worker-type/worker-type-query.js +0 -78
  311. package/dist-server/service/worker-type/worker-type-query.js.map +0 -1
  312. package/dist-server/service/worker-type/worker-type-type.d.ts +0 -11
  313. package/dist-server/service/worker-type/worker-type-type.js +0 -43
  314. package/dist-server/service/worker-type/worker-type-type.js.map +0 -1
  315. package/dist-server/service/worker-type/worker-type.d.ts +0 -16
  316. package/dist-server/service/worker-type/worker-type.js +0 -77
  317. package/dist-server/service/worker-type/worker-type.js.map +0 -1
  318. package/dist-server/tsconfig.tsbuildinfo +0 -1
@@ -1,219 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaskQuery = exports.DigestedResource = 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 auth_base_1 = require("@things-factory/auth-base");
8
- const task_1 = require("./task");
9
- const task_type_1 = require("./task-type");
10
- const task_resource_1 = require("../task-resource/task-resource");
11
- const task_checklist_binding_1 = require("../task-checklist-binding/task-checklist-binding");
12
- let DigestedResource = class DigestedResource {
13
- };
14
- exports.DigestedResource = DigestedResource;
15
- tslib_1.__decorate([
16
- (0, type_graphql_1.Field)({ nullable: true, description: '자원 유형' }),
17
- tslib_1.__metadata("design:type", String)
18
- ], DigestedResource.prototype, "type", void 0);
19
- tslib_1.__decorate([
20
- (0, type_graphql_1.Field)({ nullable: true, description: '할당량' }),
21
- tslib_1.__metadata("design:type", Number)
22
- ], DigestedResource.prototype, "allocated", void 0);
23
- exports.DigestedResource = DigestedResource = tslib_1.__decorate([
24
- (0, type_graphql_1.ObjectType)()
25
- ], DigestedResource);
26
- let TaskQuery = class TaskQuery {
27
- async task(id, context) {
28
- return await (0, shell_1.getRepository)(task_1.Task).findOne({
29
- where: { id },
30
- relations: ['parent', 'taskResources']
31
- });
32
- }
33
- async tasks(params, context) {
34
- const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
35
- params,
36
- repository: await (0, shell_1.getRepository)(task_1.Task),
37
- alias: 'tasks',
38
- searchables: ['name', 'code']
39
- });
40
- const [items, total] = await queryBuilder.getManyAndCount();
41
- return { items, total };
42
- }
43
- // @FieldResolver(type => Date, { nullable: true, description: 'Calculate or return the start date of the task' })
44
- // async startDate(@Root() task: Task): Promise<Date | undefined> {
45
- // if (task.type === TaskType.TASK) {
46
- // return task.startDate
47
- // } else {
48
- // const children = await getRepository(Task).find({ where: { parent: { id: task.id } } })
49
- // return children.reduce(
50
- // (earliest, child) => {
51
- // if (!earliest || (child.startDate && child.startDate < earliest)) {
52
- // return child.startDate
53
- // }
54
- // return earliest
55
- // },
56
- // undefined as Date | undefined
57
- // )
58
- // }
59
- // }
60
- // @FieldResolver(type => Date, { nullable: true, description: 'Calculate or return the end date of the task' })
61
- // async endDate(@Root() task: Task): Promise<Date | undefined> {
62
- // if (task.type === TaskType.TASK) {
63
- // return task.endDate
64
- // } else {
65
- // const children = await getRepository(Task).find({ where: { parent: { id: task.id } } })
66
- // return children.reduce(
67
- // (latest, child) => {
68
- // if (!latest || (child.endDate && child.endDate > latest)) {
69
- // return child.endDate
70
- // }
71
- // return latest
72
- // },
73
- // undefined as Date | undefined
74
- // )
75
- // }
76
- // }
77
- // @FieldResolver(type => Number, { nullable: true, description: 'Calculate the duration of the task in days' })
78
- // async duration(@Root() task: Task): Promise<number | undefined> {
79
- // if (task.type === TaskType.TASK) {
80
- // return task.duration
81
- // } else {
82
- // const startDate = await this.startDate(task)
83
- // const endDate = await this.endDate(task)
84
- // if (startDate && endDate) {
85
- // const durationInMs = endDate.getTime() - startDate.getTime()
86
- // const durationInDays = Math.ceil(durationInMs / (1000 * 60 * 60 * 24))
87
- // return durationInDays
88
- // }
89
- // return
90
- // }
91
- // }
92
- async length(task) {
93
- // if (task.type === TaskType.TASK) {
94
- return `${task.duration || 1}d`;
95
- // } else {
96
- // const startDate = await this.startDate(task)
97
- // const endDate = await this.endDate(task)
98
- // if (startDate && endDate) {
99
- // const durationInMs = endDate.getTime() - startDate.getTime()
100
- // const durationInDays = Math.ceil(durationInMs / (1000 * 60 * 60 * 24))
101
- // return `${durationInDays || 1}d`
102
- // }
103
- // return
104
- // }
105
- }
106
- async children(task, params, context) {
107
- const { domain } = context.state;
108
- const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
109
- params,
110
- alias: 'tasks',
111
- repository: await (0, shell_1.getRepository)(task_1.Task),
112
- searchables: ['name', 'code']
113
- }).andWhere({ parent: { id: task.id } });
114
- const [items, total] = await queryBuilder.getManyAndCount();
115
- return items;
116
- }
117
- async taskResources(task) {
118
- return (task === null || task === void 0 ? void 0 : task.id) && (await (0, shell_1.getRepository)(task_resource_1.TaskResource).find({ where: { task: { id: task.id } } }));
119
- }
120
- async resources(task) {
121
- const taskResources = (task === null || task === void 0 ? void 0 : task.id) &&
122
- (await (0, shell_1.getRepository)(task_resource_1.TaskResource).find({
123
- where: {
124
- task: { id: task.id }
125
- },
126
- relations: ['resource']
127
- }));
128
- return (taskResources || []).map(taskResource => {
129
- return {
130
- type: taskResource.resource.name,
131
- allocated: taskResource.quantity
132
- };
133
- });
134
- }
135
- async taskChecklistBinding(task) {
136
- return await (0, shell_1.getRepository)(task_checklist_binding_1.TaskChecklistBinding).findOneBy({ taskCode: task.code, project: { id: task.projectId } });
137
- }
138
- async updater(task) {
139
- return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: task.updaterId });
140
- }
141
- async creator(task) {
142
- return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: task.creatorId });
143
- }
144
- };
145
- exports.TaskQuery = TaskQuery;
146
- tslib_1.__decorate([
147
- (0, type_graphql_1.Directive)('@privilege(category: "project", privilege: "query", domainOwnerGranted: true)'),
148
- (0, type_graphql_1.Query)(returns => task_1.Task, { nullable: true, description: 'Fetch a single Task by its ID' }),
149
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
150
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
151
- tslib_1.__metadata("design:type", Function),
152
- tslib_1.__metadata("design:paramtypes", [String, Object]),
153
- tslib_1.__metadata("design:returntype", Promise)
154
- ], TaskQuery.prototype, "task", null);
155
- tslib_1.__decorate([
156
- (0, type_graphql_1.Directive)('@privilege(category: "project", privilege: "query", domainOwnerGranted: true)'),
157
- (0, type_graphql_1.Query)(returns => task_type_1.TaskList, { description: 'Fetch multiple Tasks based on list parameters' }),
158
- tslib_1.__param(0, (0, type_graphql_1.Args)()),
159
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
160
- tslib_1.__metadata("design:type", Function),
161
- tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
162
- tslib_1.__metadata("design:returntype", Promise)
163
- ], TaskQuery.prototype, "tasks", null);
164
- tslib_1.__decorate([
165
- (0, type_graphql_1.FieldResolver)(type => String, { nullable: true, description: 'Calculate the duration of the task in days' }),
166
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
167
- tslib_1.__metadata("design:type", Function),
168
- tslib_1.__metadata("design:paramtypes", [task_1.Task]),
169
- tslib_1.__metadata("design:returntype", Promise)
170
- ], TaskQuery.prototype, "length", null);
171
- tslib_1.__decorate([
172
- (0, type_graphql_1.FieldResolver)(type => [task_1.Task]),
173
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
174
- tslib_1.__param(1, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
175
- tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
176
- tslib_1.__metadata("design:type", Function),
177
- tslib_1.__metadata("design:paramtypes", [task_1.Task,
178
- shell_1.ListParam, Object]),
179
- tslib_1.__metadata("design:returntype", Promise)
180
- ], TaskQuery.prototype, "children", null);
181
- tslib_1.__decorate([
182
- (0, type_graphql_1.FieldResolver)(type => [task_resource_1.TaskResource], { description: 'Return the list of resources allocated to the task' }),
183
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
184
- tslib_1.__metadata("design:type", Function),
185
- tslib_1.__metadata("design:paramtypes", [task_1.Task]),
186
- tslib_1.__metadata("design:returntype", Promise)
187
- ], TaskQuery.prototype, "taskResources", null);
188
- tslib_1.__decorate([
189
- (0, type_graphql_1.FieldResolver)(type => [DigestedResource], { description: 'Return the simple list of resources allocated to the task' }),
190
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
191
- tslib_1.__metadata("design:type", Function),
192
- tslib_1.__metadata("design:paramtypes", [task_1.Task]),
193
- tslib_1.__metadata("design:returntype", Promise)
194
- ], TaskQuery.prototype, "resources", null);
195
- tslib_1.__decorate([
196
- (0, type_graphql_1.FieldResolver)(type => task_checklist_binding_1.TaskChecklistBinding, { description: 'Fetch the task checklist binding' }),
197
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
198
- tslib_1.__metadata("design:type", Function),
199
- tslib_1.__metadata("design:paramtypes", [task_1.Task]),
200
- tslib_1.__metadata("design:returntype", Promise)
201
- ], TaskQuery.prototype, "taskChecklistBinding", null);
202
- tslib_1.__decorate([
203
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { description: 'Fetch the user who last updated the task' }),
204
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
205
- tslib_1.__metadata("design:type", Function),
206
- tslib_1.__metadata("design:paramtypes", [task_1.Task]),
207
- tslib_1.__metadata("design:returntype", Promise)
208
- ], TaskQuery.prototype, "updater", null);
209
- tslib_1.__decorate([
210
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { description: 'Fetch the user who created the task' }),
211
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
212
- tslib_1.__metadata("design:type", Function),
213
- tslib_1.__metadata("design:paramtypes", [task_1.Task]),
214
- tslib_1.__metadata("design:returntype", Promise)
215
- ], TaskQuery.prototype, "creator", null);
216
- exports.TaskQuery = TaskQuery = tslib_1.__decorate([
217
- (0, type_graphql_1.Resolver)(task_1.Task)
218
- ], TaskQuery);
219
- //# sourceMappingURL=task-query.js.map
@@ -1 +0,0 @@
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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;IACvG,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAO,WAAI;;0CAgBjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,6CAAoB,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IACrE,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAO,WAAI;;qDAE5C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;IAC1E,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAO,WAAI;;wCAE/B;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;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"]}
@@ -1,31 +0,0 @@
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
- }
@@ -1,114 +0,0 @@
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
@@ -1 +0,0 @@
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,EA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,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;sCACjF,mBAAmB;0CAAA;AAG7B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;sCAC3F,gBAAgB;yCAAA;AAGzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;;8CACxC;AAGpB;IADC,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"]}
@@ -1,35 +0,0 @@
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
- }
@@ -1,151 +0,0 @@
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
- //# s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AAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC;IACzH,IAAA,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"]}
@@ -1,5 +0,0 @@
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)[];
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
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"]}
@@ -1,5 +0,0 @@
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
- }