@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 @@
1
+ {"version":3,"file":"training-service.js","sourceRoot":"","sources":["../../../server/service/training/training-service.ts"],"names":[],"mappings":";;;AA+CA,8CAEC;AAGD,0CAEC;AAGD,kDAIC;AAMD,4CAKC;AA4BD,4CAWC;AAWD,oDAkBC;AAMD,kDAwCC;AAID,wDAiBC;AAuBD,4DAoCC;AAID,8DAyBC;AAGD,gEAEC;AAGD,4DAEC;AAuBD,sDAEC;AAeD,4CAqCC;AAgBD,kCAsBC;AAMD,8CAUC;AAYD,kCAuBC;AAGD,8CAKC;AAGD,wCAUC;AA5eD,qCAA2C;AAE3C,+DAAuD;AACvD,qEAAkE;AAElE,qEAAoE;AACpE,+DAA6J;AAC7J,2IAA8H;AAC9H,iDAA8D;AAE9D,+DAA6E;AAC7E,qDAAqE;AACrE,yCAA+I;AAC/I,qDAayB;AAGzB;;;;GAIG;AAEU,QAAA,yBAAyB,GAAG,iBAAiB,CAAA;AAC7C,QAAA,4BAA4B,GAAG,oBAAoB,CAAA;AACnD,QAAA,0BAA0B,GAAG,+BAA+B,CAAA;AACzE,yFAAyF;AAC5E,QAAA,oBAAoB,GAAG,2BAA2B,CAAA;AAE/D,MAAM,IAAI,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,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AAU,EAAE,OAAO,CAAC;QAAE,OAAO,IAAI,CAAA;IAC1D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAChC,MAAM,QAAQ,GAAG,MAAM,IAAA,mCAAiB,EAAC,OAAO,CAAC,CAAA;IACjD,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3B,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAC1C,MAAM,IAAI,GAAG,CAAC,MAAM,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,CAAA;IACxF,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IACvB,OAAO,CAAC,MAAM,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,IAAA,yBAAO,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,QAAQ,CAAC,EAAE,CAAC,CAAA;AACzJ,CAAC","sourcesContent":["import { EntityManager, In } from 'typeorm'\n\nimport { announce } from '@things-factory/announcement'\nimport { createAttachment } from '@things-factory/attachment-base'\nimport { User } from '@things-factory/auth-base'\nimport { translatorFor } from '@things-factory/i18n-base/translator'\nimport { audienceTargetRefusal, audienceUserIds, Department, departmentTreeOf, domainRolesOf, Employee, withDescendants } from '@things-factory/organization'\nimport { isActiveEmployee } from '@things-factory/organization/dist-server/service/employee-profile/employee-profile-rules.js'\nimport { getRepository, Refusal } from '@things-factory/shell'\n\nimport { holds, todayIn, workingEmployeeOf } from '../common/employee-reader'\nimport { closeLegalTodo, issueLegalTodo } from '../common/legal-todo'\nimport { TrainingAssignment, TrainingCompletion, TrainingCompletionStatus, TrainingMethod, TrainingSession, TrainingSetting } from './training'\nimport {\n TrainingTarget,\n trainingCertificateRefusal,\n trainingDecisionRefusal,\n trainingDeletionRefusal,\n trainingDueOnOf,\n trainingDueAt,\n TrainingKindSet,\n trainingKindsInDomain,\n trainingSessionRefusal,\n trainingSettingRefusal,\n trainingStateOf,\n TrainingState\n} from './training-rules'\nimport { NewTrainingSession, TrainingCertificateInput, TrainingSessionPatch, TrainingSettingPatch } from './training-type'\n\n/*\n * The mandatory trainings of a domain (ADR-0187 decisions 15-19): a kind's setting, a session opened and told, the\n * attendance and certificates that complete it, the to-dos of a year, and who reads where each person stands. Nothing\n * here deletes a training record.\n */\n\nexport const TRAINING_SESSION_REF_TYPE = 'TrainingSession'\nexport const TRAINING_COMPLETION_REF_TYPE = 'TrainingCompletion'\nexport const TRAINING_SCHEDULED_TRIGGER = 'compliance.training-scheduled'\n/** The employee's screen of their trainings - where a to-do and an announcement lead. */\nexport const MY_TRAININGS_ADDRESS = 'regulations?tab=trainings'\n\nconst text = (value: unknown) => (typeof value === 'string' && value.trim() ? value.trim() : null)\nconst kindWord = (t: (key: string, options?: any) => string, code: string) => t(`text.training-kind.${code}`)\n\n/* ---------------------------------------------------------------- kinds and people */\n\n/** The request's transaction, or the data source's manager for a query that runs without one. */\nexport function trainingManagerOf(context: any): EntityManager {\n return context?.state?.tx ?? getRepository(TrainingSetting).manager\n}\n\n/** The kinds as the domain has them. */\nexport async function trainingKindsOf(tx: EntityManager, domain: { id: string }): Promise<TrainingKindSet[]> {\n return trainingKindsInDomain(await tx.getRepository(TrainingSetting).find({ where: { domain: { id: domain.id } } as any }))\n}\n\n/** Whom a kind or a session is for - the whole domain when nobody is named. */\nexport function trainingAudiencesOf(kind: TrainingKindSet, domain: { id: string; name?: string }, own?: TrainingTarget[] | null): TrainingTarget[] {\n if (own?.length) return own\n if (kind.audiences.length) return kind.audiences\n return [{ scope: 'DOMAIN', targetId: domain.id, targetName: domain.name }]\n}\n\n/**\n * The people who must take a kind: the employees still working here whose account the kind's audience reaches. One\n * with no account is reached by no audience, as an announcement reaches nobody without one.\n */\nexport async function trainingPeopleOf(tx: EntityManager, domain: any, audiences: TrainingTarget[], today: string): Promise<Employee[]> {\n const userIds = await audienceUserIds(domain, audiences as any, tx)\n if (!userIds.length) return []\n const rows = await tx.getRepository(Employee).find({ where: { domain: { id: domain.id }, user: { id: In(userIds) } } as any, relations: ['user', 'department'], order: { name: 'ASC' } as any })\n return rows.filter(one => isActiveEmployee(one as any, today))\n}\n\n/** Why the targets of an audience may not be given, or nothing - each names one of this domain's own. */\nasync function audiencesRefusal(tx: EntityManager, domain: any, audiences: TrainingTarget[] | null | undefined): Promise<Refusal | null> {\n if (!audiences?.length) return null\n const departmentIds = [...(await departmentTreeOf(domain, tx)).keys()]\n const roleIds = (await domainRolesOf(domain, undefined, tx)).map(one => one.id)\n for (const target of audiences) {\n const why = audienceTargetRefusal(target, { domainId: domain.id, departmentIds, roleIds })\n if (why) return new Refusal('training-audience-invalid', { target: target.targetName ?? target.targetId }, `${target.targetName ?? target.targetId} is not of this domain (${why})`)\n }\n return null\n}\n\nconst audienceRows = (audiences?: TrainingTarget[] | null) =>\n (audiences ?? []).map(one => ({ scope: one.scope, targetId: one.targetId, ...(one.targetName ? { targetName: String(one.targetName).slice(0, 100) } : {}) }))\n\n/* ---------------------------------------------------------------- who reads */\n\nexport interface TrainingReader {\n /** Holds `training` query - reads every completion and its certificates. */\n all: boolean\n employee: Employee | null\n /** The departments the reader heads, with those under them - read for whether their people are done, nothing more. */\n headed: string[]\n}\n\n/** Who the request is to the trainings. A department head is the employee a department names as its manager. */\nexport async function trainingReaderOf(context: any): Promise<TrainingReader> {\n const { domain } = context.state\n const tx = trainingManagerOf(context)\n const all = await holds(context, 'training', 'query')\n const employee = await workingEmployeeOf(context)\n let headed: string[] = []\n if (employee) {\n const managed = await (tx as EntityManager).getRepository(Department).find({ where: { domain: { id: domain.id }, manager: { id: employee.id } } as any })\n if (managed.length) headed = withDescendants(managed.map(one => one.id), await departmentTreeOf(domain, tx))\n }\n return { all, employee, headed }\n}\n\n/** The reader may read the trainings at all - a holder or an employee; a partner is refused. */\nfunction requireReader(reader: TrainingReader): void {\n if (!reader.all && !reader.employee) throw new Refusal('compliance-employees-only', {}, 'only an employee of this company can do this')\n}\n\n/* ---------------------------------------------------------------- settings */\n\n\n/** A kind's own word - written over the declaration, one row per kind. */\nexport async function saveTrainingSettings(patches: TrainingSettingPatch[], context: any): Promise<TrainingSetting[]> {\n const { domain, user, tx } = context.state\n const repository = (tx as EntityManager).getRepository(TrainingSetting)\n const kinds = await trainingKindsOf(tx, domain)\n const saved: TrainingSetting[] = []\n for (const patch of patches) {\n const refusal = trainingSettingRefusal(patch) ?? (await audiencesRefusal(tx, domain, patch.audiences))\n if (refusal) throw refusal\n const kind = kinds.find(one => one.code === patch.kind)!\n const row: TrainingSetting = (await repository.findOne({ where: { domain: { id: domain.id }, kind: patch.kind } as any })) ?? (repository.create({ domain, kind: patch.kind, enabled: kind.enabled, creator: user } as any) as unknown as TrainingSetting)\n if (patch.enabled !== undefined && patch.enabled !== null) row.enabled = !!patch.enabled\n if (patch.dueDay !== undefined) row.dueDay = text(patch.dueDay)\n if (patch.audiences !== undefined) row.audiences = audienceRows(patch.audiences)\n if (patch.memo !== undefined) row.memo = text(patch.memo)\n row.updater = user\n saved.push(await repository.save(row))\n }\n return saved\n}\n\n/* ---------------------------------------------------------------- sessions */\n\n\n/** Opens a session with its material, and tells its audience - in the same write. */\nexport async function openTrainingSession(input: NewTrainingSession, attach: any[] | undefined, context: any): Promise<TrainingSession> {\n const { domain, user, tx } = context.state\n const kind = (await trainingKindsOf(tx, domain)).find(one => one.code === input.kind)\n const refusal = trainingSessionRefusal(input, kind) ?? (await audiencesRefusal(tx, domain, input.audiences))\n if (refusal) throw refusal\n\n const saved = await (tx as EntityManager).getRepository(TrainingSession).save({\n domain,\n kind: input.kind,\n year: input.year,\n name: input.name.trim(),\n method: input.method as TrainingMethod,\n startsOn: input.startsOn,\n endsOn: text(input.endsOn),\n instructor: text(input.instructor),\n organisation: text(input.organisation),\n audiences: audienceRows(input.audiences),\n notes: text(input.notes),\n creator: user,\n updater: user\n } as any)\n for (const file of attach ?? []) await createAttachment(null, { attachment: { file, refType: TRAINING_SESSION_REF_TYPE, refBy: saved.id } } as any, context)\n\n const t = context.t ?? ((key: string) => key)\n const when = saved.endsOn && saved.endsOn !== saved.startsOn ? `${saved.startsOn} ~ ${saved.endsOn}` : saved.startsOn\n await announce(context, {\n trigger: TRAINING_SCHEDULED_TRIGGER,\n sourceKind: TRAINING_SESSION_REF_TYPE,\n sourceId: saved.id,\n title: `${kindWord(t, saved.kind)} · ${saved.name}`,\n body: [\n `${t('field.training-session-when')}: ${when}`,\n `${t('field.training-method')}: ${t(`text.training-method.${saved.method}`)}`,\n ...(saved.instructor ? [`${t('field.training-instructor')}: ${saved.instructor}`] : []),\n ...(saved.organisation ? [`${t('field.training-organisation')}: ${saved.organisation}`] : [])\n ].join('\\n'),\n links: [{ label: t('title.training-my-trainings'), url: MY_TRAININGS_ADDRESS }],\n audiences: trainingAudiencesOf(kind!, domain, saved.audiences) as any\n })\n return saved\n}\n\n\n/** What a session says may be corrected - its kind and year stay, the completions of it count for them. */\nexport async function updateTrainingSessions(patches: TrainingSessionPatch[], context: any): Promise<TrainingSession[]> {\n const { domain, user, tx } = context.state\n const repository = (tx as EntityManager).getRepository(TrainingSession)\n const kinds = await trainingKindsOf(tx, domain)\n const saved: TrainingSession[] = []\n for (const patch of patches) {\n const row = await repository.findOne({ where: { id: patch.id, domain: { id: domain.id } } as any })\n if (!row) throw new Refusal('training-not-found', {}, 'the record was not found. reload and try again.')\n for (const field of ['name', 'method', 'startsOn', 'endsOn', 'instructor', 'organisation', 'notes'] as const)\n if (patch[field] !== undefined) (row as any)[field] = field === 'name' || field === 'method' || field === 'startsOn' ? (patch[field] ?? '').trim() : text(patch[field])\n /* An earlier session of a kind turned off since is still corrected - only what it says is asked. */\n const refusal = trainingSessionRefusal(row, { ...kinds.find(one => one.code === row.kind)!, enabled: true })\n if (refusal) throw refusal\n row.updater = user\n saved.push(await repository.save(row))\n }\n return saved\n}\n\n/* ---------------------------------------------------------------- completions */\n\nasync function completionsOf(tx: EntityManager, domain: { id: string }, employeeId: string, kind: string, year: number) {\n return await tx.getRepository(TrainingCompletion).find({ where: { domain: { id: domain.id }, employee: { id: employeeId }, kind, year } as any })\n}\n\n/** A confirmed completion closes the person's to-do of the kind and year, once. */\nasync function closeTodoOf(tx: EntityManager, domain: any, employeeId: string, kind: string, year: number, by: User): Promise<void> {\n const repository = tx.getRepository(TrainingAssignment)\n const assignment = await repository.findOne({ where: { domain: { id: domain.id }, employee: { id: employeeId }, kind, year } as any })\n if (!assignment?.todoInstanceId || assignment.closedAt) return\n await closeLegalTodo(tx, domain, assignment.todoInstanceId, by, '이수 확인')\n assignment.closedAt = new Date()\n assignment.updater = by\n await repository.save(assignment)\n}\n\n/**\n * The attendance of a session, recorded by the manager - confirmed at once. Someone already done for the kind and year\n * is left as they are.\n */\nexport async function recordTrainingAttendance(sessionId: string, employeeIds: string[], completedOn: string | null | undefined, context: any): Promise<TrainingCompletion[]> {\n const { domain, user, tx } = context.state\n const session = await (tx as EntityManager).getRepository(TrainingSession).findOne({ where: { id: sessionId, domain: { id: domain.id } } as any })\n if (!session) throw new Refusal('training-not-found', {}, 'the record was not found. reload and try again.')\n const day = text(completedOn) ?? session.endsOn ?? session.startsOn\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(day) || day < session.startsOn) throw new Refusal('training-attendance-day-invalid', { startsOn: session.startsOn }, `the day attended is on or after ${session.startsOn}, YYYY-MM-DD`)\n if (!employeeIds.length) throw new Refusal('training-attendees-required', {}, 'pick the people who attended')\n\n const today = todayIn(domain)\n const employees = await (tx as EntityManager).getRepository(Employee).find({ where: { domain: { id: domain.id }, id: In(employeeIds) } as any })\n const repository = (tx as EntityManager).getRepository(TrainingCompletion)\n const written: TrainingCompletion[] = []\n for (const id of new Set(employeeIds)) {\n const employee = employees.find(one => one.id === id)\n if (!employee || !isActiveEmployee(employee as any, today)) throw new Refusal('training-employee-unknown', {}, 'an attendee must be an employee working in this domain')\n if (trainingStateOf(await completionsOf(tx, domain, id, session.kind, session.year)) === 'DONE') continue\n written.push(\n await repository.save({\n domain,\n employee,\n kind: session.kind,\n year: session.year,\n session,\n completedOn: day,\n method: session.method,\n organisation: session.organisation,\n status: TrainingCompletionStatus.CONFIRMED,\n decidedAt: new Date(),\n decidedBy: user,\n creator: user,\n updater: user\n } as any)\n )\n await closeTodoOf(tx, domain, id, session.kind, session.year, user)\n }\n return written\n}\n\n\n/** A certificate the person sends for themself - waiting until the manager confirms it. */\nexport async function submitTrainingCertificate(input: TrainingCertificateInput, attach: any[] | undefined, context: any): Promise<TrainingCompletion> {\n const { domain, user, tx } = context.state\n const employee = await workingEmployeeOf(context)\n if (!employee) throw new Refusal('compliance-employees-only', {}, 'only an employee of this company can do this')\n const kind = (await trainingKindsOf(tx, domain)).find(one => one.code === input.kind)\n const refusal = trainingCertificateRefusal(input, kind, todayIn(domain), attach?.length ?? 0, await completionsOf(tx, domain, employee.id, input.kind, input.year))\n if (refusal) throw refusal\n const session = input.sessionId ? await (tx as EntityManager).getRepository(TrainingSession).findOne({ where: { id: input.sessionId, domain: { id: domain.id }, kind: input.kind, year: input.year } as any }) : null\n if (input.sessionId && !session) throw new Refusal('training-session-unknown', {}, 'the session must be one of this kind and year')\n\n const saved = await (tx as EntityManager).getRepository(TrainingCompletion).save({\n domain,\n employee,\n kind: input.kind,\n year: input.year,\n session,\n completedOn: input.completedOn,\n method: input.method as TrainingMethod,\n organisation: text(input.organisation),\n status: TrainingCompletionStatus.SUBMITTED,\n creator: user,\n updater: user\n } as any)\n for (const file of attach ?? []) await createAttachment(null, { attachment: { file, refType: TRAINING_COMPLETION_REF_TYPE, refBy: saved.id } } as any, context)\n return saved\n}\n\n/** The manager confirms certificates sent - each closes the person's to-do. */\nexport async function confirmTrainingCompletions(ids: string[], context: any): Promise<TrainingCompletion[]> {\n return await decide(ids, TrainingCompletionStatus.CONFIRMED, null, context)\n}\n\n/** The manager returns a certificate, saying why - the person sends another. */\nexport async function returnTrainingCompletion(id: string, reason: string, context: any): Promise<TrainingCompletion> {\n return (await decide([id], TrainingCompletionStatus.RETURNED, reason, context))[0]\n}\n\nasync function decide(ids: string[], decision: TrainingCompletionStatus.CONFIRMED | TrainingCompletionStatus.RETURNED, reason: string | null, context: any) {\n const { domain, user, tx } = context.state\n const repository = (tx as EntityManager).getRepository(TrainingCompletion)\n const saved: TrainingCompletion[] = []\n for (const id of ids) {\n const row = await repository.findOne({ where: { id, domain: { id: domain.id } } as any })\n if (!row) throw new Refusal('training-not-found', {}, 'the record was not found. reload and try again.')\n const refusal = trainingDecisionRefusal(row.status, decision, reason)\n if (refusal) throw refusal\n row.status = decision\n row.returnReason = decision === TrainingCompletionStatus.RETURNED ? reason!.trim() : null\n row.decidedAt = new Date()\n row.decidedBy = user\n row.updater = user\n saved.push(await repository.save(row))\n if (decision === TrainingCompletionStatus.CONFIRMED) await closeTodoOf(tx, domain, row.employeeId!, row.kind, row.year, user)\n }\n return saved\n}\n\n/** Training records are kept (decision 17) - every delete is refused with what to do instead. */\nexport async function deleteTrainingRecords(): Promise<never> {\n throw trainingDeletionRefusal()\n}\n\n/* ---------------------------------------------------------------- the year's to-dos */\n\nexport interface TrainingYearOpening {\n people: number\n done: number\n handedOut: number\n}\n\n/**\n * Opens a kind's year: a worklist to-do 「<교육> 이수」 with the due day for everyone of its audience not done - at most\n * one per person, kind and year, so opening it again hands out only to those it missed (a person who joined since, a\n * to-do the domain could not hand out before).\n */\nexport async function openTrainingYear(kindCode: string, year: number, context: any): Promise<TrainingYearOpening> {\n const { domain, user, tx } = context.state\n const kind = (await trainingKindsOf(tx, domain)).find(one => one.code === kindCode)\n const refusal = trainingSessionRefusal({ kind: kindCode, year, name: '-', method: 'POSTED', startsOn: `${year}-01-01` }, kind)\n if (refusal) throw refusal\n\n const today = todayIn(domain)\n const dueOn = trainingDueOnOf(year, kind!.dueDay)\n const people = await trainingPeopleOf(tx, domain, trainingAudiencesOf(kind!, domain), today)\n const repository = (tx as EntityManager).getRepository(TrainingAssignment)\n const done = new Set(\n (await (tx as EntityManager).getRepository(TrainingCompletion).find({ where: { domain: { id: domain.id }, kind: kindCode, year, status: TrainingCompletionStatus.CONFIRMED } as any })).map(one => one.employeeId)\n )\n let handedOut = 0\n for (const person of people) {\n if (done.has(person.id) || !person.user) continue\n const assignment =\n (await repository.findOne({ where: { domain: { id: domain.id }, employee: { id: person.id }, kind: kindCode, year } as any })) ??\n (await repository.save({ domain, employee: person, kind: kindCode, year, dueOn, creator: user, updater: user } as any))\n if (assignment.todoInstanceId) continue\n const t = translatorFor(person.user.locale || 'ko')\n const id = await issueLegalTodo(tx, domain, {\n assignee: person.user,\n name: t('text.training-todo-name', { kind: kindWord(t, kindCode), year }),\n headline: t('text.training-todo-headline', { dueOn }),\n address: MY_TRAININGS_ADDRESS,\n subjectKind: 'TrainingAssignment',\n subjectId: assignment.id,\n dueAt: trainingDueAt(dueOn, domain.timezone)\n })\n if (!id) continue\n assignment.todoInstanceId = id\n assignment.updater = user\n await repository.save(assignment)\n handedOut++\n }\n return { people: people.length, done: people.filter(one => done.has(one.id)).length, handedOut }\n}\n\n/* ---------------------------------------------------------------- where each person stands */\n\nexport interface TrainingStandingRow {\n id: string\n kind: string\n year: number\n dueOn: string\n state: TrainingState\n completedOn?: string | null\n employee: Employee\n departmentName?: string | null\n}\n\n/** Where everyone of every kind on stands in a year - the people of each kind's audience, by name. */\nexport async function standingsOf(tx: EntityManager, domain: any, year: number, today: string): Promise<TrainingStandingRow[]> {\n const kinds = (await trainingKindsOf(tx, domain)).filter(one => one.enabled)\n const completions = await tx.getRepository(TrainingCompletion).find({ where: { domain: { id: domain.id }, year } as any })\n const rows: TrainingStandingRow[] = []\n for (const kind of kinds) {\n const dueOn = trainingDueOnOf(year, kind.dueDay)\n for (const employee of await trainingPeopleOf(tx, domain, trainingAudiencesOf(kind, domain), today)) {\n const mine = completions.filter(one => one.kind === kind.code && one.employeeId === employee.id)\n const state = trainingStateOf(mine)\n rows.push({\n id: `${kind.code}:${year}:${employee.id}`,\n kind: kind.code,\n year,\n dueOn,\n state,\n completedOn: state === 'DONE' ? mine.filter(one => one.status === 'CONFIRMED').map(one => one.completedOn).sort()[0] : null,\n employee,\n departmentName: employee.department?.name ?? null\n })\n }\n }\n return rows\n}\n\n/**\n * The standings the reader may read: a holder all of them; an employee their own; a department head also whether each\n * of their people is done - no day, no waiting certificate, nothing of its content.\n */\nexport async function readableStandings(year: number, context: any): Promise<TrainingStandingRow[]> {\n const { domain } = context.state\n const tx = trainingManagerOf(context)\n const reader = await trainingReaderOf(context)\n requireReader(reader)\n const rows = await standingsOf(tx, domain, year, todayIn(domain))\n if (reader.all) return rows\n return rows\n .filter(row => row.employee.id === reader.employee!.id || (row.employee.departmentId && reader.headed.includes(row.employee.departmentId)))\n .map(row => (row.employee.id === reader.employee!.id ? row : { ...row, state: row.state === 'DONE' ? 'DONE' : 'NOT_DONE', completedOn: null }))\n}\n\nexport interface MyTrainingRow {\n kind: string\n year: number\n dueOn: string\n state: TrainingState\n completion?: TrainingCompletion | null\n sessions: TrainingSession[]\n}\n\n/** The request's employee's trainings of a year: each kind on whose audience they are in, with its sessions. */\nexport async function myTrainings(year: number, context: any): Promise<MyTrainingRow[]> {\n const { domain } = context.state\n const tx = trainingManagerOf(context)\n const employee = await workingEmployeeOf(context)\n if (!employee) throw new Refusal('compliance-employees-only', {}, 'only an employee of this company can do this')\n const today = todayIn(domain)\n const kinds = (await trainingKindsOf(tx, domain)).filter(one => one.enabled)\n const sessions = await (tx as EntityManager).getRepository(TrainingSession).find({ where: { domain: { id: domain.id }, year } as any, order: { startsOn: 'ASC' } as any })\n const out: MyTrainingRow[] = []\n for (const kind of kinds) {\n if (!(await trainingPeopleOf(tx, domain, trainingAudiencesOf(kind, domain), today)).some(one => one.id === employee.id)) continue\n const mine = (await completionsOf(tx, domain, employee.id, kind.code, year)).sort((a, b) => +new Date(b.createdAt!) - +new Date(a.createdAt!))\n const state = trainingStateOf(mine)\n out.push({\n kind: kind.code,\n year,\n dueOn: trainingDueOnOf(year, kind.dueDay),\n state,\n completion: (state === 'DONE' ? mine.find(one => one.status === 'CONFIRMED') : mine[0]) ?? null,\n sessions: sessions.filter(one => one.kind === kind.code)\n })\n }\n return out\n}\n\n/** Whether the request may read a completion - a holder, or the one it is of. A department head may not. */\nexport async function mayReadCompletion(row: { employeeId?: string | null } | null, context: any): Promise<boolean> {\n if (!row) return false\n if (await holds(context, 'training', 'query')) return true\n const employee = await workingEmployeeOf(context)\n return !!employee && employee.id === row.employeeId\n}\n\n/** Whether the request may read a session's material - a holder, or an employee it is for. */\nexport async function mayReadSession(row: TrainingSession | null, context: any): Promise<boolean> {\n if (!row) return false\n if (await holds(context, 'training', 'query')) return true\n const { domain } = context.state\n const employee = await workingEmployeeOf(context)\n if (!employee) return false\n const manager = trainingManagerOf(context)\n const kind = (await trainingKindsOf(manager, domain)).find(one => one.code === row.kind)\n if (!kind) return false\n return (await trainingPeopleOf(manager, domain, trainingAudiencesOf(kind, domain, row.audiences), todayIn(domain))).some(one => one.id === employee.id)\n}\n"]}
@@ -0,0 +1,94 @@
1
+ import { Employee } from '@things-factory/organization';
2
+ import { TrainingAudience, TrainingCompletion, TrainingMethod, TrainingSession } from './training';
3
+ export declare class TrainingAudienceInput {
4
+ scope: string;
5
+ targetId: string;
6
+ targetName?: string;
7
+ }
8
+ export declare class TrainingSettingPatch {
9
+ kind: string;
10
+ enabled?: boolean;
11
+ dueDay?: string;
12
+ audiences?: TrainingAudienceInput[];
13
+ memo?: string;
14
+ }
15
+ export declare class NewTrainingSession {
16
+ kind: string;
17
+ year: number;
18
+ name: string;
19
+ method: TrainingMethod;
20
+ startsOn: string;
21
+ endsOn?: string;
22
+ instructor?: string;
23
+ organisation?: string;
24
+ audiences?: TrainingAudienceInput[];
25
+ notes?: string;
26
+ }
27
+ export declare class TrainingSessionPatch {
28
+ id: string;
29
+ name?: string;
30
+ method?: TrainingMethod;
31
+ startsOn?: string;
32
+ endsOn?: string;
33
+ instructor?: string;
34
+ organisation?: string;
35
+ notes?: string;
36
+ cuFlag?: string;
37
+ }
38
+ export declare class TrainingCertificateInput {
39
+ kind: string;
40
+ year: number;
41
+ completedOn: string;
42
+ method: TrainingMethod;
43
+ sessionId?: string;
44
+ organisation?: string;
45
+ }
46
+ export declare class TrainingKindInDomain {
47
+ code: string;
48
+ basis: string;
49
+ cycle: string;
50
+ audience: string;
51
+ defaultOn: boolean;
52
+ retentionYears: number;
53
+ toConfirm?: boolean;
54
+ enabled: boolean;
55
+ dueDay: string;
56
+ audiences: TrainingAudience[];
57
+ memo?: string;
58
+ set: boolean;
59
+ }
60
+ export declare class TrainingSessionList {
61
+ items: TrainingSession[];
62
+ total: number;
63
+ }
64
+ export declare class TrainingCompletionList {
65
+ items: TrainingCompletion[];
66
+ total: number;
67
+ }
68
+ export declare class TrainingStanding {
69
+ id: string;
70
+ kind: string;
71
+ year: number;
72
+ dueOn: string;
73
+ state: string;
74
+ completedOn?: string;
75
+ employee?: Employee;
76
+ departmentName?: string;
77
+ }
78
+ export declare class TrainingStandingList {
79
+ items: TrainingStanding[];
80
+ total: number;
81
+ }
82
+ export declare class MyTraining {
83
+ kind: string;
84
+ year: number;
85
+ dueOn: string;
86
+ state: string;
87
+ completion?: TrainingCompletion;
88
+ sessions: TrainingSession[];
89
+ }
90
+ export declare class TrainingYearOpened {
91
+ people: number;
92
+ done: number;
93
+ handedOut: number;
94
+ }
@@ -0,0 +1,352 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrainingYearOpened = exports.MyTraining = exports.TrainingStandingList = exports.TrainingStanding = exports.TrainingCompletionList = exports.TrainingSessionList = exports.TrainingKindInDomain = exports.TrainingCertificateInput = exports.TrainingSessionPatch = exports.NewTrainingSession = exports.TrainingSettingPatch = exports.TrainingAudienceInput = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const organization_1 = require("@things-factory/organization");
7
+ const training_1 = require("./training");
8
+ let TrainingAudienceInput = class TrainingAudienceInput {
9
+ };
10
+ exports.TrainingAudienceInput = TrainingAudienceInput;
11
+ tslib_1.__decorate([
12
+ (0, type_graphql_1.Field)({ description: 'DOMAIN | DEPARTMENT | ROLE | USER' }),
13
+ tslib_1.__metadata("design:type", String)
14
+ ], TrainingAudienceInput.prototype, "scope", void 0);
15
+ tslib_1.__decorate([
16
+ (0, type_graphql_1.Field)({ description: 'The id of the domain, department, role or user' }),
17
+ tslib_1.__metadata("design:type", String)
18
+ ], TrainingAudienceInput.prototype, "targetId", void 0);
19
+ tslib_1.__decorate([
20
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Its name, as shown' }),
21
+ tslib_1.__metadata("design:type", String)
22
+ ], TrainingAudienceInput.prototype, "targetName", void 0);
23
+ exports.TrainingAudienceInput = TrainingAudienceInput = tslib_1.__decorate([
24
+ (0, type_graphql_1.InputType)({ description: 'One target of an audience' })
25
+ ], TrainingAudienceInput);
26
+ let TrainingSettingPatch = class TrainingSettingPatch {
27
+ };
28
+ exports.TrainingSettingPatch = TrainingSettingPatch;
29
+ tslib_1.__decorate([
30
+ (0, type_graphql_1.Field)({ description: 'The kind' }),
31
+ tslib_1.__metadata("design:type", String)
32
+ ], TrainingSettingPatch.prototype, "kind", void 0);
33
+ tslib_1.__decorate([
34
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Whether the domain trains it' }),
35
+ tslib_1.__metadata("design:type", Boolean)
36
+ ], TrainingSettingPatch.prototype, "enabled", void 0);
37
+ tslib_1.__decorate([
38
+ (0, type_graphql_1.Field)({ nullable: true, description: 'MM-DD of each year it is due by' }),
39
+ tslib_1.__metadata("design:type", String)
40
+ ], TrainingSettingPatch.prototype, "dueDay", void 0);
41
+ tslib_1.__decorate([
42
+ (0, type_graphql_1.Field)(type => [TrainingAudienceInput], { nullable: true, description: 'Who must take it - the whole domain when empty' }),
43
+ tslib_1.__metadata("design:type", Array)
44
+ ], TrainingSettingPatch.prototype, "audiences", void 0);
45
+ tslib_1.__decorate([
46
+ (0, type_graphql_1.Field)({ nullable: true }),
47
+ tslib_1.__metadata("design:type", String)
48
+ ], TrainingSettingPatch.prototype, "memo", void 0);
49
+ exports.TrainingSettingPatch = TrainingSettingPatch = tslib_1.__decorate([
50
+ (0, type_graphql_1.InputType)({ description: "A domain's word on one kind of training - what is left out stays" })
51
+ ], TrainingSettingPatch);
52
+ let NewTrainingSession = class NewTrainingSession {
53
+ };
54
+ exports.NewTrainingSession = NewTrainingSession;
55
+ tslib_1.__decorate([
56
+ (0, type_graphql_1.Field)({ description: 'The kind' }),
57
+ tslib_1.__metadata("design:type", String)
58
+ ], NewTrainingSession.prototype, "kind", void 0);
59
+ tslib_1.__decorate([
60
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The year it counts for' }),
61
+ tslib_1.__metadata("design:type", Number)
62
+ ], NewTrainingSession.prototype, "year", void 0);
63
+ tslib_1.__decorate([
64
+ (0, type_graphql_1.Field)(),
65
+ tslib_1.__metadata("design:type", String)
66
+ ], NewTrainingSession.prototype, "name", void 0);
67
+ tslib_1.__decorate([
68
+ (0, type_graphql_1.Field)(type => training_1.TrainingMethod),
69
+ tslib_1.__metadata("design:type", String)
70
+ ], NewTrainingSession.prototype, "method", void 0);
71
+ tslib_1.__decorate([
72
+ (0, type_graphql_1.Field)({ description: 'YYYY-MM-DD' }),
73
+ tslib_1.__metadata("design:type", String)
74
+ ], NewTrainingSession.prototype, "startsOn", void 0);
75
+ tslib_1.__decorate([
76
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD' }),
77
+ tslib_1.__metadata("design:type", String)
78
+ ], NewTrainingSession.prototype, "endsOn", void 0);
79
+ tslib_1.__decorate([
80
+ (0, type_graphql_1.Field)({ nullable: true }),
81
+ tslib_1.__metadata("design:type", String)
82
+ ], NewTrainingSession.prototype, "instructor", void 0);
83
+ tslib_1.__decorate([
84
+ (0, type_graphql_1.Field)({ nullable: true }),
85
+ tslib_1.__metadata("design:type", String)
86
+ ], NewTrainingSession.prototype, "organisation", void 0);
87
+ tslib_1.__decorate([
88
+ (0, type_graphql_1.Field)(type => [TrainingAudienceInput], { nullable: true, description: "Who it is for - the kind's audience when empty" }),
89
+ tslib_1.__metadata("design:type", Array)
90
+ ], NewTrainingSession.prototype, "audiences", void 0);
91
+ tslib_1.__decorate([
92
+ (0, type_graphql_1.Field)({ nullable: true }),
93
+ tslib_1.__metadata("design:type", String)
94
+ ], NewTrainingSession.prototype, "notes", void 0);
95
+ exports.NewTrainingSession = NewTrainingSession = tslib_1.__decorate([
96
+ (0, type_graphql_1.InputType)({ description: 'A session as it is opened' })
97
+ ], NewTrainingSession);
98
+ let TrainingSessionPatch = class TrainingSessionPatch {
99
+ };
100
+ exports.TrainingSessionPatch = TrainingSessionPatch;
101
+ tslib_1.__decorate([
102
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
103
+ tslib_1.__metadata("design:type", String)
104
+ ], TrainingSessionPatch.prototype, "id", void 0);
105
+ tslib_1.__decorate([
106
+ (0, type_graphql_1.Field)({ nullable: true }),
107
+ tslib_1.__metadata("design:type", String)
108
+ ], TrainingSessionPatch.prototype, "name", void 0);
109
+ tslib_1.__decorate([
110
+ (0, type_graphql_1.Field)(type => training_1.TrainingMethod, { nullable: true }),
111
+ tslib_1.__metadata("design:type", String)
112
+ ], TrainingSessionPatch.prototype, "method", void 0);
113
+ tslib_1.__decorate([
114
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD' }),
115
+ tslib_1.__metadata("design:type", String)
116
+ ], TrainingSessionPatch.prototype, "startsOn", void 0);
117
+ tslib_1.__decorate([
118
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD' }),
119
+ tslib_1.__metadata("design:type", String)
120
+ ], TrainingSessionPatch.prototype, "endsOn", void 0);
121
+ tslib_1.__decorate([
122
+ (0, type_graphql_1.Field)({ nullable: true }),
123
+ tslib_1.__metadata("design:type", String)
124
+ ], TrainingSessionPatch.prototype, "instructor", void 0);
125
+ tslib_1.__decorate([
126
+ (0, type_graphql_1.Field)({ nullable: true }),
127
+ tslib_1.__metadata("design:type", String)
128
+ ], TrainingSessionPatch.prototype, "organisation", void 0);
129
+ tslib_1.__decorate([
130
+ (0, type_graphql_1.Field)({ nullable: true }),
131
+ tslib_1.__metadata("design:type", String)
132
+ ], TrainingSessionPatch.prototype, "notes", void 0);
133
+ tslib_1.__decorate([
134
+ (0, type_graphql_1.Field)({ nullable: true, description: 'M changed' }),
135
+ tslib_1.__metadata("design:type", String)
136
+ ], TrainingSessionPatch.prototype, "cuFlag", void 0);
137
+ exports.TrainingSessionPatch = TrainingSessionPatch = tslib_1.__decorate([
138
+ (0, type_graphql_1.InputType)({ description: 'What changes on a session - its kind and year stay' })
139
+ ], TrainingSessionPatch);
140
+ let TrainingCertificateInput = class TrainingCertificateInput {
141
+ };
142
+ exports.TrainingCertificateInput = TrainingCertificateInput;
143
+ tslib_1.__decorate([
144
+ (0, type_graphql_1.Field)({ description: 'The kind' }),
145
+ tslib_1.__metadata("design:type", String)
146
+ ], TrainingCertificateInput.prototype, "kind", void 0);
147
+ tslib_1.__decorate([
148
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The year it counts for' }),
149
+ tslib_1.__metadata("design:type", Number)
150
+ ], TrainingCertificateInput.prototype, "year", void 0);
151
+ tslib_1.__decorate([
152
+ (0, type_graphql_1.Field)({ description: 'YYYY-MM-DD it was completed' }),
153
+ tslib_1.__metadata("design:type", String)
154
+ ], TrainingCertificateInput.prototype, "completedOn", void 0);
155
+ tslib_1.__decorate([
156
+ (0, type_graphql_1.Field)(type => training_1.TrainingMethod),
157
+ tslib_1.__metadata("design:type", String)
158
+ ], TrainingCertificateInput.prototype, "method", void 0);
159
+ tslib_1.__decorate([
160
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The session taken, when it was one of the domain' }),
161
+ tslib_1.__metadata("design:type", String)
162
+ ], TrainingCertificateInput.prototype, "sessionId", void 0);
163
+ tslib_1.__decorate([
164
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The organisation that gave it' }),
165
+ tslib_1.__metadata("design:type", String)
166
+ ], TrainingCertificateInput.prototype, "organisation", void 0);
167
+ exports.TrainingCertificateInput = TrainingCertificateInput = tslib_1.__decorate([
168
+ (0, type_graphql_1.InputType)({ description: 'A certificate the person sends for a training taken' })
169
+ ], TrainingCertificateInput);
170
+ let TrainingKindInDomain = class TrainingKindInDomain {
171
+ };
172
+ exports.TrainingKindInDomain = TrainingKindInDomain;
173
+ tslib_1.__decorate([
174
+ (0, type_graphql_1.Field)({ description: 'SEXUAL_HARASSMENT, DISABILITY_AWARENESS, PENSION, PRIVACY, SAFETY, WORKPLACE_BULLYING, OTHER' }),
175
+ tslib_1.__metadata("design:type", String)
176
+ ], TrainingKindInDomain.prototype, "code", void 0);
177
+ tslib_1.__decorate([
178
+ (0, type_graphql_1.Field)({ description: 'The article it rests on' }),
179
+ tslib_1.__metadata("design:type", String)
180
+ ], TrainingKindInDomain.prototype, "basis", void 0);
181
+ tslib_1.__decorate([
182
+ (0, type_graphql_1.Field)({ description: 'YEARLY | PLAN | COMPANY | BY_INDUSTRY' }),
183
+ tslib_1.__metadata("design:type", String)
184
+ ], TrainingKindInDomain.prototype, "cycle", void 0);
185
+ tslib_1.__decorate([
186
+ (0, type_graphql_1.Field)({ description: 'Who must take it, as the law says it' }),
187
+ tslib_1.__metadata("design:type", String)
188
+ ], TrainingKindInDomain.prototype, "audience", void 0);
189
+ tslib_1.__decorate([
190
+ (0, type_graphql_1.Field)({ description: 'On where the domain has not said' }),
191
+ tslib_1.__metadata("design:type", Boolean)
192
+ ], TrainingKindInDomain.prototype, "defaultOn", void 0);
193
+ tslib_1.__decorate([
194
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Years its records are kept' }),
195
+ tslib_1.__metadata("design:type", Number)
196
+ ], TrainingKindInDomain.prototype, "retentionYears", void 0);
197
+ tslib_1.__decorate([
198
+ (0, type_graphql_1.Field)({ nullable: true, description: 'The basis is to be settled with a labour attorney' }),
199
+ tslib_1.__metadata("design:type", Boolean)
200
+ ], TrainingKindInDomain.prototype, "toConfirm", void 0);
201
+ tslib_1.__decorate([
202
+ (0, type_graphql_1.Field)({ description: 'Whether the domain trains it' }),
203
+ tslib_1.__metadata("design:type", Boolean)
204
+ ], TrainingKindInDomain.prototype, "enabled", void 0);
205
+ tslib_1.__decorate([
206
+ (0, type_graphql_1.Field)({ description: 'MM-DD of each year it is due by' }),
207
+ tslib_1.__metadata("design:type", String)
208
+ ], TrainingKindInDomain.prototype, "dueDay", void 0);
209
+ tslib_1.__decorate([
210
+ (0, type_graphql_1.Field)(type => [training_1.TrainingAudience], { description: 'Who must take it - the whole domain when empty' }),
211
+ tslib_1.__metadata("design:type", Array)
212
+ ], TrainingKindInDomain.prototype, "audiences", void 0);
213
+ tslib_1.__decorate([
214
+ (0, type_graphql_1.Field)({ nullable: true }),
215
+ tslib_1.__metadata("design:type", String)
216
+ ], TrainingKindInDomain.prototype, "memo", void 0);
217
+ tslib_1.__decorate([
218
+ (0, type_graphql_1.Field)({ description: 'Whether the domain has said anything of it' }),
219
+ tslib_1.__metadata("design:type", Boolean)
220
+ ], TrainingKindInDomain.prototype, "set", void 0);
221
+ exports.TrainingKindInDomain = TrainingKindInDomain = tslib_1.__decorate([
222
+ (0, type_graphql_1.ObjectType)({ description: 'A kind of mandatory training as the domain has it - the declaration with its own word over it' })
223
+ ], TrainingKindInDomain);
224
+ let TrainingSessionList = class TrainingSessionList {
225
+ };
226
+ exports.TrainingSessionList = TrainingSessionList;
227
+ tslib_1.__decorate([
228
+ (0, type_graphql_1.Field)(type => [training_1.TrainingSession]),
229
+ tslib_1.__metadata("design:type", Array)
230
+ ], TrainingSessionList.prototype, "items", void 0);
231
+ tslib_1.__decorate([
232
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
233
+ tslib_1.__metadata("design:type", Number)
234
+ ], TrainingSessionList.prototype, "total", void 0);
235
+ exports.TrainingSessionList = TrainingSessionList = tslib_1.__decorate([
236
+ (0, type_graphql_1.ObjectType)()
237
+ ], TrainingSessionList);
238
+ let TrainingCompletionList = class TrainingCompletionList {
239
+ };
240
+ exports.TrainingCompletionList = TrainingCompletionList;
241
+ tslib_1.__decorate([
242
+ (0, type_graphql_1.Field)(type => [training_1.TrainingCompletion]),
243
+ tslib_1.__metadata("design:type", Array)
244
+ ], TrainingCompletionList.prototype, "items", void 0);
245
+ tslib_1.__decorate([
246
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
247
+ tslib_1.__metadata("design:type", Number)
248
+ ], TrainingCompletionList.prototype, "total", void 0);
249
+ exports.TrainingCompletionList = TrainingCompletionList = tslib_1.__decorate([
250
+ (0, type_graphql_1.ObjectType)()
251
+ ], TrainingCompletionList);
252
+ let TrainingStanding = class TrainingStanding {
253
+ };
254
+ exports.TrainingStanding = TrainingStanding;
255
+ tslib_1.__decorate([
256
+ (0, type_graphql_1.Field)({ description: '<kind>:<year>:<employee id>' }),
257
+ tslib_1.__metadata("design:type", String)
258
+ ], TrainingStanding.prototype, "id", void 0);
259
+ tslib_1.__decorate([
260
+ (0, type_graphql_1.Field)(),
261
+ tslib_1.__metadata("design:type", String)
262
+ ], TrainingStanding.prototype, "kind", void 0);
263
+ tslib_1.__decorate([
264
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
265
+ tslib_1.__metadata("design:type", Number)
266
+ ], TrainingStanding.prototype, "year", void 0);
267
+ tslib_1.__decorate([
268
+ (0, type_graphql_1.Field)({ description: 'YYYY-MM-DD it is due by' }),
269
+ tslib_1.__metadata("design:type", String)
270
+ ], TrainingStanding.prototype, "dueOn", void 0);
271
+ tslib_1.__decorate([
272
+ (0, type_graphql_1.Field)({ description: 'DONE (confirmed) | WAITING (a certificate waits for the manager) | NOT_DONE' }),
273
+ tslib_1.__metadata("design:type", String)
274
+ ], TrainingStanding.prototype, "state", void 0);
275
+ tslib_1.__decorate([
276
+ (0, type_graphql_1.Field)({ nullable: true, description: 'YYYY-MM-DD it was completed' }),
277
+ tslib_1.__metadata("design:type", String)
278
+ ], TrainingStanding.prototype, "completedOn", void 0);
279
+ tslib_1.__decorate([
280
+ (0, type_graphql_1.Field)(type => organization_1.Employee, { nullable: true }),
281
+ tslib_1.__metadata("design:type", organization_1.Employee)
282
+ ], TrainingStanding.prototype, "employee", void 0);
283
+ tslib_1.__decorate([
284
+ (0, type_graphql_1.Field)({ nullable: true }),
285
+ tslib_1.__metadata("design:type", String)
286
+ ], TrainingStanding.prototype, "departmentName", void 0);
287
+ exports.TrainingStanding = TrainingStanding = tslib_1.__decorate([
288
+ (0, type_graphql_1.ObjectType)({ description: "Where one person stands on one kind in a year - a department head reads only whether they are done" })
289
+ ], TrainingStanding);
290
+ let TrainingStandingList = class TrainingStandingList {
291
+ };
292
+ exports.TrainingStandingList = TrainingStandingList;
293
+ tslib_1.__decorate([
294
+ (0, type_graphql_1.Field)(type => [TrainingStanding]),
295
+ tslib_1.__metadata("design:type", Array)
296
+ ], TrainingStandingList.prototype, "items", void 0);
297
+ tslib_1.__decorate([
298
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
299
+ tslib_1.__metadata("design:type", Number)
300
+ ], TrainingStandingList.prototype, "total", void 0);
301
+ exports.TrainingStandingList = TrainingStandingList = tslib_1.__decorate([
302
+ (0, type_graphql_1.ObjectType)()
303
+ ], TrainingStandingList);
304
+ let MyTraining = class MyTraining {
305
+ };
306
+ exports.MyTraining = MyTraining;
307
+ tslib_1.__decorate([
308
+ (0, type_graphql_1.Field)(),
309
+ tslib_1.__metadata("design:type", String)
310
+ ], MyTraining.prototype, "kind", void 0);
311
+ tslib_1.__decorate([
312
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
313
+ tslib_1.__metadata("design:type", Number)
314
+ ], MyTraining.prototype, "year", void 0);
315
+ tslib_1.__decorate([
316
+ (0, type_graphql_1.Field)({ description: 'YYYY-MM-DD it is due by' }),
317
+ tslib_1.__metadata("design:type", String)
318
+ ], MyTraining.prototype, "dueOn", void 0);
319
+ tslib_1.__decorate([
320
+ (0, type_graphql_1.Field)({ description: 'DONE | WAITING | NOT_DONE' }),
321
+ tslib_1.__metadata("design:type", String)
322
+ ], MyTraining.prototype, "state", void 0);
323
+ tslib_1.__decorate([
324
+ (0, type_graphql_1.Field)(type => training_1.TrainingCompletion, { nullable: true, description: 'The confirmed completion, or the latest one sent' }),
325
+ tslib_1.__metadata("design:type", training_1.TrainingCompletion)
326
+ ], MyTraining.prototype, "completion", void 0);
327
+ tslib_1.__decorate([
328
+ (0, type_graphql_1.Field)(type => [training_1.TrainingSession], { description: 'The sessions of the kind this year' }),
329
+ tslib_1.__metadata("design:type", Array)
330
+ ], MyTraining.prototype, "sessions", void 0);
331
+ exports.MyTraining = MyTraining = tslib_1.__decorate([
332
+ (0, type_graphql_1.ObjectType)({ description: "One kind the request's employee must take in a year, with its sessions" })
333
+ ], MyTraining);
334
+ let TrainingYearOpened = class TrainingYearOpened {
335
+ };
336
+ exports.TrainingYearOpened = TrainingYearOpened;
337
+ tslib_1.__decorate([
338
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'People who must take it' }),
339
+ tslib_1.__metadata("design:type", Number)
340
+ ], TrainingYearOpened.prototype, "people", void 0);
341
+ tslib_1.__decorate([
342
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Of them, done already' }),
343
+ tslib_1.__metadata("design:type", Number)
344
+ ], TrainingYearOpened.prototype, "done", void 0);
345
+ tslib_1.__decorate([
346
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'To-dos handed out now' }),
347
+ tslib_1.__metadata("design:type", Number)
348
+ ], TrainingYearOpened.prototype, "handedOut", void 0);
349
+ exports.TrainingYearOpened = TrainingYearOpened = tslib_1.__decorate([
350
+ (0, type_graphql_1.ObjectType)({ description: 'What opening a year of a kind did' })
351
+ ], TrainingYearOpened);
352
+ //# sourceMappingURL=training-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"training-type.js","sourceRoot":"","sources":["../../../server/service/training/training-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,+DAAuD;AAEvD,yCAAkG;AAG3F,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAIjC,CAAA;AAJY,sDAAqB;AAC6B;IAA5D,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;;oDAAc;AACA;IAAzE,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;;uDAAiB;AAC5B;IAA7D,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;;yDAAoB;gCAHtE,qBAAqB;IADjC,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;GAC3C,qBAAqB,CAIjC;AAGM,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAMhC,CAAA;AANY,oDAAoB;AACK;IAAnC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;;kDAAa;AACwB;IAAvE,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;;qDAAkB;AACd;IAA1E,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;;oDAAgB;AACiC;IAA1H,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;;uDAAoC;AACnI;IAA1B,IAAA,oBAA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EAAE,CAAC;;yCAAc;AACX;IAApD,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;;yCAAc;AACsD;IAAvH,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,6BAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;sCAAc,6BAAkB;8CAAA;AAC9D;IAAxF,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,0BAAe,CAAC,EAAE,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;;4CAA4B;qBANzG,UAAU;IADtB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,wEAAwE,EAAE,CAAC;GACzF,UAAU,CAOtB;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAI9B,CAAA;AAJY,gDAAkB;AACmC;IAA/D,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;kDAAe;AAChB;IAA7D,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;gDAAa;AACZ;IAA7D,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;qDAAkB;6BAHpE,kBAAkB;IAD9B,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;GACpD,kBAAkB,CAI9B","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Employee } from '@things-factory/organization'\n\nimport { TrainingAudience, TrainingCompletion, TrainingMethod, TrainingSession } from './training'\n\n@InputType({ description: 'One target of an audience' })\nexport class TrainingAudienceInput {\n @Field({ description: 'DOMAIN | DEPARTMENT | ROLE | USER' }) scope: string\n @Field({ description: 'The id of the domain, department, role or user' }) targetId: string\n @Field({ nullable: true, description: 'Its name, as shown' }) targetName?: string\n}\n\n@InputType({ description: \"A domain's word on one kind of training - what is left out stays\" })\nexport class TrainingSettingPatch {\n @Field({ description: 'The kind' }) kind: string\n @Field({ nullable: true, description: 'Whether the domain trains it' }) enabled?: boolean\n @Field({ nullable: true, description: 'MM-DD of each year it is due by' }) dueDay?: string\n @Field(type => [TrainingAudienceInput], { nullable: true, description: 'Who must take it - the whole domain when empty' }) audiences?: TrainingAudienceInput[]\n @Field({ nullable: true }) memo?: string\n}\n\n@InputType({ description: 'A session as it is opened' })\nexport class NewTrainingSession {\n @Field({ description: 'The kind' }) kind: string\n @Field(type => Int, { description: 'The year it counts for' }) year: number\n @Field() name: string\n @Field(type => TrainingMethod) method: TrainingMethod\n @Field({ description: 'YYYY-MM-DD' }) startsOn: string\n @Field({ nullable: true, description: 'YYYY-MM-DD' }) endsOn?: string\n @Field({ nullable: true }) instructor?: string\n @Field({ nullable: true }) organisation?: string\n @Field(type => [TrainingAudienceInput], { nullable: true, description: \"Who it is for - the kind's audience when empty\" }) audiences?: TrainingAudienceInput[]\n @Field({ nullable: true }) notes?: string\n}\n\n@InputType({ description: 'What changes on a session - its kind and year stay' })\nexport class TrainingSessionPatch {\n @Field(type => ID) id: string\n @Field({ nullable: true }) name?: string\n @Field(type => TrainingMethod, { nullable: true }) method?: TrainingMethod\n @Field({ nullable: true, description: 'YYYY-MM-DD' }) startsOn?: string\n @Field({ nullable: true, description: 'YYYY-MM-DD' }) endsOn?: string\n @Field({ nullable: true }) instructor?: string\n @Field({ nullable: true }) organisation?: string\n @Field({ nullable: true }) notes?: string\n @Field({ nullable: true, description: 'M changed' }) cuFlag?: string\n}\n\n@InputType({ description: 'A certificate the person sends for a training taken' })\nexport class TrainingCertificateInput {\n @Field({ description: 'The kind' }) kind: string\n @Field(type => Int, { description: 'The year it counts for' }) year: number\n @Field({ description: 'YYYY-MM-DD it was completed' }) completedOn: string\n @Field(type => TrainingMethod) method: TrainingMethod\n @Field({ nullable: true, description: 'The session taken, when it was one of the domain' }) sessionId?: string\n @Field({ nullable: true, description: 'The organisation that gave it' }) organisation?: string\n}\n\n@ObjectType({ description: 'A kind of mandatory training as the domain has it - the declaration with its own word over it' })\nexport class TrainingKindInDomain {\n @Field({ description: 'SEXUAL_HARASSMENT, DISABILITY_AWARENESS, PENSION, PRIVACY, SAFETY, WORKPLACE_BULLYING, OTHER' }) code: string\n @Field({ description: 'The article it rests on' }) basis: string\n @Field({ description: 'YEARLY | PLAN | COMPANY | BY_INDUSTRY' }) cycle: string\n @Field({ description: 'Who must take it, as the law says it' }) audience: string\n @Field({ description: 'On where the domain has not said' }) defaultOn: boolean\n @Field(type => Int, { description: 'Years its records are kept' }) retentionYears: number\n @Field({ nullable: true, description: 'The basis is to be settled with a labour attorney' }) toConfirm?: boolean\n @Field({ description: 'Whether the domain trains it' }) enabled: boolean\n @Field({ description: 'MM-DD of each year it is due by' }) dueDay: string\n @Field(type => [TrainingAudience], { description: 'Who must take it - the whole domain when empty' }) audiences: TrainingAudience[]\n @Field({ nullable: true }) memo?: string\n @Field({ description: 'Whether the domain has said anything of it' }) set: boolean\n}\n\n@ObjectType()\nexport class TrainingSessionList {\n @Field(type => [TrainingSession]) items: TrainingSession[]\n @Field(type => Int) total: number\n}\n\n@ObjectType()\nexport class TrainingCompletionList {\n @Field(type => [TrainingCompletion]) items: TrainingCompletion[]\n @Field(type => Int) total: number\n}\n\n@ObjectType({ description: \"Where one person stands on one kind in a year - a department head reads only whether they are done\" })\nexport class TrainingStanding {\n @Field({ description: '<kind>:<year>:<employee id>' }) id: string\n @Field() kind: string\n @Field(type => Int) year: number\n @Field({ description: 'YYYY-MM-DD it is due by' }) dueOn: string\n @Field({ description: 'DONE (confirmed) | WAITING (a certificate waits for the manager) | NOT_DONE' }) state: string\n @Field({ nullable: true, description: 'YYYY-MM-DD it was completed' }) completedOn?: string\n @Field(type => Employee, { nullable: true }) employee?: Employee\n @Field({ nullable: true }) departmentName?: string\n}\n\n@ObjectType()\nexport class TrainingStandingList {\n @Field(type => [TrainingStanding]) items: TrainingStanding[]\n @Field(type => Int) total: number\n}\n\n@ObjectType({ description: \"One kind the request's employee must take in a year, with its sessions\" })\nexport class MyTraining {\n @Field() kind: string\n @Field(type => Int) year: number\n @Field({ description: 'YYYY-MM-DD it is due by' }) dueOn: string\n @Field({ description: 'DONE | WAITING | NOT_DONE' }) state: string\n @Field(type => TrainingCompletion, { nullable: true, description: 'The confirmed completion, or the latest one sent' }) completion?: TrainingCompletion\n @Field(type => [TrainingSession], { description: 'The sessions of the kind this year' }) sessions: TrainingSession[]\n}\n\n@ObjectType({ description: 'What opening a year of a kind did' })\nexport class TrainingYearOpened {\n @Field(type => Int, { description: 'People who must take it' }) people: number\n @Field(type => Int, { description: 'Of them, done already' }) done: number\n @Field(type => Int, { description: 'To-dos handed out now' }) handedOut: number\n}\n"]}