@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 +0,0 @@
1
- {"version":3,"file":"1723861466414-seed-codes.js","sourceRoot":"","sources":["../../server/migrations/1723861466414-seed-codes.ts"],"names":[],"mappings":";;;AAE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AAC;CACF;AAxDD,wDAwDC","sourcesContent":["import { MigrationInterface, QueryRunner } from 'typeorm'\n\nimport { logger } from '@things-factory/env'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { CommonCode, CommonCodeDetail } from '@things-factory/code-base'\n\nconst SEED_COMMON_CODES = [\n {\n name: 'EMPLOYEE_TYPE',\n description: '직원 유형',\n details: [\n {\n name: 'FULLTIME',\n description: '풀타임 정규직',\n labels: null,\n rank: 1\n },\n {\n name: 'PARTTIME',\n description: '파트타임 정규직',\n labels: null,\n rank: 2\n },\n {\n name: 'TEMPORARY',\n description: '임시직',\n labels: null,\n rank: 3\n }\n ]\n },\n {\n name: 'JOB_POSITION',\n description: '직급',\n details: [\n {\n name: '임원',\n description: '임원',\n labels: null,\n rank: 1\n },\n {\n name: '직원',\n description: '직원',\n labels: null,\n rank: 2\n }\n ]\n },\n {\n name: 'JOB_RESPONSIBILITY',\n description: '직책',\n details: [\n {\n name: 'ADMIN',\n description: '관리자',\n labels: null,\n rank: 1\n },\n {\n name: 'OVERALL_SUPERVISORY',\n description: '총괄 감리 책임자',\n labels: null,\n rank: 2\n },\n {\n name: 'TASK_SUPERVISORY',\n description: '공종별 감리 책임자',\n labels: null,\n rank: 3\n },\n {\n name: 'OVERALL_CONSTRUCTOR',\n description: '총괄 시공 책임자',\n labels: null,\n rank: 4\n },\n {\n name: 'TASK_CONSTRUCTOR',\n description: '공종별 시공 관리자',\n labels: null,\n rank: 5\n },\n {\n name: 'DESIGNER',\n description: '설계사',\n labels: null,\n rank: 6\n },\n {\n name: 'CONSTRUCTOR',\n description: '시공자',\n labels: null,\n rank: 7\n }\n ]\n }\n]\n\nexport class SeedCodes1723861466414 implements MigrationInterface {\n public async up(queryRunner: QueryRunner): Promise<void> {\n const commonCodeRepository = getRepository(CommonCode)\n const commonCodeDetailRepository = getRepository(CommonCodeDetail)\n const domainRepository = getRepository(Domain)\n const userRepository = getRepository(User)\n\n const domain: Domain = await domainRepository.findOne({\n where: { name: 'SYSTEM' }\n })\n const user = await userRepository.findOne({ where: { id: domain.owner } })\n\n try {\n for (let i = 0; i < SEED_COMMON_CODES.length; i++) {\n const { name, description, details } = SEED_COMMON_CODES[i]\n\n const commonCode = await commonCodeRepository.save({\n domain,\n name,\n description,\n creator: user,\n updater: user\n })\n\n for (const commonCodeDetail of details) {\n const { name, description, labels, rank } = commonCodeDetail\n\n await commonCodeDetailRepository.save({\n domain,\n commonCode,\n name,\n description,\n labels,\n rank\n })\n }\n }\n } catch (e) {\n logger.error(e)\n }\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n const domainRepository = getRepository(Domain)\n\n const domain: Domain = await domainRepository.findOne({\n where: { name: 'SYSTEM' }\n })\n\n const repository = getRepository(CommonCode)\n\n SEED_COMMON_CODES.reverse().forEach(async commonCode => {\n let record = await repository.findOne({ where: { name: commonCode.name, domain: { id: domain.id } } })\n record && (await repository.remove(record))\n })\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- import { MigrationInterface, QueryRunner } from 'typeorm';
2
- export declare class SeedResources1723861476419 implements MigrationInterface {
3
- up(queryRunner: QueryRunner): Promise<void>;
4
- down(queryRunner: QueryRunner): Promise<void>;
5
- }
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SeedResources1723861476419 = void 0;
4
- const env_1 = require("@things-factory/env");
5
- const shell_1 = require("@things-factory/shell");
6
- const auth_base_1 = require("@things-factory/auth-base");
7
- const resource_1 = require("../service/resource/resource");
8
- const SEED_RESOURCES = [
9
- { name: '철근/형틀공', type: resource_1.ResourceType.HUMAN, unit: 'man/day' },
10
- { name: '방수공', type: resource_1.ResourceType.HUMAN, unit: 'man/day' },
11
- { name: '목공', type: resource_1.ResourceType.HUMAN, unit: 'man/day' },
12
- { name: '금속공', type: resource_1.ResourceType.HUMAN, unit: 'man/day' },
13
- { name: '타일공', type: resource_1.ResourceType.HUMAN, unit: 'man/day' },
14
- { name: '창호공', type: resource_1.ResourceType.HUMAN, unit: 'man/day' },
15
- { name: '도배공', type: resource_1.ResourceType.HUMAN, unit: 'man/day' },
16
- { name: '조적공', type: resource_1.ResourceType.HUMAN, unit: 'man/day' }
17
- ];
18
- class SeedResources1723861476419 {
19
- async up(queryRunner) {
20
- const resourceRepository = (0, shell_1.getRepository)(resource_1.Resource);
21
- const domainRepository = (0, shell_1.getRepository)(shell_1.Domain);
22
- const userRepository = (0, shell_1.getRepository)(auth_base_1.User);
23
- const domain = await domainRepository.findOne({
24
- where: { name: 'SYSTEM' }
25
- });
26
- const user = await userRepository.findOne({ where: { id: domain.owner } });
27
- try {
28
- for (let i = 0; i < SEED_RESOURCES.length; i++) {
29
- const { name, type, unit } = SEED_RESOURCES[i];
30
- const resource = await resourceRepository.save({
31
- domain,
32
- name,
33
- type,
34
- unit,
35
- creator: user,
36
- updater: user
37
- });
38
- }
39
- }
40
- catch (e) {
41
- env_1.logger.error(e);
42
- }
43
- }
44
- async down(queryRunner) {
45
- const domainRepository = (0, shell_1.getRepository)(shell_1.Domain);
46
- const domain = await domainRepository.findOne({
47
- where: { name: 'SYSTEM' }
48
- });
49
- const repository = (0, shell_1.getRepository)(resource_1.Resource);
50
- SEED_RESOURCES.reverse().forEach(async (resource) => {
51
- let record = await repository.findOne({ where: { name: resource.name, domain: { id: domain.id } } });
52
- record && (await repository.remove(record));
53
- });
54
- }
55
- }
56
- exports.SeedResources1723861476419 = SeedResources1723861476419;
57
- //# sourceMappingURL=1723861476419-seed-resources.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"1723861476419-seed-resources.js","sourceRoot":"","sources":["../../server/migrations/1723861476419-seed-resources.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,iDAA6D;AAC7D,yDAAgD;AAChD,2DAAqE;AAErE,MAAM,cAAc,GAAG;IACrB,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAY,CAAC,KAAK,EAAE,IAAI,EAAE,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ueryRunner } from 'typeorm'\n\nimport { logger } from '@things-factory/env'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ResourceType, Resource } from '../service/resource/resource'\n\nconst SEED_RESOURCES = [\n { name: '철근/형틀공', type: ResourceType.HUMAN, unit: 'man/day' },\n { name: '방수공', type: ResourceType.HUMAN, unit: 'man/day' },\n { name: '목공', type: ResourceType.HUMAN, unit: 'man/day' },\n { name: '금속공', type: ResourceType.HUMAN, unit: 'man/day' },\n { name: '타일공', type: ResourceType.HUMAN, unit: 'man/day' },\n { name: '창호공', type: ResourceType.HUMAN, unit: 'man/day' },\n { name: '도배공', type: ResourceType.HUMAN, unit: 'man/day' },\n { name: '조적공', type: ResourceType.HUMAN, unit: 'man/day' }\n]\n\nexport class SeedResources1723861476419 implements MigrationInterface {\n public async up(queryRunner: QueryRunner): Promise<void> {\n const resourceRepository = getRepository(Resource)\n const domainRepository = getRepository(Domain)\n const userRepository = getRepository(User)\n\n const domain: Domain = await domainRepository.findOne({\n where: { name: 'SYSTEM' }\n })\n const user = await userRepository.findOne({ where: { id: domain.owner } })\n\n try {\n for (let i = 0; i < SEED_RESOURCES.length; i++) {\n const { name, type, unit } = SEED_RESOURCES[i]\n\n const resource = await resourceRepository.save({\n domain,\n name,\n type,\n unit,\n creator: user,\n updater: user\n })\n }\n } catch (e) {\n logger.error(e)\n }\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n const domainRepository = getRepository(Domain)\n\n const domain: Domain = await domainRepository.findOne({\n where: { name: 'SYSTEM' }\n })\n\n const repository = getRepository(Resource)\n\n SEED_RESOURCES.reverse().forEach(async resource => {\n let record = await repository.findOne({ where: { name: resource.name, domain: { id: domain.id } } })\n record && (await repository.remove(record))\n })\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- import { MigrationInterface, QueryRunner } from 'typeorm';
2
- export declare class SeedSampleProject1723861478420 implements MigrationInterface {
3
- up(queryRunner: QueryRunner): Promise<void>;
4
- down(queryRunner: QueryRunner): Promise<void>;
5
- }
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SeedSampleProject1723861478420 = void 0;
4
- const env_1 = require("@things-factory/env");
5
- const shell_1 = require("@things-factory/shell");
6
- const auth_base_1 = require("@things-factory/auth-base");
7
- const building_complex_1 = require("@dssp/building-complex");
8
- const project_1 = require("../service/project/project");
9
- const SEED_SAMPLE_BUILDING_COMPLEX = {
10
- address: '서울시 마포구 공덕동 아파트 17번지',
11
- longitude: 37.548239525193,
12
- latitude: 126.95315808838,
13
- clientCompany: 'A 고객',
14
- constructionCompany: 'B 건설',
15
- supervisoryComapny: 'C 감리',
16
- designCompany: 'D 디자인',
17
- constructionType: '아파트',
18
- etc: '',
19
- householdCount: 500,
20
- buildingCount: 5,
21
- notice: '',
22
- planXScale: 20,
23
- planYScale: 20,
24
- area: 22700
25
- };
26
- const SEED_SAMPLE_PROJECT = {
27
- name: '서울시 마포구 공덕동 아파트 신축공사',
28
- state: project_1.ProjectState.ONGOING,
29
- startDate: '2024-01-01',
30
- endDate: '2025-12-31',
31
- totalProgress: 40,
32
- weeklyProgress: 37
33
- };
34
- class SeedSampleProject1723861478420 {
35
- async up(queryRunner) {
36
- const buildingRepository = (0, shell_1.getRepository)(building_complex_1.BuildingComplex);
37
- const projectRepository = (0, shell_1.getRepository)(project_1.Project);
38
- const domainRepository = (0, shell_1.getRepository)(shell_1.Domain);
39
- const userRepository = (0, shell_1.getRepository)(auth_base_1.User);
40
- const domain = await domainRepository.findOne({
41
- where: { name: 'SYSTEM' }
42
- });
43
- const user = await userRepository.findOne({ where: { id: domain.owner } });
44
- try {
45
- const buildingComplex = await buildingRepository.save(Object.assign(Object.assign({ domain }, SEED_SAMPLE_BUILDING_COMPLEX), { creator: user, updater: user }));
46
- const project = await projectRepository.save(Object.assign(Object.assign({ domain }, SEED_SAMPLE_PROJECT), { buildingComplex, creator: user, updater: user }));
47
- }
48
- catch (e) {
49
- env_1.logger.error(e);
50
- }
51
- }
52
- async down(queryRunner) {
53
- const domainRepository = (0, shell_1.getRepository)(shell_1.Domain);
54
- const domain = await domainRepository.findOne({
55
- where: { name: 'SYSTEM' }
56
- });
57
- const repository = (0, shell_1.getRepository)(project_1.Project);
58
- let project = await repository.findOne({ where: { name: SEED_SAMPLE_PROJECT.name, domain: { id: domain.id } } });
59
- project && (await repository.remove(project));
60
- const buildRepository = (0, shell_1.getRepository)(building_complex_1.BuildingComplex);
61
- let buildingComplex = await buildRepository.findOne({
62
- where: { address: SEED_SAMPLE_BUILDING_COMPLEX.address, domain: { id: domain.id } }
63
- });
64
- buildingComplex && (await buildRepository.remove(buildingComplex));
65
- }
66
- }
67
- exports.SeedSampleProject1723861478420 = SeedSampleProject1723861478420;
68
- //# sourceMappingURL=1723861478420-seed-%08sample-project.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"1723861478420-seed-\bsample-project.js","sourceRoot":"","sources":["../../server/migrations/1723861478420-seed-\bsample-project.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,iDAA6D;AAC7D,yDAAgD;AAChD,6DAAwD;AACxD,wDAAkE;AAElE,MAAM,4BAA4B,GAAG;IACnC,OAAO,EAAE,sBAAsB;IAC/B,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE,eAAe;IACzB,aAAa,EAAE,MAAM;IACrB,mBAAmB,EAAE,MAAM;IAC3B,kBAAkB,EAAE,MAAM;IAC1B,aAAa,EAAE,OAAO;IACtB,gBAAgB,EAAE,KAAK;IACvB,GAAG,EAAE,EAAE;IACP,cAAc,EAAE,GAAG;IACnB,aAAa,EAAE,CAAC;IAChB,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,KAAK;CACZ,CAAA;AAED,MAAM,mBAAmB,GAAG;IAC1B,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,sBAAY,CAAC,OAAO;IAC3B,SA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AAO,CAAC;YACpD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B,CAAC,CAAA;QAEF,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,iBAAO,CAAC,CAAA;QAEzC,IAAI,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QAChH,OAAO,IAAI,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;QAE7C,MAAM,eAAe,GAAG,IAAA,qBAAa,EAAC,kCAAe,CAAC,CAAA;QAEtD,IAAI,eAAe,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC;YAClD,KAAK,EAAE,EAAE,OAAO,EAAE,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE;SACpF,CAAC,CAAA;QACF,eAAe,IAAI,CAAC,MAAM,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAA;IACpE,CAAC;CACF;AAnDD,wEAmDC","sourcesContent":["import { MigrationInterface, QueryRunner } from 'typeorm'\n\nimport { logger } from '@things-factory/env'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { BuildingComplex } from '@dssp/building-complex'\nimport { Project, ProjectState } from '../service/project/project'\n\nconst SEED_SAMPLE_BUILDING_COMPLEX = {\n address: '서울시 마포구 공덕동 아파트 17번지',\n longitude: 37.548239525193,\n latitude: 126.95315808838,\n clientCompany: 'A 고객',\n constructionCompany: 'B 건설',\n supervisoryComapny: 'C 감리',\n designCompany: 'D 디자인',\n constructionType: '아파트',\n etc: '',\n householdCount: 500,\n buildingCount: 5,\n notice: '',\n planXScale: 20,\n planYScale: 20,\n area: 22700\n}\n\nconst SEED_SAMPLE_PROJECT = {\n name: '서울시 마포구 공덕동 아파트 신축공사',\n state: ProjectState.ONGOING,\n startDate: '2024-01-01',\n endDate: '2025-12-31',\n totalProgress: 40,\n weeklyProgress: 37\n}\n\nexport class SeedSampleProject1723861478420 implements MigrationInterface {\n public async up(queryRunner: QueryRunner): Promise<void> {\n const buildingRepository = getRepository(BuildingComplex)\n const projectRepository = getRepository(Project)\n const domainRepository = getRepository(Domain)\n const userRepository = getRepository(User)\n\n const domain: Domain = await domainRepository.findOne({\n where: { name: 'SYSTEM' }\n })\n const user = await userRepository.findOne({ where: { id: domain.owner } })\n\n try {\n const buildingComplex = await buildingRepository.save({\n domain,\n ...SEED_SAMPLE_BUILDING_COMPLEX,\n creator: user,\n updater: user\n })\n\n const project = await projectRepository.save({\n domain,\n ...SEED_SAMPLE_PROJECT,\n buildingComplex,\n creator: user,\n updater: user\n })\n } catch (e) {\n logger.error(e)\n }\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n const domainRepository = getRepository(Domain)\n\n const domain: Domain = await domainRepository.findOne({\n where: { name: 'SYSTEM' }\n })\n\n const repository = getRepository(Project)\n\n let project = await repository.findOne({ where: { name: SEED_SAMPLE_PROJECT.name, domain: { id: domain.id } } })\n project && (await repository.remove(project))\n\n const buildRepository = getRepository(BuildingComplex)\n\n let buildingComplex = await buildRepository.findOne({\n where: { address: SEED_SAMPLE_BUILDING_COMPLEX.address, domain: { id: domain.id } }\n })\n buildingComplex && (await buildRepository.remove(buildingComplex))\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- import { MigrationInterface, QueryRunner } from 'typeorm';
2
- export declare class SeedSampleTasks1723861478421 implements MigrationInterface {
3
- up(queryRunner: QueryRunner): Promise<void>;
4
- down(queryRunner: QueryRunner): Promise<void>;
5
- }
@@ -1,189 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SeedSampleTasks1723861478421 = void 0;
4
- const env_1 = require("@things-factory/env");
5
- const shell_1 = require("@things-factory/shell");
6
- const auth_base_1 = require("@things-factory/auth-base");
7
- const project_1 = require("../service/project/project");
8
- const import_task_1 = require("../controllers/import-task");
9
- const SEED_SAMPLE_PROJECT = {
10
- name: '서울시 마포구 공덕동 아파트 신축공사'
11
- };
12
- const SEED_SAMPLE_TASKS = [
13
- {
14
- code: '골조공사',
15
- title: '골조공사',
16
- progress: 60,
17
- children: [
18
- {
19
- code: '골조공사:기초공사',
20
- title: '기초공사',
21
- startDate: '2024-01-01',
22
- duration: 3,
23
- resources: [{ type: '철근/형틀공', allocated: 6 }]
24
- },
25
- {
26
- code: '골조공사:1층',
27
- title: '1층',
28
- duration: 10,
29
- dependsOn: '골조공사:기초공사',
30
- resources: [{ type: '철근/형틀공', allocated: 6 }]
31
- },
32
- {
33
- code: '골조공사:2층',
34
- title: '2층',
35
- duration: 10,
36
- dependsOn: '골조공사:1층',
37
- resources: [{ type: '철근/형틀공', allocated: 6 }]
38
- },
39
- {
40
- code: '골조공사:옥탑공사',
41
- title: '옥탑공사',
42
- duration: 6,
43
- dependsOn: '골조공사:2층',
44
- resources: [{ type: '철근/형틀공', allocated: 6 }]
45
- }
46
- ]
47
- },
48
- {
49
- code: '단열공사',
50
- title: '단열공사',
51
- children: [
52
- {
53
- code: '단열공사:단열재부착',
54
- title: '단열재부착',
55
- startDate: '2024-01-12',
56
- duration: 2
57
- }
58
- ]
59
- },
60
- {
61
- code: '조적공사',
62
- title: '조적공사',
63
- children: [
64
- {
65
- code: '조적공사:조적시공',
66
- title: '조적시공',
67
- startDate: '2024-01-12',
68
- duration: 3
69
- }
70
- ]
71
- },
72
- {
73
- code: '창호공사',
74
- title: '창호공사',
75
- progress: 60,
76
- children: [
77
- {
78
- code: '창호공사:실측및발주',
79
- title: '실측및발주',
80
- dependsOn: '골조공사:1층',
81
- duration: 1
82
- },
83
- {
84
- code: '창호공사:창호 프레임 설치',
85
- title: '창호 프레임 설치',
86
- duration: 3,
87
- dependsOn: '창호공사:실측및발주',
88
- resources: [{ type: '창호공', allocated: 4 }]
89
- },
90
- {
91
- code: '창호공사:창호 유리 설치',
92
- title: '창호 유리 설치',
93
- duration: 2,
94
- dependsOn: '창호공사:창호 프레임 설치',
95
- resources: [{ type: '창호공', allocated: 2 }]
96
- }
97
- ]
98
- },
99
- {
100
- code: '방수공사',
101
- title: '방수공사',
102
- progress: 60,
103
- children: [
104
- {
105
- code: '방수공사:골조 조인트부분 방수',
106
- title: '골조 조인트부분 방수',
107
- startDate: '2024-01-01',
108
- duration: 3,
109
- resources: [{ type: '방수공', allocated: 1 }]
110
- },
111
- {
112
- code: '방수공사:개구부 주변 방수',
113
- title: '개구부 주변 방수',
114
- duration: 2,
115
- dependsOn: '방수공사:골조 조인트부분 방수',
116
- resources: [{ type: '방수공', allocated: 1 }]
117
- },
118
- {
119
- code: '방수공사:테라스 방수',
120
- title: '테라스 방수',
121
- duration: 5,
122
- dependsOn: '방수공사:개구부 주변 방수',
123
- resources: [{ type: '방수공', allocated: 1 }]
124
- },
125
- {
126
- code: '방수공사:화장실/다용도실 방수',
127
- title: '화장실/다용도실 방수',
128
- duration: 5,
129
- dependsOn: '방수공사:테라스 방수',
130
- resources: [{ type: '방수공', allocated: 1 }]
131
- }
132
- ]
133
- },
134
- {
135
- code: '내부목공사',
136
- title: '내부목공사',
137
- progress: 60,
138
- children: [
139
- {
140
- code: '내부목공사:벽체다루끼/경량스터드',
141
- title: '벽체다루끼/경량스터드',
142
- startDate: '2024-01-20',
143
- duration: 5,
144
- resources: [{ type: '목공', allocated: 4 }]
145
- },
146
- {
147
- code: '내부목공사:벽체 석고보드 취부',
148
- title: '벽체 석고보드 취부',
149
- duration: 5,
150
- dependsOn: '내부목공사:벽체다루끼/경량스터드',
151
- resources: [{ type: '목공', allocated: 4 }]
152
- },
153
- {
154
- code: '내부목공사:ABC',
155
- title: 'ABC',
156
- duration: 4,
157
- dependsOn: '내부목공사:벽체 석고보드 취부',
158
- resources: [{ type: '목공', allocated: 4 }]
159
- }
160
- ]
161
- }
162
- ];
163
- class SeedSampleTasks1723861478421 {
164
- async up(queryRunner) {
165
- const projectRepository = (0, shell_1.getRepository)(project_1.Project);
166
- const domainRepository = (0, shell_1.getRepository)(shell_1.Domain);
167
- const userRepository = (0, shell_1.getRepository)(auth_base_1.User);
168
- const domain = await domainRepository.findOne({
169
- where: { name: 'SYSTEM' }
170
- });
171
- const user = await userRepository.findOne({ where: { id: domain.owner } });
172
- const project = await projectRepository.findOne({ where: { domain: { id: domain.id }, name: SEED_SAMPLE_PROJECT.name } });
173
- try {
174
- await (0, import_task_1.importTasks)(project, SEED_SAMPLE_TASKS, { state: { domain, user } });
175
- }
176
- catch (e) {
177
- env_1.logger.error(e);
178
- }
179
- }
180
- async down(queryRunner) {
181
- const domainRepository = (0, shell_1.getRepository)(shell_1.Domain);
182
- const domain = await domainRepository.findOne({
183
- where: { name: 'SYSTEM' }
184
- });
185
- const repository = (0, shell_1.getRepository)(project_1.Project);
186
- }
187
- }
188
- exports.SeedSampleTasks1723861478421 = SeedSampleTasks1723861478421;
189
- //# sourceMappingURL=1723861478421-seed-%08sample-tasks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"1723861478421-seed-\bsample-tasks.js","sourceRoot":"","sources":["../../server/migrations/1723861478421-seed-\bsample-tasks.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,iDAA6D;AAC7D,yDAAgD;AAChD,wDAAoD;AAEpD,4DAAwD;AAExD,MAAM,mBAAmB,GAAG;IAC1B,IAAI,EAAE,sBAAsB;CAC7B,CAAA;AAED,MAAM,iBAAiB,GAAG;IACxB;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,MAAM;gBACb,SAAS,EAAE,YAAY;gBACvB,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,CAAC,EAAE,IAA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AC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAC1E,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QAEzH,IAAI,CAAC;YACH,MAAM,IAAA,yBAAW,EAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAS,EAAE,CAAC,CAAA;QACnF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,YAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,gBAAgB,GAAG,IAAA,qBAAa,EAAC,cAAM,CAAC,CAAA;QAE9C,MAAM,MAAM,GAAW,MAAM,gBAAgB,CAAC,OAAO,CAAC;YACpD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B,CAAC,CAAA;QAEF,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,iBAAO,CAAC,CAAA;IAC3C,CAAC;CACF;AA5BD,oEA4BC","sourcesContent":["import { MigrationInterface, QueryRunner } from 'typeorm'\n\nimport { logger } from '@things-factory/env'\nimport { Domain, getRepository } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Project } from '../service/project/project'\n\nimport { importTasks } from '../controllers/import-task'\n\nconst SEED_SAMPLE_PROJECT = {\n name: '서울시 마포구 공덕동 아파트 신축공사'\n}\n\nconst SEED_SAMPLE_TASKS = [\n {\n code: '골조공사',\n title: '골조공사',\n progress: 60,\n children: [\n {\n code: '골조공사:기초공사',\n title: '기초공사',\n startDate: '2024-01-01',\n duration: 3,\n resources: [{ type: '철근/형틀공', allocated: 6 }]\n },\n {\n code: '골조공사:1층',\n title: '1층',\n duration: 10,\n dependsOn: '골조공사:기초공사',\n resources: [{ type: '철근/형틀공', allocated: 6 }]\n },\n {\n code: '골조공사:2층',\n title: '2층',\n duration: 10,\n dependsOn: '골조공사:1층',\n resources: [{ type: '철근/형틀공', allocated: 6 }]\n },\n {\n code: '골조공사:옥탑공사',\n title: '옥탑공사',\n duration: 6,\n dependsOn: '골조공사:2층',\n resources: [{ type: '철근/형틀공', allocated: 6 }]\n }\n ]\n },\n {\n code: '단열공사',\n title: '단열공사',\n children: [\n {\n code: '단열공사:단열재부착',\n title: '단열재부착',\n startDate: '2024-01-12',\n duration: 2\n }\n ]\n },\n {\n code: '조적공사',\n title: '조적공사',\n children: [\n {\n code: '조적공사:조적시공',\n title: '조적시공',\n startDate: '2024-01-12',\n duration: 3\n }\n ]\n },\n {\n code: '창호공사',\n title: '창호공사',\n progress: 60,\n children: [\n {\n code: '창호공사:실측및발주',\n title: '실측및발주',\n dependsOn: '골조공사:1층',\n duration: 1\n },\n {\n code: '창호공사:창호 프레임 설치',\n title: '창호 프레임 설치',\n duration: 3,\n dependsOn: '창호공사:실측및발주',\n resources: [{ type: '창호공', allocated: 4 }]\n },\n {\n code: '창호공사:창호 유리 설치',\n title: '창호 유리 설치',\n duration: 2,\n dependsOn: '창호공사:창호 프레임 설치',\n resources: [{ type: '창호공', allocated: 2 }]\n }\n ]\n },\n {\n code: '방수공사',\n title: '방수공사',\n progress: 60,\n children: [\n {\n code: '방수공사:골조 조인트부분 방수',\n title: '골조 조인트부분 방수',\n startDate: '2024-01-01',\n duration: 3,\n resources: [{ type: '방수공', allocated: 1 }]\n },\n {\n code: '방수공사:개구부 주변 방수',\n title: '개구부 주변 방수',\n duration: 2,\n dependsOn: '방수공사:골조 조인트부분 방수',\n resources: [{ type: '방수공', allocated: 1 }]\n },\n {\n code: '방수공사:테라스 방수',\n title: '테라스 방수',\n duration: 5,\n dependsOn: '방수공사:개구부 주변 방수',\n resources: [{ type: '방수공', allocated: 1 }]\n },\n {\n code: '방수공사:화장실/다용도실 방수',\n title: '화장실/다용도실 방수',\n duration: 5,\n dependsOn: '방수공사:테라스 방수',\n resources: [{ type: '방수공', allocated: 1 }]\n }\n ]\n },\n {\n code: '내부목공사',\n title: '내부목공사',\n progress: 60,\n children: [\n {\n code: '내부목공사:벽체다루끼/경량스터드',\n title: '벽체다루끼/경량스터드',\n startDate: '2024-01-20',\n duration: 5,\n resources: [{ type: '목공', allocated: 4 }]\n },\n {\n code: '내부목공사:벽체 석고보드 취부',\n title: '벽체 석고보드 취부',\n duration: 5,\n dependsOn: '내부목공사:벽체다루끼/경량스터드',\n resources: [{ type: '목공', allocated: 4 }]\n },\n {\n code: '내부목공사:ABC',\n title: 'ABC',\n duration: 4,\n dependsOn: '내부목공사:벽체 석고보드 취부',\n resources: [{ type: '목공', allocated: 4 }]\n }\n ]\n }\n]\n\nexport class SeedSampleTasks1723861478421 implements MigrationInterface {\n public async up(queryRunner: QueryRunner): Promise<void> {\n const projectRepository = getRepository(Project)\n const domainRepository = getRepository(Domain)\n const userRepository = getRepository(User)\n\n const domain: Domain = await domainRepository.findOne({\n where: { name: 'SYSTEM' }\n })\n const user = await userRepository.findOne({ where: { id: domain.owner } })\n const project = await projectRepository.findOne({ where: { domain: { id: domain.id }, name: SEED_SAMPLE_PROJECT.name } })\n\n try {\n await importTasks(project, SEED_SAMPLE_TASKS, { state: { domain, user } as any })\n } catch (e) {\n logger.error(e)\n }\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n const domainRepository = getRepository(Domain)\n\n const domain: Domain = await domainRepository.findOne({\n where: { name: 'SYSTEM' }\n })\n\n const repository = getRepository(Project)\n }\n}\n"]}
@@ -1 +0,0 @@
1
- export declare var migrations: any[];
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrations = void 0;
4
- const glob = require('glob');
5
- const path = require('path');
6
- exports.migrations = [];
7
- glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function (file) {
8
- if (file.indexOf('index.js') !== -1)
9
- return;
10
- exports.migrations = exports.migrations.concat(Object.values(require(path.resolve(file))) || []);
11
- });
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA","sourcesContent":["const glob = require('glob')\nconst path = require('path')\n\nexport var migrations = []\n\nglob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {\n if (file.indexOf('index.js') !== -1) return\n migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])\n})\n"]}
@@ -1 +0,0 @@
1
- export {};
@@ -1,105 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const content_disposition_1 = tslib_1.__importDefault(require("content-disposition"));
5
- const export_tasks_1 = require("./controllers/export-tasks");
6
- // const debug = require('debug')('dssp:project:routes')
7
- process.on('bootstrap-module-global-public-route', (app, globalPublicRouter) => {
8
- /*
9
- * can add global public routes to application (auth not required, tenancy not required)
10
- *
11
- * ex) routes.get('/path', async(context, next) => {})
12
- * ex) routes.post('/path', async(context, next) => {})
13
- */
14
- globalPublicRouter.get('/export-project', async (context, next) => {
15
- const tasks = [
16
- {
17
- name: '1 Task',
18
- startDate: new Date('2024-03-01'),
19
- endDate: new Date('2024-03-05'),
20
- subtasks: [
21
- {
22
- name: '1.1 Subtask',
23
- startDate: new Date('2024-03-02'),
24
- endDate: new Date('2024-03-03'),
25
- subtasks: [
26
- {
27
- name: '1.1.1 Subtask',
28
- startDate: new Date('2024-03-02'),
29
- endDate: new Date('2024-03-02')
30
- },
31
- {
32
- name: '1.1.2 Subtask',
33
- startDate: new Date('2024-03-02'),
34
- endDate: new Date('2024-03-03')
35
- },
36
- {
37
- name: '1.1.2 Subtask',
38
- startDate: new Date('2024-03-03'),
39
- endDate: new Date('2024-03-03')
40
- },
41
- {
42
- name: '1.1.2 Subtask',
43
- startDate: new Date('2024-03-03'),
44
- endDate: new Date('2024-03-03')
45
- }
46
- ]
47
- },
48
- {
49
- name: '1.2 Subtask',
50
- startDate: new Date('2024-03-04'),
51
- endDate: new Date('2024-03-05')
52
- }
53
- ]
54
- },
55
- {
56
- name: '2 Task',
57
- startDate: new Date('2024-03-06'),
58
- endDate: new Date('2024-03-10'),
59
- subtasks: [
60
- {
61
- name: '2.1 Subtask',
62
- startDate: new Date('2024-03-06'),
63
- endDate: new Date('2024-03-07')
64
- },
65
- {
66
- name: '2.2 Subtask',
67
- startDate: new Date('2024-03-08'),
68
- endDate: new Date('2024-03-10'),
69
- subtasks: [
70
- {
71
- name: '2.2.1 Subtask',
72
- startDate: new Date('2024-03-08'),
73
- endDate: new Date('2024-03-09')
74
- },
75
- {
76
- name: '2.2.2 Subtask',
77
- startDate: new Date('2024-03-10'),
78
- endDate: new Date('2024-03-10')
79
- }
80
- ]
81
- }
82
- ]
83
- }
84
- ];
85
- context.type = 'application/xlsx';
86
- context.set('Content-Disposition', (0, content_disposition_1.default)(`project.xlsx`));
87
- context.body = await (0, export_tasks_1.generateExcel)(tasks);
88
- });
89
- });
90
- process.on('bootstrap-module-global-private-route', (app, globalPrivateRouter) => {
91
- /*
92
- * can add global private routes to application (auth required, tenancy not required)
93
- */
94
- });
95
- process.on('bootstrap-module-domain-public-route', (app, domainPublicRouter) => {
96
- /*
97
- * can add domain public routes to application (auth not required, tenancy required)
98
- */
99
- });
100
- process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => {
101
- /*
102
- * can add domain private routes to application (auth required, tenancy required)
103
- */
104
- });
105
- //# sourceMappingURL=routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;;AAAA,sFAAoD;AAEpD,6DAAgE;AAEhE,wDAAwD;AAExD,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;;;;OAKG;IACH,kBAAkB,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAChE,MAAM,KAAK,GAAW;YACpB;gBACE,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;gBACjC,OAAO,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;gBAC/B,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,aAAa;wBACnB,SAAS,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;wBACjC,OAAO,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;wBAC/B,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,eAAe;gCACrB,SAAS,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;gCACjC,OAAO,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;6BAChC;4BACD;gCACE,IAAI,EAAE,eAAe;gCACrB,SAAS,EAAE,IAAI,IAAI,CAAC,Y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,CAAA;QAED,OAAO,CAAC,IAAI,GAAG,kBAAkB,CAAA;QACjC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAA,6BAAkB,EAAC,cAAc,CAAC,CAAC,CAAA;QACtE,OAAO,CAAC,IAAI,GAAG,MAAM,IAAA,4BAAa,EAAC,KAAK,CAAC,CAAA;IAC3C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA","sourcesContent":["import contentDisposition from 'content-disposition'\n\nimport { Task, generateExcel } from './controllers/export-tasks'\n\n// const debug = require('debug')('dssp:project:routes')\n\nprocess.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {\n /*\n * can add global public routes to application (auth not required, tenancy not required)\n *\n * ex) routes.get('/path', async(context, next) => {})\n * ex) routes.post('/path', async(context, next) => {})\n */\n globalPublicRouter.get('/export-project', async (context, next) => {\n const tasks: Task[] = [\n {\n name: '1 Task',\n startDate: new Date('2024-03-01'),\n endDate: new Date('2024-03-05'),\n subtasks: [\n {\n name: '1.1 Subtask',\n startDate: new Date('2024-03-02'),\n endDate: new Date('2024-03-03'),\n subtasks: [\n {\n name: '1.1.1 Subtask',\n startDate: new Date('2024-03-02'),\n endDate: new Date('2024-03-02')\n },\n {\n name: '1.1.2 Subtask',\n startDate: new Date('2024-03-02'),\n endDate: new Date('2024-03-03')\n },\n {\n name: '1.1.2 Subtask',\n startDate: new Date('2024-03-03'),\n endDate: new Date('2024-03-03')\n },\n {\n name: '1.1.2 Subtask',\n startDate: new Date('2024-03-03'),\n endDate: new Date('2024-03-03')\n }\n ]\n },\n {\n name: '1.2 Subtask',\n startDate: new Date('2024-03-04'),\n endDate: new Date('2024-03-05')\n }\n ]\n },\n {\n name: '2 Task',\n startDate: new Date('2024-03-06'),\n endDate: new Date('2024-03-10'),\n subtasks: [\n {\n name: '2.1 Subtask',\n startDate: new Date('2024-03-06'),\n endDate: new Date('2024-03-07')\n },\n {\n name: '2.2 Subtask',\n startDate: new Date('2024-03-08'),\n endDate: new Date('2024-03-10'),\n subtasks: [\n {\n name: '2.2.1 Subtask',\n startDate: new Date('2024-03-08'),\n endDate: new Date('2024-03-09')\n },\n {\n name: '2.2.2 Subtask',\n startDate: new Date('2024-03-10'),\n endDate: new Date('2024-03-10')\n }\n ]\n }\n ]\n }\n ]\n\n context.type = 'application/xlsx'\n context.set('Content-Disposition', contentDisposition(`project.xlsx`))\n context.body = await generateExcel(tasks)\n })\n})\n\nprocess.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {\n /*\n * can add global private routes to application (auth required, tenancy not required)\n */\n})\n\nprocess.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {\n /*\n * can add domain public routes to application (auth not required, tenancy required)\n */\n})\n\nprocess.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {\n /*\n * can add domain private routes to application (auth required, tenancy required)\n */\n})\n"]}
@@ -1,6 +0,0 @@
1
- import { ConstructionDetailType } from './construction-detail-type';
2
- import { ConstructionDetailTypePatch } from './construction-detail-type-type';
3
- export declare class ConstructionDetailTypeMutation {
4
- updateMultipleConstructionDetailType(patches: ConstructionDetailTypePatch[], constructionTypeId: string, context: ResolverContext): Promise<ConstructionDetailType[]>;
5
- deleteConstructionDetailTypes(ids: string[], context: ResolverContext): Promise<boolean>;
6
- }
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConstructionDetailTypeMutation = void 0;
4
- const tslib_1 = require("tslib");
5
- const type_graphql_1 = require("type-graphql");
6
- const typeorm_1 = require("typeorm");
7
- const attachment_base_1 = require("@things-factory/attachment-base");
8
- const construction_detail_type_1 = require("./construction-detail-type");
9
- const construction_detail_type_type_1 = require("./construction-detail-type-type");
10
- const construction_type_1 = require("../construction-type/construction-type");
11
- let ConstructionDetailTypeMutation = class ConstructionDetailTypeMutation {
12
- async updateMultipleConstructionDetailType(patches, constructionTypeId, context) {
13
- const { domain, user, tx } = context.state;
14
- let results = [];
15
- const constructionDetailTypeRepo = tx.getRepository(construction_detail_type_1.ConstructionDetailType);
16
- const constructionType = await tx.getRepository(construction_type_1.ConstructionType).findOneBy({ id: constructionTypeId });
17
- await constructionDetailTypeRepo.delete({ constructionType: { id: constructionTypeId } });
18
- for (let i = 0; i < patches.length; i++) {
19
- const result = await constructionDetailTypeRepo.save(Object.assign(Object.assign({}, patches[i]), { sequence: i, constructionType, creator: user, updater: user }));
20
- results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
21
- }
22
- return results;
23
- }
24
- async deleteConstructionDetailTypes(ids, context) {
25
- const { domain, tx } = context.state;
26
- await tx.getRepository(construction_detail_type_1.ConstructionDetailType).delete({
27
- id: (0, typeorm_1.In)(ids)
28
- });
29
- await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: ids }, context);
30
- return true;
31
- }
32
- };
33
- exports.ConstructionDetailTypeMutation = ConstructionDetailTypeMutation;
34
- tslib_1.__decorate([
35
- (0, type_graphql_1.Directive)('@transaction'),
36
- (0, type_graphql_1.Mutation)(returns => [construction_detail_type_1.ConstructionDetailType], { description: "To modify multiple ConstructionDetailTypes' information" }),
37
- tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [construction_detail_type_type_1.ConstructionDetailTypePatch])),
38
- tslib_1.__param(1, (0, type_graphql_1.Arg)('constructionTypeId')),
39
- tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
40
- tslib_1.__metadata("design:type", Function),
41
- tslib_1.__metadata("design:paramtypes", [Array, String, Object]),
42
- tslib_1.__metadata("design:returntype", Promise)
43
- ], ConstructionDetailTypeMutation.prototype, "updateMultipleConstructionDetailType", null);
44
- tslib_1.__decorate([
45
- (0, type_graphql_1.Directive)('@transaction'),
46
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple ConstructionDetailTypes' }),
47
- tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
48
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
49
- tslib_1.__metadata("design:type", Function),
50
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
51
- tslib_1.__metadata("design:returntype", Promise)
52
- ], ConstructionDetailTypeMutation.prototype, "deleteConstructionDetailTypes", null);
53
- exports.ConstructionDetailTypeMutation = ConstructionDetailTypeMutation = tslib_1.__decorate([
54
- (0, type_graphql_1.Resolver)(construction_detail_type_1.ConstructionDetailType)
55
- ], ConstructionDetailTypeMutation);
56
- //# sourceMappingURL=construction-detail-type-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"construction-detail-type-mutation.js","sourceRoot":"","sources":["../../../server/service/construction-detail-type/construction-detail-type-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,qEAAwE;AACxE,yEAAmE;AACnE,mFAA6E;AAC7E,8EAAyE;AAGlE,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAGnC,AAAN,KAAK,CAAC,oCAAoC,CACe,OAAsC,EAClE,kBAA0B,EAC9C,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,IAAI,OAAO,GAAG,EAAE,CAAA;QAEhB,MAAM,0BAA0B,GAAG,EAAE,CAAC,aAAa,CAAC,iDAAsB,CAAC,CAAA;QAC3E,MAAM,gBAAgB,GAAG,MAAM,EAAE,CAAC,aAAa,CAA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CAAC,EAAE,CAAC,CAAC,2DAA2B,CAAC,CAAC,CAAA;IACrD,mBAAA,IAAA,kBAAG,EAAC,oBAAoB,CAAC,CAAA;IACzB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;0FAwBP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC;IAEzF,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;mFAWP;yCA/CU,8BAA8B;IAD1C,IAAA,uBAAQ,EAAC,iDAAsB,CAAC;GACpB,8BAA8B,CAgD1C","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { deleteAttachmentsByRef } from '@things-factory/attachment-base'\nimport { ConstructionDetailType } from './construction-detail-type'\nimport { ConstructionDetailTypePatch } from './construction-detail-type-type'\nimport { ConstructionType } from '../construction-type/construction-type'\n\n@Resolver(ConstructionDetailType)\nexport class ConstructionDetailTypeMutation {\n @Directive('@transaction')\n @Mutation(returns => [ConstructionDetailType], { description: \"To modify multiple ConstructionDetailTypes' information\" })\n async updateMultipleConstructionDetailType(\n @Arg('patches', type => [ConstructionDetailTypePatch]) patches: ConstructionDetailTypePatch[],\n @Arg('constructionTypeId') constructionTypeId: string,\n @Ctx() context: ResolverContext\n ): Promise<ConstructionDetailType[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n\n const constructionDetailTypeRepo = tx.getRepository(ConstructionDetailType)\n const constructionType = await tx.getRepository(ConstructionType).findOneBy({ id: constructionTypeId })\n\n await constructionDetailTypeRepo.delete({ constructionType: { id: constructionTypeId } })\n\n for (let i = 0; i < patches.length; i++) {\n const result = await constructionDetailTypeRepo.save({\n ...patches[i],\n sequence: i,\n constructionType,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple ConstructionDetailTypes' })\n async deleteConstructionDetailTypes(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(ConstructionDetailType).delete({\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n}\n"]}