@dssp/project 0.0.8 → 0.0.10

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 (286) hide show
  1. package/client/pages/project/project-detail.ts +109 -30
  2. package/client/pages/project/project-list.ts +46 -10
  3. package/client/pages/project/project-schedule-list.ts +11 -3
  4. package/client/pages/project/project-schedule.ts +111 -312
  5. package/client/pages/project/project-setting-list.ts +11 -3
  6. package/client/pages/resource/construction-detail-type-popup.ts +201 -0
  7. package/client/pages/resource/construction-type-management.ts +40 -39
  8. package/client/pages/resource/inspection-drawing-type-management.ts +210 -0
  9. package/client/pages/resource/inspection-part-popup.ts +201 -0
  10. package/client/pages/resource/manager-management.ts +0 -27
  11. package/client/pages/{checklist/checklist-importer.ts → resource/resource-importer.ts} +11 -8
  12. package/client/pages/{checklist/checklist-list-page.ts → resource/resource-list-page.ts} +41 -25
  13. package/client/pages/resource/worker-type-management.ts +3 -37
  14. package/client/pages/task-resource/task-resource-importer.ts +97 -0
  15. package/client/pages/task-resource/task-resource-list-page.ts +356 -0
  16. package/client/route.ts +13 -1
  17. package/dist-client/pages/project/project-detail.d.ts +5 -1
  18. package/dist-client/pages/project/project-detail.js +123 -40
  19. package/dist-client/pages/project/project-detail.js.map +1 -1
  20. package/dist-client/pages/project/project-list.d.ts +33 -7
  21. package/dist-client/pages/project/project-list.js +26 -11
  22. package/dist-client/pages/project/project-list.js.map +1 -1
  23. package/dist-client/pages/project/project-schedule-list.js +11 -3
  24. package/dist-client/pages/project/project-schedule-list.js.map +1 -1
  25. package/dist-client/pages/project/project-schedule.d.ts +5 -1
  26. package/dist-client/pages/project/project-schedule.js +117 -306
  27. package/dist-client/pages/project/project-schedule.js.map +1 -1
  28. package/dist-client/pages/project/project-setting-list.js +11 -3
  29. package/dist-client/pages/project/project-setting-list.js.map +1 -1
  30. package/dist-client/pages/resource/construction-detail-type-popup.d.ts +2 -0
  31. package/dist-client/pages/resource/construction-detail-type-popup.js +197 -0
  32. package/dist-client/pages/resource/construction-detail-type-popup.js.map +1 -0
  33. package/dist-client/pages/resource/construction-type-management.d.ts +12 -0
  34. package/dist-client/pages/resource/construction-type-management.js +30 -38
  35. package/dist-client/pages/resource/construction-type-management.js.map +1 -1
  36. package/dist-client/pages/resource/inspection-drawing-type-management.d.ts +34 -0
  37. package/dist-client/pages/resource/inspection-drawing-type-management.js +198 -0
  38. package/dist-client/pages/resource/inspection-drawing-type-management.js.map +1 -0
  39. package/dist-client/pages/resource/inspection-part-popup.d.ts +2 -0
  40. package/dist-client/pages/resource/inspection-part-popup.js +197 -0
  41. package/dist-client/pages/resource/inspection-part-popup.js.map +1 -0
  42. package/dist-client/pages/resource/manager-management.js +0 -27
  43. package/dist-client/pages/resource/manager-management.js.map +1 -1
  44. package/dist-client/pages/{checklist/checklist-importer.d.ts → resource/resource-importer.d.ts} +2 -2
  45. package/dist-client/pages/{checklist/checklist-importer.js → resource/resource-importer.js} +10 -10
  46. package/dist-client/pages/resource/resource-importer.js.map +1 -0
  47. package/dist-client/pages/{checklist/checklist-list-page.d.ts → resource/resource-list-page.d.ts} +6 -6
  48. package/dist-client/pages/{checklist/checklist-list-page.js → resource/resource-list-page.js} +41 -32
  49. package/dist-client/pages/resource/resource-list-page.js.map +1 -0
  50. package/dist-client/pages/resource/worker-type-management.d.ts +7 -1
  51. package/dist-client/pages/resource/worker-type-management.js +3 -45
  52. package/dist-client/pages/resource/worker-type-management.js.map +1 -1
  53. package/dist-client/pages/task-resource/task-resource-importer.d.ts +10 -0
  54. package/dist-client/pages/task-resource/task-resource-importer.js +101 -0
  55. package/dist-client/pages/task-resource/task-resource-importer.js.map +1 -0
  56. package/dist-client/pages/task-resource/task-resource-list-page.d.ts +63 -0
  57. package/dist-client/pages/task-resource/task-resource-list-page.js +332 -0
  58. package/dist-client/pages/task-resource/task-resource-list-page.js.map +1 -0
  59. package/dist-client/route.d.ts +1 -1
  60. package/dist-client/route.js +9 -0
  61. package/dist-client/route.js.map +1 -1
  62. package/dist-client/tsconfig.tsbuildinfo +1 -1
  63. package/dist-server/controllers/import-task.d.ts +19 -0
  64. package/dist-server/controllers/import-task.js +104 -0
  65. package/dist-server/controllers/import-task.js.map +1 -0
  66. package/dist-server/index.d.ts +1 -0
  67. package/dist-server/index.js +1 -0
  68. package/dist-server/index.js.map +1 -1
  69. package/dist-server/migrations/1723861466413-seed-roles.d.ts +5 -0
  70. package/dist-server/migrations/1723861466413-seed-roles.js +117 -0
  71. package/dist-server/migrations/1723861466413-seed-roles.js.map +1 -0
  72. package/dist-server/migrations/1723861466414-seed-codes.d.ts +5 -0
  73. package/dist-server/migrations/1723861466414-seed-codes.js +132 -0
  74. package/dist-server/migrations/1723861466414-seed-codes.js.map +1 -0
  75. package/dist-server/migrations/1723861476419-seed-resources.d.ts +5 -0
  76. package/dist-server/migrations/1723861476419-seed-resources.js +57 -0
  77. package/dist-server/migrations/1723861476419-seed-resources.js.map +1 -0
  78. package/dist-server/migrations/1723861478420-seed-/bsample-project.d.ts +5 -0
  79. package/dist-server/migrations/1723861478420-seed-/bsample-project.js +68 -0
  80. package/dist-server/migrations/1723861478420-seed-/bsample-project.js.map +1 -0
  81. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.d.ts +5 -0
  82. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.js +189 -0
  83. package/dist-server/migrations/1723861478421-seed-/bsample-tasks.js.map +1 -0
  84. package/dist-server/migrations/index.d.ts +1 -0
  85. package/dist-server/migrations/index.js +12 -0
  86. package/dist-server/migrations/index.js.map +1 -0
  87. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.d.ts +6 -0
  88. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.js +56 -0
  89. package/dist-server/service/construction-detail-type/construction-detail-type-mutation.js.map +1 -0
  90. package/dist-server/service/construction-detail-type/construction-detail-type-query.d.ts +9 -0
  91. package/dist-server/service/construction-detail-type/construction-detail-type-query.js +53 -0
  92. package/dist-server/service/construction-detail-type/construction-detail-type-query.js.map +1 -0
  93. package/dist-server/service/construction-detail-type/construction-detail-type-type.d.ts +11 -0
  94. package/dist-server/service/construction-detail-type/construction-detail-type-type.js +43 -0
  95. package/dist-server/service/construction-detail-type/construction-detail-type-type.js.map +1 -0
  96. package/dist-server/service/construction-detail-type/construction-detail-type.d.ts +15 -0
  97. package/dist-server/service/construction-detail-type/construction-detail-type.js +69 -0
  98. package/dist-server/service/construction-detail-type/construction-detail-type.js.map +1 -0
  99. package/dist-server/service/construction-detail-type/index.d.ts +5 -0
  100. package/dist-server/service/construction-detail-type/index.js +9 -0
  101. package/dist-server/service/construction-detail-type/index.js.map +1 -0
  102. package/dist-server/service/construction-type/construction-type-query.d.ts +2 -0
  103. package/dist-server/service/construction-type/construction-type-query.js +14 -0
  104. package/dist-server/service/construction-type/construction-type-query.js.map +1 -1
  105. package/dist-server/service/construction-type/construction-type.d.ts +2 -0
  106. package/dist-server/service/construction-type/construction-type.js +6 -0
  107. package/dist-server/service/construction-type/construction-type.js.map +1 -1
  108. package/dist-server/service/index.d.ts +7 -5
  109. package/dist-server/service/index.js +21 -10
  110. package/dist-server/service/index.js.map +1 -1
  111. package/dist-server/service/inspection-drawing-type/index.d.ts +5 -0
  112. package/dist-server/service/inspection-drawing-type/index.js +9 -0
  113. package/dist-server/service/inspection-drawing-type/index.js.map +1 -0
  114. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.d.ts +6 -0
  115. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.js +64 -0
  116. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-mutation.js.map +1 -0
  117. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.d.ts +12 -0
  118. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js +83 -0
  119. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js.map +1 -0
  120. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.d.ts +10 -0
  121. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.js +39 -0
  122. package/dist-server/service/inspection-drawing-type/inspection-drawing-type-type.js.map +1 -0
  123. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.d.ts +16 -0
  124. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.js +72 -0
  125. package/dist-server/service/inspection-drawing-type/inspection-drawing-type.js.map +1 -0
  126. package/dist-server/service/inspection-part/index.d.ts +5 -0
  127. package/dist-server/service/inspection-part/index.js +9 -0
  128. package/dist-server/service/inspection-part/index.js.map +1 -0
  129. package/dist-server/service/inspection-part/inspection-part-mutation.d.ts +6 -0
  130. package/dist-server/service/inspection-part/inspection-part-mutation.js +55 -0
  131. package/dist-server/service/inspection-part/inspection-part-mutation.js.map +1 -0
  132. package/dist-server/service/inspection-part/inspection-part-query.d.ts +10 -0
  133. package/dist-server/service/inspection-part/inspection-part-query.js +66 -0
  134. package/dist-server/service/inspection-part/inspection-part-query.js.map +1 -0
  135. package/dist-server/service/inspection-part/inspection-part-type.d.ts +11 -0
  136. package/dist-server/service/inspection-part/inspection-part-type.js +43 -0
  137. package/dist-server/service/inspection-part/inspection-part-type.js.map +1 -0
  138. package/dist-server/service/inspection-part/inspection-part.d.ts +15 -0
  139. package/dist-server/service/inspection-part/inspection-part.js +69 -0
  140. package/dist-server/service/inspection-part/inspection-part.js.map +1 -0
  141. package/dist-server/service/project/index.d.ts +0 -2
  142. package/dist-server/service/project/index.js +1 -3
  143. package/dist-server/service/project/index.js.map +1 -1
  144. package/dist-server/service/project/project-query.d.ts +7 -5
  145. package/dist-server/service/project/project-query.js +34 -38
  146. package/dist-server/service/project/project-query.js.map +1 -1
  147. package/dist-server/service/project/project-type.d.ts +3 -6
  148. package/dist-server/service/project/project-type.js +25 -35
  149. package/dist-server/service/project/project-type.js.map +1 -1
  150. package/dist-server/service/project/project.d.ts +3 -2
  151. package/dist-server/service/project/project.js +10 -10
  152. package/dist-server/service/project/project.js.map +1 -1
  153. package/dist-server/service/resource/index.d.ts +6 -0
  154. package/dist-server/service/resource/index.js +10 -0
  155. package/dist-server/service/resource/index.js.map +1 -0
  156. package/dist-server/service/resource/resource-mutation.d.ts +10 -0
  157. package/dist-server/service/resource/resource-mutation.js +132 -0
  158. package/dist-server/service/resource/resource-mutation.js.map +1 -0
  159. package/dist-server/service/resource/resource-query.d.ts +11 -0
  160. package/dist-server/service/{checklist/checklist-query.js → resource/resource-query.js} +33 -38
  161. package/dist-server/service/resource/resource-query.js.map +1 -0
  162. package/dist-server/service/resource/resource-type.d.ts +17 -0
  163. package/dist-server/service/resource/resource-type.js +65 -0
  164. package/dist-server/service/resource/resource-type.js.map +1 -0
  165. package/dist-server/service/resource/resource.d.ts +24 -0
  166. package/dist-server/service/resource/resource.js +93 -0
  167. package/dist-server/service/resource/resource.js.map +1 -0
  168. package/dist-server/service/task/task-mutation.js +6 -0
  169. package/dist-server/service/task/task-mutation.js.map +1 -1
  170. package/dist-server/service/task/task-query.d.ts +9 -1
  171. package/dist-server/service/task/task-query.js +142 -20
  172. package/dist-server/service/task/task-query.js.map +1 -1
  173. package/dist-server/service/task/task-type.d.ts +13 -0
  174. package/dist-server/service/task/task-type.js +57 -12
  175. package/dist-server/service/task/task-type.js.map +1 -1
  176. package/dist-server/service/task/task.d.ts +12 -5
  177. package/dist-server/service/task/task.js +51 -16
  178. package/dist-server/service/task/task.js.map +1 -1
  179. package/dist-server/service/task-resource/index.d.ts +6 -0
  180. package/dist-server/service/task-resource/index.js +10 -0
  181. package/dist-server/service/task-resource/index.js.map +1 -0
  182. package/dist-server/service/task-resource/task-resource-mutation.d.ts +10 -0
  183. package/dist-server/service/task-resource/task-resource-mutation.js +132 -0
  184. package/dist-server/service/task-resource/task-resource-mutation.js.map +1 -0
  185. package/dist-server/service/task-resource/task-resource-query.d.ts +7 -0
  186. package/dist-server/service/task-resource/task-resource-query.js +50 -0
  187. package/dist-server/service/task-resource/task-resource-query.js.map +1 -0
  188. package/dist-server/service/task-resource/task-resource-type.d.ts +17 -0
  189. package/dist-server/service/task-resource/task-resource-type.js +65 -0
  190. package/dist-server/service/task-resource/task-resource-type.js.map +1 -0
  191. package/dist-server/service/task-resource/task-resource.d.ts +13 -0
  192. package/dist-server/service/task-resource/task-resource.js +59 -0
  193. package/dist-server/service/task-resource/task-resource.js.map +1 -0
  194. package/dist-server/tsconfig.tsbuildinfo +1 -1
  195. package/helps/project/checklist-type-detail.md +160 -0
  196. package/helps/project/checklist-type.md +160 -0
  197. package/helps/project/task-resource.md +160 -0
  198. package/package.json +11 -7
  199. package/server/controllers/import-task.ts +140 -0
  200. package/server/index.ts +1 -0
  201. package/server/migrations/1723861466413-seed-roles.ts +128 -0
  202. package/server/migrations/1723861466414-seed-codes.ts +139 -0
  203. package/server/migrations/1723861476419-seed-resources.ts +62 -0
  204. package/server/migrations/1723861478420-seed-/bsample-project.ts +87 -0
  205. package/server/migrations/1723861478421-seed-/bsample-tasks.ts +194 -0
  206. package/server/migrations/index.ts +9 -0
  207. package/server/service/construction-detail-type/construction-detail-type-mutation.ts +57 -0
  208. package/server/service/construction-detail-type/construction-detail-type-query.ts +31 -0
  209. package/server/service/construction-detail-type/construction-detail-type-type.ts +26 -0
  210. package/server/service/construction-detail-type/construction-detail-type.ts +52 -0
  211. package/server/service/construction-detail-type/index.ts +6 -0
  212. package/server/service/construction-type/construction-type-query.ts +9 -0
  213. package/server/service/construction-type/construction-type.ts +8 -2
  214. package/server/service/index.ts +24 -11
  215. package/server/service/inspection-drawing-type/index.ts +6 -0
  216. package/server/service/inspection-drawing-type/inspection-drawing-type-mutation.ts +69 -0
  217. package/server/service/inspection-drawing-type/inspection-drawing-type-query.ts +55 -0
  218. package/server/service/inspection-drawing-type/inspection-drawing-type-type.ts +23 -0
  219. package/server/service/inspection-drawing-type/inspection-drawing-type.ts +68 -0
  220. package/server/service/inspection-part/index.ts +6 -0
  221. package/server/service/inspection-part/inspection-part-mutation.ts +52 -0
  222. package/server/service/inspection-part/inspection-part-query.ts +41 -0
  223. package/server/service/inspection-part/inspection-part-type.ts +26 -0
  224. package/server/service/inspection-part/inspection-part.ts +51 -0
  225. package/server/service/project/index.ts +0 -2
  226. package/server/service/project/project-query.ts +30 -38
  227. package/server/service/project/project-type.ts +22 -27
  228. package/server/service/project/project.ts +11 -12
  229. package/server/service/resource/index.ts +7 -0
  230. package/server/service/resource/resource-mutation.ts +137 -0
  231. package/server/service/resource/resource-query.ts +50 -0
  232. package/server/service/resource/resource-type.ts +41 -0
  233. package/server/service/resource/resource.ts +82 -0
  234. package/server/service/task/task-mutation.ts +8 -9
  235. package/server/service/task/task-query.ts +135 -22
  236. package/server/service/task/task-type.ts +41 -15
  237. package/server/service/task/task.ts +44 -15
  238. package/server/service/task-resource/index.ts +7 -0
  239. package/server/service/task-resource/task-resource-mutation.ts +140 -0
  240. package/server/service/task-resource/task-resource-query.ts +36 -0
  241. package/server/service/task-resource/task-resource-type.ts +41 -0
  242. package/server/service/task-resource/task-resource.ts +51 -0
  243. package/things-factory.config.js +1 -0
  244. package/translations/en.json +15 -1
  245. package/translations/ko.json +9 -5
  246. package/dist-client/pages/checklist/checklist-importer.js.map +0 -1
  247. package/dist-client/pages/checklist/checklist-list-page.js.map +0 -1
  248. package/dist-server/service/check-item/check-item-mutation.d.ts +0 -10
  249. package/dist-server/service/check-item/check-item-mutation.js +0 -129
  250. package/dist-server/service/check-item/check-item-mutation.js.map +0 -1
  251. package/dist-server/service/check-item/check-item-query.d.ts +0 -11
  252. package/dist-server/service/check-item/check-item-query.js +0 -86
  253. package/dist-server/service/check-item/check-item-query.js.map +0 -1
  254. package/dist-server/service/check-item/check-item-type.d.ts +0 -18
  255. package/dist-server/service/check-item/check-item-type.js +0 -69
  256. package/dist-server/service/check-item/check-item-type.js.map +0 -1
  257. package/dist-server/service/check-item/check-item.d.ts +0 -18
  258. package/dist-server/service/check-item/check-item.js +0 -84
  259. package/dist-server/service/check-item/check-item.js.map +0 -1
  260. package/dist-server/service/check-item/index.d.ts +0 -5
  261. package/dist-server/service/check-item/index.js +0 -9
  262. package/dist-server/service/check-item/index.js.map +0 -1
  263. package/dist-server/service/checklist/checklist-mutation.d.ts +0 -10
  264. package/dist-server/service/checklist/checklist-mutation.js +0 -129
  265. package/dist-server/service/checklist/checklist-mutation.js.map +0 -1
  266. package/dist-server/service/checklist/checklist-query.d.ts +0 -11
  267. package/dist-server/service/checklist/checklist-query.js.map +0 -1
  268. package/dist-server/service/checklist/checklist-type.d.ts +0 -18
  269. package/dist-server/service/checklist/checklist-type.js +0 -69
  270. package/dist-server/service/checklist/checklist-type.js.map +0 -1
  271. package/dist-server/service/checklist/checklist.d.ts +0 -26
  272. package/dist-server/service/checklist/checklist.js +0 -120
  273. package/dist-server/service/checklist/checklist.js.map +0 -1
  274. package/dist-server/service/checklist/index.d.ts +0 -5
  275. package/dist-server/service/checklist/index.js +0 -9
  276. package/dist-server/service/checklist/index.js.map +0 -1
  277. package/server/service/check-item/check-item-mutation.ts +0 -142
  278. package/server/service/check-item/check-item-query.ts +0 -56
  279. package/server/service/check-item/check-item-type.ts +0 -49
  280. package/server/service/check-item/check-item.ts +0 -74
  281. package/server/service/check-item/index.ts +0 -6
  282. package/server/service/checklist/checklist-mutation.ts +0 -142
  283. package/server/service/checklist/checklist-query.ts +0 -56
  284. package/server/service/checklist/checklist-type.ts +0 -49
  285. package/server/service/checklist/checklist.ts +0 -105
  286. package/server/service/checklist/index.ts +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"construction-type-query.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAAuG;AACvG,yDAAgD;AAChD,2DAAsD;AACtD,qEAA+D;AAGxD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAE1B,AAAN,KAAK,CAAC,gBAAgB,CAAY,EAAU,EAAS,OAAwB;QAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,oCAAgB,CAAC,CAA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AAC;IAC5E,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAMnD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,6CAAoB,EAAE,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;IACtE,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;8DAYhD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;mDAEtD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;oDAEvD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;oDAEvD;AAtCU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,oCAAgB,CAAC;GACd,qBAAqB,CAuCjC;AAvCY,sDAAqB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ConstructionType } from './construction-type'\nimport { ConstructionTypeList } from './construction-type-type'\n\n@Resolver(ConstructionType)\nexport class ConstructionTypeQuery {\n @Query(returns => ConstructionType!, { nullable: true, description: 'To fetch a ConstructionType' })\n async constructionType(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<ConstructionType> {\n const { domain } = context.state\n\n return await getRepository(ConstructionType).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => ConstructionTypeList, { description: 'To fetch multiple ConstructionTypes' })\n async constructionTypes(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ConstructionTypeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(ConstructionType)\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() constructionType: ConstructionType): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: constructionType.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() constructionType: ConstructionType): Promise<User> {\n return await getRepository(User).findOneBy({ id: constructionType.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() constructionType: ConstructionType): Promise<User> {\n return await getRepository(User).findOneBy({ id: constructionType.creatorId })\n }\n}\n"]}
1
+ {"version":3,"file":"construction-type-query.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAAuG;AACvG,yDAAgD;AAChD,2DAAsD;AACtD,qEAA+D;AAC/D,mGAA6F;AAGtF,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAE1B,AAAN,KAAK,CAAC,gBAAgB,CAAY,EAAU,EAAS,OAAwB;QAC3E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,oCAAgB,CAAC,CAAC,OAAO,CAAC;YACnD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,iBAAiB,CAAS,MAAiB,EAAS,OAAwB;QAChF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAA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AAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAMnD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,6CAAoB,EAAE,EAAE,WAAW,EAAE,qCAAqC,EAAE,CAAC;IACtE,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;8DAYhD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iDAAsB,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;oEAKvE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;mDAEtD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;oDAEvD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAmB,oCAAgB;;oDAEvD;AA9CU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,oCAAgB,CAAC;GACd,qBAAqB,CA+CjC;AA/CY,sDAAqB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ConstructionType } from './construction-type'\nimport { ConstructionTypeList } from './construction-type-type'\nimport { ConstructionDetailType } from '../construction-detail-type/construction-detail-type'\n\n@Resolver(ConstructionType)\nexport class ConstructionTypeQuery {\n @Query(returns => ConstructionType!, { nullable: true, description: 'To fetch a ConstructionType' })\n async constructionType(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<ConstructionType> {\n const { domain } = context.state\n\n return await getRepository(ConstructionType).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => ConstructionTypeList, { description: 'To fetch multiple ConstructionTypes' })\n async constructionTypes(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ConstructionTypeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(ConstructionType)\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [ConstructionDetailType])\n async constructionDetailTypes(@Root() constructionType: ConstructionType): Promise<ConstructionDetailType[]> {\n return await getRepository(ConstructionDetailType).find({\n where: { constructionType: { id: constructionType.id } },\n order: { sequence: 'ASC' }\n })\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() constructionType: ConstructionType): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: constructionType.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() constructionType: ConstructionType): Promise<User> {\n return await getRepository(User).findOneBy({ id: constructionType.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() constructionType: ConstructionType): Promise<User> {\n return await getRepository(User).findOneBy({ id: constructionType.creatorId })\n }\n}\n"]}
@@ -1,11 +1,13 @@
1
1
  import { Domain } from '@things-factory/shell';
2
2
  import { User } from '@things-factory/auth-base';
3
+ import { ConstructionDetailType } from '../construction-detail-type/construction-detail-type';
3
4
  export declare class ConstructionType {
4
5
  readonly id: string;
5
6
  domain?: Domain;
6
7
  domainId?: string;
7
8
  name?: string;
8
9
  description?: string;
10
+ constructionDetailTypes?: ConstructionDetailType[];
9
11
  createdAt?: Date;
10
12
  updatedAt?: Date;
11
13
  deletedAt?: Date;
@@ -6,6 +6,7 @@ const typeorm_1 = require("typeorm");
6
6
  const type_graphql_1 = require("type-graphql");
7
7
  const shell_1 = require("@things-factory/shell");
8
8
  const auth_base_1 = require("@things-factory/auth-base");
9
+ const construction_detail_type_1 = require("../construction-detail-type/construction-detail-type");
9
10
  let ConstructionType = class ConstructionType {
10
11
  };
11
12
  tslib_1.__decorate([
@@ -32,6 +33,11 @@ tslib_1.__decorate([
32
33
  (0, type_graphql_1.Field)({ nullable: true }),
33
34
  tslib_1.__metadata("design:type", String)
34
35
  ], ConstructionType.prototype, "description", void 0);
36
+ tslib_1.__decorate([
37
+ (0, type_graphql_1.Field)(() => [construction_detail_type_1.ConstructionDetailType], { nullable: true }),
38
+ (0, typeorm_1.OneToMany)(() => construction_detail_type_1.ConstructionDetailType, constructionDetailType => constructionDetailType.constructionType),
39
+ tslib_1.__metadata("design:type", Array)
40
+ ], ConstructionType.prototype, "constructionDetailTypes", void 0);
35
41
  tslib_1.__decorate([
36
42
  (0, typeorm_1.CreateDateColumn)(),
37
43
  (0, type_graphql_1.Field)({ nullable: true }),
@@ -1 +1 @@
1
- {"version":3,"file":"construction-type.js","sourceRoot":"","sources":["../../../server/service/construction-type/construction-type.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AAEpD,iDAA8C;AAC9C,yDAAgD;AAQzC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CA6C5B,CAAA;AA5CC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;4CACC;AAEnB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;gDAAA;AAEf;IAAC,IAAA,oBAAU,EAAC,CAAC,gBAAkC,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC;;kDAC3D;AAEjB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,QA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AA,eAAK,EAAC,wBAAwB,EAAE,CAAC,gBAAkC,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACzH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;GACxB,gBAAgB,CA6C5B;AA7CY,4CAAgB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n@Entity()\n@Index('ix_construction_type_0', (constructionType: ConstructionType) => [constructionType.domain, constructionType.name], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: '공종 타입' })\nexport class ConstructionType {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((constructionType: ConstructionType) => constructionType.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\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((constructionType: ConstructionType) => constructionType.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((constructionType: ConstructionType) => constructionType.updater)\n updaterId?: string\n}\n"]}
1
+ {"version":3,"file":"construction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Id,\n ManyToOne,\n PrimaryGeneratedColumn,\n OneToMany\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ConstructionDetailType } from '../construction-detail-type/construction-detail-type'\n\n@Entity()\n@Index('ix_construction_type_0', (constructionType: ConstructionType) => [constructionType.domain, constructionType.name], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: '공종 타입' })\nexport class ConstructionType {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((constructionType: ConstructionType) => constructionType.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n // 상세 공종 정보 (하위 테이블 참조)\n @Field(() => [ConstructionDetailType], { nullable: true })\n @OneToMany(() => ConstructionDetailType, constructionDetailType => constructionDetailType.constructionType)\n constructionDetailTypes?: ConstructionDetailType[]\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((constructionType: ConstructionType) => constructionType.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((constructionType: ConstructionType) => constructionType.updater)\n updaterId?: string\n}\n"]}
@@ -1,12 +1,14 @@
1
+ export * from './task-resource/task-resource';
2
+ export * from './resource/resource';
3
+ export * from './construction-detail-type/construction-detail-type';
1
4
  export * from './construction-type/construction-type';
5
+ export * from './inspection-drawing-type/inspection-drawing-type';
6
+ export * from './inspection-part/inspection-part';
2
7
  export * from './worker-type/worker-type';
3
8
  export * from './manager/manager';
4
- export * from './check-item/check-item';
5
- export * from './checklist/checklist';
6
9
  export * from './task/task';
7
10
  export * from './project/project';
8
- export declare const entities: (typeof import("./construction-type/construction-type").ConstructionType | typeof import("./manager/manager").Manager | typeof import("./project/project").Project | typeof import("./task/task").Task | typeof import("./checklist/checklist").Checklist | typeof import("./check-item/check-item").CheckItem)[];
11
+ export declare const entities: (typeof import("./project/project").Project | typeof import("./task/task").Task | typeof import("./task-resource/task-resource").TaskResource | typeof import("./resource/resource").Resource | typeof import("./construction-type/construction-type").ConstructionType | typeof import("./construction-detail-type/construction-detail-type").ConstructionDetailType | typeof import("./inspection-part/inspection-part").InspectionPart | typeof import("./inspection-drawing-type/inspection-drawing-type").InspectionDrawingType | typeof import("./worker-type/worker-type").WorkerType | typeof import("./manager/manager").Manager)[];
9
12
  export declare const schema: {
10
- resolverClasses: (typeof import("./construction-type/construction-type-query").ConstructionTypeQuery | typeof import("./construction-type/construction-type-mutation").ConstructionTypeMutation | typeof import("./worker-type/worker-type-query").WorkerTypeQuery | typeof import("./worker-type/worker-type-mutation").WorkerTypeMutation | typeof import("./manager/manager-query").ManagerQuery | typeof import("./manager/manager-mutation").ManagerMutation | typeof import("./check-item/check-item-query").CheckItemQuery | typeof import("./check-item/check-item-mutation").CheckItemMutation | typeof import("./checklist/checklist-query").ChecklistQuery | typeof import("./checklist/checklist-mutation").ChecklistMutation | typeof import("./task/task-query").TaskQuery | typeof import("./task/task-mutation").TaskMutation | typeof import("./project/project-query").ProjectQuery | typeof import("./project/project-mutation").ProjectMutation)[];
13
+ resolverClasses: (typeof import("./task-resource/task-resource-query").TaskResourceQuery | typeof import("./task-resource/task-resource-mutation").TaskResourceMutation | typeof import("./resource/resource-query").ResourceQuery | typeof import("./resource/resource-mutation").ResourceMutation | typeof import("./construction-detail-type/construction-detail-type-query").ConstructionDetailTypeQuery | typeof import("./construction-detail-type/construction-detail-type-mutation").ConstructionDetailTypeMutation | typeof import("./construction-type/construction-type-query").ConstructionTypeQuery | typeof import("./construction-type/construction-type-mutation").ConstructionTypeMutation | typeof import("./inspection-drawing-type/inspection-drawing-type-query").InspectionDrawingTypeQuery | typeof import("./inspection-drawing-type/inspection-drawing-type-mutation").InspectionDrawingTypeMutation | typeof import("./inspection-part/inspection-part-query").InspectionPartQuery | typeof import("./inspection-part/inspection-part-mutation").InspectionPartMutation | typeof import("./worker-type/worker-type-query").WorkerTypeQuery | typeof import("./worker-type/worker-type-mutation").WorkerTypeMutation | typeof import("./manager/manager-query").ManagerQuery | typeof import("./manager/manager-mutation").ManagerMutation | typeof import("./task/task-query").TaskQuery | typeof import("./task/task-mutation").TaskMutation | typeof import("./project/project-query").ProjectQuery | typeof import("./project/project-mutation").ProjectMutation)[];
11
14
  };
12
- export declare const types: typeof import("./project/project-type").InspectionSummary[];
@@ -1,44 +1,55 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.types = exports.schema = exports.entities = void 0;
3
+ exports.schema = exports.entities = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /* EXPORT ENTITY TYPES */
6
+ tslib_1.__exportStar(require("./task-resource/task-resource"), exports);
7
+ tslib_1.__exportStar(require("./resource/resource"), exports);
8
+ tslib_1.__exportStar(require("./construction-detail-type/construction-detail-type"), exports);
6
9
  tslib_1.__exportStar(require("./construction-type/construction-type"), exports);
10
+ tslib_1.__exportStar(require("./inspection-drawing-type/inspection-drawing-type"), exports);
11
+ tslib_1.__exportStar(require("./inspection-part/inspection-part"), exports);
7
12
  tslib_1.__exportStar(require("./worker-type/worker-type"), exports);
8
13
  tslib_1.__exportStar(require("./manager/manager"), exports);
9
- tslib_1.__exportStar(require("./check-item/check-item"), exports);
10
- tslib_1.__exportStar(require("./checklist/checklist"), exports);
11
14
  tslib_1.__exportStar(require("./task/task"), exports);
12
15
  tslib_1.__exportStar(require("./project/project"), exports);
13
16
  /* IMPORT ENTITIES AND RESOLVERS */
17
+ const task_resource_1 = require("./task-resource");
18
+ const resource_1 = require("./resource");
19
+ const construction_detail_type_1 = require("./construction-detail-type");
14
20
  const construction_type_1 = require("./construction-type");
21
+ const inspection_drawing_type_1 = require("./inspection-drawing-type");
22
+ const inspection_part_1 = require("./inspection-part");
15
23
  const worker_type_1 = require("./worker-type");
16
24
  const manager_1 = require("./manager");
17
- const check_item_1 = require("./check-item");
18
- const checklist_1 = require("./checklist");
19
25
  const task_1 = require("./task");
20
26
  const project_1 = require("./project");
21
27
  exports.entities = [
22
28
  /* ENTITIES */
29
+ ...task_resource_1.entities,
30
+ ...resource_1.entities,
31
+ ...construction_detail_type_1.entities,
23
32
  ...construction_type_1.entities,
33
+ ...inspection_drawing_type_1.entities,
34
+ ...inspection_part_1.entities,
24
35
  ...worker_type_1.entities,
25
36
  ...manager_1.entities,
26
- ...check_item_1.entities,
27
- ...checklist_1.entities,
28
37
  ...task_1.entities,
29
38
  ...project_1.entities
30
39
  ];
31
40
  exports.schema = {
32
41
  resolverClasses: [
33
42
  /* RESOLVER CLASSES */
43
+ ...task_resource_1.resolvers,
44
+ ...resource_1.resolvers,
45
+ ...construction_detail_type_1.resolvers,
34
46
  ...construction_type_1.resolvers,
47
+ ...inspection_drawing_type_1.resolvers,
48
+ ...inspection_part_1.resolvers,
35
49
  ...worker_type_1.resolvers,
36
50
  ...manager_1.resolvers,
37
- ...check_item_1.resolvers,
38
- ...checklist_1.resolvers,
39
51
  ...task_1.resolvers,
40
52
  ...project_1.resolvers
41
53
  ]
42
54
  };
43
- exports.types = [...project_1.types];
44
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,gFAAqD;AACrD,oEAAyC;AACzC,4DAAiC;AACjC,kEAAuC;AACvC,gEAAqC;AACrC,sDAA2B;AAC3B,4DAAiC;AAEjC,mCAAmC;AACnC,2DAAkH;AAClH,+CAAgG;AAChG,uCAAsF;AACtF,6CAA6F;AAC7F,2CAA4F;AAC5F,iCAA6E;AAC7E,uCAA6G;AAEhG,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,4BAAwB;IAC3B,GAAG,sBAAkB;IACrB,GAAG,kBAAe;IAClB,GAAG,qBAAiB;IACpB,GAAG,oBAAiB;IACpB,GAAG,eAAY;IACf,GAAG,kBAAe;CACnB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,6BAAyB;QAC5B,GAAG,uBAAmB;QACtB,GAAG,mBAAgB;QACnB,GAAG,sBAAkB;QACrB,GAAG,qBAAkB;QACrB,GAAG,gBAAa;QAChB,GAAG,mBAAgB;KACpB;CACF,CAAA;AAEY,QAAA,KAAK,GAAG,CAAC,GAAG,eAAY,CAAC,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './construction-type/construction-type'\nexport * from './worker-type/worker-type'\nexport * from './manager/manager'\nexport * from './check-item/check-item'\nexport * from './checklist/checklist'\nexport * from './task/task'\nexport * from './project/project'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as ConstructionTypeEntities, resolvers as ConstructionTypeResolvers } from './construction-type'\nimport { entities as WorkerTypeEntities, resolvers as WorkerTypeResolvers } from './worker-type'\nimport { entities as ManagerEntities, resolvers as ManagerResolvers } from './manager'\nimport { entities as CheckItemEntities, resolvers as CheckItemResolvers } from './check-item'\nimport { entities as ChecklistEntities, resolvers as ChecklistResolvers } from './checklist'\nimport { entities as TaskEntities, resolvers as TaskResolvers } from './task'\nimport { entities as ProjectEntities, resolvers as ProjectResolvers, types as ProjectTypes } from './project'\n\nexport const entities = [\n /* ENTITIES */\n ...ConstructionTypeEntities,\n ...WorkerTypeEntities,\n ...ManagerEntities,\n ...CheckItemEntities,\n ...ChecklistEntities,\n ...TaskEntities,\n ...ProjectEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...ConstructionTypeResolvers,\n ...WorkerTypeResolvers,\n ...ManagerResolvers,\n ...CheckItemResolvers,\n ...ChecklistResolvers,\n ...TaskResolvers,\n ...ProjectResolvers\n ]\n}\n\nexport const types = [...ProjectTypes]\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,wEAA6C;AAC7C,8DAAmC;AACnC,8FAAmE;AACnE,gFAAqD;AACrD,4FAAiE;AACjE,4EAAiD;AACjD,oEAAyC;AACzC,4DAAiC;AACjC,sDAA2B;AAC3B,4DAAiC;AAEjC,mCAAmC;AACnC,mDAAsG;AACtG,yCAAyF;AACzF,yEAGmC;AACnC,2DAAkH;AAClH,uEAAkI;AAClI,uDAA4G;AAC5G,+CAAgG;AAChG,uCAAsF;AACtF,iCAA6E;AAC7E,uCAAsF;AAEzE,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,wBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,mCAA8B;IACjC,GAAG,4BAAwB;IAC3B,GAAG,kCAA6B;IAChC,GAAG,0BAAsB;IACzB,GAAG,sBAAkB;IACrB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,kBAAe;CACnB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,yBAAqB;QACxB,GAAG,oBAAiB;QACpB,GAAG,oCAA+B;QAClC,GAAG,6BAAyB;QAC5B,GAAG,mCAA8B;QACjC,GAAG,2BAAuB;QAC1B,GAAG,uBAAmB;QACtB,GAAG,mBAAgB;QACnB,GAAG,gBAAa;QAChB,GAAG,mBAAgB;KACpB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './task-resource/task-resource'\nexport * from './resource/resource'\nexport * from './construction-detail-type/construction-detail-type'\nexport * from './construction-type/construction-type'\nexport * from './inspection-drawing-type/inspection-drawing-type'\nexport * from './inspection-part/inspection-part'\nexport * from './worker-type/worker-type'\nexport * from './manager/manager'\nexport * from './task/task'\nexport * from './project/project'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as TaskResourceEntities, resolvers as TaskResourceResolvers } from './task-resource'\nimport { entities as ResourceEntities, resolvers as ResourceResolvers } from './resource'\nimport {\n entities as ConstructionDetailTypeEntities,\n resolvers as ConstructionDetailTypeResolvers\n} from './construction-detail-type'\nimport { entities as ConstructionTypeEntities, resolvers as ConstructionTypeResolvers } from './construction-type'\nimport { entities as InspectionDrawingTypeEntities, resolvers as InspectionDrawingTypeResolvers } from './inspection-drawing-type'\nimport { entities as InspectionPartEntities, resolvers as InspectionPartResolvers } from './inspection-part'\nimport { entities as WorkerTypeEntities, resolvers as WorkerTypeResolvers } from './worker-type'\nimport { entities as ManagerEntities, resolvers as ManagerResolvers } from './manager'\nimport { entities as TaskEntities, resolvers as TaskResolvers } from './task'\nimport { entities as ProjectEntities, resolvers as ProjectResolvers } from './project'\n\nexport const entities = [\n /* ENTITIES */\n ...TaskResourceEntities,\n ...ResourceEntities,\n ...ConstructionDetailTypeEntities,\n ...ConstructionTypeEntities,\n ...InspectionDrawingTypeEntities,\n ...InspectionPartEntities,\n ...WorkerTypeEntities,\n ...ManagerEntities,\n ...TaskEntities,\n ...ProjectEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...TaskResourceResolvers,\n ...ResourceResolvers,\n ...ConstructionDetailTypeResolvers,\n ...ConstructionTypeResolvers,\n ...InspectionDrawingTypeResolvers,\n ...InspectionPartResolvers,\n ...WorkerTypeResolvers,\n ...ManagerResolvers,\n ...TaskResolvers,\n ...ProjectResolvers\n ]\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { InspectionDrawingType } from './inspection-drawing-type';
2
+ import { InspectionDrawingTypeQuery } from './inspection-drawing-type-query';
3
+ import { InspectionDrawingTypeMutation } from './inspection-drawing-type-mutation';
4
+ export declare const entities: (typeof InspectionDrawingType)[];
5
+ export declare const resolvers: (typeof InspectionDrawingTypeQuery | typeof InspectionDrawingTypeMutation)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const inspection_drawing_type_1 = require("./inspection-drawing-type");
5
+ const inspection_drawing_type_query_1 = require("./inspection-drawing-type-query");
6
+ const inspection_drawing_type_mutation_1 = require("./inspection-drawing-type-mutation");
7
+ exports.entities = [inspection_drawing_type_1.InspectionDrawingType];
8
+ exports.resolvers = [inspection_drawing_type_query_1.InspectionDrawingTypeQuery, inspection_drawing_type_mutation_1.InspectionDrawingTypeMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/index.ts"],"names":[],"mappings":";;;AAAA,uEAAiE;AACjE,mFAA4E;AAC5E,yFAAkF;AAErE,QAAA,QAAQ,GAAG,CAAC,+CAAqB,CAAC,CAAA;AAClC,QAAA,SAAS,GAAG,CAAC,0DAA0B,EAAE,gEAA6B,CAAC,CAAA","sourcesContent":["import { InspectionDrawingType } from './inspection-drawing-type'\nimport { InspectionDrawingTypeQuery } from './inspection-drawing-type-query'\nimport { InspectionDrawingTypeMutation } from './inspection-drawing-type-mutation'\n\nexport const entities = [InspectionDrawingType]\nexport const resolvers = [InspectionDrawingTypeQuery, InspectionDrawingTypeMutation]\n"]}
@@ -0,0 +1,6 @@
1
+ import { InspectionDrawingType } from './inspection-drawing-type';
2
+ import { InspectionDrawingTypePatch } from './inspection-drawing-type-type';
3
+ export declare class InspectionDrawingTypeMutation {
4
+ updateMultipleInspectionDrawingType(patches: InspectionDrawingTypePatch[], context: ResolverContext): Promise<InspectionDrawingType[]>;
5
+ deleteInspectionDrawingTypes(ids: string[], context: ResolverContext): Promise<boolean>;
6
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InspectionDrawingTypeMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const typeorm_1 = require("typeorm");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const inspection_drawing_type_1 = require("./inspection-drawing-type");
9
+ const inspection_drawing_type_type_1 = require("./inspection-drawing-type-type");
10
+ let InspectionDrawingTypeMutation = class InspectionDrawingTypeMutation {
11
+ async updateMultipleInspectionDrawingType(patches, context) {
12
+ const { domain, user, tx } = context.state;
13
+ let results = [];
14
+ const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
15
+ const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
16
+ const inspectionDrawingTypeRepo = (0, shell_1.getRepository)(inspection_drawing_type_1.InspectionDrawingType, tx);
17
+ if (_createRecords.length > 0) {
18
+ for (let i = 0; i < _createRecords.length; i++) {
19
+ const newRecord = _createRecords[i];
20
+ const result = await inspectionDrawingTypeRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
21
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
22
+ }
23
+ }
24
+ if (_updateRecords.length > 0) {
25
+ for (let i = 0; i < _updateRecords.length; i++) {
26
+ const updateRecord = _updateRecords[i];
27
+ const inspectionDrawingType = await inspectionDrawingTypeRepo.findOneBy({ id: updateRecord.id });
28
+ const result = await inspectionDrawingTypeRepo.save(Object.assign(Object.assign(Object.assign({}, inspectionDrawingType), updateRecord), { updater: user }));
29
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
30
+ }
31
+ }
32
+ return results;
33
+ }
34
+ async deleteInspectionDrawingTypes(ids, context) {
35
+ const { domain, tx } = context.state;
36
+ await (0, shell_1.getRepository)(inspection_drawing_type_1.InspectionDrawingType, tx).delete({
37
+ id: (0, typeorm_1.In)(ids)
38
+ });
39
+ return true;
40
+ }
41
+ };
42
+ tslib_1.__decorate([
43
+ (0, type_graphql_1.Directive)('@transaction'),
44
+ (0, type_graphql_1.Mutation)(returns => [inspection_drawing_type_1.InspectionDrawingType], { description: "To modify multiple InspectionDrawingTypes' information" }),
45
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [inspection_drawing_type_type_1.InspectionDrawingTypePatch])),
46
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
47
+ tslib_1.__metadata("design:type", Function),
48
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
49
+ tslib_1.__metadata("design:returntype", Promise)
50
+ ], InspectionDrawingTypeMutation.prototype, "updateMultipleInspectionDrawingType", null);
51
+ tslib_1.__decorate([
52
+ (0, type_graphql_1.Directive)('@transaction'),
53
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple InspectionDrawingTypes' }),
54
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
55
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
56
+ tslib_1.__metadata("design:type", Function),
57
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
58
+ tslib_1.__metadata("design:returntype", Promise)
59
+ ], InspectionDrawingTypeMutation.prototype, "deleteInspectionDrawingTypes", null);
60
+ InspectionDrawingTypeMutation = tslib_1.__decorate([
61
+ (0, type_graphql_1.Resolver)(inspection_drawing_type_1.InspectionDrawingType)
62
+ ], InspectionDrawingTypeMutation);
63
+ exports.InspectionDrawingTypeMutation = InspectionDrawingTypeMutation;
64
+ //# sourceMappingURL=inspection-drawing-type-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection-drawing-type-mutation.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,iDAAqD;AACrD,uEAAiE;AACjE,iFAA2E;AAGpE,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IAGlC,AAAN,KAAK,CAAC,mCAAmC,CACe,OAAqC,EACpF,OAAwB;QAE/B,MA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cesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { getRepository } from '@things-factory/shell'\nimport { InspectionDrawingType } from './inspection-drawing-type'\nimport { InspectionDrawingTypePatch } from './inspection-drawing-type-type'\n\n@Resolver(InspectionDrawingType)\nexport class InspectionDrawingTypeMutation {\n @Directive('@transaction')\n @Mutation(returns => [InspectionDrawingType], { description: \"To modify multiple InspectionDrawingTypes' information\" })\n async updateMultipleInspectionDrawingType(\n @Arg('patches', type => [InspectionDrawingTypePatch]) patches: InspectionDrawingTypePatch[],\n @Ctx() context: ResolverContext\n ): Promise<InspectionDrawingType[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const inspectionDrawingTypeRepo = getRepository(InspectionDrawingType, tx)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await inspectionDrawingTypeRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const inspectionDrawingType = await inspectionDrawingTypeRepo.findOneBy({ id: updateRecord.id })\n\n const result = await inspectionDrawingTypeRepo.save({\n ...inspectionDrawingType,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple InspectionDrawingTypes' })\n async deleteInspectionDrawingTypes(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(InspectionDrawingType, tx).delete({\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { ListParam } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ import { InspectionDrawingType } from './inspection-drawing-type';
4
+ import { InspectionDrawingTypeList } from './inspection-drawing-type-type';
5
+ import { InspectionPart } from '../inspection-part/inspection-part';
6
+ export declare class InspectionDrawingTypeQuery {
7
+ inspectionDrawingType(id: string, context: ResolverContext): Promise<InspectionDrawingType>;
8
+ inspectionDrawingTypes(params: ListParam, context: ResolverContext): Promise<InspectionDrawingTypeList>;
9
+ inspectionParts(inspectionDrawingType: InspectionDrawingType): Promise<InspectionPart[]>;
10
+ updater(inspectionDrawingType: InspectionDrawingType): Promise<User>;
11
+ creator(inspectionDrawingType: InspectionDrawingType): Promise<User>;
12
+ }
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InspectionDrawingTypeQuery = 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 inspection_drawing_type_1 = require("./inspection-drawing-type");
9
+ const inspection_drawing_type_type_1 = require("./inspection-drawing-type-type");
10
+ const inspection_part_1 = require("../inspection-part/inspection-part");
11
+ let InspectionDrawingTypeQuery = class InspectionDrawingTypeQuery {
12
+ async inspectionDrawingType(id, context) {
13
+ const { domain } = context.state;
14
+ return await (0, shell_1.getRepository)(inspection_drawing_type_1.InspectionDrawingType).findOne({
15
+ where: { domain: { id: domain.id }, id }
16
+ });
17
+ }
18
+ async inspectionDrawingTypes(params, context) {
19
+ const { domain } = context.state;
20
+ const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
21
+ domain,
22
+ params,
23
+ repository: await (0, shell_1.getRepository)(inspection_drawing_type_1.InspectionDrawingType),
24
+ searchables: ['name']
25
+ });
26
+ const [items, total] = await queryBuilder.getManyAndCount();
27
+ return { items, total };
28
+ }
29
+ async inspectionParts(inspectionDrawingType) {
30
+ return await (0, shell_1.getRepository)(inspection_part_1.InspectionPart).find({
31
+ where: { inspectionDrawingType: { id: inspectionDrawingType.id } },
32
+ order: { sequence: 'ASC' }
33
+ });
34
+ }
35
+ async updater(inspectionDrawingType) {
36
+ return inspectionDrawingType.updaterId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: inspectionDrawingType.updaterId }));
37
+ }
38
+ async creator(inspectionDrawingType) {
39
+ return inspectionDrawingType.creatorId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: inspectionDrawingType.creatorId }));
40
+ }
41
+ };
42
+ tslib_1.__decorate([
43
+ (0, type_graphql_1.Query)(returns => inspection_drawing_type_1.InspectionDrawingType, { nullable: true, description: 'To fetch a InspectionDrawingType' }),
44
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
45
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
46
+ tslib_1.__metadata("design:type", Function),
47
+ tslib_1.__metadata("design:paramtypes", [String, Object]),
48
+ tslib_1.__metadata("design:returntype", Promise)
49
+ ], InspectionDrawingTypeQuery.prototype, "inspectionDrawingType", null);
50
+ tslib_1.__decorate([
51
+ (0, type_graphql_1.Query)(returns => inspection_drawing_type_type_1.InspectionDrawingTypeList, { description: 'To fetch multiple InspectionDrawingTypes' }),
52
+ tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
53
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
54
+ tslib_1.__metadata("design:type", Function),
55
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
56
+ tslib_1.__metadata("design:returntype", Promise)
57
+ ], InspectionDrawingTypeQuery.prototype, "inspectionDrawingTypes", null);
58
+ tslib_1.__decorate([
59
+ (0, type_graphql_1.FieldResolver)(type => [inspection_part_1.InspectionPart]),
60
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
61
+ tslib_1.__metadata("design:type", Function),
62
+ tslib_1.__metadata("design:paramtypes", [inspection_drawing_type_1.InspectionDrawingType]),
63
+ tslib_1.__metadata("design:returntype", Promise)
64
+ ], InspectionDrawingTypeQuery.prototype, "inspectionParts", null);
65
+ tslib_1.__decorate([
66
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
67
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
68
+ tslib_1.__metadata("design:type", Function),
69
+ tslib_1.__metadata("design:paramtypes", [inspection_drawing_type_1.InspectionDrawingType]),
70
+ tslib_1.__metadata("design:returntype", Promise)
71
+ ], InspectionDrawingTypeQuery.prototype, "updater", null);
72
+ tslib_1.__decorate([
73
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
74
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
75
+ tslib_1.__metadata("design:type", Function),
76
+ tslib_1.__metadata("design:paramtypes", [inspection_drawing_type_1.InspectionDrawingType]),
77
+ tslib_1.__metadata("design:returntype", Promise)
78
+ ], InspectionDrawingTypeQuery.prototype, "creator", null);
79
+ InspectionDrawingTypeQuery = tslib_1.__decorate([
80
+ (0, type_graphql_1.Resolver)(inspection_drawing_type_1.InspectionDrawingType)
81
+ ], InspectionDrawingTypeQuery);
82
+ exports.InspectionDrawingTypeQuery = InspectionDrawingTypeQuery;
83
+ //# sourceMappingURL=inspection-drawing-type-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection-drawing-type-query.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,uEAAiE;AACjE,iFAA0E;AAC1E,wEAAmE;AAG5D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAE/B,AAAN,KAAK,CAAC,qBAAqB,CAAY,EAAU,EAAS,OAAwB;QAChF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EA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,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC1H,CAAC;CACF,CAAA;AA5CO;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,+CAAsB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IACjF,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uEAMxD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,wDAAyB,EAAE,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;IAEtG,mBAAA,IAAA,mBAAI,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC,CAAA;IACvB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAD2B,iBAAS;;wEAe3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gCAAc,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;iEAKzE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;yDAEjE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAwB,+CAAqB;;yDAEjE;AA7CU,0BAA0B;IADtC,IAAA,uBAAQ,EAAC,+CAAqB,CAAC;GACnB,0BAA0B,CA8CtC;AA9CY,gEAA0B","sourcesContent":["import { Resolver, Query, FieldResolver, 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 { InspectionDrawingType } from './inspection-drawing-type'\nimport { InspectionDrawingTypeList } from './inspection-drawing-type-type'\nimport { InspectionPart } from '../inspection-part/inspection-part'\n\n@Resolver(InspectionDrawingType)\nexport class InspectionDrawingTypeQuery {\n @Query(returns => InspectionDrawingType!, { nullable: true, description: 'To fetch a InspectionDrawingType' })\n async inspectionDrawingType(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<InspectionDrawingType> {\n const { domain } = context.state\n\n return await getRepository(InspectionDrawingType).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => InspectionDrawingTypeList, { description: 'To fetch multiple InspectionDrawingTypes' })\n async inspectionDrawingTypes(\n @Args(type => ListParam) params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<InspectionDrawingTypeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(InspectionDrawingType),\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [InspectionPart])\n async inspectionParts(@Root() inspectionDrawingType: InspectionDrawingType): Promise<InspectionPart[]> {\n return await getRepository(InspectionPart).find({\n where: { inspectionDrawingType: { id: inspectionDrawingType.id } },\n order: { sequence: 'ASC' }\n })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() inspectionDrawingType: InspectionDrawingType): Promise<User> {\n return inspectionDrawingType.updaterId && (await getRepository(User).findOneBy({ id: inspectionDrawingType.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() inspectionDrawingType: InspectionDrawingType): Promise<User> {\n return inspectionDrawingType.creatorId && (await getRepository(User).findOneBy({ id: inspectionDrawingType.creatorId }))\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { InspectionDrawingType } from './inspection-drawing-type';
2
+ export declare class InspectionDrawingTypePatch {
3
+ id?: string;
4
+ name?: string;
5
+ cuFlag?: string;
6
+ }
7
+ export declare class InspectionDrawingTypeList {
8
+ items: InspectionDrawingType[];
9
+ total: number;
10
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InspectionDrawingTypeList = exports.InspectionDrawingTypePatch = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const inspection_drawing_type_1 = require("./inspection-drawing-type");
7
+ let InspectionDrawingTypePatch = class InspectionDrawingTypePatch {
8
+ };
9
+ tslib_1.__decorate([
10
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
11
+ tslib_1.__metadata("design:type", String)
12
+ ], InspectionDrawingTypePatch.prototype, "id", void 0);
13
+ tslib_1.__decorate([
14
+ (0, type_graphql_1.Field)({ nullable: true }),
15
+ tslib_1.__metadata("design:type", String)
16
+ ], InspectionDrawingTypePatch.prototype, "name", void 0);
17
+ tslib_1.__decorate([
18
+ (0, type_graphql_1.Field)({ nullable: true }),
19
+ tslib_1.__metadata("design:type", String)
20
+ ], InspectionDrawingTypePatch.prototype, "cuFlag", void 0);
21
+ InspectionDrawingTypePatch = tslib_1.__decorate([
22
+ (0, type_graphql_1.InputType)()
23
+ ], InspectionDrawingTypePatch);
24
+ exports.InspectionDrawingTypePatch = InspectionDrawingTypePatch;
25
+ let InspectionDrawingTypeList = class InspectionDrawingTypeList {
26
+ };
27
+ tslib_1.__decorate([
28
+ (0, type_graphql_1.Field)(type => [inspection_drawing_type_1.InspectionDrawingType]),
29
+ tslib_1.__metadata("design:type", Array)
30
+ ], InspectionDrawingTypeList.prototype, "items", void 0);
31
+ tslib_1.__decorate([
32
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
33
+ tslib_1.__metadata("design:type", Number)
34
+ ], InspectionDrawingTypeList.prototype, "total", void 0);
35
+ InspectionDrawingTypeList = tslib_1.__decorate([
36
+ (0, type_graphql_1.ObjectType)()
37
+ ], InspectionDrawingTypeList);
38
+ exports.InspectionDrawingTypeList = InspectionDrawingTypeList;
39
+ //# sourceMappingURL=inspection-drawing-type-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection-drawing-type-type.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,uEAAiE;AAG1D,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAStC,CAAA;AARC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACX;AARJ,0BAA0B;IADtC,IAAA,wBAAS,GAAE;GACC,0BAA0B,CAStC;AATY,gEAA0B;AAYhC,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAMrC,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,+CAAqB,CAAC,CAAC;;wDACT;AAE9B;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;wDACN;AALF,yBAAyB;IADrC,IAAA,yBAAU,GAAE;GACA,yBAAyB,CAMrC;AANY,8DAAyB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { InspectionDrawingType } from './inspection-drawing-type'\n\n@InputType()\nexport class InspectionDrawingTypePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class InspectionDrawingTypeList {\n @Field(type => [InspectionDrawingType])\n items: InspectionDrawingType[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { User } from '@things-factory/auth-base';
2
+ import { Domain } from '@things-factory/shell';
3
+ import { InspectionPart } from '../inspection-part/inspection-part';
4
+ export declare class InspectionDrawingType {
5
+ readonly id: string;
6
+ domain?: Domain;
7
+ domainId?: string;
8
+ name?: string;
9
+ inspectionParts?: InspectionPart[];
10
+ createdAt?: Date;
11
+ updatedAt?: Date;
12
+ creator?: User;
13
+ creatorId?: string;
14
+ updater?: User;
15
+ updaterId?: string;
16
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InspectionDrawingType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const shell_1 = require("@things-factory/shell");
9
+ const inspection_part_1 = require("../inspection-part/inspection-part");
10
+ let InspectionDrawingType = class InspectionDrawingType {
11
+ };
12
+ tslib_1.__decorate([
13
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
14
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
15
+ tslib_1.__metadata("design:type", String)
16
+ ], InspectionDrawingType.prototype, "id", void 0);
17
+ tslib_1.__decorate([
18
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
19
+ (0, type_graphql_1.Field)({ nullable: true }),
20
+ tslib_1.__metadata("design:type", shell_1.Domain)
21
+ ], InspectionDrawingType.prototype, "domain", void 0);
22
+ tslib_1.__decorate([
23
+ (0, typeorm_1.RelationId)((inspectionDrawingType) => inspectionDrawingType.domain),
24
+ tslib_1.__metadata("design:type", String)
25
+ ], InspectionDrawingType.prototype, "domainId", void 0);
26
+ tslib_1.__decorate([
27
+ (0, typeorm_1.Column)({ nullable: false, comment: '검측 도면 타입 이름' }),
28
+ (0, type_graphql_1.Field)({ nullable: true }),
29
+ tslib_1.__metadata("design:type", String)
30
+ ], InspectionDrawingType.prototype, "name", void 0);
31
+ tslib_1.__decorate([
32
+ (0, type_graphql_1.Field)(() => [inspection_part_1.InspectionPart], { nullable: true }),
33
+ (0, typeorm_1.OneToMany)(() => inspection_part_1.InspectionPart, inspectionPart => inspectionPart.inspectionDrawingType),
34
+ tslib_1.__metadata("design:type", Array)
35
+ ], InspectionDrawingType.prototype, "inspectionParts", void 0);
36
+ tslib_1.__decorate([
37
+ (0, typeorm_1.CreateDateColumn)(),
38
+ (0, type_graphql_1.Field)({ nullable: true }),
39
+ tslib_1.__metadata("design:type", Date)
40
+ ], InspectionDrawingType.prototype, "createdAt", void 0);
41
+ tslib_1.__decorate([
42
+ (0, typeorm_1.UpdateDateColumn)(),
43
+ (0, type_graphql_1.Field)({ nullable: true }),
44
+ tslib_1.__metadata("design:type", Date)
45
+ ], InspectionDrawingType.prototype, "updatedAt", void 0);
46
+ tslib_1.__decorate([
47
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
48
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
49
+ tslib_1.__metadata("design:type", auth_base_1.User)
50
+ ], InspectionDrawingType.prototype, "creator", void 0);
51
+ tslib_1.__decorate([
52
+ (0, typeorm_1.RelationId)((inspectionDrawingType) => inspectionDrawingType.creator),
53
+ tslib_1.__metadata("design:type", String)
54
+ ], InspectionDrawingType.prototype, "creatorId", void 0);
55
+ tslib_1.__decorate([
56
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
57
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
58
+ tslib_1.__metadata("design:type", auth_base_1.User)
59
+ ], InspectionDrawingType.prototype, "updater", void 0);
60
+ tslib_1.__decorate([
61
+ (0, typeorm_1.RelationId)((inspectionDrawingType) => inspectionDrawingType.updater),
62
+ tslib_1.__metadata("design:type", String)
63
+ ], InspectionDrawingType.prototype, "updaterId", void 0);
64
+ InspectionDrawingType = tslib_1.__decorate([
65
+ (0, typeorm_1.Entity)(),
66
+ (0, typeorm_1.Index)('ix_inspection_drawing_type_0', (inspectionDrawingType) => [inspectionDrawingType.domain, inspectionDrawingType.name], {
67
+ unique: true
68
+ }),
69
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for InspectionDrawingType' })
70
+ ], InspectionDrawingType);
71
+ exports.InspectionDrawingType = InspectionDrawingType;
72
+ //# sourceMappingURL=inspection-drawing-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection-drawing-type.js","sourceRoot":"","sources":["../../../server/service/inspection-drawing-type/inspection-drawing-type.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AACpD,yDAAgD;AAChD,iDAA8C;AAC9C,wEAAmE;AAW5D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CA0CjC,CAAA;AAzCC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;iDACC;AAEnB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;qDAAA;AAEf;IAAC,IAAA,oBAAU,EAAC,CAAC,qBAA4C,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,CAAC;;uDAC1E;AAEjB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;IACnD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACb;AAGb;IAAC,IAAA,oBAAK,EAAC,GAAG,EAAE,CAAC,CAAC,gCAAc,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;;8DACtD;AAElC;IA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,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\nimport { User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\nimport { InspectionPart } from '../inspection-part/inspection-part'\n\n@Entity()\n@Index(\n 'ix_inspection_drawing_type_0',\n (inspectionDrawingType: InspectionDrawingType) => [inspectionDrawingType.domain, inspectionDrawingType.name],\n {\n unique: true\n }\n)\n@ObjectType({ description: 'Entity for InspectionDrawingType' })\nexport class InspectionDrawingType {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((inspectionDrawingType: InspectionDrawingType) => inspectionDrawingType.domain)\n domainId?: string\n\n @Column({ nullable: false, comment: '검측 도면 타입 이름' })\n @Field({ nullable: true })\n name?: string\n\n // 검측 부위 정보 (하위 테이블 참조)\n @Field(() => [InspectionPart], { nullable: true })\n @OneToMany(() => InspectionPart, inspectionPart => inspectionPart.inspectionDrawingType)\n inspectionParts?: InspectionPart[]\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((inspectionDrawingType: InspectionDrawingType) => inspectionDrawingType.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((inspectionDrawingType: InspectionDrawingType) => inspectionDrawingType.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { InspectionPart } from './inspection-part';
2
+ import { InspectionPartQuery } from './inspection-part-query';
3
+ import { InspectionPartMutation } from './inspection-part-mutation';
4
+ export declare const entities: (typeof InspectionPart)[];
5
+ export declare const resolvers: (typeof InspectionPartQuery | typeof InspectionPartMutation)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const inspection_part_1 = require("./inspection-part");
5
+ const inspection_part_query_1 = require("./inspection-part-query");
6
+ const inspection_part_mutation_1 = require("./inspection-part-mutation");
7
+ exports.entities = [inspection_part_1.InspectionPart];
8
+ exports.resolvers = [inspection_part_query_1.InspectionPartQuery, inspection_part_mutation_1.InspectionPartMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/inspection-part/index.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAClD,mEAA6D;AAC7D,yEAAmE;AAEtD,QAAA,QAAQ,GAAG,CAAC,gCAAc,CAAC,CAAA;AAC3B,QAAA,SAAS,GAAG,CAAC,2CAAmB,EAAE,iDAAsB,CAAC,CAAA","sourcesContent":["import { InspectionPart } from './inspection-part'\nimport { InspectionPartQuery } from './inspection-part-query'\nimport { InspectionPartMutation } from './inspection-part-mutation'\n\nexport const entities = [InspectionPart]\nexport const resolvers = [InspectionPartQuery, InspectionPartMutation]\n"]}
@@ -0,0 +1,6 @@
1
+ import { InspectionPart } from './inspection-part';
2
+ import { InspectionPartPatch } from './inspection-part-type';
3
+ export declare class InspectionPartMutation {
4
+ updateMultipleInspectionPart(patches: InspectionPartPatch[], inspectionDrawingTypeId: string, context: ResolverContext): Promise<InspectionPart[]>;
5
+ deleteInspectionParts(ids: string[], context: ResolverContext): Promise<boolean>;
6
+ }