@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,108 +0,0 @@
1
- import {
2
- CreateDateColumn,
3
- UpdateDateColumn,
4
- DeleteDateColumn,
5
- Entity,
6
- Index,
7
- Column,
8
- RelationId,
9
- ManyToOne,
10
- OneToOne,
11
- PrimaryGeneratedColumn,
12
- JoinColumn
13
- } from 'typeorm'
14
- import { ObjectType, Field, ID, registerEnumType } from 'type-graphql'
15
- import { User } from '@things-factory/auth-base'
16
- import { BuildingLevel } from '@dssp/building-complex'
17
- import { Checklist } from '../checklist/checklist'
18
-
19
- export enum BuildingInspectionStatus {
20
- WAIT = 'WAIT',
21
- OVERALL_WAIT = 'OVERALL_WAIT',
22
- REQUEST = 'REQUEST',
23
- OVERALL_REQUEST = 'OVERALL_REQUEST',
24
- PASS = 'PASS',
25
- FAIL = 'FAIL'
26
- }
27
-
28
- registerEnumType(BuildingInspectionStatus, {
29
- name: 'BuildingInspectionStatus',
30
- description: '검측 상태'
31
- })
32
-
33
- @Entity({ comment: '시공 검측 (층별 도면의 검측 리스트)' })
34
- @Index('ix_building_inspection_0', (buildingInspection: BuildingInspection) => [buildingInspection.buildingLevel], {
35
- where: '"deleted_at" IS NULL'
36
- })
37
- @Index('ix_building_inspection_1', (buildingInspection: BuildingInspection) => [buildingInspection.checklist], {
38
- where: '"deleted_at" IS NULL'
39
- })
40
- @Index('ix_building_inspection_2', (buildingInspection: BuildingInspection) => [buildingInspection.requestDate], {
41
- where: '"deleted_at" IS NULL'
42
- })
43
- @ObjectType()
44
- export class BuildingInspection {
45
- @PrimaryGeneratedColumn('uuid')
46
- @Field(type => ID)
47
- readonly id: string
48
-
49
- @Column({
50
- nullable: false,
51
- comment:
52
- '상태(WAIT: 검측 대기, OVERALL_WAIT: 총괄자 검측 대기, REQUEST: 검측 요청, OVERALL_REQUEST: 총괄자 검측 요청, PASS: 합격, FAIL: 불합격)',
53
- default: BuildingInspectionStatus.WAIT
54
- })
55
- @Field({ nullable: true })
56
- status?: BuildingInspectionStatus
57
-
58
- @Column({ type: 'date', default: () => 'CURRENT_DATE', nullable: true, comment: '검측 요청일' })
59
- @Field(type => String, { nullable: true })
60
- requestDate?: string
61
-
62
- @Column({ type: 'simple-json', nullable: true, comment: '도면 마커' })
63
- @Field(type => String, { nullable: true })
64
- drawingMarker?: string
65
-
66
- // 층 정보 (1:1 상위 테이블 참조)
67
- @ManyToOne(type => BuildingLevel)
68
- @Field(() => BuildingLevel, { nullable: true })
69
- buildingLevel?: BuildingLevel
70
-
71
- @RelationId((buildingInspection: BuildingInspection) => buildingInspection.buildingLevel)
72
- buildingLevelId?: string
73
-
74
- // 체크리스트 (1:1 상위 테이블 참조)
75
- @OneToOne(type => Checklist)
76
- @JoinColumn()
77
- @Field(() => Checklist, { nullable: true })
78
- checklist?: Checklist
79
-
80
- @RelationId((buildingInspection: BuildingInspection) => buildingInspection.checklist)
81
- checklistId?: string
82
-
83
- @CreateDateColumn()
84
- @Field({ nullable: true })
85
- createdAt?: Date
86
-
87
- @UpdateDateColumn()
88
- @Field({ nullable: true })
89
- updatedAt?: Date
90
-
91
- @DeleteDateColumn()
92
- @Field({ nullable: true })
93
- deletedAt?: Date
94
-
95
- @ManyToOne(type => User, { nullable: true })
96
- @Field(type => User, { nullable: true })
97
- creator?: User
98
-
99
- @RelationId((buildingInspection: BuildingInspection) => buildingInspection.creator)
100
- creatorId?: string
101
-
102
- @ManyToOne(type => User, { nullable: true })
103
- @Field(type => User, { nullable: true })
104
- updater?: User
105
-
106
- @RelationId((buildingInspection: BuildingInspection) => buildingInspection.updater)
107
- updaterId?: string
108
- }
@@ -1,20 +0,0 @@
1
- import { EventSubscriber } from 'typeorm'
2
-
3
- import { HistoryEntitySubscriber } from '@operato/typeorm-history'
4
-
5
- import { BuildingInspection } from './building-inspection'
6
- import { BuildingInspectionHistory } from './building-inspection-history'
7
-
8
- @EventSubscriber()
9
- export class BuildingInspectionHistoryEntitySubscriber extends HistoryEntitySubscriber<
10
- BuildingInspection,
11
- BuildingInspectionHistory
12
- > {
13
- public get entity() {
14
- return BuildingInspection
15
- }
16
-
17
- public get historyEntity() {
18
- return BuildingInspectionHistory
19
- }
20
- }
@@ -1,11 +0,0 @@
1
- import { BuildingInspection, BuildingInspectionStatus } from './building-inspection'
2
- import { BuildingInspectionQuery } from './building-inspection-query'
3
- import { BuildingInspectionMutation } from './building-inspection-mutation'
4
- import { BuildingInspectionSummary } from './building-inspection-type'
5
- import { BuildingInspectionHistory } from './building-inspection-history'
6
- import { BuildingInspectionHistoryEntitySubscriber } from './event-subscriber'
7
-
8
- export const entities = [BuildingInspection, BuildingInspectionHistory]
9
- export const resolvers = [BuildingInspectionQuery, BuildingInspectionMutation]
10
- export const subscribers = [BuildingInspectionHistoryEntitySubscriber]
11
- export const types = [BuildingInspectionStatus, BuildingInspectionSummary]
@@ -1,96 +0,0 @@
1
- import { Field, ID, ObjectType } from 'type-graphql'
2
- import { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'
3
- import { HistoryActionColumn, HistoryActionType, HistoryEntityInterface, HistoryOriginalIdColumn } from '@operato/typeorm-history'
4
- import { User } from '@things-factory/auth-base'
5
- import { config } from '@things-factory/env'
6
- import { Checklist } from './checklist'
7
-
8
- const ORMCONFIG = config.get('ormconfig', {})
9
- const DATABASE_TYPE = ORMCONFIG.type
10
-
11
- @Entity()
12
- @Index('ix_checklist_history_0', (checklistHistory: ChecklistHistory) => [checklistHistory.originalId])
13
- @ObjectType({ description: 'History Entity of Checklist' })
14
- export class ChecklistHistory implements HistoryEntityInterface<Checklist> {
15
- @PrimaryGeneratedColumn('uuid')
16
- @Field(type => ID)
17
- readonly id: string
18
-
19
- @Column({ nullable: true, comment: '이름' })
20
- @Field({ nullable: true })
21
- name?: string
22
-
23
- @Column({ nullable: true, comment: '문서 번호 동(4자리)-층(3자리)-시퀀스(6자리)' })
24
- @Field({ nullable: true })
25
- documentNo?: string
26
-
27
- @Column({ nullable: false, comment: '공종' })
28
- @Field({ nullable: true })
29
- constructionType?: string
30
-
31
- @Column({ nullable: false, comment: '세부 공종' })
32
- @Field({ nullable: true })
33
- constructionDetailType?: string
34
-
35
- @Column({ nullable: false, comment: '위치 (x동 x층)' })
36
- @Field({ nullable: true })
37
- location?: string
38
-
39
- @Column({ nullable: false, comment: '검측 도면 타입', default: '' })
40
- @Field({ nullable: true })
41
- inspectionDrawingType?: string
42
-
43
- @Column('simple-array', { nullable: true, comment: '검측 부위' })
44
- @Field(() => [String], { nullable: true })
45
- inspectionParts?: string[]
46
-
47
- @Column({ nullable: true, comment: '시공자 점검일' })
48
- @Field({ nullable: true })
49
- constructionInspectionDate?: Date
50
-
51
- @Column({ nullable: true, comment: '감리자 점검일' })
52
- @Field({ nullable: true })
53
- supervisorInspectionDate?: Date
54
-
55
- @Column({ nullable: true, comment: '총괄 시공 책임자 사인' })
56
- @Field({ nullable: true })
57
- overallConstructorSignature?: string
58
-
59
- @Column({ nullable: true, comment: '공종별 시공 관리자 사인' })
60
- @Field({ nullable: true })
61
- taskConstructorSignature?: string
62
-
63
- @Column({ nullable: true, comment: '총괄 감리 책임자 사인' })
64
- @Field({ nullable: true })
65
- overallSupervisorySignature?: string
66
-
67
- @Column({ nullable: true, comment: '건축사보 (공종별 감리 관리자) 사인' })
68
- @Field({ nullable: true })
69
- taskSupervisorySignature?: string
70
-
71
- @Column({ nullable: true })
72
- @Field({ nullable: true })
73
- createdAt?: Date
74
-
75
- @ManyToOne(type => User, { nullable: true })
76
- @Field(type => User, { nullable: true })
77
- creator?: User
78
-
79
- @RelationId((checklistHistory: ChecklistHistory) => checklistHistory.creator)
80
- creatorId?: string
81
-
82
- @HistoryOriginalIdColumn()
83
- public originalId!: string
84
-
85
- @HistoryActionColumn({
86
- nullable: false,
87
- type:
88
- DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
89
- ? 'enum'
90
- : DATABASE_TYPE == 'oracle'
91
- ? 'varchar2'
92
- : 'smallint',
93
- enum: HistoryActionType
94
- })
95
- public action!: HistoryActionType
96
- }
@@ -1,103 +0,0 @@
1
- import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'
2
- import { In } from 'typeorm'
3
- import { Checklist } from './checklist'
4
- import { NewChecklist, ChecklistPatch } from './checklist-type'
5
-
6
- @Resolver(Checklist)
7
- export class ChecklistMutation {
8
- @Directive('@transaction')
9
- @Mutation(returns => Checklist, { description: 'To create new Checklist' })
10
- async createChecklist(@Arg('checklist') checklist: NewChecklist, @Ctx() context: ResolverContext): Promise<Checklist> {
11
- const { domain, user, tx } = context.state
12
-
13
- const result = await tx.getRepository(Checklist).save({
14
- ...checklist,
15
- domain,
16
- creator: user,
17
- updater: user
18
- })
19
-
20
- return result
21
- }
22
-
23
- @Directive('@transaction')
24
- @Mutation(returns => Checklist, { description: 'To modify Checklist information' })
25
- async updateChecklist(
26
- @Arg('id') id: string,
27
- @Arg('patch') patch: ChecklistPatch,
28
- @Ctx() context: ResolverContext
29
- ): Promise<Checklist> {
30
- const { domain, user, tx } = context.state
31
-
32
- const repository = tx.getRepository(Checklist)
33
- const checklist = await repository.findOne({
34
- where: { id }
35
- })
36
-
37
- const result = await repository.save({
38
- ...checklist,
39
- ...patch,
40
- updater: user
41
- })
42
-
43
- return result
44
- }
45
-
46
- @Directive('@transaction')
47
- @Mutation(returns => [Checklist], { description: "To modify multiple Checklists' information" })
48
- async updateMultipleChecklist(
49
- @Arg('patches', type => [ChecklistPatch]) patches: ChecklistPatch[],
50
- @Ctx() context: ResolverContext
51
- ): Promise<Checklist[]> {
52
- const { domain, user, tx } = context.state
53
-
54
- let results = []
55
- const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')
56
- const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')
57
- const checklistRepo = tx.getRepository(Checklist)
58
-
59
- if (_createRecords.length > 0) {
60
- for (let i = 0; i < _createRecords.length; i++) {
61
- const newRecord = _createRecords[i]
62
-
63
- const result = await checklistRepo.save({
64
- ...newRecord,
65
- domain,
66
- creator: user,
67
- updater: user
68
- })
69
-
70
- results.push({ ...result, cuFlag: '+' })
71
- }
72
- }
73
-
74
- if (_updateRecords.length > 0) {
75
- for (let i = 0; i < _updateRecords.length; i++) {
76
- const updateRecord = _updateRecords[i]
77
- const checklist = await checklistRepo.findOneBy({ id: updateRecord.id })
78
-
79
- const result = await checklistRepo.save({
80
- ...checklist,
81
- ...updateRecord,
82
- updater: user
83
- })
84
-
85
- results.push({ ...result, cuFlag: 'M' })
86
- }
87
- }
88
-
89
- return results
90
- }
91
-
92
- @Directive('@transaction')
93
- @Mutation(returns => Boolean, { description: 'To delete multiple Checklists' })
94
- async deleteChecklists(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {
95
- const { domain, tx } = context.state
96
-
97
- await tx.getRepository(Checklist).softDelete({
98
- id: In(ids)
99
- })
100
-
101
- return true
102
- }
103
- }
@@ -1,58 +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 { Checklist } from './checklist'
5
- import { ChecklistList } from './checklist-type'
6
- import { ChecklistItem } from '../checklist-item/checklist-item'
7
- import { BuildingInspection } from '../building-inspection/building-inspection'
8
-
9
- @Resolver(Checklist)
10
- export class ChecklistQuery {
11
- @Query(returns => Checklist!, { nullable: true, description: 'To fetch a Checklist' })
12
- async checklist(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Checklist> {
13
- const { domain } = context.state
14
-
15
- return await getRepository(Checklist).findOne({
16
- where: { id }
17
- })
18
- }
19
-
20
- @Query(returns => ChecklistList, { description: 'To fetch multiple Checklists' })
21
- async checklists(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ChecklistList> {
22
- const { domain } = context.state
23
-
24
- const queryBuilder = getQueryBuilderFromListParams({
25
- params,
26
- repository: await getRepository(Checklist),
27
- searchables: ['name', 'description']
28
- })
29
-
30
- const [items, total] = await queryBuilder.getManyAndCount()
31
-
32
- return { items, total }
33
- }
34
-
35
- @FieldResolver(type => [ChecklistItem])
36
- async checklistItems(@Root() checklist: Checklist): Promise<ChecklistItem[]> {
37
- return await getRepository(ChecklistItem)
38
- .createQueryBuilder('ci')
39
- .where('ci.checklist_id = :checklistId', { checklistId: checklist.id })
40
- .orderBy('ci.sequence', 'ASC')
41
- .getMany()
42
- }
43
-
44
- @FieldResolver(type => BuildingInspection)
45
- async buildingInspection(@Root() checklist: Checklist): Promise<BuildingInspection> {
46
- return await getRepository(BuildingInspection).findOneBy({ checklist: { id: checklist.id } })
47
- }
48
-
49
- @FieldResolver(type => User)
50
- async updater(@Root() checklist: Checklist): Promise<User> {
51
- return await getRepository(User).findOneBy({ id: checklist.updaterId })
52
- }
53
-
54
- @FieldResolver(type => User)
55
- async creator(@Root() checklist: Checklist): Promise<User> {
56
- return await getRepository(User).findOneBy({ id: checklist.creatorId })
57
- }
58
- }
@@ -1,49 +0,0 @@
1
- import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
2
- import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
3
- import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'
4
-
5
- import { ObjectRef, ScalarObject } from '@things-factory/shell'
6
-
7
- import { Checklist } from './checklist'
8
-
9
- @InputType()
10
- export class NewChecklist {
11
- @Field()
12
- name: string
13
-
14
- @Field({ nullable: true })
15
- description?: string
16
-
17
- @Field({ nullable: true })
18
- active?: boolean
19
-
20
- @Field({ nullable: true })
21
- params?: string
22
- }
23
-
24
- @InputType()
25
- export class ChecklistPatch {
26
- @Field(type => ID, { nullable: true })
27
- id?: string
28
-
29
- @Field({ nullable: true })
30
- name?: string
31
-
32
- @Field({ nullable: true })
33
- description?: string
34
-
35
- @Field({ nullable: true })
36
- active?: boolean
37
-
38
- @Field({ nullable: true })
39
- cuFlag?: string
40
- }
41
-
42
- @ObjectType()
43
- export class ChecklistList {
44
- @Field(type => [Checklist])
45
- items: Checklist[]
46
-
47
- @Field(type => Int)
48
- total: number
49
- }
@@ -1,127 +0,0 @@
1
- import {
2
- CreateDateColumn,
3
- UpdateDateColumn,
4
- DeleteDateColumn,
5
- Entity,
6
- Index,
7
- Column,
8
- RelationId,
9
- ManyToOne,
10
- OneToMany,
11
- OneToOne,
12
- JoinColumn,
13
- PrimaryGeneratedColumn
14
- } from 'typeorm'
15
- import { ObjectType, Field, ID, registerEnumType } from 'type-graphql'
16
-
17
- import { User } from '@things-factory/auth-base'
18
- import { Task } from '@dssp/project'
19
- import { ChecklistItem } from '../checklist-item/checklist-item'
20
- import { BuildingInspection } from '../building-inspection/building-inspection'
21
-
22
- @Entity({ comment: '체크리스트' })
23
- @Index('ix_checklist_0', (checklist: Checklist) => [checklist.task], { where: '"deleted_at" IS NULL' })
24
- @Index('ix_checklist_1', (checklist: Checklist) => [checklist.documentNo, checklist.createdAt], { where: '"deleted_at" IS NULL' })
25
- @ObjectType()
26
- export class Checklist {
27
- @PrimaryGeneratedColumn('uuid')
28
- @Field(type => ID)
29
- readonly id: string
30
-
31
- @Column({ nullable: true, comment: '이름' })
32
- @Field({ nullable: true })
33
- name?: string
34
-
35
- @Column({ nullable: true, comment: '문서 번호 동(4자리)-층(3자리)-시퀀스(6자리)' })
36
- @Field({ nullable: true })
37
- documentNo?: string
38
-
39
- @Column({ nullable: false, comment: '공종' })
40
- @Field({ nullable: true })
41
- constructionType?: string
42
-
43
- @Column({ nullable: false, comment: '세부 공종' })
44
- @Field({ nullable: true })
45
- constructionDetailType?: string
46
-
47
- @Column({ nullable: false, comment: '위치 (x동 x층)' })
48
- @Field({ nullable: true })
49
- location?: string
50
-
51
- @Column({ nullable: false, comment: '검측 도면 타입', default: '' })
52
- @Field({ nullable: true })
53
- inspectionDrawingType?: string
54
-
55
- @Column('simple-array', { nullable: true, comment: '검측 부위' })
56
- @Field(() => [String], { nullable: true })
57
- inspectionParts?: string[]
58
-
59
- @Column({ nullable: true, comment: '시공자 점검일' })
60
- @Field({ nullable: true })
61
- constructionInspectionDate?: Date
62
-
63
- @Column({ nullable: true, comment: '감리자 점검일' })
64
- @Field({ nullable: true })
65
- supervisorInspectionDate?: Date
66
-
67
- @Column({ nullable: true, comment: '총괄 시공 책임자 사인' })
68
- @Field({ nullable: true })
69
- overallConstructorSignature?: string
70
-
71
- @Column({ nullable: true, comment: '공종별 시공 관리자 사인' })
72
- @Field({ nullable: true })
73
- taskConstructorSignature?: string
74
-
75
- @Column({ nullable: true, comment: '총괄 감리 책임자 사인' })
76
- @Field({ nullable: true })
77
- overallSupervisorySignature?: string
78
-
79
- @Column({ nullable: true, comment: '건축사보 (공종별 감리 관리자) 사인' })
80
- @Field({ nullable: true })
81
- taskSupervisorySignature?: string
82
-
83
- // 공정표 작업 정보 (상위 테이블 참조)
84
- @ManyToOne(() => Task)
85
- @JoinColumn()
86
- @Field(() => Task)
87
- task?: Task
88
-
89
- @RelationId((checklist: Checklist) => checklist.task)
90
- taskId?: string
91
-
92
- // 체크리스트 아이템 정보 (하위 테이블 참조)
93
- @OneToMany(() => ChecklistItem, checklistItem => checklistItem.checklist)
94
- @Field(() => [ChecklistItem])
95
- checklistItems?: ChecklistItem[]
96
-
97
- // 검측 정보 (1:1 하위 테이블 참조)
98
- @OneToOne(() => BuildingInspection, buildingInspection => buildingInspection.checklist)
99
- @Field(() => BuildingInspection)
100
- buildingInspection?: BuildingInspection
101
-
102
- @CreateDateColumn()
103
- @Field({ nullable: true })
104
- createdAt?: Date
105
-
106
- @UpdateDateColumn()
107
- @Field({ nullable: true })
108
- updatedAt?: Date
109
-
110
- @DeleteDateColumn()
111
- @Field({ nullable: true })
112
- deletedAt?: Date
113
-
114
- @ManyToOne(type => User, { nullable: true })
115
- @Field(type => User, { nullable: true })
116
- creator?: User
117
-
118
- @RelationId((checklist: Checklist) => checklist.creator)
119
- creatorId?: string
120
-
121
- @ManyToOne(type => User, { nullable: true })
122
- @Field(type => User, { nullable: true })
123
- updater?: User
124
-
125
- @RelationId((checklist: Checklist) => checklist.updater)
126
- updaterId?: string
127
- }
@@ -1,17 +0,0 @@
1
- import { EventSubscriber } from 'typeorm'
2
-
3
- import { HistoryEntitySubscriber } from '@operato/typeorm-history'
4
-
5
- import { Checklist } from './checklist'
6
- import { ChecklistHistory } from './checklist-history'
7
-
8
- @EventSubscriber()
9
- export class ChecklistHistoryEntitySubscriber extends HistoryEntitySubscriber<Checklist, ChecklistHistory> {
10
- public get entity() {
11
- return Checklist
12
- }
13
-
14
- public get historyEntity() {
15
- return ChecklistHistory
16
- }
17
- }
@@ -1,9 +0,0 @@
1
- import { Checklist } from './checklist'
2
- import { ChecklistQuery } from './checklist-query'
3
- import { ChecklistHistory } from './checklist-history'
4
- import { ChecklistMutation } from './checklist-mutation'
5
- import { ChecklistHistoryEntitySubscriber } from './event-subscriber'
6
-
7
- export const entities = [Checklist, ChecklistHistory]
8
- export const resolvers = [ChecklistQuery, ChecklistMutation]
9
- export const subscribers = [ChecklistHistoryEntitySubscriber]
@@ -1,5 +0,0 @@
1
- import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'
2
- import { ChecklistItem } from './checklist-item'
3
-
4
- @Resolver(ChecklistItem)
5
- export class ChecklistItemMutation {}