@things-factory/compliance 0.0.0-stage → 10.1.255

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 (356) hide show
  1. package/dist-client/bootstrap.d.ts +2 -0
  2. package/dist-client/bootstrap.js +28 -0
  3. package/dist-client/bootstrap.js.map +1 -0
  4. package/dist-client/components/compliance-case-form.d.ts +42 -0
  5. package/dist-client/components/compliance-case-form.js +313 -0
  6. package/dist-client/components/compliance-case-form.js.map +1 -0
  7. package/dist-client/components/compliance-case-sheet.d.ts +35 -0
  8. package/dist-client/components/compliance-case-sheet.js +335 -0
  9. package/dist-client/components/compliance-case-sheet.js.map +1 -0
  10. package/dist-client/components/compliance-my-inventions.d.ts +17 -0
  11. package/dist-client/components/compliance-my-inventions.js +133 -0
  12. package/dist-client/components/compliance-my-inventions.js.map +1 -0
  13. package/dist-client/components/compliance-my-privacy-requests.d.ts +34 -0
  14. package/dist-client/components/compliance-my-privacy-requests.js +232 -0
  15. package/dist-client/components/compliance-my-privacy-requests.js.map +1 -0
  16. package/dist-client/components/compliance-my-reports.d.ts +19 -0
  17. package/dist-client/components/compliance-my-reports.js +137 -0
  18. package/dist-client/components/compliance-my-reports.js.map +1 -0
  19. package/dist-client/components/guide-link.d.ts +13 -0
  20. package/dist-client/components/guide-link.js +55 -0
  21. package/dist-client/components/guide-link.js.map +1 -0
  22. package/dist-client/components/invention-report-form.d.ts +30 -0
  23. package/dist-client/components/invention-report-form.js +188 -0
  24. package/dist-client/components/invention-report-form.js.map +1 -0
  25. package/dist-client/components/legal-todo.d.ts +10 -0
  26. package/dist-client/components/legal-todo.js +43 -0
  27. package/dist-client/components/legal-todo.js.map +1 -0
  28. package/dist-client/components/my-trainings.d.ts +18 -0
  29. package/dist-client/components/my-trainings.js +149 -0
  30. package/dist-client/components/my-trainings.js.map +1 -0
  31. package/dist-client/components/regulation-form.d.ts +26 -0
  32. package/dist-client/components/regulation-form.js +161 -0
  33. package/dist-client/components/regulation-form.js.map +1 -0
  34. package/dist-client/components/seal-use-form.d.ts +47 -0
  35. package/dist-client/components/seal-use-form.js +300 -0
  36. package/dist-client/components/seal-use-form.js.map +1 -0
  37. package/dist-client/components/training-attendance-form.d.ts +37 -0
  38. package/dist-client/components/training-attendance-form.js +186 -0
  39. package/dist-client/components/training-attendance-form.js.map +1 -0
  40. package/dist-client/components/training-certificate-form.d.ts +41 -0
  41. package/dist-client/components/training-certificate-form.js +198 -0
  42. package/dist-client/components/training-certificate-form.js.map +1 -0
  43. package/dist-client/components/training-session-form.d.ts +39 -0
  44. package/dist-client/components/training-session-form.js +270 -0
  45. package/dist-client/components/training-session-form.js.map +1 -0
  46. package/dist-client/components/training-setting-form.d.ts +45 -0
  47. package/dist-client/components/training-setting-form.js +175 -0
  48. package/dist-client/components/training-setting-form.js.map +1 -0
  49. package/dist-client/index.d.ts +4 -0
  50. package/dist-client/index.js +8 -0
  51. package/dist-client/index.js.map +1 -0
  52. package/dist-client/legal-record/dispute-calendar-source.d.ts +1 -0
  53. package/dist-client/legal-record/dispute-calendar-source.js +51 -0
  54. package/dist-client/legal-record/dispute-calendar-source.js.map +1 -0
  55. package/dist-client/legal-record/legal-child-grid.d.ts +31 -0
  56. package/dist-client/legal-record/legal-child-grid.js +76 -0
  57. package/dist-client/legal-record/legal-child-grid.js.map +1 -0
  58. package/dist-client/legal-record/legal-codes.d.ts +3 -0
  59. package/dist-client/legal-record/legal-codes.js +5 -0
  60. package/dist-client/legal-record/legal-codes.js.map +1 -0
  61. package/dist-client/legal-record/legal-grid.d.ts +59 -0
  62. package/dist-client/legal-record/legal-grid.js +68 -0
  63. package/dist-client/legal-record/legal-grid.js.map +1 -0
  64. package/dist-client/legal-record/legal-record-files.d.ts +26 -0
  65. package/dist-client/legal-record/legal-record-files.js +162 -0
  66. package/dist-client/legal-record/legal-record-files.js.map +1 -0
  67. package/dist-client/pages/compliance-case-list.d.ts +35 -0
  68. package/dist-client/pages/compliance-case-list.js +112 -0
  69. package/dist-client/pages/compliance-case-list.js.map +1 -0
  70. package/dist-client/pages/dispute-list.d.ts +57 -0
  71. package/dist-client/pages/dispute-list.js +156 -0
  72. package/dist-client/pages/dispute-list.js.map +1 -0
  73. package/dist-client/pages/invention-list.d.ts +57 -0
  74. package/dist-client/pages/invention-list.js +166 -0
  75. package/dist-client/pages/invention-list.js.map +1 -0
  76. package/dist-client/pages/legal-registration-list.d.ts +63 -0
  77. package/dist-client/pages/legal-registration-list.js +206 -0
  78. package/dist-client/pages/legal-registration-list.js.map +1 -0
  79. package/dist-client/pages/privacy-record-list.d.ts +52 -0
  80. package/dist-client/pages/privacy-record-list.js +225 -0
  81. package/dist-client/pages/privacy-record-list.js.map +1 -0
  82. package/dist-client/pages/regulation-detail.d.ts +43 -0
  83. package/dist-client/pages/regulation-detail.js +370 -0
  84. package/dist-client/pages/regulation-detail.js.map +1 -0
  85. package/dist-client/pages/regulation-list.d.ts +52 -0
  86. package/dist-client/pages/regulation-list.js +144 -0
  87. package/dist-client/pages/regulation-list.js.map +1 -0
  88. package/dist-client/pages/regulations.d.ts +49 -0
  89. package/dist-client/pages/regulations.js +412 -0
  90. package/dist-client/pages/regulations.js.map +1 -0
  91. package/dist-client/pages/seal-use-list.d.ts +57 -0
  92. package/dist-client/pages/seal-use-list.js +168 -0
  93. package/dist-client/pages/seal-use-list.js.map +1 -0
  94. package/dist-client/pages/training-list.d.ts +51 -0
  95. package/dist-client/pages/training-list.js +333 -0
  96. package/dist-client/pages/training-list.js.map +1 -0
  97. package/dist-client/regulation/regulation-fragments.d.ts +1 -0
  98. package/dist-client/regulation/regulation-fragments.js +37 -0
  99. package/dist-client/regulation/regulation-fragments.js.map +1 -0
  100. package/dist-client/regulation/regulation-guide.d.ts +19 -0
  101. package/dist-client/regulation/regulation-guide.js +48 -0
  102. package/dist-client/regulation/regulation-guide.js.map +1 -0
  103. package/dist-client/route.d.ts +1 -0
  104. package/dist-client/route.js +36 -0
  105. package/dist-client/route.js.map +1 -0
  106. package/dist-client/training-words.d.ts +11 -0
  107. package/dist-client/training-words.js +11 -0
  108. package/dist-client/training-words.js.map +1 -0
  109. package/dist-client/tsconfig.tsbuildinfo +1 -0
  110. package/dist-client/words.d.ts +15 -0
  111. package/dist-client/words.js +20 -0
  112. package/dist-client/words.js.map +1 -0
  113. package/dist-server/activities/index.d.ts +6 -0
  114. package/dist-server/activities/index.js +37 -0
  115. package/dist-server/activities/index.js.map +1 -0
  116. package/dist-server/activities/legal-todo-activity-names.d.ts +1 -0
  117. package/dist-server/activities/legal-todo-activity-names.js +5 -0
  118. package/dist-server/activities/legal-todo-activity-names.js.map +1 -0
  119. package/dist-server/activities/legal-todo-activity.d.ts +37 -0
  120. package/dist-server/activities/legal-todo-activity.js +41 -0
  121. package/dist-server/activities/legal-todo-activity.js.map +1 -0
  122. package/dist-server/activities/regulation-activity-names.d.ts +1 -0
  123. package/dist-server/activities/regulation-activity-names.js +5 -0
  124. package/dist-server/activities/regulation-activity-names.js.map +1 -0
  125. package/dist-server/activities/regulation-activity.d.ts +48 -0
  126. package/dist-server/activities/regulation-activity.js +47 -0
  127. package/dist-server/activities/regulation-activity.js.map +1 -0
  128. package/dist-server/activities/seal-use-activity-names.d.ts +2 -0
  129. package/dist-server/activities/seal-use-activity-names.js +6 -0
  130. package/dist-server/activities/seal-use-activity-names.js.map +1 -0
  131. package/dist-server/activities/seal-use-activity.d.ts +48 -0
  132. package/dist-server/activities/seal-use-activity.js +47 -0
  133. package/dist-server/activities/seal-use-activity.js.map +1 -0
  134. package/dist-server/index.d.ts +2 -0
  135. package/dist-server/index.js +21 -0
  136. package/dist-server/index.js.map +1 -0
  137. package/dist-server/role-tasks.d.ts +2 -0
  138. package/dist-server/role-tasks.js +28 -0
  139. package/dist-server/role-tasks.js.map +1 -0
  140. package/dist-server/service/common/correction.d.ts +32 -0
  141. package/dist-server/service/common/correction.js +98 -0
  142. package/dist-server/service/common/correction.js.map +1 -0
  143. package/dist-server/service/common/employee-reader.d.ts +11 -0
  144. package/dist-server/service/common/employee-reader.js +46 -0
  145. package/dist-server/service/common/employee-reader.js.map +1 -0
  146. package/dist-server/service/common/legal-todo.d.ts +19 -0
  147. package/dist-server/service/common/legal-todo.js +37 -0
  148. package/dist-server/service/common/legal-todo.js.map +1 -0
  149. package/dist-server/service/compliance-case/compliance-case-mutation.d.ts +9 -0
  150. package/dist-server/service/compliance-case/compliance-case-mutation.js +73 -0
  151. package/dist-server/service/compliance-case/compliance-case-mutation.js.map +1 -0
  152. package/dist-server/service/compliance-case/compliance-case-query.d.ts +28 -0
  153. package/dist-server/service/compliance-case/compliance-case-query.js +212 -0
  154. package/dist-server/service/compliance-case/compliance-case-query.js.map +1 -0
  155. package/dist-server/service/compliance-case/compliance-case-rules.d.ts +71 -0
  156. package/dist-server/service/compliance-case/compliance-case-rules.js +111 -0
  157. package/dist-server/service/compliance-case/compliance-case-rules.js.map +1 -0
  158. package/dist-server/service/compliance-case/compliance-case-service.d.ts +76 -0
  159. package/dist-server/service/compliance-case/compliance-case-service.js +425 -0
  160. package/dist-server/service/compliance-case/compliance-case-service.js.map +1 -0
  161. package/dist-server/service/compliance-case/compliance-case-type.d.ts +56 -0
  162. package/dist-server/service/compliance-case/compliance-case-type.js +200 -0
  163. package/dist-server/service/compliance-case/compliance-case-type.js.map +1 -0
  164. package/dist-server/service/compliance-case/compliance-case.d.ts +76 -0
  165. package/dist-server/service/compliance-case/compliance-case.js +260 -0
  166. package/dist-server/service/compliance-case/compliance-case.js.map +1 -0
  167. package/dist-server/service/compliance-case/index.d.ts +7 -0
  168. package/dist-server/service/compliance-case/index.js +17 -0
  169. package/dist-server/service/compliance-case/index.js.map +1 -0
  170. package/dist-server/service/dispute/dispute-mutation.d.ts +9 -0
  171. package/dist-server/service/dispute/dispute-mutation.js +64 -0
  172. package/dist-server/service/dispute/dispute-mutation.js.map +1 -0
  173. package/dist-server/service/dispute/dispute-query.d.ts +16 -0
  174. package/dist-server/service/dispute/dispute-query.js +124 -0
  175. package/dist-server/service/dispute/dispute-query.js.map +1 -0
  176. package/dist-server/service/dispute/dispute-rules.d.ts +20 -0
  177. package/dist-server/service/dispute/dispute-rules.js +42 -0
  178. package/dist-server/service/dispute/dispute-rules.js.map +1 -0
  179. package/dist-server/service/dispute/dispute-service.d.ts +17 -0
  180. package/dist-server/service/dispute/dispute-service.js +96 -0
  181. package/dist-server/service/dispute/dispute-service.js.map +1 -0
  182. package/dist-server/service/dispute/dispute-type.d.ts +39 -0
  183. package/dist-server/service/dispute/dispute-type.js +149 -0
  184. package/dist-server/service/dispute/dispute-type.js.map +1 -0
  185. package/dist-server/service/dispute/dispute.d.ts +48 -0
  186. package/dist-server/service/dispute/dispute.js +198 -0
  187. package/dist-server/service/dispute/dispute.js.map +1 -0
  188. package/dist-server/service/dispute/index.d.ts +5 -0
  189. package/dist-server/service/dispute/index.js +9 -0
  190. package/dist-server/service/dispute/index.js.map +1 -0
  191. package/dist-server/service/index.d.ts +46 -0
  192. package/dist-server/service/index.js +112 -0
  193. package/dist-server/service/index.js.map +1 -0
  194. package/dist-server/service/invention/index.d.ts +5 -0
  195. package/dist-server/service/invention/index.js +9 -0
  196. package/dist-server/service/invention/index.js.map +1 -0
  197. package/dist-server/service/invention/invention-mutation.d.ts +10 -0
  198. package/dist-server/service/invention/invention-mutation.js +79 -0
  199. package/dist-server/service/invention/invention-mutation.js.map +1 -0
  200. package/dist-server/service/invention/invention-query.d.ts +18 -0
  201. package/dist-server/service/invention/invention-query.js +141 -0
  202. package/dist-server/service/invention/invention-query.js.map +1 -0
  203. package/dist-server/service/invention/invention-rules.d.ts +28 -0
  204. package/dist-server/service/invention/invention-rules.js +54 -0
  205. package/dist-server/service/invention/invention-rules.js.map +1 -0
  206. package/dist-server/service/invention/invention-service.d.ts +25 -0
  207. package/dist-server/service/invention/invention-service.js +176 -0
  208. package/dist-server/service/invention/invention-service.js.map +1 -0
  209. package/dist-server/service/invention/invention-type.d.ts +34 -0
  210. package/dist-server/service/invention/invention-type.js +129 -0
  211. package/dist-server/service/invention/invention-type.js.map +1 -0
  212. package/dist-server/service/invention/invention.d.ts +55 -0
  213. package/dist-server/service/invention/invention.js +214 -0
  214. package/dist-server/service/invention/invention.js.map +1 -0
  215. package/dist-server/service/legal-record/attachment-readers.d.ts +1 -0
  216. package/dist-server/service/legal-record/attachment-readers.js +27 -0
  217. package/dist-server/service/legal-record/attachment-readers.js.map +1 -0
  218. package/dist-server/service/legal-record/days.d.ts +7 -0
  219. package/dist-server/service/legal-record/days.js +26 -0
  220. package/dist-server/service/legal-record/days.js.map +1 -0
  221. package/dist-server/service/legal-record/legal-record-support.d.ts +24 -0
  222. package/dist-server/service/legal-record/legal-record-support.js +51 -0
  223. package/dist-server/service/legal-record/legal-record-support.js.map +1 -0
  224. package/dist-server/service/legal-registration/centre-change-subscriber.d.ts +9 -0
  225. package/dist-server/service/legal-registration/centre-change-subscriber.js +50 -0
  226. package/dist-server/service/legal-registration/centre-change-subscriber.js.map +1 -0
  227. package/dist-server/service/legal-registration/index.d.ts +7 -0
  228. package/dist-server/service/legal-registration/index.js +11 -0
  229. package/dist-server/service/legal-registration/index.js.map +1 -0
  230. package/dist-server/service/legal-registration/legal-registration-mutation.d.ts +10 -0
  231. package/dist-server/service/legal-registration/legal-registration-mutation.js +77 -0
  232. package/dist-server/service/legal-registration/legal-registration-mutation.js.map +1 -0
  233. package/dist-server/service/legal-registration/legal-registration-query.d.ts +26 -0
  234. package/dist-server/service/legal-registration/legal-registration-query.js +199 -0
  235. package/dist-server/service/legal-registration/legal-registration-query.js.map +1 -0
  236. package/dist-server/service/legal-registration/legal-registration-rules.d.ts +80 -0
  237. package/dist-server/service/legal-registration/legal-registration-rules.js +106 -0
  238. package/dist-server/service/legal-registration/legal-registration-rules.js.map +1 -0
  239. package/dist-server/service/legal-registration/legal-registration-service.d.ts +37 -0
  240. package/dist-server/service/legal-registration/legal-registration-service.js +248 -0
  241. package/dist-server/service/legal-registration/legal-registration-service.js.map +1 -0
  242. package/dist-server/service/legal-registration/legal-registration-type.d.ts +55 -0
  243. package/dist-server/service/legal-registration/legal-registration-type.js +207 -0
  244. package/dist-server/service/legal-registration/legal-registration-type.js.map +1 -0
  245. package/dist-server/service/legal-registration/legal-registration.d.ts +76 -0
  246. package/dist-server/service/legal-registration/legal-registration.js +311 -0
  247. package/dist-server/service/legal-registration/legal-registration.js.map +1 -0
  248. package/dist-server/service/privacy-record/index.d.ts +5 -0
  249. package/dist-server/service/privacy-record/index.js +9 -0
  250. package/dist-server/service/privacy-record/index.js.map +1 -0
  251. package/dist-server/service/privacy-record/privacy-record-mutation.d.ts +7 -0
  252. package/dist-server/service/privacy-record/privacy-record-mutation.js +56 -0
  253. package/dist-server/service/privacy-record/privacy-record-mutation.js.map +1 -0
  254. package/dist-server/service/privacy-record/privacy-record-query.d.ts +18 -0
  255. package/dist-server/service/privacy-record/privacy-record-query.js +131 -0
  256. package/dist-server/service/privacy-record/privacy-record-query.js.map +1 -0
  257. package/dist-server/service/privacy-record/privacy-record-rules.d.ts +52 -0
  258. package/dist-server/service/privacy-record/privacy-record-rules.js +91 -0
  259. package/dist-server/service/privacy-record/privacy-record-rules.js.map +1 -0
  260. package/dist-server/service/privacy-record/privacy-record-service.d.ts +33 -0
  261. package/dist-server/service/privacy-record/privacy-record-service.js +133 -0
  262. package/dist-server/service/privacy-record/privacy-record-service.js.map +1 -0
  263. package/dist-server/service/privacy-record/privacy-record-type.d.ts +40 -0
  264. package/dist-server/service/privacy-record/privacy-record-type.js +153 -0
  265. package/dist-server/service/privacy-record/privacy-record-type.js.map +1 -0
  266. package/dist-server/service/privacy-record/privacy-record.d.ts +69 -0
  267. package/dist-server/service/privacy-record/privacy-record.js +245 -0
  268. package/dist-server/service/privacy-record/privacy-record.js.map +1 -0
  269. package/dist-server/service/regulation/index.d.ts +5 -0
  270. package/dist-server/service/regulation/index.js +9 -0
  271. package/dist-server/service/regulation/index.js.map +1 -0
  272. package/dist-server/service/regulation/regulation-mutation.d.ts +15 -0
  273. package/dist-server/service/regulation/regulation-mutation.js +152 -0
  274. package/dist-server/service/regulation/regulation-mutation.js.map +1 -0
  275. package/dist-server/service/regulation/regulation-query.d.ts +10 -0
  276. package/dist-server/service/regulation/regulation-query.js +109 -0
  277. package/dist-server/service/regulation/regulation-query.js.map +1 -0
  278. package/dist-server/service/regulation/regulation-read.d.ts +21 -0
  279. package/dist-server/service/regulation/regulation-read.js +111 -0
  280. package/dist-server/service/regulation/regulation-read.js.map +1 -0
  281. package/dist-server/service/regulation/regulation-rules.d.ts +83 -0
  282. package/dist-server/service/regulation/regulation-rules.js +170 -0
  283. package/dist-server/service/regulation/regulation-rules.js.map +1 -0
  284. package/dist-server/service/regulation/regulation-service.d.ts +63 -0
  285. package/dist-server/service/regulation/regulation-service.js +365 -0
  286. package/dist-server/service/regulation/regulation-service.js.map +1 -0
  287. package/dist-server/service/regulation/regulation-type.d.ts +61 -0
  288. package/dist-server/service/regulation/regulation-type.js +226 -0
  289. package/dist-server/service/regulation/regulation-type.js.map +1 -0
  290. package/dist-server/service/regulation/regulation.d.ts +113 -0
  291. package/dist-server/service/regulation/regulation.js +382 -0
  292. package/dist-server/service/regulation/regulation.js.map +1 -0
  293. package/dist-server/service/seal-use/index.d.ts +5 -0
  294. package/dist-server/service/seal-use/index.js +9 -0
  295. package/dist-server/service/seal-use/index.js.map +1 -0
  296. package/dist-server/service/seal-use/seal-use-mutation.d.ts +8 -0
  297. package/dist-server/service/seal-use/seal-use-mutation.js +69 -0
  298. package/dist-server/service/seal-use/seal-use-mutation.js.map +1 -0
  299. package/dist-server/service/seal-use/seal-use-query.d.ts +14 -0
  300. package/dist-server/service/seal-use/seal-use-query.js +100 -0
  301. package/dist-server/service/seal-use/seal-use-query.js.map +1 -0
  302. package/dist-server/service/seal-use/seal-use-rules.d.ts +35 -0
  303. package/dist-server/service/seal-use/seal-use-rules.js +64 -0
  304. package/dist-server/service/seal-use/seal-use-rules.js.map +1 -0
  305. package/dist-server/service/seal-use/seal-use-service.d.ts +20 -0
  306. package/dist-server/service/seal-use/seal-use-service.js +168 -0
  307. package/dist-server/service/seal-use/seal-use-service.js.map +1 -0
  308. package/dist-server/service/seal-use/seal-use-type.d.ts +24 -0
  309. package/dist-server/service/seal-use/seal-use-type.js +93 -0
  310. package/dist-server/service/seal-use/seal-use-type.js.map +1 -0
  311. package/dist-server/service/seal-use/seal-use.d.ts +57 -0
  312. package/dist-server/service/seal-use/seal-use.js +181 -0
  313. package/dist-server/service/seal-use/seal-use.js.map +1 -0
  314. package/dist-server/service/training/index.d.ts +5 -0
  315. package/dist-server/service/training/index.js +9 -0
  316. package/dist-server/service/training/index.js.map +1 -0
  317. package/dist-server/service/training/training-checks.d.ts +20 -0
  318. package/dist-server/service/training/training-checks.js +56 -0
  319. package/dist-server/service/training/training-checks.js.map +1 -0
  320. package/dist-server/service/training/training-kinds.d.ts +24 -0
  321. package/dist-server/service/training/training-kinds.js +42 -0
  322. package/dist-server/service/training/training-kinds.js.map +1 -0
  323. package/dist-server/service/training/training-mutation.d.ts +14 -0
  324. package/dist-server/service/training/training-mutation.js +140 -0
  325. package/dist-server/service/training/training-mutation.js.map +1 -0
  326. package/dist-server/service/training/training-query.d.ts +21 -0
  327. package/dist-server/service/training/training-query.js +196 -0
  328. package/dist-server/service/training/training-query.js.map +1 -0
  329. package/dist-server/service/training/training-read.d.ts +5 -0
  330. package/dist-server/service/training/training-read.js +35 -0
  331. package/dist-server/service/training/training-read.js.map +1 -0
  332. package/dist-server/service/training/training-register.d.ts +1 -0
  333. package/dist-server/service/training/training-register.js +27 -0
  334. package/dist-server/service/training/training-register.js.map +1 -0
  335. package/dist-server/service/training/training-rules.d.ts +72 -0
  336. package/dist-server/service/training/training-rules.js +143 -0
  337. package/dist-server/service/training/training-rules.js.map +1 -0
  338. package/dist-server/service/training/training-service.d.ts +98 -0
  339. package/dist-server/service/training/training-service.js +455 -0
  340. package/dist-server/service/training/training-service.js.map +1 -0
  341. package/dist-server/service/training/training-type.d.ts +94 -0
  342. package/dist-server/service/training/training-type.js +352 -0
  343. package/dist-server/service/training/training-type.js.map +1 -0
  344. package/dist-server/service/training/training.d.ts +127 -0
  345. package/dist-server/service/training/training.js +448 -0
  346. package/dist-server/service/training/training.js.map +1 -0
  347. package/dist-server/tsconfig.tsbuildinfo +1 -0
  348. package/package.json +61 -4
  349. package/things-factory.config.js +19 -0
  350. package/translations/en.json +612 -0
  351. package/translations/es.json +612 -0
  352. package/translations/ja.json +612 -0
  353. package/translations/ko.json +612 -0
  354. package/translations/ms.json +612 -0
  355. package/translations/zh.json +612 -0
  356. package/README.md +0 -3
@@ -0,0 +1,57 @@
1
+ import { User } from '@things-factory/auth-base';
2
+ import { CompanySeal } from '@things-factory/biz-base';
3
+ import { Employee } from '@things-factory/organization';
4
+ import { Domain } from '@things-factory/shell';
5
+ /** What was done with a seal. */
6
+ export declare enum SealUseKind {
7
+ /** 날인 - stamped on a paper. */
8
+ STAMP = "STAMP",
9
+ /** 반출 - taken out of the office, to be returned. */
10
+ TAKE_OUT = "TAKE_OUT",
11
+ /** 인감증명서 발급 - a certificate of the corporate seal taken from the registry. */
12
+ CERTIFICATE = "CERTIFICATE"
13
+ }
14
+ /** Where a use stands: written down, or put up for approval and decided. */
15
+ export declare enum SealUseStatus {
16
+ /** Needs no approval - written down as it happened. */
17
+ RECORDED = "RECORDED",
18
+ SUBMITTED = "SUBMITTED",
19
+ APPROVED = "APPROVED",
20
+ REJECTED = "REJECTED",
21
+ WITHDRAWN = "WITHDRAWN"
22
+ }
23
+ /**
24
+ * 날인 기록 (ADR-0188 decision 2) - one use of one seal of the seal register (biz-base `CompanySeal`): stamped on a
25
+ * paper, taken out, or its certificate issued; who asked, for what and where it goes. A use of the corporate seal, and
26
+ * every taking out, goes through the approval `Compliance Seal Use`; what the approvers saw stays as they saw it.
27
+ */
28
+ export declare class SealUse {
29
+ readonly id: string;
30
+ domain?: Domain;
31
+ domainId?: string;
32
+ kind: SealUseKind;
33
+ seal?: CompanySeal;
34
+ sealId?: string;
35
+ requester?: Employee;
36
+ requesterId?: string;
37
+ usedOn: string;
38
+ document?: string;
39
+ purpose?: string;
40
+ submittedTo?: string;
41
+ returnDueOn?: string;
42
+ returnedOn?: string;
43
+ copies?: number;
44
+ usableUntil?: string;
45
+ status: SealUseStatus;
46
+ activityInstanceId?: string;
47
+ decidedAt?: Date;
48
+ decidedBy?: User;
49
+ decidedById?: string;
50
+ notes?: string;
51
+ createdAt?: Date;
52
+ updatedAt?: Date;
53
+ creator?: User;
54
+ creatorId?: string;
55
+ updater?: User;
56
+ updaterId?: string;
57
+ }
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SealUse = exports.SealUseStatus = exports.SealUseKind = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const typeorm_1 = require("typeorm");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const biz_base_1 = require("@things-factory/biz-base");
9
+ const organization_1 = require("@things-factory/organization");
10
+ const shell_1 = require("@things-factory/shell");
11
+ /** What was done with a seal. */
12
+ var SealUseKind;
13
+ (function (SealUseKind) {
14
+ /** 날인 - stamped on a paper. */
15
+ SealUseKind["STAMP"] = "STAMP";
16
+ /** 반출 - taken out of the office, to be returned. */
17
+ SealUseKind["TAKE_OUT"] = "TAKE_OUT";
18
+ /** 인감증명서 발급 - a certificate of the corporate seal taken from the registry. */
19
+ SealUseKind["CERTIFICATE"] = "CERTIFICATE";
20
+ })(SealUseKind || (exports.SealUseKind = SealUseKind = {}));
21
+ (0, type_graphql_1.registerEnumType)(SealUseKind, { name: 'SealUseKind', description: '날인 · 반출 · 인감증명서 발급' });
22
+ /** Where a use stands: written down, or put up for approval and decided. */
23
+ var SealUseStatus;
24
+ (function (SealUseStatus) {
25
+ /** Needs no approval - written down as it happened. */
26
+ SealUseStatus["RECORDED"] = "RECORDED";
27
+ SealUseStatus["SUBMITTED"] = "SUBMITTED";
28
+ SealUseStatus["APPROVED"] = "APPROVED";
29
+ SealUseStatus["REJECTED"] = "REJECTED";
30
+ SealUseStatus["WITHDRAWN"] = "WITHDRAWN";
31
+ })(SealUseStatus || (exports.SealUseStatus = SealUseStatus = {}));
32
+ (0, type_graphql_1.registerEnumType)(SealUseStatus, { name: 'SealUseStatus', description: 'recorded, or waiting on approval and decided' });
33
+ /**
34
+ * 날인 기록 (ADR-0188 decision 2) - one use of one seal of the seal register (biz-base `CompanySeal`): stamped on a
35
+ * paper, taken out, or its certificate issued; who asked, for what and where it goes. A use of the corporate seal, and
36
+ * every taking out, goes through the approval `Compliance Seal Use`; what the approvers saw stays as they saw it.
37
+ */
38
+ let SealUse = class SealUse {
39
+ };
40
+ exports.SealUse = SealUse;
41
+ tslib_1.__decorate([
42
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
43
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
44
+ tslib_1.__metadata("design:type", String)
45
+ ], SealUse.prototype, "id", void 0);
46
+ tslib_1.__decorate([
47
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
48
+ (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true }),
49
+ tslib_1.__metadata("design:type", shell_1.Domain)
50
+ ], SealUse.prototype, "domain", void 0);
51
+ tslib_1.__decorate([
52
+ (0, typeorm_1.RelationId)((row) => row.domain),
53
+ tslib_1.__metadata("design:type", String)
54
+ ], SealUse.prototype, "domainId", void 0);
55
+ tslib_1.__decorate([
56
+ (0, typeorm_1.Column)(),
57
+ (0, type_graphql_1.Field)(type => SealUseKind),
58
+ tslib_1.__metadata("design:type", String)
59
+ ], SealUse.prototype, "kind", void 0);
60
+ tslib_1.__decorate([
61
+ (0, typeorm_1.ManyToOne)(type => biz_base_1.CompanySeal),
62
+ (0, type_graphql_1.Field)(type => biz_base_1.CompanySeal, { nullable: true }),
63
+ tslib_1.__metadata("design:type", biz_base_1.CompanySeal)
64
+ ], SealUse.prototype, "seal", void 0);
65
+ tslib_1.__decorate([
66
+ (0, typeorm_1.RelationId)((row) => row.seal),
67
+ tslib_1.__metadata("design:type", String)
68
+ ], SealUse.prototype, "sealId", void 0);
69
+ tslib_1.__decorate([
70
+ (0, typeorm_1.ManyToOne)(type => organization_1.Employee, { nullable: true }),
71
+ (0, type_graphql_1.Field)(type => organization_1.Employee, { nullable: true, description: 'Who asked for it' }),
72
+ tslib_1.__metadata("design:type", organization_1.Employee)
73
+ ], SealUse.prototype, "requester", void 0);
74
+ tslib_1.__decorate([
75
+ (0, typeorm_1.RelationId)((row) => row.requester),
76
+ tslib_1.__metadata("design:type", String)
77
+ ], SealUse.prototype, "requesterId", void 0);
78
+ tslib_1.__decorate([
79
+ (0, typeorm_1.Column)(),
80
+ (0, type_graphql_1.Field)({ description: 'YYYY-MM-DD it was stamped, taken out or the certificate issued' }),
81
+ tslib_1.__metadata("design:type", String)
82
+ ], SealUse.prototype, "usedOn", void 0);
83
+ tslib_1.__decorate([
84
+ (0, typeorm_1.Column)({ nullable: true }),
85
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The paper it is for - a contract, a bid, a 사용인감계 by its number' }),
86
+ tslib_1.__metadata("design:type", String)
87
+ ], SealUse.prototype, "document", void 0);
88
+ tslib_1.__decorate([
89
+ (0, typeorm_1.Column)({ nullable: true }),
90
+ (0, type_graphql_1.Field)({ nullable: true }),
91
+ tslib_1.__metadata("design:type", String)
92
+ ], SealUse.prototype, "purpose", void 0);
93
+ tslib_1.__decorate([
94
+ (0, typeorm_1.Column)({ nullable: true }),
95
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Where the paper goes' }),
96
+ tslib_1.__metadata("design:type", String)
97
+ ], SealUse.prototype, "submittedTo", void 0);
98
+ tslib_1.__decorate([
99
+ (0, typeorm_1.Column)({ nullable: true }),
100
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD a seal taken out is to be back' }),
101
+ tslib_1.__metadata("design:type", String)
102
+ ], SealUse.prototype, "returnDueOn", void 0);
103
+ tslib_1.__decorate([
104
+ (0, typeorm_1.Column)({ nullable: true }),
105
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD it came back' }),
106
+ tslib_1.__metadata("design:type", String)
107
+ ], SealUse.prototype, "returnedOn", void 0);
108
+ tslib_1.__decorate([
109
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
110
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'How many certificates were issued' }),
111
+ tslib_1.__metadata("design:type", Number)
112
+ ], SealUse.prototype, "copies", void 0);
113
+ tslib_1.__decorate([
114
+ (0, typeorm_1.Column)({ nullable: true }),
115
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD the certificates are accepted until - by default three months from their issue' }),
116
+ tslib_1.__metadata("design:type", String)
117
+ ], SealUse.prototype, "usableUntil", void 0);
118
+ tslib_1.__decorate([
119
+ (0, typeorm_1.Column)({ default: SealUseStatus.RECORDED }),
120
+ (0, type_graphql_1.Field)(type => SealUseStatus),
121
+ tslib_1.__metadata("design:type", String)
122
+ ], SealUse.prototype, "status", void 0);
123
+ tslib_1.__decorate([
124
+ (0, typeorm_1.Column)({ nullable: true }),
125
+ (0, type_graphql_1.Field)({ nullable: true }),
126
+ tslib_1.__metadata("design:type", String)
127
+ ], SealUse.prototype, "activityInstanceId", void 0);
128
+ tslib_1.__decorate([
129
+ (0, typeorm_1.Column)({ nullable: true }),
130
+ (0, type_graphql_1.Field)({ nullable: true }),
131
+ tslib_1.__metadata("design:type", Date)
132
+ ], SealUse.prototype, "decidedAt", void 0);
133
+ tslib_1.__decorate([
134
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
135
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
136
+ tslib_1.__metadata("design:type", auth_base_1.User)
137
+ ], SealUse.prototype, "decidedBy", void 0);
138
+ tslib_1.__decorate([
139
+ (0, typeorm_1.RelationId)((row) => row.decidedBy),
140
+ tslib_1.__metadata("design:type", String)
141
+ ], SealUse.prototype, "decidedById", void 0);
142
+ tslib_1.__decorate([
143
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
144
+ (0, type_graphql_1.Field)({ nullable: true }),
145
+ tslib_1.__metadata("design:type", String)
146
+ ], SealUse.prototype, "notes", void 0);
147
+ tslib_1.__decorate([
148
+ (0, typeorm_1.CreateDateColumn)(),
149
+ (0, type_graphql_1.Field)({ nullable: true }),
150
+ tslib_1.__metadata("design:type", Date)
151
+ ], SealUse.prototype, "createdAt", void 0);
152
+ tslib_1.__decorate([
153
+ (0, typeorm_1.UpdateDateColumn)(),
154
+ (0, type_graphql_1.Field)({ nullable: true }),
155
+ tslib_1.__metadata("design:type", Date)
156
+ ], SealUse.prototype, "updatedAt", void 0);
157
+ tslib_1.__decorate([
158
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
159
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
160
+ tslib_1.__metadata("design:type", auth_base_1.User)
161
+ ], SealUse.prototype, "creator", void 0);
162
+ tslib_1.__decorate([
163
+ (0, typeorm_1.RelationId)((row) => row.creator),
164
+ tslib_1.__metadata("design:type", String)
165
+ ], SealUse.prototype, "creatorId", void 0);
166
+ tslib_1.__decorate([
167
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
168
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
169
+ tslib_1.__metadata("design:type", auth_base_1.User)
170
+ ], SealUse.prototype, "updater", void 0);
171
+ tslib_1.__decorate([
172
+ (0, typeorm_1.RelationId)((row) => row.updater),
173
+ tslib_1.__metadata("design:type", String)
174
+ ], SealUse.prototype, "updaterId", void 0);
175
+ exports.SealUse = SealUse = tslib_1.__decorate([
176
+ (0, typeorm_1.Entity)({ name: 'compliance_seal_uses' }),
177
+ (0, typeorm_1.Index)('ix_compliance_seal_use_0', (row) => [row.domain, row.usedOn]),
178
+ (0, typeorm_1.Index)('ix_compliance_seal_use_1', (row) => [row.domain, row.seal]),
179
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for SealUse - a seal stamped, taken out, or its certificate issued' })
180
+ ], SealUse);
181
+ //# sourceMappingURL=seal-use.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seal-use.js","sourceRoot":"","sources":["../../../server/service/seal-use/seal-use.ts"],"names":[],"mappings":";;;;AAAA,+CAA2E;AAC3E,qCAAkI;AAElI,yDAAgD;AAChD,uDAAsD;AACtD,+DAAuD;AACvD,iDAA8C;AAE9C,iCAAiC;AACjC,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,+BAA+B;IAC/B,8BAAe,CAAA;IACf,oDAAoD;IACpD,oCAAqB,CAAA;IACrB,8EAA8E;IAC9E,0CAA2B,CAAA;AAC7B,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAED,IAAA,+BAAgB,EAAC,WAAW,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC,CAAA;AAEzF,4EAA4E;AAC5E,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,uDAAuD;IACvD,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;AACzB,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB;AAED,IAAA,+BAAgB,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC,CAAA;AAEvH;;;;GAIG;AAKI,IAAM,OAAO,GAAb,MAAM,OAAO;CA0GnB,CAAA;AA1GY,0BAAO;AAGT;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;mCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAA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,GAAG,CAAC,OAAO,CAAC;;0CACxB;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;wCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,GAAY,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;;0CACxB;kBAzGP,OAAO;IAJnB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;IACxC,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,GAAY,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7E,IAAA,eAAK,EAAC,0BAA0B,EAAE,CAAC,GAAY,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3E,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2EAA2E,EAAE,CAAC;GAC5F,OAAO,CA0GnB","sourcesContent":["import { Field, ID, Int, ObjectType, registerEnumType } from 'type-graphql'\nimport { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { CompanySeal } from '@things-factory/biz-base'\nimport { Employee } from '@things-factory/organization'\nimport { Domain } from '@things-factory/shell'\n\n/** What was done with a seal. */\nexport enum SealUseKind {\n /** 날인 - stamped on a paper. */\n STAMP = 'STAMP',\n /** 반출 - taken out of the office, to be returned. */\n TAKE_OUT = 'TAKE_OUT',\n /** 인감증명서 발급 - a certificate of the corporate seal taken from the registry. */\n CERTIFICATE = 'CERTIFICATE'\n}\n\nregisterEnumType(SealUseKind, { name: 'SealUseKind', description: '날인 · 반출 · 인감증명서 발급' })\n\n/** Where a use stands: written down, or put up for approval and decided. */\nexport enum SealUseStatus {\n /** Needs no approval - written down as it happened. */\n RECORDED = 'RECORDED',\n SUBMITTED = 'SUBMITTED',\n APPROVED = 'APPROVED',\n REJECTED = 'REJECTED',\n WITHDRAWN = 'WITHDRAWN'\n}\n\nregisterEnumType(SealUseStatus, { name: 'SealUseStatus', description: 'recorded, or waiting on approval and decided' })\n\n/**\n * 날인 기록 (ADR-0188 decision 2) - one use of one seal of the seal register (biz-base `CompanySeal`): stamped on a\n * paper, taken out, or its certificate issued; who asked, for what and where it goes. A use of the corporate seal, and\n * every taking out, goes through the approval `Compliance Seal Use`; what the approvers saw stays as they saw it.\n */\n@Entity({ name: 'compliance_seal_uses' })\n@Index('ix_compliance_seal_use_0', (row: SealUse) => [row.domain, row.usedOn])\n@Index('ix_compliance_seal_use_1', (row: SealUse) => [row.domain, row.seal])\n@ObjectType({ description: 'Entity for SealUse - a seal stamped, taken out, or its certificate issued' })\nexport class SealUse {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((row: SealUse) => row.domain)\n domainId?: string\n\n @Column()\n @Field(type => SealUseKind)\n kind: SealUseKind\n\n @ManyToOne(type => CompanySeal)\n @Field(type => CompanySeal, { nullable: true })\n seal?: CompanySeal\n\n @RelationId((row: SealUse) => row.seal)\n sealId?: string\n\n @ManyToOne(type => Employee, { nullable: true })\n @Field(type => Employee, { nullable: true, description: 'Who asked for it' })\n requester?: Employee\n\n @RelationId((row: SealUse) => row.requester)\n requesterId?: string\n\n @Column()\n @Field({ description: 'YYYY-MM-DD it was stamped, taken out or the certificate issued' })\n usedOn: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The paper it is for - a contract, a bid, a 사용인감계 by its number' })\n document?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n purpose?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Where the paper goes' })\n submittedTo?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD a seal taken out is to be back' })\n returnDueOn?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD it came back' })\n returnedOn?: string\n\n @Column({ type: 'int', nullable: true })\n @Field(type => Int, { nullable: true, description: 'How many certificates were issued' })\n copies?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'YYYY-MM-DD the certificates are accepted until - by default three months from their issue' })\n usableUntil?: string\n\n @Column({ default: SealUseStatus.RECORDED })\n @Field(type => SealUseStatus)\n status: SealUseStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n activityInstanceId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n decidedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n decidedBy?: User\n\n @RelationId((row: SealUse) => row.decidedBy)\n decidedById?: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true })\n notes?: string\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((row: SealUse) => row.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((row: SealUse) => row.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { TrainingAssignment, TrainingCompletion, TrainingSession, TrainingSetting } from './training';
2
+ import { TrainingMutation } from './training-mutation';
3
+ import { TrainingCompletionQuery, TrainingQuery } from './training-query';
4
+ export declare const entities: (typeof TrainingSetting | typeof TrainingSession | typeof TrainingCompletion | typeof TrainingAssignment)[];
5
+ export declare const resolvers: (typeof TrainingMutation | typeof TrainingQuery | typeof TrainingCompletionQuery)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const training_1 = require("./training");
5
+ const training_mutation_1 = require("./training-mutation");
6
+ const training_query_1 = require("./training-query");
7
+ exports.entities = [training_1.TrainingSetting, training_1.TrainingSession, training_1.TrainingCompletion, training_1.TrainingAssignment];
8
+ exports.resolvers = [training_query_1.TrainingQuery, training_query_1.TrainingCompletionQuery, training_mutation_1.TrainingMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/training/index.ts"],"names":[],"mappings":";;;AAAA,yCAAqG;AACrG,2DAAsD;AACtD,qDAAyE;AAE5D,QAAA,QAAQ,GAAG,CAAC,0BAAe,EAAE,0BAAe,EAAE,6BAAkB,EAAE,6BAAkB,CAAC,CAAA;AACrF,QAAA,SAAS,GAAG,CAAC,8BAAa,EAAE,wCAAuB,EAAE,oCAAgB,CAAC,CAAA","sourcesContent":["import { TrainingAssignment, TrainingCompletion, TrainingSession, TrainingSetting } from './training'\nimport { TrainingMutation } from './training-mutation'\nimport { TrainingCompletionQuery, TrainingQuery } from './training-query'\n\nexport const entities = [TrainingSetting, TrainingSession, TrainingCompletion, TrainingAssignment]\nexport const resolvers = [TrainingQuery, TrainingCompletionQuery, TrainingMutation]\n"]}
@@ -0,0 +1,20 @@
1
+ import { EntityManager } from 'typeorm';
2
+ import { Employee } from '@things-factory/organization';
3
+ import { TrainingCompletion } from './training';
4
+ /** A session is to be opened when the kind's due day is this many days away or less. */
5
+ export declare const TRAINING_DUE_SOON_DAYS = 30;
6
+ /** This year's completion of each kind on: how many must take it, how many are done, and the days left to its due day. */
7
+ export declare function trainingCompletionRates(tx: EntityManager, domain: any, today: string): Promise<any[]>;
8
+ /** The kinds on whose due day comes within 30 days, with no session of this year yet. */
9
+ export declare function trainingsDueWithoutSession(tx: EntityManager, domain: any, today: string): Promise<{
10
+ daysLeft: number;
11
+ kind: "OTHER" | "SEXUAL_HARASSMENT" | "DISABILITY_AWARENESS" | "PENSION" | "PRIVACY" | "SAFETY" | "WORKPLACE_BULLYING";
12
+ year: number;
13
+ dueOn: string;
14
+ }[]>;
15
+ /** The certificates people sent that wait for the manager, oldest first - of the kinds on. */
16
+ export declare function trainingCertificatesWaiting(tx: EntityManager, domain: any, today: string): Promise<{
17
+ completion: TrainingCompletion;
18
+ employee: Employee;
19
+ waitingDays: number;
20
+ }[]>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TRAINING_DUE_SOON_DAYS = void 0;
4
+ exports.trainingCompletionRates = trainingCompletionRates;
5
+ exports.trainingsDueWithoutSession = trainingsDueWithoutSession;
6
+ exports.trainingCertificatesWaiting = trainingCertificatesWaiting;
7
+ const typeorm_1 = require("typeorm");
8
+ const organization_1 = require("@things-factory/organization");
9
+ const training_1 = require("./training");
10
+ const training_rules_1 = require("./training-rules");
11
+ const training_service_1 = require("./training-service");
12
+ /*
13
+ * 관리 점검 (ADR-0146, ADR-0187 decision 19) - what the mandatory trainings say is late or missing, for each kind the
14
+ * domain has on. The application's management check reads these and says them in its own items.
15
+ */
16
+ /** A session is to be opened when the kind's due day is this many days away or less. */
17
+ exports.TRAINING_DUE_SOON_DAYS = 30;
18
+ const yearOf = (today) => Number(today.slice(0, 4));
19
+ /** This year's completion of each kind on: how many must take it, how many are done, and the days left to its due day. */
20
+ async function trainingCompletionRates(tx, domain, today) {
21
+ const year = yearOf(today);
22
+ const kinds = (await (0, training_service_1.trainingKindsOf)(tx, domain)).filter(one => one.enabled);
23
+ const confirmed = await tx.getRepository(training_1.TrainingCompletion).find({ where: { domain: { id: domain.id }, year, status: training_1.TrainingCompletionStatus.CONFIRMED } });
24
+ const out = [];
25
+ for (const kind of kinds) {
26
+ const people = await (0, training_service_1.trainingPeopleOf)(tx, domain, (0, training_service_1.trainingAudiencesOf)(kind, domain), today);
27
+ const done = new Set(confirmed.filter(one => one.kind === kind.code).map(one => one.employeeId));
28
+ const states = people.map(one => (done.has(one.id) ? 'DONE' : 'NOT_DONE'));
29
+ const dueOn = (0, training_rules_1.trainingDueOnOf)(year, kind.dueDay);
30
+ out.push({ kind: kind.code, year, dueOn, daysLeft: (0, training_rules_1.trainingDaysLeft)(today, dueOn), people: people.length, done: states.filter(one => one === 'DONE').length, rate: (0, training_rules_1.trainingCompletionRate)(states) });
31
+ }
32
+ return out;
33
+ }
34
+ /** The kinds on whose due day comes within 30 days, with no session of this year yet. */
35
+ async function trainingsDueWithoutSession(tx, domain, today) {
36
+ const year = yearOf(today);
37
+ const kinds = (await (0, training_service_1.trainingKindsOf)(tx, domain)).filter(one => one.enabled);
38
+ const sessions = await tx.getRepository(training_1.TrainingSession).find({ where: { domain: { id: domain.id }, year } });
39
+ return kinds
40
+ .map(kind => ({ kind: kind.code, year, dueOn: (0, training_rules_1.trainingDueOnOf)(year, kind.dueDay) }))
41
+ .map(one => ({ ...one, daysLeft: (0, training_rules_1.trainingDaysLeft)(today, one.dueOn) }))
42
+ .filter(one => one.daysLeft >= 0 && one.daysLeft <= exports.TRAINING_DUE_SOON_DAYS && !sessions.some(session => session.kind === one.kind));
43
+ }
44
+ /** The certificates people sent that wait for the manager, oldest first - of the kinds on. */
45
+ async function trainingCertificatesWaiting(tx, domain, today) {
46
+ const kinds = (await (0, training_service_1.trainingKindsOf)(tx, domain)).filter(one => one.enabled).map(one => one.code);
47
+ if (!kinds.length)
48
+ return [];
49
+ const rows = await tx.getRepository(training_1.TrainingCompletion).find({
50
+ where: { domain: { id: domain.id }, status: training_1.TrainingCompletionStatus.SUBMITTED, kind: (0, typeorm_1.In)(kinds) },
51
+ order: { createdAt: 'ASC' }
52
+ });
53
+ const employees = rows.length ? await tx.getRepository(organization_1.Employee).find({ where: { id: (0, typeorm_1.In)([...new Set(rows.map(one => one.employeeId))]) } }) : [];
54
+ return rows.map(completion => ({ completion, employee: employees.find(one => one.id === completion.employeeId) ?? null, waitingDays: (0, training_rules_1.trainingDaysLeft)(completion.createdAt.toISOString().slice(0, 10), today) }));
55
+ }
56
+ //# sourceMappingURL=training-checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"training-checks.js","sourceRoot":"","sources":["../../../server/service/training/training-checks.ts"],"names":[],"mappings":";;;AAmBA,0DAaC;AAGD,gEAQC;AAGD,kEASC;AAvDD,qCAA2C;AAE3C,+DAAuD;AAEvD,yCAA0F;AAC1F,qDAA2G;AAC3G,yDAA2F;AAE3F;;;GAGG;AAEH,wFAAwF;AAC3E,QAAA,sBAAsB,GAAG,EAAE,CAAA;AAExC,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAE3D,0HAA0H;AACnH,KAAK,UAAU,uBAAuB,CAAC,EAAiB,EAAE,MAAW,EAAE,KAAa;IACzF,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAC1B,MAAM,KAAK,GAAG,CAAC,MAAM,IAAA,kCAAe,EAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAC5E,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,6BAAkB,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,mCAAwB,CAAC,SAAS,EAAS,EAAE,CAAC,CAAA;IACpK,MAAM,GAAG,GAAG,EAAE,CAAA;IACd,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,MAAM,IAAA,mCAAgB,EAAC,E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IAC5B,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,6BAAkB,CAAC,CAAC,IAAI,CAAC;QAC3D,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,mCAAwB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAA,YAAE,EAAC,KAAK,CAAC,EAAS;QACxG,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAS;KACnC,CAAC,CAAA;IACF,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,uBAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,IAAA,YAAE,EAAC,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,UAAW,CAAC,CAAC,CAAC,CAAC,EAAS,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACxJ,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,UAAU,CAAC,UAAU,CAAC,IAAI,IAAI,EAAE,WAAW,EAAE,IAAA,iCAAgB,EAAC,UAAU,CAAC,SAAU,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AACpN,CAAC","sourcesContent":["import { EntityManager, In } from 'typeorm'\n\nimport { Employee } from '@things-factory/organization'\n\nimport { TrainingCompletion, TrainingCompletionStatus, TrainingSession } from './training'\nimport { trainingCompletionRate, trainingDaysLeft, trainingDueOnOf, TrainingState } from './training-rules'\nimport { trainingAudiencesOf, trainingPeopleOf, trainingKindsOf } from './training-service'\n\n/*\n * 관리 점검 (ADR-0146, ADR-0187 decision 19) - what the mandatory trainings say is late or missing, for each kind the\n * domain has on. The application's management check reads these and says them in its own items.\n */\n\n/** A session is to be opened when the kind's due day is this many days away or less. */\nexport const TRAINING_DUE_SOON_DAYS = 30\n\nconst yearOf = (today: string) => Number(today.slice(0, 4))\n\n/** This year's completion of each kind on: how many must take it, how many are done, and the days left to its due day. */\nexport async function trainingCompletionRates(tx: EntityManager, domain: any, today: string) {\n const year = yearOf(today)\n const kinds = (await trainingKindsOf(tx, domain)).filter(one => one.enabled)\n const confirmed = await tx.getRepository(TrainingCompletion).find({ where: { domain: { id: domain.id }, year, status: TrainingCompletionStatus.CONFIRMED } as any })\n const out = []\n for (const kind of kinds) {\n const people = await trainingPeopleOf(tx, domain, trainingAudiencesOf(kind, domain), today)\n const done = new Set(confirmed.filter(one => one.kind === kind.code).map(one => one.employeeId))\n const states: TrainingState[] = people.map(one => (done.has(one.id) ? 'DONE' : 'NOT_DONE'))\n const dueOn = trainingDueOnOf(year, kind.dueDay)\n out.push({ kind: kind.code, year, dueOn, daysLeft: trainingDaysLeft(today, dueOn), people: people.length, done: states.filter(one => one === 'DONE').length, rate: trainingCompletionRate(states) })\n }\n return out\n}\n\n/** The kinds on whose due day comes within 30 days, with no session of this year yet. */\nexport async function trainingsDueWithoutSession(tx: EntityManager, domain: any, today: string) {\n const year = yearOf(today)\n const kinds = (await trainingKindsOf(tx, domain)).filter(one => one.enabled)\n const sessions = await tx.getRepository(TrainingSession).find({ where: { domain: { id: domain.id }, year } as any })\n return kinds\n .map(kind => ({ kind: kind.code, year, dueOn: trainingDueOnOf(year, kind.dueDay) }))\n .map(one => ({ ...one, daysLeft: trainingDaysLeft(today, one.dueOn) }))\n .filter(one => one.daysLeft >= 0 && one.daysLeft <= TRAINING_DUE_SOON_DAYS && !sessions.some(session => session.kind === one.kind))\n}\n\n/** The certificates people sent that wait for the manager, oldest first - of the kinds on. */\nexport async function trainingCertificatesWaiting(tx: EntityManager, domain: any, today: string) {\n const kinds = (await trainingKindsOf(tx, domain)).filter(one => one.enabled).map(one => one.code)\n if (!kinds.length) return []\n const rows = await tx.getRepository(TrainingCompletion).find({\n where: { domain: { id: domain.id }, status: TrainingCompletionStatus.SUBMITTED, kind: In(kinds) } as any,\n order: { createdAt: 'ASC' } as any\n })\n const employees = rows.length ? await tx.getRepository(Employee).find({ where: { id: In([...new Set(rows.map(one => one.employeeId!))]) } as any }) : []\n return rows.map(completion => ({ completion, employee: employees.find(one => one.id === completion.employeeId) ?? null, waitingDays: trainingDaysLeft(completion.createdAt!.toISOString().slice(0, 10), today) }))\n}\n"]}
@@ -0,0 +1,24 @@
1
+ export declare const TRAINING_KIND_CODES: readonly ["SEXUAL_HARASSMENT", "DISABILITY_AWARENESS", "PENSION", "PRIVACY", "SAFETY", "WORKPLACE_BULLYING", "OTHER"];
2
+ export type TrainingKindCode = (typeof TRAINING_KIND_CODES)[number];
3
+ export interface TrainingKind {
4
+ code: TrainingKindCode;
5
+ /** The article it rests on. */
6
+ basis: string;
7
+ /** How often - `YEARLY`, or what the domain's own plan says (`PLAN`) or the company decides (`COMPANY`). */
8
+ cycle: 'YEARLY' | 'PLAN' | 'COMPANY' | 'BY_INDUSTRY';
9
+ /** Who must take it, as the law says it - the domain names the people with the setting's audiences. */
10
+ audience: string;
11
+ /** On in a domain that has not said otherwise. */
12
+ defaultOn: boolean;
13
+ /** Years its records are kept (the retention table, legal review section 9). */
14
+ retentionYears: number;
15
+ /** The basis is to be settled with a labour attorney. */
16
+ toConfirm?: boolean;
17
+ }
18
+ /** What an application calls at boot: the kinds on (or off) in a domain that has not said - `{ PENSION: true }`. */
19
+ export declare function trainingKindDefaults(defaults: Partial<Record<TrainingKindCode, boolean>>): void;
20
+ /** The kinds as this installation declares them - the application's defaults over the module's. */
21
+ export declare function trainingKinds(): TrainingKind[];
22
+ export declare function trainingKindOf(code: string | null | undefined): TrainingKind | undefined;
23
+ /** The due day of a year when a domain has not set one - the year's last day. */
24
+ export declare const DEFAULT_DUE_DAY = "12-31";
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /*
3
+ * 법정 의무 교육의 종류 (ADR-0187 decision 15) - declared by the module with what each rests on, how often, for whom,
4
+ * whether a domain has it on before it says otherwise, and how long its records are kept. The bases marked ⚖ are
5
+ * settled with a labour attorney; the words here are what the law names today.
6
+ *
7
+ * A domain turns a kind on or off with its own `TrainingSetting`; a kind with no setting reads as declared here. An
8
+ * application says at boot what it knows better (`trainingKindDefaults({ PENSION: true })` where the company runs a
9
+ * retirement pension plan).
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DEFAULT_DUE_DAY = exports.TRAINING_KIND_CODES = void 0;
13
+ exports.trainingKindDefaults = trainingKindDefaults;
14
+ exports.trainingKinds = trainingKinds;
15
+ exports.trainingKindOf = trainingKindOf;
16
+ exports.TRAINING_KIND_CODES = ['SEXUAL_HARASSMENT', 'DISABILITY_AWARENESS', 'PENSION', 'PRIVACY', 'SAFETY', 'WORKPLACE_BULLYING', 'OTHER'];
17
+ const DECLARED = [
18
+ { code: 'SEXUAL_HARASSMENT', basis: '남녀고용평등법 §13 · 시행령 §3', cycle: 'YEARLY', audience: '사업주 · 모든 근로자', defaultOn: true, retentionYears: 3, toConfirm: true },
19
+ { code: 'DISABILITY_AWARENESS', basis: '장애인고용촉진법 §5의2', cycle: 'YEARLY', audience: '사업주 · 모든 근로자', defaultOn: true, retentionYears: 3 },
20
+ { code: 'PENSION', basis: '근로자퇴직급여 보장법 §32②', cycle: 'YEARLY', audience: '퇴직연금 가입자', defaultOn: false, retentionYears: 3 },
21
+ { code: 'PRIVACY', basis: '개인정보보호법 §28② · 안전성 확보조치 기준', cycle: 'PLAN', audience: '개인정보취급자', defaultOn: true, retentionYears: 3 },
22
+ { code: 'SAFETY', basis: '산업안전보건법 §29 · 시행령 별표 1', cycle: 'BY_INDUSTRY', audience: '업종에 따름', defaultOn: false, retentionYears: 3, toConfirm: true },
23
+ { code: 'WORKPLACE_BULLYING', basis: '법정 의무 아님(회사 선택)', cycle: 'COMPANY', audience: '모든 근로자', defaultOn: false, retentionYears: 3, toConfirm: true },
24
+ { code: 'OTHER', basis: '회사가 적음', cycle: 'COMPANY', audience: '회사가 정함', defaultOn: false, retentionYears: 3 }
25
+ ];
26
+ const OVERRIDES = new Map();
27
+ /** What an application calls at boot: the kinds on (or off) in a domain that has not said - `{ PENSION: true }`. */
28
+ function trainingKindDefaults(defaults) {
29
+ for (const [code, on] of Object.entries(defaults))
30
+ if (exports.TRAINING_KIND_CODES.includes(code))
31
+ OVERRIDES.set(code, !!on);
32
+ }
33
+ /** The kinds as this installation declares them - the application's defaults over the module's. */
34
+ function trainingKinds() {
35
+ return DECLARED.map(kind => ({ ...kind, defaultOn: OVERRIDES.get(kind.code) ?? kind.defaultOn }));
36
+ }
37
+ function trainingKindOf(code) {
38
+ return trainingKinds().find(kind => kind.code === code);
39
+ }
40
+ /** The due day of a year when a domain has not set one - the year's last day. */
41
+ exports.DEFAULT_DUE_DAY = '12-31';
42
+ //# sourceMappingURL=training-kinds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"training-kinds.js","sourceRoot":"","sources":["../../../server/service/training/training-kinds.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAmCH,oDAEC;AAGD,sCAEC;AAED,wCAEC;AA5CY,QAAA,mBAAmB,GAAG,CAAC,mBAAmB,EAAE,sBAAsB,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,EAAE,OAAO,CAAU,CAAA;AAoBxJ,MAAM,QAAQ,GAA4B;IACxC,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;IAC5J,EAAE,IAA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C,QAAQ,CAAC,IAAI,CAAC;YAAE,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAA;AAC7I,CAAC;AAED,mGAAmG;AACnG,SAAgB,aAAa;IAC3B,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;AACnG,CAAC;AAED,SAAgB,cAAc,CAAC,IAA+B;IAC5D,OAAO,aAAa,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;AACzD,CAAC;AAED,iFAAiF;AACpE,QAAA,eAAe,GAAG,OAAO,CAAA","sourcesContent":["/*\n * 법정 의무 교육의 종류 (ADR-0187 decision 15) - declared by the module with what each rests on, how often, for whom,\n * whether a domain has it on before it says otherwise, and how long its records are kept. The bases marked ⚖ are\n * settled with a labour attorney; the words here are what the law names today.\n *\n * A domain turns a kind on or off with its own `TrainingSetting`; a kind with no setting reads as declared here. An\n * application says at boot what it knows better (`trainingKindDefaults({ PENSION: true })` where the company runs a\n * retirement pension plan).\n */\n\nexport const TRAINING_KIND_CODES = ['SEXUAL_HARASSMENT', 'DISABILITY_AWARENESS', 'PENSION', 'PRIVACY', 'SAFETY', 'WORKPLACE_BULLYING', 'OTHER'] as const\n\nexport type TrainingKindCode = (typeof TRAINING_KIND_CODES)[number]\n\nexport interface TrainingKind {\n code: TrainingKindCode\n /** The article it rests on. */\n basis: string\n /** How often - `YEARLY`, or what the domain's own plan says (`PLAN`) or the company decides (`COMPANY`). */\n cycle: 'YEARLY' | 'PLAN' | 'COMPANY' | 'BY_INDUSTRY'\n /** Who must take it, as the law says it - the domain names the people with the setting's audiences. */\n audience: string\n /** On in a domain that has not said otherwise. */\n defaultOn: boolean\n /** Years its records are kept (the retention table, legal review section 9). */\n retentionYears: number\n /** The basis is to be settled with a labour attorney. */\n toConfirm?: boolean\n}\n\nconst DECLARED: readonly TrainingKind[] = [\n { code: 'SEXUAL_HARASSMENT', basis: '남녀고용평등법 §13 · 시행령 §3', cycle: 'YEARLY', audience: '사업주 · 모든 근로자', defaultOn: true, retentionYears: 3, toConfirm: true },\n { code: 'DISABILITY_AWARENESS', basis: '장애인고용촉진법 §5의2', cycle: 'YEARLY', audience: '사업주 · 모든 근로자', defaultOn: true, retentionYears: 3 },\n { code: 'PENSION', basis: '근로자퇴직급여 보장법 §32②', cycle: 'YEARLY', audience: '퇴직연금 가입자', defaultOn: false, retentionYears: 3 },\n { code: 'PRIVACY', basis: '개인정보보호법 §28② · 안전성 확보조치 기준', cycle: 'PLAN', audience: '개인정보취급자', defaultOn: true, retentionYears: 3 },\n { code: 'SAFETY', basis: '산업안전보건법 §29 · 시행령 별표 1', cycle: 'BY_INDUSTRY', audience: '업종에 따름', defaultOn: false, retentionYears: 3, toConfirm: true },\n { code: 'WORKPLACE_BULLYING', basis: '법정 의무 아님(회사 선택)', cycle: 'COMPANY', audience: '모든 근로자', defaultOn: false, retentionYears: 3, toConfirm: true },\n { code: 'OTHER', basis: '회사가 적음', cycle: 'COMPANY', audience: '회사가 정함', defaultOn: false, retentionYears: 3 }\n]\n\nconst OVERRIDES = new Map<string, boolean>()\n\n/** What an application calls at boot: the kinds on (or off) in a domain that has not said - `{ PENSION: true }`. */\nexport function trainingKindDefaults(defaults: Partial<Record<TrainingKindCode, boolean>>): void {\n for (const [code, on] of Object.entries(defaults)) if ((TRAINING_KIND_CODES as readonly string[]).includes(code)) OVERRIDES.set(code, !!on)\n}\n\n/** The kinds as this installation declares them - the application's defaults over the module's. */\nexport function trainingKinds(): TrainingKind[] {\n return DECLARED.map(kind => ({ ...kind, defaultOn: OVERRIDES.get(kind.code) ?? kind.defaultOn }))\n}\n\nexport function trainingKindOf(code: string | null | undefined): TrainingKind | undefined {\n return trainingKinds().find(kind => kind.code === code)\n}\n\n/** The due day of a year when a domain has not set one - the year's last day. */\nexport const DEFAULT_DUE_DAY = '12-31'\n"]}
@@ -0,0 +1,14 @@
1
+ import type { FileUpload } from 'graphql-upload/GraphQLUpload.js';
2
+ import { TrainingCompletion, TrainingSession, TrainingSetting } from './training';
3
+ import { NewTrainingSession, TrainingCertificateInput, TrainingSessionPatch, TrainingSettingPatch, TrainingYearOpened } from './training-type';
4
+ export declare class TrainingMutation {
5
+ saveTrainingSettings(patches: TrainingSettingPatch[], context: ResolverContext): Promise<TrainingSetting[]>;
6
+ openTrainingSession(session: NewTrainingSession, attach: FileUpload[], context: ResolverContext): Promise<TrainingSession>;
7
+ updateMultipleTrainingSession(patches: TrainingSessionPatch[], context: ResolverContext): Promise<TrainingSession[]>;
8
+ recordTrainingAttendance(sessionId: string, employeeIds: string[], completedOn: string, context: ResolverContext): Promise<TrainingCompletion[]>;
9
+ submitTrainingCertificate(certificate: TrainingCertificateInput, attach: FileUpload[], context: ResolverContext): Promise<TrainingCompletion>;
10
+ confirmTrainingCompletions(ids: string[], context: ResolverContext): Promise<TrainingCompletion[]>;
11
+ returnTrainingCompletion(id: string, reason: string, context: ResolverContext): Promise<TrainingCompletion>;
12
+ openTrainingYear(kind: string, year: number, context: ResolverContext): Promise<TrainingYearOpened>;
13
+ deleteTrainingRecords(ids: string[]): Promise<boolean>;
14
+ }
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrainingMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const GraphQLUpload_js_1 = tslib_1.__importDefault(require("graphql-upload/GraphQLUpload.js"));
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const training_1 = require("./training");
9
+ const training_service_1 = require("./training-service");
10
+ const training_type_1 = require("./training-type");
11
+ const MANAGING = '@privilege(category: "training", privilege: "mutation", domainOwnerGranted: true)';
12
+ let TrainingMutation = class TrainingMutation {
13
+ async saveTrainingSettings(patches, context) {
14
+ return await (0, training_service_1.saveTrainingSettings)(patches, context);
15
+ }
16
+ async openTrainingSession(session, attach, context) {
17
+ return await (0, training_service_1.openTrainingSession)(session, attach, context);
18
+ }
19
+ async updateMultipleTrainingSession(patches, context) {
20
+ return await (0, training_service_1.updateTrainingSessions)(patches, context);
21
+ }
22
+ async recordTrainingAttendance(sessionId, employeeIds, completedOn, context) {
23
+ return await (0, training_service_1.recordTrainingAttendance)(sessionId, employeeIds, completedOn, context);
24
+ }
25
+ /* The person's own door - an employee of this domain, no task needed; the service refuses anyone else. */
26
+ async submitTrainingCertificate(certificate, attach, context) {
27
+ return await (0, training_service_1.submitTrainingCertificate)(certificate, attach, context);
28
+ }
29
+ async confirmTrainingCompletions(ids, context) {
30
+ return await (0, training_service_1.confirmTrainingCompletions)(ids, context);
31
+ }
32
+ async returnTrainingCompletion(id, reason, context) {
33
+ return await (0, training_service_1.returnTrainingCompletion)(id, reason, context);
34
+ }
35
+ async openTrainingYear(kind, year, context) {
36
+ return await (0, training_service_1.openTrainingYear)(kind, year, context);
37
+ }
38
+ async deleteTrainingRecords(ids) {
39
+ return await (0, training_service_1.deleteTrainingRecords)();
40
+ }
41
+ };
42
+ exports.TrainingMutation = TrainingMutation;
43
+ tslib_1.__decorate([
44
+ (0, type_graphql_1.Directive)(MANAGING),
45
+ (0, type_graphql_1.Directive)('@transaction'),
46
+ (0, type_graphql_1.Mutation)(returns => [training_1.TrainingSetting], { description: "To set a kind of training on or off, its due day, audience and memo (ADR-0187 decision 15)" }),
47
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [training_type_1.TrainingSettingPatch])),
48
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
49
+ tslib_1.__metadata("design:type", Function),
50
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
51
+ tslib_1.__metadata("design:returntype", Promise)
52
+ ], TrainingMutation.prototype, "saveTrainingSettings", null);
53
+ tslib_1.__decorate([
54
+ (0, type_graphql_1.Directive)(MANAGING),
55
+ (0, type_graphql_1.Directive)('@transaction'),
56
+ (0, type_graphql_1.Mutation)(returns => training_1.TrainingSession, { description: 'To open a session with its material - its audience is told (ADR-0187 decision 16)' }),
57
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('session', type => training_type_1.NewTrainingSession)),
58
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('attach', type => [GraphQLUpload_js_1.default], { nullable: true })),
59
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
60
+ tslib_1.__metadata("design:type", Function),
61
+ tslib_1.__metadata("design:paramtypes", [training_type_1.NewTrainingSession, Array, Object]),
62
+ tslib_1.__metadata("design:returntype", Promise)
63
+ ], TrainingMutation.prototype, "openTrainingSession", null);
64
+ tslib_1.__decorate([
65
+ (0, type_graphql_1.Directive)(MANAGING),
66
+ (0, type_graphql_1.Directive)('@transaction'),
67
+ (0, type_graphql_1.Mutation)(returns => [training_1.TrainingSession], { description: 'To correct what sessions say - their kind and year stay' }),
68
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [training_type_1.TrainingSessionPatch])),
69
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
70
+ tslib_1.__metadata("design:type", Function),
71
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
72
+ tslib_1.__metadata("design:returntype", Promise)
73
+ ], TrainingMutation.prototype, "updateMultipleTrainingSession", null);
74
+ tslib_1.__decorate([
75
+ (0, type_graphql_1.Directive)(MANAGING),
76
+ (0, type_graphql_1.Directive)('@transaction'),
77
+ (0, type_graphql_1.Mutation)(returns => [training_1.TrainingCompletion], { description: "To record a session's attendance - confirmed at once, closing each one's to-do (ADR-0187 decision 17)" }),
78
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('sessionId')),
79
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('employeeIds', type => [String])),
80
+ tslib_1.__param(2, (0, type_graphql_1.Arg)('completedOn', { nullable: true, description: "YYYY-MM-DD - the session's last day when empty" })),
81
+ tslib_1.__param(3, (0, type_graphql_1.Ctx)()),
82
+ tslib_1.__metadata("design:type", Function),
83
+ tslib_1.__metadata("design:paramtypes", [String, Array, String, Object]),
84
+ tslib_1.__metadata("design:returntype", Promise)
85
+ ], TrainingMutation.prototype, "recordTrainingAttendance", null);
86
+ tslib_1.__decorate([
87
+ (0, type_graphql_1.Directive)('@transaction'),
88
+ (0, type_graphql_1.Mutation)(returns => training_1.TrainingCompletion, { description: 'To send the certificate of a training one took - it counts once the manager confirms it (ADR-0187 decision 17)' }),
89
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('certificate', type => training_type_1.TrainingCertificateInput)),
90
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('attach', type => [GraphQLUpload_js_1.default], { nullable: true })),
91
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
92
+ tslib_1.__metadata("design:type", Function),
93
+ tslib_1.__metadata("design:paramtypes", [training_type_1.TrainingCertificateInput, Array, Object]),
94
+ tslib_1.__metadata("design:returntype", Promise)
95
+ ], TrainingMutation.prototype, "submitTrainingCertificate", null);
96
+ tslib_1.__decorate([
97
+ (0, type_graphql_1.Directive)(MANAGING),
98
+ (0, type_graphql_1.Directive)('@transaction'),
99
+ (0, type_graphql_1.Mutation)(returns => [training_1.TrainingCompletion], { description: "To confirm certificates sent - each closes the one's to-do" }),
100
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
101
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
102
+ tslib_1.__metadata("design:type", Function),
103
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
104
+ tslib_1.__metadata("design:returntype", Promise)
105
+ ], TrainingMutation.prototype, "confirmTrainingCompletions", null);
106
+ tslib_1.__decorate([
107
+ (0, type_graphql_1.Directive)(MANAGING),
108
+ (0, type_graphql_1.Directive)('@transaction'),
109
+ (0, type_graphql_1.Mutation)(returns => training_1.TrainingCompletion, { description: 'To return a certificate sent, saying why' }),
110
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
111
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('reason')),
112
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
113
+ tslib_1.__metadata("design:type", Function),
114
+ tslib_1.__metadata("design:paramtypes", [String, String, Object]),
115
+ tslib_1.__metadata("design:returntype", Promise)
116
+ ], TrainingMutation.prototype, "returnTrainingCompletion", null);
117
+ tslib_1.__decorate([
118
+ (0, type_graphql_1.Directive)(MANAGING),
119
+ (0, type_graphql_1.Directive)('@transaction'),
120
+ (0, type_graphql_1.Mutation)(returns => training_type_1.TrainingYearOpened, { description: "To open a kind's year - a to-do with its due day for everyone of its audience not done, once each (ADR-0187 decision 18)" }),
121
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('kind')),
122
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('year', type => type_graphql_1.Int)),
123
+ tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
124
+ tslib_1.__metadata("design:type", Function),
125
+ tslib_1.__metadata("design:paramtypes", [String, Number, Object]),
126
+ tslib_1.__metadata("design:returntype", Promise)
127
+ ], TrainingMutation.prototype, "openTrainingYear", null);
128
+ tslib_1.__decorate([
129
+ (0, type_graphql_1.Directive)(MANAGING),
130
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'Refused - training records are kept; a certificate is returned or a new completion recorded instead' }),
131
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
132
+ tslib_1.__metadata("design:type", Function),
133
+ tslib_1.__metadata("design:paramtypes", [Array]),
134
+ tslib_1.__metadata("design:returntype", Promise)
135
+ ], TrainingMutation.prototype, "deleteTrainingRecords", null);
136
+ exports.TrainingMutation = TrainingMutation = tslib_1.__decorate([
137
+ (0, type_graphql_1.Resolver)(training_1.TrainingSession),
138
+ (0, type_graphql_1.UseMiddleware)(shell_1.SpeakRefusals)
139
+ ], TrainingMutation);
140
+ //# sourceMappingURL=training-mutation.js.map