@dssp/supervision 1.0.0-alpha.0 → 1.0.0-alpha.14

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 (288) hide show
  1. package/dist-client/pages/action-plan/action-plan-importer.js.map +1 -1
  2. package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
  3. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
  4. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +1 -1
  5. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  6. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +0 -1
  7. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +16 -11
  8. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  9. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +2 -2
  10. package/dist-client/pages/building-inspection/building-inspection-list.js +2 -1
  11. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  12. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
  13. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +3 -3
  14. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  15. package/dist-client/pages/building-inspection/inspection-create-popup.js +8 -5
  16. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  17. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +46 -0
  18. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +930 -0
  19. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -0
  20. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +2 -0
  21. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +736 -0
  22. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -0
  23. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +1 -0
  24. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +304 -0
  25. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +1 -0
  26. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +15 -0
  27. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +430 -0
  28. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +1 -0
  29. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
  30. package/dist-client/pages/checklist/checklist-view.d.ts +6 -0
  31. package/dist-client/pages/checklist/checklist-view.js +291 -185
  32. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  33. package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
  34. package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
  35. package/dist-client/pages/checklist-template/checklist-template-item.js +8 -3
  36. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
  37. package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
  38. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  39. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +2 -2
  40. package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -1
  41. package/dist-client/pages/issue/issue-importer.js.map +1 -1
  42. package/dist-client/pages/issue/issue-list-page.js.map +1 -1
  43. package/dist-client/pages/project-report/project-report-importer.js.map +1 -1
  44. package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
  45. package/dist-client/pages/supervisor/supervisor-importer.js.map +1 -1
  46. package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
  47. package/dist-client/route.d.ts +1 -1
  48. package/dist-client/route.js +3 -0
  49. package/dist-client/route.js.map +1 -1
  50. package/dist-client/stt/speech-to-text.d.ts +36 -0
  51. package/dist-client/stt/speech-to-text.js +89 -0
  52. package/dist-client/stt/speech-to-text.js.map +1 -0
  53. package/dist-client/stt/stt-utils.d.ts +28 -0
  54. package/dist-client/stt/stt-utils.js +146 -0
  55. package/dist-client/stt/stt-utils.js.map +1 -0
  56. package/dist-client/tsconfig.tsbuildinfo +1 -1
  57. package/dist-server/middlewares/index.js +1 -2
  58. package/dist-server/middlewares/index.js.map +1 -1
  59. package/dist-server/service/action-plan/action-plan-mutation.js +2 -2
  60. package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
  61. package/dist-server/service/action-plan/action-plan-query.js +2 -2
  62. package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
  63. package/dist-server/service/action-plan/action-plan-type.js +6 -6
  64. package/dist-server/service/action-plan/action-plan-type.js.map +1 -1
  65. package/dist-server/service/action-plan/action-plan.js +3 -3
  66. package/dist-server/service/action-plan/action-plan.js.map +1 -1
  67. package/dist-server/service/action-plan/index.d.ts +0 -1
  68. package/dist-server/service/action-plan/index.js +1 -2
  69. package/dist-server/service/action-plan/index.js.map +1 -1
  70. package/dist-server/service/building-inspection/building-inspection-history.js +2 -2
  71. package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
  72. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +1 -0
  73. package/dist-server/service/building-inspection/building-inspection-mutation.js +91 -14
  74. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  75. package/dist-server/service/building-inspection/building-inspection-query.d.ts +2 -1
  76. package/dist-server/service/building-inspection/building-inspection-query.js +33 -4
  77. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  78. package/dist-server/service/building-inspection/building-inspection-type.d.ts +10 -3
  79. package/dist-server/service/building-inspection/building-inspection-type.js +45 -20
  80. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  81. package/dist-server/service/building-inspection/building-inspection.d.ts +9 -0
  82. package/dist-server/service/building-inspection/building-inspection.js +43 -5
  83. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  84. package/dist-server/service/building-inspection/index.d.ts +2 -4
  85. package/dist-server/service/building-inspection/index.js +2 -4
  86. package/dist-server/service/building-inspection/index.js.map +1 -1
  87. package/dist-server/service/checklist/checklist-history.d.ts +8 -0
  88. package/dist-server/service/checklist/checklist-history.js +38 -2
  89. package/dist-server/service/checklist/checklist-history.js.map +1 -1
  90. package/dist-server/service/checklist/checklist-mutation.js +2 -2
  91. package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
  92. package/dist-server/service/checklist/checklist-query.js +2 -2
  93. package/dist-server/service/checklist/checklist-query.js.map +1 -1
  94. package/dist-server/service/checklist/checklist-type.js +6 -6
  95. package/dist-server/service/checklist/checklist-type.js.map +1 -1
  96. package/dist-server/service/checklist/checklist.d.ts +19 -1
  97. package/dist-server/service/checklist/checklist.js +78 -7
  98. package/dist-server/service/checklist/checklist.js.map +1 -1
  99. package/dist-server/service/checklist/index.d.ts +0 -2
  100. package/dist-server/service/checklist/index.js +1 -3
  101. package/dist-server/service/checklist/index.js.map +1 -1
  102. package/dist-server/service/checklist-item/checklist-item-mutation.js +2 -2
  103. package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -1
  104. package/dist-server/service/checklist-item/checklist-item-query.js +2 -2
  105. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
  106. package/dist-server/service/checklist-item/checklist-item-type.js +2 -2
  107. package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -1
  108. package/dist-server/service/checklist-item/checklist-item.js +3 -3
  109. package/dist-server/service/checklist-item/checklist-item.js.map +1 -1
  110. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +2 -2
  111. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +1 -1
  112. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +2 -2
  113. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
  114. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +2 -2
  115. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +1 -1
  116. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +6 -6
  117. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +1 -1
  118. package/dist-server/service/checklist-item-comment/checklist-item-comment.js +2 -2
  119. package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +1 -1
  120. package/dist-server/service/checklist-item-comment/index.d.ts +0 -2
  121. package/dist-server/service/checklist-item-comment/index.js +1 -3
  122. package/dist-server/service/checklist-item-comment/index.js.map +1 -1
  123. package/dist-server/service/checklist-template/checklist-template-mutation.js +2 -2
  124. package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -1
  125. package/dist-server/service/checklist-template/checklist-template-query.js +2 -2
  126. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
  127. package/dist-server/service/checklist-template/checklist-template-type.js +4 -4
  128. package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -1
  129. package/dist-server/service/checklist-template/checklist-template.js +2 -2
  130. package/dist-server/service/checklist-template/checklist-template.js.map +1 -1
  131. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +2 -2
  132. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
  133. package/dist-server/service/checklist-template-item/checklist-template-item-query.js +2 -2
  134. package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -1
  135. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +4 -4
  136. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
  137. package/dist-server/service/checklist-template-item/checklist-template-item.js +4 -6
  138. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  139. package/dist-server/service/checklist-type/checklist-type-mutation.js +2 -2
  140. package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -1
  141. package/dist-server/service/checklist-type/checklist-type-query.js +2 -2
  142. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
  143. package/dist-server/service/checklist-type/checklist-type-type.js +4 -4
  144. package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -1
  145. package/dist-server/service/checklist-type/checklist-type.js +3 -3
  146. package/dist-server/service/checklist-type/checklist-type.js.map +1 -1
  147. package/dist-server/service/index.d.ts +0 -1
  148. package/dist-server/service/index.js +1 -11
  149. package/dist-server/service/index.js.map +1 -1
  150. package/dist-server/service/issue/index.d.ts +0 -1
  151. package/dist-server/service/issue/index.js +1 -2
  152. package/dist-server/service/issue/index.js.map +1 -1
  153. package/dist-server/service/issue/issue-mutation.js +2 -2
  154. package/dist-server/service/issue/issue-mutation.js.map +1 -1
  155. package/dist-server/service/issue/issue-query.js +2 -2
  156. package/dist-server/service/issue/issue-query.js.map +1 -1
  157. package/dist-server/service/issue/issue-type.js +6 -6
  158. package/dist-server/service/issue/issue-type.js.map +1 -1
  159. package/dist-server/service/issue/issue.js +3 -3
  160. package/dist-server/service/issue/issue.js.map +1 -1
  161. package/dist-server/service/project-report/index.d.ts +0 -1
  162. package/dist-server/service/project-report/index.js +1 -2
  163. package/dist-server/service/project-report/index.js.map +1 -1
  164. package/dist-server/service/project-report/project-report-mutation.js +2 -2
  165. package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
  166. package/dist-server/service/project-report/project-report-query.js +2 -2
  167. package/dist-server/service/project-report/project-report-query.js.map +1 -1
  168. package/dist-server/service/project-report/project-report-type.js +6 -6
  169. package/dist-server/service/project-report/project-report-type.js.map +1 -1
  170. package/dist-server/service/project-report/project-report.js +3 -3
  171. package/dist-server/service/project-report/project-report.js.map +1 -1
  172. package/dist-server/service/supervisor/index.d.ts +0 -1
  173. package/dist-server/service/supervisor/index.js +1 -2
  174. package/dist-server/service/supervisor/index.js.map +1 -1
  175. package/dist-server/service/supervisor/supervisor-mutation.js +2 -2
  176. package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
  177. package/dist-server/service/supervisor/supervisor-query.js +2 -2
  178. package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
  179. package/dist-server/service/supervisor/supervisor-type.js +6 -6
  180. package/dist-server/service/supervisor/supervisor-type.js.map +1 -1
  181. package/dist-server/service/supervisor/supervisor.js +3 -3
  182. package/dist-server/service/supervisor/supervisor.js.map +1 -1
  183. package/dist-server/tsconfig.tsbuildinfo +1 -1
  184. package/package.json +13 -13
  185. package/things-factory.config.js +3 -1
  186. package/client/bootstrap.ts +0 -1
  187. package/client/index.ts +0 -0
  188. package/client/pages/action-plan/action-plan-importer.ts +0 -94
  189. package/client/pages/action-plan/action-plan-list-page.ts +0 -340
  190. package/client/pages/building-inspection/building-inspection-detail-camera.ts +0 -277
  191. package/client/pages/building-inspection/building-inspection-detail-checklist.ts +0 -258
  192. package/client/pages/building-inspection/building-inspection-detail-drawing.ts +0 -288
  193. package/client/pages/building-inspection/building-inspection-list.ts +0 -565
  194. package/client/pages/building-inspection/component/building-inspection-detail-header.ts +0 -123
  195. package/client/pages/building-inspection/component/inspection-event-provider.ts +0 -81
  196. package/client/pages/building-inspection/inspection-create-popup.ts +0 -785
  197. package/client/pages/checklist/attachment-list-popup.ts +0 -301
  198. package/client/pages/checklist/checklist-view.ts +0 -581
  199. package/client/pages/checklist/comment-list-popup.ts +0 -328
  200. package/client/pages/checklist/file-preview-popup.ts +0 -70
  201. package/client/pages/checklist-template/checklist-template-item.ts +0 -240
  202. package/client/pages/checklist-template/checklist-template-list.ts +0 -368
  203. package/client/pages/checklist-template/checklist-type-management.ts +0 -262
  204. package/client/pages/issue/issue-importer.ts +0 -94
  205. package/client/pages/issue/issue-list-page.ts +0 -340
  206. package/client/pages/project-report/project-report-importer.ts +0 -94
  207. package/client/pages/project-report/project-report-list-page.ts +0 -340
  208. package/client/pages/supervisor/supervisor-importer.ts +0 -94
  209. package/client/pages/supervisor/supervisor-list-page.ts +0 -340
  210. package/client/route.ts +0 -27
  211. package/client/tsconfig.json +0 -11
  212. package/dist-server/service/building-inspection/event-subscriber.d.ts +0 -7
  213. package/dist-server/service/building-inspection/event-subscriber.js +0 -21
  214. package/dist-server/service/building-inspection/event-subscriber.js.map +0 -1
  215. package/dist-server/service/checklist/event-subscriber.d.ts +0 -7
  216. package/dist-server/service/checklist/event-subscriber.js +0 -21
  217. package/dist-server/service/checklist/event-subscriber.js.map +0 -1
  218. package/dist-server/service/checklist-item-comment/event-subscriber.d.ts +0 -7
  219. package/dist-server/service/checklist-item-comment/event-subscriber.js +0 -21
  220. package/dist-server/service/checklist-item-comment/event-subscriber.js.map +0 -1
  221. package/server/controllers/index.ts +0 -0
  222. package/server/index.ts +0 -4
  223. package/server/middlewares/index.ts +0 -3
  224. package/server/migrations/index.ts +0 -9
  225. package/server/routes.ts +0 -28
  226. package/server/service/action-plan/action-plan-mutation.ts +0 -198
  227. package/server/service/action-plan/action-plan-query.ts +0 -62
  228. package/server/service/action-plan/action-plan-type.ts +0 -61
  229. package/server/service/action-plan/action-plan.ts +0 -103
  230. package/server/service/action-plan/index.ts +0 -7
  231. package/server/service/building-inspection/building-inspection-history.ts +0 -72
  232. package/server/service/building-inspection/building-inspection-mutation.ts +0 -276
  233. package/server/service/building-inspection/building-inspection-query.ts +0 -242
  234. package/server/service/building-inspection/building-inspection-type.ts +0 -145
  235. package/server/service/building-inspection/building-inspection.ts +0 -108
  236. package/server/service/building-inspection/event-subscriber.ts +0 -20
  237. package/server/service/building-inspection/index.ts +0 -11
  238. package/server/service/checklist/checklist-history.ts +0 -96
  239. package/server/service/checklist/checklist-mutation.ts +0 -103
  240. package/server/service/checklist/checklist-query.ts +0 -58
  241. package/server/service/checklist/checklist-type.ts +0 -49
  242. package/server/service/checklist/checklist.ts +0 -127
  243. package/server/service/checklist/event-subscriber.ts +0 -17
  244. package/server/service/checklist/index.ts +0 -9
  245. package/server/service/checklist-item/checklist-item-mutation.ts +0 -5
  246. package/server/service/checklist-item/checklist-item-query.ts +0 -84
  247. package/server/service/checklist-item/checklist-item-type.ts +0 -12
  248. package/server/service/checklist-item/checklist-item.ts +0 -103
  249. package/server/service/checklist-item/index.ts +0 -7
  250. package/server/service/checklist-item-comment/checklist-item-comment-history.ts +0 -69
  251. package/server/service/checklist-item-comment/checklist-item-comment-mutation.ts +0 -80
  252. package/server/service/checklist-item-comment/checklist-item-comment-query.ts +0 -36
  253. package/server/service/checklist-item-comment/checklist-item-comment-type.ts +0 -32
  254. package/server/service/checklist-item-comment/checklist-item-comment.ts +0 -56
  255. package/server/service/checklist-item-comment/event-subscriber.ts +0 -17
  256. package/server/service/checklist-item-comment/index.ts +0 -9
  257. package/server/service/checklist-template/checklist-template-mutation.ts +0 -66
  258. package/server/service/checklist-template/checklist-template-query.ts +0 -39
  259. package/server/service/checklist-template/checklist-template-type.ts +0 -23
  260. package/server/service/checklist-template/checklist-template.ts +0 -71
  261. package/server/service/checklist-template/index.ts +0 -6
  262. package/server/service/checklist-template-item/checklist-template-item-mutation.ts +0 -64
  263. package/server/service/checklist-template-item/checklist-template-item-query.ts +0 -44
  264. package/server/service/checklist-template-item/checklist-template-item-type.ts +0 -39
  265. package/server/service/checklist-template-item/checklist-template-item.ts +0 -68
  266. package/server/service/checklist-template-item/index.ts +0 -6
  267. package/server/service/checklist-type/checklist-type-mutation.ts +0 -66
  268. package/server/service/checklist-type/checklist-type-query.ts +0 -39
  269. package/server/service/checklist-type/checklist-type-type.ts +0 -26
  270. package/server/service/checklist-type/checklist-type.ts +0 -64
  271. package/server/service/checklist-type/index.ts +0 -6
  272. package/server/service/index.ts +0 -88
  273. package/server/service/issue/index.ts +0 -7
  274. package/server/service/issue/issue-mutation.ts +0 -198
  275. package/server/service/issue/issue-query.ts +0 -62
  276. package/server/service/issue/issue-type.ts +0 -61
  277. package/server/service/issue/issue.ts +0 -100
  278. package/server/service/project-report/index.ts +0 -7
  279. package/server/service/project-report/project-report-mutation.ts +0 -198
  280. package/server/service/project-report/project-report-query.ts +0 -62
  281. package/server/service/project-report/project-report-type.ts +0 -61
  282. package/server/service/project-report/project-report.ts +0 -113
  283. package/server/service/supervisor/index.ts +0 -7
  284. package/server/service/supervisor/supervisor-mutation.ts +0 -198
  285. package/server/service/supervisor/supervisor-query.ts +0 -62
  286. package/server/service/supervisor/supervisor-type.ts +0 -61
  287. package/server/service/supervisor/supervisor.ts +0 -108
  288. package/server/tsconfig.json +0 -10
@@ -1,71 +0,0 @@
1
- import {
2
- CreateDateColumn,
3
- UpdateDateColumn,
4
- DeleteDateColumn,
5
- Entity,
6
- Index,
7
- Column,
8
- RelationId,
9
- ManyToOne,
10
- OneToMany,
11
- PrimaryGeneratedColumn
12
- } from 'typeorm'
13
- import { ObjectType, Field, ID } from 'type-graphql'
14
-
15
- import { Domain } from '@things-factory/shell'
16
- import { User } from '@things-factory/auth-base'
17
- import { ChecklistTemplateItem } from '../checklist-template-item/checklist-template-item'
18
-
19
- @Entity({ comment: '체크리스트 템플릿' })
20
- @Index('ix_checklist_template_0', (checklistTemplate: ChecklistTemplate) => [checklistTemplate.domain, checklistTemplate.name], {
21
- unique: true,
22
- where: '"deleted_at" IS NULL'
23
- })
24
- @ObjectType()
25
- export class ChecklistTemplate {
26
- @PrimaryGeneratedColumn('uuid')
27
- @Field(type => ID)
28
- readonly id: string
29
-
30
- @ManyToOne(type => Domain)
31
- @Field({ nullable: true })
32
- domain?: Domain
33
-
34
- @RelationId((checklistTemplate: ChecklistTemplate) => checklistTemplate.domain)
35
- domainId?: string
36
-
37
- @Column({ nullable: true, comment: '이름' })
38
- @Field({ nullable: true })
39
- name?: string
40
-
41
- // 체크리스트 템플릿 아이템 정보 (하위 테이블 참조)
42
- @Field(() => [ChecklistTemplateItem])
43
- @OneToMany(() => ChecklistTemplateItem, checklistTemplateItem => checklistTemplateItem.checklistTemplate)
44
- checklistTemplateItems?: ChecklistTemplateItem[]
45
-
46
- @CreateDateColumn()
47
- @Field({ nullable: true })
48
- createdAt?: Date
49
-
50
- @UpdateDateColumn()
51
- @Field({ nullable: true })
52
- updatedAt?: Date
53
-
54
- @DeleteDateColumn()
55
- @Field({ nullable: true })
56
- deletedAt?: Date
57
-
58
- @ManyToOne(type => User, { nullable: true })
59
- @Field(type => User, { nullable: true })
60
- creator?: User
61
-
62
- @RelationId((checklistTemplate: ChecklistTemplate) => checklistTemplate.creator)
63
- creatorId?: string
64
-
65
- @ManyToOne(type => User, { nullable: true })
66
- @Field(type => User, { nullable: true })
67
- updater?: User
68
-
69
- @RelationId((checklistTemplate: ChecklistTemplate) => checklistTemplate.updater)
70
- updaterId?: string
71
- }
@@ -1,6 +0,0 @@
1
- import { ChecklistTemplate } from './checklist-template'
2
- import { ChecklistTemplateQuery } from './checklist-template-query'
3
- import { ChecklistTemplateMutation } from './checklist-template-mutation'
4
-
5
- export const entities = [ChecklistTemplate]
6
- export const resolvers = [ChecklistTemplateQuery, ChecklistTemplateMutation]
@@ -1,64 +0,0 @@
1
- import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'
2
- import { In } from 'typeorm'
3
- import { ChecklistTemplateItem } from './checklist-template-item'
4
- import { ChecklistTemplateItemPatch } from './checklist-template-item-type'
5
- import { ChecklistTemplate } from '../checklist-template/checklist-template'
6
-
7
- @Resolver(ChecklistTemplateItem)
8
- export class ChecklistTemplateItemMutation {
9
- @Directive('@transaction')
10
- @Mutation(returns => [ChecklistTemplateItem], { description: "To modify multiple ChecklistTemplateItems' information" })
11
- async updateMultipleChecklistTemplateItems(
12
- @Arg('patches', type => [ChecklistTemplateItemPatch]) patches: ChecklistTemplateItemPatch[],
13
- @Arg('checklistTemplateId') checklistTemplateId: string,
14
- @Ctx() context: ResolverContext
15
- ): Promise<ChecklistTemplateItem[]> {
16
- const { domain, user, tx } = context.state
17
-
18
- let results = []
19
-
20
- const checklistTemplateItemRepo = tx.getRepository(ChecklistTemplateItem)
21
- const checklistTemplate = await tx.getRepository(ChecklistTemplate).findOneBy({ id: checklistTemplateId })
22
-
23
- await checklistTemplateItemRepo.delete({ checklistTemplate: { id: checklistTemplateId } })
24
-
25
- for (let i = 0; i < patches.length; i++) {
26
- const result = await checklistTemplateItemRepo.save({
27
- ...patches[i],
28
- sequence: i,
29
- checklistTemplate,
30
- creator: user,
31
- updater: user
32
- })
33
-
34
- results.push({ ...result, cuFlag: '+' })
35
- }
36
-
37
- return results
38
- }
39
-
40
- @Directive('@transaction')
41
- @Mutation(returns => Boolean, { description: 'To delete ChecklistTemplateItem' })
42
- async deleteChecklistTemplateItem(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {
43
- const { domain, tx } = context.state
44
-
45
- await tx.getRepository(ChecklistTemplateItem).delete({ id })
46
-
47
- return true
48
- }
49
-
50
- @Directive('@transaction')
51
- @Mutation(returns => Boolean, { description: 'To delete multiple ChecklistTemplateItems' })
52
- async deleteChecklistTemplateItems(
53
- @Arg('ids', type => [String]) ids: string[],
54
- @Ctx() context: ResolverContext
55
- ): Promise<boolean> {
56
- const { domain, tx } = context.state
57
-
58
- await tx.getRepository(ChecklistTemplateItem).delete({
59
- id: In(ids)
60
- })
61
-
62
- return true
63
- }
64
- }
@@ -1,44 +0,0 @@
1
- import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'
2
- import { getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
3
- import { User } from '@things-factory/auth-base'
4
- import { ChecklistTemplateItem } from './checklist-template-item'
5
- import { ChecklistTemplateItemList } from './checklist-template-item-type'
6
- import { ChecklistType } from '../checklist-type/checklist-type'
7
-
8
- @Resolver(ChecklistTemplateItem)
9
- export class ChecklistTemplateItemQuery {
10
- @Query(returns => ChecklistTemplateItem!, { nullable: true, description: 'To fetch a ChecklistTemplateItem' })
11
- async checklistTemplateItem(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<ChecklistTemplateItem> {
12
- return await getRepository(ChecklistTemplateItem).findOne({
13
- where: { id }
14
- })
15
- }
16
-
17
- @Query(returns => ChecklistTemplateItemList, { description: 'To fetch multiple ChecklistTemplateItems' })
18
- async checklistTemplateItems(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ChecklistTemplateItemList> {
19
- const queryBuilder = getQueryBuilderFromListParams({
20
- params,
21
- repository: await getRepository(ChecklistTemplateItem),
22
- searchables: ['name', 'description']
23
- })
24
-
25
- const [items, total] = await queryBuilder.getManyAndCount()
26
-
27
- return { items, total }
28
- }
29
-
30
- @FieldResolver(type => String)
31
- async detailTypeName(@Root() checklistTemplateItem: ChecklistTemplateItem): Promise<string> {
32
- return (await getRepository(ChecklistType).findOneBy({ id: checklistTemplateItem.detailType }))?.detailType || ''
33
- }
34
-
35
- @FieldResolver(type => User)
36
- async updater(@Root() checklistTemplateItem: ChecklistTemplateItem): Promise<User> {
37
- return await getRepository(User).findOneBy({ id: checklistTemplateItem.updaterId })
38
- }
39
-
40
- @FieldResolver(type => User)
41
- async creator(@Root() checklistTemplateItem: ChecklistTemplateItem): Promise<User> {
42
- return await getRepository(User).findOneBy({ id: checklistTemplateItem.creatorId })
43
- }
44
- }
@@ -1,39 +0,0 @@
1
- import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'
2
- import { ChecklistTemplateItem } from './checklist-template-item'
3
- import { ChecklistTypeMainType } from '../checklist-type/checklist-type'
4
-
5
- @InputType()
6
- export class ChecklistTemplateItemPatch {
7
- @Field(type => ID, { nullable: true })
8
- id?: string
9
-
10
- @Field({ nullable: true })
11
- name?: string
12
-
13
- @Field({ nullable: true })
14
- inspctionCriteria?: string
15
-
16
- @Field(type => Int, { nullable: true })
17
- sequence?: number
18
-
19
- @Field({ nullable: true })
20
- mainType?: ChecklistTypeMainType
21
-
22
- @Field({ nullable: true })
23
- detailType?: string
24
-
25
- @Field({ nullable: true })
26
- checklistTemplateId?: string
27
-
28
- @Field({ nullable: true })
29
- cuFlag?: string
30
- }
31
-
32
- @ObjectType()
33
- export class ChecklistTemplateItemList {
34
- @Field(type => [ChecklistTemplateItem])
35
- items: ChecklistTemplateItem[]
36
-
37
- @Field(type => Int)
38
- total: number
39
- }
@@ -1,68 +0,0 @@
1
- import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'
2
- import { ObjectType, Field, ID, Int } from 'type-graphql'
3
-
4
- import { User } from '@things-factory/auth-base'
5
- import { ChecklistTemplate } from '../checklist-template/checklist-template'
6
- import { ChecklistTypeMainType } from '../checklist-type/checklist-type'
7
-
8
- @Entity({ comment: '체크리스트 템플릿 아이템' })
9
- @Index('ix_checklist_template_item_0', (checklistTemplateItem: ChecklistTemplateItem) => [checklistTemplateItem.name], {
10
- unique: true
11
- })
12
- @Index('ix_checklist_template_item_1', (checklistTemplateItem: ChecklistTemplateItem) => [checklistTemplateItem.detailType])
13
- @ObjectType()
14
- export class ChecklistTemplateItem {
15
- @PrimaryGeneratedColumn('uuid')
16
- @Field(type => ID)
17
- readonly id: string
18
-
19
- @Column({ nullable: false, comment: '검사 항목' })
20
- @Field({ nullable: false })
21
- name: string
22
-
23
- @Column({ nullable: true, comment: '검사 기준' })
24
- @Field({ nullable: true })
25
- inspctionCriteria?: string
26
-
27
- @Column({ nullable: true, comment: '시퀀스' })
28
- @Field(type => Int, { nullable: true })
29
- sequence?: number
30
-
31
- @Column({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' })
32
- @Field({ nullable: false })
33
- mainType: ChecklistTypeMainType
34
-
35
- @Column({ nullable: false, comment: '상세 구분 ID (F.K)' })
36
- @Field({ nullable: false })
37
- detailType: string
38
-
39
- // 체크리스트 템플릿 정보 (상위 테이블 참조)
40
- @ManyToOne(type => ChecklistTemplate)
41
- @Field(type => ChecklistTemplate, { nullable: true })
42
- checklistTemplate?: ChecklistTemplate
43
-
44
- @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.checklistTemplate)
45
- checklistTemplateId?: string
46
-
47
- @CreateDateColumn()
48
- @Field({ nullable: true })
49
- createdAt?: Date
50
-
51
- @UpdateDateColumn()
52
- @Field({ nullable: true })
53
- updatedAt?: Date
54
-
55
- @ManyToOne(type => User, { nullable: true })
56
- @Field(type => User, { nullable: true })
57
- creator?: User
58
-
59
- @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.creator)
60
- creatorId?: string
61
-
62
- @ManyToOne(type => User, { nullable: true })
63
- @Field(type => User, { nullable: true })
64
- updater?: User
65
-
66
- @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.updater)
67
- updaterId?: string
68
- }
@@ -1,6 +0,0 @@
1
- import { ChecklistTemplateItem } from './checklist-template-item'
2
- import { ChecklistTemplateItemQuery } from './checklist-template-item-query'
3
- import { ChecklistTemplateItemMutation } from './checklist-template-item-mutation'
4
-
5
- export const entities = [ChecklistTemplateItem]
6
- export const resolvers = [ChecklistTemplateItemQuery, ChecklistTemplateItemMutation]
@@ -1,66 +0,0 @@
1
- import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'
2
- import { In } from 'typeorm'
3
- import { ChecklistType } from './checklist-type'
4
- import { ChecklistTypePatch } from './checklist-type-type'
5
-
6
- @Resolver(ChecklistType)
7
- export class ChecklistTypeMutation {
8
- @Directive('@transaction')
9
- @Mutation(returns => [ChecklistType], { description: "To modify multiple ChecklistTypes' information" })
10
- async updateMultipleChecklistType(
11
- @Arg('patches', type => [ChecklistTypePatch]) patches: ChecklistTypePatch[],
12
- @Ctx() context: ResolverContext
13
- ): Promise<ChecklistType[]> {
14
- const { domain, user, tx } = context.state
15
-
16
- let results = []
17
- const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')
18
- const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')
19
- const checklistTypeRepo = tx.getRepository(ChecklistType)
20
-
21
- if (_createRecords.length > 0) {
22
- for (let i = 0; i < _createRecords.length; i++) {
23
- const newRecord = _createRecords[i]
24
-
25
- const result = await checklistTypeRepo.save({
26
- ...newRecord,
27
- domain,
28
- creator: user,
29
- updater: user
30
- })
31
-
32
- results.push({ ...result, cuFlag: '+' })
33
- }
34
- }
35
-
36
- if (_updateRecords.length > 0) {
37
- for (let i = 0; i < _updateRecords.length; i++) {
38
- const updateRecord = _updateRecords[i]
39
- const checklistType = await checklistTypeRepo.findOneBy({ id: updateRecord.id })
40
-
41
- const result = await checklistTypeRepo.save({
42
- ...checklistType,
43
- ...updateRecord,
44
- updater: user
45
- })
46
-
47
- results.push({ ...result, cuFlag: 'M' })
48
- }
49
- }
50
-
51
- return results
52
- }
53
-
54
- @Directive('@transaction')
55
- @Mutation(returns => Boolean, { description: 'To delete multiple ChecklistTypes' })
56
- async deleteChecklistTypes(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {
57
- const { domain, tx } = context.state
58
-
59
- await tx.getRepository(ChecklistType).delete({
60
- domain: { id: domain.id },
61
- id: In(ids)
62
- })
63
-
64
- return true
65
- }
66
- }
@@ -1,39 +0,0 @@
1
- import { Resolver, Query, FieldResolver, Root, Args, Ctx } from 'type-graphql'
2
- import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
3
- import { User } from '@things-factory/auth-base'
4
- import { ChecklistType } from './checklist-type'
5
- import { ChecklistTypeList } from './checklist-type-type'
6
-
7
- @Resolver(ChecklistType)
8
- export class ChecklistTypeQuery {
9
- @Query(returns => ChecklistTypeList, { description: 'To fetch multiple ChecklistTypes' })
10
- async checklistTypes(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ChecklistTypeList> {
11
- const { domain } = context.state
12
-
13
- const queryBuilder = getQueryBuilderFromListParams({
14
- domain,
15
- params,
16
- repository: await getRepository(ChecklistType),
17
- searchables: ['mainType', 'detailType']
18
- })
19
-
20
- const [items, total] = await queryBuilder.getManyAndCount()
21
-
22
- return { items, total }
23
- }
24
-
25
- @FieldResolver(type => Domain)
26
- async domain(@Root() checklistType: ChecklistType): Promise<Domain> {
27
- return await getRepository(Domain).findOneBy({ id: checklistType.domainId })
28
- }
29
-
30
- @FieldResolver(type => User)
31
- async updater(@Root() checklistType: ChecklistType): Promise<User> {
32
- return await getRepository(User).findOneBy({ id: checklistType.updaterId })
33
- }
34
-
35
- @FieldResolver(type => User)
36
- async creator(@Root() checklistType: ChecklistType): Promise<User> {
37
- return await getRepository(User).findOneBy({ id: checklistType.creatorId })
38
- }
39
- }
@@ -1,26 +0,0 @@
1
- import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'
2
- import { ChecklistType, ChecklistTypeMainType } from './checklist-type'
3
-
4
- @InputType()
5
- export class ChecklistTypePatch {
6
- @Field(type => ID, { nullable: true })
7
- id?: string
8
-
9
- @Field({ nullable: true })
10
- mainType: ChecklistTypeMainType
11
-
12
- @Field({ nullable: true })
13
- detailType: string
14
-
15
- @Field({ nullable: true })
16
- cuFlag?: string
17
- }
18
-
19
- @ObjectType()
20
- export class ChecklistTypeList {
21
- @Field(type => [ChecklistType])
22
- items: ChecklistType[]
23
-
24
- @Field(type => Int)
25
- total: number
26
- }
@@ -1,64 +0,0 @@
1
- import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'
2
- import { ObjectType, Field, ID, registerEnumType } from 'type-graphql'
3
- import { Domain } from '@things-factory/shell'
4
- import { User } from '@things-factory/auth-base'
5
-
6
- export enum ChecklistTypeMainType {
7
- BASIC = '10',
8
- NON_BASIC = '20'
9
- }
10
-
11
- registerEnumType(ChecklistTypeMainType, {
12
- name: 'ChecklistTypeMainType',
13
- description: '체크리스트 구분 메인 구분'
14
- })
15
-
16
- @Entity({ comment: '체크리스트 구분' })
17
- @Index(
18
- 'ix_checklist_type_0',
19
- (checklistType: ChecklistType) => [checklistType.domain, checklistType.mainType, checklistType.detailType],
20
- { unique: true }
21
- )
22
- @ObjectType()
23
- export class ChecklistType {
24
- @PrimaryGeneratedColumn('uuid')
25
- @Field(type => ID)
26
- readonly id: string
27
-
28
- @ManyToOne(type => Domain)
29
- @Field({ nullable: true })
30
- domain?: Domain
31
-
32
- @RelationId((checklistType: ChecklistType) => checklistType.domain)
33
- domainId?: string
34
-
35
- @Column({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' })
36
- @Field({ nullable: false })
37
- mainType: ChecklistTypeMainType
38
-
39
- @Column({ nullable: false, comment: '상세 구분' })
40
- @Field({ nullable: false })
41
- detailType: string
42
-
43
- @CreateDateColumn()
44
- @Field({ nullable: true })
45
- createdAt?: Date
46
-
47
- @UpdateDateColumn()
48
- @Field({ nullable: true })
49
- updatedAt?: Date
50
-
51
- @ManyToOne(type => User, { nullable: true })
52
- @Field(type => User, { nullable: true })
53
- creator?: User
54
-
55
- @RelationId((checklistType: ChecklistType) => checklistType.creator)
56
- creatorId?: string
57
-
58
- @ManyToOne(type => User, { nullable: true })
59
- @Field(type => User, { nullable: true })
60
- updater?: User
61
-
62
- @RelationId((checklistType: ChecklistType) => checklistType.updater)
63
- updaterId?: string
64
- }
@@ -1,6 +0,0 @@
1
- import { ChecklistType } from './checklist-type'
2
- import { ChecklistTypeQuery } from './checklist-type-query'
3
- import { ChecklistTypeMutation } from './checklist-type-mutation'
4
-
5
- export const entities = [ChecklistType]
6
- export const resolvers = [ChecklistTypeQuery, ChecklistTypeMutation]
@@ -1,88 +0,0 @@
1
- /* EXPORT ENTITY TYPES */
2
- export * from './action-plan/action-plan'
3
- export * from './issue/issue'
4
- export * from './project-report/project-report'
5
- export * from './supervisor/supervisor'
6
- export * from './checklist-type/checklist-type'
7
- export * from './checklist/checklist'
8
- export * from './checklist-item/checklist-item'
9
- export * from './checklist-item-comment/checklist-item-comment'
10
- export * from './checklist-template/checklist-template'
11
- export * from './checklist-template-item/checklist-template-item'
12
- export * from './building-inspection/building-inspection'
13
-
14
- /* IMPORT ENTITIES AND RESOLVERS */
15
- import {
16
- entities as ActionPlanEntities,
17
- resolvers as ActionPlanResolvers,
18
- subscribers as ActionPlanSubscribers
19
- } from './action-plan'
20
- import { entities as IssueEntities, resolvers as IssueResolvers, subscribers as IssueSubscribers } from './issue'
21
- import {
22
- entities as ProjectReportEntities,
23
- resolvers as ProjectReportResolvers,
24
- subscribers as ProjectReportSubscribers
25
- } from './project-report'
26
- import {
27
- entities as SupervisorEntities,
28
- resolvers as SupervisorResolvers,
29
- subscribers as SupervisorSubscribers
30
- } from './supervisor'
31
- import { entities as ChecklistEntities, resolvers as ChecklistResolvers, subscribers as ChecklistSubscribers } from './checklist'
32
- import { entities as ChecklistItemEntities, resolvers as ChecklistItemResolvers } from './checklist-item'
33
- import {
34
- entities as ChecklistItemCommentEntities,
35
- resolvers as ChecklistItemCommentResolvers,
36
- subscribers as ChecklistItemCommentSubscribers
37
- } from './checklist-item-comment'
38
- import { entities as ChecklistTypeEntities, resolvers as ChecklistTypeResolvers } from './checklist-type'
39
- import { entities as ChecklistTemplateEntities, resolvers as ChecklistTemplateResolvers } from './checklist-template'
40
- import { entities as ChecklistTemplateItemEntities, resolvers as ChecklistTemplateItemResolvers } from './checklist-template-item'
41
- import {
42
- entities as BuildingInspectionEntities,
43
- resolvers as BuildingInspectionResolvers,
44
- subscribers as BuildingInspectionSubscribers
45
- } from './building-inspection'
46
-
47
- export const entities = [
48
- /* ENTITIES */
49
- ...ActionPlanEntities,
50
- ...IssueEntities,
51
- ...ProjectReportEntities,
52
- ...SupervisorEntities,
53
- ...ChecklistEntities,
54
- ...ChecklistItemEntities,
55
- ...ChecklistItemCommentEntities,
56
- ...ChecklistTypeEntities,
57
- ...ChecklistTemplateItemEntities,
58
- ...ChecklistTemplateEntities,
59
- ...BuildingInspectionEntities
60
- ]
61
-
62
- export const subscribers = [
63
- /* SUBSCRIBERS */
64
- ...ActionPlanSubscribers,
65
- ...IssueSubscribers,
66
- ...ProjectReportSubscribers,
67
- ...SupervisorSubscribers,
68
- ...BuildingInspectionSubscribers,
69
- ...ChecklistSubscribers,
70
- ...ChecklistItemCommentSubscribers
71
- ]
72
-
73
- export const schema = {
74
- resolverClasses: [
75
- /* RESOLVER CLASSES */
76
- ...ActionPlanResolvers,
77
- ...IssueResolvers,
78
- ...ProjectReportResolvers,
79
- ...SupervisorResolvers,
80
- ...ChecklistResolvers,
81
- ...ChecklistItemResolvers,
82
- ...ChecklistItemCommentResolvers,
83
- ...ChecklistTypeResolvers,
84
- ...ChecklistTemplateItemResolvers,
85
- ...ChecklistTemplateResolvers,
86
- ...BuildingInspectionResolvers
87
- ]
88
- }
@@ -1,7 +0,0 @@
1
- import { Issue } from './issue'
2
- import { IssueQuery } from './issue-query'
3
- import { IssueMutation } from './issue-mutation'
4
-
5
- export const entities = [Issue]
6
- export const resolvers = [IssueQuery, IssueMutation]
7
- export const subscribers = []